summary refs log tree commit diff
path: root/api/assets/7fbe1e6b1c5663e3a84e.js
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-15 21:56:30 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-15 21:56:30 +0200
commitdbdfbf61f29f6e454c0543c977afb4061d24afa8 (patch)
tree25f6ca9692eeda3cdb6657aec0b4ee87c1acdedb /api/assets/7fbe1e6b1c5663e3a84e.js
parent:bug: prevent @everyone role deletion (diff)
downloadserver-dbdfbf61f29f6e454c0543c977afb4061d24afa8.tar.xz
:bug: fix server bundle
Diffstat (limited to 'api/assets/7fbe1e6b1c5663e3a84e.js')
-rw-r--r--api/assets/7fbe1e6b1c5663e3a84e.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/assets/7fbe1e6b1c5663e3a84e.js b/api/assets/7fbe1e6b1c5663e3a84e.js
new file mode 100644
index 00000000..5fabb4e6
--- /dev/null
+++ b/api/assets/7fbe1e6b1c5663e3a84e.js
@@ -0,0 +1,2 @@
+(this.webpackJsonp=this.webpackJsonp||[]).push([[30,5,7,8,16,22,26,81],Array(475).concat([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthBoxFooter=x,t.default=t.IncompatibleBrowser=t.ActivityCount=t.AuthSpinner=t.SubText=t.Block=t.Input=t.ChannelIcon=t.GuildIcon=t.Avatar=t.Button=t.Image=t.SubTitle=t.Title=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=n(5937),l=I(n(29)),u=I(n(55)),s=I(n(371)),d=I(n(153)),f=I(n(476)),c=I(n(474)),p=I(n(5974)),v=I(n(279)),y=I(n(47)),m=I(n(24)),_=n(368),h=I(n(93)),E=n(259),g=n(1),S=I(n(6)),O=I(n(6051));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M=v.default;null==M&&(M=function(){return null});var N=function(e){var t=e.className,n=e.id,r=e.children;return b(y.default,{size:m.default.Sizes.SIZE_24,color:m.default.Colors.HEADER_PRIMARY,className:(0,o.default)(O.default.title,t),id:n},void 0,r)};t.Title=N,N.displayName="Title";var A=function(e){var t=e.className,n=e.children;return b(m.default,{size:m.default.Sizes.SIZE_16,color:m.default.Colors.HEADER_SECONDARY,className:t},void 0,n)};t.SubTitle=A,A.displayName="SubTitle";var P=function(e){var t=e.className;return b("img",{alt:"",src:e.src,className:(0,o.default)(O.default.image,t)})};t.Image=P,P.displayName="Image";var R=function(e){var t,n=e.className,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className"]),i=r.look===l.default.Looks.LINK;return a.createElement(l.default,C({size:i?l.default.Sizes.MIN:l.default.Sizes.LARGE,fullWidth:!i,className:(0,o.default)(n,(t={},t[O.default.button]=!i,t[O.default.linkButton]=i,t))},r))};t.Button=R,R.displayName="Button",R.Looks=l.default.Looks,R.Colors=l.default.Colors,R.Sizes=l.default.Sizes;var L=function(e){var t=e.className,n=e.src,r=e.size;return b(M,{src:n,size:r,className:(0,o.default)(O.default.inviteLargeIcon,t),"aria-hidden":!0})};t.Avatar=L,L.displayName="Avatar",L.Sizes=M.Sizes;var D=function(e){var t=e.guild,n=e.size,r=e.animate,a=void 0!==r&&r;return b(s.default,{active:!0,guild:t,size:n,animate:a})};t.GuildIcon=D,D.displayName="GuildIcon",D.Sizes=s.default.Sizes;var w=function(e){var t=e.className,n=e.channel,r=e.size;return b(M,{src:(0,i.getChannelIconURL)(n),size:r,className:(0,o.default)(O.default.inviteIcon,t),"aria-hidden":!0})};t.ChannelIcon=w,w.displayName="ChannelIcon",w.Sizes=M.Sizes;var j=function(e){var t,n=e.label,r=e.error,a=e.placeholder,i=e.value,l=e.className,u=e.inputClassName,s=e.setRef,p=e.type,v=void 0===p?"text":p,y=e.onChange,m=e.autoComplete,_=e.autoFocus,h=e.maxLength,E=e.spellCheck,g=e.name,S=e.description,I=e.required;return b(f.default,{title:n,error:r,className:l,required:I},void 0,b(d.default,{name:g,type:v,value:i,inputRef:s,placeholder:a,className:O.default.input,inputClassName:(0,o.default)(u,(t={},t[O.default.inputError]=null!=r,t)),"aria-label":n,onChange:y,autoComplete:m,autoFocus:_,maxLength:h,spellCheck:E}),null!=S?b(c.default,{type:c.default.Types.DESCRIPTION,className:O.default.description},void 0,S):null)};t.Input=j,j.displayName="Input";var k=function(e){var t=e.className,n=e.children;return b("div",{className:(0,o.default)(O.default.block,t)},void 0,n)};t.Block=k,k.displayName="Block";var U=function(e){var t=e.className,n=e.children;return b(m.default,{size:m.default.Sizes.SIZE_12,className:(0,o.default)(O.default.subText,t)},void 0,n)};t.SubText=U,U.displayName="SubText";var G=function(e){var t=e.className;return b(u.default,{direction:u.default.Direction.VERTICAL,align:u.default.Align.CENTER,className:t},void 0,b(p.default,{className:O.default.spinnerVideo}))};t.AuthSpinner=G,G.displayName="AuthSpinner";var F=function(e){var t,n=e.online,r=e.total,a=e.className,i=e.flat;return null==r?null:(null!=n&&n>0&&(t=b("div",{className:(0,o.default)(O.default.pill,O.default.pillOnline,i&&O.default.pillFlat)},void 0,b("i",{className:O.default.pillIconOnline}),b(m.default,{tag:"span",size:m.default.Sizes.SIZE_16,className:O.default.pillMessage},void 0,S.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:n})))),b(u.default,{justify:u.default.Justify.CENTER,className:a},void 0,t,b("div",{className:(0,o.default)(O.default.pill,i&&O.default.pillFlat)},void 0,b("i",{className:O.default.pillIconTotal}),b(m.default,{tag:"span",size:m.default.Sizes.SIZE_16,className:O.default.pillMessage},void 0,S.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:r})))))};t.ActivityCount=F,F.displayName="ActivityCount";var B=function(e){var t=e.className;return b(k,{className:t},void 0,b(R,{onClick:function(){return window.open((0,_.getCurrentPlatformDownloadURL)())}},void 0,S.default.Messages.NUF_DOWNLOAD_APP_BUTTON_PLATFORM.format({platform:(0,_.getPlatformReadableName)()})),b(U,{className:O.default.downloadButtonSubtext},void 0,S.default.Messages.INCOMPATIBLE_BROWSER.format({supportedBrowserURL:h.default.getArticleURL(g.HelpdeskArticles.SUPPORTED_BROWSERS)})))};t.IncompatibleBrowser=B,B.displayName="IncompatibleBrowser";var H=function(e){var t=e.className,n=e.contentClassName,r=e.tag,a=void 0===r?"section":r,i=e.onSubmit,l=e.children,u=e.expanded,s=void 0!==u&&u,d=e.theme,f=void 0===d?g.ThemeTypes.DARK:d,c=e.mobileBanner;return null!=c?b(a,{onSubmit:i,className:(0,o.default)(O.default.authBoxWithMobileBanner,(0,E.getThemeClass)(f),t)},void 0,b("div",{className:O.default.mobileBannerLogo}),b("div",{className:O.default.mobileBanner},void 0,b("img",{src:c,alt:""})),l):b(a,{onSubmit:i,className:(0,o.default)(s?O.default.authBoxExpanded:O.default.authBox,(0,E.getThemeClass)(f),t)},void 0,b("div",{className:(0,o.default)(O.default.centeringWrapper,n)},void 0,l))};function x(e){var t,n,r,a;return b(u.default,{grow:0,shrink:0,direction:null!==(t=e.direction)&&void 0!==t?t:u.default.Direction.HORIZONTAL_REVERSE,justify:null!==(n=e.justify)&&void 0!==n?n:u.default.Justify.START,align:null!==(r=e.align)&&void 0!==r?r:u.default.Align.STRETCH,wrap:null!==(a=e.wrap)&&void 0!==a?a:u.default.Wrap.NO_WRAP,className:(0,o.default)(O.default.footer,e.className)},void 0,e.children)}H.displayName="AuthBox",x.displayName="AuthBoxFooter";var V=H;t.default=V},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLabelForStep=function(e){switch(e){case a.PLAN_SELECT:return i.default.Messages.BILLING_STEP_SELECT_PLAN;case a.PAYMENT_TYPE:return i.default.Messages.BILLING_STEP_PAYMENT;case a.REVIEW:return i.default.Messages.BILLING_STEP_REVIEW;case a.SHOP:return i.default.Messages.BILLING_STEP_SHOP}throw new Error("Unexpected step: "+e)},t.errorToStep=function(e){if(null!=e){if(e.hasCardError())return a.CREDIT_CARD_INFORMATION;if(e.hasAddressError())return a.ADDRESS}return null},t.setPurchaseStateForStep=function(e,t,n){e!==a.REVIEW&&t!==o.PurchaseState.WAITING&&t!==o.PurchaseState.COMPLETED&&n(o.PurchaseState.WAITING)},t.COLLAPSED_PAYMENT_BREADCRUMB_STEPS=t.Step=void 0;var r,a,o=n(1173),i=(r=n(6))&&r.__esModule?r:{default:r};t.Step=a,function(e){e.PAYMENT_TYPE="payment_type",e.CREDIT_CARD_INFORMATION="credit_card_information",e.PAYPAL_INFORMATION="paypal_information",e.PAYMENT_REQUEST_INFORMATION="payment_request_information",e.ADDRESS="address",e.AWAITING_AUTHENTICATION="awaiting_authentication",e.SKU_SELECT="sku_select",e.PLAN_SELECT="plan_select",e.PREMIUM_UPSELL="premium_upsell",e.REVIEW="review",e.CONFIRM="confirm",e.CLAIM_FREE_SKU="claim_free_sku",e.SKU_PREVIEW="sku_preview",e.LOADING_PAYMENT_SOURCES="loading_payment_sources",e.SHOP="shop",e.PROMOTION_INFO="promotion_info"}(a||(t.Step=a={}));var l=new Set([a.CREDIT_CARD_INFORMATION,a.PAYMENT_REQUEST_INFORMATION,a.PAYPAL_INFORMATION,a.ADDRESS,a.CLAIM_FREE_SKU,a.SKU_PREVIEW,a.PREMIUM_UPSELL]);t.COLLAPSED_PAYMENT_BREADCRUMB_STEPS=l},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.IconTypes=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(9)),i=l(n(6077));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=Object.freeze({UNKNOWN:"unknown",VISA:"visa",DISCOVER:"discover",MASTERCARD:"mastercard",AMEX:"amex",PAYPAL:"paypal",PAYMENT_REQUEST:"paymentRequest",G_PAY:"gPay",DINERS:"diners",JCB:"jcb",UNIONPAY:"unionpay"});t.IconTypes=f;var c={SMALL:i.default.cardIconSmall,MEDIUM:i.default.cardIconMedium,LARGE:i.default.cardIconLarge,XLARGE:i.default.cardIconXLarge},p=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),r.getType=function(e){if(null==e)return f.UNKNOWN;var t=e.replace(/[^a-z]/gi,"").toUpperCase();return f[t]||f.UNKNOWN},r.prototype.render=function(){var e,t=this.props,n=t.flipped,r=t.type,a=t.className,l=t.size;return s("div",{className:(0,o.default)(l,i.default[r],a,(e={},e[i.default.flipped]=n,e))},void 0,r)},r}(a.PureComponent);p.displayName="PaymentSourceIcon",p.Types=f,p.Sizes=c,p.defaultProps={size:c.SMALL,flipped:!1};var v=p;t.default=v},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=n(5858),i=u(n(96)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){return(d=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}).apply(this,arguments)}var f=null;function c(e,t){if(null==f)return null;for(var n in f)if(f[n].type===e&&(null==t||t(f[n])))return f[n];return null}var p=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.hasFetchedSubscriptions=function(){return null!=f},a.getPremiumSubscription=function(){return c(l.SubscriptionTypes.PREMIUM,(function(e){return!i.default.isNoneSubscription(e.planId)}))},a.getPremiumTypeSubscription=function(){return c(l.SubscriptionTypes.PREMIUM)},a.getSubscriptionForPlanIds=function(e){var t;if(null==f)return null;var n=new Set(e);return null!==(t=Object.values(f).find((function(e){return e.items.some((function(e){return n.has(e.planId)}))})))&&void 0!==t?t:null},r}(r.default.Store))(a.default,{BILLING_SUBSCRIPTION_FETCH_SUCCESS:function(e){var t=e.subscriptions,n={};t.forEach((function(e){n[e.id]=o.SubscriptionRecord.createFromServer(e)})),f=n},BILLING_SUBSCRIPTION_UPDATE_SUCCESS:function(e){var t,n=e.subscription;f=d({},f,((t={})[n.id]=o.SubscriptionRecord.createFromServer(n),t))},LOGOUT:function(e){f=null}});t.default=p},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Colors=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(61)),l=d(n(255)),u=d(n(5827)),s=d(n(6080));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p={RED:s.default.backgroundRed,BACKGROUND_TERTIARY:s.default.backgroundTertiary,BACKGROUND_ACCENT:s.default.backgroundAccent};t.Colors=p;var v=a.forwardRef((function(e,t){var n=e.children,r=e.className,d=e.onDismiss,f=e.backgroundColor,v=void 0===f?p.RED:f,y=e.icon,m=void 0===y?u.default:y,_=e.iconClassName;return a.createElement("div",{className:(0,o.default)(s.default.error,r,v),ref:t},c(m,{className:(0,o.default)(s.default.icon,_)}),c("div",{className:s.default.text},void 0,n),null!=d?c(i.default,{onClick:d,className:s.default.errorClose},void 0,c(l.default,{className:s.default.errorCloseIcon})):null)}));t.default=v},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coalesceInvoiceItems=function(e){var t=function(e,t){return e.subscriptionPlanId===t.subscriptionPlanId&&(e.subscriptionPlanPrice===t.subscriptionPlanPrice&&(e.amount===t.amount&&o.default.isEqual(e.discounts,t.discounts)))},n=[],r=new Set;return e.map((function(e){for(var a,o=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(n);!(a=o()).done;){var i=a.value;if(t(i,e))return r.add(i.subscriptionPlanId),void(i.quantity+=e.quantity)}n.push(v({},e))})),n.map((function(e){var t=v({},e);return r.has(e.subscriptionPlanId)&&(t.amount=t.amount*t.quantity,t.discounts=t.discounts.map((function(e){return v({},e,{amount:e.amount*t.quantity})}))),t}))},t.createSubscriptionInvoicePreview=h,t.updateSubscriptionInvoicePreview=g,t.useSubscriptionInvoicePreview=function(e){if("subscriptionId"in e&&null==e.subscriptionId){var t=e,n=(t.subscriptionId,f(t,["subscriptionId"]));e=n}var r=(0,a.useCallback)((function(){return"subscriptionId"in e?g(e):"items"in e?h(e):null}),[JSON.stringify(e)]);return function(e,t){var n=e.preventFetch,r=void 0!==n&&n,o=(0,a.useState)(null),i=o[0],u=o[1],s=(0,a.useState)(null),d=s[0],f=s[1];return(0,a.useEffect)((function(){var e=!1;function n(){return(n=p(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t();case 3:r=n.sent,e||u(r),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),e||f(new l.BillingError(n.t0));case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))).apply(this,arguments)}return r||function(){n.apply(this,arguments)}(),function(){e=!0}}),[r,t]),[i,d]}(e,r)},t.getItemUnitPriceWithDiscount=function(e){var t=e.subscriptionPlanPrice;return e.discounts.forEach((function(n){var r=n.amount/e.quantity;t-=r})),t},t.InvoiceDiscountTypes=void 0;var r,a=n(0),o=d(n(8)),i=d(n(14)),l=n(275),u=n(96),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}function v(){return(v=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}).apply(this,arguments)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){return{id:e.id,subscriptionPlanId:e.subscription_plan_id,subscriptionPlanPrice:e.subscription_plan_price,amount:e.amount,quantity:e.quantity,discounts:e.discounts}}function _(e){return{id:e.id,invoiceItems:e.invoice_items.map(m),total:e.total,subtotal:e.subtotal,currency:e.currency,tax:e.tax,taxInclusive:e.tax_inclusive,subscriptionPeriodStart:new Date(e.subscription_period_start),subscriptionPeriodEnd:new Date(e.subscription_period_end)}}function h(e){return E.apply(this,arguments)}function E(){return(E=p(regeneratorRuntime.mark((function e(t){var n,r,a,o,l,d,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.items,r=t.paymentSourceId,a=t.trialId,o=t.applyEntitlements,l=void 0!==o&&o,n=(0,u.coerceExistingItemsToNewItemInterval)(n),d={items:n.map((function(e){var t=e.planId;return v({},f(e,["planId"]),{plan_id:t})})),payment_source_id:r,trial_id:a,apply_entitlements:l},e.next=5,i.default.post({url:s.Endpoints.BILLING_SUBSCRIPTIONS_PREVIEW,body:d,oldFormErrors:!0});case 5:return c=e.sent,e.abrupt("return",_(c.body));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return S.apply(this,arguments)}function S(){return(S=p(regeneratorRuntime.mark((function e(t){var n,r,a,o,l,d,c,p,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.subscriptionId,a=t.items,o=t.paymentSourceId,l=t.renewal,d=t.applyEntitlements,c=void 0!==d&&d,null!=a&&(a=(0,u.coerceExistingItemsToNewItemInterval)(a)),p={items:null===(n=a)||void 0===n?void 0:n.map((function(e){var t=e.planId;return v({},f(e,["planId"]),{plan_id:t})})),payment_source_id:o,renewal:l,apply_entitlements:c},e.next=5,i.default.patch({url:s.Endpoints.BILLING_SUBSCRIPTION_PREVIEW(r),body:p,oldFormErrors:!0});case 5:return y=e.sent,e.abrupt("return",_(y.body));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.InvoiceDiscountTypes=r,function(e){e[e.SUBSCRIPTION_PLAN=1]="SUBSCRIPTION_PLAN",e[e.ENTITLEMENT=2]="ENTITLEMENT",e[e.PREMIUM_LEGACY_UPGRADE_PROMOTION=3]="PREMIUM_LEGACY_UPGRADE_PROMOTION",e[e.PREMIUM_TRIAL=4]="PREMIUM_TRIAL"}(r||(t.InvoiceDiscountTypes=r={}))},,,,function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PurchaseState=void 0,t.PurchaseState=r,function(e){e.WAITING="WAITING",e.PURCHASING="PURCHASING",e.FAIL="FAIL",e.COMPLETED="COMPLETED"}(r||(t.PurchaseState=r={}))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(8785)),a=o(n(8));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u={highlight:function(e,t,n){if(!function(e){if(e.indexOf(s)>=0)return!1;for(var t,n=0,r=i(e.split("\n"));!(t=r()).done;){var a=t.value;if(a.length>1e3)return!1;!a.match(/^\s*[/][/]/)&&a.match(/[^/]/)&&(n=0);var o=a.match(/[/]/g);if(null!=o&&(n+=o.length)>30)return!1}return!0}(t))return null;var a=Date.now(),o=r.default.highlight(e,t,n);Date.now();return o},hasLanguage:function(e){return null!=r.default.getLanguage(e)}};t.default=u;var s=a.default.repeat("/",15)},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumInvoiceTable=p,t.PremiumInvoiceTableHeader=v,t.PremiumInvoiceTableRow=y,t.PremiumInvoiceDiscountedTableRow=function(e){var t=e.label,n=e.value,r=e.discounts,o=e.originalAmount,d=e.interval,f=e.currency,p=e.className,v=function(e){return null!=r?r.find((function(t){return t.type===e})):null},m=v(l.InvoiceDiscountTypes.SUBSCRIPTION_PLAN),_=v(l.InvoiceDiscountTypes.ENTITLEMENT),h=null!=m?Math.floor(m.amount/o*100):null,E=(0,i.formatPrice)(o,f);return a.createElement(a.Fragment,null,c(y,{label:t,value:a.createElement(a.Fragment,null,n,null!=h?c("div",{className:s.default.rowPercentDiscount},void 0,"-",h,"%"):null),className:p}),null!=h?c("div",{className:s.default.rowDiscountOriginalPrice},void 0,"(",null!=d?(0,i.formatRate)(E,d):E,")"):null,null!=_?c("div",{className:s.default.entitlementDiscountRow},void 0,u.default.Messages.BILLING_INVOICE_SUBSCRIPTION_CREDIT_APPLIED):null)},t.PremiumInvoiceTableDivider=m,t.PremiumInvoiceTableTotalRow=_,t.PremiumInvoiceTableFinePrint=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(281),l=n(1169),u=d(n(6)),s=d(n(6081));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.children,n=e.className;return c("div",{className:(0,o.default)(s.default.table,n)},void 0,t)}function v(e){var t=e.children;return c("div",{className:s.default.header},void 0,t)}function y(e){var t=e.label,n=e.value,r=e.className;return c("div",{className:(0,o.default)(s.default.row,r)},void 0,c("div",{},void 0,t),c("div",{className:s.default.rowAmount},void 0,n))}function m(e){var t,n=e.extended,r=void 0!==n&&n;return c("div",{className:(0,o.default)(s.default.divider,(t={},t[s.default.dividerExtended]=r,t))})}function _(e){var t=e.label,n=e.value,r=e.className;return c("div",{className:(0,o.default)(s.default.totalRow,r)},void 0,c("div",{className:s.default.totalLabel},void 0,t),c("div",{className:s.default.totalAmount},void 0,n))}function h(e){var t=e.children,n=e.className;return c("div",{className:(0,o.default)(s.default.finePrint,n)},void 0,t)}p.displayName="PremiumInvoiceTable",v.displayName="PremiumInvoiceTableHeader",y.displayName="PremiumInvoiceTableRow",m.displayName="PremiumInvoiceTableDivider",_.displayName="PremiumInvoiceTableTotalRow",h.displayName="PremiumInvoiceTableFinePrint"},,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPaymentStepForAuthentication=function(e,t,n,r){void 0===r&&(r=!1);t===a.PENDING&&e!==d.Step.AWAITING_AUTHENTICATION?n(d.Step.AWAITING_AUTHENTICATION):e===d.Step.AWAITING_AUTHENTICATION&&(t===a.ERROR?n(d.Step.REVIEW):t===a.NONE&&n(r?d.Step.REVIEW:d.Step.CONFIRM))},t.usePaymentAuthenticationPoller=function(e){var t=(0,i.useStateFromStores)([s.default],(function(){return s.default.awaitingPaymentId})),n=o.useRef(new l.Interval);o.useEffect((function(){null!=t&&e===a.PENDING?n.current.start(5e3,(function(){return(0,u.fetchPayment)(t)})):n.current.stop()}),[t,e])},t.PaymentAuthenticationState=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(3),l=n(57),u=n(287),s=(r=n(5836))&&r.__esModule?r:{default:r},d=n(692);function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}t.PaymentAuthenticationState=a,function(e){e[e.PENDING=1]="PENDING",e[e.ERROR=2]="ERROR",e[e.NONE=3]="NONE"}(a||(t.PaymentAuthenticationState=a={}))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchSKU=function(e,t){return m.apply(this,arguments)},t.fetchSKUsForApplication=function(e,t){return _.apply(this,arguments)},t.fetchPurchasePreview=function(e,t,n){return h.apply(this,arguments)},t.grantChannelBranchEntitlement=function(e,t,n){return E.apply(this,arguments)},t.purchaseSKU=function(e,t,n){return S.apply(this,arguments)},t.clearPurchaseError=function(){a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_CLEAR_ERROR})},t.showPurchaseConfirmationStep=function(){a.default.wait((function(){return a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_SHOW_CONFIRMATION_STEP})}))},t.updateSKUPaymentIsGift=function(e){a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_UPDATE_IS_GIFT,isGift:e})};var r=c(n(14)),a=c(n(2)),o=n(275),i=c(n(195)),l=c(n(373)),u=c(n(1167)),s=n(48),d=n(289),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))}}function m(){return(m=y(regeneratorRuntime.mark((function e(t,n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==l.default.get(n)){e.next=2;break}return e.abrupt("return");case 2:return a.default.dirtyDispatch({type:f.ActionTypes.SKU_FETCH_START,skuId:n}),e.prev=3,r=u.default.inTestModeForApplication(t),e.next=7,(0,d.httpGetWithCountryCodeQuery)(r?f.Endpoints.STORE_SKU(n):f.Endpoints.STORE_PUBLISHED_LISTINGS_SKU(n));case 7:o=e.sent,a.default.dispatch({type:f.ActionTypes.SKU_FETCH_SUCCESS,sku:r?o.body:o.body.sku}),e.next=15;break;case 11:throw e.prev=11,e.t0=e.catch(3),a.default.dispatch({type:f.ActionTypes.SKU_FETCH_FAIL,skuId:n}),new i.default("Failed to fetch SKU "+n);case 15:case"end":return e.stop()}}),e,null,[[3,11]])})))).apply(this,arguments)}function _(){return(_=y(regeneratorRuntime.mark((function e(t,n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===n&&(n=!0),u.default.inTestModeForApplication(t)||!n){e.next=3;break}throw new Error("this should only be used in test mode");case 3:return e.next=5,(0,d.httpGetWithCountryCodeQuery)(f.Endpoints.APPLICATION_SKUS(t));case 5:return r=e.sent,o=r.body,a.default.dispatch({type:f.ActionTypes.SKUS_FETCH_SUCCESS,skus:o,applicationId:t}),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=y(regeneratorRuntime.mark((function e(t,n,r){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={payment_source_id:r},u.default.inTestModeForApplication(t)&&(o.test_mode=!0),e.next=4,(0,d.httpGetWithCountryCodeQuery)({url:f.Endpoints.STORE_SKU_PURCHASE(n),query:o,oldFormErrors:!0});case 4:return i=e.sent,a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_PREVIEW_FETCH_SUCCESS,skuId:n,paymentSourceId:r,price:i.body}),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return(E=y(regeneratorRuntime.mark((function e(t,n,i){var l,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_START,applicationId:t,skuId:i}),e.prev=1,e.next=4,r.default.post({url:f.Endpoints.CHANNEL_ENTITLEMENT_GRANT(n),oldFormErrors:!0});case 4:return l=e.sent,a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_SUCCESS,skuId:i,entitlements:l.body,libraryApplications:[]}),e.abrupt("return",l.body);case 9:throw e.prev=9,e.t0=e.catch(1),u=new o.BillingError(e.t0),a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_FAIL,applicationId:t,skuId:i,error:u}),u;case 14:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}var g={isGift:!1};function S(){return(S=y(regeneratorRuntime.mark((function e(t,n,i){var l,d,c,v,y,m,_,h,E;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=p({},g,{},i),d=l.paymentSourceId,c=l.expectedAmount,v=l.analyticsLoadId,y=l.isGift,m=l.subscriptionPlanId,a.default.wait((function(){a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_START,applicationId:t,skuId:n})})),e.prev=2,_={gift:y,sku_subscription_plan_id:m},u.default.inTestModeForApplication(t)?_.test_mode=!0:(null!=d&&(_.payment_source_id=d),null!=c&&(_.expected_amount=c)),e.next=7,r.default.post({url:f.Endpoints.STORE_SKU_PURCHASE(n),body:_,context:{load_id:v},oldFormErrors:!0});case 7:return h=e.sent,a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_SUCCESS,skuId:n,libraryApplications:null!=h.body.library_applications?h.body.library_applications.filter(s.isNotNullish):[],entitlements:h.body.entitlements,giftCode:h.body.gift_code}),e.abrupt("return",h.body);case 12:throw e.prev=12,e.t0=e.catch(2),E=new o.BillingError(e.t0),a.default.dispatch({type:f.ActionTypes.SKU_PURCHASE_FAIL,applicationId:t,skuId:n,error:E}),E;case 17:case"end":return e.stop()}}),e,null,[[2,12]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=f(n(9)),l=f(n(273)),u=f(n(469)),s=n(123),d=f(n(6086));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e[e.ENTERING=0]="ENTERING",e[e.LEAVING=1]="LEAVING",e[e.APPEARING=2]="APPEARING",e[e.STATIC=3]="STATIC"}(a||(a={}));var _=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={animationProgress:new l.default.Value(0),targetHeight:0,baseHeight:0,animationState:null},t.direction=t.props.getDirection(),t._measureRef=o.createRef(),t}y(t,e);var n=t.prototype;return n.componentDidMount=function(){if(null!=this._measureRef.current){var e=this._measureRef.current.getBoundingClientRect().height;this.setState({targetHeight:e,baseHeight:this.props.getBaseHeight()})}},n.componentDidUpdate=function(e,t){t.targetHeight!==this.state.targetHeight&&this.props.setHeight(this.state.targetHeight)},n.componentWillAppear=function(e){this.setState({animationState:a.APPEARING}),e()},n.componentDidAppear=function(){var e=this.state,t=e.animationProgress,n=e.targetHeight;t.setValue(2),this.setState({animationState:a.STATIC,baseHeight:n})},n.componentWillEnter=function(e){var t=this.props.duration,n=this.state.animationProgress;this.setState({animationState:a.ENTERING}),this.props.setHeight(this.state.targetHeight),l.default.timing(n,{toValue:2,duration:t,delay:t/2}).start(e)},n.componentDidEnter=function(){this.setState({animationState:a.STATIC})},n.componentWillLeave=function(e){var t=this.state.animationProgress,n=this.props,r=n.duration,o=n.getDirection;this.direction=o(),this.setState({animationState:a.LEAVING}),l.default.timing(t,{toValue:0,duration:r}).start(e)},n.componentDidLeave=function(){this.setState({animationState:a.STATIC})},n.getAnimatedStyle=function(){var e=this.context.reducedMotion,t=this.props.fillParent,n=this.state,r=n.animationProgress,o=n.animationState,i=n.baseHeight,u=n.targetHeight,s=this.props.sideMargin||0,d=this.props.verticalMargin||0,f=o===a.LEAVING,c=o===a.ENTERING,p=(f?-1:1)*this.direction,y={overflow:c||f?"hidden":"visible",position:f?"absolute":void 0,top:f?d:void 0,left:f?s:void 0,right:f?s:void 0,bottom:f?d:void 0},m={transform:[{translateX:r.interpolate({inputRange:[0,2],outputRange:[150*p+"%","0%"],extrapolate:"clamp",easing:l.default.Easing.inOut(l.default.Easing.ease)})}]};return v({},y,{},e.enabled?null:m,{opacity:r.interpolate({inputRange:[0,2],outputRange:[0,1],extrapolate:"clamp",easing:l.default.Easing.inOut(l.default.Easing.ease)}),height:c?r.interpolate({inputRange:[0,1],outputRange:[i,u],extrapolate:"clamp",easing:l.default.Easing.inOut(l.default.Easing.ease)}):t?"100%":"auto"})},n.render=function(){var e,t=this.props,n=t.fillParent,r=t.className,u=t.animatedNodeClassName,s=t.staticClassName,f=this.state.animationState;return n?o.createElement("div",{ref:this._measureRef,className:(0,i.default)(d.default.measurementFill,r,(e={},e[(0,i.default)(d.default.measurementFillStatic,s)]=f===a.STATIC,e))},p(l.default.div,{className:(0,i.default)(d.default.animatedNode,u),style:this.getAnimatedStyle()},void 0,this.props.children)):o.createElement("div",{ref:this._measureRef,className:(0,i.default)(d.default.measurement,r)},p(l.default.div,{className:(0,i.default)(d.default.animatedNode,u),style:this.getAnimatedStyle()},void 0,this.props.children))},t}(o.PureComponent);_.displayName="SequenceAnimation",_.contextType=s.AccessibilityPreferencesContext,_.defaultProps={duration:300};var h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).stepHeights={},t.prevStep=null,t.prevSteps=[],t.getBaseHeight=function(){return null!=t.prevStep&&null!=t.stepHeights[t.prevStep]?t.stepHeights[t.prevStep]:0},t.getDirection=function(){var e=t.props,n=e.steps,r=e.step,a=n.indexOf(t.prevStep),o=-1===a?t.prevSteps.indexOf(t.prevStep):-1;return Math.max(a,o)>n.indexOf(r)?-1:1},t.setHeight=function(e){var n=t.props.step;t.stepHeights[n]=e},t}y(t,e);var n=t.prototype;return n.componentDidMount=function(){this.setPrevSteps()},n.componentDidUpdate=function(){this.setPrevSteps()},n.setPrevSteps=function(){var e=this.props,t=e.step,n=e.steps;this.prevStep=t,this.prevSteps=n},n.render=function(){var e=this.props,t=e.step,n=e.className,r=e.innerClassName,a=e.animatedNodeClassName,o=e.staticClassName,l=e.sideMargin,s=e.verticalMargin,f=e.children,c=e.fillParent;return p(u.default,{component:"div",className:(0,i.default)(d.default.transitionGroup,n)},void 0,p(_,{fillParent:c,sideMargin:l,verticalMargin:s,getDirection:this.getDirection,getBaseHeight:this.getBaseHeight,className:r,animatedNodeClassName:a,staticClassName:o,setHeight:this.setHeight},""+t,f))},t}(o.Component);t.default=h,h.displayName="Sequencer",h.defaultProps={fillParent:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;v(n(0));var r,a=c(n(9)),o=v(n(383)),i=c(n(55)),l=c(n(700)),u=n(374),s=n(1),d=c(n(6)),f=c(n(6078));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=new o.CreditCardSourceRecord({id:"new_payment_source_id",brand:l.default.Types.UNKNOWN,type:s.PaymentSourceTypes.CARD});function _(e){var t=e.selectedPaymentSourceId,n=e.paymentSources,r=e.prependOption,s=e.hidePersonalInformation,c=e.onChange,p=e.onPaymentSourceAdd,v=e.disabled,_=void 0!==v&&v,h=e.className,E=[].concat(null!=r?[r]:[],n,[m]).map((function(e,t){if(e instanceof o.default){var n,r=function(e,t){if(e instanceof o.CreditCardSourceRecord)return e.id===m.id?{brand:null,label:d.default.Messages.PAYMENT_SOURCES_ADD}:{brand:t?l.default.Types.UNKNOWN:e.brand,label:d.default.Messages.PAYMENT_SOURCE_CARD_ENDING_IN.format({last4:t?"****":e.last4})};if(e instanceof o.PaypalSourceRecord)return{brand:l.default.Types.PAYPAL,label:t?"***@***.***":e.email};throw new Error("Invalid Payment Source")}(e,s),u=r.brand,c=r.label;return{value:e.id,label:y(i.default,{align:i.default.Align.CENTER},void 0,null!=u?y(l.default,{type:l.default.getType(u)}):null,y("div",{className:(0,a.default)(f.default.paymentSourceLabel,(n={},n[f.default.error]=e.invalid,n))},void 0,c))}}return{key:t,value:e.value,label:y(i.default,{align:i.default.Align.CENTER},void 0,y("div",{className:f.default.paymentSourceLabel},void 0,e.label))}}));return y(u.SingleSelect,{options:E,value:t,onChange:function(e){if(e===m.id)null!=p&&p();else{var t=n.find((function(t){return t.id===e}));null!=c&&c(t)}},isDisabled:_,className:h,placeholder:d.default.Messages.PAYMENT_SOURCE_TYPE_SELECT,renderOptionValue:function(e){return e[0].label}})}_.displayName="PaymentSourceDropdown"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.useState)(e),i=n[0],l=n[1],u=(0,a.useLazyValue)((function(){return new o.Timeout}));(0,r.useEffect)((function(){return function(){return u.stop()}}),[u]);var s=(0,r.useCallback)((function(n){l(n),n!==e&&u.start(t,(function(){return l(e)}))}),[t,e,u]);return[i,s]};var r=n(0),a=n(276),o=n(57)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumInvoiceItemRow=b,t.PremiumInvoiceLabelWithAdjustment=M,t.PremiumSubscriptionChangePlanInvoiceRows=function(e){var t=e.invoice,n=e.newPlan,r=(0,m.coalesceInvoiceItems)(t.invoiceItems),o=r.find((function(e){return e.subscriptionPlanId===n.id}));(0,i.default)(null!=o,"Expected newPlanInvoiceItem");var l=r.find((function(e){return!(0,v.isPremiumGuildSubscriptionPlan)(e.subscriptionPlanId)&&e.amount<0})),u=r.find((function(e){return null==e.subscriptionPlanId&&null!=e.discounts&&e.discounts.find((function(e){return e.type===m.InvoiceDiscountTypes.PREMIUM_LEGACY_UPGRADE_PROMOTION}))})),s=C(o,m.InvoiceDiscountTypes.PREMIUM_TRIAL),d=o.quantity*o.subscriptionPlanPrice,f=o.amount+(null!=l?l.amount:0)-d+(null!=u?u.amount:0),c=r.filter((function(e){return e.subscriptionPlanId===h.SubscriptionPlans.PREMIUM_MONTH_GUILD||e.subscriptionPlanId===h.SubscriptionPlans.PREMIUM_YEAR_GUILD})).reduce((function(e,t){return e+t.amount}),0);return a.createElement(a.Fragment,null,T(b,{invoiceItem:o,currency:n.currency,overrideAmount:d}),0===f||s?null:T(_.PremiumInvoiceTableRow,{label:T(M,{label:E.default.Messages.PREMIUM_SUBSCRIPTION_PLAN_ADJUSTMENT.format({planName:(0,v.isPremiumSubscriptionPlan)(n.id)?(0,v.getTierDisplayName)(n.id):n.name}),tooltipText:E.default.Messages.PREMIUM_SUBSCRIPTION_ADJUSTMENT_TOOLTIP}),value:(0,y.formatPrice)(f,n.currency)}),0!==c?T(_.PremiumInvoiceTableRow,{label:T(M,{label:E.default.Messages.PREMIUM_SUBSCRIPTION_GUILD_SUBSCRIPTION_ADJUSTMENT,tooltipText:E.default.Messages.PREMIUM_SUBSCRIPTION_GUILD_SUBSCRIPTION_ADJUSTMENT_TOOLTIP.format(),tooltipAriaLabel:E.default.Messages.PREMIUM_SUBSCRIPTION_GUILD_SUBSCRIPTION_ADJUSTMENT_TEXT}),value:(0,y.formatPrice)(c,n.currency)}):null,N,T(_.PremiumInvoiceTableTotalRow,{label:(t.taxInclusive?E.default.Messages.BILLING_INVOICE_TODAY_TOTAL_TAX_INCLUSIVE:E.default.Messages.BILLING_INVOICE_TODAY_TOTAL).format(),value:(0,y.formatPrice)(t.total,t.currency)}))},t.SubscriptionPeriodResetNotice=R,t.SubscriptionInvoiceFooter=function(e){var t=e.premiumSubscription,n=e.proratedInvoice,r=e.renewalInvoice,o=e.overrideRenewalDate,i=e.isUpdate,l=void 0!==i&&i,u=e.isTrial,d=void 0!==u&&u,c=(0,m.useSubscriptionInvoicePreview)({subscriptionId:null==t?void 0:t.id,renewal:!0,preventFetch:!l})[0],S=(0,v.getIntervalForInvoice)(r),O=a.useState(!1),I=O[0],C=O[1];return a.createElement(a.Fragment,null,T(_.PremiumInvoiceTableFinePrint,{},void 0,d?E.default.Messages.PREMIUM_SUBSCRIPTION_RENEWAL_FOOTER_TRIAL.format({days:7,contactLink:h.MarketingURLs.CONTACT,helpdeskArticle:p.default.getArticleURL(h.HelpdeskArticles.PREMIUM_TRIAL)}):E.default.Messages.PREMIUM_SUBSCRIPTION_RENEWAL_FOOTER.format({rate:(0,y.formatRate)((0,y.formatPrice)(r.total,r.currency),S),renewalDate:null!=o?o:l?null!=n?n.subscriptionPeriodEnd:r.subscriptionPeriodStart:r.subscriptionPeriodEnd,contactLink:h.MarketingURLs.CONTACT,helpdeskArticle:p.default.getArticleURL(h.HelpdeskArticles.BILLING)})),T(s.default,{onClick:function(){return C((function(e){return!e}))},className:g.default.subscriptionDetailsToggle},void 0,I?E.default.Messages.PREMIUM_SUBSCRIPTION_HIDE_DETAILS:E.default.Messages.PREMIUM_SUBSCRIPTION_SHOW_DETAILS,T(f.default,{direction:I?f.default.Directions.UP:f.default.Directions.DOWN,className:g.default.subscriptionDetailsToggleCaret})),I?T(j,{isUpdate:l,currentInvoice:c,newInvoice:r,newInvoiceInterval:S}):null)},t.SubscriptionInvoiceGift=k;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(9)),i=S(n(23)),l=n(3),u=S(n(257)),s=S(n(61)),d=S(n(149)),f=S(n(683)),c=S(n(5999)),p=S(n(93)),v=n(96),y=n(281),m=n(1169),_=n(1237),h=n(1),E=S(n(6)),g=S(n(6095));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=function(e,t){var n;return!!(null===(n=e.discounts)||void 0===n?void 0:n.some((function(e){return e.type===t})))};function b(e){var t=e.invoiceItem,n=e.overrideAmount,r=e.showGuildSubscriptionAdjustmentTooltip,o=e.currency,i=e.className,s=(0,l.useStateFromStores)([u.default],(function(){return u.default.getHardcoded(t.subscriptionPlanId)})),f=function(e,t){var n=C(e,m.InvoiceDiscountTypes.PREMIUM_TRIAL);switch(e.subscriptionPlanId){case h.SubscriptionPlans.PREMIUM_MONTH_LEGACY:case h.SubscriptionPlans.PREMIUM_YEAR_LEGACY:case h.SubscriptionPlans.PREMIUM_MONTH_TIER_1:case h.SubscriptionPlans.PREMIUM_YEAR_TIER_1:case h.SubscriptionPlans.PREMIUM_MONTH_TIER_2:case h.SubscriptionPlans.PREMIUM_YEAR_TIER_2:return(0,v.getDisplayName)(e.subscriptionPlanId,n);case h.SubscriptionPlans.PREMIUM_MONTH_GUILD:return E.default.Messages.PREMIUM_GUILD_NUM_MONTH_GUILD_SUBSCRIPTIONS.format({num:e.quantity});case h.SubscriptionPlans.PREMIUM_YEAR_GUILD:return E.default.Messages.PREMIUM_GUILD_NUM_YEAR_GUILD_SUBSCRIPTIONS.format({num:e.quantity})}switch(t.interval){case h.SubscriptionIntervalTypes.MONTH:return E.default.Messages.MONTHLY_GUILD_SUBSCRIPTION.format({planName:t.name});case h.SubscriptionIntervalTypes.YEAR:return E.default.Messages.YEARLY_GUILD_SUBSCRIPTION.format({planName:t.name})}throw new Error("Unexpected invoice plan: "+e.subscriptionPlanId)}(t,s);!0===r&&(f=T("div",{className:g.default.invoiceItemLabelWithIcon},void 0,T("div",{},void 0,f),T(d.default,{text:E.default.Messages.PREMIUM_SUBSCRIPTION_GUILD_SUBSCRIPTION_ADJUSTMENT_TOOLTIP.format(),"aria-label":E.default.Messages.PREMIUM_SUBSCRIPTION_GUILD_SUBSCRIPTION_ADJUSTMENT_TEXT,tooltipClassName:g.default.invoiceItemTooltip},void 0,(function(e){return a.createElement(c.default,I({},e,{className:g.default.invoiceItemLabelIcon}))}))));var p=(0,y.formatRate)((0,y.formatPrice)(null!=n?n:t.amount,o),s.interval);return T(_.PremiumInvoiceDiscountedTableRow,{label:f,value:p,originalAmount:t.subscriptionPlanPrice*t.quantity,discounts:t.discounts,interval:s.interval,currency:o,className:i})}function M(e){var t=e.label,n=e.tooltipText,r=e.tooltipAriaLabel;return T("div",{className:g.default.invoiceItemLabelWithIcon},void 0,t,T(d.default,{text:n,"aria-label":r,tooltipClassName:g.default.invoiceItemTooltip},void 0,(function(e){return a.createElement(c.default,I({},e,{className:g.default.invoiceItemLabelIcon}))})))}b.displayName="PremiumInvoiceItemRow",M.displayName="PremiumInvoiceLabelWithAdjustment";var N=T(_.PremiumInvoiceTableDivider,{});function A(e){var t=e.slice();return t.sort((function(e,t){var n=(0,v.isPremiumBaseSubscriptionPlan)(e.subscriptionPlanId),r=(0,v.isPremiumBaseSubscriptionPlan)(t.subscriptionPlanId);return n&&!r?-1:!n&&r?1:0})),t}function P(e){return e.filter((function(e){var t=e.subscriptionPlanId;return t!==h.SubscriptionPlans.NONE_MONTH&&t!==h.SubscriptionPlans.NONE_YEAR}))}function R(e){var t=e.proratedInvoice,n=e.renewalInvoice;return(0,v.getIntervalForInvoice)(t)!==(0,v.getIntervalForInvoice)(n)||t.subscriptionPeriodEnd.getTime()===n.subscriptionPeriodStart.getTime()?null:T("div",{className:g.default.subscriptionPeriodResetNotice},void 0,E.default.Messages.PREMIUM_SUBSCRIPTION_PERIOD_RESET_NOTICE.format({renewalDate:t.subscriptionPeriodEnd}))}R.displayName="SubscriptionPeriodResetNotice";var L=T(_.PremiumInvoiceTableDivider,{extended:!0}),D=T(_.PremiumInvoiceTableDivider,{extended:!0}),w=T(_.PremiumInvoiceTableDivider,{});function j(e){var t=e.isUpdate,n=e.currentInvoice,r=e.newInvoice,i=e.newInvoiceInterval,l=null!=n?(0,m.coalesceInvoiceItems)(n.invoiceItems):null,u=null!=n&&(0,v.getIntervalForInvoice)(n)!==(0,v.getIntervalForInvoice)(r);return a.createElement(a.Fragment,null,L,null!=n?a.createElement(a.Fragment,null,T(_.PremiumInvoiceTableHeader,{},void 0,E.default.Messages.PREMIUM_SUBSCRIPTION_CURRENT_LABEL),P(A((0,m.coalesceInvoiceItems)(n.invoiceItems))).map((function(e){return T(b,{invoiceItem:e,currency:n.currency},e.id)})),D):null,T(_.PremiumInvoiceTableHeader,{},void 0,E.default.Messages.PREMIUM_SUBSCRIPTION_NEW_LABEL),P(A((0,m.coalesceInvoiceItems)(r.invoiceItems))).map((function(e){var n,a=null!=l&&!l.some((function(t){return t.subscriptionPlanId===e.subscriptionPlanId&&t.quantity===e.quantity}));return T(b,{invoiceItem:e,currency:r.currency,showGuildSubscriptionAdjustmentTooltip:u&&(e.subscriptionPlanId===h.SubscriptionPlans.PREMIUM_MONTH_GUILD||e.subscriptionPlanId===h.SubscriptionPlans.PREMIUM_YEAR_GUILD),className:(0,o.default)((n={},n[g.default.subscriptionAddedInvoiceItem]=!t||a,n))},e.id)})),w,T(_.PremiumInvoiceTableRow,{label:E.default.Messages.PREMIUM_SUBSCRIPTION_NEW_TOTAL,value:(0,y.formatRate)((0,y.formatPrice)(r.total,r.currency),i),className:g.default.subscriptionCostRow}))}function k(e){var t=e.plan,n=e.className;return T(_.PremiumInvoiceTable,{className:n},void 0,T(_.PremiumInvoiceTableRow,{label:E.default.Messages.BILLING_INVOICE_GIFT_PLAN.format({planName:(0,v.getDisplayName)(t.id)}),value:(0,y.formatPrice)(t.price,t.currency),className:g.default.subscriptionCostRow}))}k.displayName="SubscriptionInvoiceGift"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderPaymentModalStep=function(e,t,n,r,a,u,s,p,v,y,m,_,h,E,S,O,T,C,b,N,P){switch(e){case M.Step.PAYMENT_TYPE:return{body:w(V,{onChooseType:function(e){e===l.PaymentSourceTypes.CARD?(r(C),t(M.Step.CREDIT_CARD_INFORMATION)):e===l.PaymentSourceTypes.PAYPAL?(r(b),t(M.Step.PAYPAL_INFORMATION)):e===l.PaymentSourceTypes.PAYMENT_REQUEST&&(r(N),t(M.Step.PAYMENT_REQUEST_INFORMATION)),null!=g.default.error&&(0,c.clearError)()},onPaymentRequestSourceReceived:function(e,n){p(e),u((function(e){return D({},e,{info:n})})),r(N),t(T)},onPaymentRequestSourceFailed:function(){r(P),t(M.Step.PAYMENT_TYPE)}}),backStep:Object.values(s).length>0?M.Step.REVIEW:null};case M.Step.CREDIT_CARD_INFORMATION:var R=function(){var e=k(regeneratorRuntime.mark((function e(n,r){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!0),e.prev=1,e.next=4,(0,d.createCardToken)(n,r);case 4:a=e.sent,_({token:a}),t(M.Step.ADDRESS),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:return e.prev=11,E(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,9,11,14]])})));return function(t,n){return e.apply(this,arguments)}}();return{body:w(W,{creditCardInfo:v.info,onCardInfoChange:function(e,t){y({info:e,isValid:t}),u((function(t){return D({},t,{info:D({},t.info,{name:e.name})})}))}}),backStep:M.Step.PAYMENT_TYPE,submitButton:w(o.ElementsConsumer,{},void 0,(function(e){var t=e.stripe,n=e.elements;return w(I.default,{type:"submit",submitting:h,onClick:function(){R(t,n)},disabled:!v.isValid},void 0,A.default.Messages.NEXT)}))};case M.Step.PAYPAL_INFORMATION:var L=0!==S.length&&null!=O;return{body:q,backStep:M.Step.PAYMENT_TYPE,submitButton:w(I.default,{color:L?I.default.Colors.BRAND:I.default.Colors.PRIMARY,type:"submit",onClick:L?function(){return t(M.Step.ADDRESS)}:function(){return(0,f.reopenPayPalWindow)()}},void 0,L?A.default.Messages.NEXT:A.default.Messages.PAYMENT_SOURCE_PAYPAL_REOPEN)};case M.Step.PAYMENT_REQUEST_INFORMATION:return{body:X,backStep:M.Step.PAYMENT_TYPE};case M.Step.ADDRESS:var j=function(){var e=k(regeneratorRuntime.mark((function e(r){var o,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(E(!0),n!==C){e.next=14;break}return e.prev=2,e.next=5,(0,d.createCardPaymentSource)(D({},v.info,{billingAddress:a.info,type:l.PaymentSourceTypes.CARD,stripe:r,token:m.token}));case 5:o=e.sent,p(o.id),t(T),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(2);case 12:e.next=26;break;case 14:if(n!==b){e.next=26;break}return e.prev=15,(0,i.default)(null!=O,"Missing braintreeNonce"),e.next=19,(0,d.createPaypalPaymentSource)(O,a.info);case 19:u=e.sent,p(u.id),t(T),e.next=26;break;case 24:e.prev=24,e.t1=e.catch(15);case 26:E(!1);case 27:case"end":return e.stop()}}),e,null,[[2,10],[15,24]])})));return function(t){return e.apply(this,arguments)}}();return{body:w($,{billingAddressInfo:a.info,onBillingAddressChange:function(e,t){u({info:e,isValid:t})}}),backStep:n===b?M.Step.PAYPAL_INFORMATION:M.Step.CREDIT_CARD_INFORMATION,submitButton:w(o.ElementsConsumer,{},void 0,(function(e){var t=e.stripe;return w(I.default,{type:"submit",disabled:!a.isValid,submitting:h,onClick:function(){j(t)}},void 0,A.default.Messages.NEXT)}))};case M.Step.AWAITING_AUTHENTICATION:return{body:J}}throw new Error("Unexpected step: "+e)},t.useSharedPaymentModal=function(e){var t=(0,u.useStateFromStoresObject)([O.default],(function(){return{defaultPaymentSourceId:void 0!==e?e:O.default.defaultPaymentSourceId,paymentSources:O.default.paymentSources,hasFetchedPaymentSources:O.default.hasFetchedPaymentSources}})),n=t.defaultPaymentSourceId,r=t.paymentSources,o=t.hasFetchedPaymentSources;a.useEffect((function(){(0,f.createClient)(),o||(0,d.fetchPaymentSources)()}),[]);var i=a.useState(n),l=i[0],c=i[1];null!=n&&null==l&&c(n);var p=a.useState((function(){return{info:H,isValid:!1}})),v=p[0],y=p[1],m=a.useState((function(){return{token:null}})),_=m[0],h=m[1],E=a.useState((function(){return{info:x,isValid:!1}})),I=E[0],T=E[1],C=(0,u.useStateFromStoresArray)([g.default],(function(){return[g.default.braintreeEmail,g.default.braintreeNonce,g.default.error]})),M=C[0],A=C[1],P=C[2],R=(0,u.useStateFromStoresArray)([S.default],(function(){return[S.default.error,S.default.isAwaitingAuthentication]})),L=R[0],D=R[1];a.useEffect((function(){var e=function(e){var t=e.billingAddress;T({info:t,isValid:t.country.length>0})};return s.default.subscribe(N.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_SUCCESS,e),function(){s.default.unsubscribe(N.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_SUCCESS,e)}}),[]);var w=a.useState(!1),j=w[0],k=w[1],U=a.useState(null),G=U[0],F=U[1],B=a.useRef(null);return a.useEffect((function(){null!=G&&null!=B.current&&B.current.scrollIntoView({behavior:"smooth"})}),[G]),{paymentSources:r,paymentSourceId:l,hasFetchedPaymentSources:o,setPaymentSourceId:c,creditCardState:v,setCreditCardState:y,tokenState:_,setTokenState:h,billingAddressState:I,setBillingAddressState:T,isSubmittingCurrentStep:j,setIsSubmittingCurrentStep:k,braintreeEmail:M,braintreeNonce:A,paymentError:null!=L?L:P,paymentAuthenticationState:D?b.PaymentAuthenticationState.PENDING:null!=L?b.PaymentAuthenticationState.ERROR:b.PaymentAuthenticationState.NONE,purchaseError:G,setPurchaseError:F,purchaseErrorBlockRef:B}},t.SHARED_PAYMENT_REQUEST_STEPS=t.SHARED_PAYPAL_STEPS=t.SHARED_CREDIT_CARD_STEPS=t.SHARED_ADD_PAYMENT_STEPS=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(377),i=R(n(23)),l=n(92),u=n(3),s=R(n(2)),d=n(287),f=n(5692),c=n(5837),p=R(n(5842)),v=R(n(5843)),y=n(5996),m=n(6034),_=n(5997),h=n(5844),E=R(n(5833)),g=R(n(5693)),S=R(n(5836)),O=R(n(693)),I=R(n(29)),T=R(n(16)),C=n(295),b=n(1249),M=n(692),N=n(1),A=R(n(6)),P=R(n(6093));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(){return(D=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}).apply(this,arguments)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){j(o,r,a,i,l,"next",e)}function l(e){j(o,r,a,i,l,"throw",e)}i(void 0)}))}}var U=[M.Step.PAYMENT_TYPE];t.SHARED_ADD_PAYMENT_STEPS=U;var G=[M.Step.PAYMENT_TYPE,M.Step.CREDIT_CARD_INFORMATION,M.Step.ADDRESS];t.SHARED_CREDIT_CARD_STEPS=G;var F=[M.Step.PAYMENT_TYPE,M.Step.PAYPAL_INFORMATION,M.Step.ADDRESS];t.SHARED_PAYPAL_STEPS=F;var B=[M.Step.PAYMENT_TYPE,M.Step.PAYMENT_REQUEST_INFORMATION,M.Step.ADDRESS];t.SHARED_PAYMENT_REQUEST_STEPS=B;var H={name:"",cardNumber:"",expirationDate:"",cvc:""},x={name:"",country:"US",line1:"",line2:"",city:"",postalCode:"",state:""};function V(e){var t=e.onChooseType,n=e.onPaymentRequestSourceReceived,r=e.onPaymentRequestSourceFailed;return w("div",{className:P.default.body},void 0,w(p.default,{onChooseType:t,allowStripeRequestPayments:!T.default.embedded,onStripePaymentMethodReceived:function(){var e=k(regeneratorRuntime.mark((function e(t){var a,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,c.updateStripePaymentRequest)(t),null!=t){e.next=4;break}return r(),e.abrupt("return");case 4:return e.prev=4,e.next=7,(0,d.createPaymentRequestPaymentSource)(t);case 7:a=e.sent,o=(0,C.parseStripePaymentMethod)(t),i=o.billingAddressInfo,n(a.id,i),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(4);case 14:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t){return e.apply(this,arguments)}}()}))}function W(e){var t=e.onCardInfoChange,n=(0,u.useStateFromStores)([g.default],(function(){return g.default.error}));return w("div",{className:P.default.body},void 0,w(_.CreditCardInformationBody,{billingError:n,onCardInfoChange:t}))}V.displayName="PaymentTypeSelectBody",W.displayName="CreditCardStepBody";var Y=w(v.default,{});function z(){return w("div",{className:P.default.body},void 0,Y)}function K(){var e=(0,u.useStateFromStores)([E.default],(function(){return E.default.isBusy})),t=(0,u.useStateFromStores)([g.default],(function(){return g.default.stripePaymentMethod}));return w(h.PaymentRequestStepBody,{className:P.default.body,stripePaymentMethod:t,submitting:e})}function $(e){var t=e.billingAddressInfo,n=e.onBillingAddressChange,r=(0,u.useStateFromStores)([g.default],(function(){return g.default.error}));return w("div",{className:P.default.body},void 0,w(y.AddressStepBody,{billingAddressInfo:t,billingError:r,onBillingAddressChange:n}))}function Z(){return w(m.AwaitingAuthenticationStepBody,{className:P.default.body})}z.displayName="PaypalStepBody",K.displayName="PaymentRequestStepBodyConnected",$.displayName="AddressFormStepBody",Z.displayName="AwaitingAuthenticationStep";var q=w(z,{}),X=w(K,{}),J=w(Z,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(9)),o=i(n(6083));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var u=r.forwardRef((function(e,t){var n,i=e.isActive,l=e.children;return r.createElement("div",{className:(0,a.default)(o.default.wrapper,(n={},n[o.default.wrapperActive]=i,n)),ref:t},l)}));t.default=u},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M2.98966977,9.35789159 C2.98966977,9.77582472 2.63442946,10.1240466 2.20807287,10.1240466 L1.78171628,10.1240466 C1.35535969,10.1240466 0.999948837,9.77582472 0.999948837,9.35789159 C0.999948837,8.93995846 1.35535969,8.59173658 1.78171628,8.59173658 L2.20807287,8.59173658 C2.63442946,8.59173658 2.98966977,8.93995846 2.98966977,9.35789159 Z M22.2467643,9.14892503 C24.0942527,12.9800344 22.3888264,17.5772989 18.3384388,19.3882867 C14.4302837,21.1297305 9.74036124,19.457998 7.9638186,15.6268886 C7.60857829,14.8607335 7.3954,14.0248673 7.32428372,13.189001 L5.76091938,13.189001 C5.33456279,13.189001 4.97932248,12.840612 4.97932248,12.4226788 C4.97932248,12.0047457 5.33456279,11.6565238 5.76091938,11.6565238 L8.03493488,11.6565238 C8.46129147,11.6565238 8.81653178,11.3083019 8.81653178,10.8903688 C8.81653178,10.4724357 8.46129147,10.1240466 8.03493488,10.1240466 L4.41090388,10.1240466 C3.98454729,10.1240466 3.62913643,9.77582472 3.62913643,9.35789159 C3.62913643,8.93995846 3.98454729,8.59173658 4.41090388,8.59173658 L9.45606667,8.59173658 C9.88242326,8.59173658 10.2376636,8.24334752 10.2376636,7.82541439 C10.2376636,7.40748126 9.88242326,7.05925937 9.45606667,7.05925937 L7.3954,7.05925937 C6.75586512,7.05925937 6.18727597,6.57161499 6.18727597,5.87517123 C6.18727597,5.24827153 6.68474884,4.69091591 7.3954,4.69091591 L15.4250589,4.69091591 C18.267493,4.8303384 20.9676946,6.43235968 22.2467643,9.14892503 Z M13.2662961,8.38056332 C11.0193969,9.3919615 10.0341721,11.9973566 11.065955,14.1998642 C12.097738,16.4023718 14.755645,17.3681317 17.0025442,16.3567335 C19.249614,15.3453354 20.2346682,12.7399402 19.2028853,10.5374326 C18.1711023,8.33492503 15.5131953,7.36916515 13.2662961,8.38056332 Z M16.8462589,9.84548582 L18.2673907,12.2138293 C18.338507,12.3530846 18.338507,12.4227958 18.2673907,12.5620512 L16.8462589,14.9303946 C16.7751426,15.0696499 16.6330806,15.0696499 16.5619643,15.0696499 L13.7906465,15.0696499 C13.6485845,15.0696499 13.5774682,14.9999387 13.5065225,14.9303946 L12.0852202,12.5620512 C12.0142744,12.4227958 12.0142744,12.3530846 12.0852202,12.2138293 L13.5065225,9.84548582 C13.5774682,9.7062305 13.7197008,9.7062305 13.7906465,9.7062305 L16.5619643,9.7062305 C16.7041969,9.63651925 16.7751426,9.7062305 16.8462589,9.84548582 Z"}))}d.displayName="NitroWheel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackAppUIViewed=function(e){f.trackAppUIViewed(e)};var r=l(n(98)),a=l(n(118)),o=l(n(13)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(){return(d=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}).apply(this,arguments)}var f=new(function(){function e(){this.loadId=r.default.v4(),this.appUIViewed=!1}var t=e.prototype;return t.trackEvent=function(e,t){var n=this,r=Date.now();requestIdleCallback((function(){o.default.track(e,d({},function(){for(var e,t,n,r,o=u(null!==(e=null===a.default||void 0===a.default||null===(t=a.default.processUtils)||void 0===t||null===(n=t.getMainArgvSync)||void 0===n?void 0:n.call(t))&&void 0!==e?e:[]);!(r=o()).done;){var i=r.value;if(i.startsWith("--campaign-id="))return{referrer:i.substr("--campaign-id=".length)}}return{}}(),{},function(){var e=!1,t={total_compressed_byte_size:0,total_uncompressed_byte_size:0,total_transfer_byte_size:0,js_compressed_byte_size:0,js_uncompressed_byte_size:0,js_transfer_byte_size:0,css_compressed_byte_size:0,css_uncompressed_byte_size:0,css_transfer_byte_size:0};null!=window.performance&&null!=window.performance.getEntries&&window.performance.getEntries().forEach((function(n){var r=null!=n.encodedBodySize?n.encodedBodySize:n.decodedBodySize,a=null!=n.decodedBodySize?n.decodedBodySize:n.encodedBodySize,o=n.transferSize;null!=a&&null!=r&&(e=!0,t.total_compressed_byte_size+=r,t.total_uncompressed_byte_size+=a,null!=o&&(t.total_uncompressed_byte_size+=o),"resource"===n.entryType&&("script"===n.initiatorType&&null!=n.name&&n.name.match(/\.js/)&&(t.js_compressed_byte_size+=r,t.js_uncompressed_byte_size+=a,null!=o&&(t.js_uncompressed_byte_size+=o)),"link"===n.initiatorType&&null!=n.name&&n.name.match(/\.css/)&&(t.css_compressed_byte_size+=r,t.css_uncompressed_byte_size+=a,null!=o&&(t.css_uncompressed_byte_size+=o))))}));return e?t:{}}(),{load_id:n.loadId,screen_name:t,duration_ms_since_app_opened:r-window.GLOBAL_ENV.HTML_TIMESTAMP}))}))},t.trackAppUIViewed=function(e){this.appUIViewed||(this.trackEvent(i.AnalyticEvents.APP_UI_VIEWED,e),this.appUIViewed=!0)},e}())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumSelectPlanModal=xe,t.PremiumSelectPlanModalConnected=Ve,t.openPremiumSelectPlanModal=function(e){var t=e||{},n=t.initialPlanId,r=t.followupSKUInfo,o=t.onClose,i=t.analyticsLocation,l=t.isGift,u=void 0!==l&&l,s=t.subscriptionTier,d=t.trialId,f=t.postSuccessGuild;(0,G.openModal)((function(e){var t=e.onClose,l=ve(e,["onClose"]);return a.createElement(Ve,_e({},l,{subscriptionTier:s,isGift:u,initialPlanId:n,followupSKUInfo:r,onClose:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){t(),null==o||o(e)})),analyticsLocation:i,trialId:d,postSuccessGuild:f,planGroup:Te}))}),{onCloseCallback:function(){null==o||o(!1)}})},t.openGuildSelectPlanModal=function(e){var t=e.initialPlanId,n=e.activeSubscription,r=e.onClose,o=e.analyticsLocation,i=e.renderHeader,l=e.renderPurchaseConfirmation,u=e.planGroup;(0,G.openModal)((function(e){var s=e.onClose,d=ve(e,["onClose"]);return a.createElement(xe,_e({},d,{initialPlanId:t,activeSubscription:n,onClose:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){s(),null==r||r(e)})),analyticsLocation:o,renderHeader:i,renderPurchaseConfirmation:l,planGroup:u}))}),{onCloseCallback:function(){null==r||r(!1)}})};var r,a=pe(n(0)),o=n(377),i=fe(n(9)),l=fe(n(23)),u=n(276),s=fe(n(98)),d=n(3),f=n(287),c=n(5829),p=n(5691),v=n(5672),y=fe(n(5674)),m=fe(n(485)),_=fe(n(5840)),h=fe(n(5675)),E=fe(n(5841)),g=fe(n(5852)),S=fe(n(160)),O=fe(n(39)),I=fe(n(257)),T=fe(n(1147)),C=fe(n(5826)),b=fe(n(29)),M=fe(n(1160)),N=fe(n(61)),A=fe(n(55)),P=fe(n(1164)),R=n(1162),L=fe(n(5707)),D=fe(n(151)),w=fe(n(149)),j=n(85),k=n(131),U=n(35),G=n(41),F=fe(n(24)),B=fe(n(13)),H=pe(n(96)),x=n(281),V=n(295),W=n(1249),Y=n(692),z=n(280),K=n(1169),$=n(1173),Z=n(5689),q=n(1237),X=fe(n(5705)),J=fe(n(5678)),Q=fe(n(5695)),ee=fe(n(5696)),te=n(5677),ne=fe(n(6036)),re=n(5676),ae=fe(n(6e3)),oe=n(5700),ie=fe(n(5856)),le=fe(n(5709)),ue=n(1),se=fe(n(6)),de=fe(n(6102));function fe(e){return e&&e.__esModule?e:{default:e}}function ce(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ce=function(){return e},e}function pe(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ce();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ve(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function ye(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function me(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){ye(o,r,a,i,l,"next",e)}function l(e){ye(o,r,a,i,l,"throw",e)}i(void 0)}))}}function _e(){return(_e=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}).apply(this,arguments)}function he(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Ee=[Y.Step.PLAN_SELECT,Y.Step.REVIEW,Y.Step.CONFIRM],ge=[Y.Step.PLAN_SELECT].concat(te.SHARED_ADD_PAYMENT_STEPS,[Y.Step.REVIEW,Y.Step.CONFIRM]),Se=[Y.Step.PLAN_SELECT].concat(te.SHARED_CREDIT_CARD_STEPS,[Y.Step.REVIEW,Y.Step.CONFIRM]),Oe=[Y.Step.PLAN_SELECT].concat(te.SHARED_PAYPAL_STEPS,[Y.Step.REVIEW,Y.Step.CONFIRM]),Ie=[Y.Step.PLAN_SELECT].concat(te.SHARED_PAYMENT_REQUEST_STEPS,[Y.Step.REVIEW,Y.Step.CONFIRM]),Te=[ue.SubscriptionPlans.PREMIUM_MONTH_LEGACY,ue.SubscriptionPlans.PREMIUM_MONTH_TIER_1,ue.SubscriptionPlans.PREMIUM_YEAR_TIER_1,ue.SubscriptionPlans.PREMIUM_MONTH_TIER_2,ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2,ue.SubscriptionPlans.PREMIUM_YEAR_LEGACY];function Ce(e,t,n){var r,a,o=(r=n,null===(a=e.items.find((function(e){return r.includes(e.planId)})))||void 0===a?void 0:a.planId);return e.type===ue.SubscriptionTypes.PREMIUM&&null==o||((0,l.default)(null!=o,"Current subscription has no plan in group"),(0,l.default)(!(o===ue.SubscriptionPlans.PREMIUM_YEAR_TIER_1&&t===ue.SubscriptionPlans.PREMIUM_MONTH_TIER_2),"Unexpected plan switch"),n.indexOf(o)<n.indexOf(t))}function be(e,t,n){return!Ce(e,t,n)}var Me=[ue.PremiumSubscriptionSKUs.LEGACY,ue.PremiumSubscriptionSKUs.TIER_1,ue.PremiumSubscriptionSKUs.TIER_2];function Ne(e){var t=e.selectSku,n=e.onClose;return a.createElement(a.Fragment,null,he(U.ModalHeader,{separator:!1},void 0,he(k.FormTitle,{tag:k.FormTitleTags.H4},void 0,se.default.Messages.BILLING_STEP_SELECT_PLAN),he(U.ModalCloseButton,{onClick:n})),he(ne.default,{onSelectSku:t}))}function Ae(e){switch(e){case ue.PremiumSubscriptionSKUs.TIER_1:return{month:ue.SubscriptionPlans.PREMIUM_MONTH_TIER_1,year:ue.SubscriptionPlans.PREMIUM_YEAR_TIER_1};case ue.PremiumSubscriptionSKUs.TIER_2:return{month:ue.SubscriptionPlans.PREMIUM_MONTH_TIER_2,year:ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2};default:throw new Error("Unexpected SKU: "+e)}}function Pe(e){var t,n,r,a=e.premiumSubscription,o=e.planId,l=e.selectPlan,u=e.selected,s=e.isGift,f=(0,d.useStateFromStores)([O.default],(function(){return O.default.locale})),c=(0,d.useStateFromStores)([I.default],(function(){return I.default.getHardcoded(o)})),p=null!=a&&a.planId===o,v=p||o===ue.SubscriptionPlans.PREMIUM_MONTH_TIER_2&&null!=a&&a.planId===ue.SubscriptionPlans.PREMIUM_YEAR_TIER_1;return he(N.default,{role:"radio","aria-checked":u,tabIndex:u?0:-1,focusProps:{offset:{left:-4,right:-4,top:0,bottom:0}},onClick:v?void 0:function(){return l(o)},className:(0,i.default)(de.default.planOption,(t={},t[de.default.planOptionDisabled]=v,t))},void 0,he("div",{className:de.default.planOptionClickable},void 0,he(M.default,{readOnly:!0,displayOnly:!0,value:u,shape:M.default.Shapes.ROUND,color:ue.Colors.BRAND,type:M.default.Types.INVERTED,className:de.default.planOptionCheckbox}),he("div",{className:(0,i.default)(de.default.planOptionInterval,(n={},n[de.default.optionSelected]=u,n))},void 0,function(e,t){if(t)switch(e){case ue.SubscriptionIntervalTypes.MONTH:return se.default.Messages.PAYMENT_MODAL_ONE_MONTH;case ue.SubscriptionIntervalTypes.YEAR:return se.default.Messages.PAYMENT_MODAL_ONE_YEAR;default:throw new Error("Unexpected interval")}switch(e){case ue.SubscriptionIntervalTypes.MONTH:return se.default.Messages.MONTHLY;case ue.SubscriptionIntervalTypes.YEAR:return se.default.Messages.YEARLY;default:throw new Error("Unexpected interval")}}(c.interval,s)),p?he("span",{className:de.default.planOptionCurrentPlan},void 0,"(",se.default.Messages.BILLING_SWITCH_PLAN_CURRENT_PLAN,")"):null,c.interval===ue.SubscriptionIntervalTypes.YEAR?null!=a?he("span",{className:de.default.planOptionMonthsFree},void 0,"(",se.default.Messages.BILLING_SWITCH_PLAN_YEARLY_FREE_MONTHS,")"):he("span",{className:de.default.planOptionDiscount},void 0,se.default.Messages.BILLING_PLAN_SELECTION_DISCOUNT.format({discount:(0,x.formatPercent)(f,ue.PREMIUM_YEARLY_DISCOUNT_PERCENT/100)})):null),he("div",{className:(0,i.default)((r={},r[de.default.optionSelected]=u,r))},void 0,(0,x.formatPrice)(c.price,c.currency)))}function Re(e,t){var n,r,a=(n=e.skuId,r=t,Me.indexOf(r)-Me.indexOf(n));return a>0?se.default.Messages.BILLING_SWITCH_PLAN_UPGRADE_BODY_TIER_2:a<0?se.default.Messages.BILLING_SWITCH_PLAN_DOWNGRADE_BODY_TIER_1:e.interval===ue.SubscriptionIntervalTypes.MONTH?t===ue.PremiumSubscriptionSKUs.TIER_2?se.default.Messages.BILLING_SWITCH_PLAN_UPGRADE_BODY_TIER_2_YEAR.format({numFreeGuildSubscriptions:z.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}):se.default.Messages.BILLING_SWITCH_PLAN_UPGRADE_BODY_TIER_1_YEAR:se.default.Messages.BILLING_SWITCH_PLAN_DOWNGRADE_BODY_MONTH}function Le(e){var t=e.premiumSubscription,n=e.skuId,r=e.selectedPlanId,o=e.setSelectedPlanId,i=e.canContinue,l=e.isGift,u=void 0!==l&&l,s=(0,d.useStateFromStoresArray)([I.default],(function(){return[null!=t?I.default.getHardcoded(t.planId):null,null!=r?I.default.get(r):null]})),f=s[0],c=s[1],p=(0,Z.usePremiumTrialOffer)(),v=null!=p&&ue.SubscriptionTrials[p.trial_id].skus.includes(n),y=Ae(n);a.useEffect((function(){i||(null==t||u||t.planId!==y.year?o(y.year):o(y.month))}),[i]);var m=(u||!v)&&i,_=(0,R.useRadioGroup)();return he("div",{className:de.default.stepBody},void 0,null==f||u?null:he("div",{className:de.default.bodyText},void 0,Re(f,n)),he("div",{className:de.default.selectPlanChooseTitle},void 0,se.default.Messages.BILLING_SWITCH_PLAN_CHOOSE_ONE),v&&!u?he("div",{className:de.default.selectPlanChooseSubtitle},void 0,se.default.Messages.BILLING_SWITCH_PLAN_CHOOSE_ONE_TRIAL_SUBTITLE.format()):null,a.createElement("div",_,he(Pe,{isGift:u,premiumSubscription:u?null:t,planId:y.year,selectPlan:o,selected:r===y.year}),he(Pe,{isGift:u,premiumSubscription:u?null:t,planId:y.month,selectPlan:o,selected:r===y.month})),he("div",{},void 0,m&&null!=c?he("div",{},void 0,he("div",{className:de.default.selectPlanDivider}),he(q.PremiumInvoiceTableTotalRow,{label:se.default.Messages.BILLING_PAYMENT_BREAKDOWN_TOTAL,value:he(X.default,{price:c.price,currency:c.currency,intervalType:u?null:c.interval}),className:de.default.selectPlanTotalRow})):null))}function De(e){var t=e.premiumSubscription,n=e.newPlan,r=e.onInvoiceError,o=e.planGroup,i=(0,H.getItemsWithUpsertedPlanIdForGroup)(t,n.id,1,new Set(o)),l=(0,K.useSubscriptionInvoicePreview)({subscriptionId:t.id,items:i,renewal:!1,applyEntitlements:!0}),u=l[0],s=l[1],d=(0,K.useSubscriptionInvoicePreview)({subscriptionId:t.id,items:i,renewal:!0}),f=d[0],c=d[1],p=null!=s?s:c;if(a.useEffect((function(){r(p)}),[r,p]),null!=p)return he(P.default,{},void 0,p.message);if(null==u||null==f)return he(D.default,{className:de.default.spinner});var v=H.default.isWithinGrandfatheredUpgradeTime()&&t.planId===ue.SubscriptionPlans.PREMIUM_YEAR_LEGACY&&[ue.SubscriptionPlans.PREMIUM_MONTH_TIER_2,ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2].includes(n.id);return a.createElement(a.Fragment,null,v?he(F.default,{className:de.default.grandfatheredUpgradeNote,size:F.default.Sizes.SIZE_16},void 0,se.default.Messages.PREMIUM_SUBSCRIPTION_GRANDFATHERED_UPGRADE_NOTE):null,he(re.SubscriptionPeriodResetNotice,{proratedInvoice:u,renewalInvoice:f}),he(q.PremiumInvoiceTable,{className:de.default.invoice},void 0,he(q.PremiumInvoiceTableHeader,{},void 0,se.default.Messages.BILLING_SWITCH_PLAN_PURCHASE_DETAILS),he(re.PremiumSubscriptionChangePlanInvoiceRows,{invoice:u,newPlan:n}),he(re.SubscriptionInvoiceFooter,{premiumSubscription:t,proratedInvoice:u,renewalInvoice:f,isUpdate:!0})))}Pe.displayName="PremiumSwitchPlanSelectOption",Le.displayName="PremiumSwitchPlanSelectBody";var we=he("div",{},void 0,he(D.default,{})),je=he(q.PremiumInvoiceTableDivider,{});function ke(e){var t=e.premiumSubscription,n=e.newPlan,r=e.planGroup,o=(0,K.useSubscriptionInvoicePreview)({subscriptionId:t.id,items:(0,H.getItemsWithUpsertedPlanIdForGroup)(t,n.id,1,new Set(r)),renewal:!0,applyEntitlements:!1})[0];if(null==o)return we;var i,l=t.planId===ue.SubscriptionPlans.PREMIUM_YEAR_LEGACY&&n.id===ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2;return i=t.type===ue.SubscriptionTypes.PREMIUM?H.default.getDisplayName(n.id):n.name,he("div",{className:de.default.bodyText},void 0,he("div",{className:de.default.renewalInvoiceDate},void 0,l?se.default.Messages.PREMIUM_GRANDFATHERED_UPGRADE.format():se.default.Messages.BILLING_SWITCH_PLAN_CHANGE_DATE.format({renewalDate:o.subscriptionPeriodStart})),he(q.PremiumInvoiceTable,{className:de.default.invoice},void 0,he(q.PremiumInvoiceTableHeader,{},void 0,l?se.default.Messages.PREMIUM_GRANDFATHERED_UPGRADE_ESTIMATED_TITLE:se.default.Messages.PREMIUM_SUBSCRIPTION_UPDATES),he(q.PremiumInvoiceTableRow,{label:i,value:l?H.default.estimateGrandfatheredUpgradeCost(t):(0,H.getFormattedRateForPlan)(n)}),null!=l?l:a.createElement(a.Fragment,null,je,he(re.SubscriptionInvoiceFooter,{premiumSubscription:t,renewalInvoice:o,isUpdate:!0}))))}function Ue(e){var t,n=e.premiumSubscription,r=e.paymentSources,o=e.paymentSourceId,i=e.onPaymentSourceChange,l=e.onPaymentSourceAdd,u=e.planId,s=e.setHasAcceptedTerms,f=e.legalTermsNodeRef,c=e.hasLegalTermsFlash,p=e.onInvoiceError,v=e.planGroup,_=(0,d.useStateFromStores)([I.default],(function(){return I.default.getHardcoded(u)})),h=(0,d.useStateFromStores)([S.default],(function(){return S.default.hidePersonalInformation})),E=(null==n?void 0:n.planId)===ue.SubscriptionPlans.PREMIUM_YEAR_LEGACY&&u===ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2;return t=E?se.default.Messages.PREMIUM_GRANDFATHERED_UPGRADE_REVIEW_HEADER:(0,H.isPremiumSubscriptionPlan)(u)?H.default.getBillingReviewSubheader(n,u):se.default.Messages.BILLING_SELECT_PLAN_GUILD_SUBSCRIPTION.format({planName:_.name}),he("div",{className:de.default.stepBody},void 0,he(k.FormTitle,{tag:k.FormTitleTags.H5},void 0,t),null!=n?Ce(n,u,v)?he(De,{premiumSubscription:n,newPlan:_,onInvoiceError:p,planGroup:v}):he(ke,{premiumSubscription:n,newPlan:_,planGroup:v}):null,he("div",{className:de.default.paymentSourceWrapper},void 0,he(k.FormTitle,{tag:k.FormTitleTags.H5},void 0,se.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_TITLE),he(y.default,{paymentSources:Object.values(r),selectedPaymentSourceId:o,onChange:i,onPaymentSourceAdd:l,hidePersonalInformation:h})),a.createElement(J.default,{isActive:c,ref:f},he(m.default,{onChange:s,finePrint:E?se.default.Messages.PREMIUM_GRANDFATHERED_UPGRADE_LEGALESE:H.default.getLegalString(_.interval),forceShow:!0})))}function Ge(e){var t,n=e.premiumSubscription,r=e.planId,o=e.setPurchaseState,i=e.hasAcceptedTerms,u=e.paymentSourceId,s=e.onBack,c=e.onNext,y=e.legalTermsNodeRef,m=e.flashLegalTerms,_=e.invoiceError,h=e.onPurchaseError,E=e.baseAnalyticsData,g=e.flowStartTime,S=e.isGift,O=void 0!==S&&S,T=e.trialId,C=e.planGroup,M=(0,d.useStateFromStores)([I.default],(function(){return I.default.getHardcoded(r)})),N=a.useState(!1),P=N[0],R=N[1],L=(0,oe.useSubscriptionEntitlements)(r,O).hasEntitlements,D=function(e,t,n,r){return(null==t?void 0:t.planId)===ue.SubscriptionPlans.PREMIUM_YEAR_LEGACY&&e.id===ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2?se.default.Messages.PREMIUM_GRANDFATHERED_UPGRADE_CONFIRM:n?se.default.Messages.PAYMENT_MODAL_BUTTON_PREMIUM_GIFT:null!=t?Ce(t,e.id,r)?se.default.Messages.BILLING_SWITCH_PLAN_UPGRADE:se.default.Messages.BILLING_SWITCH_PLAN_CHANGE:(0,H.isPremiumSubscriptionPlan)(e.id)?H.default.getBillingReviewSubheader(null,e.id):se.default.Messages.BILLING_SELECT_PLAN_GUILD_SUBSCRIPTION.format({planName:e.name})}(M,n,O,C),j=(0,H.isPremiumSubscriptionPlan)(r);return t=null!=_?he(b.default,{color:b.default.Colors.GREEN,disabled:!0},void 0,D):i?he(b.default,{onClick:me(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(!0),o($.PurchaseState.PURCHASING),e.prev=2,(0,l.default)(null!=u||L,"Missing paymentSourceId"),B.default.track(ue.AnalyticEvents.PAYMENT_FLOW_COMPLETED,_e({},E,{duration_ms:Date.now()-g})),!O){e.next=10;break}return e.next=8,(0,v.purchaseSKU)(ue.PREMIUM_SUBSCRIPTION_APPLICATION,M.skuId,{expectedAmount:M.price,paymentSourceId:u,subscriptionPlanId:r,isGift:!0});case 8:e.next=17;break;case 10:if(null==n){e.next=15;break}return e.next=13,(0,f.updateSubscription)(n,{items:(0,H.getItemsWithUpsertedPlanIdForGroup)(n,r,1,new Set(C)),paymentSourceId:u});case 13:e.next=17;break;case 15:return e.next=17,(0,p.subscribe)(r,u,T);case 17:o($.PurchaseState.COMPLETED),c(),e.next=26;break;case 21:e.prev=21,e.t0=e.catch(2),o($.PurchaseState.FAIL),h(e.t0),B.default.track(ue.AnalyticEvents.PAYMENT_FLOW_FAILED,_e({},E,{payment_source_id:u,duration_ms:Date.now()-g}));case 26:return e.prev=26,R(!1),e.finish(26);case 29:case"end":return e.stop()}}),e,null,[[2,21,26,29]])}))),color:b.default.Colors.GREEN,submitting:P,disabled:null==u&&!L},void 0,D):he(w.default,{text:se.default.Messages.BILLING_ACCEPT_TERMS_TOOLTIP},void 0,(function(e){return a.createElement(b.default,_e({},e,{color:b.default.Colors.GREEN,type:"submit",onClick:function(){null!=y.current&&(y.current.scrollIntoView({behavior:"smooth"}),m())}}),D)})),he(U.ModalFooter,{justify:A.default.Justify.BETWEEN,align:A.default.Align.CENTER},void 0,t,j?he(Q.default,{onClick:s}):null)}function Fe(e){var t=e.planId,n=e.onClose,r=(0,d.useStateFromStores)([I.default],(function(){return I.default.getHardcoded(t)})),a=(0,d.useStateFromStores)([g.default],(function(){return g.default.getGiftCode(r.skuId)}));return he(_.default,{giftCode:a,subscriptionPlan:r,onClose:n})}function Be(e){var t=e.selectedPlanId,n=e.isGift,r=void 0!==n&&n,a=e.paymentSources,o=e.paymentSourceId,i=e.onPaymentSourceChange,l=e.handlePaymentSourceAdd,u=e.setHasAcceptedTerms,s=e.legalTermsNodeRef,f=e.hasLegalTermsFlash,c=e.trialId,p=(0,d.useStateFromStores)([I.default],(function(){return I.default.getHardcoded(t)})),v=[{planId:p.id,quantity:1}],y=(0,K.useSubscriptionInvoicePreview)({items:v,renewal:!1,preventFetch:r,applyEntitlements:!0,trialId:c})[0],m=(0,K.useSubscriptionInvoicePreview)({items:v,renewal:!0,preventFetch:r,trialId:c})[0];return he(ie.default,{paymentSources:a,paymentSourceId:o,plan:p,isGift:r,proratedInvoicePreview:y,renewalInvoicePreview:m,onPaymentSourceChange:i,handlePaymentSourceAdd:l,setHasAcceptedTerms:u,legalTermsNodeRef:s,hasLegalTermsFlash:f,isTrial:null!=c})}function He(e){var t=e.onStepChange,n=e.selectedPlanId,r=e.isGift,a=e.paymentSources,o=(0,d.useStateFromStores)([T.default],(function(){return T.default.getPremiumTypeSubscription()})),i=(0,oe.useSubscriptionEntitlements)(n,r).hasEntitlements;return he(b.default,{onClick:function(){null!=o&&null!=o.paymentSourceId||Object.keys(a).length>0||i?t(Y.Step.REVIEW):t(Y.Step.PAYMENT_TYPE)}},void 0,se.default.Messages.SELECT)}function xe(e){var t=e.isGift,n=void 0!==t&&t,r=e.subscriptionTier,i=e.initialPlanId,p=e.activeSubscription,v=e.followupSKUInfo,y=e.transitionState,m=e.onClose,_=e.analyticsLocation,g=e.trialId,S=e.postSuccessGuild,O=e.renderHeader,M=e.renderPurchaseConfirmation,N=e.planGroup,P=void 0===N?Te:N,R=(0,d.useStateFromStores)([T.default],(function(){return T.default.hasFetchedSubscriptions()})),w=a.useState(Ee),k=w[0],G=w[1],F=a.useState(null!=i?Y.Step.REVIEW:null!=r?Y.Step.PLAN_SELECT:Y.Step.SKU_SELECT),x=F[0],z=F[1];x===Y.Step.PAYMENT_TYPE&&k!==ge&&G(ge);var K=a.useState((function(){return null!=i?I.default.getHardcoded(i).skuId:r})),Z=K[0],q=K[1],X=a.useState(i),J=X[0],ne=X[1],re=(0,d.useStateFromStores)([I.default],(function(){return null!=J?I.default.getHardcoded(J):null})),ie=(0,d.useStateFromStores)([C.default],(function(){return C.default.applicationIdsFetched.has(ue.PREMIUM_SUBSCRIPTION_APPLICATION)})),fe=a.useState($.PurchaseState.WAITING),ce=fe[0],pe=fe[1],ve=a.useState(!1),ye=ve[0],me=ve[1],Ce=a.useState(null),Me=Ce[0],Pe=Ce[1],Re=a.useRef(null),De=(0,h.default)(!1,500),we=De[0],je=De[1];(0,oe.useUnsupportedExternalSubscriptionModalHandler)(p,(function(){return m(!1)}),n);var ke=a.useRef(null!=p?p.planId:null);a.useEffect((function(){null==ke.current&&null!=p&&(ke.current=p.planId)}),[p]);var xe=(0,u.useLazyValue)((function(){return[s.default.v4(),Date.now()]})),Ve=xe[0],We=xe[1],Ye=null!=g&&ue.SubscriptionTrials[g].skus.includes(Z)?g:null,ze={load_id:Ve,payment_type:"subscription",location:_,subscription_type:ue.SubscriptionTypes.PREMIUM,subscription_plan_id:null==re?void 0:re.id,price:null==re?void 0:re.price,regular_price:null==re?void 0:re.price,currency:null==re?void 0:re.currency,is_gift:n,eligible_for_trial:null!=g};a.useEffect((function(){ie||(0,c.fetchUserEntitlementsForApplication)(ue.PREMIUM_SUBSCRIPTION_APPLICATION)}),[ie]),a.useEffect((function(){R||(0,f.fetchSubscriptions)(),B.default.track(ue.AnalyticEvents.PAYMENT_FLOW_STARTED,ze)}),[]);var Ke=(0,te.useSharedPaymentModal)(),$e=Ke.paymentSources,Ze=Ke.paymentSourceId,qe=Ke.setPaymentSourceId,Xe=Ke.creditCardState,Je=Ke.setCreditCardState,Qe=Ke.tokenState,et=Ke.setTokenState,tt=Ke.billingAddressState,nt=Ke.setBillingAddressState,rt=Ke.isSubmittingCurrentStep,at=Ke.setIsSubmittingCurrentStep,ot=Ke.braintreeEmail,it=Ke.braintreeNonce,lt=Ke.paymentError,ut=Ke.paymentAuthenticationState,st=Ke.purchaseError,dt=Ke.setPurchaseError,ft=Ke.purchaseErrorBlockRef,ct=(0,j.useUID)(),pt=(0,u.useStableMemo)((function(){return Date.now()}),[x]),vt=function(e){z(e),dt(null);var t=Date.now();B.default.track(ue.AnalyticEvents.PAYMENT_FLOW_STEP,_e({},ze,{from_step:x,to_step:e,step_duration_ms:t-pt,flow_duration_ms:t-We}))};(0,W.setPaymentStepForAuthentication)(x,ut,vt),(0,Y.setPurchaseStateForStep)(x,ce,pe);var yt=function(){null==m||m(ce===$.PurchaseState.COMPLETED)};(0,E.default)(yt);var mt,_t=(null==p?void 0:p.planId)===ue.SubscriptionPlans.PREMIUM_YEAR_LEGACY&&J===ue.SubscriptionPlans.PREMIUM_YEAR_TIER_2;if(R)switch(null==Ze&&null!=p&&null!=p.paymentSourceId&&qe(p.paymentSourceId),x){case Y.Step.SKU_SELECT:mt=he(Ne,{selectSku:function(e){q(e),vt(Y.Step.PLAN_SELECT)},onClose:yt});break;case Y.Step.PLAN_SELECT:(0,l.default)(null!=Z,"Expected planId");var ht=Ae(Z),Et=J===ht.year||J===ht.month;mt=he(ee.default,{steps:k,isGift:n,currentStep:x,paymentError:lt,body:he(Le,{premiumSubscription:null!=p?p:null,skuId:Z,selectedPlanId:J,setSelectedPlanId:ne,canContinue:Et,isGift:n}),footer:he(U.ModalFooter,{justify:A.default.Justify.BETWEEN,align:A.default.Align.CENTER},void 0,Et&&null!=J?he(He,{paymentSources:$e,onStepChange:vt,selectedPlanId:J,isGift:n}):he(b.default,{disabled:!0},void 0,se.default.Messages.SELECT),null==i&&null==r?he(Q.default,{onClick:function(){return vt(Y.Step.SKU_SELECT)}}):null)});break;case Y.Step.PAYMENT_TYPE:case Y.Step.CREDIT_CARD_INFORMATION:case Y.Step.PAYPAL_INFORMATION:case Y.Step.PAYMENT_REQUEST_INFORMATION:case Y.Step.ADDRESS:case Y.Step.AWAITING_AUTHENTICATION:var gt=(0,te.renderPaymentModalStep)(x,vt,k,G,tt,nt,$e,qe,Xe,Je,Qe,et,rt,at,ot,it,Y.Step.REVIEW,Se,Oe,Ie,ge),St=gt.body,Ot=gt.backStep,It=gt.submitButton;x===Y.Step.PAYMENT_TYPE&&null==Ot&&(Ot=Y.Step.PLAN_SELECT),mt=he(ee.default,{steps:k,currentStep:x,paymentError:lt,body:St,footer:he(U.ModalFooter,{justify:A.default.Justify.BETWEEN,align:A.default.Align.CENTER},void 0,he("div",{},void 0,It),null!=Ot?he(Q.default,{onClick:function(){return null!=Ot&&vt(Ot)}}):null)});break;case Y.Step.REVIEW:(0,l.default)(null!=J,"Expected planId"),mt=he(ee.default,{steps:k,currentStep:x,paymentError:lt,purchaseError:st,purchaseErrorBlockRef:ft,hideBreadcrumbs:_t,body:null==p||n?he(Be,{selectedPlanId:J,isGift:n,paymentSources:$e,paymentSourceId:Ze,onPaymentSourceChange:function(e){return qe(null!=e?e.id:null)},handlePaymentSourceAdd:function(){return vt(Y.Step.PAYMENT_TYPE)},setHasAcceptedTerms:me,legalTermsNodeRef:Re,hasLegalTermsFlash:we,trialId:Ye}):he(Ue,{premiumSubscription:p,paymentSources:$e,paymentSourceId:Ze,onPaymentSourceChange:function(e){return qe(null!=e?e.id:null)},onPaymentSourceAdd:function(){vt(Y.Step.PAYMENT_TYPE),qe(null)},planId:J,setHasAcceptedTerms:me,legalTermsNodeRef:Re,hasLegalTermsFlash:we,onInvoiceError:function(e){return Pe(e)},planGroup:P}),footer:he(Ge,{premiumSubscription:null!=p?p:null,planId:J,hasAcceptedTerms:ye,paymentSourceId:Ze,setPurchaseState:pe,onBack:function(){return vt(Y.Step.PLAN_SELECT)},onNext:function(){return vt(Y.Step.CONFIRM)},onPurchaseError:function(e){return dt(e)},legalTermsNodeRef:Re,flashLegalTerms:function(){return je(!0)},invoiceError:Me,baseAnalyticsData:ze,flowStartTime:We,isGift:n,trialId:Ye,planGroup:P})});break;case Y.Step.CONFIRM:var Tt;(0,l.default)(null!=J,"Expected planId"),(0,l.default)(null!=Z,"Expected selectedSkuId"),Tt=null!=M?M(re,yt):n?he(Fe,{planId:J,onClose:yt}):ke.current===J?he(le.default,{planId:J,postSuccessGuild:S,onClose:yt}):he(le.default,{followupSKUInfo:v,startingPremiumSubscriptionPlanId:ke.current,planId:J,onClose:yt,isDowngrade:null!=p&&be(p,J,P)}),mt=he(ee.default,{steps:k,currentStep:x,body:Tt,hideBreadcrumbs:!0});break;default:throw new Error("Unexpected step "+x)}else mt=he(D.default,{className:de.default.spinner});var Ct,bt,Mt=null==J||(0,H.isPremiumSubscriptionPlan)(J),Nt=null;return null!=O?Nt=O(re,yt):x!==Y.Step.SKU_SELECT&&null!=Z&&((0,l.default)((Ct=Z,bt=ue.PremiumSubscriptionSKUToPremiumType,Ct in bt),"invalid sku id: "+Z),Nt=he(ae.default,{currentStep:x,purchaseState:ce,headerId:ct,premiumType:ue.PremiumSubscriptionSKUToPremiumType[Z],onClose:yt})),he(o.Elements,{options:ue.StripeElementsOptions,stripe:(0,V.ensureStripeV3IsLoaded)()},void 0,he(L.default,{className:de.default.shaker,isShaking:Mt&&ce===$.PurchaseState.PURCHASING,intensity:2},void 0,he(U.ModalRoot,{className:de.default.root,transitionState:y,"aria-labelledby":ct},void 0,Nt,mt)))}function Ve(e){var t=(0,d.useStateFromStores)([T.default],(function(){return T.default.getPremiumTypeSubscription()}));return a.createElement(xe,_e({},e,{activeSubscription:null!=t?t:void 0}))}ke.displayName="PremiumSwitchPlanRenewalMutation",Ue.displayName="PremiumSwitchPlanReviewBody",Ge.displayName="PremiumSwitchPlanReviewFooter",Fe.displayName="PremiumSubscriptionGiftPurchaseConfirmation",Be.displayName="PremiumSubscriptionReview",He.displayName="PlanSelectFooterButton",xe.displayName="PremiumSelectPlanModal",Ve.displayName="PremiumSelectPlanModalConnected"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTrialOffer=c,t.usePremiumTrialOffer=function(){return c(u.PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=n(57),i=s(n(12)),l=s(n(5959)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return null!=e&&null!=e.expires_at&&Date.now()>Date.parse(e.expires_at)}function c(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getUserTrialOffer(e)})),n=r.useState(f(t)),u=n[0],s=n[1],d=(0,a.useStateFromStores)([i.default],(function(){var e;return null===(e=i.default.getNullableCurrentUser())||void 0===e?void 0:e.hasPremiumPerks}));return r.useEffect((function(){var e;if(null!=t&&null!=t.expires_at){e=new o.Timeout;!function n(){var r,a=null!=t.expires_at?Date.parse(t.expires_at)-Date.now():0;null===(r=e)||void 0===r||r.start(a,(function(){!u&&f(t)?s(!0):n()}))}()}return function(){var t;return null===(t=e)||void 0===t?void 0:t.stop()}}),[u,t]),u||d?null:t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(61)),l=d(n(55)),u=d(n(683)),s=d(n(6087));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderBreadcrumb=function(e,n){var r,a,l=t.props,d=l.activeId,f=l.onBreadcrumbClick,p=l.breadcrumbs,v=l.renderCustomBreadcrumb,y=l.separatorClassName,m=e.id===d,_=n===p.length-1,h=v?v(e,m):c("span",{className:(0,o.default)(s.default.breadcrumb,(r={},r[s.default.activeBreadcrumb]=m,r[s.default.interactiveBreadcrumb]=null!=f,r))},void 0,e.label);return c("div",{className:(0,o.default)(s.default.breadcrumbWrapper,(a={},a[s.default.breadcrumbFinalWrapper]=_,a))},e.id,f?c(i.default,{tag:"span",onClick:function(){return t.handleClick(e)},className:s.default.breadcrumbClickWrapper},void 0,h):h,_?null:c(u.default,{className:(0,o.default)(s.default.breadcrumbArrow,y),direction:u.default.Directions.RIGHT}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.handleClick=function(e){var t=this.props.onBreadcrumbClick;null!=t&&t(e)},a.render=function(){var e=this.props,t=e.breadcrumbs,n=e.className,r=t.map(this.renderBreadcrumb);return c(l.default,{justify:l.default.Justify.START,className:(0,o.default)(s.default.breadcrumbs,n)},void 0,r)},r}(a.PureComponent);v.displayName="Breadcrumbs";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribe=function(e,t,n){return v.apply(this,arguments)},t.cancel=function(e){return new Promise((function(t,n){l.cancelSubscription(e).then(t).catch((function(e){i.default.show({body:s.default.Messages.PREMIUM_CANCEL_FAILED_BODY}),n(e)}))}))},t.resubscribe=function(e,t){return y.apply(this,arguments)},t.changePaymentSource=function(e,t){return m.apply(this,arguments)},t.clearError=function(){a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_ERROR_CLEAR})},t.selectPlan=function(e){a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_SELECT_PLAN,subscriptionPlanId:e})};var r=f(n(23)),a=f(n(2)),o=n(96),i=f(n(154)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(287)),u=n(1),s=f(n(6));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}function v(){return(v=p(regeneratorRuntime.mark((function e(t,n,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_SUBSCRIBE_START}),e.prev=1,e.next=4,l.createSubscription({items:[{planId:t,quantity:1}],paymentSourceId:n,trialId:r});case 4:return o=e.sent,a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS,subscription:o}),e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(1),a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_SUBSCRIBE_FAIL,error:e.t0}),e.t0;case 13:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}function y(){return(y=p(regeneratorRuntime.mark((function e(t,n){var i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=(0,o.getPremiumPlan)(t),(0,r.default)(i,"Expected existing premium plan"),s=(0,o.getItemsWithUpsertedPremiumPlanId)(t,i.planId),e.next=6,l.updateSubscription(t,{status:u.SubscriptionStatusTypes.ACTIVE,paymentSourceId:null==n?void 0:n.id,items:s});case 6:a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_UPDATE_SUCCESS}),e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(0),a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_UPDATE_FAIL,error:e.t0}),e.t0;case 13:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function m(){return(m=p(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.changePaymentSource(t,n);case 3:a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_UPDATE_SUCCESS}),e.next=10;break;case 6:throw e.prev=6,e.t0=e.catch(0),a.default.dispatch({type:u.ActionTypes.PREMIUM_PAYMENT_UPDATE_FAIL,error:e.t0}),e.t0;case 10:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=function(){d().then((function(e){e.client.create({authorization:u.PaymentSettings.BRAINTREE.KEY}).then((function(e){a.default.dispatch({type:u.ActionTypes.BRAINTREE_CREATE_CLIENT_SUCCESS,client:e}),f()})).catch((function(){return a.default.dispatch({type:u.ActionTypes.BRAINTREE_CREATE_CLIENT_FAIL})}))}))},t.createPayPalClient=f,t.tokenizePayPal=c,t.teardown=function(){var e=i.default.getPayPalClient();if(null==e)return Promise.resolve();a.default.dispatch({type:u.ActionTypes.BRAINTREE_TEARDOWN_PAYPAL_CLIENT});try{return e.teardown()}catch(e){return Promise.resolve()}},t.popupBridgeCallback=function(e){var t=e.state,n=e.path,o=e.query,i=e.insecure;return a.default.dispatch({type:u.ActionTypes.BRAINTREE_POPUP_BRIDGE_CALLBACK_START}),r.default.post({url:u.Endpoints.BILLING_BRAINTREE_POPUP_BRIDGE_CALLBACK,body:{state:t,path:n,query:o,insecure:i},oldFormErrors:!0}).then((function(e){return a.default.dispatch({type:u.ActionTypes.BRAINTREE_POPUP_BRIDGE_CALLBACK_END}),e}))},t.reopenPayPalWindow=function(){var e=i.default.getLastURL();null==e?c():(a.default.dispatch({type:u.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_START}),window.open(e))};var r=s(n(14)),a=s(n(2)),o=n(277),i=s(n(5839)),l=s(n(16)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){return(0,o.importWithRetry)({createPromise:function(){return Promise.all([n.e(73),n.e(35)]).then(n.t.bind(null,6011,7))},webpackId:6011}).then((function(e){return e.default}))}function f(){var e=i.default.getClient();if(null==e)throw new Error("braintree client must be initialized before calling this");d().then((function(t){t.paypal.create({client:e}).then((function(e){if(null==e._navigateFrameToAuth)throw new Error("braintree client missing _navigateFrameToAuth. did someone upgrade the braintree library?");e._navigateFrameToAuth=function(e){var t=this,n=this._formatPaymentResourceData(e);return r.default.post({url:u.Endpoints.BILLING_PAYPAL_BILLING_AGREEMENT_TOKENS,oldFormErrors:!0,body:{return_url:n.returnUrl,cancel_url:n.cancelUrl}}).then((function(e){var n=e.body.token;t._frameService.redirect(function(e){return(u.PaymentSettings.BRAINTREE.KEY.startsWith("production_")?"https://www.paypal.com":"https://sandbox.paypal.com")+"/agreements/approve?nolegacy=1&ba_token="+e}(n))})).catch((function(e){return t._frameService.close(),t._authorizationInProgress=!1,Promise.reject(new Error(e.body&&e.body.message))}))},a.default.dispatch({type:u.ActionTypes.BRAINTREE_CREATE_PAYPAL_CLIENT_SUCCESS,paypalClient:e})})).catch((function(){return a.default.dispatch({type:u.ActionTypes.BRAINTREE_CREATE_PAYPAL_CLIENT_FAIL})}))}))}function c(){var e=i.default.getPayPalClient();if(null==e)throw new Error("braintree paypal client must be initialized before calling this");a.default.dirtyDispatch({type:u.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_START});var t=Promise.resolve();l.default.isDesktop()&&(t=r.default.post({url:u.Endpoints.BILLING_BRAINTREE_POPUP_BRIDGE,oldFormErrors:!0}).then((function(e){var t=e.body.state;return a.default.dispatch({type:u.ActionTypes.BRAINTREE_POPUP_BRIDGE_STATE_UPDATE,state:t})}))),t.then((function(){return e.tokenize({flow:"vault"})})).then((function(e){var t=e.details,n=t.email,r=t.firstName,o=t.lastName,i=t.billingAddress;a.default.dirtyDispatch({type:u.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_SUCCESS,nonce:e.nonce,email:n,billingAddress:{name:r+" "+o,line1:i.line1,line2:i.line2,city:i.city,state:i.state,country:i.countryCode,postalCode:i.postalCode}})})).catch((function(e){var t=e.message,n=e.code;n===u.BraintreeErrors.PAYPAL_POPUP_CLOSED||null==n?a.default.dirtyDispatch({type:u.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_FAIL_WINDOW_CLOSED}):a.default.dirtyDispatch({type:u.ActionTypes.BRAINTREE_TOKENIZE_PAYPAL_FAIL,message:t,code:n})}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(295));n(1);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d="",f=null,c=null,p=!1,v="US",y="",m="",_="",h="",E="",g="",S=!1,O=null;function I(){c=null,d="",f=null,p=!1,v="US",y="",m="",_="",h="",E="",g="",S=!1,O=null}function T(e){y=e.name,v=e.country,m=e.line1,_=e.line2,h=e.city,E=e.postalCode,g=e.state}function C(){O=null}var b=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a,o,i,l=r.prototype;return l.getCreditCardInfo=function(){return{name:y}},l.getBillingAddressInfo=function(){return{name:y,country:v,line1:m,line2:_,city:h,postalCode:E,state:g}},a=r,(o=[{key:"stripePaymentMethod",get:function(){return c}},{key:"braintreeEmail",get:function(){return d}},{key:"braintreeNonce",get:function(){return f}},{key:"isCardInfoValid",get:function(){return p}},{key:"isBillingAddressInfoValid",get:function(){return S}},{key:"error",get:function(){return O}}])&&u(a.prototype,o),i&&u(a,i),r}(r.default.Store))(a.default,{NEW_PAYMENT_SOURCE_STRIPE_PAYMENT_REQUEST_UPDATE:function(e){var t=e.stripePaymentMethod;null!=t?(c=t,T(o.parseStripePaymentMethod(c).billingAddressInfo)):I()},NEW_PAYMENT_SOURCE_CARD_INFO_UPDATE:function(e){var t=e.info,n=e.isValid;y=t.name,p=n},NEW_PAYMENT_SOURCE_ADDRESS_INFO_UPDATE:function(e){var t=e.info,n=e.isValid;v=t.country,m=t.line1,_=t.line2,h=t.city,E=t.postalCode,g=t.state,S=n},BRAINTREE_TOKENIZE_PAYPAL_START:function(e){return d="",void(f=null)},BRAINTREE_TOKENIZE_PAYPAL_SUCCESS:function(e){var t=e.email,n=e.nonce,r=e.billingAddress;d=t,f=n,T(r),S=v.length>0},BILLING_PAYMENT_SOURCE_CREATE_START:function(e){return C()},MODAL_POP:function(e){return C()},NEW_PAYMENT_SOURCE_CLEAR_ERROR:function(e){return C()},BILLING_PAYMENT_SOURCE_CREATE_FAIL:function(e){var t=e.error;O=t},BILLING_PAYMENT_SOURCE_CREATE_SUCCESS:function(e){return I()},LOGOUT:function(e){return I()}});t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({width:n,height:a},(0,i.default)(c),{viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M16.886 7.999H20C21.104 7.999 22 8.896 22 9.999V11.999H2V9.999C2 8.896 2.897 7.999 4 7.999H7.114C6.663 7.764 6.236 7.477 5.879 7.121C4.709 5.951 4.709 4.048 5.879 2.879C7.012 1.746 8.986 1.746 10.121 2.877C11.758 4.514 11.979 7.595 11.998 7.941C11.9991 7.9525 11.9966 7.96279 11.9941 7.97304C11.992 7.98151 11.99 7.98995 11.99 7.999H12.01C12.01 7.98986 12.0079 7.98134 12.0058 7.97287C12.0034 7.96282 12.0009 7.95286 12.002 7.942C12.022 7.596 12.242 4.515 13.879 2.878C15.014 1.745 16.986 1.746 18.121 2.877C19.29 4.049 19.29 5.952 18.121 7.121C17.764 7.477 17.337 7.764 16.886 7.999ZM7.293 5.707C6.903 5.316 6.903 4.682 7.293 4.292C7.481 4.103 7.732 4 8 4C8.268 4 8.519 4.103 8.707 4.292C9.297 4.882 9.641 5.94 9.825 6.822C8.945 6.639 7.879 6.293 7.293 5.707ZM14.174 6.824C14.359 5.941 14.702 4.883 15.293 4.293C15.481 4.103 15.732 4 16 4C16.268 4 16.519 4.103 16.706 4.291C17.096 4.682 17.097 5.316 16.707 5.707C16.116 6.298 15.057 6.642 14.174 6.824ZM3 13.999V19.999C3 21.102 3.897 21.999 5 21.999H11V13.999H3ZM13 13.999V21.999H19C20.104 21.999 21 21.102 21 19.999V13.999H13Z"}))}d.displayName="Gift"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(271)),o=l(n(6)),i=l(n(6084));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.onClick;return s(a.default,{onClick:t,className:i.default.link},void 0,o.default.Messages.BACK)};d.displayName="PaymentModalBackButton";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.steps,n=e.currentStep,r=e.body,y=e.paymentError,m=e.header,E=e.footer,g=e.isGift,S=void 0!==g&&g,O=e.hideBreadcrumbs,I=void 0!==O&&O,T=e.isLoading,C=void 0!==T&&T,b=e.purchaseError,M=e.purchaseErrorBlockRef,N=e.onScroll,A=e.withScroller,P=void 0===A||A,R=null!=y&&null==(0,c.errorToStep)(y)?y:b;return a.createElement(a.Fragment,null,m,_("div",{className:v.default.content},void 0,S&&n!==c.Step.CONFIRM?_(o.default,{className:v.default.paymentNote,iconSize:o.default.Sizes.SMALL,icon:d.default,color:o.default.Colors.PRIMARY},void 0,p.default.Messages.PREMIUM_PAYMENT_IS_GIFT):null,I?null:_("div",{className:v.default.breadcrumbsWrapper},void 0,_(l.default,{activeId:c.COLLAPSED_PAYMENT_BREADCRUMB_STEPS.has(n)?c.Step.PAYMENT_TYPE:n,breadcrumbs:t.filter((function(e){return!c.COLLAPSED_PAYMENT_BREADCRUMB_STEPS.has(e)&&!h.has(e)})).map((function(e){return{id:e,label:(0,c.getLabelForStep)(e)}}))})),_("div",{className:v.default.bodyWrapper},void 0,null==R?null:_("div",{className:v.default.errorBlockWrapper},void 0,a.createElement(u.default,{ref:M},R.message)),C?_(s.default,{className:v.default.loadingBlock}):_(i.default,{className:v.default.sequencer,staticClassName:v.default.sequencerStatic,animatedNodeClassName:v.default.sequencerAnimatedNode,fillParent:!0,step:n,steps:t,sideMargin:20},void 0,P?_(f.AdvancedScrollerThin,{onScroll:N,className:v.default.scroller},void 0,r):r))),E)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(5970)),i=y(n(5673)),l=y(n(5690)),u=y(n(1164)),s=y(n(151)),d=y(n(5694)),f=n(468),c=n(692),p=y(n(6)),v=y(n(6088));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=new Set([c.Step.CONFIRM])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumSubscriptionNewPlanModalHeader=ie,t.PremiumSubscriptionNewPlanModal=ue,t.openPremiumSubscriptionNewPlanModal=function(e){var t=e.planId,n=e.isGift,r=e.analyticsLocation,o=e.onClose,i=e.trialId;if(!h.default.getCurrentUser().verified)return void(0,A.openModal)((function(e){var t=e.onClose,n=q(e,["onClose"]);return a.createElement(v.default,Q({},n,{onClose:t}))}));var l=!1;(0,A.openModal)((function(e){var o=e.onClose,u=q(e,["onClose"]);return a.createElement(ue,Q({},u,{planId:t,isGift:n,analyticsLocation:r,onClose:o,onComplete:function(){l=!0},trialId:i}))}),{onCloseCallback:function(){null==o||o(l)}})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Z();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(377),i=$(n(23)),l=n(276),u=$(n(98)),s=n(3),d=n(5829),f=n(5691),c=n(5672),p=$(n(5840)),v=$(n(5850)),y=$(n(5675)),m=$(n(5841)),_=$(n(5852)),h=$(n(12)),E=$(n(257)),g=$(n(29)),S=$(n(55)),O=$(n(5707)),I=$(n(149)),T=n(85),C=$(n(1151)),b=$(n(5845)),M=$(n(5706)),N=n(35),A=n(41),P=$(n(13)),R=$(n(96)),L=n(295),D=n(1249),w=n(692),j=n(280),k=n(1169),U=n(1173),G=$(n(5695)),F=$(n(5696)),B=n(5677),H=n(5854),x=n(5700),V=$(n(5856)),W=$(n(5709)),Y=n(1),z=$(n(6)),K=$(n(5711));function $(e){return e&&e.__esModule?e:{default:e}}function Z(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Z=function(){return e},e}function q(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function X(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function J(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){X(o,r,a,i,l,"next",e)}function l(e){X(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Q(){return(Q=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}).apply(this,arguments)}function ee(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var te=[w.Step.PAYMENT_TYPE,w.Step.REVIEW,w.Step.CONFIRM],ne=[].concat(B.SHARED_ADD_PAYMENT_STEPS,[w.Step.REVIEW,w.Step.CONFIRM]),re=[].concat(B.SHARED_CREDIT_CARD_STEPS,[w.Step.REVIEW,w.Step.CONFIRM]),ae=[].concat(B.SHARED_PAYPAL_STEPS,[w.Step.REVIEW,w.Step.CONFIRM]),oe=[].concat(B.SHARED_PAYMENT_REQUEST_STEPS,[w.Step.REVIEW,w.Step.CONFIRM]);function ie(e){var t=e.premiumType,n=e.step,r=e.purchaseState,a=e.headerId,o=e.onClose,i=t===Y.PremiumTypes.TIER_1,l=i?M.default:b.default;return ee(N.ModalHeader,{className:t===Y.PremiumTypes.TIER_1?K.default.headerTier1:K.default.headerTier2,separator:!1,id:a},void 0,ee("div",{className:K.default.headerAnimationWrapper},void 0,ee(i?H.PremiumModalHeaderAnimationTier1:H.PremiumModalHeaderAnimationTier2,{className:K.default.headerAnimation,currentStep:n,purchaseState:r})),ee("div",{className:K.default.headerLogo},void 0,ee(C.default,{className:K.default.headerLogoWordmark}),ee(l,{className:i?K.default.headerLogoTier1:K.default.headerLogoTier2})),ee(N.ModalCloseButton,{hideOnFullscreen:!0,className:K.default.closeButton,onClick:o}))}function le(e){var t=e.hasEntitlements,n=e.plan,r=e.hasAcceptedTerms,o=e.paymentSource,l=e.isGift,u=e.setPurchaseState,s=e.onNext,d=e.legalTermsNodeRef,p=e.flashLegalTerms,v=e.trialId,y=a.useState(!1),m=y[0],_=y[1],h=l?z.default.Messages.PAYMENT_MODAL_BUTTON_PREMIUM_GIFT:R.default.getBillingReviewSubheader(null,n.id),E=function(){null!=d.current&&(d.current.scrollIntoView({behavior:"smooth"}),p())};return ee(N.ModalFooter,{align:S.default.Align.CENTER},void 0,!r||!t&&null==o?ee(I.default,{text:r?z.default.Messages.BILLING_SELECT_PAYMENT_SOURCE_TOOLTIP:z.default.Messages.BILLING_ACCEPT_TERMS_TOOLTIP},void 0,(function(e){return a.createElement(g.default,Q({},e,{onClick:r?void 0:E,color:g.default.Colors.GREEN,type:"submit",disabled:r}),h)})):ee(g.default,{onClick:J(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_(!0),u(U.PurchaseState.PURCHASING),e.prev=2,!l){e.next=9;break}return(0,i.default)(null!=o,"Cannot purchase gift without payment source"),e.next=7,(0,c.purchaseSKU)(Y.PREMIUM_SUBSCRIPTION_APPLICATION,n.skuId,{expectedAmount:n.price,paymentSourceId:o.id,subscriptionPlanId:n.id,isGift:!0});case 7:e.next=11;break;case 9:return e.next=11,(0,f.subscribe)(n.id,null!=o?o.id:null,v);case 11:u(U.PurchaseState.COMPLETED),s(),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),u(U.PurchaseState.FAIL,e.t0);case 18:return e.prev=18,_(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[2,15,18,21]])}))),color:g.default.Colors.GREEN,submitting:m},void 0,h))}function ue(e){var t=e.planId,n=e.isGift,r=void 0!==n&&n,f=e.onClose,c=e.onComplete,v=e.transitionState,h=e.analyticsLocation,g=e.trialId,I=(0,B.useSharedPaymentModal)(),C=I.paymentSources,b=I.paymentSourceId,M=I.hasFetchedPaymentSources,A=I.setPaymentSourceId,H=I.creditCardState,z=I.setCreditCardState,$=I.tokenState,Z=I.setTokenState,q=I.billingAddressState,X=I.setBillingAddressState,J=I.isSubmittingCurrentStep,ue=I.setIsSubmittingCurrentStep,se=I.braintreeEmail,de=I.braintreeNonce,fe=I.paymentError,ce=I.paymentAuthenticationState,pe=I.purchaseError,ve=I.setPurchaseError,ye=I.purchaseErrorBlockRef,me=(0,T.useUID)(),_e=(0,s.useStateFromStores)([E.default],(function(){return E.default.getHardcoded(t)})),he=(0,s.useStateFromStores)([_.default],(function(){return _.default.getGiftCode(_e.skuId)})),Ee=(0,x.useSubscriptionEntitlements)(t,r),ge=Ee.hasEntitlements,Se=Ee.entitlements,Oe=Object.keys(C).length>0,Ie=a.useState(M?Oe||ge?w.Step.REVIEW:w.Step.PAYMENT_TYPE:null),Te=Ie[0],Ce=Ie[1],be=a.useRef(Te),Me=a.useState(Oe?te:ne),Ne=Me[0],Ae=Me[1];a.useEffect((function(){M&&(Ce(Oe||ge?w.Step.REVIEW:w.Step.PAYMENT_TYPE),Ae(Oe?te:ne))}),[M]);var Pe=a.useState(U.PurchaseState.WAITING),Re=Pe[0],Le=Pe[1],De=a.useState(!1),we=De[0],je=De[1],ke=[{planId:_e.id,quantity:1}],Ue=(0,k.useSubscriptionInvoicePreview)({items:ke,renewal:!0,preventFetch:r,trialId:g})[0],Ge=(0,k.useSubscriptionInvoicePreview)({items:ke,renewal:!1,preventFetch:r,applyEntitlements:!0,trialId:g})[0],Fe=(0,l.useLazyValue)((function(){return[u.default.v4(),Date.now()]})),Be=Fe[0],He=Fe[1],xe=(0,l.useStableMemo)((function(){return Date.now()}),[Te]),Ve=a.useRef(null),We=(0,y.default)(!1,j.LEGAL_TERMS_FLASH_DURATION),Ye=We[0],ze=We[1],Ke=null!=Ge?Ge.total:null!=Ue?Ue.total:_e.price,$e=null!=Ue?Ue.currency:_e.currency,Ze={load_id:Be,payment_type:"subscription",subscription_plan_gateway_plan_id:Y.SubscriptionPlanGatewayPlans[t],subscription_type:Y.SubscriptionTypes.PREMIUM,subscription_plan_id:_e.id,price:Ke,regular_price:_e.price,currency:$e,is_gift:r,location:h,eligible_for_trial:null!=g};a.useEffect((function(){null==Se&&(0,d.fetchUserEntitlementsForApplication)(Y.PREMIUM_SUBSCRIPTION_APPLICATION),P.default.track(Y.AnalyticEvents.PAYMENT_FLOW_STARTED,Ze)}),[]),a.useEffect((function(){var e=Date.now();P.default.track(Y.AnalyticEvents.PAYMENT_FLOW_STEP,Q({},Ze,{from_step:be.current,to_step:Te,step_duration_ms:e-xe,flow_duration_ms:e-He}))}),[Te]),null!=Te&&((0,D.setPaymentStepForAuthentication)(Te,ce,Ce),(0,w.setPurchaseStateForStep)(Te,Re,Le));var qe=function(e){be.current=Te,Ce(e),null!=pe&&ve(null)},Xe=function(e,t){if(Le(e),ve(t),e!==Re)if(e===U.PurchaseState.PURCHASING)P.default.track(Y.AnalyticEvents.PAYMENT_FLOW_COMPLETED,Q({},Ze,{duration_ms:Date.now()-He}));else if(e===U.PurchaseState.FAIL){var n=null!=b?C[b]:null;P.default.track(Y.AnalyticEvents.PAYMENT_FLOW_FAILED,Q({},Ze,{payment_gateway:null!=n?n.type===Y.PaymentSourceTypes.CARD?Y.PaymentGateways.STRIPE:Y.PaymentGateways.BRAINTREE:null,payment_source_id:null!=n?n.id:null,duration_ms:Date.now()-He}))}else e===U.PurchaseState.COMPLETED&&(null==c||c())},Je=function(){null==f||f(Re===U.PurchaseState.COMPLETED)};(0,m.default)(Je);var Qe=function(e){var t=e.body,n=e.footer,a=e.step,o=e.hideBreadcrumbs,i=void 0!==o&&o,l=e.isLoading,u=void 0!==l&&l;return ee(F.default,{steps:Ne,currentStep:a,paymentError:pe||fe,body:t,footer:n,isGift:r,hideBreadcrumbs:i,isLoading:u,purchaseErrorBlockRef:ye})},et=ee(p.default,{giftCode:he,subscriptionPlan:_e,onClose:Je}),tt=ee(W.default,{planId:t,onClose:Je}),nt=R.default.getPremiumType(t);return(0,i.default)(null!=nt,"Missing premium type"),ee(o.Elements,{options:Y.StripeElementsOptions,stripe:(0,L.ensureStripeV3IsLoaded)()},void 0,ee(O.default,{className:K.default.shaker,isShaking:Re===U.PurchaseState.PURCHASING,intensity:2},void 0,ee(N.ModalRoot,{className:K.default.root,transitionState:v,"aria-labelledby":me},void 0,ee(ie,{premiumType:nt,step:null!=Te?Te:w.Step.PAYMENT_TYPE,purchaseState:Re,headerId:me,onClose:Je}),ee("form",{className:K.default.contentWrapper,onSubmit:function(e){return e.preventDefault()}},void 0,M&&null!=Te?function(e){switch(e){case w.Step.PAYMENT_TYPE:case w.Step.CREDIT_CARD_INFORMATION:case w.Step.PAYPAL_INFORMATION:case w.Step.PAYMENT_REQUEST_INFORMATION:case w.Step.ADDRESS:case w.Step.AWAITING_AUTHENTICATION:var t=(0,B.renderPaymentModalStep)(e,qe,Ne,Ae,q,X,C,A,H,z,$,Z,J,ue,se,de,w.Step.REVIEW,re,ae,oe,ne),n=t.body,a=t.backStep,o=t.submitButton;return Qe({body:n,step:e,footer:null!=o||null!=a?ee(N.ModalFooter,{justify:S.default.Justify.BETWEEN,align:S.default.Align.CENTER},void 0,ee("div",{},void 0,o),null!=a?ee(G.default,{onClick:function(){return qe(a)}}):null):null});case w.Step.REVIEW:return Qe({body:ee(V.default,{paymentSources:C,paymentSourceId:b,plan:_e,isGift:r,proratedInvoicePreview:Ge,renewalInvoicePreview:Ue,onPaymentSourceChange:function(e){return A(null!=e?e.id:null)},handlePaymentSourceAdd:function(){return qe(w.Step.PAYMENT_TYPE)},setHasAcceptedTerms:je,legalTermsNodeRef:Ve,hasLegalTermsFlash:Ye,isTrial:null!=g}),footer:ee(le,{hasEntitlements:ge,plan:_e,hasAcceptedTerms:we,paymentSource:null!=b?C[b]:null,setPurchaseState:Xe,isGift:r,onNext:function(){return qe(w.Step.CONFIRM)},legalTermsNodeRef:Ve,flashLegalTerms:function(){return ze(!0)},trialId:g}),step:e});case w.Step.CONFIRM:return Qe({body:r?et:tt,footer:null,hideBreadcrumbs:!0,step:e});default:throw new Error("Unexpected step "+e)}}(Te):Qe({body:null,footer:null,isLoading:!0,step:w.Step.PAYMENT_TYPE})))))}ie.displayName="PremiumSubscriptionNewPlanModalHeader",le.displayName="ReviewStepFooter",ue.displayName="PremiumSubscriptionNewPlanModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch(e){case a.InternalTemplateCodes.CLASSROOM:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_CLASSROOM,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CLASSROOM,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_CLASSROOM,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CLASSROOM,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.LOCAL_COMMUNITIES:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_LOCAL_COMMUNITIES,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_LOCAL_COMMUNITIES,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_LOCAL_COMMUNITIES,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_LOCAL_COMMUNITIES,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.CREATORS_HOBBIES:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_CREATORS_HOBBIES,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CREATORS_HOBBIES,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_CREATORS_HOBBIES,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CREATORS_HOBBIES,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.GLOBAL_COMMUNITIES:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_GLOBAL_COMMUNITIES,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_GLOBAL_COMMUNITIES,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_GLOBAL_COMMUNITIES,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_GLOBAL_COMMUNITIES,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.FRIENDS_FAMILY:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_FRIENDS_FAMILY,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_FRIENDS_FAMILY,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_FRIENDS_FAMILY,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_FRIENDS_FAMILY,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.STUDY_GROUPS:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_STUDY_GROUPS,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_STUDY_GROUPS,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_STUDY_GROUPS,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_STUDY_GROUPS,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.CREATE_FROM_SCRATCH:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_CREATE_FROM_SCRATCH,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CREATE_FROM_SCRATCH,nameLabel:o.default.Messages.GUILD_TEMPLATES_FORM_LABEL_SERVER_NAME_CREATE_FROM_SCRATCH,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CREATE_FROM_SCRATCH,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.CAMPUS_CLUBS:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_CAMPUS_CLUBS,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_CAMPUS_CLUBS,nameLabel:o.default.Messages.FORM_LABEL_SERVER_NAME,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.GUILD_TEMPLATE_DEFAULT_SERVER_NAME_CAMPUS_CLUBS,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.LEAGUE_CLUBS:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_LEAGUE_CLUBS,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_LEAGUE_CLUBS,nameLabel:o.default.Messages.FORM_LABEL_SERVER_NAME,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT,author:o.default.Messages.DISCORD_NAME};case a.InternalTemplateCodes.GITHUB_HACKATHON:return{header:o.default.Messages.GUILD_TEMPLATE_MODAL_TITLE_GITHUB_HACKATHON,description:o.default.Messages.GUILD_TEMPLATE_MODAL_DESCRIPTION_GITHUB_HACKATHON,nameLabel:o.default.Messages.FORM_LABEL_SERVER_NAME,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT,author:"GitHub Education"};default:return{header:o.default.Messages.GUILD_TEMPLATE_CREATE_DISCORD,nameLabel:o.default.Messages.FORM_LABEL_SERVER_NAME,terms:o.default.Messages.CREATE_SERVER_GUIDELINES,defaultName:o.default.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT}}};var r,a=n(296),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e){e.exports=JSON.parse('[{"alpha2":"AF","code":"+93","name":"Afghanistan"},{"alpha2":"AL","code":"+355","name":"Albania"},{"alpha2":"DZ","code":"+213","name":"Algeria"},{"alpha2":"AS","code":"+1 684","name":"American Samoa"},{"alpha2":"AD","code":"+376","name":"Andorra"},{"alpha2":"AO","code":"+244","name":"Angola"},{"alpha2":"AI","code":"+1 264","name":"Anguilla"},{"alpha2":"AG","code":"+1 268","name":"Antigua and Barbuda"},{"alpha2":"AR","code":"+54","name":"Argentina"},{"alpha2":"AM","code":"+374","name":"Armenia"},{"alpha2":"AW","code":"+297","name":"Aruba"},{"alpha2":"AC","code":"+247","name":"Ascension"},{"alpha2":"AU","code":"+61","name":"Australia"},{"alpha2":"AT","code":"+43","name":"Austria"},{"alpha2":"AZ","code":"+994","name":"Azerbaijan"},{"alpha2":"BS","code":"+1 242","name":"Bahamas"},{"alpha2":"BH","code":"+973","name":"Bahrain"},{"alpha2":"BD","code":"+880","name":"Bangladesh"},{"alpha2":"BB","code":"+1 246","name":"Barbados"},{"alpha2":"BY","code":"+375","name":"Belarus"},{"alpha2":"BE","code":"+32","name":"Belgium"},{"alpha2":"BZ","code":"+501","name":"Belize"},{"alpha2":"BJ","code":"+229","name":"Benin"},{"alpha2":"BM","code":"+1 441","name":"Bermuda"},{"alpha2":"BT","code":"+975","name":"Bhutan"},{"alpha2":"BO","code":"+591","name":"Bolivia"},{"alpha2":"BA","code":"+387","name":"Bosnia and Herzegovina"},{"alpha2":"BW","code":"+267","name":"Botswana"},{"alpha2":"BR","code":"+55","name":"Brazil"},{"alpha2":"IO","code":"+246","name":"British Indian Ocean Territory"},{"alpha2":"VG","code":"+1 284","name":"British Virgin Islands"},{"alpha2":"BN","code":"+673","name":"Brunei"},{"alpha2":"BG","code":"+359","name":"Bulgaria"},{"alpha2":"BF","code":"+226","name":"Burkina Faso"},{"alpha2":"BI","code":"+257","name":"Burundi"},{"alpha2":"KH","code":"+855","name":"Cambodia"},{"alpha2":"CM","code":"+237","name":"Cameroon"},{"alpha2":"CA","code":"+1","name":"Canada"},{"alpha2":"CV","code":"+238","name":"Cape Verde"},{"alpha2":"KY","code":"+1 345","name":"Cayman Islands"},{"alpha2":"CF","code":"+236","name":"Central African Republic"},{"alpha2":"TD","code":"+235","name":"Chad"},{"alpha2":"CL","code":"+56","name":"Chile"},{"alpha2":"CN","code":"+86","name":"China"},{"alpha2":"CX","code":"+61","name":"Christmas Island"},{"alpha2":"CC","code":"+61","name":"Cocos-Keeling Islands"},{"alpha2":"CO","code":"+57","name":"Colombia"},{"alpha2":"KM","code":"+269","name":"Comoros"},{"alpha2":"CG","code":"+242","name":"Congo"},{"alpha2":"CD","code":"+243","name":"Congo, Dem. Rep. of (Zaire)"},{"alpha2":"CK","code":"+682","name":"Cook Islands"},{"alpha2":"CR","code":"+506","name":"Costa Rica"},{"alpha2":"HR","code":"+385","name":"Croatia"},{"alpha2":"CU","code":"+53","name":"Cuba"},{"alpha2":"CW","code":"+599","name":"Curacao"},{"alpha2":"CY","code":"+357","name":"Cyprus"},{"alpha2":"CZ","code":"+420","name":"Czech Republic"},{"alpha2":"DK","code":"+45","name":"Denmark"},{"alpha2":"DG","code":"+246","name":"Diego Garcia"},{"alpha2":"DJ","code":"+253","name":"Djibouti"},{"alpha2":"DM","code":"+1 767","name":"Dominica"},{"alpha2":"DO","code":"+1 809","name":"Dominican Republic"},{"alpha2":"DO","code":"+1 829","name":"Dominican Republic"},{"alpha2":"DO","code":"+1 849","name":"Dominican Republic"},{"alpha2":"TP","code":"+670","name":"East Timor"},{"alpha2":"EC","code":"+593","name":"Ecuador"},{"alpha2":"EG","code":"+20","name":"Egypt"},{"alpha2":"SV","code":"+503","name":"El Salvador"},{"alpha2":"GQ","code":"+240","name":"Equatorial Guinea"},{"alpha2":"ER","code":"+291","name":"Eritrea"},{"alpha2":"EE","code":"+372","name":"Estonia"},{"alpha2":"ET","code":"+251","name":"Ethiopia"},{"alpha2":"FK","code":"+500","name":"Falkland Islands"},{"alpha2":"FO","code":"+298","name":"Faroe Islands"},{"alpha2":"FJ","code":"+679","name":"Fiji"},{"alpha2":"FI","code":"+358","name":"Finland"},{"alpha2":"FR","code":"+33","name":"France"},{"alpha2":"GF","code":"+594","name":"French Guiana"},{"alpha2":"PF","code":"+689","name":"French Polynesia"},{"alpha2":"GA","code":"+241","name":"Gabon"},{"alpha2":"GM","code":"+220","name":"Gambia"},{"alpha2":"GE","code":"+995","name":"Georgia"},{"alpha2":"DE","code":"+49","name":"Germany"},{"alpha2":"GH","code":"+233","name":"Ghana"},{"alpha2":"GI","code":"+350","name":"Gibraltar"},{"alpha2":"GR","code":"+30","name":"Greece"},{"alpha2":"GL","code":"+299","name":"Greenland"},{"alpha2":"GD","code":"+1 473","name":"Grenada"},{"alpha2":"GP","code":"+590","name":"Guadeloupe"},{"alpha2":"GU","code":"+1 671","name":"Guam"},{"alpha2":"GT","code":"+502","name":"Guatemala"},{"alpha2":"GN","code":"+224","name":"Guinea"},{"alpha2":"GW","code":"+245","name":"Guinea-Bissau"},{"alpha2":"GY","code":"+592","name":"Guyana"},{"alpha2":"HT","code":"+509","name":"Haiti"},{"alpha2":"HN","code":"+504","name":"Honduras"},{"alpha2":"HK","code":"+852","name":"Hong Kong SAR China"},{"alpha2":"HU","code":"+36","name":"Hungary"},{"alpha2":"IS","code":"+354","name":"Iceland"},{"alpha2":"IN","code":"+91","name":"India"},{"alpha2":"ID","code":"+62","name":"Indonesia"},{"alpha2":"IR","code":"+98","name":"Iran"},{"alpha2":"IQ","code":"+964","name":"Iraq"},{"alpha2":"IE","code":"+353","name":"Ireland"},{"alpha2":"IL","code":"+972","name":"Israel"},{"alpha2":"IT","code":"+39","name":"Italy"},{"alpha2":"CI","code":"+225","name":"Ivory Coast"},{"alpha2":"JM","code":"+1 876","name":"Jamaica"},{"alpha2":"JP","code":"+81","name":"Japan"},{"alpha2":"JO","code":"+962","name":"Jordan"},{"alpha2":"KZ","code":"+7","name":"Kazakhstan"},{"alpha2":"KE","code":"+254","name":"Kenya"},{"alpha2":"KI","code":"+686","name":"Kiribati"},{"alpha2":"XK","code":"+383","name":"Kosovo"},{"alpha2":"KW","code":"+965","name":"Kuwait"},{"alpha2":"KG","code":"+996","name":"Kyrgyzstan"},{"alpha2":"LA","code":"+856","name":"Laos"},{"alpha2":"LV","code":"+371","name":"Latvia"},{"alpha2":"LB","code":"+961","name":"Lebanon"},{"alpha2":"LS","code":"+266","name":"Lesotho"},{"alpha2":"LR","code":"+231","name":"Liberia"},{"alpha2":"LY","code":"+218","name":"Libya"},{"alpha2":"LI","code":"+423","name":"Liechtenstein"},{"alpha2":"LT","code":"+370","name":"Lithuania"},{"alpha2":"LU","code":"+352","name":"Luxembourg"},{"alpha2":"MO","code":"+853","name":"Macau SAR China"},{"alpha2":"MK","code":"+389","name":"North Macedonia"},{"alpha2":"MG","code":"+261","name":"Madagascar"},{"alpha2":"MW","code":"+265","name":"Malawi"},{"alpha2":"MY","code":"+60","name":"Malaysia"},{"alpha2":"MV","code":"+960","name":"Maldives"},{"alpha2":"ML","code":"+223","name":"Mali"},{"alpha2":"MT","code":"+356","name":"Malta"},{"alpha2":"MH","code":"+692","name":"Marshall Islands"},{"alpha2":"MQ","code":"+596","name":"Martinique"},{"alpha2":"MR","code":"+222","name":"Mauritania"},{"alpha2":"MU","code":"+230","name":"Mauritius"},{"alpha2":"YT","code":"+262","name":"Mayotte"},{"alpha2":"MX","code":"+52","name":"Mexico"},{"alpha2":"FM","code":"+691","name":"Micronesia"},{"alpha2":"MI","code":"+1 808","name":"Midway Island"},{"alpha2":"MD","code":"+373","name":"Moldova"},{"alpha2":"MC","code":"+377","name":"Monaco"},{"alpha2":"MN","code":"+976","name":"Mongolia"},{"alpha2":"ME","code":"+382","name":"Montenegro"},{"alpha2":"MS","code":"+1664","name":"Montserrat"},{"alpha2":"MA","code":"+212","name":"Morocco"},{"alpha2":"MZ","code":"+258","name":"Mozambique"},{"alpha2":"MM","code":"+95","name":"Myanmar"},{"alpha2":"NA","code":"+264","name":"Namibia"},{"alpha2":"NR","code":"+674","name":"Nauru"},{"alpha2":"NP","code":"+977","name":"Nepal"},{"alpha2":"NL","code":"+31","name":"Netherlands"},{"alpha2":"AN","code":"+599","name":"Netherlands Antilles"},{"alpha2":"KN","code":"+1 869","name":"Nevis"},{"alpha2":"NC","code":"+687","name":"New Caledonia"},{"alpha2":"NZ","code":"+64","name":"New Zealand"},{"alpha2":"NI","code":"+505","name":"Nicaragua"},{"alpha2":"NE","code":"+227","name":"Niger"},{"alpha2":"NG","code":"+234","name":"Nigeria"},{"alpha2":"NU","code":"+683","name":"Niue"},{"alpha2":"NF","code":"+672","name":"Norfolk Island"},{"alpha2":"KP","code":"+850","name":"North Korea"},{"alpha2":"MP","code":"+1 670","name":"Northern Mariana Islands"},{"alpha2":"NO","code":"+47","name":"Norway"},{"alpha2":"OM","code":"+968","name":"Oman"},{"alpha2":"PK","code":"+92","name":"Pakistan"},{"alpha2":"PW","code":"+680","name":"Palau"},{"alpha2":"PS","code":"+970","name":"Palestinian Territory"},{"alpha2":"PA","code":"+507","name":"Panama"},{"alpha2":"PG","code":"+675","name":"Papua New Guinea"},{"alpha2":"PY","code":"+595","name":"Paraguay"},{"alpha2":"PE","code":"+51","name":"Peru"},{"alpha2":"PH","code":"+63","name":"Philippines"},{"alpha2":"PL","code":"+48","name":"Poland"},{"alpha2":"PT","code":"+351","name":"Portugal"},{"alpha2":"PR","code":"+1 787","name":"Puerto Rico"},{"alpha2":"QA","code":"+974","name":"Qatar"},{"alpha2":"RE","code":"+262","name":"Reunion"},{"alpha2":"RO","code":"+40","name":"Romania"},{"alpha2":"RU","code":"+7","name":"Russia"},{"alpha2":"RW","code":"+250","name":"Rwanda"},{"alpha2":"PM","code":"+508","name":"Saint Pierre and Miquelon"},{"alpha2":"WS","code":"+685","name":"Samoa"},{"alpha2":"SM","code":"+378","name":"San Marino"},{"alpha2":"SA","code":"+966","name":"Saudi Arabia"},{"alpha2":"SN","code":"+221","name":"Senegal"},{"alpha2":"RS","code":"+381","name":"Serbia"},{"alpha2":"SC","code":"+248","name":"Seychelles"},{"alpha2":"SL","code":"+232","name":"Sierra Leone"},{"alpha2":"SG","code":"+65","name":"Singapore"},{"alpha2":"SX","code":"+1721","name":"Sint Maarten"},{"alpha2":"SK","code":"+421","name":"Slovakia"},{"alpha2":"SI","code":"+386","name":"Slovenia"},{"alpha2":"SB","code":"+677","name":"Solomon Islands"},{"alpha2":"SO","code":"+252","name":"Somalia"},{"alpha2":"ZA","code":"+27","name":"South Africa"},{"alpha2":"GS","code":"+500","name":"South Georgia and the South Sandwich Islands"},{"alpha2":"KR","code":"+82","name":"South Korea"},{"alpha2":"ES","code":"+34","name":"Spain"},{"alpha2":"LK","code":"+94","name":"Sri Lanka"},{"alpha2":"SD","code":"+249","name":"Sudan"},{"alpha2":"SR","code":"+597","name":"Suriname"},{"alpha2":"SZ","code":"+268","name":"Swaziland"},{"alpha2":"SE","code":"+46","name":"Sweden"},{"alpha2":"CH","code":"+41","name":"Switzerland"},{"alpha2":"SY","code":"+963","name":"Syria"},{"alpha2":"TW","code":"+886","name":"Taiwan"},{"alpha2":"TJ","code":"+992","name":"Tajikistan"},{"alpha2":"TZ","code":"+255","name":"Tanzania"},{"alpha2":"TH","code":"+66","name":"Thailand"},{"alpha2":"TL","code":"+670","name":"Timor Leste"},{"alpha2":"TG","code":"+228","name":"Togo"},{"alpha2":"TK","code":"+690","name":"Tokelau"},{"alpha2":"TO","code":"+676","name":"Tonga"},{"alpha2":"TT","code":"+1 868","name":"Trinidad and Tobago"},{"alpha2":"TN","code":"+216","name":"Tunisia"},{"alpha2":"TR","code":"+90","name":"Turkey"},{"alpha2":"TM","code":"+993","name":"Turkmenistan"},{"alpha2":"TC","code":"+1 649","name":"Turks and Caicos Islands"},{"alpha2":"TV","code":"+688","name":"Tuvalu"},{"alpha2":"VI","code":"+1 340","name":"U.S. Virgin Islands"},{"alpha2":"UG","code":"+256","name":"Uganda"},{"alpha2":"UA","code":"+380","name":"Ukraine"},{"alpha2":"AE","code":"+971","name":"United Arab Emirates"},{"alpha2":"GB","code":"+44","name":"United Kingdom"},{"alpha2":"US","code":"+1","name":"United States"},{"alpha2":"UY","code":"+598","name":"Uruguay"},{"alpha2":"UZ","code":"+998","name":"Uzbekistan"},{"alpha2":"VU","code":"+678","name":"Vanuatu"},{"alpha2":"VE","code":"+58","name":"Venezuela"},{"alpha2":"VN","code":"+84","name":"Vietnam"},{"alpha2":"WK","code":"+1 808","name":"Wake Island"},{"alpha2":"WF","code":"+681","name":"Wallis and Futuna"},{"alpha2":"YE","code":"+967","name":"Yemen"},{"alpha2":"ZM","code":"+260","name":"Zambia"},{"alpha2":"ZW","code":"+263","name":"Zimbabwe"}]')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUnsupportedExternalSubscriptionModalHandler=function(e,t,n){r.useEffect((function(){null!=e&&e.isPurchasedExternally&&null!=e.paymentGateway&&!n&&(i.default.show({title:d.default.Messages.BILLING_EXTERNAL_HEADER.format({paymentGatewayName:a.PaymentGatewayToFriendlyName[e.paymentGateway]}),body:d.default.Messages.BILLING_EXTERNAL_MANAGE_ELSEWHERE.format({paymentGatewayName:a.PaymentGatewayToFriendlyName[e.paymentGateway],subscriptionManagementLink:(0,s.getExternalSubscriptionMethodUrl)(e.paymentGateway,"SUBSCRIPTION_MANAGEMENT")}),confirmText:d.default.Messages.OKAY}),t())}),[e])},t.useSubscriptionEntitlements=function(e,t){var n=(0,o.useStateFromStores)([l.default],(function(){return l.default.getHardcoded(e)})),r=(0,o.useStateFromStores)([u.default],(function(){var e;return Array.from(null!==(e=u.default.getForSku(n.skuId))&&void 0!==e?e:[])})).filter((function(e){var t=e.parentId,n=e.consumed;return null!=t&&!n}));return{hasEntitlements:!t&&null!=r&&r.length>=s.default.getIntervalMonths(n.interval,n.intervalCount),entitlements:r}};var r=p(n(0)),a=n(92),o=n(3),i=f(n(154)),l=f(n(257)),u=f(n(5826)),s=p(n(96)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},,function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=B(n(0)),o=G(n(9)),i=n(394),l=n(3),u=G(n(363)),s=n(1152),d=G(n(6014)),f=G(n(1177)),c=G(n(5963)),p=G(n(5834)),v=G(n(5975)),y=G(n(5976)),m=n(5687),_=G(n(11)),h=G(n(1183)),E=G(n(5947)),g=G(n(55)),S=B(n(475)),O=G(n(466)),I=n(41),T=G(n(24)),C=G(n(13)),b=n(1188),M=n(121),N=n(299),A=G(n(5992)),P=G(n(5977)),R=B(n(5961)),L=G(n(6028)),D=G(n(5978)),w=n(1),j=G(n(6)),k=G(n(6106)),U=G(n(370));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function V(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){V(o,r,a,i,l,"next",e)}function l(e){V(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var K=x(S.AuthSpinner,{}),$=x(R.InviteResolvingHeader,{}),Z=function(e){var t,r;function l(t){var n;(n=e.call(this,t)||this).handleAuthToken=function(){var e=W(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.default.loginToken(t,!1);case 2:C.default.track(w.AnalyticEvents.LOGIN_SUCCESSFUL,{source:w.LoginSuccessfulSources.QR_CODE,login_source:n.loginSource,gift_code_sku_id:n.giftCodeSKUId,is_new_user:!1});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.setLoginRef=function(e){n.loginRef=e},n.setPasswordRef=function(e){n.passwordRef=e},n.setCodeRef=function(e){n.codeRef=e},n.getFullLogin=function(){var e=n.state;return e.loginPrefix+e.login},n.renderError=function(e){var t=n.props.errors;if(n.hasError(e)){var r=t[e];return Array.isArray(r)?r[0]:r}return null},n.handleLogin=function(e){var t=n.state,r=t.password,a=t.captchaKey,o=t.undelete;null!=e&&e.preventDefault(),n.setState({captchaCallback:n.handleLogin,captchaKey:null}),u.default.login({login:n.getFullLogin(),password:r,undelete:o,captchaKey:a,source:n.loginSource,giftCodeSKUId:n.giftCodeSKUId,invite:n.props.invite}),M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE)},n.handleIPAuthorize=function(){var e=W(regeneratorRuntime.mark((function e(t){var r,a,o,i,l,s,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.state,a=r.password,o=r.captchaKey,i=r.undelete,n.setState({phoneVerifyError:null,captchaKey:null}),l=n.getFullLogin(),e.prev=3,e.next=6,p.default.verifyPhone(l,t,!1);case 6:return s=e.sent,d=s.token,e.next=10,u.default.authorizeIPAddress(d);case 10:u.default.login({login:l,password:a,undelete:i,captchaKey:o,source:n.loginSource,giftCodeSKUId:n.giftCodeSKUId}),M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),null!=e.t0.body&&null!=e.t0.body.message&&n.setState({phoneVerifyError:e.t0.body.message});case 17:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t){return e.apply(this,arguments)}}(),n.handlePasswordReset=function(){var e=W(regeneratorRuntime.mark((function e(t){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.props.transitionTo,n.setState({phoneVerifyError:null}),e.prev=2,e.next=5,p.default.verifyPhone(n.getFullLogin(),t,!1);case 5:a=e.sent,o=a.token,r(w.Routes.RESET,{search:(0,i.stringify)({token:o,from_login:"true"})}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),null!=e.t0.body&&null!=e.t0.body.message&&n.setState({phoneVerifyError:e.t0.body.message});case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}(),n.handleTokenSubmit=function(e){var t=n.state.code,r=n.props.mfaTicket;null!=e&&e.preventDefault(),u.default.loginMFA({code:t.replace(/ /g,""),ticket:r,source:n.loginSource,giftCodeSKUId:n.giftCodeSKUId}),M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE)},n.handleSMSTokenSubmit=function(e){var t=n.state.smsCode,r=n.props.mfaTicket;null!=e&&e.preventDefault(),u.default.loginSMS({code:t.replace(/ /g,""),ticket:r}),M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE)},n.handleToggleSMSLogin=function(e){var t=n.props.mfaTicket;null!=e&&e.preventDefault(),u.default.requestSMSToken(t),M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE)},n.handleForgotPassword=function(){var e=W(regeneratorRuntime.mark((function e(t){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null!=t&&t.preventDefault(),null!=n.loginRef&&n.loginRef.focus(),r=n.getFullLogin(),o=n.state.captchaKey,n.setState({captchaCallback:n.handleForgotPassword,captchaKey:null}),e.prev=5,M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE),e.next=9,u.default.forgotPassword(r,o);case 9:(0,I.openModal)((function(e){return a.createElement(O.default,H({header:j.default.Messages.EMAIL_VERIFICATION_INSTRUCTIONS_HEADER,confirmText:j.default.Messages.OKAY,confirmButtonColor:S.Button.Colors.BRAND,className:N.isMobile?k.default.mobile:""},e),x(T.default,{size:T.default.Sizes.SIZE_16},void 0,j.default.Messages.EMAIL_VERIFICATION_INSTRUCTIONS_BODY.format({email:r})))})),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(5);case 14:case"end":return e.stop()}}),e,null,[[5,12]])})));return function(t){return e.apply(this,arguments)}}(),n.handleResendCode=function(){p.default.resendCode(n.getFullLogin())},n.handleReset=function(e){null!=e&&e.preventDefault(),u.default.loginReset(),n.setState({password:"",loginPrefix:"",login:"",code:"",smsCode:"",captchaKey:null,undelete:!1,checkingHandoff:!1})},n.handleCancelAccountDeletion=function(){n.setState({undelete:!0},n.handleLogin)},n.handleCaptchaVerify=function(e){var t=n.state.captchaCallback;n.setState({captchaKey:e},t)},n.handleGotoRegister=function(){var e=n.state.login,t=n.props,r=t.invite,a=t.giftCode,o=t.closeLogin,l=t.openRegister,s=t.guildTemplate,d=t.location,f=t.transitionTo,c=t.redirectTo;if(t.isGuest)return void 0!==o&&o(),void(void 0!==l&&l());var p,v=null!=d?(0,i.parse)(d.search):{};""!==e&&(v.email=e),null!=r?(v.mode="register",p=w.Routes.INVITE(r.code)):null!=a?(v.mode="register",p=w.Routes.GIFT_CODE(a.code)):null!=s?p=w.Routes.GUILD_TEMPLATE(s.code):null!=c?(p=w.Routes.REGISTER,v.redirect_to=c):p=w.Routes.REGISTER,u.default.loginReset(),f(p,{search:(0,i.stringify)(v)}),M.ComponentDispatch.dispatch(w.ComponentActions.WAVE_EMPHASIZE)};var r=null!=t.location?(0,i.parse)(t.location.search):{};return n.state={redirecting:t.authenticated,checkingHandoff:t.handoffAvailable,loginPrefix:"",login:r.email||r.login||"",password:"",code:"",smsCode:"",captchaKey:null,captchaCallback:n.handleLogin,undelete:!1,phoneVerifyError:null},n}r=e,(t=l).prototype=Object.create(r.prototype),t.prototype.constructor=t,z(t,r),l.getDerivedStateFromProps=function(e){var t=e.handoffAvailable,n=e.authenticated;return t||n?null:{checkingHandoff:!1}};var v,h,E,G=l.prototype;return G.componentDidMount=function(){var e=this.props,t=e.handoffAvailable,n=e.authenticated,r=e.giftCodeSKU,a=e.invite,o=e.location;t&&!n?(0,s.handoffBegin)():n&&this.loginOrSSO(n,o,!0),C.default.track(w.AnalyticEvents.LOGIN_VIEWED,H({location:null!=a?"Invite Login Page":"Non-Invite Login Page",login_source:this.loginSource},null!=r?(0,f.default)(r,!1,!1):{}),{flush:!0}),u.default.getLocationMetadata(),(0,m.trackAppUIViewed)("login")},G.componentDidUpdate=function(e){var t,n=this.props,r=n.authenticated,a=n.location,o=this.state.checkingHandoff;if(!r||e.authenticated||o||this.loginOrSSO(r,a),e.errors!==this.props.errors)if(this.hasError("password"))null===(t=this.passwordRef)||void 0===t||t.focus();else if(this.hasError("email")||this.hasError("login")){var i;null===(i=this.loginRef)||void 0===i||i.focus()}else if(this.hasError("code")){var l;null===(l=this.codeRef)||void 0===l||l.focus()}},G.loginOrSSO=function(e,t,n){var r=this;void 0===n&&(n=!1);var a=this.props.isGuest;e&&(null!=t||a)&&(n?u.default.verifySSOToken().then((function(){return r.transitionSSO(t)})):this.transitionSSO(t))},G.transitionSSO=function(e){var t=this.props,r=t.transitionTo,a=t.redirectTo;if(t.isGuest&&null!=a)r(a);else{var o=null!=e?(0,i.parse)(e.search):{},l=(o.redirect_to,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(o,["redirect_to"]));if(null!=a)a.startsWith(w.Routes.UPCOMING_STAGES(""))?n(42).transitionTo(a):r(a);else if(null==l.service)r(w.Routes.APP);else{var u=window.location.protocol+window.GLOBAL_ENV.API_ENDPOINT+w.Endpoints.SSO,s=H({},l,{token:_.default.getToken()});window.location=u+"?"+(0,i.stringify)(s)}}},G.hasError=function(e){return null!=this.props.errors[e]},G.renderHandOffAvailable=function(){var e=this.props.authBoxClassName;return x(S.default,{className:e},void 0,K,x(S.Title,{className:U.default.marginBottom8},void 0,j.default.Messages.BROWSER_HANDOFF_DETECTING_TITLE),x(S.SubTitle,{},void 0,j.default.Messages.AUTH_BROWSER_HANDOFF_DETECTING_DESCRIPTION))},G.renderHandOffContinue=function(){var e=this.props,t=e.user,n=e.transitionTo,r=e.authBoxClassName;return null==t?null:x(S.default,{className:r},void 0,x(S.Avatar,{src:t.getAvatarURL(void 0),size:S.Avatar.Sizes.DEPRECATED_SIZE_100,className:U.default.marginBottom20}),x(S.Title,{className:U.default.marginBottom8},void 0,j.default.Messages.BROWSER_HANDOFF_SUCCESS_TITLE.format({name:t.toString()})),x(S.SubTitle,{className:U.default.marginBottom40},void 0,j.default.Messages.BROWSER_HANDOFF_SUCCESS_BODY),x(S.Block,{},void 0,x(S.Button,{onClick:function(){return n(w.Routes.APP)},className:U.default.marginBottom8},void 0,j.default.Messages.BROWSER_HANDOFF_SUCCESS_ACTION.format({name:t.toString()})),x(S.Button,{look:S.Button.Looks.LINK,color:S.Button.Colors.LINK,onClick:this.handleReset},void 0,j.default.Messages.BROWSER_HANDOFF_SUCCESS_CANCEL)))},G.renderDisabledAccount=function(){var e=this.props.authBoxClassName,t=this.props.loginStatus===w.LoginStates.ACCOUNT_DISABLED,n=t?j.default.Messages.ACCOUNT_DISABLED_TITLE:j.default.Messages.ACCOUNT_SCHEDULED_FOR_DELETION_TITLE,r=t?j.default.Messages.ACCOUNT_DISABLED_DESCRIPTION:j.default.Messages.ACCOUNT_SCHEDULED_FOR_DELETION_DESCRIPTION;return x(S.default,{tag:"form",onSubmit:this.handleReset,className:e},void 0,x(S.Title,{className:U.default.marginBottom8},void 0,n),x(S.SubTitle,{className:U.default.marginBottom20},void 0,r),x(S.Block,{},void 0,x(S.Button,{color:S.Button.Colors.BRAND,type:"submit"},void 0,j.default.Messages.RETURN_TO_LOGIN),x("div",{className:(0,o.default)(U.default.marginTop8,k.default.needAccount)},void 0,j.default.Messages.ACCOUNT_SCHEDULED_FOR_DELETION_CANCEL.format({onClick:this.handleCancelAccountDeletion}))))},G.renderResolving=function(){var e=this,t=this.props,n=t.authBoxClassName,r=t.country;return x(S.default,{className:n},void 0,$,x(S.Block,{className:U.default.marginTop20},void 0,x(y.default,{className:U.default.marginBottom20,alpha2:r.alpha2,countryCode:r.code.split(" ")[0],label:j.default.Messages.FORM_LABEL_EMAIL_OR_PHONE_NUMBER,onChange:function(t,n){return e.setState({login:t,loginPrefix:n})},setRef:this.setLoginRef,autoComplete:"off",spellCheck:"false",value:this.state.login,autoFocus:!0}),x(S.Input,{className:U.default.marginBottom20,label:j.default.Messages.FORM_LABEL_PASSWORD,onChange:function(t){return e.setState({password:t})},type:"password",setRef:this.setPasswordRef,autoComplete:"off",spellCheck:"false",value:this.state.password}),x(S.Button,{className:U.default.marginBottom8,type:"submit",disabled:!0},void 0,j.default.Messages.LOGIN),x(S.Button,{disabled:!0,look:S.Button.Looks.LINK,color:S.Button.Colors.LINK},void 0,j.default.Messages.FORGOT_PASSWORD),x(S.Button,{disabled:!0,className:U.default.marginTop4,look:S.Button.Looks.LINK,color:S.Button.Colors.LINK},void 0,j.default.Messages.NEED_ACCOUNT)))},G.renderDefaultForm=function(e){var t,n,r=this,i=this.props,l=i.invite,u=i.giftCode,s=i.loginStatus,d=i.isGuest,f=i.country,c=!this.hasError("email")&&this.hasError("password"),p=null!=(null==l?void 0:l.stage_instance);return n=null==l||null==l.channel||p?null!=u?x(P.default,{giftCode:u}):d?null:x(a.Fragment,{},void 0,x(S.Title,{className:U.default.marginBottom8},"title",j.default.Messages.LOGIN_TITLE),x(S.SubTitle,{},"subtitle",j.default.Messages.AUTH_LOGIN_BODY)):x(R.default,{invite:l}),x(g.default,{direction:g.default.Direction.HORIZONTAL,align:g.default.Align.CENTER},void 0,x("div",{className:k.default.mainLoginContainer},void 0,n,x(S.Block,{className:U.default.marginTop20},void 0,x(y.default,{alpha2:f.alpha2,countryCode:f.code.split(" ")[0],className:U.default.marginBottom20,label:j.default.Messages.FORM_LABEL_EMAIL_OR_PHONE_NUMBER,error:null!==(t=this.renderError("login"))&&void 0!==t?t:this.renderError("email"),onChange:function(e,t){return r.setState({login:e,loginPrefix:t})},setRef:this.setLoginRef,autoComplete:"off",spellCheck:"false",value:this.state.login,autoFocus:!c}),x(S.Input,{label:j.default.Messages.FORM_LABEL_PASSWORD,error:this.renderError("password"),onChange:function(e){return r.setState({password:e})},name:"password",type:"password",setRef:this.setPasswordRef,autoComplete:"off",spellCheck:"false",autoFocus:c,value:this.state.password}),x(S.Button,{onClick:this.handleForgotPassword,look:S.Button.Looks.LINK,color:S.Button.Colors.LINK,className:(0,o.default)(U.default.marginBottom20,U.default.marginTop4)},void 0,j.default.Messages.FORGOT_PASSWORD),x(S.Button,{type:"submit",submitting:s===w.LoginStates.LOGGING_IN,color:p?S.Button.Colors.GREEN:S.Button.Colors.BRAND,className:U.default.marginBottom8},void 0,p?j.default.Messages.LOGIN_STAGE:j.default.Messages.LOGIN),x("div",{className:U.default.marginTop4},void 0,x("span",{className:k.default.needAccount},void 0,j.default.Messages.NEED_ACCOUNT),x(S.Button,{onClick:this.handleGotoRegister,look:S.Button.Looks.LINK,color:S.Button.Colors.LINK,className:k.default.smallRegisterLink},void 0,j.default.Messages.REGISTER)))),e?x(L.default,{authTokenCallback:this.handleAuthToken}):null)},G.renderDefault=function(){var e=this.props,t=e.authBoxClassName,n=e.isGuest;return x("div",{className:k.default.pageContainer},void 0,x(S.default,{onSubmit:this.handleLogin,tag:"form",className:t,expanded:!0},void 0,this.renderDefaultForm(!n)))},G.renderGuildTemplate=function(e){var t=this,n=x(c.default,{guildTemplate:e});return x(D.default,{onSubmit:this.handleLogin,tag:"form",className:(0,o.default)(this.props.authBoxClassName,k.default.horizontalAuthBox)},void 0,(function(){return[n,t.renderDefaultForm(!1)]}))},G.renderMFA=function(){var e=this,t=this.props,r=t.loginStatus,a=t.mfaSMS,o=t.authBoxClassName;return x(S.default,{onSubmit:this.handleTokenSubmit,tag:"form",className:o},void 0,x("img",{alt:"",src:n(5704),className:U.default.marginBottom20}),x(S.Title,{className:U.default.marginBottom8},void 0,j.default.Messages.TWO_FA),x(S.SubTitle,{},void 0,j.default.Messages.TWO_FA_ENTER_TOKEN_BODY),x(S.Block,{className:U.default.marginTop40},void 0,x(S.Input,{className:U.default.marginBottom20,error:this.renderError("code"),setRef:this.setCodeRef,onChange:function(t){return e.setState({code:t})},autoComplete:"off",placeholder:j.default.Messages.TWO_FA_AUTH_CODE,spellCheck:"false",maxLength:10,autoFocus:!0,label:j.default.Messages.TWO_FA_ENTER_TOKEN_LABEL,value:this.state.code},"totpCode"),x(S.Button,{type:"submit",submitting:r===w.LoginStates.LOGGING_IN_MFA},void 0,j.default.Messages.LOGIN),a?x(S.Button,{onClick:this.handleToggleSMSLogin,submitting:r===w.LoginStates.LOGGING_IN_MFA_SMS,className:U.default.marginTop8,look:S.Button.Looks.LINK,color:S.Button.Colors.LINK},void 0,j.default.Messages.MFA_SMS_RECEIVE_CODE):null,x(S.Button,{look:S.Button.Looks.LINK,color:S.Button.Colors.LINK,className:U.default.marginTop4,onClick:this.handleReset},void 0,j.default.Messages.TWO_FA_LOGIN_FOOTER)))},G.renderMFASMS=function(){var e=this,t=this.props,r=t.loginStatus,a=t.maskedPhone,o=t.authBoxClassName,i=r===w.LoginStates.LOGGING_IN_MFA_SMS||""===a;return x(S.default,{onSubmit:this.handleSMSTokenSubmit,tag:"form",className:o},void 0,x("img",{alt:"",src:n(5704),className:U.default.marginBottom20}),x(S.Title,{className:U.default.marginBottom8},void 0,j.default.Messages.TWO_FA),x(S.SubTitle,{className:U.default.marginBottom8},void 0,i?j.default.Messages.TWO_FA_ENTER_SMS_TOKEN_SENDING:j.default.Messages.TWO_FA_ENTER_SMS_TOKEN_SENT.format({phoneNumber:a})),x(S.Block,{className:U.default.marginTop40},void 0,x(S.Input,{className:U.default.marginBottom20,error:this.renderError("code"),setRef:this.setCodeRef,onChange:function(t){return e.setState({smsCode:t})},autoComplete:"off",placeholder:j.default.Messages.TWO_FA_AUTH_CODE,spellCheck:"false",maxLength:10,autoFocus:!0,label:j.default.Messages.TWO_FA_ENTER_SMS_TOKEN_LABEL,value:this.state.smsCode},"smsCode"),x(S.Button,{type:"submit",submitting:i,color:i?S.Button.Colors.TRANSPARENT:S.Button.Colors.BRAND},void 0,j.default.Messages.LOGIN),i?null:x(S.Button,{onClick:this.handleToggleSMSLogin,className:U.default.marginTop8,look:S.Button.Looks.LINK,color:S.Button.Colors.LINK},void 0,j.default.Messages.MFA_SMS_RESEND),x(S.Button,{look:S.Button.Looks.LINK,color:S.Button.Colors.LINK,className:U.default.marginTop4,onClick:this.handleReset},void 0,j.default.Messages.TWO_FA_LOGIN_FOOTER)))},G.renderIPAuthorization=function(){var e=this.props.authBoxClassName,t=this.state.phoneVerifyError;return x(S.default,{tag:"form",className:e},void 0,x(d.default,{title:j.default.Messages.PHONE_IP_AUTHORIZATION_TITLE,subtitle:j.default.Messages.PHONE_IP_AUTHORIZATION_SUBTITLE_RESEND.format({onResendClick:this.handleResendCode}),error:t,onSubmit:this.handleIPAuthorize,onCancel:u.default.loginReset}))},G.renderPasswordRecovery=function(){var e=this.props.authBoxClassName,t=this.state.phoneVerifyError;return x(S.default,{tag:"form",className:e},void 0,x(d.default,{title:j.default.Messages.PASSWORD_RECOVERY_VERIFY_PHONE_TITLE,subtitle:j.default.Messages.PASSWORD_RECOVERY_VERIFY_PHONE_SUBTITLE_RESEND.format({onResendClick:this.handleResendCode}),error:t,onSubmit:this.handlePasswordReset,onCancel:u.default.loginReset}))},G.render=function(){var e=this.props,t=e.authenticated,n=e.invite,r=e.guildTemplate,a=e.loginStatus,o=e.handoffAvailable,i=e.isGuest,l=e.authBoxClassName,u=e.errors,s=u.captcha_sitekey,d=u.captcha_service,f=this.state,c=f.checkingHandoff;if(f.redirecting)return null;if(this.hasError("captcha_key"))return x(A.default,{authBoxClassName:l,onVerify:this.handleCaptchaVerify,title:i?null:j.default.Messages.LOGIN_TITLE,sitekey:s,captchaService:(0,b.parseCaptchaType)(d)});if(o)return this.renderHandOffAvailable();if(t&&c)return this.renderHandOffContinue();switch(a){case w.LoginStates.LOGGING_IN_MFA_SMS:case w.LoginStates.MFA_SMS_STEP:return this.renderMFASMS();case w.LoginStates.LOGGING_IN_MFA:case w.LoginStates.MFA_STEP:return this.renderMFA();case w.LoginStates.ACCOUNT_SCHEDULED_FOR_DELETION:case w.LoginStates.ACCOUNT_DISABLED:return this.renderDisabledAccount();case w.LoginStates.PHONE_IP_AUTHORIZATION:return this.renderIPAuthorization();case w.LoginStates.PASSWORD_RECOVERY_PHONE_VERIFICATION:return this.renderPasswordRecovery();case w.LoginStates.LOGGING_IN:case w.LoginStates.NONE:default:return null!=n&&n.state===w.InviteStates.RESOLVING?this.renderResolving():null!=r?r.state===w.InviteStates.RESOLVING?this.renderResolving():this.renderGuildTemplate(r):this.renderDefault()}},v=l,(h=[{key:"loginSource",get:function(){var e=this.props,t=e.giftCode,n=e.guildTemplate,r=e.invite,a=e.isGuest;return null!=t?"gift":null!=n?"guild_template":null!=r?null!=r.guild?"guild_invite":"dm_invite":a?"guest_lurker":null}},{key:"giftCodeSKUId",get:function(){var e=this.props.giftCode;return null!=e?e.skuId:null}}])&&Y(v.prototype,h),E&&Y(v,E),l}(a.PureComponent);function q(e){var t=(0,l.useStateFromStoresObject)([h.default,E.default,_.default,v.default],(function(){return{authenticated:_.default.isAuthenticated(),handoffAvailable:h.default.isHandoffAvailable(),user:h.default.user,loginStatus:_.default.getLoginStatus(),mfaTicket:_.default.getMFATicket(),mfaSMS:_.default.getMFASMS(),maskedPhone:_.default.getMaskedPhone(),errors:_.default.getErrors(),defaultRoute:E.default.defaultRoute,country:v.default.getCountryCode()}}));return a.createElement(Z,H({},e,t))}Z.displayName="Login",Z.defaultProps={isGuest:!1,transitionTo:function(t){return e.location.assign(t)}},q.displayName="ConnectedLogin";var X=q;t.default=X}).call(this,n(44))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumPaymentGuildAnimation=t.PremiumPaymentAnimationTier2=t.PremiumPaymentAnimationTier1=void 0;var r,a,o,i,l,u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),s=v(n(9)),d=n(122),f=v(n(273)),c=v(n(6001)),p=v(n(6098));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function _(e,t,n,r){i||(i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var l=new Array(o),u=0;u<o;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:i,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,E(e,t)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.NORMAL="normal",e.SPEED_START="speed_start",e.SPEED_LOOP="speed_loop",e.FINISH="finish",e.IDLE="idle"}(l||(l={}));var g,S=((r={})[l.NORMAL]={BEG:0,END:600,shouldForcePlayAfter:!0},r[l.SPEED_START]={BEG:601,END:636},r[l.SPEED_LOOP]={BEG:637,END:668},r[l.FINISH]={BEG:669,END:870},r[l.IDLE]={BEG:871,END:878},r),O=function(e){function t(){return e.apply(this,arguments)||this}h(t,e),t.getNextScene=function(e){switch(e){case t.Scenes.SPEED_START:return t.Scenes.SPEED_LOOP;case t.Scenes.FINISH:return t.Scenes.IDLE;default:return e}};var r=t.prototype;return r.importData=function(){return n.e(70).then(n.t.bind(null,7407,3)).then((function(e){return e.default}))},r.render=function(){var e=this.props,t=e.className,n=e.nextScene,r=e.onScenePlay,a=e.onSceneComplete,o=e.pauseWhileUnfocused;return _(c.default,{className:t,importData:this.importData,nextScene:n,sceneSegments:S,onScenePlay:r,onSceneComplete:a,pauseWhileUnfocused:o})},t}(u.PureComponent);t.PremiumPaymentAnimationTier1=O,O.displayName="PremiumPaymentAnimationTier1",O.Scenes=l,function(e){e.IDLE_ENTRY="idle_entry",e.IDLE_LOOP="idle_loop",e.BOOST_START="boost_start",e.BOOST_LOOP="boost_loop",e.BOOST_END="boost_end",e.VICTORY="victory",e.ERROR="error"}(g||(g={}));var I=((a={})[g.IDLE_ENTRY]={BEG:0,END:50},a[g.IDLE_LOOP]={BEG:50,END:230,shouldForcePlayAfter:!0},a[g.BOOST_START]={BEG:230,END:275},a[g.BOOST_LOOP]={BEG:275,END:290},a[g.BOOST_END]={BEG:386,END:455},a[g.VICTORY]={BEG:470,END:525},a[g.ERROR]={BEG:290,END:375},a),T=function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var n=t.prototype;return n.getStyle=function(e){var t=this.props.animation;return{transform:[{translateX:t.x.interpolate({inputRange:[0,1],outputRange:e?["100%","0%"]:["0%","-100%"]})},{translateY:t.y.interpolate({inputRange:[0,1],outputRange:["100%","0%"]})}]}},n.render=function(){var e=this.props.className;return _("div",{className:p.default.panningAnimation},void 0,_(f.default.div,{className:e,style:this.getStyle(!1)}),_(f.default.div,{className:e,style:this.getStyle(!0)}))},t}(u.PureComponent);T.displayName="PanningAnimation";var C,b=Object.freeze({IDLE_ENTRY:{toValue:1,duration:1500},IDLE_LOOP:{toValue:1,duration:6e3,easing:f.default.Easing.linear},BOOST_START:{toValue:0,duration:2e3,delay:500},ERROR:{toValue:1,duration:1500,delay:1e3}}),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).backgroundAnimation=new f.default.ValueXY({x:0,y:0}),t.foregroundAnimation=new f.default.ValueXY({x:0,y:0}),t.didUnmount=!1,t.animateIdleLoopBackground=function(){t.didUnmount||(t.backgroundAnimation.x.setValue(0),f.default.timing(t.backgroundAnimation.x,{toValue:b.IDLE_LOOP.toValue,duration:1.2*b.IDLE_LOOP.duration,easing:f.default.Easing.linear}).start(t.animateIdleLoopBackground))},t.animateIdleLoopForeground=function(){t.didUnmount||(t.foregroundAnimation.x.setValue(0),f.default.timing(t.foregroundAnimation.x,{toValue:b.IDLE_LOOP.toValue,duration:b.IDLE_LOOP.duration,easing:b.IDLE_LOOP.easing}).start(t.animateIdleLoopForeground))},t.handleScenePlay=function(e){switch(e){case g.IDLE_ENTRY:t.animateIdleEntry(),t.animateIdleLoop();break;case g.ERROR:t.animateError();break;case g.BOOST_START:t.animateBoostStart()}var n=t.props.onScenePlay;null!=n&&n(e)},t}h(t,e),t.getNextScene=function(e){switch(e){case t.Scenes.IDLE_ENTRY:return t.Scenes.IDLE_LOOP;case t.Scenes.BOOST_START:return t.Scenes.BOOST_LOOP;case t.Scenes.BOOST_END:return t.Scenes.VICTORY;case t.Scenes.VICTORY:return t.Scenes.IDLE_ENTRY;case t.Scenes.ERROR:return t.Scenes.IDLE_LOOP;default:return e}};var r=t.prototype;return r.componentWillUnmount=function(){this.didUnmount=!0},r.importData=function(){return n.e(71).then(n.t.bind(null,7408,3)).then((function(e){return e.default}))},r.animateEntry=function(e){f.default.parallel([f.default.timing(this.foregroundAnimation.y,{toValue:e.toValue,duration:e.duration,delay:e.delay||0}),f.default.timing(this.backgroundAnimation.y,{toValue:e.toValue,duration:1.2*e.duration,delay:e.delay||0})]).start()},r.animateIdleEntry=function(){this.animateEntry(b.IDLE_ENTRY)},r.animateError=function(){this.animateEntry(b.ERROR)},r.animateIdleLoop=function(){this.animateIdleLoopBackground(),this.animateIdleLoopForeground()},r.animateBoostStart=function(){f.default.parallel([f.default.timing(this.foregroundAnimation.y,{toValue:b.BOOST_START.toValue,duration:b.BOOST_START.duration,delay:b.BOOST_START.delay}),f.default.timing(this.backgroundAnimation.y,{toValue:b.BOOST_START.toValue,duration:1.2*b.BOOST_START.duration,delay:b.BOOST_START.delay})]).start()},r.render=function(){var e=this.props,t=e.className,n=e.nextScene,r=e.onSceneComplete;return _("div",{className:(0,s.default)(p.default.tier2Animation,t)},void 0,_(T,{className:p.default.tier2Background,animation:this.backgroundAnimation}),_(T,{className:p.default.tier2Foreground,animation:this.foregroundAnimation}),_(c.default,{importData:this.importData,nextScene:n,sceneSegments:I,onScenePlay:this.handleScenePlay,onSceneComplete:r,pauseWhileUnfocused:!1}))},t}(u.PureComponent);t.PremiumPaymentAnimationTier2=M,M.displayName="PremiumPaymentAnimationTier2",M.Scenes=g,function(e){e.ENTRY="entry",e.IDLE="idle",e.STARS="stars",e.ERROR="error",e.SUCCESS="success"}(C||(C={}));var N=((o={})[C.ENTRY]={BEG:0,END:180},o[C.IDLE]={BEG:180,END:360,shouldForcePlayAfter:!0},o[C.STARS]={BEG:180,END:360,shouldForcePlayAfter:!0},o[C.ERROR]={BEG:360,END:540},o[C.SUCCESS]={BEG:540,END:778},o),A=Object.freeze({WHITE:"#ebf0f7",PINK:"#fa6ef6"}),P=[{left:29,top:100,color:A.WHITE},{left:245,top:11,color:A.PINK},{left:393,top:22,color:A.WHITE},{left:74,top:30,color:A.PINK},{left:188,top:9,color:A.WHITE},{left:379,top:97,color:A.PINK}],R=Object.freeze({SCALE_INITIAL:0,SCALE_MIDDLE:1,SCALE_END:0,ROTATE_INITIAL:0,ROTATE_MIDDLE:180,ROTATE_END:360,DELAY_MIN:200,DELAY_MAX:500,DELAY_STAGGER:200,DURATION_MIDDLE:400,DURATION_END:250,SIZE_MIN:7,SIZE_MAX:15,EASING_MIDDLE:f.default.Easing.bezier(.3,.01,0,.99),EASING_END:f.default.Easing.bezier(0,-.01,.99,0)});function L(e){var t=e.animate,n=u.useState(0),r=n[0],a=n[1],o=(0,d.useSprings)(P.length,P.map((function(e,n){var o,i,l=n>0?R.DELAY_STAGGER*n+Math.random()*(R.DELAY_MAX-R.DELAY_MIN)+R.DELAY_MIN:0,u=Math.random()*(R.SIZE_MAX-R.SIZE_MIN)+R.SIZE_MIN;return{from:{scale:R.SCALE_INITIAL,rotate:R.ROTATE_INITIAL,top:e.top,left:e.left,width:u,height:u},to:(o=regeneratorRuntime.mark((function e(o){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=10;break}return e.next=3,o({scale:R.SCALE_MIDDLE,rotate:R.ROTATE_MIDDLE,delay:l,config:{duration:R.DURATION_MIDDLE,easing:R.EASING_MIDDLE}});case 3:return e.next=5,o({scale:R.SCALE_END,rotate:R.ROTATE_END,config:{duration:R.DURATION_END,easing:R.EASING_END}});case 5:return e.next=7,o({scale:R.SCALE_INITIAL,rotate:R.ROTATE_INITIAL,immediate:!0});case 7:n===P.length-1&&a(r+1),e.next=12;break;case 10:return e.next=12,o({scale:R.SCALE_INITIAL,rotate:R.ROTATE_INITIAL});case 12:case"end":return e.stop()}}),e)})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var a=o.apply(e,t);function i(e){m(a,n,r,i,l,"next",e)}function l(e){m(a,n,r,i,l,"throw",e)}i(void 0)}))},function(e){return i.apply(this,arguments)})}})));return u.createElement(u.Fragment,null,o.map((function(e,t){var n=P[t];return _(d.animated.svg,{style:e,className:p.default.guildStar,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.14 12.24"},t,_("path",{d:"M5.62 10.22l-4 1.9a1.17 1.17 0 01-1.5-.5 1.7 1.7 0 010-1l1.9-4a.91.91 0 000-1l-1.9-4a1.14 1.14 0 01.5-1.5 1.39 1.39 0 01.9 0l4 1.9a.91.91 0 001 0l4-1.9a1.14 1.14 0 011.5.5 1.39 1.39 0 010 .9l-1.9 4a.91.91 0 000 1l1.9 4a1.17 1.17 0 01-.5 1.5 1.7 1.7 0 01-1 0l-4-1.9a1 1 0 00-.9.1z",fill:n.color}))})))}var D=function(e){function t(){return e.apply(this,arguments)||this}h(t,e),t.getNextScene=function(e){switch(e){case C.ENTRY:case C.ERROR:case C.SUCCESS:return C.IDLE;default:return e}};var r=t.prototype;return r.importData=function(){return n.e(69).then(n.t.bind(null,7409,3)).then((function(e){return e.default}))},r.render=function(){var e=this.props,t=e.className,n=e.nextScene,r=e.onScenePlay,a=e.onSceneComplete,o=e.pauseWhileUnfocused;return _("div",{className:(0,s.default)(p.default.guildWrapper,t)},void 0,_(c.default,{className:p.default.guildBackground,importData:this.importData,nextScene:n,sceneSegments:N,onScenePlay:r,onSceneComplete:a,pauseWhileUnfocused:o}),_(L,{animate:n===C.STARS}))},t}(u.PureComponent);t.PremiumPaymentGuildAnimation=D,D.displayName="PremiumPaymentGuildAnimation",D.Scenes=C},function(e,t,n){e.exports=n.p+"0f4d1ff76624bb45a3fee4189279ee92.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=n(281),i=n(1),l=s(n(6)),u=s(n(6082));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.price,n=e.currency,r=e.intervalType,s=e.className,d=(0,o.formatPrice)(t,n),c=r===i.SubscriptionIntervalTypes.MONTH?l.default.Messages.BILLING_PRICE_PER_MONTH_BOLD.format({price:d}):r===i.SubscriptionIntervalTypes.YEAR?l.default.Messages.BILLING_PRICE_PER_YEAR_BOLD.format({price:d}):null;return f("div",{className:(0,a.default)(u.default.pricePerInterval,s)},void 0,null==r?f("strong",{},void 0,d):c)}c.displayName="PricePerInterval"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("title",{},void 0,"Nitro Classic"),f=s("path",{d:"M98.4808161 8.67851957L97.2236004 17.1425324C96.9366613 19.1428254 94.6742302 20.0716236 92.5917164 20.0716236 90.6527882 20.0716236 88.7494953 19.1428254 89.0007991 17.3214804L90.2578987 8.67851957C90.5449539 6.7854799 92.807385 5.82123843 94.8897827 5.82123843 96.9722965 5.82123843 98.7678712 6.7854799 98.4808161 8.67851957M95.8844352.00380986213L95.8851317 0 82.3544217 0C82.0087483 0 81.715309.252259053 81.6652804.592375835L81.0074795 5.06376857C80.9459594 5.48181435 81.2717838 5.85668169 81.6965047 5.85668169L84.1674077 5.85668169C84.4160419 5.85668169 84.5858606 6.10882529 84.4882409 6.33626252 84.1799439 7.05517195 83.9553375 7.83561644 83.8305561 8.67851957L82.5733404 17.3214804C81.7473459 23.1071601 86.5954788 26 91.8735561 26 97.4035177 26 102.825761 23.1071601 103.651756 17.3214804L104.908275 8.67851957C105.717903 3.00713572 101.040981.115796719 95.8844352.00380986213M15.296869 11.3489531L15.3645208 15.4968998C15.3658783 15.5821668 15.3090871 15.6571606 15.2271809 15.6781634L15.2270678 15.6781634 13.8302517 10.6749217C13.8282154 10.6672739 13.8256134 10.6598544 13.8224457 10.6525491L9.48877489.415833402C9.38198017.163685177 9.13637494 0 8.86452355 0L3.95343718 0C3.6148391 0 3.32805455.251805788 3.28121873.590019998L.00667092325 24.2202696C-.050459726 24.632222.26664366 25 .678889375 25L5.57119616 25C5.91024677 25 6.19737071 24.7475093 6.24364088 24.4086103L7.52608254 15.0207974C7.52732697 15.0116657 7.52789262 15.0023057 7.52777949 14.9930599L7.45775202 10.1692555 7.5975807 10.1340986 9.06465052 15.1374545C9.06679999 15.1445315 9.06928885 15.1516085 9.07223023 15.1584573L13.1252256 24.587591C13.2328122 24.8379129 13.4775124 25 13.7478931 25L19.045884 25C19.3844821 25 19.6712667 24.7481942 19.7181025 24.40998L22.9933291.779730433C23.0504597.367777991 22.7333563 0 22.3211106 0L17.4621772 0C17.1236922 0 16.8369077.251577496 16.7899587.589791707L15.298566 11.3204166C15.2973215 11.3298907 15.2967559 11.3393648 15.296869 11.3489531M24.7126791 25L29.8497922 25C30.205243 25 30.5063014 24.7483072 30.5554684 24.4099773L33.9929971.779733993C34.0529712.36777967 33.7200849 0 33.2873209 0L28.1502078 0C27.7948757 0 27.4938173.251692791 27.4445316.590022692L24.0070029 24.220266C23.9470288 24.6322203 24.2799151 25 24.7126791 25M37.6698384.584862647L37.0075033 4.99943007C36.9456869 5.41217371 37.2736994 5.78240055 37.7012724 5.78240055L42.9904877 5.78240055C43.4157236 5.78240055 43.7430349 6.14863787 43.6850747 6.55955773L41.1933721 24.2228428C41.1354119 24.6337627 41.4627233 25 41.8879592 25L47.0155637 25C47.3658955 25 47.6624739 24.7477488 47.7101508 24.4093241L50.2545552 6.37307648C50.3022321 6.03453779 50.5988105 5.78240055 50.9491423 5.78240055L56.6358988 5.78240055C56.9838934 5.78240055 57.2791864 5.53345492 57.3296679 5.1975379L57.9924704.782970478C58.0544036.370226832 57.7263911 0 57.2987013 0L38.3636075 0C38.0156128 0 37.7202029.248945629 37.6698384.584862647M73.4002223 8.72158326C73.2199776 10.1691878 72.0692022 11.6169065 70.0902313 11.6169065L67.1170073 11.6169065C66.6926763 11.6169065 66.3664914 11.2480995 66.4261466 10.8356886L67.0554915 6.48511303C67.104332 6.147468 67.3988868 5.89657424 67.7463521 5.89657424L70.9177291 5.89657424C72.8244858 5.89657424 73.5797693 7.20309382 73.4002223 8.72158326M71.6373126 0L62.0638753 0C61.7158285 0 61.4210412.251692791 61.3727821.590022692L58.0068571 24.220266C57.9481322 24.6322203 58.2740844 25 58.697834 25L63.7988762 25C64.1473881 25 64.4425243 24.7475082 64.4900856 24.4086076L65.4806177 17.3505938C65.5044565 17.1812005 65.6519083 17.0549546 65.8262224 17.0549546L66.4819644 17.0549546C66.6009259 17.0549546 66.7117473 17.1144249 66.7758214 17.2128191L71.6474295 24.6843852C71.775694 24.8810595 71.9971043 25 72.2350273 25L78.5355692 25C79.0999096 25 79.4307459 24.3765324 79.1072357 23.9225722L73.9950299 16.7493848C73.8724635 16.5773661 73.935491 16.3380012 74.1277133 16.245885 77.3914221 14.6802531 79.2866664 13.0763822 79.911476 8.61554126 80.6303618 2.75412411 76.8897603 0 71.6373126 0M5.93350799 37.6155526L7.71275643 38.4952518C7.80947956 38.5430729 7.84912249 38.6602491 7.80130141 38.7569722 7.79608029 38.7675325 7.78991472 38.7775989 7.78288005 38.7870484 7.78288005 38.7870484 7.78288005 38.7870484 7.78288005 38.7870484 6.5023978 40.5070853 5.02480222 41 3.72982215 41 1.63490599 41-.294225433 39.7760989.0373440313 37.3434066L.549769566 33.6565934C.88133903 31.239011 3.1721826 30 5.31231277 30 6.56433391 30 7.99499405 30.5097346 8.63332448 32.2132515 8.63332448 32.2132515 8.63332448 32.2132515 8.63332448 32.2132515L8.63332448 32.2132515C8.68451961 32.3498763 8.61597686 32.5022247 8.4797766 32.5545387L6.63222277 33.2642011C6.50733795 33.312169 6.36596186 33.2651964 6.29461441 33.1520298 6.29461441 33.1520298 6.29461441 33.1520298 6.29461441 33.1520298 6.00467959 32.6921544 5.44749743 32.4931319 4.89031528 32.4931319 4.12167697 32.5082418 3.35303867 32.9313187 3.2475393 33.6565934L2.73511376 37.3434066C2.62961439 38.0384615 3.29275331 38.4766484 4.04632028 38.4766484 4.60310978 38.4766484 5.22108254 38.2435573 5.60253663 37.6999958 5.60253663 37.6999958 5.60253663 37.6999958 5.60253663 37.6999958L5.60253663 37.6999958C5.67690475 37.5940233 5.81746419 37.5581537 5.93351807 37.6155322zM59.2832028 37.6155526L61.0624512 38.4952518C61.1591744 38.5430729 61.1988173 38.6602491 61.1509962 38.7569722 61.1457751 38.7675325 61.1396095 38.7775989 61.1325749 38.7870484 61.1325749 38.7870484 61.1325749 38.7870484 61.1325749 38.7870484 59.8520926 40.5070853 58.374497 41 57.079517 41 54.9846008 41 53.0554694 39.7760989 53.3870388 37.3434066L53.8994644 33.6565934C54.2310338 31.239011 56.5218774 30 58.6620076 30 59.9140287 30 61.3446889 30.5097346 61.9830193 32.2132515 61.9830193 32.2132515 61.9830193 32.2132515 61.9830193 32.2132515L61.9830193 32.2132515C62.0342144 32.3498763 61.9656717 32.5022247 61.8294714 32.5545387L59.9819176 33.2642011C59.8570328 33.312169 59.7156567 33.2651964 59.6443092 33.1520298 59.6443092 33.1520298 59.6443092 33.1520298 59.6443092 33.1520298 59.3543744 32.6921544 58.7971922 32.4931319 58.2400101 32.4931319 57.4713718 32.5082418 56.7027335 32.9313187 56.5972341 33.6565934L56.0848086 37.3434066C55.9793092 38.0384615 56.6424481 38.4766484 57.3960151 38.4766484 57.9528046 38.4766484 58.5707773 38.2435573 58.9522314 37.6999958 58.9522314 37.6999958 58.9522314 37.6999958 58.9522314 37.6999958L58.9522314 37.6999958C59.0265995 37.5940233 59.167159 37.5581537 59.2832129 37.6155322zM9.55137248 40.2798328L10.9039613 30.5820306C10.9384202 30.3349668 11.1497126 30.1510989 11.3991679 30.1510989L13.1015272 30.1510989C13.3776695 30.1510989 13.6015272 30.3749565 13.6015272 30.6510989 13.6015272 30.6744353 13.5998934 30.6977431 13.5966378 30.7208514L12.6268238 37.6046981C12.5883006 37.8781402 12.7787399 38.131038 13.052182 38.1695612 13.0752902 38.1728168 13.0985981 38.1744505 13.1219345 38.1744505L16.3149254 38.1744505C16.5910678 38.1744505 16.8149254 38.3983082 16.8149254 38.6744505 16.8149254 38.6968642 16.8134183 38.7192526 16.8104143 38.7414641L16.5839494 40.4159146C16.55041 40.6639006 16.3387043 40.8489011 16.0884606 40.8489011L10.0465791 40.8489011C9.7704367 40.8489011 9.54657907 40.6250435 9.54657907 40.3489011 9.54657907 40.3257952 9.54818071 40.3027171 9.55137248 40.2798328zM25.2618169 30.5450857L27.365844 40.2428879C27.4243935 40.5127519 27.2530892 40.7789836 26.9832252 40.8375331 26.9483937 40.8450901 26.9128539 40.8489011 26.877212 40.8489011L25.017712 40.8489011C24.7774965 40.8489011 24.5712291 40.6780766 24.5264688 40.4420682L24.273859 39.1101296C24.2290987 38.8741212 24.0228313 38.7032967 23.7826158 38.7032967L21.6737234 38.7032967C21.475839 38.7032967 21.2965724 38.8200012 21.2164933 39.0009587L20.5304477 40.5512391C20.4503686 40.7321966 20.2711021 40.8489011 20.0732176 40.8489011L18.3049929 40.8489011C18.0288505 40.8489011 17.8049929 40.6250435 17.8049929 40.3489011 17.8049929 40.2729821 17.8222812 40.1980599 17.8555465 40.1298168L22.5827762 30.4320146C22.6665559 30.2601425 22.8410184 30.1510989 23.0322226 30.1510989L24.773185 30.1510989C25.0084749 30.1510989 25.2119293 30.3151453 25.2618169 30.5450857zM22.2977121 36.3008242L23.895274 36.3008242 23.5787759 33.1730769 23.4732765 33.1730769 22.2977121 36.3008242zM28.4615085 38.7933304L29.6600776 37.7982307C29.867419 37.6260869 30.1698805 37.6329436 30.3692081 37.8143064 30.3692081 37.8143064 30.3692081 37.8143064 30.3692081 37.8143064 30.8626279 38.2632556 31.5697924 38.4917582 32.2174996 38.4917582 32.9409239 38.4917582 33.5739201 38.2348901 33.6794195 37.6758242 33.7999902 37.010989 32.8655672 36.7239011 32.0065008 36.603022 30.3335822 36.331044 28.8264482 34.9862637 29.2032317 32.9615385 29.6101579 30.7706044 31.5392893 30 33.4985634 30 34.6675402 30 35.7629615 30.294974 36.6410928 31.3393989 36.6410928 31.3393989 36.6410928 31.3393989 36.6410928 31.3393989L36.6410928 31.3393989C36.7911777 31.5179057 36.7681372 31.784282 36.5896304 31.9343669 36.5796762 31.9427362 36.5693406 31.9506412 36.5586568 31.9580566L35.2852973 32.8418354C35.1082978 32.964687 34.8717504 32.9572254 34.7028454 32.8234627 34.7028454 32.8234627 34.7028454 32.8234627 34.7028454 32.8234627 34.2644214 32.476257 33.6924031 32.3091824 33.1820653 32.2967033 32.503855 32.2815934 31.9311441 32.5384615 31.8708588 33.0824176 31.7955021 33.7019231 32.3380703 33.9739011 33.1519226 34.1552198 35.0056973 34.5027473 36.8142581 35.2129121 36.3169039 37.8722527 35.925049 39.9574176 34.1164883 41 31.8105734 41 30.6586546 41 29.2630198 40.4746703 28.4016401 39.4349963 28.4016401 39.4349963 28.4016401 39.4349963 28.4016401 39.4349963L28.4016401 39.4349963C28.2411035 39.2412306 28.2678891 38.9540435 28.4614898 38.7933078zM38.3784498 38.7933304L39.5770189 37.7982307C39.7843603 37.6260869 40.0868217 37.6329436 40.2861493 37.8143064 40.2861493 37.8143064 40.2861493 37.8143064 40.2861493 37.8143064 40.7795691 38.2632556 41.4867336 38.4917582 42.1344408 38.4917582 42.8578651 38.4917582 43.4908613 38.2348901 43.5963607 37.6758242 43.7169314 37.010989 42.7825084 36.7239011 41.9234421 36.603022 40.2505234 36.331044 38.7433895 34.9862637 39.120173 32.9615385 39.5270991 30.7706044 41.4562305 30 43.4155046 30 44.5844814 30 45.6799028 30.294974 46.558034 31.3393989 46.558034 31.3393989 46.558034 31.3393989 46.558034 31.3393989L46.558034 31.3393989C46.708119 31.5179057 46.6850785 31.784282 46.5065716 31.9343669 46.4966174 31.9427362 46.4862819 31.9506412 46.4755981 31.9580566L45.2022385 32.8418354C45.025239 32.964687 44.7886916 32.9572254 44.6197866 32.8234627 44.6197866 32.8234627 44.6197866 32.8234627 44.6197866 32.8234627 44.1813626 32.476257 43.6093444 32.3091824 43.0990065 32.2967033 42.4207963 32.2815934 41.8480854 32.5384615 41.7878 33.0824176 41.7124433 33.7019231 42.2550115 33.9739011 43.0688638 34.1552198 44.9226386 34.5027473 46.7311993 35.2129121 46.2338451 37.8722527 45.8419903 39.9574176 44.0334296 41 41.7275147 41 40.5755958 41 39.179961 40.4746703 38.3185814 39.4349963 38.3185814 39.4349963 38.3185814 39.4349963 38.3185814 39.4349963L38.3185814 39.4349963C38.1580447 39.2412306 38.1848304 38.9540435 38.378431 38.7933078zM51.984237 30.7201672L50.6316481 40.4179694C50.5971892 40.6650332 50.3858968 40.8489011 50.1364415 40.8489011L48.4483514 40.8489011C48.1722091 40.8489011 47.9483514 40.6250435 47.9483514 40.3489011 47.9483514 40.3257952 47.9499531 40.3027171 47.9531448 40.2798328L49.3057337 30.5820306C49.3401926 30.3349668 49.551485 30.1510989 49.8009403 30.1510989L51.4890304 30.1510989C51.7651728 30.1510989 51.9890304 30.3749565 51.9890304 30.6510989 51.9890304 30.6742048 51.9874287 30.6972829 51.984237 30.7201672z"});function c(e){var t=e.width,n=void 0===t?143:t,r=e.height,a=void 0===r?41:r,l=e.color,c=void 0===l?"currentColor":l,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(v),{width:n,height:a,viewBox:"0 0 143 41"}),d,s("g",{fill:c,className:p,fillRule:"evenodd","aria-hidden":!0},void 0,f))}c.displayName="NitroClassic"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(8)),o=i(n(105));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function i(){for(var t,n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(t=e.call.apply(e,[this].concat(i))||this).ref=r.createRef(),t.shouldRenderFrame=!0,t.animate=function(){var e=t.props,n=e.intensity;if(e.isShaking){var r=t.ref.current;if(t.shouldRenderFrame&&null!=r){var i=a.default.random(-n,n,!0),l=a.default.random(-n,n,!0);r.style.transform=o.default.useReducedMotion?"":"translate3d("+i+"px,"+l+"px,0px)"}t.shouldRenderFrame=!t.shouldRenderFrame,t.animationFrame=requestAnimationFrame(t.animate)}},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var l=i.prototype;return l.componentDidMount=function(){this.props.isShaking&&this.startShaking()},l.componentDidUpdate=function(e){this.props.isShaking!==e.isShaking&&this.setShaking(this.props.isShaking)},l.setShaking=function(e){e?this.startShaking():this.stopShaking()},l.startShaking=function(){this.shouldRenderFrame=!0,this.animationFrame=requestAnimationFrame(this.animate)},l.stopShaking=function(){cancelAnimationFrame(this.animationFrame);var e=this.ref.current;null!=e&&(e.style.transform="")},l.render=function(){var e=this.props,t=e.className,n=e.children;return r.createElement("div",{className:t,ref:this.ref},n)},i}(r.Component);s.displayName="Shaker",s.defaultProps={isShaking:!0,intensity:5};var d=s;t.default=d},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(23)),i=n(3),l=n(5672),u=h(n(5857)),s=h(n(257)),d=h(n(373)),f=h(n(29)),c=h(n(284)),p=h(n(96)),v=n(280),y=n(1),m=h(n(6)),_=h(n(6101));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var S=[y.SubscriptionPlans.PREMIUM_MONTH_LEGACY,y.SubscriptionPlans.PREMIUM_YEAR_LEGACY,y.SubscriptionPlans.PREMIUM_MONTH_TIER_1,y.SubscriptionPlans.PREMIUM_YEAR_TIER_1,y.SubscriptionPlans.PREMIUM_MONTH_TIER_2,y.SubscriptionPlans.PREMIUM_YEAR_TIER_2];function O(e){var t,n,r,a=e.planId,o=e.startingPremiumSubscriptionPlanId,l=(0,i.useStateFromStoresArray)([s.default],(function(){return[s.default.getHardcoded(o),s.default.getHardcoded(a)]})),u=l[0],d=l[1];if(n=o,r=a,S.indexOf(n)<S.indexOf(r))switch(a){case y.SubscriptionPlans.PREMIUM_MONTH_TIER_1:t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_1;break;case y.SubscriptionPlans.PREMIUM_MONTH_TIER_2:t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_UPGRADE_TIER_2_MONTH;break;case y.SubscriptionPlans.PREMIUM_YEAR_TIER_1:t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_UPGRADE_TIER_1_YEAR;break;case y.SubscriptionPlans.PREMIUM_YEAR_TIER_2:t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_UPGRADE_TIER_2_YEAR.format({numFreeGuildSubscriptions:v.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM});break;default:throw new Error("Unexpected planId: "+a)}else if(u.skuId===y.PremiumSubscriptionSKUs.TIER_2&&d.skuId===y.PremiumSubscriptionSKUs.TIER_1)t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_2_TO_TIER_1;else switch(d.skuId){case y.PremiumSubscriptionSKUs.TIER_1:t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_1_YEAR_TO_MONTH;break;case y.PremiumSubscriptionSKUs.TIER_2:t=m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_2_YEAR_TO_MONTH;break;default:throw new Error("Unexpected skuId: "+d.skuId)}return g("div",{className:_.default.text},void 0,t)}function I(e){var t,n,r=e.planId,v=e.startingPremiumSubscriptionPlanId,h=e.onClose,E=e.followupSKUInfo,S=e.isDowngrade,I=e.hideClose,T=e.postSuccessGuild,C=a.useContext(c.default),b=(0,i.useStateFromStores)([d.default],(function(){return null!=E?d.default.get(E.id):null}));if(a.useEffect((function(){if(null!=E&&null==b){var e=E.applicationId,t=E.id;(0,l.fetchSKU)(e,t).catch(y.NOOP_NULL)}}),[E,b]),null!=b)t=g("div",{className:_.default.text},void 0,m.default.Messages.PREMIUM_PAYMENT_CONFIRMATION_BLURB_IAP.format({skuName:b.name}));else if(null!=v)t=g(O,{planId:r,startingPremiumSubscriptionPlanId:v});else if(null!=T){var M=s.default.getHardcoded(r);t=a.createElement(a.Fragment,null,g("div",{className:_.default.text},void 0,M.skuId===y.PremiumSubscriptionSKUs.TIER_1?m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_1:m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_2),g("div",{className:_.default.text},void 0,m.default.Messages.BILLING_POST_PURCHASE_JOIN_GUILD_FOR_EMOJI.format({guildName:T.name})))}else{var N=s.default.getHardcoded(r);t=g("div",{className:_.default.text},void 0,N.skuId===y.PremiumSubscriptionSKUs.TIER_1?m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_1:m.default.Messages.BILLING_SWITCH_PLAN_CONFIRM_TIER_2)}n=null!=b?m.default.Messages.PREMIUM_PAYMENT_CONFIRMATION_BUTTON_IAP.format({skuName:b.name}):S?m.default.Messages.PREMIUM_DOWNGRADE_DONE_BUTTON:null!=T?m.default.Messages.BILLING_POST_PURCHASE_JOIN_GUILD_FOR_EMOJI_CTA:m.default.Messages.PREMIUM_UPGRADE_DONE_BUTTON;var A=p.default.getPremiumType(r);return(0,o.default)(A!==y.PremiumTypes.NONE_DEPRECATED&&null!=A,"premium type should not be none or undefined in purchase confirmation"),g("div",{className:_.default.confirmation},void 0,g(u.default,{className:_.default.banner,theme:C,premiumType:A,type:null!=v?u.default.Types.PREMIUM_UPDATED:u.default.Types.PREMIUM_ACTIVATED}),t,I?null:g(f.default,{onClick:h},void 0,n))}O.displayName="PremiumSubscriptionSwitchPlanConfirmationText",I.displayName="PremiumSubscriptionPurchaseConfirmation"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(8)),a=d(n(3)),o=d(n(2)),i=d(n(1191)),l=d(n(120)),u=n(136),s=d(n(373));n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y={},m={},_={},h={},E=new Set,g=new Set;function S(e){y[e.id]=i.default.createFromServer(e),null==_[e.sku_id]&&(_[e.sku_id]=new Set),null==h[e.application_id]&&(h[e.application_id]=new Set),h[e.application_id].add(e.id),_[e.sku_id].add(e.id)}function O(e){m[e.id]=i.default.createFromServer(e)}var I=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o,i,d,v=a.prototype;return v.initialize=function(){this.syncWith([l.default],(function(){return!0}))},v.get=function(e){return y[e]},v.getGiftable=function(){return r.default.values(m)},v.getForApplication=function(e){var t=h[e];if(null==t)return null;for(var n,r=new Set,a=p(t);!(n=a()).done;){var o=n.value;r.add(y[o])}return r},v.getForSku=function(e){var t=_[e];if(null==t)return null;for(var n,r=new Set,a=p(t);!(n=a()).done;){var o=n.value;r.add(y[o])}return r},v.isEntitledToSku=function(e,t,n,r){void 0===r&&(r=null);var a=_[t];if(null!=a)for(var o,i=p(a);!(o=i()).done;){var d=o.value,f=y[d];if(null!=f&&f.isValid(e,s.default,r))return!0}if(g.has(n))return!1;var c=null!=r?l.default.getLibraryApplication(n,r):l.default.getActiveLibraryApplication(n);return!(null==c||c.sku.id!==t||!(0,u.isUserEntitledToLibraryApplication)(c))||null},o=a,(i=[{key:"applicationIdsFetching",get:function(){return E}},{key:"applicationIdsFetched",get:function(){return g}}])&&f(o.prototype,i),d&&f(o,d),a}(a.default.Store))(o.default,{ENTITLEMENT_FETCH_APPLICATION_START:function(e){var t=e.applicationId;E.add(t)},ENTITLEMENT_FETCH_APPLICATION_SUCCESS:function(e){var t=e.applicationId,n=e.entitlements;E.delete(t),g.add(t);for(var r,a=p(n);!(r=a()).done;){var o=r.value;!0!==o.consumed&&S(o)}},ENTITLEMENT_FETCH_APPLICATION_FAIL:function(e){},ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS:function(e){var t=e.entitlements;m={},t.forEach(O)},SKU_PURCHASE_SUCCESS:function(e){for(var t,n=p(e.entitlements);!(t=n()).done;){S(t.value)}},LIBRARY_FETCH_SUCCESS:function(e){for(var t,n=p(e.libraryApplications);!(t=n()).done;){var r=t.value;if(null!=r.entitlements)for(var a,o=p(r.entitlements);!(a=o()).done;){S(a.value)}}},ENTITLEMENT_CREATE:function(e){return S(e.entitlement)},ENTITLEMENT_UPDATE:function(e){return S(e.entitlement)},ENTITLEMENT_DELETE:function(e){return function(e){delete y[e.id];var t=h[e.application_id];null!=t&&t.delete(e.id);var n=_[e.sku_id];null!=n&&n.delete(e.id)}(e.entitlement)},LOGOUT:function(e){return y={},_={},h={},E=new Set,void(g=new Set)}});t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 20 20"}),s("path",{d:"M10 0C4.486 0 0 4.486 0 10C0 15.515 4.486 20 10 20C15.514 20 20 15.515 20 10C20 4.486 15.514 0 10 0ZM9 4H11V11H9V4ZM10 15.25C9.31 15.25 8.75 14.691 8.75 14C8.75 13.31 9.31 12.75 10 12.75C10.69 12.75 11.25 13.31 11.25 14C11.25 14.691 10.69 15.25 10 15.25Z",fillRule:"evenodd",clipRule:"evenodd",className:f,fill:d}))}d.displayName="WarningCircle"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Shine=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=c(n(9)),u=c(n(273)),s=c(n(29)),d=c(n(55)),f=c(n(6076));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.DEFAULT="default",e.SMALL="small"}(o||(o={}));var E=((r={})[o.DEFAULT]=f.default.shineContainerDefault,r[o.SMALL]=f.default.shineContainerSmall,r),g=function(e){function t(){return e.apply(this,arguments)||this}return _(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.shineSize,a=t.shinePaused,o=m(t,["className","shineSize","shinePaused"]);return i.createElement(u.default.div,v({},o,{className:(0,l.default)(E[r],n,(e={},e[f.default.shinePaused]=a,e))}),y(d.default,{align:d.default.Align.CENTER,justify:d.default.Justify.CENTER,className:f.default.shine},void 0,y("div",{className:f.default.shineInner})))},t}(i.PureComponent);t.Shine=g,g.displayName="Shine",g.defaultProps={shineSize:o.DEFAULT};var S=function(e){function t(){return e.apply(this,arguments)||this}return _(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=e.disabled,a=e.submitting,o=e.pauseAnimation,u=e.shineSize,d=e.shinePaused,c=m(e,["children","className","disabled","submitting","pauseAnimation","shineSize","shinePaused"]);return i.createElement(s.default,v({},c,{className:(0,l.default)(f.default.shinyButton,n),disabled:r,submitting:a}),t,r||a||!0===o?null:y(g,{shinePaused:d,className:f.default.buttonShine,shineSize:u}))},t}(i.PureComponent);S.displayName="ShinyButton",S.ShineSizes=o,S.defaultProps={shineSize:o.DEFAULT};var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchUserEntitlementsForApplication=function(e,t){void 0===t&&(t=!0);return a.default.wait((function(){a.default.dispatch({type:i.ActionTypes.ENTITLEMENT_FETCH_APPLICATION_START,applicationId:e})})),r.default.get({url:i.Endpoints.ENTITLEMENTS_FOR_APPLICATION(e),oldFormErrors:!0,query:{exclude_consumed:t}}).then((function(t){return a.default.dispatch({type:i.ActionTypes.ENTITLEMENT_FETCH_APPLICATION_SUCCESS,applicationId:e,entitlements:t.body}),t.body})).catch((function(){a.default.dispatch({type:i.ActionTypes.ENTITLEMENT_FETCH_APPLICATION_FAIL,applicationId:e})}))},t.fetchGiftableEntitlements=function(){return d.apply(this,arguments)};var r=l(n(14)),a=l(n(2)),o=n(289),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}function d(){return(d=s(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:i.ActionTypes.ENTITLEMENTS_GIFTABLE_FETCH}),e.prev=1,e.next=4,(0,o.httpGetWithCountryCodeQuery)({url:i.Endpoints.ENTITLEMENTS_GIFTABLE});case 4:t=e.sent,a.default.dispatch({type:i.ActionTypes.ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS,entitlements:t.body}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),a.default.dispatch({type:i.ActionTypes.ENTITLEMENTS_GIFTABLE_FETCH_FAIL});case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 8 12"}),s("path",{d:"M4 0L0 4V8L4 12L8 8V4L4 0ZM7 7.59L4 10.59L1 7.59V4.41L4 1.41L7 4.41V7.59Z",fill:d,className:f}),s("path",{d:"M2 4.83V7.17L4 9.17L6 7.17V4.83L4 2.83L2 4.83Z",fill:d,className:f}))}d.displayName="PremiumGuildSubscriberBadge"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PHONE_VERIFICATION_CODE_NUM_DIGITS=t.PHONE_VERIFICATION_MODAL_KEY=t.PHONE_DEFAULT_COUNTRY_CODE_NAME=void 0;t.PHONE_DEFAULT_COUNTRY_CODE_NAME="United States";t.PHONE_VERIFICATION_MODAL_KEY="PHONE_VERIFICATION_MODAL_KEY";t.PHONE_VERIFICATION_CODE_NUM_DIGITS=6},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s=!1,d={};function f(e){var t,n=e.userPremiumGuildSubscriptionSlot;d=u({},d,((t={})[n.id]=n,t))}var c=new(function(e){var t,n,r,a,o;function u(){return e.apply(this,arguments)||this}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),u.prototype.getSlot=function(e){return d[e]},r=u,(a=[{key:"hasFetched",get:function(){return s}},{key:"slots",get:function(){return d}}])&&i(r.prototype,a),o&&i(r,o),u}(r.default.Store))(a.default,{USER_PREMIUM_GUILD_SUBSCRIPTION_SLOTS_FETCH_SUCCESS:function(e){var t=e.userPremiumGuildSubscriptionSlots;d={},t.forEach((function(e){d[e.id]=e})),s=!0},USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_UPDATE_SUCCESS:f,USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_CREATE:f,USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_UPDATE:f,LOGOUT:function(e){return d={},void(s=!1)}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=!1,s=!1,d=!1,f=!1,c=!1,p=!1,v=null,y=null;function m(){u=!1}function _(){f=!1}function h(){c=!1}function E(){p=!0}function g(){p=!1}var S=new(function(e){var t,n,r,a,o;function m(){return e.apply(this,arguments)||this}return n=e,(t=m).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r=m,(a=[{key:"isBusy",get:function(){return u||s||p||d}},{key:"isUpdatingPaymentSource",get:function(){return s}},{key:"isRemovingPaymentSource",get:function(){return d}},{key:"isSyncing",get:function(){return f||c}},{key:"editSourceError",get:function(){return v}},{key:"removeSourceError",get:function(){return y}}])&&i(r.prototype,a),o&&i(r,o),m}(r.default.Store))(a.default,{BILLING_PAYMENT_SOURCE_CREATE_START:function(e){u=!0},BILLING_PAYMENT_SOURCE_CREATE_SUCCESS:function(e){return m()},BILLING_PAYMENT_SOURCE_CREATE_FAIL:function(e){return m()},STRIPE_TOKEN_FAILURE:function(e){return m()},BILLING_PAYMENT_SOURCE_REMOVE_START:function(e){d=!0},BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS:function(e){d=!1},BILLING_PAYMENT_SOURCE_REMOVE_FAIL:function(e){var t=e.error;d=!1,y=t},BILLING_PAYMENT_SOURCE_REMOVE_CLEAR_ERROR:function(e){y=null},BILLING_PAYMENT_SOURCE_UPDATE_START:function(e){s=!0},BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS:function(e){s=!1},BILLING_PAYMENT_SOURCE_UPDATE_FAIL:function(e){var t=e.error;s=!1,v=t},BILLING_PAYMENT_SOURCE_UPDATE_CLEAR_ERROR:function(e){v=null},BILLING_PAYMENT_SOURCES_FETCH_START:function(e){f=!0},BILLING_PAYMENT_SOURCES_FETCH_SUCCESS:function(e){return _()},BILLING_PAYMENT_SOURCES_FETCH_FAIL:function(e){return _()},BILLING_SUBSCRIPTION_FETCH_START:function(e){c=!0},BILLING_SUBSCRIPTION_FETCH_SUCCESS:function(e){return h()},BILLING_SUBSCRIPTION_FETCH_FAIL:function(e){return h()},BILLING_SUBSCRIPTION_UPDATE_START:function(e){return E()},BILLING_SUBSCRIPTION_CANCEL_START:function(e){return E()},BILLING_SUBSCRIPTION_UPDATE_SUCCESS:function(e){return g()},BILLING_SUBSCRIPTION_UPDATE_FAIL:function(e){return g()},BILLING_SUBSCRIPTION_CANCEL_FAIL:function(e){return g()},BILLING_SUBSCRIPTION_CANCEL_SUCCESS:function(e){return g()}});t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TwilioChannel=void 0;var r,a=n(95),o=f(n(14)),i=f(n(2)),l=f(n(11)),u=f(n(482)),s=n(5831),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}t.TwilioChannel=r,function(e){e.CALL="call"}(r||(t.TwilioChannel=r={}));var p={setCountryCode:function(e){i.default.dispatch({type:d.ActionTypes.PHONE_SET_COUNTRY_CODE,countryCode:e})},removePhone:function(e){return o.default.delete({url:d.Endpoints.PHONE,body:{password:e},oldFormErrors:!0})},resendCode:function(e,t){var n={},r=l.default.getFingerprint();return r&&(n["X-Fingerprint"]=r),o.default.post({url:d.Endpoints.RESEND_PHONE,headers:n,body:{phone:e,auth_channel:t}})},beginAddPhone:function(e){return o.default.post({url:d.Endpoints.PHONE,body:{phone:e}})},addPhone:function(e,t){return o.default.post({url:d.Endpoints.PHONE,body:{phone_token:e,password:t},oldFormErrors:!0})},addPhoneWithoutPassword:function(e){return o.default.post({url:d.Endpoints.PHONE_VERIFY_NO_PASSWORD,body:{code:e}})},validatePhoneForSupport:function(e){return o.default.post({url:d.Endpoints.VERIFY_PHONE_FOR_TICKET,body:{token:e},oldFormErrors:!0})},verifyPhone:function(e,t,n){return(r=regeneratorRuntime.mark((function r(){var o,f,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return void 0===n&&(n=!0),o={},(f=l.default.getFingerprint())&&(o["X-Fingerprint"]=f),r.next=6,u.default.post({url:d.Endpoints.VERIFY_PHONE,headers:o,body:{phone:e,code:t},oldFormErrors:!0,trackedActionData:{event:a.NetworkActionNames.USER_REGISTER_PHONE}});case 6:return c=r.sent,n&&i.default.dispatch({type:d.ActionTypes.MODAL_POP,key:s.PHONE_VERIFICATION_MODAL_KEY}),r.abrupt("return",c.body);case 9:case"end":return r.stop()}}),r)})),function(){var e=this,t=arguments;return new Promise((function(n,a){var o=r.apply(e,t);function i(e){c(o,n,a,i,l,"next",e)}function l(e){c(o,n,a,i,l,"throw",e)}i(void 0)}))})();var r}};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCrumbLabels=function(e,t){var n;void 0===t&&(t={});return i((n={},n[a.PAYMENT_TYPE]=function(){return o.default.Messages.BILLING_STEP_PAYMENT_TYPE},n[a.PAYMENT_REQUEST_INFO]=function(){return o.default.Messages.BILLING_STEP_PAYMENT_INFO},n[a.PAYPAL]=function(){return o.default.Messages.BILLING_STEP_PAYPAL},n[a.PAYPAL_ADDRESS]=function(){return o.default.Messages.BILLING_STEP_ADDRESS},n[a.CREDIT_CARD_INFORMATION]=function(){return o.default.Messages.BILLING_STEP_CREDIT_CARD_INFORMATION},n[a.ADDRESS]=function(){return o.default.Messages.BILLING_STEP_ADDRESS},n[a.REVIEW]=function(){return o.default.Messages.BILLING_STEP_REVIEW},n[a.SELECT_PLAN]=function(){return o.default.Messages.BILLING_STEP_SELECT_PLAN},n[a.AWAITING_AUTHENTICATION]=function(){return o.default.Messages.BILLING_STEP_AWAITING_AUTHENTICATION},n[a.CONFIRM]=function(){return""},n),t)[e]()},t.errorToStep=function(e){if(null!=e){if(e.hasCardError())return a.CREDIT_CARD_INFORMATION;if(e.hasAddressError())return a.ADDRESS}return null},t.getStepIndex=function(e,t){return t.findIndex((function(t){return t===e}))},t.canGoBack=function(e,t){return e>0||Object.keys(t).length>0},t.Steps=void 0;var r,a,o=(r=n(6))&&r.__esModule?r:{default:r};function i(){return(i=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}).apply(this,arguments)}t.Steps=a,function(e){e.SELECT_PLAN="select_plan",e.PAYMENT_TYPE="payment_type",e.PAYPAL="paypal",e.PAYPAL_ADDRESS="paypal_address",e.PAYMENT_REQUEST_INFO="payment_request_info",e.CREDIT_CARD_INFORMATION="credit_card_information",e.ADDRESS="address",e.REVIEW="review",e.CONFIRM="confirm",e.AWAITING_AUTHENTICATION="awaiting_authentication"}(a||(t.Steps=a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(3)),a=d(n(2)),o=n(5691),i=n(5672),l=d(n(490)),u=n(295),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){p(o,r,a,i,l,"next",e)}function l(e){p(o,r,a,i,l,"throw",e)}i(void 0)}))}}var y=!1,m=null,_=null;function h(){y=!1,_=null}function E(e){var t=e.error,n=t.code,r=t.paymentId;if(n!==l.default.ErrorCodes.AUTHENTICATION_REQUIRED)return y=!1,!1;y=!0,m=r,function(e){g.apply(this,arguments)}(r)}function g(){return(g=v(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,u.authenticatePaymentIntentForPaymentId)(t);case 4:n=e.sent,null!=(r=n.error)&&a.default.dispatch({type:s.ActionTypes.PAYMENT_AUTHENTICATION_ERROR,error:new l.default(r)});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){var t=e.payment;if(!y||t.id!==m||![s.PaymentStatusTypes.COMPLETED,s.PaymentStatusTypes.CANCELED].includes(t.status))return!1;y=!1,_=null,m=null,a.default.wait(o.clearError),a.default.wait(i.clearPurchaseError)}var O=new(function(e){var t,n,r,a,o;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r=i,(a=[{key:"isAwaitingAuthentication",get:function(){return y}},{key:"error",get:function(){return _}},{key:"awaitingPaymentId",get:function(){return m}}])&&f(r.prototype,a),o&&f(r,o),i}(r.default.Store))(a.default,{BILLING_SUBSCRIPTION_UPDATE_START:function(e){return h()},PAYMENT_AUTHENTICATION_CLEAR_ERROR:function(e){return h()},PREMIUM_PAYMENT_ERROR_CLEAR:function(e){return h()},PREMIUM_PAYMENT_MODAL_CLOSE:function(e){return h()},PREMIUM_PAYMENT_MODAL_OPEN:function(e){return h()},PREMIUM_PAYMENT_SUBSCRIBE_START:function(e){return h()},PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS:function(e){return h()},PREMIUM_PAYMENT_UPDATE_SUCCESS:function(e){return h()},SKU_PURCHASE_MODAL_CLOSE:function(e){return h()},SKU_PURCHASE_MODAL_OPEN:function(e){return h()},SKU_PURCHASE_START:function(e){return h()},SKU_PURCHASE_SUCCESS:function(e){return h()},BILLING_SUBSCRIPTION_UPDATE_FAIL:E,PREMIUM_PAYMENT_SUBSCRIBE_FAIL:E,PREMIUM_PAYMENT_UPDATE_FAIL:E,SKU_PURCHASE_FAIL:E,GIFT_CODE_REDEEM_FAILURE:E,PAYMENT_AUTHENTICATION_ERROR:function(e){var t=e.error;_=t,y=!1},PAYMENT_UPDATE:S,BILLING_PAYMENT_FETCH_SUCCESS:S});t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateStripePaymentRequest=function(e){a.default.dispatch({type:o.ActionTypes.NEW_PAYMENT_SOURCE_STRIPE_PAYMENT_REQUEST_UPDATE,stripePaymentMethod:e})},t.updateCardInfo=function(e,t){a.default.dispatch({type:o.ActionTypes.NEW_PAYMENT_SOURCE_CARD_INFO_UPDATE,info:e,isValid:t})},t.clearCardInfo=function(){a.default.dispatch({type:o.ActionTypes.NEW_PAYMENT_SOURCE_CARD_INFO_UPDATE,info:{name:""},isValid:!1})},t.updateAddressInfo=function(e,t){a.default.dispatch({type:o.ActionTypes.NEW_PAYMENT_SOURCE_ADDRESS_INFO_UPDATE,info:e,isValid:t})},t.clearError=function(){a.default.dispatch({type:o.ActionTypes.NEW_PAYMENT_SOURCE_CLEAR_ERROR})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l=c(n(3)),u=c(n(14)),s=c(n(2)),d=c(n(16)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}d.default.isDesktop()&&(window.popupBridge={getReturnUrlPrefix:function(){if(null==o)throw new Error("popupBridgeState is unset");return u.default.getAPIBaseURL()+f.Endpoints.BILLING_BRAINTREE_POPUP_BRIDGE_CALLBACK_REDIRECT(o)},open:function(e){i=e,window.open(e),v.emitChange()}});var v=new(function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var l=o.prototype;return l.getClient=function(){return r},l.getPayPalClient=function(){return a},l.getLastURL=function(){return i},o}(l.default.Store))(s.default,{BRAINTREE_CREATE_CLIENT_SUCCESS:function(e){var t=e.client;r=t},BRAINTREE_CREATE_PAYPAL_CLIENT_SUCCESS:function(e){var t=e.paypalClient;a=t},BRAINTREE_POPUP_BRIDGE_CALLBACK:function(e){var t=e.state,n=e.path,r=e.query;if(t===o){var a=window.popupBridge.onComplete;"function"==typeof a&&a(null,{path:n,queryItems:r})}},BRAINTREE_POPUP_BRIDGE_STATE_UPDATE:function(e){var t=e.state;o=t},BRAINTREE_TEARDOWN_PAYPAL_CLIENT:function(e){a=null}}),y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(3)),i=n(57),l=E(n(473)),u=E(n(5851)),s=E(n(160)),d=E(n(5969)),f=E(n(55)),c=E(n(477)),p=n(131),v=n(402),y=n(1163),m=n(1),_=E(n(6)),h=E(n(6032));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={copyMode:d.default.Modes.DEFAULT},t._copyModeTimeout=new i.Timeout,t.handleGiftCodeCopy=function(e,n){var r=t.props.sku;null!=r&&(0,v.trackGiftCodeCopy)(new u.default({code:n,maxUses:1}),r);try{(0,y.copy)(e),t.setState({copyMode:d.default.Modes.SUCCESS})}catch(e){t.setState({copyMode:d.default.Modes.ERROR})}t._copyModeTimeout.start(1500,(function(){t.setState({copyMode:d.default.Modes.DEFAULT})}))},t.handleInventoryClick=function(){l.default.open(m.UserSettingsSections.INVENTORY),t.props.onClose()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var a,o,s,E=r.prototype;return E.componentWillUnmount=function(){this._copyModeTimeout.stop()},E.render=function(){var e,t=this,n=this.props,r=n.obscureGiftCode,a=n.giftCode,o=n.application,i=this.state.copyMode;switch(i){case d.default.Modes.SUCCESS:e=_.default.Messages.BILLING_GIFT_COPIED;break;case d.default.Modes.ERROR:e=_.default.Messages.FAILED;break;default:e=_.default.Messages.COPY}return S(f.default,{direction:f.default.Direction.VERTICAL,align:f.default.Align.CENTER},void 0,null!=o?S(c.default,{game:o,className:h.default.icon,size:c.default.Sizes.LARGE,skuId:this.iconSKUId}):null,S("div",{className:h.default.header},void 0,_.default.Messages.APPLICATION_STORE_PURCHASE_GIFT_CONFIRMATION_TITLE),S("div",{className:h.default.blurb},void 0,this.headerBlurb),S("div",{className:h.default.divider}),S(f.default,{direction:f.default.Direction.VERTICAL},void 0,S(p.FormTitle,{},void 0,_.default.Messages.BILLING_GIFT_LINK),null!=a?S(d.default,{hideMessage:r?_.default.Messages.GIFT_INVENTORY_HIDDEN:null,value:(0,v.getGiftCodeURL)(a),mode:i,text:e,onCopy:function(e){return t.handleGiftCodeCopy(e,a)},supportsCopy:y.SUPPORTS_COPY,className:h.default.copyInput,buttonColor:d.default.ButtonColors.BRAND,buttonLook:d.default.ButtonLooks.FILLED}):null,S("div",{className:h.default.subtext},void 0,_.default.Messages.APPLICATION_STORE_GIFT_PURCHASE_CONFIRMATION_SUBTEXT.format({onInventoryClick:this.handleInventoryClick}))))},a=r,(o=[{key:"iconSKUId",get:function(){var e=this.props,t=e.subscriptionPlan,n=e.sku;return null!=t?t.skuId:null!=n?n.id:null}},{key:"headerBlurb",get:function(){var e=this.props.subscriptionPlan,t=_.default.Messages.APPLICATION_STORE_GIFT_PURCHASE_CONFIRMATION_BLURB;return null!=e&&(t=(e.interval===m.SubscriptionIntervalTypes.MONTH?_.default.Messages.APPLICATION_STORE_GIFT_PURCHASE_CONFIRM_SUBSCRIPTION_MONTHLY:_.default.Messages.APPLICATION_STORE_GIFT_PURCHASE_CONFIRM_SUBSCRIPTION_YEARLY).format({skuName:e.skuId===m.PremiumSubscriptionSKUs.TIER_1?_.default.Messages.PREMIUM_TIER_1:_.default.Messages.PREMIUM_TIER_2,intervalCount:e.intervalCount})),t}}])&&O(a.prototype,o),s&&O(a,s),r}(a.Component);T.displayName="GiftPurchaseConfirmation";var C=o.default.connectStores([s.default],(function(){return{obscureGiftCode:s.default.enabled}}))(T);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,a.useRef)(e);(0,a.useEffect)((function(){t.current=e}),[e]),(0,a.useEffect)((function(){if(__OVERLAY__){var e=function(e){e.locked&&t.current()};return o.default.subscribe(i.ActionTypes.OVERLAY_SET_INPUT_LOCKED,e),function(){o.default.unsubscribe(i.ActionTypes.OVERLAY_SET_INPUT_LOCKED,e)}}}),[])};var r,a=n(0),o=(r=n(2))&&r.__esModule?r:{default:r},i=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(29)),i=p(n(55)),l=p(n(700)),u=n(131),s=p(n(6033)),d=n(1),f=p(n(6)),c=p(n(6089));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=[{type:d.PaymentSourceTypes.CARD,text:function(){return f.default.Messages.PAYMENT_SOURCE_CREDIT_CARD},iconType:l.default.Types.UNKNOWN},{type:d.PaymentSourceTypes.PAYPAL,text:function(){return f.default.Messages.PAYMENT_SOURCE_PAYPAL},iconType:l.default.Types.PAYPAL}],h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.onChooseType,n=e.className,r=e.onStripePaymentMethodReceived,a=e.allowStripeRequestPayments,d=a?y(s.default,{className:c.default.button,iconClassName:c.default.buttonIcon,paymentLabel:f.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_LABEL,onStripePaymentMethodReceived:r,onChooseType:t}):null,p=a?c.default.vertical:c.default.horizonal,v=a?i.default.Direction.VERTICAL:i.default.Direction.HORIZONTAL,m=_.map((function(e){return y(o.default,{onClick:function(){return t(e.type)},className:c.default.button},e.type,y(i.default,{align:i.default.Align.CENTER},void 0,y(l.default,{className:c.default.buttonIcon,type:e.iconType}),e.text()))}));return y(u.FormSection,{title:f.default.Messages.PAYMENT_SOURCE_TYPE_SELECT,className:n},void 0,y(i.default,{className:p,direction:v},void 0,m,d))},r}(a.PureComponent);h.displayName="ChoosePaymentSourceType";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=m(n(0)),o=v(n(3)),i=m(n(5692)),l=v(n(5839)),u=v(n(5693)),s=v(n(700)),d=v(n(153)),f=v(n(681)),c=v(n(6)),p=v(n(6090));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.componentDidMount=function(){null!=this.props.paypalClient&&i.tokenizePayPal()},a.componentWillUnmount=function(){i.teardown().then((function(){return i.createPayPalClient()}))},a.render=function(){var e=this.props,t=e.braintreeEmail,n=e.className,r=e.paypalClient;return _(f.default,{className:n,title:c.default.Messages.PAYMENT_SOURCE_PAYPAL_ACCOUNT},void 0,_("div",{className:p.default.inputWrapper},void 0,_(s.default,{type:s.default.Types.PAYPAL,className:p.default.paypalIcon}),_(d.default,{value:t,editable:!1,readOnly:!0,placeholder:null==r?c.default.Messages.PAYMENT_SOURCE_PAYPAL_LOADING:c.default.Messages.PAYMENT_SOURCE_CONFIRM_PAYPAL_DETAILS,inputClassName:p.default.paypalInput})))},r}(a.PureComponent);E.displayName="PaypalConnector";var g=o.default.connectStores([l.default,u.default],(function(){return{braintreeEmail:u.default.braintreeEmail,paypalClient:l.default.getPayPalClient()}}))(E);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentRequestStepBody=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(9)),o=d(n(700)),i=d(n(153)),l=d(n(681)),u=d(n(6)),s=d(n(6092));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=function(e){var t,n=e.className,r=e.submitting,d=(e.stripePaymentMethod||{}).card,f=d?o.default.getType(d.brand):o.default.Types.UNKNOWN;return c(l.default,{className:n,title:u.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_TITLE},void 0,c("div",{className:s.default.cardNumberWrapper},void 0,c(o.default,{className:(0,a.default)(s.default.cardIcon,(t={},t[s.default.submitting]=r,t)),type:f}),c(i.default,{value:r&&d?u.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_CREATING.format(d):void 0,editable:!1,readOnly:!0,placeholder:u.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_LOADING,inputClassName:s.default.cardNumberInput})))};t.PaymentRequestStepBody=p,p.displayName="PaymentRequestStepBody"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("title",{},void 0,"Nitro");function f(e){var t=e.width,n=void 0===t?106:t,r=e.height,a=void 0===r?26:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 106 26"}),d,s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M98.8266537 8.64800265L97.5788372 17.0822416C97.2940433 19.0754982 95.0485266 20.0010292 92.981582 20.0010292 91.0571496 20.0010292 89.1680861 19.0754982 89.4175111 17.2605602L90.6652125 8.64800265C90.9501215 6.76162212 93.1956383 5.80077257 95.2624676 5.80077257 97.3294121 5.80077257 99.1115628 6.76162212 98.8266537 8.64800265M96.2496839.0038079646L96.2503751.0000115044248 82.8208233.0000115044248C82.4777342.0000115044248 82.1864887.251383186 82.1368341.59030354L81.4839511 5.04596726C81.4228909 5.46254248 81.7462794 5.83609115 82.167825 5.83609115L84.6202551 5.83609115C84.8670304 5.83609115 85.0355795 6.08734779 84.9386897 6.31398496 84.6326976 7.03036549 84.4097703 7.8080646 84.2859219 8.64800265L83.0381053 17.2605602C82.2182861 23.0258876 87.0301735 25.9085513 92.2687909 25.9085513 97.7574094 25.9085513 103.139115 23.0258876 103.958934 17.2605602L105.206059 8.64800265C106.009634 2.99656903 101.367679.115400885 96.2496839.0038079646M15.5778562 11.7941867L15.6467505 15.9747796C15.648133 16.0607177 15.5902986 16.1363018 15.5068881 16.1574699L15.5067729 16.1574699 14.0843013 11.1148504C14.0822275 11.1071425 14.0795777 11.0996646 14.0763519 11.0923018L9.66308376.775018584C9.55432753.520885841 9.30421123.355912389 9.0273667.355912389L4.02607753.355912389C3.68126035.355912389 3.38920838.6097 3.34151232.950576106L.00682030635 24.7668062C-.0513596718 25.1820009.271568009 25.5526735.691385514 25.5526735L5.67355018 25.5526735C6.01882818 25.5526735 6.31122578 25.2981956 6.3583458 24.9566292L7.6643423 15.4949301C7.66560958 15.4857265 7.66618562 15.4762929 7.66607042 15.4669743L7.59475674 10.6052044 7.73715368 10.5697708 9.23116943 15.6125053C9.23335838 15.6196381 9.23589295 15.6267708 9.23888836 15.6336735L13.3663258 25.1370186C13.4758885 25.3893106 13.7250831 25.5526735 14.0004299 25.5526735L19.39573 25.5526735C19.7405472 25.5526735 20.0325992 25.2988858 20.0802953 24.9580097L23.4156785 1.14177965C23.4738585.726584956 23.1509308.355912389 22.7311133.355912389L17.782935.355912389C17.438233.355912389 17.146181.609469912 17.0983698.950346018L15.5795843 11.7654257C15.578317 11.7749743 15.577741 11.784523 15.5778562 11.7941867M25.2200758 25.5526274L30.2035078 25.5526274C30.5483249 25.5526274 30.8403769 25.2989549 30.888073 24.9579637L34.222765 1.14184867C34.280945.726653982 33.9580173.355981416 33.5381998.355981416L28.5547678.355981416C28.2100659.355981416 27.9180139.609653982 27.8702026.950645133L24.5355106 24.7667602C24.4773306 25.1819549 24.8002583 25.5526274 25.2200758 25.5526274M37.588782.910862832L36.9357838 5.3664115C36.8748388 5.78298673 37.1982273 6.15665044 37.6197729 6.15665044L42.8344271 6.15665044C43.2536686 6.15665044 43.5763658 6.52628761 43.5192227 6.94102212L41.0626451 24.7682788C41.005502 25.1830133 41.3281993 25.5526504 41.7474408 25.5526504L46.8027624 25.5526504C47.1481556 25.5526504 47.4405532 25.2980575 47.4875581 24.9564912L49.9960944 6.75280973C50.0430992 6.41112832 50.3354968 6.15665044 50.68089 6.15665044L56.2874814 6.15665044C56.6305704 6.15665044 56.9217007 5.90539381 56.9714705 5.56635841L57.6249296 1.11080973C57.6859898.694234513 57.3626013.320570796 56.9409404.320570796L38.2727712.320570796C37.9296821.320570796 37.6384366.571827434 37.588782.910862832M72.9157339 9.14614425C72.7371616 10.6051354 71.5970645 12.0642416 69.6364568 12.0642416L66.6908218 12.0642416C66.2704283 12.0642416 65.9472702 11.6925336 66.0063718 11.2768788L66.6298768 6.8920823C66.6782642 6.55178142 66.9700857 6.29891416 67.3143268 6.29891416L70.4562761 6.29891416C72.3453396 6.29891416 73.0936148 7.61571062 72.9157339 9.14614425M71.1691824.355958407L61.6845787.355958407C61.3397615.355958407 61.0477096.609630973 60.9998983.950622124L57.6652063 24.7667372C57.6070263 25.1819319 57.929954 25.5526044 58.3497715 25.5526044L63.4034802 25.5526044C63.7487582 25.5526044 64.0411558 25.2981265 64.0882759 24.9565602L65.0696166 17.8430292C65.0932342 17.6723035 65.2393178 17.5450646 65.4120144 17.5450646L66.0616716 17.5450646C66.1795293 17.5450646 66.2893224 17.6050027 66.3528019 17.7041708L71.1792055 25.2345071C71.3062798 25.4327283 71.5256356 25.5526044 71.7613509 25.5526044L78.0034289 25.5526044C78.5625328 25.5526044 78.8902992 24.9242327 78.5697909 24.4667018L73.5050221 17.2370912C73.383593 17.0637195 73.4460357 16.8224717 73.6364743 16.729631 76.8698986 15.1516841 78.7475566 13.5351973 79.3665685 9.03926814 80.0787836 3.13174602 76.3728918.355958407 71.1691824.355958407"})))}f.displayName="Nitro"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),s=E(n(6052)),d=E(n(6006)),f=E(n(6053)),c=E(n(1159)),p=E(n(153)),v=n(48),y=E(n(5847)),m=n(1),_=E(n(6)),h=E(n(5708));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,r){l||(l="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var i=new Array(o),u=0;u<o;u++)i[u]=arguments[u+3];t.children=i}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:l,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){return(I=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}).apply(this,arguments)}function T(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var C,b,M,N="US",A="CA",P=d.default.map((function(e){return{value:e.code,label:e.name}}));!function(e){e.NAME="name",e.COUNTRY="country",e.LINE1="line1",e.LINE2="line2",e.CITY="city",e.POSTAL_CODE="postalCode",e.STATE="state"}(C||(C={})),function(e){e.MODAL_US="modalUS",e.MODAL_INTL="modalInternational",e.SETTINGS_US="settingsUS",e.SETTINGS_INTL="settingsInternational"}(b||(b={})),function(e){e.EDIT="edit",e.CREATE="create"}(M||(M={}));var R=((r={})[N]=f.default,r[A]=s.default,r),L=((a={})[C.NAME]=function(e){return{name:C.NAME,title:function(){return _.default.Messages.BILLING_ADDRESS_NAME},autoComplete:"name",getClassNameForLayout:function(e){return[b.MODAL_US,b.MODAL_INTL].includes(e)?h.default.width100:h.default.width60},renderInput:function(e){return u.createElement(p.default,e)}}},a[C.COUNTRY]=function(e){return{name:C.COUNTRY,title:function(){return _.default.Messages.BILLING_ADDRESS_COUNTRY},autoComplete:"country",getClassNameForLayout:function(e){return[b.MODAL_US,b.MODAL_INTL].includes(e)?h.default.width100:h.default.width75},renderInput:function(e,t){e.layout;var n=e.onChange,r=T(e,["layout","onChange"]);return u.createElement(c.default,I({},r,{autofocus:!0,clearable:!1,disabled:t.mode===M.EDIT,options:P,onChange:function(t){var r=t.value;null!=n&&n(r,e.name)}}))}}},a[C.LINE1]=function(e){return{name:C.LINE1,title:function(){return _.default.Messages.BILLING_ADDRESS_ADDRESS},autoComplete:"address-line1",placeholder:function(){return _.default.Messages.BILLING_ADDRESS_ADDRESS_PLACEHOLDER},getClassNameForLayout:function(e){return[b.MODAL_US,b.MODAL_INTL].includes(e)?h.default.width100:h.default.width60},renderInput:function(e){return u.createElement(p.default,e)}}},a[C.LINE2]=function(e){return{name:C.LINE2,title:function(){return _.default.Messages.BILLING_ADDRESS_ADDRESS2},placeholder:function(){return _.default.Messages.BILLING_ADDRESS_ADDRESS2_PLACEHOLDER},autoComplete:"address-line2",getClassNameForLayout:function(e){return[b.MODAL_US,b.MODAL_INTL].includes(e)?h.default.width100:h.default.width40},renderInput:function(e){return u.createElement(p.default,e)}}},a[C.CITY]=function(e){return{name:C.CITY,title:function(){return _.default.Messages.BILLING_ADDRESS_CITY},autoComplete:"address-level2",placeholder:function(){return _.default.Messages.BILLING_ADDRESS_CITY_PLACEHOLDER},getClassNameForLayout:function(e){switch(e){case b.MODAL_INTL:case b.MODAL_US:return h.default.width100;case b.SETTINGS_INTL:return h.default.width60;case b.SETTINGS_US:default:return h.default.width50}},renderInput:function(e){return u.createElement(p.default,e)}}},a[C.POSTAL_CODE]=function(e){var t,n;switch(e){case N:t=_.default.Messages.BILLING_ADDRESS_ZIP_CODE,n=_.default.Messages.BILLING_ADDRESS_ZIP_CODE_PLACEHOLDER;break;case A:t=_.default.Messages.BILLING_ADDRESS_POSTAL_CODE,n=_.default.Messages.BILLING_ADDRESS_POSTAL_CODE_CANADA_PLACEHOLDER;break;default:t=_.default.Messages.BILLING_ADDRESS_POSTAL_CODE}return{name:C.POSTAL_CODE,title:function(){return t},autoComplete:"postal-code",placeholder:function(){return n},getClassNameForLayout:function(e){switch(e){case b.MODAL_INTL:return h.default.width100;case b.MODAL_US:return h.default.width50;case b.SETTINGS_INTL:return h.default.width30;case b.SETTINGS_US:default:return h.default.width25}},renderInput:function(e){return u.createElement(p.default,e)}}},a[C.STATE]=function(e){var t;switch(e){case N:t=_.default.Messages.BILLING_ADDRESS_STATE;break;case A:t=_.default.Messages.BILLING_ADDRESS_PROVINCE;break;default:t=_.default.Messages.BILLING_ADDRESS_REGION}return{name:C.STATE,title:function(){return t},autoComplete:"address-level1",getClassNameForLayout:function(e){switch(e){case b.MODAL_INTL:return h.default.width100;case b.MODAL_US:return h.default.width50;case b.SETTINGS_INTL:return h.default.width30;case b.SETTINGS_US:default:return h.default.width25}},renderInput:function(t){var n=R[e],r=!t.value||null!=n&&n.find((function(e){return e.value===t.value})),a=t.layout,o=t.onChange,i=T(t,["layout","onChange"]);return[N,A].includes(e)&&r?u.createElement(c.default,I({},i,{menuPlacement:[b.MODAL_US,b.MODAL_INTL].includes(a)?c.default.MenuPlacements.TOP:void 0,clearable:!1,options:n,onChange:function(e){var n=e.value;null!=o&&o(n,t.name)}})):u.createElement(p.default,t)}}},a),D=((o={})[b.MODAL_US]=[[L[C.COUNTRY]],[L[C.LINE1]],[L[C.LINE2]],[L[C.CITY]],[L[C.STATE],L[C.POSTAL_CODE]]],o[b.MODAL_INTL]=[[L[C.COUNTRY]],[L[C.LINE1]],[L[C.LINE2]],[L[C.CITY]],[L[C.STATE]],[L[C.POSTAL_CODE]]],o[b.SETTINGS_US]=[[L[C.NAME]],[L[C.LINE1],L[C.LINE2]],[L[C.CITY],L[C.STATE],L[C.POSTAL_CODE]],[L[C.COUNTRY]]],o[b.SETTINGS_INTL]=[[L[C.NAME]],[L[C.LINE1],L[C.LINE2]],[L[C.CITY]],[L[C.STATE],L[C.POSTAL_CODE]],[L[C.COUNTRY]]],o),w=function(e){var t,n;function r(){for(var t,n,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(n=e.call.apply(e,[this].concat(a))||this).state={values:(t={},t[C.NAME]=n.props[C.NAME],t[C.COUNTRY]=n.props[C.COUNTRY],t[C.LINE1]=n.props[C.LINE1],t[C.LINE2]=n.props[C.LINE2],t[C.CITY]=n.props[C.CITY],t[C.POSTAL_CODE]=n.props[C.POSTAL_CODE],t[C.STATE]=n.props[C.STATE],t),dirtyFields:{},errors:{}},n.handleFieldBlur=function(){n.setState({errors:n.validateForm(!0)})},n.handleFieldChange=function(e,t){var r,a;if(t){var o=n.state,i=o.values,l=o.errors,u=o.dirtyFields;delete l[t],n.setState({values:I({},i,(r={},r[t]=e,r)),dirtyFields:I({},u,(a={},a[t]=!0,a)),errors:l})}},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a=r.prototype;return a.componentDidMount=function(){this.handleInfoChange()},a.componentDidUpdate=function(e,t){this.state!==t&&this.handleInfoChange()},a.validateForm=function(e){var t=this.state,n=t.values,r=t.dirtyFields,a={};e&&!r[C.NAME]||n[C.NAME]||this.props.mode!==M.EDIT||(a[C.NAME]=_.default.Messages.BILLING_ADDRESS_NAME_ERROR_REQUIRED),e&&!r[C.COUNTRY]||n[C.COUNTRY]||(a[C.COUNTRY]=_.default.Messages.BILLING_ADDRESS_COUNTRY_ERROR_REQUIRED),e&&!r[C.LINE1]||n[C.LINE1]||(a[C.LINE1]=_.default.Messages.BILLING_ADDRESS_ADDRESS_ERROR_REQUIRED),e&&!r[C.CITY]||n[C.CITY]||(a[C.CITY]=_.default.Messages.BILLING_ADDRESS_CITY_ERROR_REQUIRED);var o=n[C.COUNTRY];switch(o){case N:if(!e||r[C.POSTAL_CODE]){var i=n[C.POSTAL_CODE];i?5!==i.length?a[C.POSTAL_CODE]=_.default.Messages.BILLING_ADDRESS_ZIP_CODE_ERROR_LENGTH:/^\d{5}$/.test(i)||(a[C.POSTAL_CODE]=_.default.Messages.BILLING_ADDRESS_ZIP_CODE_INVALID):a[C.POSTAL_CODE]=_.default.Messages.BILLING_ADDRESS_ZIP_CODE_ERROR_REQUIRED}e&&!r[C.STATE]||n[C.STATE]||(a[C.STATE]=_.default.Messages.BILLING_ADDRESS_STATE_ERROR_REQUIRED);break;case A:e&&!r[C.POSTAL_CODE]||n[C.POSTAL_CODE]||(a[C.POSTAL_CODE]=_.default.Messages.BILLING_ADDRESS_POSTAL_CODE_ERROR_REQUIRED),e&&!r[C.STATE]||n[C.STATE]||(a[C.STATE]=_.default.Messages.BILLING_ADDRESS_PROVINCE_ERROR_REQUIRED);break;default:e&&!r[C.POSTAL_CODE]||n[C.POSTAL_CODE]||m.COUNTRIES_WITHOUT_POSTAL_CODES.includes(o)||(a[C.POSTAL_CODE]=_.default.Messages.BILLING_ADDRESS_POSTAL_CODE_ERROR_REQUIRED)}return a},a.handleInfoChange=function(){var e=this.state,t=e.values,n=e.dirtyFields,r=this.validateForm(!1);this.props.onBillingAddressChange(t,0===Object.keys(r).length,Object.keys(n).length>0)},a.render=function(){var e=this.state,t=e.errors,n=e.values,r=this.props,a=r.layout,o=r.mode,i=r.className,l=r.error,u=D[a];if(null==u)throw new Error("Provide a proper layout property.");var s=n[C.COUNTRY],d=u.map((function(e){var t=e.map((function(e){return e(s)})).filter(v.isNotNullish);return t.length>0?{fields:t}:null})).filter(v.isNotNullish);return S(y.default,{className:i,form:d,layout:a,values:n,errors:t,formError:l,onFieldChange:this.handleFieldChange,onFieldBlur:this.handleFieldBlur,mode:o})},r}(u.PureComponent);w.displayName="AddressForm",w.Layouts=b,w.Modes=M,w.defaultProps=((i={})[C.NAME]="",i[C.COUNTRY]="",i[C.LINE1]="",i[C.LINE2]="",i[C.CITY]="",i[C.POSTAL_CODE]="",i[C.STATE]="",i.layout=b.MODAL_US,i.mode=M.CREATE,i.error=null,i);var j=w;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(55)),l=n(131),u=s(n(5708));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={changedSinceError:new Set},t.renderFormSection=function(e){var n=t.props,r=n.values,a=n.onFieldChange,i=n.onFieldFocus,u=n.onFieldBlur,s=n.layout,d=p(n,["values","onFieldChange","onFieldFocus","onFieldBlur","layout"]),v=e.getClassNameForLayout,y=e.renderInput,m=e.title,_=e.name,h=e.placeholder,E=c({},p(e,["getClassNameForLayout","renderInput","title","name","placeholder"]),{placeholder:h&&h(),layout:s,error:t.getError(_),value:r[_],name:_,onChange:a,onFocus:i,onBlur:u});return f(l.FormSection,{className:(0,o.default)(v&&v(s)),title:m()},_,y(E,d))},t.renderFormRow=function(e){var n=e.fields.map(t.renderFormSection);return f(i.default,{className:(0,o.default)(u.default.row,e.className)},e.fields.map((function(e){return e.name})).join(""),n)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.componentDidUpdate=function(e){if(this.props.formError!==e.formError)this.setState({changedSinceError:new Set});else if(null!=this.props.formError){var t=this.state.changedSinceError;this.getChangedValues(e).forEach((function(e){return t.add(e)})),this.setState({changedSinceError:t})}},a.getChangedValues=function(e){var t=this.props.values,n=e.values;return Object.keys(t).filter((function(e){return t[e]!==n[e]}))},a.getError=function(e){var t=this.props,n=t.errors,r=t.formError;return null!=n[e]?n[e]:null==r||this.state.changedSinceError.has(e)?null:r.getFieldMessage(e)},a.render=function(){var e=this.props,t=e.form;return f("div",{className:e.className},void 0,t.map(this.renderFormRow))},r}(a.PureComponent);y.displayName="FormRenderer";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);function i(){return(i=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}).apply(this,arguments)}var l={setDesktopType:function(e){a.default.dispatch({type:o.ActionTypes.NOTIFICATIONS_SET_DESKTOP_TYPE,desktopType:e})},setTTSType:function(e){a.default.dispatch({type:o.ActionTypes.NOTIFICATIONS_SET_TTS_TYPE,ttsType:e})},setDisabledSounds:function(e){a.default.dispatch({type:o.ActionTypes.NOTIFICATIONS_SET_DISABLED_SOUNDS,sounds:e})},setDisableUnreadBadge:function(e){a.default.dispatch({type:o.ActionTypes.NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE,disableUnreadBadge:e})},setTaskbarFlash:function(e){a.default.dispatch({type:o.ActionTypes.NOTIFICATIONS_SET_TASKBAR_FLASH,taskbarFlash:e})},setPermissionsState:function(e,t){a.default.dispatch({type:o.ActionTypes.NOTIFICATIONS_SET_PERMISSION_STATE,enabled:e,source:t})},showNotification:function(e,t,n,r){void 0===r&&(r={}),a.default.dirtyDispatch({type:o.ActionTypes.NOTIFICATION_CREATE,icon:e,title:t,body:n,options:i({},r,{onClick:function(){r.onClick&&r.onClick(),a.default.dirtyDispatch({type:o.ActionTypes.NOTIFICATION_CLICK})}})})},clickedNotification:function(){a.default.dirtyDispatch({type:o.ActionTypes.NOTIFICATION_CLICK})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCountryCodesByCountryName=u,t.getCountryCodeByAlpha2=function(e){return a.default.find((function(t){return t.alpha2===e}))},t.getDefaultCountryCode=function(){var e=u(o.PHONE_DEFAULT_COUNTRY_CODE_NAME);return(0,r.default)(e,"Default country code cannot be missing."),e},t.getI18NName=function(e){return i.default.Messages["COUNTRY_NAME_"+e]};var r=l(n(23)),a=l(n(5699)),o=n(5831),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return a.default.find((function(t){return t.name===e}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=h(n(5994)),l=h(n(5995)),u=h(n(12)),s=h(n(29)),d=h(n(55)),f=n(85),c=n(131),p=n(35),v=n(41),y=h(n(24)),m=h(n(6)),_=h(n(6075));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e){var t=e.onClose,n=(0,o.useStateFromStores)([u.default],(function(){return u.default.getNullableCurrentUser()}));function r(){null==t||t()}function d(){r(),(0,v.openModal)((function(e){return a.createElement(l.default,e)}))}return null==(null==n?void 0:n.email)?g(s.default,{onClick:d,color:s.default.Colors.BRAND,look:s.default.Looks.FILLED},void 0,m.default.Messages.ADD_EMAIL_SHORT):a.createElement(a.Fragment,null,g(s.default,{onClick:d,color:s.default.Colors.PRIMARY,look:s.default.Looks.LINK},void 0,m.default.Messages.CHANGE_EMAIL_SHORT),g(i.default,{color:s.default.Colors.BRAND,onClick:r}))}function O(e){var t=e.onClose,n=e.transitionState,r=(0,f.useUID)();return g(p.ModalRoot,{transitionState:n,"aria-labelledby":r},void 0,g(p.ModalHeader,{id:r},void 0,g(c.FormTitle,{tag:c.FormTitleTags.H4},void 0,m.default.Messages.PREMIUM_NOT_VERIFIED)),g(p.ModalContent,{},void 0,g("div",{className:_.default.imageUnverified}),g(y.default,{size:y.default.Sizes.SIZE_16,className:_.default.message},void 0,m.default.Messages.PREMIUM_NOT_VERIFIED_BODY)),g(p.ModalFooter,{},void 0,g(d.default,{justify:d.default.Justify.END},void 0,g(S,{onClose:t}))))}O.displayName="UnverifiedEmailModal";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GiftCodeFlags=void 0;var r=u(n(5)),a=u(n(62)),o=n(99),i=u(n(1192)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=Object.freeze({PAYMENT_SOURCE_REQUIRED:1,EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED:2,NOT_SELF_REDEEMABLE:4});t.GiftCodeFlags=f;var c=function(e){var t,n;function a(t){var n;return(n=e.call(this)||this).userId=t.userId,n.code=t.code,n.skuId=t.skuId,n.uses=t.uses,n.maxUses=t.maxUses,n.expiresAt=t.expiresAt,n.redeemed=t.redeemed,n.storeListingId=t.storeListingId,n.subscriptionPlanId=t.subscriptionPlanId,n.subscriptionPlan=t.subscriptionPlan,n.revoked=t.revoked,n.entitlementBranches=t.entitlementBranches,n.flags=t.flags,n.subscriptionTrial=t.subscriptionTrial,n.promotion=t.promotion,n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),a.createFromServer=function(e){return new a({userId:null!=e.user?e.user.id:null,code:e.code,skuId:e.sku_id,uses:e.uses,maxUses:e.max_uses,storeListingId:null!=e.store_listing?e.store_listing.id:null,expiresAt:null!=e.expires_at?(0,r.default)(e.expires_at):null,redeemed:e.redeemed,subscriptionPlanId:null!=e.subscription_plan?e.subscription_plan.id:e.subscription_plan_id,subscriptionPlan:null!=e.subscription_plan?i.default.createFromServer(e.subscription_plan):null,revoked:!1,entitlementBranches:null!=e.entitlement_branches?e.entitlement_branches:null,flags:null!=e.flags?e.flags:0,subscriptionTrial:null!=e.subscription_trial?{id:e.subscription_trial.id,interval:e.subscription_trial.interval,intervalCount:e.subscription_trial.interval_count,skuId:e.subscription_trial.sku_id}:null,promotion:null!=e.promotion?{id:e.promotion.id,startDate:e.promotion.start_date,endDate:e.promotion.end_date,inboundHeaderText:e.promotion.inbound_header_text,inboundBodyText:e.promotion.inbound_body_text}:null})};var u,c,p,v=a.prototype;return v.isExpired=function(){var e=this.expiresAt;return null!=e&&(0,r.default)().isAfter(e)},v.toString=function(){return this.code},u=a,(c=[{key:"hasMultipleCopies",get:function(){return this.maxUses>1}},{key:"isClaimed",get:function(){return this.uses>=this.maxUses}},{key:"remainingUses",get:function(){return this.maxUses-this.uses}},{key:"isSubscription",get:function(){return null!=this.subscriptionPlanId}},{key:"premiumSubscriptionType",get:function(){return this.isSubscription&&l.PremiumSubscriptionSKUToPremiumType[this.skuId]||null}},{key:"isSelfRedeemable",get:function(){return!(0,o.hasFlag)(this.flags,f.NOT_SELF_REDEEMABLE)}},{key:"isExistingPremiumSubscriptionDisallowed",get:function(){return(0,o.hasFlag)(this.flags,f.EXISTING_PREMIUM_SUBSCRIPTION_DISALLOWED)}},{key:"analyticsData",get:function(){return{gift_code:this.code,gift_code_max_uses:this.maxUses}}}])&&s(u.prototype,c),p&&s(u,p),a}(a.default);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(275);n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=null,d=null,f=null;function c(e){var t=e.error;s=t}function p(){s=null}var v=new(function(e){var t,n,r,a,o;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),i.prototype.getGiftCode=function(e){return e===f?d:null},r=i,(a=[{key:"paymentError",get:function(){return s}}])&&l(r.prototype,a),o&&l(r,o),i}(r.default.Store))(a.default,{PREMIUM_PAYMENT_SUBSCRIBE_FAIL:c,PREMIUM_PAYMENT_UPDATE_FAIL:c,PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS:function(e){p()},PREMIUM_PAYMENT_UPDATE_SUCCESS:function(e){return p()},PREMIUM_PAYMENT_ERROR_CLEAR:function(e){return p()},BRAINTREE_TOKENIZE_PAYPAL_FAIL:function(e){var t=e.message,n=e.code;s=new o.BillingError(t,n)},SKU_PURCHASE_SUCCESS:function(e){d=e.giftCode,f=e.skuId},SKU_PURCHASE_FAIL:function(e){s=e.error},GIFT_CODE_CREATE:function(e){var t=e.giftCode;if(0!==t.uses||t.sku_id!==f)return!1;d=t.code}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=f(n(153)),l=f(n(5847)),u=f(n(6035)),s=f(n(6)),d=f(n(5708));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e){var t,n,r=e.onCardInfoChange,f=e.error,c=o.useState(!1),y=c[0],m=c[1],_=o.useState({}),h=_[0],E=_[1],g=o.useState(""),S=g[0],O=g[1],I=o.useState(!1),T=I[0],C=I[1],b=o.useState({}),M=b[0],N=b[1];function A(e,t){t!==!!h[e]&&(E((function(n){var r;return v({},n,((r={})[e]=t,r))})),P(S))}function P(e){var t=h[a.CARD_NUMBER]&&h[a.EXPIRATION_DATE]&&h[a.CVC]&&""!==e&&0===Object.keys(M).length;r({name:e},!!t)}var R=((t={})[a.CARD_NUMBER]={name:a.CARD_NUMBER,title:function(){return s.default.Messages.CREDIT_CARD_NUMBER},getClassNameForLayout:function(){return d.default.width100},renderInput:function(){return p(u.default,{stripeType:a.CARD_NUMBER,flipped:y,updateCompleted:function(e){return A(a.CARD_NUMBER,e)}})}},t[a.EXPIRATION_DATE]={name:a.EXPIRATION_DATE,title:function(){return s.default.Messages.CREDIT_CARD_EXPIRATION_DATE},getClassNameForLayout:function(){return d.default.width50},renderInput:function(){return p(u.default,{stripeType:a.EXPIRATION_DATE,updateCompleted:function(e){return A(a.EXPIRATION_DATE,e)}})}},t[a.CVC]={name:a.CVC,title:function(){return s.default.Messages.CREDIT_CARD_CVC},getClassNameForLayout:function(){return d.default.width50},renderInput:function(){return p(u.default,{stripeType:a.CVC,updateCompleted:function(e){return A(a.CVC,e)},onFocus:function(){m(!0)},onBlur:function(){m(!1)}})}},t[a.NAME]={name:a.NAME,title:function(){return s.default.Messages.CREDIT_CARD_NAME_ON_CARD},autoComplete:"cc-name",placeholder:function(){return s.default.Messages.CREDIT_CARD_NAME},getClassNameForLayout:function(){return d.default.width100},renderInput:function(e){return o.createElement(i.default,e)}},t),L=[{fields:[R[a.CARD_NUMBER]]},{fields:[R[a.EXPIRATION_DATE],R[a.CVC]]},{fields:[R[a.NAME]]}];return p(l.default,{form:L,errors:M,formError:f,values:(n={},n[a.NAME]=S,n),onFieldChange:function(e){var t;T||""===e||C(!0),N(T&&""===e?((t={})[a.NAME]=s.default.Messages.PAYMENT_SOURCE_NAME_ERROR_REQUIRED,t):{}),O(e),P(e)}})}!function(e){e.CARD_NUMBER="cardNumber",e.EXPIRATION_DATE="cardExpiry",e.CVC="cardCvc",e.NAME="name"}(a||(a={})),y.displayName="CardForm";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumModalHeaderAnimationTier1=u,t.PremiumModalHeaderAnimationTier2=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(5703),o=n(5855);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e){var t=e.currentStep,n=e.purchaseState,r=e.className,i=(0,o.usePaymentModalAnimationScene)({purchaseState:n,currentStep:t,initialScene:a.PremiumPaymentAnimationTier1.Scenes.NORMAL,purchaseScene:a.PremiumPaymentAnimationTier1.Scenes.SPEED_START,errorScene:a.PremiumPaymentAnimationTier1.Scenes.NORMAL,successScene:a.PremiumPaymentAnimationTier1.Scenes.FINISH}),u=i[0],s=i[1];return l(a.PremiumPaymentAnimationTier1,{className:r,nextScene:u,onScenePlay:function(e){return s(a.PremiumPaymentAnimationTier1.getNextScene(e))},pauseWhileUnfocused:!1})}function s(e){var t=e.currentStep,n=e.purchaseState,r=e.className,i=(0,o.usePaymentModalAnimationScene)({purchaseState:n,currentStep:t,initialScene:a.PremiumPaymentAnimationTier2.Scenes.IDLE_ENTRY,purchaseScene:a.PremiumPaymentAnimationTier2.Scenes.BOOST_START,errorScene:a.PremiumPaymentAnimationTier2.Scenes.ERROR,successScene:a.PremiumPaymentAnimationTier2.Scenes.BOOST_END}),u=i[0],s=i[1];return l(a.PremiumPaymentAnimationTier2,{className:r,nextScene:u,onScenePlay:function(e){return s(a.PremiumPaymentAnimationTier2.getNextScene(e))},pauseWhileUnfocused:!1})}u.displayName="PremiumModalHeaderAnimationTier1",s.displayName="PremiumModalHeaderAnimationTier2"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentModalAnimationScene=function(e){var t=e.purchaseState,n=e.currentStep,i=e.initialScene,l=e.purchaseScene,u=e.errorScene,s=e.successScene,d=(0,r.useState)(i),f=d[0],c=d[1];return(0,r.useEffect)((function(){t===o.PurchaseState.PURCHASING?c(l):t===o.PurchaseState.FAIL&&c(u)}),[t,l,u]),(0,r.useEffect)((function(){n===a.Step.CONFIRM&&c(s)}),[n,s]),[f,c]};var r=n(0),a=n(692),o=n(1173)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=O(n(0)),o=n(3),i=g(n(5674)),l=g(n(485)),u=g(n(160)),s=g(n(151)),d=n(131),f=O(n(96)),c=n(281),p=n(1237),v=g(n(5678)),y=n(5676),m=n(5700),_=n(1),h=g(n(6)),E=g(n(5711));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t,n=e.paymentSources,r=e.paymentSourceId,g=e.plan,S=e.isGift,O=void 0!==S&&S,T=e.isTrial,C=void 0!==T&&T,b=e.proratedInvoicePreview,M=e.renewalInvoicePreview,N=e.onPaymentSourceChange,A=e.handlePaymentSourceAdd,P=e.setHasAcceptedTerms,R=e.legalTermsNodeRef,L=e.hasLegalTermsFlash,D=(0,o.useStateFromStores)([u.default],(function(){return u.default.enabled})),w=(0,m.useSubscriptionEntitlements)(g.id,O),j=w.hasEntitlements,k=w.entitlements;if(O)t=I(y.SubscriptionInvoiceGift,{plan:g,className:E.default.invoice});else{if(null==b||null==M)return I(s.default,{className:E.default.reviewLoader});t=I(p.PremiumInvoiceTable,{className:E.default.invoice},void 0,I(p.PremiumInvoiceTableHeader,{},void 0,h.default.Messages.BILLING_SWITCH_PLAN_PURCHASE_DETAILS),I(y.PremiumSubscriptionChangePlanInvoiceRows,{invoice:b,newPlan:g}),I(y.SubscriptionInvoiceFooter,{renewalInvoice:M,isTrial:C}))}var U=function(e,t){var n=null,r=null,a=null;if(e&&null!=t){var o=f.default.getIntervalForInvoice(t),i=(0,c.formatRate)((0,c.formatPrice)(t.total,t.currency),o),l=t.subscriptionPeriodEnd;n=h.default.Messages.BILLING_LEGAL_MUMBO_JUMBO_TRIAL_LABEL.format({url:_.MarketingURLs.TERMS,rate:i,renewalDate:l}),r=E.default.trialCheckbox,a=E.default.trialCheckboxLabel}return{checkboxLabel:n,checkboxClassname:r,checkboxLabelClassname:a}}(C,M),G=U.checkboxLabel,F=U.checkboxClassname,B=U.checkboxLabelClassname,H=h.default.Messages.BILLING_SELECT_PLAN_GUILD_SUBSCRIPTION.format({planName:g.name});return O?H=h.default.Messages.PAYMENT_MODAL_SUBTITLE_PREMIUM_GIFT:(0,f.isPremiumSubscriptionPlan)(g.id)&&(H=f.default.getBillingReviewSubheader(null,g.id)),I("div",{className:E.default.stepBody},void 0,I(d.FormTitle,{tag:d.FormTitleTags.H5,className:E.default.invoiceHeader},void 0,H),t,I("div",{className:E.default.paymentSourceWrapper},void 0,I(d.FormTitle,{tag:d.FormTitleTags.H5},void 0,h.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_TITLE),I(i.default,{paymentSources:Object.values(n),selectedPaymentSourceId:r,prependOption:j?{label:h.default.Messages.ATTACH_PAYMENT_SOURCE_PROMPT_OPTION_OPTIONAL,value:null}:null,onChange:N,onPaymentSourceAdd:A,hidePersonalInformation:D}),j&&null==r?I("div",{className:E.default.paymentSourceOptionalWarning},void 0,h.default.Messages.ATTACH_PAYMENT_SOURCE_OPTIONAL_WITH_ENTITLEMENTS_WARNING.format({months:k.length})):null),a.createElement(v.default,{isActive:L,ref:R},I(l.default,{onChange:P,forceShow:!0,className:E.default.purchaseTerms,checkboxLabel:G,checkboxClassname:F,checkboxLabelClassname:B,finePrint:C?null:f.default.getLegalString(g.interval,O)})))}T.displayName="ReviewStepBody"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ShineAnimation=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=y(n(9)),u=y(n(133)),s=y(n(273)),d=n(1149),f=n(5828),c=n(483),p=n(1),v=y(n(6100));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=(0,c.hexWithOpacity)(p.HEXColors.WHITE,0),g=Object.freeze({DURATION:(r={},r[p.PremiumTypes.TIER_1]=1e3,r[p.PremiumTypes.TIER_2]=1500,r),DELAY:(a={},a[p.PremiumTypes.TIER_1]=400,a[p.PremiumTypes.TIER_2]=2200,a),FLASH_TIME_PERCENT:.72,FLASH_DURATION_PERCENT:.08}),S=(0,u.default)({PREMIUM_ACTIVATED:null,PREMIUM_UPDATED:null,PREMIUM_UPGRADED:null,PREMIUM_GUILD_SUBSCRIPTION_ACTIVATED:null}),O=_("g",{fill:"currentColor"},void 0,_("path",{d:"M50.61,20.21a3.57,3.57,0,0,1-.25.77,3.72,3.72,0,0,1-.49.88,5.79,5.79,0,0,1-.75.85l0,0a.89.89,0,0,0,0,1.26,3.07,3.07,0,0,1,.49.54A4.29,4.29,0,0,1,50.25,26a3.78,3.78,0,0,1,.11,1.45,6.31,6.31,0,0,1-.22,1.27,7,7,0,0,1-2.56,3.71,8.42,8.42,0,0,1-5,1.32H35.24a.57.57,0,0,1-.56-.66l2.56-18.3a.58.58,0,0,1,.56-.5h7.31a6.93,6.93,0,0,1,2.5.42,4.83,4.83,0,0,1,1.87,1.18,4.1,4.1,0,0,1,1.05,1.84A5.45,5.45,0,0,1,50.61,20.21ZM44,21.88a1.93,1.93,0,0,0,1.43-.52,2,2,0,0,0,.63-1.21A1.53,1.53,0,0,0,45.83,19a1.45,1.45,0,0,0-1.3-.55H42.17a.57.57,0,0,0-.56.49l-.34,2.32a.57.57,0,0,0,.57.65Zm-1,7.53a2.44,2.44,0,0,0,1.74-.6,2.26,2.26,0,0,0,.74-1.38,1.77,1.77,0,0,0-.36-1.37,1.82,1.82,0,0,0-1.57-.63H41.19a.57.57,0,0,0-.57.49l-.39,2.84a.57.57,0,0,0,.56.65Z"}),_("path",{d:"M54.18,20.68a6.89,6.89,0,0,1,1.1-2.92,7.91,7.91,0,0,1,2.12-2.08,9.44,9.44,0,0,1,2.75-1.27,11.56,11.56,0,0,1,3-.41,10.39,10.39,0,0,1,2.91.41,6.66,6.66,0,0,1,2.42,1.27A5.18,5.18,0,0,1,70,17.76a5.44,5.44,0,0,1,.28,2.92l-1,6.64a6.9,6.9,0,0,1-1.1,2.94,7.59,7.59,0,0,1-2.06,2.09,9.41,9.41,0,0,1-2.75,1.24,11.88,11.88,0,0,1-3.1.41,10.39,10.39,0,0,1-2.91-.41A7,7,0,0,1,55,32.35a5.53,5.53,0,0,1-1.54-2.09,5.63,5.63,0,0,1-.27-2.94Zm4,6.64a1.42,1.42,0,0,0,.14.94,2.2,2.2,0,0,0,.6.66,3.28,3.28,0,0,0,.91.38,4.61,4.61,0,0,0,1.1.14,5.15,5.15,0,0,0,1.18-.14,4.24,4.24,0,0,0,1.1-.41A2.63,2.63,0,0,0,64,28.2a2,2,0,0,0,.44-1l1-6.51A1.6,1.6,0,0,0,64.71,19a2.6,2.6,0,0,0-.94-.41,4,4,0,0,0-1.12-.14,4.94,4.94,0,0,0-1.21.14,3.83,3.83,0,0,0-1.07.41,3.19,3.19,0,0,0-.86.68,2.06,2.06,0,0,0-.41,1Z"}),_("path",{d:"M73.53,20.68a6.89,6.89,0,0,1,1.1-2.92,7.91,7.91,0,0,1,2.12-2.08,9.44,9.44,0,0,1,2.75-1.27,11.56,11.56,0,0,1,3-.41,10.39,10.39,0,0,1,2.91.41,6.66,6.66,0,0,1,2.42,1.27,5.18,5.18,0,0,1,1.54,2.08,5.44,5.44,0,0,1,.28,2.92l-1,6.64a6.9,6.9,0,0,1-1.1,2.94,7.59,7.59,0,0,1-2.06,2.09,9.41,9.41,0,0,1-2.75,1.24,11.88,11.88,0,0,1-3.1.41,10.39,10.39,0,0,1-2.91-.41,7,7,0,0,1-2.4-1.24,5.41,5.41,0,0,1-1.53-2.09,5.52,5.52,0,0,1-.28-2.94Zm4,6.64a1.48,1.48,0,0,0,.14.94,2.2,2.2,0,0,0,.6.66,3.28,3.28,0,0,0,.91.38,4.61,4.61,0,0,0,1.1.14,5.15,5.15,0,0,0,1.18-.14,4.24,4.24,0,0,0,1.1-.41,2.63,2.63,0,0,0,.82-.69,2,2,0,0,0,.44-1l1-6.51a1.8,1.8,0,0,0-.11-1,1.72,1.72,0,0,0-.58-.68,2.6,2.6,0,0,0-.94-.41A4,4,0,0,0,82,18.48a4.94,4.94,0,0,0-1.21.14,3.83,3.83,0,0,0-1.07.41,3.19,3.19,0,0,0-.86.68,2.06,2.06,0,0,0-.41,1Z"}),_("path",{d:"M93.91,28a.66.66,0,0,1,.88.09,3.75,3.75,0,0,0,1.34.91,5.57,5.57,0,0,0,2.19.47,4.1,4.1,0,0,0,1.76-.36A1.47,1.47,0,0,0,101,28a.93.93,0,0,0-.16-.77,1.88,1.88,0,0,0-.69-.58,4.29,4.29,0,0,0-1-.36A7.84,7.84,0,0,0,97.94,26a7.78,7.78,0,0,1-2.2-.72A6.33,6.33,0,0,1,94,23.89a5.29,5.29,0,0,1-1.07-2,5.48,5.48,0,0,1-.08-2.53,6.12,6.12,0,0,1,1-2.5,6.25,6.25,0,0,1,1.85-1.67A7.55,7.55,0,0,1,98,14.27a12.85,12.85,0,0,1,2.64-.27,11,11,0,0,1,1.73.14,6.34,6.34,0,0,1,3.16,1.45,7.79,7.79,0,0,1,1,1.05.55.55,0,0,1-.13.79l-2.68,1.86a.65.65,0,0,1-.78-.07,3.75,3.75,0,0,0-1.15-.69,5.23,5.23,0,0,0-1.74-.35,3.22,3.22,0,0,0-1.62.33,1.33,1.33,0,0,0-.77,1.09,1.26,1.26,0,0,0,.55,1.3,5.76,5.76,0,0,0,1.79.65,19.61,19.61,0,0,1,2.45.66,5.4,5.4,0,0,1,2,1.16,4.18,4.18,0,0,1,1.24,1.95,6.27,6.27,0,0,1,0,3,6.49,6.49,0,0,1-2.8,4.26,8,8,0,0,1-2.48,1.07,11.5,11.5,0,0,1-2.94.36,8.09,8.09,0,0,1-1.84-.22,9.22,9.22,0,0,1-1.84-.66A8.52,8.52,0,0,1,92.22,32a6.61,6.61,0,0,1-1.06-1.12.55.55,0,0,1,.1-.74Z"}),_("path",{d:"M119.86,18.75a.57.57,0,0,0-.57.5l-1.92,14a.58.58,0,0,1-.57.5H113a.58.58,0,0,1-.57-.66L114.3,19.4a.58.58,0,0,0-.57-.65H109.8a.57.57,0,0,1-.57-.65l.49-3.36a.58.58,0,0,1,.57-.49h14.32a.57.57,0,0,1,.56.65l-.49,3.36a.57.57,0,0,1-.57.49Z"}),_("path",{d:"M139.51,24.87l-.51-5a.13.13,0,0,0-.12-.11h0a.12.12,0,0,0-.11.08l-1.87,4.89a.54.54,0,0,0,.51.72H139A.54.54,0,0,0,139.51,24.87Zm6,8.86h-4.23a.55.55,0,0,1-.53-.44l-.58-3a.55.55,0,0,0-.53-.44h-4.46a.53.53,0,0,0-.49.32l-1.47,3.27a.55.55,0,0,1-.49.32h-4.14a.53.53,0,0,1-.48-.77l9.1-18.39a.55.55,0,0,1,.48-.3h3.77a.56.56,0,0,1,.53.42l4.05,18.39A.54.54,0,0,1,145.55,33.73Z"}),_("path",{d:"M161.19,29.35a.52.52,0,0,1,.19.8A9,9,0,0,1,154,34c-3.86,0-7.43-2.23-6.81-6.65l.94-6.7C148.77,16.25,153,14,157,14a6.16,6.16,0,0,1,6.12,4,.53.53,0,0,1-.31.68l-3.36,1.27a.54.54,0,0,1-.64-.21,3,3,0,0,0-2.58-1.19c-1.42,0-2.84.8-3,2.12l-.94,6.7c-.2,1.27,1,2.06,2.42,2.06A3.51,3.51,0,0,0,157.47,28a.53.53,0,0,1,.67-.16Z"}),_("path",{d:"M174.59,19.21l-2,14.06a.54.54,0,0,1-.53.46h-3.95a.54.54,0,0,1-.54-.61l1.92-13.76a.53.53,0,0,0-.53-.61h-4.08a.53.53,0,0,1-.53-.6l.51-3.45a.54.54,0,0,1,.53-.45H180a.54.54,0,0,1,.54.6L180,18.3a.54.54,0,0,1-.54.45h-4.38A.54.54,0,0,0,174.59,19.21Z"}),_("path",{d:"M184.73,33.73h-3.89a.53.53,0,0,1-.53-.61l2.6-18.39a.54.54,0,0,1,.53-.46h3.9a.54.54,0,0,1,.53.61l-2.6,18.39A.55.55,0,0,1,184.73,33.73Z"}),_("path",{d:"M203.71,14.25h4.13a.52.52,0,0,1,.48.76L199,33.43a.53.53,0,0,1-.48.3h-3.8a.54.54,0,0,1-.52-.42l-4.11-18.42a.54.54,0,0,1,.53-.64h4.23a.53.53,0,0,1,.52.43l1.67,9s0,0,0,.06l.27,4.62h.06l1.49-4.59,0-.06,4.32-9.2A.55.55,0,0,1,203.71,14.25Z"}),_("path",{d:"M214,24.87l-.52-5a.12.12,0,0,0-.12-.11h0a.11.11,0,0,0-.11.08l-1.87,4.89a.53.53,0,0,0,.5.72h1.58A.54.54,0,0,0,214,24.87Zm6,8.86h-4.23a.55.55,0,0,1-.53-.44l-.58-3a.55.55,0,0,0-.53-.44h-4.47a.55.55,0,0,0-.49.32l-1.47,3.27a.54.54,0,0,1-.49.32h-4.13a.53.53,0,0,1-.48-.77l9.1-18.39a.55.55,0,0,1,.48-.3H216a.54.54,0,0,1,.52.42l4.05,18.39A.53.53,0,0,1,220,33.73Z"}),_("path",{d:"M230.49,19.21l-2,14.06a.55.55,0,0,1-.53.46h-4a.54.54,0,0,1-.53-.61l1.92-13.76a.54.54,0,0,0-.53-.61h-4.08a.52.52,0,0,1-.53-.6l.51-3.45a.54.54,0,0,1,.53-.45h14.58a.52.52,0,0,1,.53.6l-.51,3.45a.53.53,0,0,1-.53.45H231A.53.53,0,0,0,230.49,19.21Z"}),_("path",{d:"M243.26,21.8H250a.54.54,0,0,1,.53.61l-.47,3.3a.52.52,0,0,1-.53.46H242.5a.53.53,0,0,0-.53.46l-.27,1.85a.53.53,0,0,0,.53.6h7.45a.53.53,0,0,1,.53.6l-.49,3.59a.54.54,0,0,1-.53.46H236.56a.53.53,0,0,1-.53-.61l2.6-18.39a.54.54,0,0,1,.53-.46h12.63a.54.54,0,0,1,.54.61l-.52,3.58a.54.54,0,0,1-.53.46h-7.75a.53.53,0,0,0-.53.45l-.27,1.83A.53.53,0,0,0,243.26,21.8Z"}),_("path",{d:"M260.57,29.11c1.36,0,2.59-.74,2.73-1.79l.94-6.53c.14-1.08-.83-1.93-2.19-1.93H260a.54.54,0,0,0-.53.46l-1.32,9.19a.53.53,0,0,0,.53.6Zm1.95-14.84c4,0,7.37,2,6.73,6.52l-.94,6.53c-.64,4.48-4.59,6.41-8.55,6.41H253a.53.53,0,0,1-.53-.61l2.6-18.39a.54.54,0,0,1,.53-.46Z"})),I=_("path",{fill:"currentColor",d:"M112.46,20.67l-1,6.52c-.22,1.54-2,2.25-3.59,2.25s-3-.71-2.78-2.11l1-6.66c.23-1.45,2-2.2,3.59-2.2s3,.75,2.79,2.2m-2-6.67H100a.55.55,0,0,0-.54.46l-.51,3.44a.54.54,0,0,0,.54.61h1.91a.26.26,0,0,1,.25.37,7.23,7.23,0,0,0-.51,1.8l-1,6.66c-.64,4.45,3.12,6.68,7.21,6.68,4.28,0,8.49-2.23,9.13-6.68l1-6.66c.63-4.36-3-6.59-7-6.67m-63,9.1.06,3.23a.14.14,0,0,1-.11.14l-1.11-3.89v0l-3.45-8a.54.54,0,0,0-.49-.32H38.42a.53.53,0,0,0-.53.46L35.28,33.12a.54.54,0,0,0,.54.61h3.89a.52.52,0,0,0,.53-.46l1-7.31v0l-.06-3.75.11,0,1.17,3.89v0l3.23,7.34a.52.52,0,0,0,.49.32h4.22a.54.54,0,0,0,.53-.46l2.6-18.39a.53.53,0,0,0-.53-.61H49.17a.54.54,0,0,0-.54.46l-1.18,8.35a0,0,0,0,0,0,0M55,33.73h3.9a.53.53,0,0,0,.53-.46L62,14.88a.53.53,0,0,0-.53-.61H57.58a.54.54,0,0,0-.54.46l-2.6,18.39a.53.53,0,0,0,.53.61m9.66-19-.51,3.44a.54.54,0,0,0,.54.61h4.07a.52.52,0,0,1,.53.6L67.35,33.13a.52.52,0,0,0,.53.6h4a.52.52,0,0,0,.53-.46l2-14.06a.55.55,0,0,1,.54-.46h4.38a.54.54,0,0,0,.53-.46l.51-3.44a.53.53,0,0,0-.53-.61H65.17a.55.55,0,0,0-.54.46m27.59,6.36a2.52,2.52,0,0,1-2.56,2.25h-2.3a.53.53,0,0,1-.53-.61l.48-3.38a.54.54,0,0,1,.54-.46H90.3a1.8,1.8,0,0,1,1.92,2.2m-1.36-6.79H83.45a.52.52,0,0,0-.53.46L80.31,33.12a.54.54,0,0,0,.54.61h3.94a.54.54,0,0,0,.54-.46l.76-5.49a.27.27,0,0,1,.27-.23h.51a.27.27,0,0,1,.23.12l3.77,5.82a.54.54,0,0,0,.45.24H96.2a.53.53,0,0,0,.44-.84l-4-5.58a.27.27,0,0,1,.11-.39c2.52-1.22,4-2.47,4.47-5.94.56-4.57-2.34-6.71-6.4-6.71M133,24.88l-.52-5a.11.11,0,0,0-.12-.1h0a.11.11,0,0,0-.11.07l-1.87,4.9a.53.53,0,0,0,.5.71h1.58a.54.54,0,0,0,.54-.58m6,8.85h-4.23a.54.54,0,0,1-.53-.43l-.59-3a.52.52,0,0,0-.52-.43h-4.47a.53.53,0,0,0-.49.32l-1.47,3.27a.52.52,0,0,1-.49.31h-4.13a.53.53,0,0,1-.48-.76l9.1-18.39a.55.55,0,0,1,.48-.3H135a.54.54,0,0,1,.52.42l4.05,18.39a.53.53,0,0,1-.52.64m15.63-4.37a.53.53,0,0,1,.19.8A9,9,0,0,1,147.47,34c-3.86,0-7.42-2.23-6.81-6.65l.94-6.7c.62-4.4,4.84-6.65,8.79-6.65a6.16,6.16,0,0,1,6.12,4,.53.53,0,0,1-.32.68l-3.35,1.27a.54.54,0,0,1-.64-.22,3,3,0,0,0-2.59-1.18c-1.41,0-2.83.8-3,2.12l-.94,6.7c-.2,1.26,1,2.06,2.42,2.06A3.54,3.54,0,0,0,150.91,28a.54.54,0,0,1,.67-.17ZM168,19.22l-2,14.05a.52.52,0,0,1-.53.46h-3.95a.52.52,0,0,1-.53-.6L163,19.36a.54.54,0,0,0-.54-.6h-4.07a.53.53,0,0,1-.53-.61l.51-3.44a.54.54,0,0,1,.53-.46h14.57a.53.53,0,0,1,.53.61l-.51,3.45a.52.52,0,0,1-.53.45h-4.38a.54.54,0,0,0-.53.46m10.14,14.51h-3.89a.54.54,0,0,1-.54-.6l2.61-18.39a.54.54,0,0,1,.53-.46h3.89a.54.54,0,0,1,.54.61l-2.61,18.39a.52.52,0,0,1-.53.45m19-19.48h4.13a.53.53,0,0,1,.48.77l-9.31,18.42a.53.53,0,0,1-.48.29h-3.79a.54.54,0,0,1-.53-.41l-4.1-18.42a.54.54,0,0,1,.52-.65h4.23a.55.55,0,0,1,.53.44l1.66,9a.13.13,0,0,1,0,.06l.28,4.61h.05l1.49-4.58,0-.06,4.32-9.2a.54.54,0,0,1,.48-.31m10.26,10.63-.51-5a.12.12,0,0,0-.12-.1h0a.14.14,0,0,0-.12.07l-1.86,4.9a.52.52,0,0,0,.5.71h1.58a.53.53,0,0,0,.53-.58m6,8.85h-4.23a.54.54,0,0,1-.53-.43l-.58-3a.54.54,0,0,0-.53-.43h-4.46a.52.52,0,0,0-.49.32l-1.47,3.27a.54.54,0,0,1-.49.31h-4.13A.53.53,0,0,1,196,33l9.1-18.39a.55.55,0,0,1,.49-.3h3.76a.56.56,0,0,1,.53.42l4,18.39a.54.54,0,0,1-.53.64M223.9,19.22l-2,14.05a.54.54,0,0,1-.53.46h-4a.53.53,0,0,1-.53-.6l1.92-13.77a.52.52,0,0,0-.53-.6h-4.08a.54.54,0,0,1-.53-.61l.51-3.44a.55.55,0,0,1,.53-.46h14.58a.53.53,0,0,1,.53.61l-.51,3.45a.54.54,0,0,1-.53.45h-4.38a.53.53,0,0,0-.53.46m12.77,2.59h6.75a.53.53,0,0,1,.53.6l-.47,3.31a.53.53,0,0,1-.53.46h-7a.54.54,0,0,0-.53.45l-.26,1.86a.53.53,0,0,0,.53.6h7.44a.52.52,0,0,1,.53.6l-.49,3.58a.53.53,0,0,1-.53.46H230a.53.53,0,0,1-.53-.6L232,14.74a.55.55,0,0,1,.54-.46h12.62a.53.53,0,0,1,.53.61l-.51,3.58a.53.53,0,0,1-.53.45h-7.75a.54.54,0,0,0-.53.46l-.26,1.82a.53.53,0,0,0,.53.61M254,29.12c1.36,0,2.58-.74,2.72-1.79l.95-6.54c.14-1.07-.84-1.92-2.2-1.92h-2.06a.54.54,0,0,0-.54.45l-1.32,9.19a.54.54,0,0,0,.53.61Zm1.94-14.84c4,0,7.37,2,6.73,6.51l-.94,6.54c-.64,4.48-4.59,6.4-8.54,6.4h-6.75a.54.54,0,0,1-.54-.6l2.61-18.39a.54.54,0,0,1,.53-.46Z"}),T=_("path",{fill:"currentColor",d:"M112.39,20.67l-1,6.52c-.22,1.54-2,2.26-3.59,2.26s-3-.72-2.79-2.12l1-6.66c.22-1.46,2-2.2,3.59-2.2s3,.74,2.78,2.2m-2-6.68H99.89a.52.52,0,0,0-.53.46l-.51,3.44a.53.53,0,0,0,.53.61h1.92a.26.26,0,0,1,.24.37,7.23,7.23,0,0,0-.51,1.8l-1,6.66c-.64,4.45,3.12,6.68,7.21,6.68,4.29,0,8.49-2.23,9.13-6.68l1-6.66c.63-4.36-3-6.59-7-6.68m-63,9.11,0,3.23a.15.15,0,0,1-.11.15h0l-1.11-3.9v0l-3.44-8a.55.55,0,0,0-.5-.33H38.33a.54.54,0,0,0-.53.46L35.19,33.13a.54.54,0,0,0,.54.61h3.89a.53.53,0,0,0,.53-.47l1-7.31v0l-.06-3.76.11,0,1.17,3.89v0l3.22,7.34a.55.55,0,0,0,.5.33h4.21a.55.55,0,0,0,.54-.46l2.6-18.41a.54.54,0,0,0-.53-.61H49.08a.53.53,0,0,0-.53.46l-1.19,8.36v0m7.53,10.64h3.89a.55.55,0,0,0,.54-.46l2.6-18.41a.53.53,0,0,0-.53-.61H57.5a.55.55,0,0,0-.54.46l-2.6,18.41a.53.53,0,0,0,.53.61m9.66-19.05L64,18.14a.54.54,0,0,0,.54.61h4.07a.54.54,0,0,1,.54.6L67.27,33.13a.53.53,0,0,0,.53.61h4a.55.55,0,0,0,.54-.47l2-14.06a.52.52,0,0,1,.53-.46h4.38a.55.55,0,0,0,.54-.46l.51-3.44a.54.54,0,0,0-.54-.61H65.09a.54.54,0,0,0-.54.45m27.6,6.37a2.52,2.52,0,0,1-2.56,2.25h-2.3a.54.54,0,0,1-.54-.61l.49-3.38a.54.54,0,0,1,.54-.46h2.45a1.79,1.79,0,0,1,1.92,2.2m-1.36-6.8H83.38a.55.55,0,0,0-.54.46l-2.6,18.41a.53.53,0,0,0,.53.61h4a.55.55,0,0,0,.54-.47L86,27.78a.27.27,0,0,1,.27-.23h.51a.25.25,0,0,1,.22.12l3.77,5.82a.57.57,0,0,0,.46.25h4.88a.54.54,0,0,0,.44-.84l-4-5.59a.27.27,0,0,1,.1-.39c2.53-1.22,4-2.47,4.48-6,.56-4.56-2.34-6.71-6.4-6.71m39.67.59-1.7,12.09c-.21,1.54,1.05,2.3,2.43,2.3a2.84,2.84,0,0,0,3.05-2.3L136,14.71a.51.51,0,0,1,.5-.43h3.87a.5.5,0,0,1,.5.5v.07l-1.7,12.09c-.62,4.48-4.78,6.72-8.59,6.72s-7.29-2.24-6.67-6.72l1.73-12.23a.49.49,0,0,1,.49-.43H130a.5.5,0,0,1,.5.5A.17.17,0,0,1,130.46,14.85Zm10.72,18,2.53-18.11a.51.51,0,0,1,.5-.43h7.2c4.67,0,6.43,3.43,6.05,6.88a7.29,7.29,0,0,1-7.69,6.65h-2.62a.51.51,0,0,0-.5.43L146,33a.49.49,0,0,1-.49.43h-3.82a.5.5,0,0,1-.51-.5S141.18,32.85,141.18,32.82Zm6.71-9.31h2.23A2.56,2.56,0,0,0,152.65,21a1.78,1.78,0,0,0-1.86-2.24h-2.37a.51.51,0,0,0-.5.43l-.53,3.72a.5.5,0,0,0,.43.57Zm25.79-5.42L169.37,20A2.33,2.33,0,0,0,167,18.3a2.86,2.86,0,0,0-3,2.19l-.92,6.56c-.18,1.46,1.06,2.19,2.49,2.19s2.91-.73,3.1-2.19l0-.24a.51.51,0,0,0-.44-.57h-2a.5.5,0,0,1-.51-.5s0,0,0-.07l.4-2.94a.5.5,0,0,1,.5-.43h6.68a.5.5,0,0,1,.5.5v.07l-.57,4.18c-.62,4.4-4.65,6.61-8.48,6.61s-7.21-2.21-6.59-6.61l.92-6.56c.62-4.46,4.67-6.48,8.45-6.48C170.09,14,172.79,15,173.68,18.09Zm12.26,15.07-3.59-5.61a.5.5,0,0,0-.42-.23h-.16a.49.49,0,0,0-.49.43L180.56,33a.51.51,0,0,1-.5.43h-3.87a.5.5,0,0,1-.5-.5v-.07l2.53-18.11a.51.51,0,0,1,.5-.43h7.21c3.94,0,6.74,2.11,6.2,6.59-.48,3.53-2,4.72-4.61,6l4,5.78a.5.5,0,0,1-.13.69.48.48,0,0,1-.29.09h-4.78A.48.48,0,0,1,185.94,33.16Zm-3.43-10h2.25A2.46,2.46,0,0,0,187.25,21a1.76,1.76,0,0,0-1.86-2.16H183a.5.5,0,0,0-.5.43L182,22.59a.51.51,0,0,0,.43.57Zm24.55-8.49L211,32.79a.49.49,0,0,1-.38.59h-4.25a.51.51,0,0,1-.5-.4l-.57-3a.49.49,0,0,0-.49-.41h-4.36a.51.51,0,0,0-.46.3l-1.44,3.24a.5.5,0,0,1-.46.29H194a.5.5,0,0,1-.5-.5.44.44,0,0,1,.05-.22l8.85-18.11a.5.5,0,0,1,.45-.28h3.68A.49.49,0,0,1,207.06,14.67Zm-4.51,10.6h1.58a.51.51,0,0,0,.5-.5v-.05l-.5-4.95a.12.12,0,0,0-.11-.09h0a.13.13,0,0,0-.13.09l-1.81,4.82a.5.5,0,0,0,.29.65A.57.57,0,0,0,202.55,25.27Zm13.92-11h6.72c3.83,0,7.15,1.94,6.53,6.4l-.92,6.42c-.62,4.4-4.45,6.29-8.29,6.29h-6.57a.5.5,0,0,1-.51-.5s0,0,0-.07L216,14.71A.51.51,0,0,1,216.47,14.28Zm2.95,14.58h1.88a2.48,2.48,0,0,0,2.64-1.76l.92-6.42c.14-1.05-.81-1.89-2.13-1.89h-2a.5.5,0,0,0-.5.43l-1.29,9.07a.5.5,0,0,0,.43.56Zm17.93-9.59-.26,1.84a.5.5,0,0,0,.43.56h6.66a.5.5,0,0,1,.5.5v.07l-.46,3.29a.49.49,0,0,1-.49.43h-6.88a.51.51,0,0,0-.5.43l-.26,1.86a.51.51,0,0,0,.43.57h7.34a.5.5,0,0,1,.5.5v.07L243.87,33a.49.49,0,0,1-.5.43H231.08a.5.5,0,0,1-.5-.5v-.07l2.53-18.11a.51.51,0,0,1,.5-.43h12.3a.5.5,0,0,1,.5.5.15.15,0,0,1,0,.07l-.5,3.56a.51.51,0,0,1-.5.43h-7.55A.51.51,0,0,0,237.35,19.27Zm12.14-5h6.71c3.84,0,7.16,1.94,6.54,6.4l-.92,6.42c-.62,4.4-4.46,6.29-8.29,6.29H247a.5.5,0,0,1-.5-.5.2.2,0,0,1,0-.07L249,14.71A.5.5,0,0,1,249.49,14.28Zm2.94,14.58h1.88A2.49,2.49,0,0,0,257,27.1l.92-6.42c.13-1.05-.81-1.89-2.14-1.89h-2a.49.49,0,0,0-.49.43l-1.29,9.07a.5.5,0,0,0,.42.56Z"}),C=_("path",{fill:"currentColor",d:"M112.23,20.66l-1,6.49c-.22,1.54-2,2.25-3.58,2.25s-3-.71-2.77-2.11l1-6.63c.22-1.46,2-2.2,3.58-2.2S112.46,19.2,112.23,20.66Zm-2-6.66H99.77a.53.53,0,0,0-.53.46l-.51,3.43a.52.52,0,0,0,.45.6h2a.27.27,0,0,1,.25.37,7,7,0,0,0-.51,1.8l-1,6.63c-.64,4.44,3.11,6.66,7.19,6.66,4.27,0,8.46-2.22,9.1-6.66l1-6.63C117.83,16.3,114.21,14.08,110.23,14ZM47.39,23.08l.06,3.22a.14.14,0,0,1-.11.14l-1.11-3.88v0l-3.43-7.95a.55.55,0,0,0-.5-.32H38.4a.54.54,0,0,0-.54.45l-2.6,18.35a.53.53,0,0,0,.46.6h4a.53.53,0,0,0,.53-.46l1-7.29v0l-.06-3.75.12,0L42.45,26v0l3.22,7.32a.55.55,0,0,0,.49.32h4.21a.54.54,0,0,0,.53-.46l2.6-18.35a.54.54,0,0,0-.46-.6H49.11a.53.53,0,0,0-.53.45l-1.19,8.34v0Zm7.51,10.6h3.88a.55.55,0,0,0,.54-.46l2.6-18.35a.55.55,0,0,0-.46-.6h-4a.53.53,0,0,0-.53.45l-2.6,18.35a.52.52,0,0,0,.46.6Zm9.64-19L64,18.13a.53.53,0,0,0,.53.61h4.06a.54.54,0,0,1,.54.6L67.24,33.07a.53.53,0,0,0,.46.6h4a.55.55,0,0,0,.54-.46l2-14a.53.53,0,0,1,.53-.46H79.1a.54.54,0,0,0,.53-.46l.51-3.43a.55.55,0,0,0-.45-.61H65.07A.53.53,0,0,0,64.54,14.69ZM92.05,21a2.51,2.51,0,0,1-2.55,2.25H87.2a.53.53,0,0,1-.53-.53v-.08l.49-3.38a.52.52,0,0,1,.53-.45h2.45A1.79,1.79,0,0,1,92.05,21Zm-1.36-6.77H83.3a.54.54,0,0,0-.53.46l-2.6,18.34a.53.53,0,0,0,.46.6h4a.55.55,0,0,0,.54-.46l.76-5.48a.27.27,0,0,1,.27-.23h.5a.28.28,0,0,1,.23.12l3.76,5.8a.53.53,0,0,0,.45.25H96a.54.54,0,0,0,.44-.84l-3.95-5.57a.27.27,0,0,1,.06-.37.05.05,0,0,0,0,0c2.52-1.21,4-2.46,4.47-5.92.55-4.55-2.33-6.69-6.39-6.69Zm40.12,0a.49.49,0,0,1,.49.5v.07l-1.73,12.32c-.22,1.56,1.07,2.33,2.47,2.33a2.9,2.9,0,0,0,3.1-2.33l1.76-12.46a.49.49,0,0,1,.49-.43h4a.49.49,0,0,1,.49.5v.07l-1.73,12.32c-.64,4.56-4.87,6.84-8.74,6.84s-7.42-2.28-6.79-6.84l1.76-12.46a.49.49,0,0,1,.49-.43Zm11.88,19.45a.51.51,0,0,1-.5-.49s0-.05,0-.07l2.58-18.46a.5.5,0,0,1,.49-.43h7.35c4.75,0,6.53,3.49,6.15,7a7.41,7.41,0,0,1-7.83,6.76h-2.68a.49.49,0,0,0-.48.42l-.68,4.84a.5.5,0,0,1-.49.42Zm5.83-10.62a.5.5,0,0,0,.42.56h2.36a2.62,2.62,0,0,0,2.58-2.53,1.82,1.82,0,0,0-1.9-2.28h-2.42a.49.49,0,0,0-.49.42Zm13.27-8.4a.49.49,0,0,1,.49-.43h6.85c3.9,0,7.28,2,6.65,6.51l-.94,6.54c-.63,4.48-4.53,6.4-8.43,6.4h-6.72a.49.49,0,0,1-.49-.49.17.17,0,0,1,0-.07Zm3,13.84a.5.5,0,0,0,.42.56h2c1.35,0,2.56-.74,2.7-1.79l.93-6.54c.14-1.07-.82-1.92-2.17-1.92h-2.07a.49.49,0,0,0-.49.42l-1.32,9.26ZM188,14.28a.49.49,0,0,1,.48.39l4,18.46a.49.49,0,0,1-.38.59h-4.36a.49.49,0,0,1-.48-.4l-.59-3.1a.5.5,0,0,0-.49-.4H181.7a.5.5,0,0,0-.45.3l-1.47,3.31a.49.49,0,0,1-.45.29h-4.17a.49.49,0,0,1-.49-.49.54.54,0,0,1,.05-.22l9-18.46a.51.51,0,0,1,.45-.28Zm-4.6,10.52a.5.5,0,0,0,.29.63.51.51,0,0,0,.17,0h1.66A.49.49,0,0,0,186,25v0l-.51-5a.13.13,0,0,0-.07-.16.13.13,0,0,0-.16.07.13.13,0,0,0,0,.06Zm24.73-6.46a.5.5,0,0,1-.49.42h-4.39a.5.5,0,0,0-.49.43l-1.94,14.12a.49.49,0,0,1-.49.42h-4a.49.49,0,0,1-.49-.49.17.17,0,0,1,0-.07l1.9-13.85a.48.48,0,0,0-.42-.55h-4.18a.49.49,0,0,1-.49-.49v-.08l.52-3.51a.51.51,0,0,1,.49-.43h14.47a.5.5,0,0,1,.49.5.17.17,0,0,1,0,.07l-.51,3.52Zm7.23.59a.49.49,0,0,0-.48.42l-.28,1.9a.49.49,0,0,0,.42.55h6.82a.5.5,0,0,1,.5.49s0,.05,0,.07l-.47,3.38a.49.49,0,0,1-.49.43h-7a.49.49,0,0,0-.49.42l-.27,1.93a.5.5,0,0,0,.42.56h7.5a.49.49,0,0,1,.5.49s0,.05,0,.07l-.49,3.66a.5.5,0,0,1-.49.42H208.43a.49.49,0,0,1-.49-.49v-.07l2.58-18.46a.5.5,0,0,1,.49-.43h12.55a.49.49,0,0,1,.49.5v.07l-.52,3.65a.51.51,0,0,1-.49.43Zm11.36-4.22a.49.49,0,0,1,.49-.43H234c3.9,0,7.28,2,6.64,6.51l-.93,6.54c-.63,4.48-4.53,6.4-8.43,6.4h-6.72a.49.49,0,0,1-.49-.49.17.17,0,0,1,0-.07Zm3,13.84a.5.5,0,0,0,.42.56h2c1.35,0,2.56-.74,2.7-1.79l.93-6.54c.14-1.07-.82-1.92-2.17-1.92h-2.07a.49.49,0,0,0-.49.42l-1.32,9.26Z"}),b=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).animation=new s.default.Value(0),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.componentDidMount=function(){this.animate()},a.animate=function(){var e=this.props.premiumType;s.default.timing(this.animation,{toValue:1,delay:g.DELAY[e],duration:g.DURATION[e]}).start()},a.getContainerStyle=function(){var e=g.FLASH_TIME_PERCENT,t=g.FLASH_DURATION_PERCENT,n=this.props.theme===p.ThemeTypes.DARK?p.HEXColors.WHITE:p.HEXColors.BRAND;return{backgroundColor:this.animation.interpolate({inputRange:[0,e,e,e+t,1],outputRange:[E,E,n,n,E]})}},a.getShineStyle=function(){return s.default.accelerate({transform:[{translateX:this.animation.interpolate({inputRange:[0,1],outputRange:["20%","160%"]})}]})},a.getSvgBorderGradientId=function(){var e=this.props,t=e.premiumType;switch(e.type){case S.PREMIUM_GUILD_SUBSCRIPTION_ACTIVATED:return d.Gradients.PREMIUM_GUILD;case S.PREMIUM_ACTIVATED:case S.PREMIUM_UPGRADED:case S.PREMIUM_UPDATED:return t===p.PremiumTypes.TIER_1?d.Gradients.PREMIUM_TIER_1:d.Gradients.PREMIUM_TIER_2;default:throw new Error("Unsupported ShineAnimation type specified")}},a.renderSvgBorder=function(){switch(this.props.type){case S.PREMIUM_GUILD_SUBSCRIPTION_ACTIVATED:return _("svg",{className:v.default.svgBorder,width:"304",height:"48",viewBox:"0 0 304 48"},void 0,_("rect",{x:"1",y:"1",fill:"none",width:"302",height:"46",rx:"8",stroke:"url(#"+this.getSvgBorderGradientId()+")",strokeWidth:"2"}));case S.PREMIUM_ACTIVATED:case S.PREMIUM_UPGRADED:return _("svg",{className:v.default.svgBorder,width:"298",height:"48",viewBox:"0 0 298 48"},void 0,_("rect",{x:"1",y:"1",fill:"none",width:"296",height:"46",rx:"8",stroke:"url(#"+this.getSvgBorderGradientId()+")",strokeWidth:"2"}));case S.PREMIUM_UPDATED:return _("svg",{className:v.default.svgBorder,width:"276",height:"48",viewBox:"0 0 276 48"},void 0,_("rect",{x:"1",y:"1",fill:"none",width:"274",height:"46",rx:"8",stroke:"url(#"+this.getSvgBorderGradientId()+")",strokeWidth:"2"}));default:return null}},a.renderSvgCopy=function(){switch(this.props.type){case S.PREMIUM_GUILD_SUBSCRIPTION_ACTIVATED:return _("svg",{className:v.default.svgCopy,width:"304",height:"48",viewBox:"0 0 304 48"},void 0,O);case S.PREMIUM_ACTIVATED:return _("svg",{className:v.default.svgCopy,width:"298",height:"48",viewBox:"0 0 298 48"},void 0,I);case S.PREMIUM_UPGRADED:return _("svg",{className:v.default.svgCopy,width:"298",height:"48",viewBox:"0 0 298 48"},void 0,T);case S.PREMIUM_UPDATED:return _("svg",{className:v.default.svgCopy,width:"276",height:"48",viewBox:"0 0 276 48"},void 0,C);default:return null}},a.render=function(){var e=this.props.className;return _("div",{className:(0,l.default)(v.default.container,e)},void 0,this.renderSvgBorder(),_(s.default.div,{className:v.default.animationContainer,style:this.getContainerStyle()},void 0,_(f.Shine,{className:v.default.shine,style:this.getShineStyle()}),this.renderSvgCopy()))},r}(i.PureComponent);t.ShineAnimation=b,b.displayName="ShineAnimation",b.Types=S;var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SubscriptionRecord=void 0;var r=l(n(62)),a=n(6031),o=l(n(257)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return{id:e.id,planId:e.plan_id,quantity:e.quantity}}var f=function(e){var t,n,r,l,f;function c(t){var n;(n=e.call(this)||this).id=t.id,n.type=t.type,n.items=t.items,n.createdAt=t.createdAt,n.canceledAt=t.canceledAt,n.currentPeriodStart=t.currentPeriodStart,n.currentPeriodEnd=t.currentPeriodEnd,n.status=t.status,n.paymentSourceId=t.paymentSourceId,n.paymentGateway=t.paymentGateway,n.paymentGatewayPlanId=t.paymentGatewayPlanId,n.trialId=t.trialId,n.trialEndsAt=t.trialEndsAt,n.renewalMutations=t.renewalMutations;var r=n.renewalMutations,l=t.items[0].planId,u=null;if(t.type===i.SubscriptionTypes.PREMIUM){var s=o.default.getHardcoded(t.items[0].planId).interval;l=(0,a.getBasePlanIdForSubscriptionItems)(t.items,s),null!=r&&(u=(0,a.getBasePlanIdForSubscriptionItems)(r.items,s))}else null!=r&&r.items.length>0&&(u=r.items[0].planId);return n.planId=l,n.additionalPlans=t.items.filter((function(e){return e.planId!==l})),null!=r&&null!=u&&(r.planId=u,r.additionalPlans=r.items.filter((function(e){return e.planId!==u}))),n}return n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),c.createFromServer=function(e){return new c({id:e.id,type:e.type,createdAt:new Date(e.created_at),canceledAt:null!=e.canceled_at?new Date(e.canceled_at):null,currentPeriodStart:new Date(e.current_period_start),currentPeriodEnd:new Date(e.current_period_end),status:e.status,paymentSourceId:e.payment_source_id,paymentGateway:e.payment_gateway,paymentGatewayPlanId:e.payment_gateway_plan_id,trialId:e.trial_id,trialEndsAt:e.trial_ends_at,items:e.items.map(d),renewalMutations:null!=e.renewal_mutations?{items:e.renewal_mutations.items.map(d),paymentGatewayPlanId:e.renewal_mutations.payment_gateway_plan_id}:null})},r=c,(l=[{key:"isPurchasedViaApple",get:function(){return this.paymentGateway===i.PaymentGateways.APPLE}},{key:"isPurchasedViaGoogle",get:function(){return this.paymentGateway===i.PaymentGateways.GOOGLE}},{key:"isPurchasedExternally",get:function(){return this.isPurchasedViaApple||this.isPurchasedViaGoogle}},{key:"hasExternalPlanChange",get:function(){return this.isPurchasedExternally&&null!=this.renewalMutations&&this.paymentGatewayPlanId!==this.renewalMutations.paymentGatewayPlanId}}])&&u(r.prototype,l),f&&u(r,f),c}(r.default);t.SubscriptionRecord=f;var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionText=c,t.contextMenuCallbackNative=function(e){e.preventDefault();var t=c();if("TEXTAREA"===e.target.tagName||"INPUT"===e.target.tagName){if("checkbox"!==e.target.type)return(0,a.openContextMenu)(e,(function(e){return r.createElement(o.default,f({},e,{text:t}))}))}else{if("none"===window.getComputedStyle(e.target).getPropertyValue("-webkit-user-select"))return;var n,s,d,p=e.target;do{null!=p.src&&(s=p.src),null!=p.href&&(n=p.href,d=p.textContent),p=p.parentNode}while(null!=p);if(null!=s)return(0,a.openContextMenu)(e,(function(e){return r.createElement(i.default,f({},e,{src:s}))}));if(null!=n)return(0,a.openContextMenu)(e,(function(e){return r.createElement(l.default,f({},e,{href:n,textContent:d}))}));if(t)return(0,a.openContextMenu)(e,(function(e){return r.createElement(u.default,f({},e,{text:t}))}))}return null},t.contextMenuCallbackWeb=function(e){var t=!1;if("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName)t=!0;else if(null!=e.target.closest&&null!=e.target.closest("[contenteditable=true]"))t=!0;else if(c())t=!0;else{var n,r,a=e.target;do{null!=a.src&&(n=a.src),null!=a.href&&(r=a.href),a=a.parentNode}while(null!=a);null==r&&null==n||(t=!0)}t||e.preventDefault()};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(389),o=s(n(8629)),i=s(n(8874)),l=s(n(8875)),u=s(n(8876));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=He(n(0)),o=n(394),i=n(54),l=n(192),u=Fe(n(3)),s=Fe(n(363)),d=Fe(n(8715)),f=n(10304),c=Fe(n(199)),p=Fe(n(1426)),v=Fe(n(132)),y=He(n(8786)),m=Fe(n(473)),_=Fe(n(10305)),h=Fe(n(105)),E=Fe(n(777)),g=Fe(n(9261)),S=Fe(n(10776)),O=Fe(n(10778)),I=Fe(n(10779)),T=n(10784),C=Fe(n(10785)),b=Fe(n(10786)),M=Fe(n(10787)),N=Fe(n(8548)),A=Fe(n(10790)),P=Fe(n(10799)),R=Fe(n(10800)),L=Fe(n(10801)),D=Fe(n(10802)),w=Fe(n(10803)),j=Fe(n(10804)),k=Fe(n(10807)),U=n(8277),G=Fe(n(10808)),F=Fe(n(702)),B=Fe(n(8720)),H=Fe(n(10809)),x=Fe(n(10810)),V=Fe(n(9274)),W=Fe(n(10811)),Y=n(8660),z=n(8570),K=Fe(n(10921)),$=Fe(n(10927)),Z=Fe(n(11019)),q=Fe(n(11020)),X=Fe(n(8734)),J=Fe(n(11022)),Q=Fe(n(6050)),ee=n(42),te=Fe(n(11024)),ne=Fe(n(11052)),re=Fe(n(11053)),ae=n(8310),oe=Fe(n(11054)),ie=Fe(n(11080)),le=Fe(n(8751)),ue=Fe(n(11086)),se=Fe(n(11087)),de=Fe(n(11088)),fe=Fe(n(11)),ce=Fe(n(8760)),pe=Fe(n(10)),ve=Fe(n(11089)),ye=Fe(n(709)),me=Fe(n(5947)),_e=Fe(n(155)),he=Fe(n(15)),Ee=Fe(n(694)),ge=Fe(n(120)),Se=Fe(n(690)),Oe=Fe(n(11093)),Ie=Fe(n(36)),Te=Fe(n(107)),Ce=Fe(n(11095)),be=Fe(n(11099)),Me=Fe(n(9926)),Ne=Fe(n(9928)),Ae=Fe(n(1167)),Pe=n(41),Re=Fe(n(16)),Le=Fe(n(43)),De=He(n(1253)),we=Fe(n(11100)),je=Fe(n(11743)),ke=n(11745),Ue=Fe(n(11748)),Ge=n(1);function Fe(e){return e&&e.__esModule?e:{default:e}}function Be(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Be=function(){return e},e}function He(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Be();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function xe(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ve(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function We(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ye(e,t)}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ze(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Ke(e){var t=e.match,n=e.location,r=(0,o.parse)(n.search).friend_token,a=t.params.id;return p.default.call((function(){return(0,ae.openUserProfileModal)({userId:a,guildId:Ge.ME,friendToken:r})})),ze(l.Redirect,{to:me.default.defaultRoute})}function $e(e){var t=e.match,n=/-/g,r=t.params.section&&t.params.section.toUpperCase().replace(n,"_"),a=t.params.subsection&&t.params.subsection.toUpperCase().replace(n,"_");return!Ge.UserSettingsSections.hasOwnProperty(r)||a&&!Ge.UserSettingsSections.hasOwnProperty(a)||p.default.call((function(){return m.default.open(Ge.UserSettingsSections[r],a)})),ze(l.Redirect,{to:me.default.defaultRoute})}function Ze(){return p.default.call((function(){return m.default.open(Ge.UserSettingsSections.INVENTORY)})),ze(l.Redirect,{to:me.default.defaultRoute})}function qe(e){var t=e.match.params.date,n=ce.default.changeLog,r=(0,o.parse)(location.search);if(null!=t&&null!=n&&new Date(t)>new Date(n.date)){var a=r.utm_campaign_current,i=r.utm_content_current,u=r.utm_medium_current,s=r.utm_source_current,f=r.utm_term_current,c=(0,o.stringify)({utm_campaign_current:a,utm_content_current:i,utm_medium_current:u,utm_source_current:s,utm_term_current:f});window.location=Ge.Routes.CHANGELOGS()+"?"+c}return p.default.call((function(){return d.default.showChangeLog(r)})),ze(l.Redirect,{to:me.default.defaultRoute})}function Xe(){return p.default.call((function(){return N.default.openCreateGuildModal({location:"External link"})})),ze(l.Redirect,{to:me.default.defaultRoute})}function Je(e){var t=e.match.params,n=t.guildId,r=t.channelId;(0,Y.setNewUser)(z.NewUserTypes.MARKETING_UNCLAIMED);var a=Ge.Routes.CHANNEL(n||"",r);return ze(l.Redirect,{to:a})}n(1183),n(10440),n(11752),n(1357),n(1415),n(11753),n(94),n(719),n(1414),n(10459),n(11754),n(306),n(8364),n(373),n(738),n(9208),n(11755),n(1270),n(9141),n(8757),n(9129),n(8764),u.default.initialize(),te.default.loadServer(),Re.default.embedded&&(Le.default.on("USER_SETTINGS_OPEN",(function(){Ee.default.getLayers().includes(Ge.Layers.USER_SETTINGS)||m.default.open(Ge.UserSettingsSections.ACCOUNT)})),Le.default.on("LAUNCH_APPLICATION",(function(e,t){var n=ge.default.getActiveLibraryApplication(t);De.playApplication(t,n,{analyticsParams:{location:{page:Ge.AnalyticsPages.DIRECT,object:Ge.AnalyticsObjects.WEB_URL}}})}))),Ke.displayName="renderUserProfileRedirector",$e.displayName="renderUserSettingsRedirector",Ze.displayName="renderGiftInventoryRedirector",qe.displayName="renderChangeLogRedirector",Xe.displayName="createGuildModalRedirector",Je.displayName="renderWelcomeRedirector",Se.default.registerModalsDeprecated(Ue.default);var Qe=u.default.connectStores([ye.default,me.default,fe.default],(function(){return{isConnected:ye.default.isConnected(),defaultRoute:me.default.defaultRoute,defaultRouteFallback:me.default.fallbackRoute,token:fe.default.getToken()}}))(function(e){function t(){return e.apply(this,arguments)||this}return We(t,e),t.prototype.render=function(){var e=this.props,t=e.isConnected,n=e.defaultRoute,r=e.token,a=e.defaultRouteFallback;if(null==r)return ze(l.Redirect,{to:Ge.Routes.LOGIN});if(t){var o=st(n);return null==o||(o.params.guildId===Ge.ME||null!=he.default.getGuild(o.params.guildId))&&null!=pe.default.getChannel(o.params.channelId)?ze(l.Redirect,{to:n}):ze(l.Redirect,{to:a})}return null},t}(a.Component));function et(e){var t=e.match.params,n=t.gameId,r=t.action;return _e.default.whenInitialized((function(){ge.default.whenInitialized((function(){switch(r){case"launch":var e=ge.default.getActiveLibraryApplication(n);if(null==e)return;De.playApplication(e.id,e,{analyticsParams:{location:{page:Ge.AnalyticsPages.DIRECT,object:Ge.AnalyticsObjects.WEB_URL}}});break;case"test-mode":Ae.default.whenInitialized((function(){return y.authorizeAndSetTestModeApplication(n)}));break;case"uninstall":var t=ge.default.getActiveLibraryApplication(n);if(null==t)return;(0,f.uninstallBranchPrompt)(t.id,t.branchId,Ge.AnalyticsLocations.URI_SCHEME)}}))})),ze(l.Redirect,{to:Ge.Routes.APPLICATION_LIBRARY})}et.displayName="gameLibraryActionRedirector";var tt=(0,T.makeAuthenticated)(we.default,null,{passProps:!1});var nt=ze(Qe,{}),rt=[{path:[Ge.Routes.APP,Ge.Routes.CHANNEL("@me",":channelId?")],render:function(){return nt},isSessionRequired:!0},{path:[Ge.Routes.CHANNEL(":guildId",":channelId?",":messageId?"),Ge.Routes.GUILD_DISCOVERY],render:tt,isSessionRequired:!0,isChatRoute:!0}],at=ze(Qe,{}),ot=[{path:[Ge.Routes.APP],render:function(){return at},isSessionRequired:!0},{path:[Ge.Routes.USERS(":id")],render:Ke},{path:[Ge.Routes.APPLICATION_LIBRARY_ACTION(":gameId",":action")],render:et},{path:[Ge.Routes.GUILD_CREATE],render:Xe},{path:[Ge.Routes.CHANGELOGS(":date?")],render:qe,isSessionRequired:!0},{path:[Ge.Routes.SETTINGS(":section",":subsection?")],render:$e,isSessionRequired:!0},{path:[Ge.Routes.APPLICATION_LIBRARY_INVENTORY],render:Ze,isSessionRequired:!0},{path:[Ge.Routes.WELCOME(":guildId?",":channelId?")],render:Je,isSessionRequired:!0},{path:[Ge.Routes.CHANNEL(":guildId",":channelId?",":messageId?"),Ge.Routes.ACTIVITY,Ge.Routes.APPLICATION_LIBRARY,Ge.Routes.APPLICATION_STORE,Ge.Routes.GUILD_DISCOVERY,Ge.Routes.GUILD_MEMBER_VERIFICATION(":guildId",":inviteCode?"),Ge.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(":guildId",":inviteCode?"),Ge.Routes.STAGE_DISCOVERY,Ge.Routes.UPCOMING_STAGES(":guildId",":eventId?")],render:tt,isSessionRequired:!0,isChatRoute:!0}];function it(e){if(!ye.default.isConnected()&&!ye.default.isTryingToConnect()){var t=fe.default.getToken();if(null!=t)null!=function(e){for(var t,n=xe(ut());!(t=n()).done;){var r=t.value,a=r.path;if(r.isSessionRequired){var o=(0,i.matchPath)(e,{path:a});if(null!=o)return o}}return null}(e)&&s.default.startSession(t)}}function lt(e){if(null!=e){var t=function(e){var t=e.params,n=t.guildId,r=t.channelId,a=void 0===r?null:r,o=t.messageId,i=void 0===o?null:o;return{guildId:n||Ge.ME,channelId:a,messageId:i}}(e),n=t.guildId,r=t.channelId,a=t.messageId;if(function(e){return null!=e&&(e===Ge.ME||/^\d+$/.test(e))}(n)&&function(e){return null==e||/^\d+$/.test(e)}(r)){var o=Te.default.getGuildId(),i=o!==n,l=Ie.default.getChannelId(o)!==r;i&&c.default.selectGuild(n),(i||l||null!=a)&&v.default.selectChannel(n,r,a)}else(0,ee.replaceWith)(me.default.fallbackRoute)}}function ut(){return fe.default.isGuest()?rt:ot}function st(e){for(var t,n=xe(ut());!(t=n()).done;){var r=t.value,a=r.path;if(r.isChatRoute){var o=(0,i.matchPath)(e,{path:a});if(null!=o)return o}}return null}var dt=ze(l.Redirect,{exact:!0,from:"/channels",to:"/"}),ft=ze(l.Redirect,{to:"/"}),ct=ze(je.default,{}),pt=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).historyUnlisten=function(){},e}We(n,t);var r=n.prototype;return r.componentDidMount=function(){Le.default.setZoomFactor(h.default.zoom),te.default.init(),C.default.initialize(),M.default.initialize(),b.default.initialize(),A.default.initialize(),Z.default.initialize(),R.default.initialize(),P.default.initialize(),de.default.initialize(),L.default.initialize(),X.default.initialize(),W.default.initialize(),E.default.init(),J.default.init(),ne.default.init(),w.default.init(),be.default.init(),D.default.init(),V.default.init(),K.default.initialize(),I.default.initialize(),se.default.initialize(),O.default.initialize(),ue.default.initialize(),$.default.initialize(),S.default.initialize(),j.default.init(),G.default.init(),ve.default.init(),Oe.default.init(),x.default.initialize(),H.default.initialize(),g.default.initialize(),re.default.init(),Ne.default.init(),Me.default.init(),ie.default.init(),le.default.init(),k.default.initialize(),oe.default.initialize(),q.default.initialize(),Ce.default.init(),this.handleHistoryChange(e.location),this.historyUnlisten=Q.default.addRouteChangeListener(this.handleHistoryChange),p.default.call((function(){(0,ke.showAppDownloadModal)();var e=Object.values(he.default.getGuilds()).find((function(e){return e.hasFeature(Ge.GuildFeatures.HUB)})),t=!F.default.hasHotspot(U.HotspotLocations.HUB_SECOND_EMAIL_CONNECTION_UPSELL);_.default.subscribe({},(function(e){e.forceShowModal&&(t=!1)})),(0,Pe.hasAnyModalOpen)()||e||t||(_.default.trackExposure({}),_.default.subscribe({},(function(e){e.showModal&&(0,Pe.openModal)((function(e){return a.createElement(B.default,e)}))})))}))},r.componentWillUnmount=function(){R.default.terminate(),de.default.terminate(),X.default.terminate(),Z.default.terminate(),W.default.terminate(),C.default.terminate(),M.default.terminate(),b.default.terminate(),A.default.terminate(),x.default.terminate(),O.default.terminate(),ue.default.terminate(),S.default.terminate(),$.default.terminate(),g.default.terminate(),k.default.terminate(),q.default.terminate()},r.handleHistoryChange=function(e){var t=e.pathname;it(t),lt(st(t))},r.render=function(){var e=this.props.isGuest;return ze(a.Fragment,{},void 0,ze(l.Switch,{},void 0,dt,e?rt.map((function(e){var t=e.path,n=e.render;return ze(l.Route,{path:t,render:n},t[0])})):ot.map((function(e){var t=e.path,n=e.render;return ze(l.Route,{path:t,render:n},t[0])})),ft),ct)},n}(a.PureComponent);pt.displayName="ViewsWithMainInterface";var vt=u.default.connectStores([fe.default],(function(){return{isGuest:fe.default.isGuest()}}))(pt);t.default=vt}).call(this,n(44))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTierName=function(e){switch(e){case p.PremiumGuildTiers.NONE:return v.default.Messages.PREMIUM_GUILD_TIER_0;case p.PremiumGuildTiers.TIER_1:return v.default.Messages.PREMIUM_GUILD_TIER_1;case p.PremiumGuildTiers.TIER_2:return v.default.Messages.PREMIUM_GUILD_TIER_2;case p.PremiumGuildTiers.TIER_3:return v.default.Messages.PREMIUM_GUILD_TIER_3;default:throw new Error("Not a valid tier type")}},t.getGuildTierFromSubscriberCount=T,t.getNextGuildTierFromSubscriberCount=C,t.getPremiumGuildSubscriptionMonths=function(e){return(0,l.default)().diff((0,l.default)(e),"months")||1},t.getUserLevel=function(e){for(var t=(0,l.default)().diff(e,"months"),n=1,r=0,a=Object.keys(p.UserPremiumGuildSubscriptionMonths);r<a.length;r++){var o=a[r];t<p.UserPremiumGuildSubscriptionMonths[o]||(n=+o)}return n},t.isGuildPremiumAtLeast=b,t.isTierUnlocked=function(e,t){return b(e.premiumTier,t)},t.getProgressPercentToTopTier=function(e){var t=e.premiumSubscriberCount,n=e.premiumTier,r=C(t);if(null==r)return 100;var a=I.length,o=p.PremiumGuildSubscriptionsRequired[n],i=p.PremiumGuildSubscriptionsRequired[r],l=100*n/a,u=100*(t-o)/(i-o);return Math.min(l+u/a,100)},t.getAvailableUserPremiumGuildSubscriptionSlots=M,t.generateBlockGuildSubscriptionPurchasesNode=function(){var e=u.default.getPremiumTypeSubscription();if(null==e)return null;if(M(s.default.slots).length>0)return null;if(e.status===p.SubscriptionStatusTypes.PAST_DUE)return v.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_PURCHASE_BUTTON_DISABLED_SUBSCRIPTION_PAST_DUE;if(e.status===p.SubscriptionStatusTypes.ACCOUNT_HOLD)return v.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_PURCHASE_BUTTON_DISABLED_SUBSCRIPTION_ACCOUNT_HOLD;if(null==e.renewalMutations)return null;var t=(0,c.getNumPremiumGuildSubscriptions)(e.renewalMutations.additionalPlans);return(0,c.getNumPremiumGuildSubscriptions)(e.additionalPlans)>t?v.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_PURCHASE_BUTTON_DISABLED_PENDING_MUTATION_PREMIUM_GUILD_SUBSCRIPTION:v.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_PURCHASE_BUTTON_DISABLED_PENDING_MUTATION_PLAN},t.isInGracePeriod=function(e){return N(e)>0},t.premiumGuildSubscriptionsRequiredForPerks=N,t.getGracePeriodEndingDate=function(e){var t=N(e);if(t>0){var n=function(e){return e.sort((function(e,t){return null!=e.endsAt&&null!=t.endsAt?e.endsAt.getTime()-t.endsAt.getTime():-1}))}(e).filter((function(e){return null!=e.endsAt}));return n[n.length-t].endsAt}return null},t.getAvailableStickerSlotCount=function(e,t){var n=O(t),r=h.indexOf(t);if(-1===r)return 0;var a=h[r-1],o=null!=a?S(a):0,i=S(t);return Math.max(0,n-e.slice(o,i).length)},t.GuildTierSubscriptionsOrdered=t.getTiers=t.getIncrementalStickerCountForTier=t.getTotalStickerCountForTier=t.TotalStickerCountsByTier=t.IncrementalStickerCountsByTier=t.OrderedTiers=t.PerkIcons=void 0;var r,a,o,i=y(n(8)),l=y(n(5)),u=y(n(1147)),s=y(n(5832)),d=n(380),f=y(n(93)),c=n(96),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.PerkIcons=o,function(e){e[e.EMOJI=1]="EMOJI",e[e.AUDIO=2]="AUDIO",e[e.ANIMATED=3]="ANIMATED",e[e.CUSTOMIZATION=4]="CUSTOMIZATION",e[e.UPLOAD=5]="UPLOAD",e[e.VANITY=6]="VANITY",e[e.STREAM=7]="STREAM",e[e.STICKER=8]="STICKER"}(o||(t.PerkIcons=o={}));var h=[p.PremiumGuildTiers.NONE,p.PremiumGuildTiers.TIER_1,p.PremiumGuildTiers.TIER_2,p.PremiumGuildTiers.TIER_3];t.OrderedTiers=h;var E=((r={})[p.PremiumGuildTiers.NONE]=0,r[p.PremiumGuildTiers.TIER_1]=15,r[p.PremiumGuildTiers.TIER_2]=15,r[p.PremiumGuildTiers.TIER_3]=30,r);t.IncrementalStickerCountsByTier=E;var g=((a={})[p.PremiumGuildTiers.NONE]=E[p.PremiumGuildTiers.NONE],a[p.PremiumGuildTiers.TIER_1]=E[p.PremiumGuildTiers.NONE]+E[p.PremiumGuildTiers.TIER_1],a[p.PremiumGuildTiers.TIER_2]=E[p.PremiumGuildTiers.NONE]+E[p.PremiumGuildTiers.TIER_1]+E[p.PremiumGuildTiers.TIER_2],a[p.PremiumGuildTiers.TIER_3]=E[p.PremiumGuildTiers.NONE]+E[p.PremiumGuildTiers.TIER_1]+E[p.PremiumGuildTiers.TIER_2]+E[p.PremiumGuildTiers.TIER_3],a);t.TotalStickerCountsByTier=g;var S=function(e){return g[e]};t.getTotalStickerCountForTier=S;var O=function(e){return E[e]};t.getIncrementalStickerCountForTier=O;t.getTiers=function(){return[{tier:p.PremiumGuildTiers.TIER_1,title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERKS_TITLE_TIER_1,perks:[{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_EMOJI.format({adding:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_1].emoji-p.PremiumGuildLimits[p.PremiumGuildTiers.NONE].emoji,total:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_1].emoji}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_1_EMOJI,icon:o.EMOJI},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_STICKER.format({adding:O(p.PremiumGuildTiers.TIER_1),total:S(p.PremiumGuildTiers.TIER_1)}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_1_STICKER,icon:o.STICKER,isNew:!0},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_AUDIO_QUALITY.format({bitrate:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_1].bitrate/1e3}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_1_AUDIO_QUALITY,icon:o.AUDIO},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_1_ANIMATED_GUILD_ICON,description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_1_ANIMATED_GUILD_ICON.format(),icon:o.ANIMATED},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_1_SPLASH,description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_1_SPLASH,icon:o.CUSTOMIZATION},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_1_STREAMING,description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_1_STREAMING,icon:o.STREAM}]},{tier:p.PremiumGuildTiers.TIER_2,title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERKS_TITLE_TIER_2,perks:[{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_EMOJI.format({adding:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_2].emoji-p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_1].emoji,total:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_2].emoji}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_2_EMOJI,icon:o.EMOJI},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_STICKER.format({adding:O(p.PremiumGuildTiers.TIER_2),total:S(p.PremiumGuildTiers.TIER_2)}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_2_STICKER,icon:o.STICKER,isNew:!0},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_AUDIO_QUALITY.format({bitrate:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_2].bitrate/1e3}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_2_AUDIO_QUALITY,icon:o.AUDIO},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_2_BANNER,description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_2_BANNER,icon:o.CUSTOMIZATION},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_UPLOAD_LIMIT.format({fileSize:(0,d.formatSize)(p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_2].fileSize/1024,{useKibibytes:!0})}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_2_UPLOAD_LIMIT.format(),icon:o.UPLOAD},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_2_STREAMING,description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_2_STREAMING,icon:o.STREAM}]},{tier:p.PremiumGuildTiers.TIER_3,title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERKS_TITLE_TIER_3,perks:[{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_EMOJI.format({adding:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_3].emoji-p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_2].emoji,total:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_3].emoji}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_3_EMOJI,icon:o.EMOJI},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_STICKER.format({adding:O(p.PremiumGuildTiers.TIER_3),total:S(p.PremiumGuildTiers.TIER_3)}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_3_STICKER,icon:o.STICKER,isNew:!0},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_AUDIO_QUALITY.format({bitrate:p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_3].bitrate/1e3}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_3_AUDIO_QUALITY,icon:o.AUDIO},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_3_VANITY_URL,description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_3_VANITY_URL.format({helpdeskArticle:f.default.getArticleURL(p.HelpdeskArticles.GUILD_VANITY_URL)}),icon:o.VANITY},{title:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_TITLE_TIER_ANY_UPLOAD_LIMIT.format({fileSize:(0,d.formatSize)(p.PremiumGuildLimits[p.PremiumGuildTiers.TIER_3].fileSize/1024,{useKibibytes:!0})}),description:v.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERK_DESCRIPTION_TIER_3_UPLOAD_LIMIT.format(),icon:o.UPLOAD}]}]};var I=[{tier:p.PremiumGuildTiers.TIER_3,amount:p.PremiumGuildSubscriptionsRequired[p.PremiumGuildTiers.TIER_3],nextTier:null},{tier:p.PremiumGuildTiers.TIER_2,amount:p.PremiumGuildSubscriptionsRequired[p.PremiumGuildTiers.TIER_2],nextTier:p.PremiumGuildTiers.TIER_3},{tier:p.PremiumGuildTiers.TIER_1,amount:p.PremiumGuildSubscriptionsRequired[p.PremiumGuildTiers.TIER_1],nextTier:p.PremiumGuildTiers.TIER_2}];function T(e){for(var t,n=m(I);!(t=n()).done;){var r=t.value;if(e>=r.amount)return r.tier}return p.PremiumGuildTiers.NONE}function C(e){for(var t,n=m(I);!(t=n()).done;){var r=t.value;if(e>=r.amount)return r.nextTier}return p.PremiumGuildTiers.TIER_1}function b(e,t){return null==t||null!=e&&e>=t}function M(e){return i.default.values(e).filter((function(e){return e.isAvailable()}))}function N(e){var t=T(e.length),n=p.PremiumGuildSubscriptionsRequired[t],r=e.filter((function(e){return null!=e.endsAt}));return n-(e.length-r.length)}t.GuildTierSubscriptionsOrdered=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PNGSticker=t.LottieSticker=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=I(n(23)),l=n(122),u=I(n(6054)),s=n(3),d=n(5965),f=I(n(105)),c=I(n(161)),p=I(n(6044)),v=n(250),y=n(165),m=I(n(24)),_=n(193),h=n(5944),E=n(366),g=n(290),S=I(n(6)),O=I(n(6117));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var b=function(e){return e.preventDefault()},M={tension:1100,friction:40},N={tension:1600,friction:60};function A(e){var t="description"in e&&null!=e.description?e.name+", "+e.description:e.name;return S.default.Messages.STICKER_A11Y_LABEL.format({stickerName:t})}var P=function(e){var t,n=e.children,r=e.hasError,a=e.isLoading,i=e.maskAsset,l=e.size,u=e.withLoadingIndicator,s=void 0===u||u,d=l>=33;return C("div",{className:(0,o.default)(O.default.assetWrapper,(t={},t[O.default.assetWrapperMasked]=r||i,t)),style:{height:l,width:l}},void 0,r?C("div",{className:O.default.error},void 0,C(p.default,{className:O.default.errorIcon}),d&&C(m.default,{className:O.default.errorText,color:m.default.Colors.HEADER_SECONDARY,size:m.default.Sizes.SIZE_14},void 0,S.default.Messages.STICKER_ASSET_LOAD_ERROR)):n,s&&a&&C("div",{className:O.default.loadingIndicator}))};P.displayName="StickerAsset";var R=function(e){var t=e.shouldAnimate,n=e.size,r=e.sticker,o=e.fileUri,l=e.assetData,s=e.isFocused,d=e.className,f=e.maskAsset,c=e.positionRef,p=e.withLoadingIndicator,v=e.onError,y=a.useRef(null),m=a.useRef(null),h=a.useState(!0),E=h[0],I=h[1],T=a.useState(!1),b=T[0],M=T[1],N=null==o?(0,g.getStickerAssetUrl)(r):o;return(0,i.default)(null!=N,"Unable to determine sticker asset URL. Sticker ID: "+r.id),a.useEffect((function(){if(null!=y.current&&null!=N){var e=Math.min(2,(0,_.getDevicePixelRatio)());y.current.width=n*e,y.current.height=n*e;var t=!1;return null!=y.current&&(m.current=new u.default({canvas:y.current,animationId:r.id,assetUrl:N,assetData:l,onInitialDraw:function(){t||I(!1)},onError:function(){t||(I(!1),M(!0),null==v||v())}})),function(){var e;null===(e=m.current)||void 0===e||e.drop(),m.current=null,t=!0}}}),[N,n,r.id,l,v]),a.useEffect((function(){var e,n;t||(n=0),null===(e=m.current)||void 0===e||e.setState(t&&s,n)}),[r,t,s]),null==N?null:a.createElement("div",{role:"img",className:d,"aria-label":b?S.default.Messages.ERROR_LOADING_STICKER:A(r),ref:c},C(P,{hasError:b,isLoading:E,maskAsset:f,size:n,withLoadingIndicator:p},void 0,a.createElement("canvas",{className:O.default.lottieCanvas,ref:y})))};t.LottieSticker=R,R.displayName="LottieSticker";var L=function(e){var t=e.shouldAnimate,n=e.sticker,r=e.isFocused,i=e.size,l=e.className,u=e.maskAsset,s=e.positionRef,f=e.withLoadingIndicator,c=e.fileUri,p=a.useState(!1),v=p[0],y=p[1],m=a.useState(!0),_=m[0],h=m[1],E=a.useState(!1),S=E[0],I=E[1],T=a.useRef(null),M=a.useRef(null),N=null!=c?c:(0,g.getStickerAssetUrl)(n,{isPreview:!t||!v||!r,size:i}),R=a.useCallback((function(){h(!1)}),[]),L=a.useCallback((function(){I(!0)}),[]);return a.useEffect((function(){if(null!=T.current){var e=T.current.isVisible;y(e)}}),[]),a.useLayoutEffect((function(){var e;!0===(null===(e=M.current)||void 0===e?void 0:e.complete)&&h(!1)}),[]),null==N?null:a.createElement(d.VisibilitySensor,{ref:T,onChange:y,threshold:.7},a.createElement("div",{className:(0,o.default)(l,O.default.pngImageWrapper),ref:s},C(P,{hasError:S,isLoading:_,maskAsset:u,size:i,withLoadingIndicator:f},void 0,a.createElement("img",{className:O.default.pngImage,alt:A(n),src:N,draggable:!1,onError:L,onLoad:R,onContextMenu:b,ref:M}))))};t.PNGSticker=L,L.displayName="PNGSticker";var D=function(e){var t=e.disableAnimation,n=e.enlargeScaleFactor,r=e.enlargeWithName,o=e.isInteracting,i=e.positionRef,u=e.size,d=e.sticker,c=(0,s.useStateFromStores)([f.default],(function(){return f.default.useReducedMotion})),p=a.useRef(null),_={transform:"scale("+(c?1:1/n)+")",opacity:0},h=(0,l.useTransition)(o,{ref:p,from:_,enter:{transform:"scale(1)",opacity:1},leave:_,config:M}),E=a.useRef(null),g=(0,l.useSpring)({ref:E,transform:o||c?"translateY(0)":"translateY(-25px)",opacity:o?1:0,config:N});return(0,l.useChain)(o?[p,E]:[E,p],o?[0,.0625]:[0,0]),h((function(e,a){return a&&C(y.AppReferencePositionLayer,{className:O.default.positionedLayer,fixed:!0,align:v.Align.CENTER,position:v.Positions.CENTER,reference:i},void 0,(function(){return C("div",{className:O.default.overlayWrapper},void 0,C(l.animated.div,{className:O.default.overlayStickerWrapper,style:e},void 0,C(w,{className:O.default.overlaySticker,disableAnimation:t,enlargeOnInteraction:!1,isInteracting:o,maskAsset:!1,sticker:d,size:Math.round(u*n),withLoadingIndicator:!1})),r&&C(l.animated.div,{className:O.default.overlayLabelWrapper,style:g},void 0,C(m.default,{size:m.default.Sizes.SIZE_14,className:O.default.overlayLabel},void 0,d.name)))}))}))},w=function(e){var t=e.isInteracting,n=void 0!==t&&t,r=e.disableAnimation,o=void 0!==r&&r,i=e.enlargeOnInteraction,l=void 0!==i&&i,u=e.enlargeWithName,d=void 0===u||u,f=e.enlargeScaleFactor,p=void 0===f?1.55:f,v=e.maskAsset,y=void 0!==v&&v,m=e.size,_=e.sticker,g=e.className,S=e.withLoadingIndicator,O=e.assetData,I=e.fileUri,T=e.onError,b=(0,s.useStateFromStores)([c.default],(function(){return c.default.isFocused()})),M=(0,h.useShouldAnimateSticker)(n)&&!o,N=a.useRef(null);if(null==_)return null;var A=_.format_type===E.StickerFormat.LOTTIE?R:L;return C(a.Fragment,{},_.id+","+m,C(A,{shouldAnimate:M,isFocused:b,size:m,sticker:_,className:g,maskAsset:y,positionRef:N,withLoadingIndicator:S,assetData:O,fileUri:I,onError:T}),l&&C(D,{disableAnimation:o,enlargeScaleFactor:p,enlargeWithName:d,isInteracting:n,positionRef:N,size:m,sticker:_}))};w.displayName="Sticker";var j=w;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChannelIconURL=function(e,t){switch(e.type){case i.ChannelTypes.DM:var n=e.recipients.map(r.default.getUser).filter(o.isNotNullish)[0];return null==n?null:n.getAvatarURL(void 0,t);case i.ChannelTypes.GROUP_DM:return a.default.getChannelIconURL({id:e.id,icon:e.icon,applicationId:e.getApplicationId()})}},t.getChannelIconSource=function(e){switch(e.type){case i.ChannelTypes.DM:var t=e.recipients.map(r.default.getUser).filter(o.isNotNullish)[0];return null!=t?t.getAvatarSource(void 0):null;case i.ChannelTypes.GROUP_DM:return a.default.getChannelIconSource({id:e.id,icon:e.icon,applicationId:e.getApplicationId()})}};var r=l(n(12)),a=l(n(150)),o=n(48),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addStickerPreview=function(e,t){a.default.dispatch({type:d.ActionTypes.ADD_STICKER_PREVIEW,channelId:e,sticker:t})},t.clearStickerPreview=function(e){a.default.dispatch({type:d.ActionTypes.CLEAR_STICKER_PREVIEW,channelId:e})},t.updateGuildSticker=t.createGuildSticker=t.deleteGuildSticker=t.fetchGuildStickers=t.fetchSticker=t.fetchStickerPacks=t.fetchStickerPack=void 0;var r=f(n(14)),a=f(n(2)),o=f(n(89)),i=f(n(39)),l=f(n(12)),u=n(289),s=f(n(362)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){p(o,r,a,i,l,"next",e)}function l(e){p(o,r,a,i,l,"throw",e)}i(void 0)}))}}var y=function(){var e=v(regeneratorRuntime.mark((function e(t,n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.httpGetWithCountryCodeQuery)(d.Endpoints.STICKER_PACK(t));case 2:return r=e.sent,o=r.body,a.default.dispatch({type:d.ActionTypes.STICKER_PACK_FETCH_SUCCESS,packId:t,pack:o,ingestStickers:n}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.fetchStickerPack=y;var m=function(){var e=v(regeneratorRuntime.mark((function e(t){var n,r,o,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(void 0===t?{}:t).locale,r=void 0===n?i.default.locale:n,!s.default.isFetchingStickerPacks&&!s.default.hasLoadedStickerPacks){e.next=3;break}return e.abrupt("return");case 3:return a.default.wait((function(){a.default.dispatch({type:d.ActionTypes.STICKER_PACKS_FETCH_START})})),e.next=6,(0,u.httpGetWithCountryCodeQuery)({url:d.Endpoints.STICKER_PACKS,query:{locale:r}});case 6:o=e.sent,l=o.body.sticker_packs,a.default.dispatch({type:d.ActionTypes.STICKER_PACKS_FETCH_SUCCESS,packs:l});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.fetchStickerPacks=m;var _=function(){var e=v(regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:d.Endpoints.STICKER(t)});case 2:n=e.sent,o=n.body,a.default.dispatch({type:d.ActionTypes.STICKER_FETCH_SUCCESS,sticker:o});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.fetchSticker=_;var h=function(){var e=v(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:d.Endpoints.GUILD_STICKER_PACKS(t)});case 2:n=e.sent,i=n.body,a.default.dispatch({type:d.ActionTypes.GUILD_STICKERS_FETCH_SUCCESS,guildId:t,stickers:i.map((function(e){return null!=e.user?c({},e,{user:new o.default(e.user)}):e}))});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.fetchGuildStickers=h;var E=function(){var e=v(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.delete({url:d.Endpoints.GUILD_STICKER(t.guild_id,t.id)});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.deleteGuildSticker=E;var g=function(){var e=v(regeneratorRuntime.mark((function e(t,n){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.post({url:d.Endpoints.GUILD_STICKER_PACKS(t),body:n});case 2:return o=e.sent,a.default.dispatch({type:d.ActionTypes.GUILD_STICKERS_CREATE_SUCCESS,guildId:t,sticker:c({},o.body,{user:l.default.getNullableCurrentUser()})}),e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.createGuildSticker=g;var S=function(){var e=v(regeneratorRuntime.mark((function e(t,n,a){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.patch({url:d.Endpoints.GUILD_STICKER(t,n),body:a});case 2:return o=e.sent,e.abrupt("return",o.body);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.updateGuildSticker=S},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SearchIcon=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(88)),l=p(n(61)),u=p(n(151)),s=p(n(255)),d=p(n(5968)),f=p(n(6)),c=p(n(6066));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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}).apply(this,arguments)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=Object.freeze({SMALL:c.default.small,MEDIUM:c.default.medium,LARGE:c.default.large}),E=function(e){var t,n,r,i=e.hasContent,p=e.onClear,v=e.className,y=e.isLoading,m=e.size,E=void 0===m?h.SMALL:m;return _(l.default,{className:(0,o.default)(v,c.default.iconLayout,E,(t={},t[c.default.pointer]=i,t)),onClick:function(e){e.stopPropagation(),null!=p&&p(e)},tabIndex:i?0:-1,onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},void 0,_("div",{className:c.default.iconContainer},void 0,y?_(u.default,{type:u.default.Type.SPINNING_CIRCLE,className:(0,o.default)(c.default.icon,c.default.visible)}):_(a.Fragment,{},void 0,_(d.default,{className:(0,o.default)(c.default.icon,(n={},n[c.default.visible]=!i,n)),"aria-label":f.default.Messages.SEARCH}),_(s.default,{className:(0,o.default)(c.default.clear,(r={},r[c.default.visible]=i,r)),"aria-label":f.default.Messages.CLOSE}))))};t.SearchIcon=E,E.displayName="SearchIcon",E.Sizes=h;var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).inputRef=a.createRef(),t.containerRef=a.createRef(),t.handleOnChange=function(e){var n=t.props.onChange;n&&n(e.currentTarget.value)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var l=r.prototype;return l.focus=function(){var e=this.inputRef.current;null!=e&&e.focus()},l.blur=function(){var e=this.inputRef.current;null!=e&&e.blur()},l.render=function(){var e,t=this.props,n=t.query,r=t.autoFocus,l=t.onClear,u=t.className,s=t.placeholder,d=t.iconClassName,f=t.onKeyDown,p=t.onKeyUp,v=t.onKeyPress,m=t.isLoading,h=t.size,g=t.disabled,S=(t.onChange,t.onBlur),O=t.onFocus,I=t.autoComplete,T=t.inputProps,C=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["query","autoFocus","onClear","className","placeholder","iconClassName","onKeyDown","onKeyUp","onKeyPress","isLoading","size","disabled","onChange","onBlur","onFocus","autoComplete","inputProps"]);return _(i.default,{focusTarget:this.inputRef,ringTarget:this.containerRef},void 0,a.createElement("div",y({className:(0,o.default)(u,c.default.container,h,(e={},e[c.default.disabled]=g,e)),ref:this.containerRef},C),_("div",{className:c.default.inner},void 0,a.createElement("input",y({},T,{onFocus:O,onBlur:S,className:c.default.input,value:n,onChange:this.handleOnChange,onKeyDown:f,onKeyUp:p,onKeyPress:v,placeholder:s,disabled:g,autoFocus:r,autoComplete:I,ref:this.inputRef})),_(E,{size:h,hasContent:n.length>0,onClear:l,className:d,isLoading:m}))))},r}(a.PureComponent);g.displayName="SearchBar",g.Sizes=h,g.defaultProps={size:h.SMALL,placeholder:f.default.Messages.SEARCH,isLoading:!1,disabled:!1};var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showModalUpsell=function(e){var t=e.onCloseCallback,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onCloseCallback"]);(0,l.openModal)((function(e){return a.createElement(i.default,s({},e,n))}),{onCloseCallback:t})},t.useAndTriggerGuildMemberAvatarExperiment=function(){var e=d.useExperiment({})[0].enabled;return a.useEffect((function(){return d.trackExposure({})})),e},t.default=t.GuildIDContext=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(50),i=(r=n(6029))&&r.__esModule?r:{default:r},l=n(41);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}var d=(0,o.createExperiment)({kind:"user",id:"2021-05_per_guild_avatars",label:"Guild Member Avatar Uploader",defaultConfig:{enabled:!1},treatments:[{id:1,label:"enabled guild member avatars",config:{enabled:!0}}]});var f=a.createContext(void 0);t.GuildIDContext=f;var c=d;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useFilteredStickerPackCategories=t.useStickerForRenderableSticker=t.useStickerPackCategories=t.useFetchStickerPacks=t.useHasSendableSticker=t.useStickersGrid=t.useShouldAnimateSticker=t.useFetchStickerPack=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=h(n(361)),i=h(n(39)),l=h(n(12)),u=h(n(78)),s=h(n(96)),d=n(1172),f=n(5940),c=h(n(1196)),p=h(n(362)),v=n(366),y=n(290),m=n(1),_=h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.useFetchStickerPack=function(e){I();var t=(0,a.useStateFromStores)([p.default],(function(){return p.default.hasLoadedStickerPacks}));r.useEffect((function(){t&&null==p.default.getStickerPack(e)&&(0,f.fetchStickerPack)(e)}),[e,t])};t.useShouldAnimateSticker=function(e){var t=(0,a.useStateFromStores)([i.default],(function(){return i.default.animateStickers}));return(0,y.shouldAnimateSticker)(t,e)};t.useStickersGrid=function(e){var t=e.collapsedStickersCategories,n=e.filteredStickers,a=e.listPaddingRight,o=void 0===a?0:a,i=e.listWidth,l=void 0===i?0:i,u=e.stickerNodeMargin,s=void 0===u?0:u,d=e.stickerNodeWidth,f=e.stickersCategories;return r.useMemo((function(){var e=Math.floor((l-o+s)/(d+s)),r=Math.floor(Math.max(s,(l-o-d*e)/(e-1))),a=[],i=[],u=[],c=0,p=0,m=0;if(0!==l){var _=function(t,n){void 0===n&&(n=!1);var r=Math.ceil(t.length/e);i[p]=n?0:r;for(var o=0;o<r;o++){var l=o*e,s=l+e,d=t.slice(l,s).map((function(e,t){return{type:v.StickerGridItemTypes.STICKER,sticker:e,packId:(0,y.isStandardSticker)(e)?e.pack_id:"TODO - fix",gridSectionIndex:p,rowIndex:c,columnIndex:t,visibleRowIndex:m}}));n||(m++,u.push(d),a.push(d.length)),c++}p++};if(null==n)for(var h,E=S(f);!(h=E()).done;){var g=h.value;g.stickers.length>0&&(c++,_(g.stickers,!0===(null==t?void 0:t.has(g.id))))}else n.sendable.length>0&&_(n.sendable),n.sendableWithPremium.length>0&&_(n.sendableWithPremium)}return{rowCount:c,rowCountBySection:i,stickersGrid:u,gutterWidth:r,columnCounts:a}}),[t,n,o,l,s,d,f])};t.useHasSendableSticker=function(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getNullableCurrentUser()}));return(0,a.useStateFromStores)([p.default],(function(){for(var n,r=S(p.default.getAllStickersIterator());!(n=r()).done;){var a=n.value;if((0,d.isSendableSticker)(a,t,e))return!0}return!1}),[t,e])};var I=function(){r.useEffect((function(){(0,f.fetchStickerPacks)()}),[])};t.useFetchStickerPacks=I;var T=function(e){var t=(0,a.useStateFromStores)([c.default],(function(){return c.default.frequentlyUsedStickers})),n=(0,a.useStateFromStores)([p.default],(function(){return p.default.getPremiumPacks()})),i=(0,a.useStateFromStores)([l.default],(function(){return l.default.getNullableCurrentUser()})),d=s.default.isPremium(i,m.PremiumTypes.TIER_2),f=function(e){var t=(0,a.useStateFromStores)([p.default],(function(){return p.default.getAllGuildStickers()})),n=(0,a.useStateFromStores)([o.default],(function(){return o.default.getFlattenedGuilds()})),i=(0,a.useStateFromStores)([l.default],(function(){return l.default.getNullableCurrentUser()})),s=JSON.stringify(n.map((function(e){return[e.id,e.name]}))),d=r.useMemo((function(){return n}),[s]);return r.useMemo((function(){var n=d.map((function(e){var n=e.name,r=e.id,a=t.get(r);return null==a||0===a.length?null:{type:v.StickerCategoryTypes.GUILD,id:r,name:n,stickers:a}})).filter((function(e){return null!=e}));if(null!=(null==e?void 0:e.getGuildId())){var r=n.findIndex((function(t){return t.id===e.getGuildId()}));r>=1&&n.unshift(n.splice(r,1)[0]),null==i||u.default.can(m.Permissions.USE_EXTERNAL_EMOJIS,i,e)||(n=n.filter((function(t){return t.id===e.getGuildId()})))}return n}),[t,d,i,e])}(e);return r.useMemo((function(){var e,r=n.map(y.createStickerPackCategory);return[{type:v.StickerCategoryTypes.RECENT,id:v.StickerCategoryTypes.RECENT,name:_.default.Messages.STICKER_CATEGORY_RECENT,stickers:null!==(e=null==t?void 0:t.filter((function(e){var t,r;return(0,y.isGuildSticker)(e)?null!==(t=null===(r=p.default.getStickersByGuildId(e.guild_id))||void 0===r?void 0:r.some((function(t){return t.id===e.id})))&&void 0!==t&&t:(0,y.isStandardSticker)(e)?n.some((function(t){return t.id===e.pack_id})):void 0})))&&void 0!==e?e:[]}].concat(f,d?r:[])}),[t,f,n,d])};t.useStickerPackCategories=T;t.useStickerForRenderableSticker=function(e,t){void 0===t&&(t=!1);var n=(0,a.useStateFromStores)([p.default],(function(){return p.default.getStickerById(e.id)})),o=r.useState(!0),i=o[0],l=o[1],u=r.useState(!1),s=u[0],d=u[1],c=(0,y.isGuildSticker)(e)||(0,y.isStandardSticker)(e);return r.useEffect((function(){(function(){var r,a=(r=regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t||c||null!=n||!i||s){r.next=10;break}return l(!1),r.prev=2,r.next=5,(0,f.fetchSticker)(e.id);case 5:r.next=9;break;case 7:r.prev=7,r.t0=r.catch(2);case 9:d(!0);case 10:case"end":return r.stop()}}),r,null,[[2,7]])})),function(){var e=this,t=arguments;return new Promise((function(n,a){var o=r.apply(e,t);function i(e){g(o,n,a,i,l,"next",e)}function l(e){g(o,n,a,i,l,"throw",e)}i(void 0)}))});return function(){return a.apply(this,arguments)}})()()}),[t]),c?[e,s]:[null!=n?n:null,s]};t.useFilteredStickerPackCategories=function(e){var t=T(e);return r.useMemo((function(){return t.filter((function(e){return e.stickers.length>0}),[])}),[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}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}).apply(this,arguments)}var i=function(e){var t=e.externalRef,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["externalRef"]),a=r.useRef(null);return r.useLayoutEffect((function(){return function(){var e=a.current;null!=e&&function(e){e.removeAttribute("src"),Array.from(e.children).forEach((function(e){e instanceof HTMLSourceElement&&(e.removeAttribute("src"),e.removeAttribute("type")),e instanceof HTMLImageElement&&e.removeAttribute("src")}));try{e.load()}catch(e){}}(e)}}),[]),r.useLayoutEffect((function(){return"function"==typeof t?(t(null),t(a.current)):null!=t&&(t.current=a.current),function(){"function"==typeof t?t(null):null!=t&&(t.current=null)}}),[t,a]),r.createElement("video",o({ref:a},n))};i.displayName="Video";var l=r.forwardRef((function(e,t){return r.createElement(i,o({},e,{externalRef:t}))}));t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPremiumSubscriptions=function(e){return c.apply(this,arguments)},t.fetchUserPremiumGuildSubscriptions=function(){return p.apply(this,arguments)},t.fetchUserPremiumGuildSubscriptionSlots=v,t.fetchPremiumSubscriptionCooldown=function(){return m.apply(this,arguments)},t.subscribeToGuild=function(e,t){return _.apply(this,arguments)},t.unsubscribeFromGuild=function(e,t){return h.apply(this,arguments)},t.cancelUserPremiumGuildSubscriptionSlot=function(e){return E.apply(this,arguments)},t.uncancelUserPremiumGuildSubscriptionSlot=function(e){return g.apply(this,arguments)};var r=s(n(14)),a=s(n(2)),o=n(275),i=s(n(6047)),l=s(n(1195)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){d(o,r,a,i,l,"next",e)}function l(e){d(o,r,a,i,l,"throw",e)}i(void 0)}))}}function c(){return(c=f(regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:u.Endpoints.GUILD_PREMIUM_SUBSCRIPTIONS(t),oldFormErrors:!0});case 2:return n=e.sent,o=n.body.map((function(e){return i.default.createFromServer(e)})),a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_SUBSCRIPTIONS_FETCH_SUCCESS,guildId:t,subscriptions:o}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(){return(p=f(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:u.Endpoints.USER_GUILD_PREMIUM_SUBSCRIPTIONS,oldFormErrors:!0});case 2:return t=e.sent,n=t.body.map((function(e){return i.default.createFromServer(e)})),a.default.dispatch({type:u.ActionTypes.GUILD_USER_PREMIUM_SUBSCRIPTIONS_FETCH_SUCCESS,subscriptions:n}),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(){return y.apply(this,arguments)}function y(){return(y=f(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:u.Endpoints.USER_PREMIUM_GUILD_SUBSCRIPTION_SLOTS,oldFormErrors:!0});case 2:return t=e.sent,n=t.body.map((function(e){return l.default.createFromServer(e)})),a.default.dispatch({type:u.ActionTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_SLOTS_FETCH_SUCCESS,userPremiumGuildSubscriptionSlots:n}),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=f(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.get({url:u.Endpoints.GUILD_PREMIUM_SUBSCRIPTION_COOLDOWN,oldFormErrors:!0});case 3:return t=e.sent,n=t.body.ends_at,a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_SUBSCRIPTIONS_COOLDOWN_FETCH_SUCCESS,endsAt:n}),e.abrupt("return",n);case 9:if(e.prev=9,e.t0=e.catch(0),404!==e.t0.status){e.next=16;break}return a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_SUBSCRIPTIONS_COOLDOWN_FETCH_SUCCESS,endsAt:null}),e.abrupt("return",null);case 16:throw new o.PremiumGuildSubscriptionError(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function _(){return(_=f(regeneratorRuntime.mark((function e(t,n){var l,s,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_SUBSCRIBE_START}),e.prev=1,e.next=4,r.default.put({url:u.Endpoints.GUILD_PREMIUM_SUBSCRIPTIONS(t),body:{user_premium_guild_subscription_slot_ids:n},oldFormErrors:!0});case 4:return l=e.sent,s=Array.isArray(l.body)?l.body.map(i.default.createFromServer):[i.default.createFromServer(l.body)],a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_SUBSCRIBE_SUCCESS,subscriptions:s}),v(),e.abrupt("return",s);case 11:throw e.prev=11,e.t0=e.catch(1),d=new o.PremiumGuildSubscriptionError(e.t0),a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_SUBSCRIBE_FAIL,error:d}),d;case 16:case"end":return e.stop()}}),e,null,[[1,11]])})))).apply(this,arguments)}function h(){return(h=f(regeneratorRuntime.mark((function e(t,n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_UNSUBSCRIBE_START}),e.prev=1,e.next=4,r.default.delete({url:u.Endpoints.GUILD_PREMIUM_SUBSCRIPTION(t,n),oldFormErrors:!0});case 4:v(),e.next=12;break;case 7:throw e.prev=7,e.t0=e.catch(1),i=new o.PremiumGuildSubscriptionError(e.t0),a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_UNSUBSCRIBE_FAIL,error:i}),i;case 12:a.default.dispatch({type:u.ActionTypes.GUILD_PREMIUM_UNSUBSCRIBE_SUCCESS,subscriptionId:n});case 13:case"end":return e.stop()}}),e,null,[[1,7]])})))).apply(this,arguments)}function E(){return(E=f(regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.post({url:u.Endpoints.USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_CANCEL(t),oldFormErrors:!0});case 2:return n=e.sent,o=l.default.createFromServer(n.body),a.default.dispatch({type:u.ActionTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_UPDATE_SUCCESS,userPremiumGuildSubscriptionSlot:o}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=f(regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.post({url:u.Endpoints.USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_UNCANCEL(t),oldFormErrors:!0});case 2:return n=e.sent,o=l.default.createFromServer(n.body),a.default.dispatch({type:u.ActionTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_SLOT_UPDATE_SUCCESS,userPremiumGuildSubscriptionSlot:o}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(3)),a=c(n(28)),o=c(n(2)),i=n(1148),l=c(n(5991)),u=c(n(11)),s=c(n(36)),d=c(n(39)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y={lastViewedPath:null},m=y,_=f.Routes.ME;function h(e){if(u.default.isGuest()){if("guilds"in e&&null!=e.guilds&&1===e.guilds.length){var t=e.guilds[0].id;return _=f.Routes.CHANNEL(t,s.default.getChannelId(t)),!0}return!1}var n=f.Routes.ME,r=i.ExperimentStore.getUserExperimentDescriptor(i.Experiments.KILL_LANDING_PAGE);return null!=r&&((0,i.trackExposureToExperiment)(l.default.id,r),r.bucket===i.ExperimentBuckets.TREATMENT_1&&(n=f.Routes.ME)),n!==_&&(_=n,!0)}var E=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a,o,i,l=r.prototype;return l.initialize=function(e){var t;void 0===e&&(e=y),this.waitFor(d.default,u.default,s.default),m=null!==(t=e)&&void 0!==t?t:y},l.getState=function(){return m},a=r,(o=[{key:"defaultRoute",get:function(){return _}},{key:"fallbackRoute",get:function(){return f.Routes.ME}}])&&p(a.prototype,o),i&&p(a,i),r}(r.default.PersistedStore);E.persistKey="DefaultRouteStore",E.migrations=[function(){var e=a.default.get("LAST_VIEWED_PATH",null);return a.default.remove("LAST_VIEWED_PATH"),{lastViewedPath:e}}];var g=new E(o.default,{CONNECTION_OPEN:h,CURRENT_USER_UPDATE:h,USER_SETTINGS_UPDATE:h,SAVE_LAST_ROUTE:function(e){var t=e.path;return m.lastViewedPath=t,!0}});t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=n(3),i=T(n(473)),l=T(n(6030)),u=T(n(5850)),s=n(5949),d=n(42),f=T(n(12)),c=T(n(161)),p=T(n(1147)),v=T(n(29)),y=T(n(5828)),m=T(n(5694)),_=T(n(5686)),h=n(41),E=b(n(96)),g=n(5688),S=n(1),O=T(n(6)),I=T(n(6103));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}function A(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function P(e){var t=(0,o.useStateFromStores)([f.default],(function(){return f.default.getNullableCurrentUser()})),n=(0,o.useStateFromStores)([c.default],(function(){return c.default.isFocused()})),r=(0,o.useStateFromStores)([p.default],(function(){return p.default.getPremiumTypeSubscription()})),T=e.isGift,C=e.subscriptionTier,b=e.onClick,P=e.size,R=e.className,L=e.trialId,D=e.isTrialCTA,w=e.buttonText,j=e.postSuccessGuild,k=e.onSubscribeModalClose,U=e.premiumModalAnalyticsLocation,G=A(e,["isGift","subscriptionTier","onClick","size","className","trialId","isTrialCTA","buttonText","postSuccessGuild","onSubscribeModalClose","premiumModalAnalyticsLocation"]),F=function(e){if(e.preventDefault(),null!=t){if(b&&b(e),(null==r?void 0:r.status)===S.SubscriptionStatusTypes.ACCOUNT_HOLD)return(0,s.trackPremiumSettingsPaneOpened)(),i.default.open(S.UserSettingsSections.PREMIUM),void(null==k||k(!1));!function(e,t,n,r,o,i,s,d){if(e)if(t){var f=S.AnalyticsObjectTypes.BUY;null!=o?f=S.AnalyticsObjectTypes.TRIAL:n&&(f=S.AnalyticsObjectTypes.GIFT),(0,g.openPremiumSelectPlanModal)({isGift:n,initialPlanId:null,subscriptionTier:r,analyticsLocation:N({object:S.AnalyticsObjects.BUTTON_CTA,objectType:f},d),trialId:o,postSuccessGuild:i,onClose:s})}else(0,h.openModal)((function(e){var t=e.onClose,n=A(e,["onClose"]);return a.createElement(u.default,N({},n,{onClose:t}))}));else(0,h.openModal)((function(e){var t=e.onClose,n=A(e,["onClose"]);return a.createElement(l.default,N({},n,{onClose:t}))}))}(t.isClaimed(),t.verified,T,C,L,j,k,U)}else(0,d.transitionTo)(S.Routes.LOGIN)};if(D)return a.createElement(v.default,N({size:P,className:R,innerClassName:I.default.premiumSubscribeButton,look:v.default.Looks.INVERTED,onClick:F},G),M("span",{},void 0,O.default.Messages.PREMIUM_TRIAL_CTA_BUTTON));if(T)return a.createElement(v.default,N({size:P,className:R,innerClassName:I.default.giftButton,color:v.default.Colors.PRIMARY,onClick:F},G),M(m.default,{className:I.default.giftIcon}),M("span",{},void 0,O.default.Messages.PREMIUM_GIFTING_BUTTON));var B=O.default.Messages.APPLICATION_STORE_GET_PREMIUM,H=null!=r?(0,E.getPremiumPlan)(r):null,x=null!=H?E.default.getPremiumType(H.planId):null,V=C===S.PremiumSubscriptionSKUs.TIER_2&&x===S.PremiumTypes.TIER_1;return V&&(B=O.default.Messages.BILLING_SWITCH_PLAN_UPGRADE),a.createElement(y.default,N({disabled:null!=r&&r.status!==S.SubscriptionStatusTypes.ACCOUNT_HOLD&&!E.default.isNoneSubscription(r.planId)&&!V,onClick:F,innerClassName:I.default.premiumSubscribeButton,color:C===S.PremiumSubscriptionSKUs.TIER_1?v.default.Colors.PRIMARY:v.default.Colors.GREEN,size:P,className:R,pauseAnimation:!n},G),M(_.default,{className:I.default.premiumIcon}),M("span",{className:I.default.buttonText},void 0,null!=w?w:B))}P.displayName="PremiumSubscribeButton";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allowExternalEmojiForIntention=t.getStringForEmojiCategory=t.trackEmojiSearchEmpty=t.trackEmojiSearchSelect=t.trackEmojiSearchResultsViewed=t.trackEmojiSearchStart=t.trackPremiumSettingsPaneOpened=t.computeCategory=t.useEmojiCategories=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=v(n(8)),o=n(3),i=v(n(106)),l=v(n(249)),u=v(n(361)),s=v(n(13)),d=v(n(261)),f=n(1168),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}t.useEmojiCategories=function(e,t){var n=m(e),i=null==t?void 0:t.getGuildId(),s=(0,o.useStateFromStoresArray)([l.default],(function(){var e=l.default.getDisambiguatedEmojiContext(i);return[e,e.favoriteEmojis]})),c=s[0],v=s[1];return r.useMemo((function(){var r=c.getFrequentlyUsedEmojis(),o=u.default.getFlattenedGuilds(),s=c.getGroupedCustomEmoji(),y=[];return a.default.each(o,(function(n){if(void 0!==s[n.id]){if(null!=t){var r=null==s?void 0:s[n.id].filter((function(n){return!d.default.isEmojiFiltered(n,t,e)}));if(null==r||0===r.length)return}var a={type:f.EmojiCategoryTypes.GUILD,guild:n};n.id!==i?y.push(a):y.unshift(a)}})),l.default.categories.reduce((function(e,t){if(t===f.RECENT)return 0===r.length?e:[].concat(e,[{type:f.EmojiCategoryTypes.RECENT,id:t,name:p.default.Messages.EMOJI_CATEGORY_RECENT}]);if(t===f.EmojiCategories.FAVORITES)return 0===v.length?e:[].concat(e,[{type:f.EmojiCategoryTypes.FAVORITES,id:t,name:p.default.Messages.EMOJI_CATEGORY_FAVORITES}]);if(t===f.CUSTOM){var a=[].concat(y);return n||(a=y.filter((function(e){return e.guild.id===i}))),[].concat(e,a)}return[].concat(e,[{type:f.EmojiCategoryTypes.UNICODE,id:t,name:t}])}),[])}),[c,v,t,i,n,e])};t.computeCategory=function(e,t,n){var r=a.default.partition(t.filter((function(t){return!d.default.isEmojiFiltered(t,e,n)})),(function(t){return!d.default.isEmojiPremiumLocked(t,e,n)})),o=r[0],i=r[1];return[].concat(o,i).map((function(t){return[t,d.default.isEmojiPremiumLocked(t,e,n)]}))};t.trackPremiumSettingsPaneOpened=function(e){var t=null!=(null==e?void 0:e.getGuildId());s.default.track(c.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:t?c.AnalyticsPages.GUILD_CHANNEL:c.AnalyticsPages.DM_CHANNEL,location_section:null!=e?c.AnalyticsSections.EMOJI_PICKER_POPOUT:c.AnalyticsSections.CUSTOM_STATUS_MODAL})};t.trackEmojiSearchStart=function(e){i.default.trackWithMetadata(c.AnalyticEvents.SEARCH_STARTED,{search_type:c.SearchTypes.EMOJI,location:e})};t.trackEmojiSearchResultsViewed=function(e,t,n){i.default.trackWithMetadata(c.AnalyticEvents.SEARCH_RESULT_VIEWED,{search_type:c.SearchTypes.EMOJI,total_results:e,num_results_locked:t,location:n})};t.trackEmojiSearchSelect=function(e){i.default.trackWithMetadata(c.AnalyticEvents.SEARCH_RESULT_SELECTED,{search_type:c.SearchTypes.EMOJI,location:e})};t.trackEmojiSearchEmpty=function(e){i.default.trackWithMetadata(c.AnalyticEvents.SEARCH_RESULT_EMPTY,{search_type:c.SearchTypes.EMOJI,location:e})};t.getStringForEmojiCategory=function(e){switch(e){case f.EmojiCategories.RECENT:return p.default.Messages.EMOJI_CATEGORY_RECENT;case f.EmojiCategories.FAVORITES:return p.default.Messages.EMOJI_CATEGORY_FAVORITES;case f.EmojiCategories.ACTIVITY:return p.default.Messages.EMOJI_CATEGORY_ACTIVITY;case f.EmojiCategories.FLAGS:return p.default.Messages.EMOJI_CATEGORY_FLAGS;case f.EmojiCategories.FOOD:return p.default.Messages.EMOJI_CATEGORY_FOOD;case f.EmojiCategories.NATURE:return p.default.Messages.EMOJI_CATEGORY_NATURE;case f.EmojiCategories.OBJECTS:return p.default.Messages.EMOJI_CATEGORY_OBJECTS;case f.EmojiCategories.PEOPLE:return p.default.Messages.EMOJI_CATEGORY_PEOPLE;case f.EmojiCategories.SYMBOLS:return p.default.Messages.EMOJI_CATEGORY_SYMBOLS;case f.EmojiCategories.TRAVEL:return p.default.Messages.EMOJI_CATEGORY_TRAVEL;case f.EmojiCategories.PREMIUM_UPSELL:return p.default.Messages.EMOJI_CATEGORY_PREMIUM_UPSELL;default:return e}};var m=function(e){return e!==c.EmojiIntention.COMMUNITY_CONTENT&&e!==c.EmojiIntention.GUILD_STICKER_RELATED_EMOJI};t.allowExternalEmojiForIntention=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("polygon",{points:"0 0 24 0 24 24 0 24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("polygon",{className:c,fill:f,fillRule:"nonzero",points:"8.47 2 6.12 4.35 13.753 12 6.12 19.65 8.47 22 18.47 12"}),d))}f.displayName="RightCaret"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M20 11.1111H12.8889V4H11.1111V11.1111H4V12.8889H11.1111V20H12.8889V12.8889H20V11.1111Z"}))}d.displayName="Plus"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(29)),i=n(35),l=y(n(47)),u=y(n(24)),s=y(n(13)),d=y(n(5948)),f=n(1),c=y(n(6)),p=y(n(6038)),v=y(n(6039));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){switch(e){case f.PremiumTypes.TIER_2:return f.PremiumSubscriptionSKUs.TIER_2;case f.PremiumTypes.TIER_1:return f.PremiumSubscriptionSKUs.TIER_1;default:return null}}function E(e){var t=e.title,n=e.type,r=e.premiumType,y=e.analyticsSource,m=e.analyticsLocation,E=e.body,g=e.artURL,S=e.transitionState,O=e.onClose,I=e.onSubscribeClick,T=e.onSecondaryClick,C=e.secondaryCTA,b=e.showNewBadge,M=void 0!==b&&b;return a.useEffect((function(){s.default.track(f.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:n,source:y})}),[]),_(i.ModalRoot,{className:p.default.root,"aria-label":t,transitionState:S},void 0,_("div",{className:p.default.artContainer},void 0,_("img",{className:p.default.art,alt:"",src:g}),M?_("img",{className:p.default.sparkleBadge,alt:"",src:v.default}):null),_(i.ModalContent,{className:p.default.content},void 0,_(l.default,{className:p.default.header,size:l.default.Sizes.SIZE_24},void 0,t),_(u.default,{size:u.default.Sizes.SIZE_16},void 0,E)),_(i.ModalFooter,{className:p.default.footer},void 0,_("div",{className:p.default.primaryActions},void 0,null!=C?_(o.default,{className:p.default.secondaryAction,onClick:T,size:o.default.Sizes.SMALL,color:o.default.Colors.PRIMARY,look:o.default.Looks.LINK},void 0,C):null,_(d.default,{premiumModalAnalyticsLocation:m,subscriptionTier:h(r),size:o.default.Sizes.SMALL,color:o.default.Colors.GREEN,onClick:function(){null==I||I(),O()}})),_(o.default,{onClick:O,size:o.default.Sizes.SMALL,color:o.default.Colors.PRIMARY,look:o.default.Looks.LINK},void 0,c.default.Messages.BACK)))}E.displayName="PremiumUpsellModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M12 2C6.477 2 2 6.477 2 12C2 17.522 6.477 22 12 22C17.523 22 22 17.522 22 12C22 6.477 17.523 2 12 2ZM8 6C9.104 6 10 6.896 10 8C10 9.105 9.104 10 8 10C6.896 10 6 9.105 6 8C6 6.896 6.896 6 8 6ZM18 14C18 16.617 15.14 19 12 19C8.86 19 6 16.617 6 14V13H18V14ZM16 10C14.896 10 14 9.105 14 8C14 6.896 14.896 6 16 6C17.104 6 18 6.896 18 8C18 9.105 17.104 10 16 10Z"}))}d.displayName="EmojiSmile"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M19 1C19.552 1 20 1.447 20 2V3L23 2V6L20 5V6C20 6.553 19.552 7 19 7H15C14.448 7 14 6.553 14 6V2C14 1.447 14.448 1 15 1H19Z",className:f,fill:d}),s("path",{d:"M20 13.5V9H22V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5C2 3.397 2.897 2.5 4 2.5H12V4.5H4V13.5H20Z",className:f,fill:d}))}d.displayName="Stream"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u,s,d,f,c=o.FormStates.CLOSED,p={};function v(){c=o.FormStates.OPEN,p={}}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getFormState=function(){return c},a.getErrors=function(){return p},a.showNotice=function(){return void 0!==u||void 0!==s||void 0!==d||void 0!==f},a.getPendingAvatar=function(){return u},a.getPendingBanner=function(){return s},a.getPendingBio=function(){return d},a.getPendingBannerColor=function(){return f},a.getAllPending=function(){return{pendingAvatar:u,pendingBanner:s,pendingBio:d,pendingBannerColor:f}},r}(r.default.Store))(a.default,{USER_SETTINGS_ACCOUNT_INIT:function(e){return v()},USER_SETTINGS_MODAL_INIT:function(e){return v()},USER_SETTINGS_ACCOUNT_SUBMIT_SUCCESS:function(e){return v()},USER_SETTINGS_MODAL_SET_SECTION:function(e){return e.section===o.UserSettingsSections.ACCOUNT&&v()},USER_SETTINGS_ACCOUNT_CLOSE:function(e){return c=o.FormStates.CLOSED,void(p={})},USER_SETTINGS_ACCOUNT_SUBMIT:function(e){return c=o.FormStates.SUBMITTING,void(p={})},USER_SETTINGS_ACCOUNT_SUBMIT_FAILURE:function(e){if(c!==o.FormStates.SUBMITTING)return!1;c=o.FormStates.OPEN,p=e.errors||{}},USER_SETTINGS_ACCOUNT_SET_PENDING_AVATAR:function(e){var t=e.avatar;u=t},USER_SETTINGS_ACCOUNT_SET_PENDING_BANNER:function(e){var t=e.banner;s=t},USER_SETTINGS_ACCOUNT_SET_PENDING_BIO:function(e){var t=e.bio;d=t},USER_SETTINGS_ACCOUNT_SET_PENDING_BANNER_COLOR:function(e){var t=e.color;f=t},USER_SETTINGS_RESET_ALL_PENDING:function(e){return u=void 0,s=void 0,d=void 0,void(f=void 0)}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sizes=t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(5943),i=(r=n(279))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n){return e.getAvatarURL(n,t)}var d=a.memo((function(e){var t=e.user,n=e.size,r=void 0===n?i.default.Sizes.SIZE_32:n,l=e.animate,d=void 0!==l&&l,f=e["aria-hidden"],c=void 0!==f&&f,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["user","size","animate","aria-hidden"]),v=a.useContext(o.GuildIDContext);return a.createElement(i.default,u({src:s(t,d,v),size:r,"aria-label":c?void 0:t.username,"aria-hidden":c},p))}));t.default=d;var f=i.default.Sizes;t.Sizes=f},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={userTrialOffersFetchedDate:{},userTrialOffers:{}},u=l;var s=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.initialize=function(e){u=e||l},a.getUserTrialOffer=function(e){return u.userTrialOffers[e]},a.hasFetchedOffer=function(e){return null!=u.userTrialOffersFetchedDate[e]},a.shouldFetchOffer=function(e){var t=u.userTrialOffersFetchedDate[e];return null==t||Date.now()-1728e5>t},a.getUnacknowledgedOffers=function(){return Object.values(u.userTrialOffers).filter((function(e){return null==e.expires_at}))},a.getState=function(){return u},r}(r.default.PersistedStore);s.persistKey="UserTrialStore";var d=new s(a.default,{BILLING_USER_TRIAL_OFFER_FETCH_SUCCESS:function(e){var t=e.trialId,n=e.userTrialOffer;null!=n&&(u.userTrialOffers[t]=n),u.userTrialOffersFetchedDate[t]=Date.now()},BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS:function(e){var t=e.userTrialOffer;u.userTrialOffers[t.trial_id]=t,u.userTrialOffersFetchedDate[t.trial_id]=Date.now()},LOGOUT:function(e){return u.userTrialOffers={},void(u.userTrialOffersFetchedDate={})}});t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveGiftCode=v,t.default=void 0;var r=d(n(14)),a=d(n(2)),o=d(n(1181)),i=d(n(71)),l=n(402),u=d(n(478)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}function v(e,t,n){return y.apply(this,arguments)}function y(){return(y=p(regeneratorRuntime.mark((function e(t,n,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=!1),void 0===r&&(r=!1),a.default.dispatch({type:s.ActionTypes.GIFT_CODE_RESOLVE,code:t}),e.prev=3,e.next=6,(0,l.resolveGiftCode)(t,n,r);case 6:if(null==(o=e.sent).application_id||o.application_id===s.PREMIUM_SUBSCRIPTION_APPLICATION){e.next=17;break}if(null!=i.default.getGame(o.application_id)){e.next=17;break}return e.prev=10,e.next=13,u.default.fetchApplication(o.application_id);case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(10);case 17:return a.default.dispatch({type:s.ActionTypes.GIFT_CODE_RESOLVE_SUCCESS,giftCode:o}),e.abrupt("return",{giftCode:o});case 21:throw e.prev=21,e.t1=e.catch(3),a.default.dispatch({type:s.ActionTypes.GIFT_CODE_RESOLVE_FAILURE,code:t,error:e.t1}),e.t1;case 25:case"end":return e.stop()}}),e,null,[[3,21],[10,15]])})))).apply(this,arguments)}var m=f({resolveGiftCode:v,fetchUserGiftCodesForSKU:function(e,t){return p(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return void 0===t&&(t=null),a.default.dispatch({type:s.ActionTypes.GIFT_CODES_FETCH,skuId:e,subscriptionPlanId:t}),n.prev=2,n.next=5,r.default.get({url:s.Endpoints.USER_GIFT_CODES,query:{sku_id:e,subscription_plan_id:t},oldFormErrors:!0});case 5:o=n.sent,a.default.dispatch({type:s.ActionTypes.GIFT_CODES_FETCH_SUCCESS,giftCodes:o.body,skuId:e,subscriptionPlanId:t}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),a.default.dispatch({type:s.ActionTypes.GIFT_CODES_FETCH_FAILURE,skuId:e,subscriptionPlanId:t});case 12:case"end":return n.stop()}}),n,null,[[2,9]])})))()},createGiftCode:function(e,t){return p(regeneratorRuntime.mark((function n(){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return void 0===t&&(t=null),a.default.dispatch({type:s.ActionTypes.GIFT_CODE_CREATE_START,skuId:e,subscriptionPlanId:t}),n.prev=2,n.next=5,r.default.post({url:s.Endpoints.USER_GIFT_CODE_CREATE,body:{sku_id:e,subscription_plan_id:t},oldFormErrors:!0});case 5:return o=n.sent,a.default.dispatch({type:s.ActionTypes.GIFT_CODE_CREATE_SUCCESS,giftCode:o.body}),n.abrupt("return",o.body);case 10:n.prev=10,n.t0=n.catch(2),a.default.dispatch({type:s.ActionTypes.GIFT_CODE_CREATE_FAILURE,skuId:e,subscriptionPlanId:t});case 13:case"end":return n.stop()}}),n,null,[[2,10]])})))()},revokeGiftCode:function(e){return p(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a.default.dispatch({type:s.ActionTypes.GIFT_CODE_REVOKE,code:e}),t.prev=1,t.next=4,r.default.delete({url:s.Endpoints.USER_GIFT_CODE_REVOKE(e),oldFormErrors:!0});case 4:a.default.dispatch({type:s.ActionTypes.GIFT_CODE_REVOKE_SUCCESS,code:e}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),a.default.dispatch({type:s.ActionTypes.GIFT_CODE_REVOKE_FAILURE,code:e});case 10:case"end":return t.stop()}}),t,null,[[1,7]])})))()},openNativeGiftCodeModal:function(e){o.default.openNativeAppModal(e,s.RPCCommands.GIFT_CODE_BROWSER)}},n(6046).default);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InviteResolvingHeader=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(481),i=E(n(379)),l=E(n(31)),u=E(n(162)),s=E(n(89)),d=E(n(477)),f=E(n(375)),c=E(n(149)),p=n(475),v=E(n(248)),y=E(n(24)),m=n(1),_=E(n(6)),h=E(n(6072));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=function(){return S(a.Fragment,{},void 0,S(p.Avatar,{src:null,size:p.Avatar.Sizes.DEPRECATED_SIZE_100,className:h.default.avatar}),S(p.SubTitle,{},void 0,_.default.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN),S(p.Title,{className:h.default.inviteResolvingGuildName},void 0,_.default.Messages.LOADING))};t.InviteResolvingHeader=O,O.displayName="InviteResolvingHeader";var I=function(e){var t=e.guild,n=e.user,r=e.application;return r?S(d.default,{className:h.default.appIcon,game:r,size:h.default.appIconSize}):n?S(p.Avatar,{src:null!=n?n.getAvatarURL(void 0):null,size:p.Avatar.Sizes.SIZE_80,className:h.default.avatar}):t?S(v.default,{mask:v.default.Masks.SQUIRCLE,width:64,height:64,className:h.default.guildIcon},void 0,S(p.GuildIcon,{guild:t,size:p.GuildIcon.Sizes.LARGER,animate:!0})):null},T=function(e){var t=e.invite,n=e.disableUser,r=void 0!==n&&n,d=e.error,v=e.description,E=e.flatActivityCount,g=void 0!==E&&E;if(null==t)return null;var O,T,C,b=null!=t.guild?new u.default(t.guild):null,M=null!=t.channel?new l.default(t.channel):null,N=null!=t.target_application?new i.default(t.target_application):null,A=r||null==t.inviter?null:new s.default(t.inviter),P=!(null!=t.approximate_member_count&&t.approximate_member_count>100||null!=b&&b.hasFeature(m.GuildFeatures.COMMUNITY))&&A,R=null;if(null!=b)R=null==A?_.default.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN:_.default.Messages.AUTH_MESSAGE_INVITED_BY.format({username:A.username}),t.target_type===o.InviteTargetTypes.STREAM&&null!=t.target_user&&(R=_.default.Messages.AUTH_MESSAGE_INVITED_TO_STREAM.format({username:t.target_user.username})),t.target_type===o.InviteTargetTypes.EMBEDDED_APPLICATION&&null!=t.target_application&&(R=null!=A?_.default.Messages.AUTH_MESSAGE_INVITED_TO_PLAY_USERNAME.format({username:A.username}):_.default.Messages.AUTH_MESSAGE_INVITED_TO_PLAY),P&&null==N&&(O=S(p.GuildIcon,{guild:b,size:p.GuildIcon.Sizes.SMALL})),T=b.name,null!=N&&(T=N.name,null==v&&(C=S("div",{},void 0,S(p.SubTitle,{className:h.default.appIn},void 0,_.default.Messages.EMBEDDED_ACTIVITIES_INVITE_IN),S("div",{className:h.default.guildContainer},void 0,S(p.GuildIcon,{guild:b,size:p.GuildIcon.Sizes.SMALL}),S(y.default,{className:h.default.appGuildName,color:y.default.Colors.CUSTOM,tag:"span",size:y.default.Sizes.SIZE_24},void 0,b.name)))));else if(null!=M){if(null==A)throw new Error("no inviter in group DM invite");var L=A.username;M.name?(R=_.default.Messages.AUTH_MESSAGE_INVITED_BY.format({username:L}),T=M.name,null!=M.icon&&(O=S(p.ChannelIcon,{channel:M,size:p.Avatar.Sizes.SIZE_32}))):(R=_.default.Messages.INSTANT_INVITE_YOU_HAVE_BEEN_INVITED_TO_JOIN_GROUP_DM,T=L)}return S("div",{className:h.default.container},void 0,S(I,{application:N,guild:b,user:P?A:null}),d?a.createElement(a.Fragment,null,S(p.SubTitle,{},void 0,_.default.Messages.INVITE_MODAL_ERROR_TITLE),S(p.Title,{},void 0,d)):a.createElement(a.Fragment,null,S(p.SubTitle,{},void 0,R),S(p.Title,{className:h.default.title},void 0,null!=b?S(f.default,{guild:b,className:h.default.guildBadge,tooltipPosition:c.default.Positions.LEFT}):null,O,T)),v&&S("p",{className:h.default.description},void 0,v),C,null==N?S(p.ActivityCount,{className:h.default.activityCount,online:t.approximate_presence_count,total:t.approximate_member_count,flat:g}):null)};T.displayName="InviteHeader";var C=T;t.default=C},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;c(n(0));var r,a,o=n(475),i=n(296),l=d(n(5698)),u=c(n(5967)),s=d(n(6065));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=((r={})[i.InternalTemplateCodes.CLASSROOM]=n(6016),r[i.InternalTemplateCodes.LOCAL_COMMUNITIES]=n(6017),r[i.InternalTemplateCodes.CREATORS_HOBBIES]=n(6018),r[i.InternalTemplateCodes.GLOBAL_COMMUNITIES]=n(6019),r[i.InternalTemplateCodes.FRIENDS_FAMILY]=n(6020),r[i.InternalTemplateCodes.STUDY_GROUPS]=n(6021),r[i.InternalTemplateCodes.CREATE_FROM_SCRATCH]=n(6022),r[i.InternalTemplateCodes.CAMPUS_CLUBS]=n(6023),r[i.InternalTemplateCodes.LEAGUE_CLUBS]=n(6024),r[i.InternalTemplateCodes.GITHUB_HACKATHON]=n(6025),r);function y(e){var t=e.headerId,n=e.guildTemplate,r=n.code,a=v[r];if(null!=a){var d,f=(0,l.default)(r),c=f.header,y=f.description,m=f.author;return p("div",{},void 0,p("img",{className:s.default.image,src:a,alt:""}),p(o.Title,{className:s.default.header,id:t},void 0,c),p(o.SubTitle,{},void 0,y),n.state===i.GuildTemplateStates.RESOLVED?p(u.UsagePill,{className:s.default.usagePill,count:null!==(d=n.usageCount)&&void 0!==d?d:0,verifiedName:m}):null)}return p(u.default,{pillClassName:s.default.usagePill,guildTemplate:n,tall:!0})}y.displayName="GuildTemplateAuthBody"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.shouldShowCountryCodeSelector=function(e,t){if(e===r.PHONE)return!t.startsWith("+");if(e===r.EMAIL)return!1;if(t.length<3)return!1;return a.test(t)},t.getPhoneOrEmail=function(e){return/^\+\d/.test(e)?r.PHONE:r.EMAIL},t.PhoneOrEmailSelectorForceMode=void 0,t.PhoneOrEmailSelectorForceMode=r,function(e){e.PHONE="phone",e.EMAIL="email"}(r||(t.PhoneOrEmailSelectorForceMode=r={}));var a=/^[-() \d]+$/},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UsagePill=O,t.default=function(e){var t=e.guildTemplate,n=e.error,r=e.tall,a=e.pillClassName;if(n)return h("div",{className:v.default.container},void 0,h(u.Title,{},void 0,p.default.Messages.INVITE_MODAL_ERROR_TITLE),h(u.SubTitle,{},void 0,n));if(t.state===d.GuildTemplateStates.RESOLVING)return h("div",{className:v.default.container},void 0,I);var i=(0,c.default)(t.code).header;return r?h("div",{className:v.default.container},void 0,h(u.Title,{className:v.default.title},void 0,i),h(u.SubTitle,{className:(0,o.default)(v.default.subtitle,y.default.marginTop2)},void 0,p.default.Messages.GUILD_TEMPLATE_BASED_ON),h(u.Title,{className:(0,o.default)(v.default.title,v.default.userText)},void 0,t.name),t.description&&h(u.SubTitle,{className:(0,o.default)(v.default.subtitle,v.default.userText,y.default.marginTop8)},void 0,t.description),h(O,{className:a,count:t.usageCount||0,creator:t.creator.username,verifiedName:(0,f.getVerifiedName)(t.code)})):h("div",{className:v.default.container},void 0,h(u.Title,{className:v.default.title},void 0,i),h(u.SubTitle,{className:(0,o.default)(v.default.subtitle,v.default.userText)},void 0,t.name))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=m(n(1175)),l=m(n(151)),u=n(475),s=m(n(489)),d=n(296),f=n(6015),c=m(n(5698)),p=m(n(6)),v=m(n(6064)),y=m(n(370));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return h(i.default,{className:v.default.verifiedIcon},void 0,h("div",{className:v.default.verifiedCheckContainer},void 0,h(s.default,{className:v.default.verifiedCheck})))}E.displayName="VerifiedIcon";var g=h(E,{});function S(e){var t=e.verified,n=e.text;return t?h("div",{className:v.default.verifiedNameContainer},void 0,g,n):a.createElement(a.Fragment,null,n)}function O(e){var t=e.className,n=e.count,r=e.creator,a=e.verifiedName;return h("div",{className:(0,o.default)(v.default.usagePill,t,v.default.userText)},void 0,null!=r||null!=a?p.default.Messages.GUILD_TEMPLATE_USAGES_BY_CREATOR2.format({usageCount:n,creator:null!=a?a:r,creatorHook:function(e,t){return h(S,{text:e,verified:null!=a},t)}}):p.default.Messages.GUILD_TEMPLATE_USAGES.format({usageCount:n}))}S.displayName="CreatorHook",O.displayName="UsagePill";var I=h(l.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M21.707 20.293L16.314 14.9C17.403 13.504 18 11.799 18 10C18 7.863 17.167 5.854 15.656 4.344C14.146 2.832 12.137 2 10 2C7.863 2 5.854 2.832 4.344 4.344C2.833 5.854 2 7.863 2 10C2 12.137 2.833 14.146 4.344 15.656C5.854 17.168 7.863 18 10 18C11.799 18 13.504 17.404 14.9 16.314L20.293 21.706L21.707 20.293ZM10 16C8.397 16 6.891 15.376 5.758 14.243C4.624 13.11 4 11.603 4 10C4 8.398 4.624 6.891 5.758 5.758C6.891 4.624 8.397 4 10 4C11.603 4 13.109 4.624 14.242 5.758C15.376 6.891 16 8.398 16 10C16 11.603 15.376 13.11 14.242 14.243C13.109 15.376 11.603 16 10 16Z"}))}d.displayName="Search"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CopyInputModes=void 0;var r,a=v(n(0)),o=c(n(9)),i=c(n(88)),l=n(252),u=v(n(29)),s=c(n(55)),d=c(n(6)),f=c(n(6079));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _={DEFAULT:"default",SUCCESS:"success",ERROR:"error"};t.CopyInputModes=_;var h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).inputRef=a.createRef(),t.containerRef=a.createRef(),t.handleButtonClick=function(){t.select();var e=t.props;(0,e.onCopy)(e.value)},t.handleInputClick=function(){t.select()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var d=r.prototype;return d.select=function(){var e;null===(e=this.inputRef.current)||void 0===e||e.select()},d.renderInput=function(e){var t,n=this.props,r=n.value,i=n.mode;return a.createElement("input",{className:(0,o.default)((0,l.getClass)(f.default,"input",i),(t={},t[f.default.inputHidden]=e,t)),ref:this.inputRef,type:"text",value:r,onClick:this.handleInputClick,readOnly:!0})},d.render=function(){var e,t=this.props,n=t.text,r=t.mode,d=t.hideMessage,c=t.className,p=t.buttonLook,v=null!=d;switch(r){case _.SUCCESS:e=u.ButtonColors.GREEN;break;case _.ERROR:e=u.ButtonColors.RED;break;default:e=this.props.buttonColor}return y(i.default,{focusTarget:this.inputRef,ringTarget:this.containerRef},void 0,a.createElement("div",{className:(0,o.default)((0,l.getClass)(f.default,"copyInput",r),c),ref:this.containerRef},y(s.default,{className:f.default.layout},void 0,y(s.default,{className:f.default.inputWrapper},void 0,this.renderInput(v),v?y("div",{className:f.default.hiddenMessage},void 0,d):null),y(s.default,{shrink:1,grow:0,style:{margin:0}},void 0,y(u.default,{className:f.default.button,onClick:this.handleButtonClick,size:u.ButtonSizes.MIN,color:e,look:p},void 0,n)))))},r}(a.PureComponent);h.displayName="CopyInput",h.defaultProps={text:d.default.Messages.COPY,supportsCopy:!0,buttonColor:u.ButtonColors.GREY,buttonLook:u.ButtonLooks.FILLED,mode:_.DEFAULT},h.Modes=_,h.ButtonColors=u.ButtonColors,h.ButtonLooks=u.ButtonLooks;var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),s=c(n(9)),d=c(n(55)),f=c(n(6085));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.PRIMARY="primary",e.WARNING="warning",e.ERROR="error"}(i||(i={})),function(e){e.SMALL="small",e.LARGE="large",e.NONE="none"}(l||(l={}));var m=((r={})[i.PRIMARY]=f.default.colorPrimary,r[i.WARNING]=f.default.colorWarning,r[i.ERROR]=f.default.colorError,r),_=((a={})[l.SMALL]=f.default.small,a[l.LARGE]=f.default.large,a[l.NONE]=null,a),h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.prototype.render=function(){var e=this.props,t=e.icon,n=e.color,r=e.children,a=e.iconSize,o=e.className,i=e.iconClassName;return v(d.default,{className:(0,s.default)(f.default.note,m[n],o),align:d.default.Align.CENTER},void 0,v(t,{className:(0,s.default)(f.default.icon,_[a],i)}),v("div",{},void 0,r))},r}(u.PureComponent);h.displayName="PaymentNote",h.Colors=i,h.Sizes=l;var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("polygon",{points:"0 0 24 0 24 24 0 24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("polygon",{className:c,fill:f,fillRule:"nonzero",points:"18.35 4.35 16 2 6 12 16 22 18.35 19.65 10.717 12"}),d))}f.displayName="LeftCaret"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumGuildSubscriptionPurchaseModal=se,t.openPremiumGuildSubscriptionPurchaseModal=function(e){var t=e.analyticsLocation,n=e.guildId,r=e.closeLayer,a=e.onCloseModal,i=e.totalNumberOfSlotsToAssign,l=void 0===i?1:i,u=S.default.getPremiumTypeSubscription();if(null!=u&&u.isPurchasedExternally&&null!=u.paymentGateway)return null!=r&&r(),void f.default.show({title:Y.default.Messages.BILLING_MANAGED_BY_PAYMENT_GATEWAY.format({paymentGatewayName:s.PaymentGatewayToFriendlyName[u.paymentGateway]}),body:Y.default.Messages.PREMIUM_GUILD_PERKS_MODAL_BUTTON_UPGRADE_TO_PREMIUM_EXTERNAL_ERROR.format({paymentGatewayName:s.PaymentGatewayToFriendlyName[u.paymentGateway],subscriptionManagementLink:(0,w.getExternalSubscriptionMethodUrl)(u.paymentGateway,"SUBSCRIPTION_MANAGEMENT")})});var d=(0,R.openModal)((function(e){var i=e.transitionState,u=e.onClose;return Z(o.Elements,{options:W.StripeElementsOptions,stripe:(0,j.ensureStripeV3IsLoaded)()},void 0,Z(se,{transitionState:i,onClose:function(e){u(),null==a||a(e)},analyticsLocation:t,guildId:n,totalNumberOfSlotsToAssign:l,closeGuildPerksModal:r}))}),{onCloseRequest:function(){(0,R.closeModal)(d),null==a||a(!1)}})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=$();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(377),i=K(n(23)),l=n(276),u=K(n(98)),s=n(92),d=n(3),f=K(n(154)),c=n(287),p=n(5946),v=K(n(473)),y=K(n(5675)),m=K(n(5673)),_=K(n(15)),h=K(n(39)),E=K(n(693)),g=K(n(257)),S=K(n(1147)),O=K(n(5832)),I=K(n(5690)),T=K(n(29)),C=K(n(55)),b=K(n(1164)),M=K(n(151)),N=K(n(149)),A=n(85),P=n(35),R=n(41),L=K(n(13)),D=n(5935),w=n(96),j=n(295),k=n(1249),U=n(692),G=n(1173),F=n(6002),B=K(n(6009)),H=n(5677),x=K(n(6048)),V=n(6004),W=n(1),Y=K(n(6)),z=K(n(6125));function K(e){return e&&e.__esModule?e:{default:e}}function $(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return $=function(){return e},e}function Z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function q(){return(q=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}).apply(this,arguments)}function X(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function J(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){X(o,r,a,i,l,"next",e)}function l(e){X(o,r,a,i,l,"throw",e)}i(void 0)}))}}var Q=W.SubscriptionPlans.NONE_MONTH;function ee(e){switch(e){case U.Step.PLAN_SELECT:return Y.default.Messages.BILLING_STEP_SELECT_PLAN;case U.Step.PAYMENT_TYPE:return Y.default.Messages.BILLING_STEP_PAYMENT_TYPE;case U.Step.CREDIT_CARD_INFORMATION:return Y.default.Messages.BILLING_STEP_CREDIT_CARD_INFORMATION;case U.Step.PAYPAL_INFORMATION:return Y.default.Messages.BILLING_STEP_PAYPAL;case U.Step.PAYMENT_REQUEST_INFORMATION:return Y.default.Messages.BILLING_STEP_PAYMENT_INFO;case U.Step.ADDRESS:return Y.default.Messages.BILLING_STEP_ADDRESS;case U.Step.REVIEW:return Y.default.Messages.BILLING_STEP_REVIEW}throw new Error("Unexpected step: "+e)}var te=[U.Step.PLAN_SELECT,U.Step.REVIEW,U.Step.CONFIRM],ne=[U.Step.PLAN_SELECT].concat(H.SHARED_ADD_PAYMENT_STEPS,[U.Step.REVIEW,U.Step.CONFIRM]),re=[U.Step.PLAN_SELECT].concat(H.SHARED_CREDIT_CARD_STEPS,[U.Step.REVIEW,U.Step.CONFIRM]),ae=[U.Step.PLAN_SELECT].concat(H.SHARED_PAYPAL_STEPS,[U.Step.REVIEW,U.Step.CONFIRM]),oe=[U.Step.PLAN_SELECT].concat(H.SHARED_PAYMENT_REQUEST_STEPS,[U.Step.REVIEW,U.Step.CONFIRM]);function ie(e){return le.apply(this,arguments)}function le(){return(le=J(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.fetchUserPremiumGuildSubscriptionSlots)();case 2:return n=(0,D.getAvailableUserPremiumGuildSubscriptionSlots)(O.default.slots),e.abrupt("return",(0,p.subscribeToGuild)(t,n.map((function(e){return e.id}))));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ue=Z("div",{},void 0,Z(M.default,{}));function se(e){var t=e.transitionState,n=e.onClose,r=e.closeGuildPerksModal,o=e.analyticsLocation,f=e.guildId,p=e.onSubscribeComplete,M=e.totalNumberOfSlotsToAssign,R=void 0===M?1:M,j=e.disablePremiumUpsell,K=void 0!==j&&j,$=(0,d.useStateFromStores)([S.default],(function(){return S.default.getPremiumTypeSubscription()})),X=(0,d.useStateFromStores)([S.default],(function(){return S.default.hasFetchedSubscriptions()})),le=null!=$?$.paymentSourceId:null,se=(0,d.useStateFromStores)([g.default],(function(){return null!=$?g.default.get($.planId):null})),de=(0,d.useStateFromStores)([g.default],(function(){return null==se?g.default.getHardcoded(Q):se})),fe=(0,d.useStateFromStores)([h.default],(function(){return h.default.theme})),ce=a.useRef((0,D.getAvailableUserPremiumGuildSubscriptionSlots)(O.default.slots)).current,pe=(0,d.useStateFromStores)([E.default],(function(){return E.default.defaultPaymentSourceId})),ve=(0,H.useSharedPaymentModal)(null!=le?le:X?pe:null),ye=ve.paymentSources,me=ve.paymentSourceId,_e=ve.setPaymentSourceId,he=ve.creditCardState,Ee=ve.setCreditCardState,ge=ve.tokenState,Se=ve.setTokenState,Oe=ve.billingAddressState,Ie=ve.setBillingAddressState,Te=ve.isSubmittingCurrentStep,Ce=ve.setIsSubmittingCurrentStep,be=ve.braintreeEmail,Me=ve.braintreeNonce,Ne=ve.paymentError,Ae=ve.paymentAuthenticationState,Pe=ve.purchaseError,Re=ve.setPurchaseError,Le=ve.purchaseErrorBlockRef,De=Object.keys(ye).length>0,we=(0,A.useUID)(),je=a.useState(R-ce.length),ke=je[0],Ue=je[1],Ge=a.useState(!1),Fe=Ge[0],Be=Ge[1],He=a.useMemo((function(){return null==$?[{planId:W.SubscriptionPlans.PREMIUM_MONTH_GUILD,quantity:ke}]:(0,F.calculateAdditionalPlansWithPremiumGuildAdjustment)($,ke)}),[$,ke]),xe=(0,l.useLazyValue)((function(){return[u.default.v4(),Date.now()]})),Ve=xe[0],We=xe[1],Ye={load_id:Ve,payment_type:"subscription",sku_id:W.PremiumSubscriptionSKUs.GUILD,subscription_plan_id:He.some((function(e){return e.planId===W.SubscriptionPlans.PREMIUM_YEAR_GUILD}))?W.SubscriptionPlans.PREMIUM_YEAR_GUILD:W.SubscriptionPlans.PREMIUM_MONTH_GUILD,quantity:ke,location:o};a.useEffect((function(){S.default.hasFetchedSubscriptions()||(0,c.fetchSubscriptions)(),L.default.track(W.AnalyticEvents.PAYMENT_FLOW_STARTED,Ye)}),[]);var ze=a.useState(te),Ke=ze[0],$e=ze[1],Ze=a.useState(U.Step.PLAN_SELECT),qe=Ze[0],Xe=Ze[1],Je=a.useState(G.PurchaseState.WAITING),Qe=Je[0],et=Je[1],tt=(0,l.useStableMemo)((function(){return Date.now()}),[qe]),nt=function(e){Xe(e),Re(null);var t=Date.now();L.default.track(W.AnalyticEvents.PAYMENT_FLOW_STEP,q({},Ye,{from_step:qe,to_step:e,step_duration_ms:t-tt,flow_duration_ms:t-We}))},rt=function(){n(Qe===G.PurchaseState.COMPLETED)};Ae!==k.PaymentAuthenticationState.PENDING&&qe!==U.Step.CONFIRM&&null!=le&&(Ke!==te&&$e(te),te.includes(qe)||qe===U.Step.PREMIUM_UPSELL||nt(U.Step.REVIEW)),qe===U.Step.PAYMENT_TYPE&&Ke!==ne&&$e(ne);var at=null!=$&&$.isPurchasedExternally;at&&qe!==U.Step.PLAN_SELECT&&Xe(U.Step.PLAN_SELECT),(0,k.setPaymentStepForAuthentication)(qe,Ae,nt),(0,U.setPurchaseStateForStep)(qe,Qe,et);var ot,it=a.useRef(null),lt=(0,y.default)(!1,500),ut=lt[0],st=lt[1];if(X)if(null!=$&&null!=$.renewalMutations)ot=Z(P.ModalContent,{},void 0,Z("p",{className:z.default.copy},void 0,Y.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_ERROR_PENDING_MUTATION));else if(qe===U.Step.PREMIUM_UPSELL)ot=Z(x.default,{premiumSubscriptionPlan:de,premiumSubscriptionPaymentSourceId:le,analyticsLocation:o,onClose:rt,onBack:function(){return nt(U.Step.PLAN_SELECT)},onSkip:function(){nt(null!=le||De?U.Step.REVIEW:U.Step.PAYMENT_TYPE)}});else{var dt,ft,ct,pt;switch(qe){case U.Step.PLAN_SELECT:dt=Z(V.PremiumGuildSubscriptionPlanSelect,{premiumSubscriptionPlan:de,numGuildSubscriptions:ke,setNumGuildSubscriptions:Ue,premiumSubscription:$,existingAvailableSlots:ce,onClickPremiumSubscriptionLink:function(){__BILLING_STANDALONE__?window.location.href=W.DiscordProtocolRoutes.PREMIUM:(rt(),null!=r&&r(),v.default.open(W.UserSettingsSections.PREMIUM))}}),at&&null!=$&&null!=$.paymentGateway&&(dt=a.createElement(a.Fragment,null,Z(b.default,{className:z.default.externalErrorBlock},void 0,Y.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_EXTERNAL.format({paymentGatewayName:s.PaymentGatewayToFriendlyName[$.paymentGateway]})),dt)),ct=Z(T.default,{look:T.default.Looks.LINK,color:fe===W.ThemeTypes.LIGHT?T.default.Colors.PRIMARY:T.default.Colors.WHITE,onClick:rt},void 0,Y.default.Messages.NEVERMIND),pt=Z(T.default,{type:"submit",disabled:0===ke||at,onClick:function(){K||null!=se&&se.premiumSubscriptionType===W.PremiumTypes.TIER_2?nt(null!=le||De?U.Step.REVIEW:U.Step.PAYMENT_TYPE):nt(U.Step.PREMIUM_UPSELL)}},void 0,Y.default.Messages.CONTINUE);break;case U.Step.PAYMENT_TYPE:case U.Step.CREDIT_CARD_INFORMATION:case U.Step.PAYPAL_INFORMATION:case U.Step.PAYMENT_REQUEST_INFORMATION:case U.Step.ADDRESS:case U.Step.AWAITING_AUTHENTICATION:var vt=(0,H.renderPaymentModalStep)(qe,nt,Ke,$e,Oe,Ie,ye,_e,he,Ee,ge,Se,Te,Ce,be,Me,U.Step.REVIEW,re,ae,oe,ne);dt=vt.body,pt=vt.submitButton,ft=qe===U.Step.PAYMENT_TYPE&&null==vt.backStep?U.Step.PLAN_SELECT:vt.backStep;break;case U.Step.REVIEW:dt=Z(V.PremiumGuildSubscriptionReview,{paymentSources:ye,paymentSourceId:me,currentPremiumSubscription:$,premiumSubscriptionPaymentSourceId:le,premiumSubscriptionPlan:de,newAdditionalPlans:He,onPaymentSourceChange:function(e){return _e(null!=e?e.id:null)},onPaymentSourceAdd:function(){nt(U.Step.PAYMENT_TYPE),_e(null)},onPurchaseTermsChange:Be,legalTermsNodeRef:it,hasLegalTermsFlash:ut}),ft=U.Step.PLAN_SELECT,pt=Fe?Z(T.default,{color:T.default.Colors.GREEN,type:"submit",submitting:Te,onClick:J(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,i.default)(null!=He,"Missing newAdditionalPlans"),e.prev=1,et(G.PurchaseState.PURCHASING),Ce(!0),(0,i.default)(null!=me,"Missing paymentSourceId"),L.default.track(W.AnalyticEvents.PAYMENT_FLOW_COMPLETED,q({},Ye,{duration_ms:Date.now()-We})),null!=$&&null!=se){e.next=11;break}return e.next=9,(0,c.createSubscription)({items:He,paymentSourceId:me});case 9:e.next=15;break;case 11:return t={items:(0,w.getItemsFromNewAdditionalPlans)($,He)},null==le&&(t.paymentSourceId=me),e.next=15,(0,c.updateSubscription)($,t);case 15:if(nt(U.Step.CONFIRM),et(G.PurchaseState.COMPLETED),null==f){e.next=20;break}return e.next=20,ie(f);case 20:null!=p&&p(),e.next=29;break;case 23:e.prev=23,e.t0=e.catch(1),et(G.PurchaseState.FAIL),Re(e.t0),n=null!=me?ye[me]:null,L.default.track(W.AnalyticEvents.PAYMENT_FLOW_FAILED,q({},Ye,{payment_gateway:null!=n?n.type===W.PaymentSourceTypes.CARD?W.PaymentGateways.STRIPE:W.PaymentGateways.BRAINTREE:null,payment_source_id:me,duration_ms:Date.now()-We}));case 29:return e.prev=29,Ce(!1),e.finish(29);case 32:case"end":return e.stop()}}),e,null,[[1,23,29,32]])})))},void 0,Y.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_SUBMIT):Z(N.default,{text:Y.default.Messages.BILLING_ACCEPT_TERMS_TOOLTIP},void 0,(function(e){return a.createElement(T.default,q({},e,{color:T.default.Colors.GREEN,onClick:function(){null!=it.current&&(it.current.scrollIntoView({behavior:"smooth"}),st(!0))},type:"submit"}),Y.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_SUBMIT)}));break;case U.Step.CONFIRM:var yt=_.default.getGuild(f);dt=Z(V.PremiumGuildSubscriptionConfirmation,{guild:yt,guildSubscriptionQuantity:ke+ce.length,onClose:rt,withAnimation:!1})}var mt=null!=Ne&&null==(0,U.errorToStep)(Ne)?Ne:Pe;ot=Z("form",{className:z.default.contentWrapper,onSubmit:function(e){return e.preventDefault()}},void 0,Z(P.ModalContent,{className:z.default.content},void 0,qe!==U.Step.CONFIRM?Z("div",{className:z.default.breadcrumbsWrapper},void 0,Z(I.default,{activeId:U.COLLAPSED_PAYMENT_BREADCRUMB_STEPS.has(qe)?U.Step.PAYMENT_TYPE:qe,breadcrumbs:Ke.filter((function(e){return e!==U.Step.CONFIRM&&!U.COLLAPSED_PAYMENT_BREADCRUMB_STEPS.has(e)})).map((function(e){return{id:e,label:ee(e)}}))})):null,null==mt?null:a.createElement(b.default,{ref:Le},mt.message),Z("div",{className:z.default.bodyWrapper},void 0,Z(m.default,{step:qe,steps:Ke,sideMargin:20},void 0,dt))),qe!==U.Step.CONFIRM?Z(P.ModalFooter,{direction:C.default.Direction.HORIZONTAL,align:C.default.Align.CENTER,justify:C.default.Justify.END},void 0,null!=ft?Z("div",{className:z.default.backStep},void 0,Z(T.default,{color:fe===W.ThemeTypes.LIGHT?T.default.Colors.PRIMARY:T.default.Colors.WHITE,look:T.default.Looks.LINK,size:T.default.Sizes.NONE,onClick:function(){null!=ft&&nt(ft)}},void 0,Y.default.Messages.BACK)):null,Z("div",{className:z.default.footerRight},void 0,ct,pt)):null)}else ot=ue;return Z(P.ModalRoot,{transitionState:t,"aria-labelledby":we},void 0,qe!==U.Step.PREMIUM_UPSELL?Z(B.default,{onClose:rt,currentStep:qe,purchaseState:Qe,headerId:we}):null,ot)}se.displayName="PremiumGuildSubscriptionPurchaseModal"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(123),i=h(n(284)),l=n(1179),u=h(n(5982)),s=h(n(5983)),d=h(n(5945)),f=n(1),c=h(n(5984)),p=h(n(5985)),v=h(n(5986)),y=h(n(5987)),m=h(n(5988)),_=h(n(5989));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var S=g("source",{src:u.default,type:"video/mp4"},"hevc"),O=g("source",{src:s.default,type:"video/mp4"},"hevc"),I=function(){var e,t=(0,l.getChromeVersion)(),n=c.default,r=y.default,a=p.default,o=m.default,i=[g("source",{src:n,type:"video/mp4"},"mp4"),g("img",{alt:"",src:a},"png")],u=[g("source",{src:r,type:"video/mp4"},"mp4"),g("img",{alt:"",src:o},"png")];if(function(){var e=window.navigator,t=e.userAgent.toLowerCase(),n=!(!e.mediaCapabilities||!e.mediaCapabilities.decodingInfo);return-1!==t.indexOf("safari")&&!(-1!==t.indexOf("chrome"))&&-1!==t.indexOf("version/")&&n}()&&(i.unshift(S),u.unshift(O)),t>52||-1===t){var s=v.default,d=_.default;i.unshift(g("source",{src:s,type:"video/webm"},"webm")),u.unshift(g("source",{src:d,type:"video/webm"},"webm"))}return(e={})[f.ThemeTypes.DARK]=i,e[f.ThemeTypes.LIGHT]=u,e}(),T=function(e){var t=e.loop,n=void 0===t||t,r=e.autoPlay,l=void 0===r||r,u=e.setRef,s=e.className,c=e.onReady,p=a.useContext(i.default),v=a.useContext(o.AccessibilityPreferencesContext).reducedMotion;return a.createElement(d.default,{key:p,ref:u,onLoadedData:c,className:s,loop:!v.enabled&&n,autoPlay:!v.enabled&&l,playsInline:!0},I[p]||I[f.ThemeTypes.DARK])};T.displayName="AppSpinner";var C=T;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=l(n(3)),o=l(n(2)),i=n(5849);n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=(0,i.getDefaultCountryCode)();function d(e){var t,n=e.countryCode;null!=n&&(s=null!==(t=(0,i.getCountryCodeByAlpha2)(n))&&void 0!==t?t:(0,i.getDefaultCountryCode)())}var f=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var o=a.prototype;return o.initialize=function(e){null!=e&&(r=e.selectedCountryCode)},o.getState=function(){return{selectedCountryCode:r}},o.getCountryCode=function(){return null!=r?r:s},a}(a.default.PersistedStore);f.persistKey="PhoneStore";var c=new f(o.default,{PHONE_SET_COUNTRY_CODE:function(e){var t=e.countryCode;r=t},CONNECTION_OPEN:d,SET_LOCATION_METADATA:d});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(153)),l=n(131),u=n(5964),s=c(n(6026)),d=c(n(6070)),f=c(n(1244));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t,n=e.alpha2,r=e.countryCode,c=e.forceMode,p=e.label,y=e.error,m=e.className,_=e.required,h=e.value,E=e.setRef,g=e.placeholder,S=e.autoFocus,O=e.maxLength,I=e.spellCheck,T=e.autoComplete,C=e.onChange,b=e.inputClassName,M=a.useState(!1),N=M[0],A=M[1],P=(0,u.shouldShowCountryCodeSelector)(c,h);return v(l.FormItem,{title:p,error:y,className:m,required:_},void 0,v("div",{className:(0,o.default)(f.default.input,d.default.input,b,(t={},t[f.default.error]=null!=y,t[f.default.focused]=N,t))},void 0,v(s.default,{show:P,alpha2:n,countryCode:r}),v(i.default,{name:"email",type:c===u.PhoneOrEmailSelectorForceMode.EMAIL?"email":"text",value:h,inputRef:E,placeholder:g,"aria-label":p,onChange:function(e){var t=(0,u.shouldShowCountryCodeSelector)(c,e)?r:"";C(e,t)},autoComplete:T,autoFocus:S,maxLength:O,spellCheck:I,className:d.default.inputWrapper,inputClassName:d.default.inputField,onFocus:function(){return A(!0)},onBlur:function(){return A(!1)}})))}y.displayName="PhoneOrEmailInput"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GiftCodeResolvingHeader=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(3)),l=h(n(71)),u=h(n(12)),s=h(n(257)),d=h(n(373)),f=h(n(477)),c=n(475),p=n(1),v=h(n(6)),y=h(n(6071)),m=h(n(1170)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var S=function(){return g(a.Fragment,{},void 0,g(c.Avatar,{src:null,size:c.Avatar.Sizes.DEPRECATED_SIZE_100,className:_.default.marginBottom20}),g(c.SubTitle,{},void 0,v.default.Messages.GIFT_CODE_AUTH_GIFTED),g(c.Title,{className:(0,o.default)(_.default.marginTop8,m.default.flexCenter)},void 0,v.default.Messages.LOADING))};t.GiftCodeResolvingHeader=S,S.displayName="GiftCodeResolvingHeader";var O=function(e){var t=e.error,n=e.gifter,r=e.sku,i=e.application,l=e.subscriptionPlan,u=null==n?v.default.Messages.GIFT_CODE_AUTH_GIFTED:v.default.Messages.GIFT_CODE_AUTH_GIFTED_BY.format({username:n.username}),s=r.name;return null!=l&&(s=(l.interval===p.SubscriptionIntervalTypes.MONTH?v.default.Messages.GIFT_CODE_AUTH_GIFTED_SUBSCRIPTION_MONTHLY:v.default.Messages.GIFT_CODE_AUTH_GIFTED_SUBSCRIPTION_YEARLY).format({skuName:r.name,intervalCount:l.intervalCount})),g(a.Fragment,{},void 0,g(c.Avatar,{src:null!=n?n.getAvatarURL(void 0):null,size:c.Avatar.Sizes.DEPRECATED_SIZE_100,className:_.default.marginBottom20}),null!=t?g(a.Fragment,{},void 0,g(c.SubTitle,{},void 0,v.default.Messages.INVITE_MODAL_ERROR_TITLE),g(c.Title,{},void 0,t)):g(a.Fragment,{},void 0,g(c.SubTitle,{},void 0,u),g(c.Title,{className:(0,o.default)(_.default.marginTop8,m.default.flexCenter)},void 0,g(f.default,{size:f.default.Sizes.MEDIUM,className:y.default.applicationIcon,game:i,skuId:r.id}),s)))};O.displayName="GiftCodeHeader";var I=i.default.connectStores([d.default,l.default,s.default,u.default],(function(e){var t=e.giftCode,n=d.default.get(t.skuId),r=t.subscriptionPlanId;return{sku:n,subscriptionPlan:null!=r?s.default.get(r):null,application:l.default.getGame(n.applicationId),gifter:u.default.getUser(t.userId)}}))(O);t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(475)),l=u(n(6105));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.children,n=e.className,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","className"]),u=t();return a.createElement(i.default,d({},r,{className:(0,o.default)(n,l.default.container),contentClassName:l.default.content}),u.map((function(e,t){return f("div",{className:l.default.column,style:{flexBasis:100/u.length+"%"}},t,e)})))}c.displayName="MultiColumnAuthBox"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPromotionImageURL=function(e,t){var n=t===o.ThemeTypes.DARK?"logo-dark":"logo-light",r=window.GLOBAL_ENV.CDN_HOST;if(null!=r)return location.protocol+"//"+r+"/promotions/"+e+"/"+n+"?size=256";return""+location.protocol+window.GLOBAL_ENV.API_ENDPOINT+"/promotions/"+e+"/"+n+"?size=256"},t.outboundPromotionFromServer=s,t.fetchClaimedOutboundPromotionCodes=function(){return f.apply(this,arguments)},t.claimOutboundPromotion=function(e){return c.apply(this,arguments)},t.getOutboundPromotionRedemptionUrl=function(e,t){if(null!=t.outboundRedemptionUrlFormat)return t.outboundRedemptionUrlFormat.replace("{code}",encodeURIComponent(e));return t.outboundRedemptionPageLink};var r=i(n(14)),a=i(n(39)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}function s(e){return{id:e.id,startDate:e.start_date,endDate:e.end_date,outboundTitle:e.outbound_title,outboundRedemptionModalBody:e.outbound_redemption_modal_body,outboundRedemptionPageLink:e.outbound_redemption_page_link,outboundRedemptionUrlFormat:e.outbound_redemption_url_format,outboundTermsAndConditions:e.outbound_terms_and_conditions}}function d(e){return{code:e.code,userId:e.user_id,claimedAt:e.claimed_at,promotion:s(e.promotion)}}function f(){return(f=u(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:o.Endpoints.CLAIMED_OUTBOUND_PROMOTION_CODES,query:{locale:a.default.locale},oldFormErrors:!0});case 2:return t=e.sent,n=t.body,e.abrupt("return",n.map(d));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(){return(c=u(regeneratorRuntime.mark((function e(t){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.post({url:o.Endpoints.CLAIM_OUTBOUND_PROMOTION_CODE(t)});case 2:return n=e.sent,a=n.body,e.abrupt("return",d(a));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M11.2137 2.00088L2.27111 13.3826C1.9299 13.8168 2.00535 14.4455 2.43963 14.7867C2.61581 14.9251 2.83338 15.0004 3.05744 15.0004H7V21.0004C7 21.5527 7.44772 22.0004 8 22.0004H16C16.5523 22.0004 17 21.5527 17 21.0004V15.0004H20.9425C21.4948 15.0004 21.9425 14.5527 21.9425 14.0004C21.9425 13.7763 21.8673 13.5588 21.7289 13.3826L12.7863 2.00088C12.4451 1.56661 11.8165 1.49116 11.3822 1.83237C11.3195 1.88162 11.2629 1.93819 11.2137 2.00088Z"}))}d.displayName="Upload2"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(55)),l=u(n(6062));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).setCodeBlockRef=function(e){t._codeBlockRef=e},t.handleKeyDown=function(e){var n=8===e.which||37===e.which||39===e.which,r=e.which>=48&&e.which<=57||e.keyCode>=96&&e.keyCode<=105;n||r||e.preventDefault();var a=t.props.onKeyDown;a&&a(e)},t.handleChange=function(e){var n=t.props.onChange;n&&n(e.currentTarget.value)},t}f(t,e);var n=t.prototype;return n.render=function(){var e=this.props.className;return a.createElement("input",{ref:this.setCodeBlockRef,className:(0,o.default)(l.default.input,e),maxLength:1,value:null!=this.props.code?this.props.code:void 0,autoFocus:this.props.autoFocus,onKeyDown:this.handleKeyDown,onChange:this.handleChange})},n.focus=function(){this._codeBlockRef&&this._codeBlockRef.focus()},n.blur=function(){this._codeBlockRef&&this._codeBlockRef.blur()},t}(a.PureComponent);p.displayName="CodeBlock",p.defaultProps={autoFocus:!1};var v=function(e){function t(t){var n;return(n=e.call(this,t)||this)._codeBlockRefs=new Array(n.props.count),n.state={codes:new Array(t.count)},n}f(t,e);var n=t.prototype;return n.render=function(){for(var e=this,t=this.props,n=t.className,r=t.inputClassName,o=this.state.codes,u=[],s=function(t){t===o.length/2&&u.push(d("div",{className:l.default.spacer},"spacer")),u.push(a.createElement(p,{ref:function(n){return e.setCodeBlockRef(t,n)},key:t,code:o[t],autoFocus:0===t,onChange:function(n){return e.handleChange(t,n)},onKeyDown:function(n){return e.handleKeyDown(t,n)},className:r}))},f=0;f<o.length;f++)s(f);return d(i.default,{align:i.default.Align.CENTER,justify:i.default.Justify.CENTER,className:n},void 0,u)},n.setCodeBlockRef=function(e,t){this._codeBlockRefs[e]=t},n.handleChange=function(e,t){this.state.codes[e]=t;var n=this.getCodeOrFirstEmptyIndex();if("string"==typeof n)this.submit(n);else{var r=this._codeBlockRefs[n];r&&r.focus()}},n.handleKeyDown=function(e,t){var n=this.state.codes;if(8===t.which&&e>0&&(null==n[e]||0===n[e].length)){var r=e-1;n[r]="";var a=this._codeBlockRefs[r];a&&a.focus()}},n.getCodeOrFirstEmptyIndex=function(){for(var e=this.state.codes,t="",n=0;n<e.length;n++){if(isNaN(parseInt(e[n])))return n;t+=e[n]}return t},n.submit=function(e){var t=this.props.onSubmit;t&&t(e)},t}(a.PureComponent);v.displayName="CodeField",v.defaultProps={count:6};var y=v;t.default=y},function(e,t,n){e.exports=n.p+"2d889bf9114df188325d15f9e517c325.mov"},function(e,t,n){e.exports=n.p+"d44a33e33f751afe9a0e5e42e2156d8f.mov"},function(e,t,n){e.exports=n.p+"6d5b64b094944af6d52d895c8c2b8a59.mp4"},function(e,t,n){e.exports=n.p+"110bfae7e9a5130a3bae55202cd1dd7f.png"},function(e,t,n){e.exports=n.p+"3b0d96ed8113994f3d139088726cfecd.webm"},function(e,t,n){e.exports=n.p+"90c2f45413660019fa25f4f9f40ecb5d.mp4"},function(e,t,n){e.exports=n.p+"35bf511183fdb9dbd234b1b579106334.png"},function(e,t,n){e.exports=n.p+"1eae6aab9a6b4e7da646db415479560b.webm"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=m(n(480)),l=m(n(8)),u=m(n(5699)),s=m(n(55)),d=m(n(6027)),f=n(272),c=n(5849),p=m(n(6)),v=m(n(6068)),y=m(n(5958));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=E(d.default.Divider,{}),O=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).onChangeQuery=function(e){n.setState({query:e})},n.onClearQuery=function(){n.setState({query:""})},n.onClick=function(e){var t=e.id;(0,n.props.onClick)(t)},n.state={query:""},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var m=r.prototype;return m.renderItems=function(){var e=this,t=this.state.query,n=u.default.map((function(e,t){var n=e.alpha2,r=e.code,a=e.name,o=r.split(" ")[0],i=(0,c.getI18NName)(n);return{id:t,name:a,translatedName:i,children:E(s.default,{className:v.default.countryItem,justify:s.default.Justify.CENTER,align:s.default.Align.CENTER},void 0,E(s.default.Child,{className:v.default.countryName},void 0,i),E(s.default.Child,{className:v.default.countryCode,grow:0,shrink:0},void 0,o))}})),r=(0,l.default)(n).filter((function(e){return 0===t.length||(0,i.default)(t.toLowerCase(),e.name.toLowerCase())||(0,i.default)(t.toLowerCase(),e.translatedName.toLowerCase())})).map((function(t){return a.createElement(d.default.Item,h({key:t.id},t,{onClick:e.onClick}))})).value();return 0===r.length?E(d.default.Empty,{},void 0,p.default.Messages.NONE):E(f.ScrollerAuto,{className:v.default.phoneFieldScroller},void 0,r)},m.render=function(){var e=this.props.className;return E(d.default,{className:(0,o.default)(v.default.phoneFieldPopout,y.default.elevationBorderLow,e)},void 0,E(d.default.SearchBar,{query:this.state.query,placeholder:p.default.Messages.SEARCH_COUNTRY,onChange:this.onChangeQuery,onClear:this.onClearQuery,autoComplete:"off"}),S,this.renderItems())},r}(a.PureComponent);t.default=O,O.displayName="CountryPopoutList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(1148),a=(0,r.registerUserExperiment)({id:r.Experiments.KILL_LANDING_PAGE,title:"Kill Landing Page",description:["Kill landing page","Control: Landing page is AF","Treatment 1: Landing page is People"],buckets:[r.ExperimentBuckets.CONTROL,r.ExperimentBuckets.TREATMENT_1]});t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;p(n(0));var r,a=n(92),o=f(n(1187)),i=p(n(475)),l=n(1),u=f(n(6)),s=f(n(1170)),d=f(n(370));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.title,r=e.onVerify,f=e.authBoxClassName,c=e.captchaService,p=void 0===c?l.CaptchaTypes.RECAPTCHA:c,y=e.sitekey;return v(i.default,{className:f},void 0,v("img",{alt:"",src:n(5704),className:d.default.marginBottom20}),null!=t?v(i.Title,{className:d.default.marginBottom8},void 0,t):null,v(i.SubTitle,{className:d.default.marginBottom40},void 0,u.default.Messages.BEEP_BOOP),v("div",{className:s.default.flexCenter},void 0,v(o.default,{onVerify:r,theme:a.ThemeTypes.DARK,captchaService:p,sitekey:y})))};y.displayName="AuthCaptcha";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=c(n(133)),l=c(n(29)),u=c(n(55)),s=n(131),d=n(35),f=c(n(6073));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=(0,i.default)({UPGRADE:null,CANCEL:null,UNVERIFIED:null,UNCLAIMED:null,GRANDFATHERED:null}),m=((r={})[y.UPGRADE]="imageUpgrade",r[y.CANCEL]="imageCancel",r[y.UNVERIFIED]="imageUnverified",r[y.UNCLAIMED]="imageUnclaimed",r[y.GRANDFATHERED]="imageCancel",r),_=function(e){var t=e.children,n=e.onClose;return v(d.ModalHeader,{justify:u.default.Justify.BETWEEN,separator:!1},void 0,v(s.FormTitle,{tag:s.FormTitleTags.H4},void 0,t),null!=n?v(d.ModalCloseButton,{className:f.default.closeIcon,onClick:n}):null)};_.displayName="Header";var h=function(e){var t=e.children,n=e.type;return v(d.ModalContent,{},void 0,v("div",{className:f.default[m[n]]}),v("div",{className:f.default.message},void 0,t))};h.displayName="Content";var E=function(e){var t=e.primary,n=e.primaryRenderer,r=e.secondary;return v(d.ModalFooter,{},void 0,v(u.default,{justify:u.default.Justify.END},void 0,null!=r?v(l.default,{onClick:r.onClick,look:l.default.Looks.LINK,innerClassName:f.default.secondaryButton},void 0,r.label):null,null!=t?v(l.default,{onClick:t.onClick,color:l.default.Colors.BRAND},void 0,t.label):n))};E.displayName="Footer";var g=function(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children"]);return o.createElement(d.ModalRoot,n,t)};g.displayName="PremiumModal",g.Header=_,g.Content=h,g.Footer=E,g.Types=y;var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(3)),i=v(n(363)),l=v(n(218)),u=v(n(12)),s=v(n(29)),d=v(n(466)),f=n(41),c=v(n(24)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isSendingVerificationEmail:!1},t.handleResendVerification=function(){var e=t.props,n=e.currentUser,r=e.onClick;r&&r(),t.setState({isSendingVerificationEmail:!0},(function(){i.default.verifyResend().then((function(){return(0,f.openModal)((function(e){return a.createElement(d.default,m({header:p.default.Messages.VERIFICATION_EMAIL_TITLE,confirmText:p.default.Messages.OKAY,confirmButtonColor:s.default.Colors.BRAND},e),_(c.default,{size:c.default.Sizes.SIZE_16},void 0,p.default.Messages.VERIFICATION_EMAIL_BODY.format({email:n.email})))}))})).catch((function(e){var t=e.body,n=p.default.Messages.VERIFICATION_EMAIL_ERROR_BODY;null!=t&&t.email&&(n=t.email),(0,f.openModal)((function(e){return a.createElement(l.default,m({title:p.default.Messages.VERIFICATION_EMAIL_ERROR_TITLE,body:n},e))}))})).then((function(){return t.setState({isSendingVerificationEmail:!1})}))}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n),r.prototype.render=function(){var e=this.props,t=e.color,n=e.look,r=e.size;return _(s.default,{look:n,size:r,color:t,disabled:this.state.isSendingVerificationEmail,onClick:this.handleResendVerification},void 0,p.default.Messages.RESEND_VERIFICATION_EMAIL)},r}(a.Component);E.displayName="ResendEmailVerificationButton",E.defaultProps={size:s.default.Sizes.MEDIUM,color:s.default.Colors.BRAND};var g=o.default.connectStores([u.default],(function(){return{currentUser:u.default.getCurrentUser()}}))(E);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(1171),l=_(n(5956)),u=_(n(29)),s=_(n(153)),d=n(85),f=n(131),c=n(35),p=n(217),v=_(n(24)),y=_(n(6)),m=_(n(6074));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){g(o,r,a,i,l,"next",e)}function l(e){g(o,r,a,i,l,"throw",e)}i(void 0)}))}}function O(e){var t,n,r=e.transitionState,_=e.onClose,h=(0,d.useUID)(),g=a.useState(""),O=g[0],I=g[1],T=a.useState(""),C=T[0],b=T[1],M=a.useState(!1),N=M[0],A=M[1],P=(0,o.useStateFromStores)([l.default],(function(){return l.default.getErrors()})),R=a.useRef(null);function L(){return(L=S(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),A(!0),e.next=4,(0,i.saveAccountChanges)({email:O,password:C});case 4:n=e.sent,A(!1),(null==n?void 0:n.ok)&&_();case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return a.useEffect((function(){var e;r===p.ModalTransitionState.ENTERED&&(null===(e=R.current)||void 0===e||e.focus())}),[r]),a.useEffect((function(){return function(){return(0,i.accountDetailsClose)()}}),[]),E(c.ModalRoot,{transitionState:r,"aria-labelledby":h},void 0,E(c.ModalHeader,{id:h,separator:!1,className:m.default.header},void 0,E(v.default,{color:v.default.Colors.HEADER_PRIMARY,size:v.default.Sizes.SIZE_24,className:m.default.title},void 0,y.default.Messages.USER_SETTINGS_ACCOUNT_CHANGE_EMAIL_TITLE_DESKTOP),E(v.default,{color:v.default.Colors.HEADER_SECONDARY,size:v.default.Sizes.SIZE_16,className:m.default.subtitle},void 0,y.default.Messages.USER_SETTINGS_ACCOUNT_CHANGE_EMAIL_PROMPT_DESKTOP),E(c.ModalCloseButton,{onClick:_,className:m.default.modalCloseButton})),E("form",{onSubmit:function(e){return L.apply(this,arguments)}},void 0,E(c.ModalContent,{className:m.default.content},void 0,E(f.FormItem,{title:y.default.Messages.EMAIL,error:null==P||null===(t=P.email)||void 0===t?void 0:t[0]},void 0,E(s.default,{type:"email",value:O,onChange:I,inputRef:R})),E(f.FormItem,{className:m.default.password,title:y.default.Messages.USER_SETTINGS_LABEL_CURRENT_PASSWORD,error:null==P||null===(n=P.password)||void 0===n?void 0:n[0]},void 0,E(s.default,{type:"password",value:C,onChange:b}))),E(c.ModalFooter,{},void 0,E(u.default,{type:"submit",color:u.default.Colors.BRAND,size:u.default.Sizes.MEDIUM,submitting:N},void 0,y.default.Messages.DONE),E(u.default,{className:m.default.cancel,look:u.default.Looks.LINK,color:u.default.Colors.PRIMARY,onClick:_},void 0,y.default.Messages.CANCEL))))}O.displayName="ChangeEmailModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressStepFooter=t.AddressStepBody=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=y(n(5846)),l=y(n(39)),u=y(n(29)),s=y(n(55)),d=y(n(1164)),f=n(35),c=n(5835),p=y(n(6)),v=y(n(5838));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t=e.billingAddressInfo,n=e.billingError,r=e.onBillingAddressChange,u=null!=n&&(null==n.code||(0,c.errorToStep)(n)===c.Steps.ADDRESS),s=(0,o.useStateFromStores)([l.default],(function(){return l.default.locale}));return h(a.Fragment,{},void 0,u?h(d.default,{className:v.default.errorBlock},void 0,p.default.Messages.BILLING_ERROR_SECTION_ADDRESS):null,a.createElement(i.default,_({className:v.default.formItem,onBillingAddressChange:r,error:n,layout:"en-US"===s?i.default.Layouts.MODAL_US:i.default.Layouts.MODAL_INTL},t)))};t.AddressStepBody=E,E.displayName="AddressStepBody";var g=function(e){var t=e.isBillingAddressInfoValid,n=e.submitting,r=e.onContinue,a=e.renderBackButton;return h(f.ModalFooter,{justify:s.default.Justify.BETWEEN,direction:s.default.Direction.HORIZONTAL},void 0,a(),h(u.default,{type:"submit",disabled:!t,submitting:n,onClick:r},void 0,p.default.Messages.NEXT))};t.AddressStepFooter=g,g.displayName="AddressStepFooter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreditCardInformationFooter=t.CreditCardInformationBody=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(5853)),i=p(n(29)),l=p(n(55)),u=p(n(1164)),s=n(35),d=n(5835),f=p(n(6)),c=p(n(5838));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.billingError,n=e.onCardInfoChange,r=null!=t&&(null==t.code||(0,d.errorToStep)(t)===d.Steps.CREDIT_CARD_INFORMATION);return y(a.Fragment,{},void 0,r?y(u.default,{className:c.default.errorBlock},void 0,f.default.Messages.BILLING_ERROR_SECTION_CARD):null,y(o.default,{onCardInfoChange:n,error:t}))};t.CreditCardInformationBody=m,m.displayName="CreditCardInformationBody";var _=function(e){var t=e.isCardInfoValid,n=e.submitting,r=e.renderBackButton,a=e.onCreditCardContinue;return y(s.ModalFooter,{justify:l.default.Justify.BETWEEN,direction:l.default.Direction.HORIZONTAL},void 0,r(),y(i.default,{type:"submit",disabled:!t,submitting:n,onClick:a},void 0,f.default.Messages.NEXT))};t.CreditCardInformationFooter=_,_.displayName="CreditCardInformationFooter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M96.4373 17.6233H83.2985C82.9632 17.6233 82.6698 17.8748 82.6279 18.21L81.9992 22.5687C81.9364 22.9669 82.2507 23.3441 82.6698 23.3441H85.0796C85.3311 23.3441 85.4778 23.5955 85.394 23.8051C85.1006 24.4966 84.8701 25.2719 84.7653 26.0892L83.5499 34.5341C82.7536 40.192 87.4476 43 92.5816 43C97.9461 43 103.227 40.171 104.023 34.5341L105.239 26.0892C105.993 20.557 101.446 17.749 96.4373 17.6233ZM98.952 26.1101L97.7366 34.3665C97.4641 36.3153 95.2638 37.2164 93.2312 37.2164C91.3452 37.2164 89.5012 36.3153 89.7526 34.5341L90.968 26.0892C91.2405 24.2451 93.4408 23.3021 95.4734 23.3021C97.5061 23.3021 99.2453 24.2451 98.952 26.1101Z"}),f=s("path",{d:"M23.5344 17.6233H18.6309C18.2956 17.6233 18.0023 17.8748 17.9603 18.21L16.4516 28.96V28.981L16.5144 33.1301C16.5144 33.2139 16.4516 33.2978 16.3678 33.3187L14.9638 28.3104V28.2895L10.5841 18.0424C10.4794 17.7909 10.2279 17.6233 9.95547 17.6233H4.9891C4.65382 17.6233 4.36044 17.8748 4.31853 18.21L1.00762 41.8894C0.944753 42.3085 1.28004 42.6647 1.67818 42.6647H6.6236C6.95889 42.6647 7.25226 42.4133 7.29417 42.078L8.59339 32.6691V32.6481L8.53052 27.8285L8.67721 27.7865L10.165 32.7948V32.8158L14.2513 42.2666C14.3561 42.518 14.6075 42.6857 14.8799 42.6857H20.2445C20.5797 42.6857 20.8731 42.4342 20.915 42.0989L24.2259 18.4196C24.2888 18.0005 23.9535 17.6233 23.5344 17.6233Z"}),c=s("path",{d:"M34.2634 17.6233H29.318C28.9827 17.6233 28.6893 17.8748 28.6474 18.21L25.3365 41.8684C25.2736 42.2875 25.6089 42.6438 26.007 42.6438H30.9525C31.2877 42.6438 31.5811 42.3923 31.623 42.057L34.9339 18.3986C34.9968 18.0005 34.6825 17.6233 34.2634 17.6233Z"}),p=s("path",{d:"M57.4608 17.6233H38.9573C38.6221 17.6233 38.3287 17.8748 38.2868 18.21L37.6372 22.6316C37.5743 23.0507 37.8886 23.4069 38.3077 23.4069H43.4837C43.9028 23.4069 44.2171 23.7632 44.1542 24.1823L41.7234 41.8684C41.6606 42.2875 41.9958 42.6438 42.394 42.6438H47.4023C47.7376 42.6438 48.0309 42.3923 48.0728 42.057L50.5665 23.9937C50.6084 23.6584 50.9018 23.4069 51.2371 23.4069H56.7902C57.1255 23.4069 57.4188 23.1555 57.4608 22.8202L58.1104 18.3986C58.2151 18.0005 57.8799 17.6233 57.4608 17.6233Z"}),v=s("path",{d:"M71.6056 17.6233H62.1967C61.8615 17.6233 61.5681 17.8748 61.5262 18.21L58.2153 41.8684C58.1524 42.2875 58.4877 42.6438 58.8858 42.6438H63.8941C64.2294 42.6438 64.5228 42.3923 64.5647 42.057L65.5286 34.9951C65.5496 34.8275 65.6963 34.7018 65.8639 34.7018H66.5135C66.6392 34.7018 66.744 34.7646 66.8069 34.8694L71.5847 42.3504C71.7104 42.539 71.9199 42.6647 72.1714 42.6647H78.3741C78.919 42.6647 79.2542 42.0361 78.9399 41.596L73.9107 34.4084C73.7849 34.2407 73.8478 33.9893 74.0364 33.9055C77.2425 32.3338 79.1076 30.7412 79.7153 26.2568C80.4277 20.3894 76.7606 17.6233 71.6056 17.6233ZM73.3239 26.3616C73.1563 27.8075 72.0247 29.2534 70.0759 29.2534H67.1631C66.744 29.2534 66.4297 28.8762 66.4925 28.4781L67.1212 24.1194C67.1631 23.7841 67.4565 23.5326 67.7918 23.5326H70.9141C72.7581 23.5326 73.5125 24.8528 73.3239 26.3616Z"}),y=s("path",{d:"M23.3458 2.64035H26.9082C27.7674 2.64035 28.5008 2.76608 29.0875 3.0385C29.6324 3.26901 30.0934 3.66715 30.4287 4.17008C30.722 4.673 30.8897 5.23879 30.8687 5.80458C30.8687 6.39132 30.722 6.95711 30.4077 7.46004C30.0724 7.98392 29.5695 8.38207 29.0037 8.63353C28.3751 8.9269 27.5788 9.07359 26.6567 9.07359H23.3458V2.64035V2.64035ZM26.6358 7.41813C27.2225 7.41813 27.6626 7.27144 27.9769 6.97807C28.2912 6.66374 28.4589 6.24464 28.4379 5.78363C28.4589 5.36452 28.3122 4.96637 28.0188 4.673C27.7464 4.40058 27.3273 4.2539 26.7615 4.2539H25.6509V7.39717H26.6358V7.41813Z"}),m=s("path",{d:"M36.2331 9.05262C35.7721 8.92689 35.3111 8.7383 34.892 8.48683V6.95711C35.2482 7.22952 35.6673 7.41812 36.0864 7.5229C36.5684 7.66958 37.0504 7.73245 37.5533 7.7534C37.7209 7.7534 37.8886 7.73245 38.0562 7.66958C38.161 7.60672 38.2238 7.54385 38.2238 7.46003C38.2238 7.37621 38.2029 7.29239 38.14 7.22952C38.0352 7.1457 37.9095 7.10379 37.7838 7.08284L36.6941 6.83137C36.0655 6.68469 35.6254 6.47514 35.353 6.22368C35.0806 5.95126 34.9339 5.57407 34.9548 5.19687C34.9548 4.86159 35.0806 4.52631 35.3111 4.27484C35.5835 3.98147 35.9188 3.77192 36.296 3.66714C36.7779 3.52046 37.2809 3.43664 37.8047 3.45759C38.2867 3.45759 38.7477 3.4995 39.2087 3.62523C39.5859 3.70906 39.9422 3.85574 40.2774 4.04434V5.49024C39.9631 5.30165 39.6278 5.17592 39.2926 5.0921C38.9154 4.98732 38.5172 4.94541 38.14 4.94541C37.5742 4.94541 37.2809 5.05019 37.2809 5.23878C37.2809 5.3226 37.3228 5.40642 37.4066 5.44833C37.5533 5.5112 37.7209 5.55311 37.8886 5.59502L38.8106 5.76266C39.3973 5.86744 39.8583 6.05603 40.1517 6.3075C40.4451 6.55896 40.5918 6.95711 40.5918 7.46003C40.5918 8.00486 40.3194 8.50779 39.8583 8.78021C39.3764 9.09453 38.6849 9.26218 37.7838 9.26218C37.2599 9.24122 36.736 9.17835 36.2331 9.05262Z"}),_=s("path",{d:"M42.7294 8.86404C42.2475 8.63353 41.8284 8.2773 41.535 7.81628C41.2626 7.37622 41.1368 6.85234 41.1368 6.32847C41.1368 5.80459 41.2626 5.30166 41.5559 4.8616C41.8493 4.40059 42.2684 4.06531 42.7713 3.8348C43.379 3.58334 44.0287 3.43665 44.6783 3.45761C45.6003 3.45761 46.3547 3.6462 46.9624 4.04435V5.72077C46.7319 5.57408 46.4804 5.44835 46.208 5.36453C45.9146 5.28071 45.6003 5.21784 45.286 5.21784C44.7202 5.21784 44.2801 5.32262 43.9448 5.53217C43.4838 5.78363 43.3371 6.34942 43.5886 6.81043C43.6724 6.95712 43.7981 7.08285 43.9448 7.16667C44.2592 7.37622 44.6992 7.481 45.3069 7.481C45.6212 7.481 45.9146 7.43909 46.208 7.35527C46.4804 7.27145 46.7319 7.16667 46.9624 7.01999V8.63353C46.2499 9.05264 45.4536 9.26219 44.6364 9.24123C43.9867 9.26219 43.3162 9.13646 42.7294 8.86404Z"}),h=s("path",{d:"M49.2463 8.86402C48.7434 8.63352 48.3243 8.27728 48.0309 7.81627C47.7585 7.37621 47.6118 6.85233 47.6118 6.32845C47.6118 5.80457 47.7375 5.30165 48.0309 4.86159C48.3243 4.42153 48.7434 4.06529 49.2463 3.85574C50.4408 3.37377 51.8028 3.37377 52.9973 3.85574C53.4793 4.06529 53.8984 4.42153 54.1917 4.86159C54.4641 5.30165 54.6108 5.82552 54.6108 6.32845C54.6108 6.85233 54.4641 7.37621 54.1917 7.81627C53.8984 8.27728 53.4793 8.63352 52.9973 8.86402C51.7819 9.36695 50.4408 9.36695 49.2463 8.86402ZM52.0124 7.22952C52.2429 6.99901 52.3686 6.66373 52.3477 6.3494C52.3686 6.01412 52.2429 5.69979 52.0124 5.46929C51.7609 5.23878 51.4257 5.134 51.0904 5.134C50.7551 5.11305 50.4198 5.23878 50.1683 5.46929C49.9378 5.69979 49.8121 6.01412 49.8331 6.3494C49.8121 6.68469 49.9378 6.99901 50.1683 7.22952C50.4198 7.46003 50.7551 7.58576 51.0904 7.5648C51.4466 7.58576 51.7819 7.46003 52.0124 7.22952Z"}),E=s("path",{d:"M60.1012 3.79287V5.78361C59.8288 5.61597 59.5145 5.53215 59.2002 5.55311C58.7182 5.55311 58.341 5.69979 58.0686 5.99316C57.8171 6.28654 57.6704 6.74755 57.6704 7.3762V9.05262H55.4282V3.6881H57.6285V5.38546C57.7543 4.75681 57.9429 4.2958 58.2153 4.00242C58.4877 3.70905 58.8649 3.54141 59.263 3.56237C59.5564 3.56237 59.8498 3.64619 60.1012 3.79287Z"}),g=s("path",{d:"M67.5613 2.45178V9.05266H65.3191V7.85821C65.1514 8.27732 64.8371 8.65451 64.4599 8.88502C64.0199 9.13648 63.5379 9.26221 63.035 9.24126C62.5739 9.26221 62.1129 9.11552 61.7148 8.86406C61.3376 8.6126 61.0233 8.25636 60.8347 7.83726C60.6251 7.37625 60.5203 6.87332 60.5203 6.3704C60.4994 5.84652 60.6251 5.32264 60.8347 4.86163C61.0442 4.42157 61.3795 4.06533 61.7776 3.81387C62.1968 3.56241 62.6787 3.43667 63.1607 3.43667C64.2294 3.43667 64.9419 3.89769 65.3191 4.81972V2.45178H67.5613ZM64.9838 7.18765C65.2143 6.95714 65.34 6.64282 65.3191 6.32849C65.3191 6.01416 65.1933 5.69983 64.9838 5.49028C64.4599 5.05022 63.7055 5.05022 63.1607 5.49028C62.9302 5.72079 62.8045 6.01416 62.8254 6.32849C62.8045 6.64282 62.9302 6.95714 63.1607 7.18765C63.4121 7.41816 63.7265 7.52293 64.0618 7.52293C64.418 7.54389 64.7323 7.41816 64.9838 7.18765Z"}),S=s("path",{d:"M15.0895 1.04776C13.9999 0.565789 12.8473 0.209552 11.6529 0C11.4853 0.293372 11.3386 0.586745 11.2128 0.901072C9.95553 0.712476 8.65631 0.712476 7.399 0.901072C7.27327 0.586745 7.12659 0.293372 6.95894 0C5.78546 0.209552 4.63292 0.565789 3.5223 1.06871C1.36391 4.27485 0.77717 7.39717 1.07054 10.4985C2.34881 11.4415 3.77376 12.154 5.28253 12.615C5.61781 12.154 5.93214 11.672 6.1836 11.1691C5.70163 10.9805 5.21967 10.75 4.75865 10.4985C4.88438 10.4147 4.98916 10.3309 5.11489 10.2471C7.7762 11.5044 10.8566 11.5044 13.5389 10.2471C13.6436 10.3309 13.7694 10.4357 13.8951 10.4985C13.4341 10.771 12.9731 11.0015 12.4702 11.1691C12.7216 11.672 13.0359 12.154 13.3712 12.615C14.88 12.154 16.3049 11.4415 17.5832 10.4985C17.9185 6.9152 16.9755 3.81384 15.0895 1.04776ZM6.53984 8.59162C5.72259 8.59162 5.03107 7.83723 5.03107 6.93616C5.03107 6.03509 5.68068 5.25975 6.51889 5.25975C7.35709 5.25975 8.02766 6.01413 8.02766 6.93616C8.02766 7.85819 7.37805 8.59162 6.53984 8.59162ZM12.072 8.59162C11.2548 8.59162 10.5842 7.83723 10.5842 6.93616C10.5842 6.03509 11.2338 5.25975 12.072 5.25975C12.9102 5.25975 13.5808 6.01413 13.5598 6.93616C13.5598 7.85819 12.9102 8.59162 12.072 8.59162Z"}),O=s("path",{d:"M32.7757 4.27485C33.389 4.27485 33.8863 3.82452 33.8863 3.269C33.8863 2.71349 33.389 2.26315 32.7757 2.26315C32.1623 2.26315 31.665 2.71349 31.665 3.269C31.665 3.82452 32.1623 4.27485 32.7757 4.27485Z"}),I=s("path",{d:"M31.665 4.9664C32.3775 5.25977 33.1948 5.25977 33.9072 4.9664V9.09457H31.665V4.9664Z"});function T(e){var t=e.width,n=void 0===t?106:t,r=e.height,a=void 0===r?43:r,l=e.color,T=void 0===l?"currentColor":l,C=e.foreground,b=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(b),{width:n,height:a,viewBox:"0 0 106 43"}),s("g",{fill:T,className:C,fillRule:"evenodd","aria-hidden":!0},void 0,d,f,c,p,v,y,m,_,h,E,g,S,O,I))}T.displayName="DiscordNitro"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,d:"M12 2C6.486 2 2 6.487 2 12C2 17.515 6.486 22 12 22C17.514 22 22 17.515 22 12C22 6.487 17.514 2 12 2ZM12 18.25C11.31 18.25 10.75 17.691 10.75 17C10.75 16.31 11.31 15.75 12 15.75C12.69 15.75 13.25 16.31 13.25 17C13.25 17.691 12.69 18.25 12 18.25ZM13 13.875V15H11V12H12C13.104 12 14 11.103 14 10C14 8.896 13.104 8 12 8C10.896 8 10 8.896 10 10H8C8 7.795 9.795 6 12 6C14.205 6 16 7.795 16 10C16 11.861 14.723 13.429 13 13.875Z"}))}d.displayName="HelpCircle"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(6037)),o=n(35),i=n(5854),l=n(1),u=s(n(6099));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.currentStep,n=e.purchaseState,r=e.premiumType,s=e.headerId,d=e.onClose;return f(o.ModalHeader,{className:u.default.modalHeader,separator:!1,id:s},void 0,f(a.default,{hideCloseOnFullScreen:!0,shouldShowPrice:!0,upgradeToPremiumType:r,renderAnimation:function(){return r===l.PremiumTypes.TIER_1?f(i.PremiumModalHeaderAnimationTier1,{className:u.default.headerAnimation,currentStep:t,purchaseState:n}):f(i.PremiumModalHeaderAnimationTier2,{className:u.default.headerAnimation,currentStep:t,purchaseState:n})},plan:null,isGift:!1,className:u.default.header,onClose:d}))}c.displayName="PremiumSubscriptionModalHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(9)),o=s(n(5962)),i=n(3),l=s(n(161)),u=s(n(6097));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).animationRef=null,t.currentScene=t.props.nextScene,t.isUnmounted=!1,t.handleLoopComplete=function(){var e=t.props,n=e.onSceneComplete,r=e.nextScene;null!=n&&n(t.currentScene),t.playScene(r)},t.handleComplete=function(){var e=t.props.onSceneComplete;null!=e&&e(t.currentScene)},t.handleSetRef=function(e){t.animationRef=e;var n=t.props.animationRef;null!=n&&n(e)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var l=i.prototype;return l.componentDidMount=function(){var e=this,t=this.props,n=t.importData,r=t.nextScene,a=t.pauseWhileUnfocused,i=t.isWindowFocused;n().then((function(t){null!=e.animationRef&&(e.animation=o.default.loadAnimation({container:e.animationRef,renderer:"svg",loop:!0,autoplay:!0,animationData:t}),e.animation.addEventListener("loopComplete",e.handleLoopComplete),e.animation.addEventListener("complete",e.handleComplete),e.playScene(r),a&&!i&&e.animation.pause())}))},l.componentWillUnmount=function(){this.isUnmounted=!0,null!=this.animation&&(this.animation.destroy(),this.animation=void 0)},l.componentDidUpdate=function(e){var t=this.props,n=t.nextScene,r=t.pauseWhileUnfocused,a=t.isWindowFocused;n!==this.currentScene&&this.shouldForcePlayAfter()&&this.playScene(n),null!=this.animation&&r&&(!e.isWindowFocused&&a?this.animation.play():e.isWindowFocused&&!a&&this.animation.pause())},l.shouldForcePlayAfter=function(){return!0===this.props.sceneSegments[this.currentScene].shouldForcePlayAfter},l.playScene=function(e){if(!this.isUnmounted){var t=this.props,n=t.onScenePlay,r=t.sceneSegments,a=r[e],o=r[this.currentScene];null==this.animation||e!==this.currentScene&&a.BEG===o.BEG&&a.END===o.END||this.animation.playSegments([a.BEG,a.END],!0),this.currentScene=e,null!=n&&n(this.currentScene)}},l.render=function(){return r.createElement("div",{ref:this.handleSetRef,className:(0,a.default)(this.props.className,u.default.wrapper)})},i}(r.PureComponent);p.displayName="SequencedLottieAnimation",p.defaultProps={pauseWhileUnfocused:!0};var v=function(e){var t=(0,i.useStateFromStores)([l.default],(function(){return l.default.isFocused()}));return r.createElement(p,f({},e,{isWindowFocused:t}))};v.displayName="SequencedLottieAnimationConnected";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateAdditionalPlansWithPremiumGuildAdjustment=function(e,t){var n=a.default.getHardcoded(e.planId),r=a.default.getHardcodedForSkuAndInterval(i.PremiumSubscriptionSKUs.GUILD,n.interval),l=null!=e.renewalMutations?e.renewalMutations.additionalPlans:e.additionalPlans,u=(0,o.getNumPremiumGuildSubscriptions)(l)+t,s=l.filter((function(e){return e.planId!==r.id}));if(u<0)throw new Error("Invalid adjustment");if(0===u)return s;return[].concat(s,[{planId:r.id,quantity:u}])};var r,a=(r=n(257))&&r.__esModule?r:{default:r},o=n(96),i=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(6120));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.icon,n=e.iconClassName,r=e.description;return u("div",{className:o.default.perkRow},void 0,u("div",{className:o.default.perkIconContainer},void 0,u(t,{className:(0,a.default)(o.default.perkIcon,n)})),u("div",{className:o.default.perkDescription},void 0,r))}s.displayName="PremiumUpsellPerkRow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumGuildSubscriptionPlanSelect=V,t.PremiumGuildSubscriptionInvoicePreview=z,t.PremiumGuildSubscriptionReview=$,t.PremiumGuildSubscriptionConfirmation=Z;var r,a=B(n(0)),o=G(n(9)),i=G(n(23)),l=n(3),u=G(n(5674)),s=G(n(485)),d=G(n(5857)),f=G(n(160)),c=G(n(12)),p=G(n(693)),v=G(n(257)),y=G(n(29)),m=n(1149),_=G(n(6005)),h=n(5703),E=G(n(151)),g=B(n(149)),S=G(n(284)),O=n(131),I=G(n(5830)),T=G(n(5827)),C=B(n(96)),b=n(281),M=n(280),N=n(1169),A=n(5689),P=n(1237),R=G(n(5705)),L=G(n(5678)),D=n(5676),w=G(n(6049)),j=n(1),k=G(n(6)),U=G(n(6124));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function V(e){var t=e.premiumSubscriptionPlan,n=e.numGuildSubscriptions,r=e.setNumGuildSubscriptions,u=e.premiumSubscription,s=e.onClickPremiumSubscriptionLink,d=e.existingAvailableSlots,f=void 0===d?[]:d,p=t.interval,y=(0,l.useStateFromStores)([v.default],(function(){return v.default.getForSkuAndInterval(j.PremiumSubscriptionSKUs.GUILD,p)})),h=(0,l.useStateFromStores)([c.default],(function(){return c.default.getCurrentUser()}));(0,i.default)(null!=y,"Missing premiumGuildSubscriptionPlan");var E=(0,A.usePremiumTrialOffer)(),S=C.default.isPremium(h)?y.getPriceForPremiumUser():y.price,O=(0,b.formatPrice)(S,y.currency),N=n*S,P=C.default.isPremium(h)&&null!=u?k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_FOOTER_DISCOUNT.format({planName:C.default.getDisplayPremiumType(u.planId)}):(null!=E?k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_FOOTER_UPSELL_TRIAL:k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_FOOTER_UPSELL).format({onPremiumSubscriptionClick:s,discountPercentage:M.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT,freeSubscriptionCount:M.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}),L=f.filter((function(e){return e.canceled})).length;return x("div",{className:U.default.planSelectStep},void 0,x("div",{className:(0,o.default)(U.default.planSelectText,U.default.bodyText)},void 0,k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_STEP_SELECT_DESCRIPTION),f.length>0?x("div",{className:U.default.existingSlotNotice},void 0,x(I.default,{className:U.default.existingSlotIcon,color:j.Colors.PREMIUM_GUILD_PINK}),x("div",{},void 0,k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_UNUSED_SLOT_NOTICE.format({slotCount:f.length}),L>0&&null!=u?x(g.default,{text:k.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_CANCEL_WARNING.format({canceledCount:L,date:u.currentPeriodEnd})},void 0,(function(e){return a.createElement(T.default,H({},e,{className:U.default.existingSlotTooltipWarningIcon,color:j.Colors.STATUS_YELLOW}))})):null)):null,x("div",{className:U.default.planSelectRow},void 0,x("div",{className:U.default.planSelectorWrapper},void 0,x(_.default,{value:n,onChange:function(e){return r(e)},className:U.default.planSelector,minValue:1,maxValue:30}),x("div",{className:U.default.planSelectorLabel},void 0,k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_COUNTER)),x("div",{className:U.default.planSelectorPreviewPrice},void 0,p===j.SubscriptionIntervalTypes.MONTH?k.default.Messages.BILLING_PRICE_PER_MONTH_EACH.format({price:O}):p===j.SubscriptionIntervalTypes.YEAR?k.default.Messages.BILLING_PRICE_PER_YEAR_EACH.format({price:O}):null)),x("div",{className:U.default.planSelectDivider}),x("div",{className:U.default.planSelectRow},void 0,x("div",{className:U.default.planSelectorSubtotal},void 0,k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_SUBTOTAL),x("div",{className:U.default.planSelectorSubtotalPrice},void 0,x(R.default,{price:N,currency:y.currency,intervalType:p}))),x(w.default,{text:P,color:m.GradientCssUrls.PREMIUM_TIER_2}))}function W(e){var t=v.default.get(e);switch((0,i.default)(null!=t,"Missing subscriptionPlan"),t.interval){case j.SubscriptionIntervalTypes.MONTH:return k.default.Messages.PREMIUM_GUILD_PLAN_MONTH;case j.SubscriptionIntervalTypes.YEAR:return k.default.Messages.PREMIUM_GUILD_PLAN_YEAR}throw new Error("Unexpected subscriptionPlan: "+e)}V.displayName="PremiumGuildSubscriptionPlanSelect";var Y=x(P.PremiumInvoiceTableDivider,{});function z(e){var t=e.premiumSubscription,n=e.premiumSubscriptionPlan,r=e.proratedInvoicePreview,o=e.renewalInvoicePreview,u=n.interval,s=(0,l.useStateFromStores)([v.default],(function(){return v.default.getForSkuAndInterval(j.PremiumSubscriptionSKUs.GUILD,u)}));(0,i.default)(null!=s,"Missing premiumGuildSubscriptionPlan");var d=function(e){return(0,N.coalesceInvoiceItems)(r.invoiceItems).find((function(t){return(t.subscriptionPlanId===j.SubscriptionPlans.PREMIUM_MONTH_GUILD||t.subscriptionPlanId===j.SubscriptionPlans.PREMIUM_YEAR_GUILD)&&e(t)}))},f=d((function(e){return e.amount>=0}));(0,i.default)(null!=f,"Missing guild subscription invoice item");var c=d((function(e){return e.amount<0})),p=null!=c?f.quantity-c.quantity:f.quantity,y=r.invoiceItems.filter((function(e){return(0,C.isPremiumBaseSubscriptionPlan)(e.subscriptionPlanId)})),m=y.reduce((function(e,t){return e+t.amount}),0),_=(0,N.getItemUnitPriceWithDiscount)(f)*p,h=(0,b.formatRate)((0,b.formatPrice)(_,r.currency),u),E=(0,b.formatPrice)(r.total,r.currency),g=r.total-_-m,S=f.discounts.map((function(e){return H({},e,{amount:e.amount/f.quantity*p})}));return a.createElement(a.Fragment,null,x(D.SubscriptionPeriodResetNotice,{proratedInvoice:r,renewalInvoice:o}),x(P.PremiumInvoiceTable,{},void 0,x(P.PremiumInvoiceTableHeader,{},void 0,k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_PURCHASE_DETAILS_HEADER),x(P.PremiumInvoiceDiscountedTableRow,{label:k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_INVOICE_ROW_CONTENT.format({numGuildSubscriptions:p,planName:W(s.id)}),value:h,discounts:S,originalAmount:f.subscriptionPlanPrice*p,currency:s.currency,interval:s.interval}),0!==m?x(P.PremiumInvoiceTableRow,{label:x(D.PremiumInvoiceLabelWithAdjustment,{label:k.default.Messages.PREMIUM_SUBSCRIPTION_PLAN_ADJUSTMENT.format({planName:(0,C.getTierDisplayName)(y[0].subscriptionPlanId)}),tooltipText:k.default.Messages.PREMIUM_SUBSCRIPTION_ADJUSTMENT_TOOLTIP}),value:(0,b.formatPrice)(m,r.currency)}):null,0!==g?x(P.PremiumInvoiceTableRow,{label:x(D.PremiumInvoiceLabelWithAdjustment,{label:k.default.Messages.PREMIUM_SUBSCRIPTION_GUILD_SUBSCRIPTION_ADJUSTMENT,tooltipText:k.default.Messages.PREMIUM_SUBSCRIPTION_ADJUSTMENT_TOOLTIP}),value:(0,b.formatPrice)(g,r.currency)}):null,Y,x(P.PremiumInvoiceTableTotalRow,{label:(r.taxInclusive?k.default.Messages.BILLING_INVOICE_TODAY_TOTAL_TAX_INCLUSIVE:k.default.Messages.BILLING_INVOICE_TODAY_TOTAL).format(),value:E}),x(D.SubscriptionInvoiceFooter,null!=t?{premiumSubscription:t,proratedInvoice:r,renewalInvoice:o,isUpdate:!0}:{renewalInvoice:o})))}var K=x("div",{},void 0,x(E.default,{}));function $(e){var t,n=e.paymentSources,r=e.paymentSourceId,o=e.currentPremiumSubscription,i=e.premiumSubscriptionPaymentSourceId,d=e.premiumSubscriptionPlan,c=e.newAdditionalPlans,v=e.onPaymentSourceChange,y=e.onPaymentSourceAdd,m=e.onPurchaseTermsChange,_=e.legalTermsNodeRef,h=e.hasLegalTermsFlash,E=(0,l.useStateFromStores)([p.default],(function(){return null!=i?p.default.getPaymentSource(i):null})),S=(0,l.useStateFromStores)([f.default],(function(){return f.default.hidePersonalInformation}));t=null!=o?(0,C.getItemsWithUpsertedPremiumGuildPlan)(o,c[0].quantity,c[0].planId):c;var I=(0,N.useSubscriptionInvoicePreview)({subscriptionId:null==o?void 0:o.id,items:t,renewal:!1,applyEntitlements:!0})[0],T=(0,N.useSubscriptionInvoicePreview)({subscriptionId:null==o?void 0:o.id,items:t,renewal:!0})[0];return x("div",{className:U.default.reviewStep},void 0,null!=I&&null!=T?x(z,{premiumSubscription:o,premiumSubscriptionPlan:d,proratedInvoicePreview:I,renewalInvoicePreview:T}):null,x("div",{className:U.default.paymentSourceWrapper},void 0,x(O.FormTitle,{tag:O.FormTitleTags.H5},void 0,k.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_TITLE),null!=i?null!=E?x(g.TooltipContainer,{text:k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_PAYMENT_SOURCE_TOOLTIP},void 0,x(u.default,{paymentSources:[E],selectedPaymentSourceId:E.id,hidePersonalInformation:S,disabled:!0})):K:x(u.default,{paymentSources:Object.values(n),selectedPaymentSourceId:r,onChange:v,onPaymentSourceAdd:y,hidePersonalInformation:S})),a.createElement(L.default,{isActive:h,ref:_},x(s.default,{onChange:m,forceShow:!0,finePrint:C.default.getLegalString(d.interval)})))}function Z(e){var t,n=e.onClose,r=e.guild,o=e.guildSubscriptionQuantity,i=e.isTransfer,l=void 0!==i&&i,u=e.withAnimation,s=void 0===u||u,f=a.useContext(S.default),c=a.useState(h.PremiumPaymentGuildAnimation.Scenes.ENTRY),p=c[0],v=c[1],m=a.useState(!1),_=m[0],E=m[1];return t=l?null==r?k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_TRANSFERRED_DESCRIPTION_GENERIC_GUILD.format():k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_TRANSFERRED_DESCRIPTION.format({guildName:r.name}):null==r?k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_ACTIVATED_DESCRIPTION_GENERIC_GUILD.format({guildSubscriptionQuantity:o}):k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_ACTIVATED_DESCRIPTION.format({guildName:r.name,guildSubscriptionQuantity:o}),x("div",{className:U.default.confirmationContainer},void 0,s?x(h.PremiumPaymentGuildAnimation,{className:U.default.confirmationAnimation,nextScene:p,onScenePlay:function(e){if(!_)switch(e){case h.PremiumPaymentGuildAnimation.Scenes.ENTRY:return v(h.PremiumPaymentGuildAnimation.Scenes.IDLE);case h.PremiumPaymentGuildAnimation.Scenes.IDLE:return v(h.PremiumPaymentGuildAnimation.Scenes.SUCCESS);case h.PremiumPaymentGuildAnimation.Scenes.SUCCESS:return E(!0),v(h.PremiumPaymentGuildAnimation.Scenes.IDLE)}},pauseWhileUnfocused:!1}):null,x(d.default,{className:U.default.confirmationUpgradedBanner,theme:f,premiumType:j.PremiumTypes.TIER_2,type:d.default.Types.PREMIUM_GUILD_SUBSCRIPTION_ACTIVATED}),x("div",{className:U.default.confirmationText},void 0,t),x(y.default,{onClick:n},void 0,k.default.Messages.GUILD_SUBSCRIPTION_PURCHASE_MODAL_ACTIVATED_CLOSE_BUTTON))}$.displayName="PremiumGuildSubscriptionReview",Z.displayName="PremiumGuildSubscriptionConfirmation"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(88)),l=c(n(61)),u=c(n(153)),s=c(n(5951)),d=c(n(6010)),f=c(n(6122));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){return""===e||"-"===e}var m=function(e){var t,n,r=e.value,c=e.onChange,p=e.className,m=e.minValue,_=e.maxValue,h=a.useState(r),E=h[0],g=h[1],S=function(e){c(y(e)?0:e),g(e)};return v(i.default,{within:!0},void 0,v("div",{className:(0,o.default)(f.default.actions,p)},void 0,v(l.default,{onClick:function(){y(E)||null!=m&&E<=m||S(E-1)},tabIndex:-1,className:(0,o.default)(f.default.iconWrapper,f.default.subtract)},void 0,v(d.default,{className:(0,o.default)(f.default.icon,(t={},t[f.default.disabled]=y(E)||null!=m&&E<=m,t))})),v(u.default,{value:""+E,onChange:function(e){if(y(e))return S(e);var t=parseInt(e);return isNaN(t)?void 0:S(null!=_&&t>=_?_:null!=m&&t<=m?m:t)},inputClassName:f.default.value}),v(l.default,{onClick:function(){y(E)||null!=_&&E>=_||S(E+1)},tabIndex:-1,className:(0,o.default)(f.default.iconWrapper,f.default.add)},void 0,v(s.default,{className:(0,o.default)(f.default.icon,(n={},n[f.default.disabled]=y(E)||null!=_&&E>=_,n))}))))};m.displayName="NumberInputStepper";var _=m;t.default=_},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=w(n(0)),l=n(377),u=L(n(3)),s=L(n(2)),d=w(n(287)),f=w(n(5692)),c=w(n(5837)),p=L(n(5673)),v=L(n(5833)),y=L(n(5693)),m=L(n(5690)),_=L(n(29)),h=L(n(55)),E=L(n(1164)),g=n(131),S=n(35),O=L(n(16)),I=n(295),T=L(n(5846)),C=L(n(5853)),b=L(n(5842)),M=L(n(5843)),N=n(5844),A=n(1),P=L(n(6)),R=L(n(6108));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function j(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){j(o,r,a,i,l,"next",e)}function l(e){j(o,r,a,i,l,"throw",e)}i(void 0)}))}}function U(){return(U=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}).apply(this,arguments)}function G(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.PAYMENT_TYPE="payment_type",e.CARD_INFO="card_info",e.ADDRESS="billing_address",e.PAYMENT_REQUEST_INFO="payment_request_info",e.PAYPAL="paypal"}(o||(o={}));var H=((r={})[o.PAYMENT_TYPE]=P.default.Messages.PAYMENT_SOURCE_TYPE,r[o.PAYMENT_REQUEST_INFO]=P.default.Messages.BILLING_STEP_PAYMENT_INFO,r[o.CARD_INFO]=P.default.Messages.PAYMENT_SOURCE_INFORMATION,r[o.ADDRESS]=P.default.Messages.BILLING_ADDRESS,r[o.PAYPAL]=P.default.Messages.PAYMENT_SOURCE_PAYPAL_DETAILS,r),x=[o.PAYMENT_TYPE,o.CARD_INFO,o.ADDRESS],V=[o.PAYMENT_TYPE,o.PAYPAL,o.ADDRESS],W=[o.PAYMENT_TYPE,o.PAYMENT_REQUEST_INFO];function Y(e){return e.hasCardError()?o.CARD_INFO:e.hasAddressError()?o.ADDRESS:null}var z=G(M.default,{}),K=function(e){var t,n;function r(){for(var t,n,r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return(n=e.call.apply(e,[this].concat(a))||this).state={type:A.PaymentSourceTypes.CARD,step:o.PAYMENT_TYPE,steps:x,errorStep:null,stripeToken:null,tokenSubmitting:!1},n.STEPS_DATA=((t={})[o.PAYMENT_TYPE]={renderBody:function(){return G(b.default,{allowStripeRequestPayments:!O.default.embedded,onChooseType:n.handleChooseType,onStripePaymentMethodReceived:n.handleStripePaymentMethod})}},t[o.PAYMENT_REQUEST_INFO]={renderBody:function(){var e=n.props,t=e.stripePaymentMethod,r=e.submitting;return G(N.PaymentRequestStepBody,{stripePaymentMethod:t,submitting:r})},renderNextButton:function(){var e=n.props.submitting;return G(_.default,{submitting:e,look:_.default.Looks.OUTLINED,disabled:!0})}},t[o.CARD_INFO]={renderBody:function(){var e=n.props.error,t=null!=e&&(null==e.code||Y(e)===o.CARD_INFO);return i.createElement(i.Fragment,null,t?G(E.default,{className:R.default.errorBlock},void 0,P.default.Messages.BILLING_ERROR_SECTION_CARD):null,G(C.default,{onCardInfoChange:n.handleCardInfoChange,error:t?e:null}))},renderNextButton:function(){var e=n.props.isCreditCardInfoValid,t=n.state.tokenSubmitting;return G(l.ElementsConsumer,{},void 0,(function(r){var a=r.stripe,o=r.elements;return G(_.default,{disabled:!e,onClick:function(){n.createToken(a,o)},type:"submit",submitting:t},void 0,P.default.Messages.NEXT)}))}},t[o.ADDRESS]={renderBody:function(){var e=n.props,t=e.billingAddressInfo,r=e.error,a=null!=r&&(null==r.code||Y(r)===o.ADDRESS);return G(i.Fragment,{},void 0,a?G(E.default,{className:R.default.errorBlock},void 0,P.default.Messages.BILLING_ERROR_SECTION_ADDRESS):null,i.createElement(T.default,U({},t,{onBillingAddressChange:n.handleBillingAddressChange,error:a?r:null})))},renderNextButton:function(){var e=n.props,t=e.submitting,r=e.isBillingAddressInfoValid;return G(l.ElementsConsumer,{},void 0,(function(e){var a=e.stripe;return G(_.default,{type:"submit",submitting:t,disabled:!r,onClick:n.state.type===A.PaymentSourceTypes.PAYPAL?n.handlePaypalSave:function(){n.handleCardSave(a)}},void 0,P.default.Messages.SAVE)}))}},t[o.PAYPAL]={renderBody:function(){return z},renderNextButton:function(){var e=n.props,t=e.submitting,r=e.braintreeNonce,a=null!=e.braintreeEmail&&null!=r;return G(_.default,{submitting:t,color:a?_.default.Colors.BRAND:_.default.Colors.PRIMARY,onClick:a?n.handleNextClick:n.handleReopenPaypal},void 0,a?P.default.Messages.NEXT:P.default.Messages.PAYMENT_SOURCE_PAYPAL_REOPEN)}},t),n.handleChooseType=function(e){var t=n.getSteps(e),r=n.getNextStep(t);null!=r&&n.setState({type:e,steps:t,step:r})},n.handleCardInfoChange=function(e,t){s.default.wait((function(){return c.updateCardInfo(e,t)}))},n.handleBillingAddressChange=function(e,t){s.default.wait((function(){return c.updateAddressInfo(e,t)}))},n.handleBackClick=function(){var e=n.getPreviousStep();null!=e&&(e===o.PAYMENT_TYPE&&c.clearError(),n.setState({step:e}))},n.handleNextClick=function(){var e=n.getNextStep();null!=e&&n.setState({step:e})},n.handleClose=function(){n.props.onClose()},n.handleStripePaymentMethod=function(e){c.updateStripePaymentRequest(e),null!=e?n.handleStripePaymentRequestSave(e):n.handleBackClick()},n.handleStripePaymentRequestSave=function(){var e=k(regeneratorRuntime.mark((function e(t){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.createPaymentRequestPaymentSource(t);case 3:r=e.sent,(a=n.props.onAddPaymentSource)&&a(r),n.handleClose(),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),n.createToken=function(){var e=k(regeneratorRuntime.mark((function e(t,r){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.setState({tokenSubmitting:!0}),e.prev=1,e.next=4,d.createCardToken(t,r);case 4:a=e.sent,n.setState({stripeToken:a}),n.handleNextClick(),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:return e.prev=11,n.setState({tokenSubmitting:!1}),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,9,11,14]])})));return function(t,n){return e.apply(this,arguments)}}(),n.handleCardSave=function(){var e=k(regeneratorRuntime.mark((function e(t){var r,a,o,i,l,u,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.props,a=r.billingAddressInfo,o=r.isCreditCardInfoValid,i=r.isBillingAddressInfoValid,l=r.onAddPaymentSource,u=n.state.stripeToken,o&&i){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,d.createCardPaymentSource({stripe:t,token:u,billingAddress:a,type:A.PaymentSourceTypes.CARD});case 7:s=e.sent,l&&l(s),n.handleClose(),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(4);case 14:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t){return e.apply(this,arguments)}}(),n.handlePaypalSave=k(regeneratorRuntime.mark((function e(){var t,r,a,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.props,r=t.braintreeEmail,a=t.braintreeNonce,o=t.billingAddressInfo,i=t.onAddPaymentSource,null==r||null==a){e.next=12;break}return e.prev=2,e.next=5,d.createPaypalPaymentSource(a,o);case 5:l=e.sent,i&&i(l),n.handleClose(),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(2);case 12:case"end":return e.stop()}}),e,null,[[2,10]])}))),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,B(t,n),r.getDerivedStateFromProps=function(e,t){var n=e.error,r=t.errorStep;if(null==n)return null==r?null:{errorStep:null};var a=Y(n);return null!=a&&a!==t.errorStep?{step:a,errorStep:a}:null};var a,u,v,y=r.prototype;return y.componentDidMount=function(){f.createClient()},y.componentWillUnmount=function(){s.default.wait((function(){return f.teardown()})),c.clearCardInfo()},y.getSteps=function(e){switch(null!=e?e:this.state.type){case A.PaymentSourceTypes.PAYMENT_REQUEST:return W;case A.PaymentSourceTypes.PAYPAL:return V;default:return x}},y.getNextStep=function(e){void 0===e&&(e=this.state.steps);var t=this.state.step,n=e.indexOf(t);return e[n+1]},y.getPreviousStep=function(e){void 0===e&&(e=this.state.steps);var t=this.state.step,n=e.indexOf(t);return e[n-1]},y.preventDefault=function(e){e.preventDefault()},y.handleReopenPaypal=function(){f.reopenPayPalWindow()},y.renderGenericError=function(){var e=this.props.error;return null==e||null!=Y(e)?null:G(E.default,{className:R.default.errorBlock},void 0,e.message)},y.renderFooter=function(){var e=this.stepData;return null==e.renderNextButton?null:G(S.ModalFooter,{},void 0,G(h.default,{justify:h.default.Justify.BETWEEN},void 0,G(_.default,{onClick:this.handleBackClick,color:_.default.Colors.PRIMARY,look:_.default.Looks.LINK,size:_.default.Sizes.MIN},void 0,P.default.Messages.BACK),e.renderNextButton()))},y.render=function(){var e=this.state,t=e.step,n=e.steps,r=this.props.transitionState,a=n.map((function(e){return{id:e,label:H[e]}}));return G(l.Elements,{options:A.StripeElementsOptions,stripe:(0,I.ensureStripeV3IsLoaded)()},void 0,G(S.ModalRoot,{transitionState:r,size:S.ModalSize.SMALL,className:R.default.modal,"aria-label":P.default.Messages.PAYMENT_SOURCES_ADD},void 0,G("form",{className:R.default.form,onSubmit:this.preventDefault},void 0,G(S.ModalHeader,{direction:h.default.Direction.VERTICAL,align:h.default.Align.STRETCH,separator:!1},void 0,G(h.default,{className:R.default.modalTitle,justify:h.default.Justify.BETWEEN,align:h.default.Align.CENTER},void 0,G(g.FormTitle,{tag:g.FormTitleTags.H4},void 0,P.default.Messages.PAYMENT_SOURCES_ADD),G(S.ModalCloseButton,{hideOnFullscreen:!0,onClick:this.handleClose})),this.renderGenericError(),G(m.default,{breadcrumbs:a,activeId:t})),G("div",{className:R.default.divider}),G(p.default,{fillParent:!0,className:R.default.sequencer,step:t,steps:n},void 0,G(S.ModalContent,{className:R.default.content},void 0,this.stepData.renderBody())),this.renderFooter())))},a=r,(u=[{key:"stepData",get:function(){var e=this.state.step,t=this.STEPS_DATA[e];if(null==t)throw new Error("Invalid step "+e);return t}}])&&F(a.prototype,u),v&&F(a,v),r}(i.PureComponent);K.displayName="AddPaymentModal";var $=u.default.connectStores([y.default,v.default],(function(){return{braintreeEmail:y.default.braintreeEmail,braintreeNonce:y.default.braintreeNonce,stripePaymentMethod:y.default.stripePaymentMethod,creditCardInfo:y.default.getCreditCardInfo(),isCreditCardInfoValid:y.default.isCardInfoValid,billingAddressInfo:y.default.getBillingAddressInfo(),isBillingAddressInfoValid:y.default.isBillingAddressInfoValid,error:y.default.error,submitting:v.default.isBusy}}))(K);t.default=$},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.useStateFromStores)([i.default],(function(){return i.default.keyboardModeEnabled})),l=r.useCallback((function(e){var n=document.querySelector(e),r=t.current;null!=n&&null!=r&&(n.focus(),r.scrollIntoViewNode({node:n,padding:80}))}),[t]),u=r.useCallback((function(){return new Promise((function(e){var n=t.current;if(null==n)return e();n.scrollTo({to:0,callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[t]),s=r.useCallback((function(){return new Promise((function(e){var n=t.current;if(null==n)return e();n.scrollTo({to:Number.MAX_SAFE_INTEGER,callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[t]);return(0,a.default)({id:e,isEnabled:n,setFocus:l,scrollToStart:u,scrollToEnd:s})};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(680)),o=n(3),i=l(n(105));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(55)),o=n(5703),i=n(35),l=n(5855),u=s(n(6119));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.purchaseState,n=e.currentStep,r=e.headerId,s=e.onClose,d=(0,l.usePaymentModalAnimationScene)({purchaseState:t,currentStep:n,initialScene:o.PremiumPaymentGuildAnimation.Scenes.ENTRY,purchaseScene:o.PremiumPaymentGuildAnimation.Scenes.STARS,errorScene:o.PremiumPaymentGuildAnimation.Scenes.ERROR,successScene:o.PremiumPaymentGuildAnimation.Scenes.SUCCESS}),c=d[0],p=d[1];return f(i.ModalHeader,{align:a.default.Align.START,className:u.default.header,separator:!1,id:r},void 0,f(o.PremiumPaymentGuildAnimation,{className:u.default.animation,nextScene:c,onScenePlay:function(e){return p(o.PremiumPaymentGuildAnimation.getNextScene(e))},pauseWhileUnfocused:!1}),f("div",{className:u.default.headerTitle}),f(i.ModalCloseButton,{onClick:s,className:u.default.closeButton}))}c.displayName="PremiumGuildModalHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{fill:d,className:f,d:"M2.66663 7.40747H7.40737H8.59255H8.66663H13.3333V8.59266H8.59255H7.40737H2.66663V7.40747Z"}))}d.displayName="Subtract"},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(29)),o=c(n(5981)),i=c(n(55)),l=n(475),u=c(n(24)),s=c(n(6)),d=c(n(6063)),f=c(n(370));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.title,n=e.subtitle,r=e.error,c=e.onSubmit,p=e.onCancel;return v(i.default,{direction:i.default.Direction.VERTICAL},void 0,v(l.Title,{className:f.default.marginBottom8},void 0,t),v(l.SubTitle,{className:d.default.subTitle},void 0,n),v("div",{},void 0,v(o.default,{inputClassName:d.default.codeInput,onSubmit:c}),null!=r?v(u.default,{className:d.default.error},void 0,r):null),v(a.default,{className:d.default.button,onClick:p,color:a.default.Colors.GREY},void 0,s.default.Messages.CANCEL))}y.displayName="PhoneVerify"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVerifiedName=function(e){return(0,a.default)(e).author};var r,a=(r=n(5698))&&r.__esModule?r:{default:r}},function(e,t,n){e.exports=n.p+"28503047fd0aeac02132b070329c1cb6.svg"},function(e,t,n){e.exports=n.p+"2d4cf96ac3c76b3fa6ea1ed9158554a0.svg"},function(e,t,n){e.exports=n.p+"23b15016c8e14a060dbde9727df2118c.svg"},function(e,t,n){e.exports=n.p+"d2e95b8ea969c1309e4eaae8b4bb3b08.svg"},function(e,t,n){e.exports=n.p+"6ae7c596d76e62967f9a6dc366446bb6.svg"},function(e,t,n){e.exports=n.p+"ff404dbe09573e704d939ed9b35a707d.svg"},function(e,t,n){e.exports=n.p+"cd369224be18c55496ce08756ebb46ec.svg"},function(e,t,n){e.exports=n.p+"b8612c12ba14a4b5c6573a5a38e03227.svg"},function(e,t,n){e.exports=n.p+"97fa979988ee11e532c68bf490d8a507.svg"},function(e,t,n){e.exports=n.p+"30944c93875eeed11629e90c52c12192.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(122),l=n(3),u=y(n(5699)),s=y(n(105)),d=y(n(61)),f=y(n(278)),c=y(n(5834)),p=y(n(5990)),v=y(n(6069));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.show,n=e.alpha2,r=e.countryCode,y=(0,l.useStateFromStores)([s.default],(function(){return s.default.useReducedMotion})),m=a.useRef(null),E=a.useState(0),g=E[0],S=E[1],O=a.useState(!1),I=O[0],T=O[1];a.useEffect((function(){function e(){var e,n;S(t&&null!==(e=null===(n=m.current)||void 0===n?void 0:n.getBoundingClientRect().width)&&void 0!==e?e:0)}return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[t,n,r]);var C=(0,i.useSpring)({width:g+"px",immediate:y,onStart:function(){T(!0)},onRest:function(){T(!1)}});return h(f.default,{position:f.default.Positions.TOP,renderPopout:function(e){return h(p.default,{className:v.default.popout,onClick:function(t){return function(e,t){c.default.setCountryCode(u.default[e]),t()}(t,e.closePopout)}})}},void 0,(function(e){var l;return h("div",{className:(0,o.default)(v.default.outerContainer,(l={},l[v.default.hidden]=!(t||I),l))},void 0,h(i.animated.div,{className:v.default.container,style:C},void 0,a.createElement("div",{className:v.default.innerContainer,ref:m},a.createElement(d.default,_({},e,{className:v.default.countryCode}),n," ",r),h("div",{className:v.default.separator}))))}))}E.displayName="CountrySelector"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(282)),l=f(n(5942)),u=f(n(1194)),s=f(n(1165)),d=f(n(6067));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(){return m(s.default,{className:d.default.divider})};_.displayName="PopoutListDivider";var h=function(e){var t=e.children;return m("div",{className:d.default.popoutListEmpty},void 0,t)};h.displayName="PopoutListEmpty";var E=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className"]);return a.createElement(l.default,p({},n,{className:(0,o.default)(d.default.popoutListInput,t)}))},t}(a.PureComponent);E.displayName="PopoutListSearchBar",E.defaultProps={autoFocus:!0};var g=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children;return m(i.default,{className:(0,o.default)(d.default.popoutList,t),"aria-label":this.props["aria-label"]},void 0,n)},t}(a.PureComponent);g.displayName="PopoutList",g.SearchBar=E,g.Item=u.default,g.Divider=_,g.Empty=h;var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=function(e){var t=i.useState(0),n=t[0],r=t[1],o=i.useState(!1),u=o[0],s=o[1],d=i.useState({step:a.INITIALIZING}),c=d[0],p=d[1],v=(0,f.default)(),y=i.useMemo((function(){return new l.default(1500,3e4)}),[]),m=i.useRef();m.current=i.useCallback((function(){p({step:a.INITIALIZING}),v?r((function(e){return e+1})):(P.info("document is not visible, will defer reconnection when document becomes visible."),s(!0))}),[p,r,v,s]);var _=i.useCallback((function(){!function(e){var t=e.current;if(void 0===t)throw new Error("tried to unwrap an undefined value.");return t}(m)()}),[m]);return i.useEffect((function(){v&&u&&c.step===a.INITIALIZING&&(P.info("reconnecting, now that document is visible"),s(!1),r((function(e){return e+1})))}),[c,v,u,s]),i.useEffect((function(){var t=Date.now(),n="wss:"+window.GLOBAL_ENV.REMOTE_AUTH_ENDPOINT+"/?v=1",r=new WebSocket(n);P.info("[0ms] connecting to "+n);var o=function(e){return P.info("["+(Date.now()-t)+"ms] "+e)},i=null,l=null,u=null,s=null,d=!0;function f(){if(null!=i)return i;throw new Error("No key pair set")}var c=function(){p({step:a.INITIALIZING}),y.pending||y.fail(_)},v=function(){d?(d=!1,r.send(JSON.stringify({op:"heartbeat"}))):(o("heartbeat timeout, reconnecting."),r.close(),c())};r.onmessage=function(){var t=N(regeneratorRuntime.mark((function t(n){var i,l,c,m,S,O,I,T,C,b;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=n.data,l=JSON.parse(i),t.t0=l.op,t.next="nonce_proof"===t.t0?5:"pending_remote_init"===t.t0?12:"pending_finish"===t.t0?22:"finish"===t.t0?30:"cancel"===t.t0?39:"hello"===t.t0?42:"heartbeat_ack"===t.t0?46:47;break;case 5:return c=l.encrypted_nonce,t.next=8,(0,E.computeNonceProof)(f(),c);case 8:return m=t.sent,o("computed nonce proof"),r.send(JSON.stringify({op:"nonce_proof",proof:m})),t.abrupt("return");case 12:return y.succeed(),h.ComponentDispatch.dispatch(g.ComponentActions.WAVE_EMPHASIZE),t.next=16,(0,E.publicKeyFingerprint)(f());case 16:if((S=t.sent)===l.fingerprint){t.next=19;break}throw new Error("bad fingerprint "+S+" !== "+l.fingerprint);case 19:return o("handshake complete awaiting remote auth."),p({step:a.PENDING_REMOTE_INIT,fingerprint:S}),t.abrupt("return");case 22:return h.ComponentDispatch.dispatch(g.ComponentActions.WAVE_EMPHASIZE),o("remote auth handshake started, awaiting finish/cancel."),O=l.encrypted_user_payload,t.next=27,(0,E.decodeEncodedUserRecord)(f(),O);case 27:return I=t.sent,p({step:a.PENDING_FINISH,user:I}),t.abrupt("return");case 30:return h.ComponentDispatch.dispatch(g.ComponentActions.WAVE_EMPHASIZE),o("remote auth handshake finished."),T=l.encrypted_token,p({step:a.FINISH}),t.next=36,(0,E.decryptEncodedCiphertext)(f(),T);case 36:return C=t.sent,e(C),t.abrupt("return");case 39:return o("remote auth handshake cancelled."),_(),t.abrupt("return");case 42:return o("got hello, auth timeout="+l.timeout_ms+"ms"),b=l.heartbeat_interval,s=setTimeout((function(){s=null,v(),u=setInterval(v,b)}),Math.floor(b*Math.random())),t.abrupt("return");case 46:d=!0;case 47:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r.onopen=N(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.generateRsaKeyPair)();case 2:return i=e.sent,e.next=5,(0,E.serializePublicKey)(i);case 5:return l=e.sent,e.next=8,(0,E.publicKeyFingerprint)(i);case 8:t=e.sent,o("connected, handshaking with fingerprint: "+t),r.send(JSON.stringify({op:"init",encoded_public_key:l}));case 11:case"end":return e.stop()}}),e)}))),r.onclose=function(e){o("disconnected, code: "+e.code+" "+e.reason),c()},r.onerror=function(e){o("disconnected, error: "+e),c()};return function(){o("cleaning up"),r.onopen=function(){return null},r.onmessage=function(){return null},r.onclose=function(){return null},r.onerror=function(){return null},r.close(1e3),y.cancel(),null!=s&&clearTimeout(s),null!=u&&clearInterval(u)}}),[_,e,y,n]),{state:c,cancel:_}}(e.authTokenCallback),n=t.state,r=t.cancel,u=function(e){switch(e){case a.INITIALIZING:case a.PENDING_REMOTE_INIT:return o.QR_CODE;case a.PENDING_FINISH:case a.FINISH:return o.CONFIRM}}(n.step);return i.createElement(i.Fragment,null,b("div",{className:O.default.verticalSeparator}),b(p.default,{fillParent:!0,className:O.default.qrLogin,step:u,steps:[o.QR_CODE,o.CONFIRM]},void 0,b("div",{className:O.default.qrLoginInner},void 0,b(L,{state:n,cancel:r}))))};var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=T(n(138)),u=n(92),s=T(n(1190)),d=T(n(5957)),f=T(n(6041)),c=T(n(26)),p=T(n(5673)),v=T(n(29)),y=T(n(151)),m=n(475),_=T(n(279)),h=n(121),E=n(6042),g=n(1),S=T(n(6)),O=T(n(6104)),I=T(n(370));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function N(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){M(o,r,a,i,l,"next",e)}function l(e){M(o,r,a,i,l,"throw",e)}i(void 0)}))}}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.PENDING_REMOTE_INIT=1]="PENDING_REMOTE_INIT",e[e.PENDING_FINISH=2]="PENDING_FINISH",e[e.FINISH=3]="FINISH"}(a||(a={})),function(e){e[e.QR_CODE=0]="QR_CODE",e[e.CONFIRM=1]="CONFIRM"}(o||(o={}));var A=n(1197),P=new c.default("LoginQRSocket");function R(e){var t=e.text,n=void 0===t?"":t,r=A,a=i.useState(!1),o=a[0],l=a[1];return i.useEffect((function(){var e=new Image;e.src=r,e.onload=function(){return l(!0)},e.onerror=function(){return l(!0)}}),[r]),b("div",{className:O.default.qrCodeContainer},void 0,""!==n&&o?i.createElement(i.Fragment,null,b(s.default,{className:O.default.qrCode,width:160,height:160,text:n}),b("div",{className:O.default.qrCodeOverlay},void 0,b("img",{src:r,alt:""}))):b("div",{className:O.default.qrCodeOverlay},void 0,b(y.default,{className:O.default.qrCode,type:y.default.Type.WANDERING_CUBES})))}function L(e){var t=e.state,n=e.cancel;switch(t.step){case a.INITIALIZING:case a.PENDING_REMOTE_INIT:return i.createElement(i.Fragment,null,b(R,{text:t.step===a.PENDING_REMOTE_INIT?"https://discord.com/ra/"+t.fingerprint:""}),b(m.Title,{className:I.default.marginBottom8},void 0,S.default.Messages.LOGIN_WITH_QR),b(m.SubTitle,{},void 0,S.default.Messages.LOGIN_WITH_QR_DESCRIPTION.format()));case a.PENDING_FINISH:var r=t.user;return i.createElement(i.Fragment,null,b(d.default,{className:O.default.qrAvatar,user:r,size:_.default.Sizes.SIZE_120,isMobile:!0,status:u.StatusTypes.ONLINE}),b(m.Title,{className:I.default.marginBottom8},void 0,S.default.Messages.CONFIRM_QR_CHECK_YOUR_PHONE),b(m.SubTitle,{},void 0,S.default.Messages.LOGIN_AS.format({username:r.username+"#"+r.discriminator})),b(v.default,{look:v.default.Looks.BLANK,color:v.default.Colors.LINK,size:v.default.Sizes.MIN,onClick:n,className:O.default.startOverButton},void 0,S.default.Messages.QR_CODE_LOGIN_START_OVER));case a.FINISH:return b(y.default,{type:y.default.Type.WANDERING_CUBES})}}R.displayName="QrCodeWithOverlay"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=d(n(473)),o=n(280),i=d(n(5953)),l=n(1),u=d(n(6)),s=d(n(6040));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return function(){a.default.open(l.UserSettingsSections.PREMIUM),null==t||t(),e()}}function v(e){var t=e.onClose,n=e.onCloseChangeIdentity,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClose","onCloseChangeIdentity"]);return r.createElement(i.default,c({artURL:s.default,onClose:t,type:o.PremiumUpsellTypes.GUILD_MEMBER_AVATAR_MODAL,title:u.default.Messages.GUILD_MEMBER_AVATAR_UPSELL_TITLE,body:u.default.Messages.GUILD_MEMBER_AVATAR_UPSELL_BODY.format({onAndMore:p(t,n)}),premiumType:l.PremiumTypes.TIER_2},a))}v.displayName="GuildMemberAvatarUpsell"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(1184)),i=n(41),l=s(n(5993)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).cancel=function(){var e=t.props.onClose;e&&e()},t.claimAccount=function(){var e=t.props.onClose;e&&e(),(0,i.openModal)((function(e){return a.createElement(o.default,e)}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e=this.props.transitionState;return f(l.default,{transitionState:e,"aria-label":u.default.Messages.PREMIUM_NOT_CLAIMED},void 0,f(l.default.Header,{},void 0,u.default.Messages.PREMIUM_NOT_CLAIMED),f(l.default.Content,{type:l.default.Types.UNCLAIMED},void 0,u.default.Messages.PREMIUM_NOT_CLAIMED_BODY),f(l.default.Footer,{secondary:{onClick:this.cancel,label:u.default.Messages.NEVERMIND},primary:{onClick:this.claimAccount,label:u.default.Messages.CLAIM_ACCOUNT}}))},r}(a.Component);p.displayName="UnclaimedAccountModal";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNonePlanIdForIntervalType=i,t.getNonePlanIdForSubscription=function(e){return i(a.default.getHardcoded(e.items[0].planId).interval)},t.getBaseSubscriptionItemForSubscriptionItems=l,t.getBasePlanIdForSubscriptionItems=function(e,t){var n=l(e);if(null==n){if(e.length>0){var r=a.default.getHardcoded(e[0].planId);t=r.interval}return i(t)}return n.planId};var r,a=(r=n(257))&&r.__esModule?r:{default:r},o=n(1);function i(e){switch(e){case o.SubscriptionIntervalTypes.YEAR:return o.SubscriptionPlans.NONE_YEAR;case o.SubscriptionIntervalTypes.MONTH:default:return o.SubscriptionPlans.NONE_MONTH}}function l(e){return e.find((function(e){var t=a.default.getHardcoded(e.planId);return null!=t&&null!=t.premiumSubscriptionType}))}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(26)),i=p(n(29)),l=p(n(55)),u=p(n(700)),s=p(n(16)),d=n(295),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){m(o,r,a,i,l,"next",e)}function l(e){m(o,r,a,i,l,"throw",e)}i(void 0)}))}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=new o.default("PaymentRequest"),g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={},t.initPaymentRequest=function(){var e=_(regeneratorRuntime.mark((function e(n){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.paymentRequest({country:"US",currency:"usd",total:{label:t.props.paymentLabel,amount:0,pending:!0},requestPayerName:!0}),a=t.props.onStripePaymentMethodReceived,r.on("paymentmethod",(function(e){var t=e.complete,n=e.paymentMethod;a(n),t("success")})),r.on("cancel",(function(){a(null)})),e.next=6,r.canMakePayment();case 6:o=e.sent,E.info("PaymentRequest availablity check",o),t.setState({canMakePayment:Boolean(o),paymentRequest:r});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.handleOnClick=function(){(0,t.props.onChooseType)(f.PaymentSourceTypes.PAYMENT_REQUEST);var e=t.state.paymentRequest;null!=e&&e.show()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this;(0,d.ensureStripeV3IsLoaded)().then((function(t){e.initPaymentRequest(t)}))},a.render=function(){var e=this.state.canMakePayment;if(null==e)return y(i.default,{submitting:!0,look:i.default.Looks.FILLED});if(!1===e)return y(i.default,{disabled:!0,look:i.default.Looks.FILLED},void 0,c.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_UNSUPPORTED);var t=s.default.isAndroidChrome(),n=t?c.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_BUTTON_GPAY:c.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_BUTTON_GENERIC,r=t?u.default.Types.G_PAY:u.default.Types.PAYMENT_REQUEST,a=this.props,o=a.className,d=a.iconClassName;return y(i.default,{onClick:this.handleOnClick,className:o},f.PaymentSourceTypes.PAYMENT_REQUEST,y(l.default,{align:l.default.Align.CENTER},void 0,y(u.default,{className:d,type:r}),n))},r}(a.Component);g.displayName="StripePaymentRequest";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwaitingAuthenticationStepBody=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(681)),o=l(n(159)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.className;return s(a.default,{className:t},void 0,s(o.default,{},void 0,i.default.Messages.PAYMENT_WAITING_FOR_AUTHENTICATION))};t.AwaitingAuthenticationStepBody=d,d.displayName="AwaitingAuthenticationStepBody"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=n(377),u=v(n(9)),s=v(n(700)),d=n(153),f=v(n(6)),c=v(n(6091)),p=v(n(1244));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=i.useRef(null),n=e.stripeType,r=e.flipped,v=e.updateCompleted,y=e.onFocus,_=e.onBlur,h=i.useState("unknown"),E=h[0],g=h[1],S=i.useState(!1),O=S[0],I=S[1],T=i.useState(!1),C=T[0],b=T[1],M=i.useState(null),N=M[0],A=M[1],P=i.useState({}),R=P[0],L=P[1],D=(0,l.useElements)(),w=i.useCallback((function(){if(D)switch(n){case a.CardNumber:var e=D.getElement(l.CardNumberElement);if(!e)return;e.off(o.Change),e.off(o.Focus),e.off(o.Blur);break;case a.CardExpiry:var t=D.getElement(l.CardExpiryElement);if(!t)return;t.off(o.Change),t.off(o.Focus),t.off(o.Blur);break;case a.CardCvc:var r=D.getElement(l.CardCvcElement);if(!r)return;r.off(o.Change),r.off(o.Focus),r.off(o.Blur)}}),[D,n]),j=i.useCallback((function(e){C||e.empty||b(!0),v&&v(e.complete),e.error&&I(!1)}),[C,v]),k=i.useCallback((function(){I(!0),y&&y()}),[y]),U=i.useCallback((function(){I(!1),_&&_()}),[_]),G=i.useCallback((function(){if(D)switch(n){case a.CardNumber:var e=D.getElement(l.CardNumberElement);if(!e)return;e.on(o.Change,(function(e){E!==e.brand&&g(e.brand),e.empty&&C?A(f.default.Messages.CREDIT_CARD_ERROR_REQUIRED):e.error?A(f.default.Messages.CREDIT_CARD_ERROR_NUMBER):A(null),j(e)})),e.on(o.Focus,k),e.on(o.Blur,U);break;case a.CardExpiry:var t=D.getElement(l.CardExpiryElement);if(!t)return;t.on(o.Change,(function(e){e.error||e.empty&&C?A(f.default.Messages.CREDIT_CARD_ERROR_EXPIRATION):A(null),j(e)})),t.on(o.Focus,k),t.on(o.Blur,U);break;case a.CardCvc:var r=D.getElement(l.CardCvcElement);if(!r)return;r.on(o.Change,(function(e){e.error||e.empty&&C?A(f.default.Messages.CREDIT_CARD_ERROR_SECURITY_CODE):A(null),j(e)})),r.on(o.Focus,k),r.on(o.Blur,U)}}),[U,j,k,E,D,C,n]);function F(){var e;return(0,u.default)(c.default.cardInput,((e={})[c.default.cardInputError]=null!==N,e[c.default.cardInputFocused]=O,e[c.default.cardNumberInput]="cardNumber"===n,e))}return i.useEffect((function(){return G(),function(){w()}}),[G,w]),i.useLayoutEffect((function(){var e=t.current;if(e){var n=window.getComputedStyle(e),r=n.getPropertyValue("font-family"),a=n.getPropertyValue("font-weight"),o=n.getPropertyValue("color"),i=n.getPropertyValue("font-size");L({base:{fontFamily:r,fontWeight:a,color:o,fontSize:i}})}}),[t]),m("div",{className:(0,u.default)(c.default.cardNumberWrapper)},void 0,i.createElement("div",{ref:t,className:(0,u.default)(c.default.hiddenDiv,p.default.input)}),function(){switch(n){case a.CardNumber:return i.createElement(i.Fragment,null,m(s.default,{className:c.default.cardIcon,type:E,flipped:r}),m(l.CardNumberElement,{options:{style:R,placeholder:f.default.Messages.CREDIT_CARD_NUMBER_INPUT_PLACEHOLDER},className:F()}));case a.CardExpiry:return m(l.CardExpiryElement,{options:{style:R,placeholder:f.default.Messages.CREDIT_CARD_EXPIRATION_DATE_INPUT_PLACEHOLDER},className:F()});case a.CardCvc:return m(l.CardCvcElement,{options:{style:R,placeholder:f.default.Messages.CREDIT_CARD_CVC_INPUT_PLACEHOLDER},className:F()})}}(),m(d.Error,{error:N}))}!function(e){e.CardNumber="cardNumber",e.CardExpiry="cardExpiry",e.CardCvc="cardCvc"}(a||(a={})),function(e){e.Change="change",e.Focus="focus",e.Blur="blur"}(o||(o={})),_.displayName="StripeInput";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=m(n(9)),o=m(n(257)),i=m(n(61)),l=m(n(5998)),u=m(n(1151)),s=m(n(5706)),d=n(272),f=n(280),c=m(n(5705)),p=n(1),v=m(n(6)),y=m(n(6094));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.onClick,n=o.default.getHardcodedForSkuAndInterval(p.PremiumSubscriptionSKUs.TIER_2,p.SubscriptionIntervalTypes.MONTH),r=o.default.getHardcodedForSkuAndInterval(p.PremiumSubscriptionSKUs.TIER_2,p.SubscriptionIntervalTypes.YEAR);return h(i.default,{onClick:t,className:(0,a.default)(y.default.button,y.default.tier2),focusProps:{offset:8}},void 0,h("div",{className:y.default.tier2Image}),h("div",{className:y.default.description},void 0,h(l.default,{className:(0,a.default)(y.default.tierTitle)}),h("div",{className:y.default.text},void 0,v.default.Messages.BILLING_SWITCH_PLAN_TIER_2_DESCRIPTION.format({numFreeGuildSubscriptions:f.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}))),h("div",{className:y.default.priceWrapper},void 0,h(c.default,{price:n.price,currency:n.currency,intervalType:n.interval,className:y.default.price}),h(c.default,{price:r.price,currency:r.currency,intervalType:r.interval,className:y.default.price})))}E.displayName="PremiumTier2Button";var g=h("div",{},void 0,h(u.default,{}));function S(e){var t=e.onClick,n=o.default.getHardcodedForSkuAndInterval(p.PremiumSubscriptionSKUs.TIER_1,p.SubscriptionIntervalTypes.MONTH),r=o.default.getHardcodedForSkuAndInterval(p.PremiumSubscriptionSKUs.TIER_1,p.SubscriptionIntervalTypes.YEAR);return h(i.default,{onClick:t,className:(0,a.default)(y.default.button,y.default.tier1),focusProps:{offset:4}},void 0,h("div",{className:y.default.tier1Image}),h("div",{className:y.default.description},void 0,g,h(s.default,{className:(0,a.default)(y.default.tierTitle)}),h("div",{className:y.default.text},void 0,v.default.Messages.BILLING_SWITCH_PLAN_TIER_1_DESCRIPTION)),h("div",{className:y.default.priceWrapper},void 0,h(c.default,{price:n.price,currency:n.currency,intervalType:n.interval,className:y.default.price}),h(c.default,{price:r.price,currency:r.currency,intervalType:r.interval,className:y.default.price})))}function O(e){var t=e.onSelectSku;return h(d.ScrollerThin,{className:y.default.skuButtons},void 0,h(E,{onClick:function(){return t(p.PremiumSubscriptionSKUs.TIER_2)}}),h(S,{onClick:function(){return t(p.PremiumSubscriptionSKUs.TIER_1)}}))}S.displayName="PremiumTier1Button",O.displayName="PremiumSelectPlanOptions";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=v(n(9)),o=v(n(55)),i=v(n(5845)),l=v(n(5706)),u=n(35),s=v(n(96)),d=n(281),f=n(1),c=v(n(6)),p=v(n(6096));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t,n,r=e.hideCloseOnFullScreen,v=e.shouldShowPrice,y=e.plan,_=e.renderAnimation,h=e.onClose,E=e.isGift,g=e.upgradeToPremiumType,S=e.className,O=g===f.PremiumTypes.TIER_1,I=O?l.default:i.default;return m("div",{className:(0,a.default)((t={},t[p.default.tier1HeaderBackground]=g===f.PremiumTypes.TIER_1,t[p.default.tier2HeaderBackground]=g!==f.PremiumTypes.TIER_1,t),S)},void 0,_(),m(o.default,{align:o.default.Align.START,justify:o.default.Justify.BETWEEN,className:p.default.headerTop},void 0,m(I,{className:(0,a.default)(p.default.headerIcon,(n={},n[p.default.tier1]=O,n))}),m(u.ModalCloseButton,{hideOnFullscreen:r,onClick:h,className:p.default.closeButton})),v&&null!=y?m("div",{className:p.default.price},void 0,function(e,t){var n=s.default.getPrice(e),r=s.default.getInterval(e),a=(0,d.formatPrice)(n.amount,n.currency);if(t)return a;switch(r){case f.SubscriptionIntervalTypes.MONTH:return c.default.Messages.BILLING_PRICE_PER_MONTH.format({price:a});case f.SubscriptionIntervalTypes.YEAR:return c.default.Messages.BILLING_PRICE_PER_YEAR.format({price:a})}}(y,E)):null)}_.displayName="PremiumPaymentHeader";var h=_;t.default=h},,function(e,t,n){e.exports=n.p+"34114e043c66bd7887676e126bc959c0.png"},function(e,t,n){e.exports=n.p+"31929b1f4d81646cd9bff2c185119619.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,r.useState)(a()),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(a())}return window.addEventListener("visibilitychange",e),function(){window.removeEventListener("visibilitychange",e)}}),[n]),t};var r=n(0);function a(){return"undefined"==typeof document||"visible"===document.visibilityState}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRsaKeyPair=function(){return window.crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["decrypt"])},t.serializePublicKey=function(e){return l.apply(this,arguments)},t.publicKeyFingerprint=function(e){return u.apply(this,arguments)},t.sha256Digest=s,t.decryptEncodedCiphertext=p,t.computeNonceProof=function(e,t){return y.apply(this,arguments)},t.decodeEncodedUserRecord=function(e,t){return m.apply(this,arguments)};var r,a=(r=n(89))&&r.__esModule?r:{default:r};function o(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function l(e){o(i,r,a,l,u,"next",e)}function u(e){o(i,r,a,l,u,"throw",e)}l(void 0)}))}}function l(){return(l=i(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.crypto.subtle.exportKey("spki",t.publicKey);case 2:return n=e.sent,e.abrupt("return",btoa(String.fromCharCode.apply(String,new Uint8Array(n))));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(){return(u=i(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.crypto.subtle.exportKey("spki",t.publicKey);case 2:return n=e.sent,e.abrupt("return",s(n));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){return d.apply(this,arguments)}function d(){return(d=i(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.crypto.subtle.digest("SHA-256",t);case 2:return n=e.sent,e.abrupt("return",btoa(String.fromCharCode.apply(String,new Uint8Array(n))).replace(/\//g,"_").replace(/\+/g,"-").replace(/={1,2}$/,""));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function c(e,t){return window.crypto.subtle.decrypt({name:"RSA-OAEP"},e.privateKey,t)}function p(e,t){return v.apply(this,arguments)}function v(){return(v=i(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new TextDecoder,e.next=3,c(t,f(n));case 3:return a=e.sent,e.abrupt("return",r.decode(a));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(){return(y=i(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,f(n));case 2:return r=e.sent,e.abrupt("return",s(r));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=i(regeneratorRuntime.mark((function e(t,n){var r,o,i,l,u,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(t,n);case 2:if(n=e.sent,r=/^(\d+):(\d{4}):([a-zA-Z0-9_]+):(.*)$/,null!=(o=n.match(r))){e.next=7;break}throw new Error("Invalid encoded user record.");case 7:return i=o[1],l=o[2],u=o[3],s=o[4],e.abrupt("return",new a.default({id:i,discriminator:l,avatar:"0"===u?null:u,username:s}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchActivityStatistics=function(){return d.apply(this,arguments)};var r=l(n(14)),a=l(n(2)),o=l(n(470)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}function d(){return(d=s(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null!=(t=o.default.lastFetched)&&Date.now()-t<216e5)){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,r.default.get({url:i.Endpoints.USER_ACTIVITY_STATISTICS,oldFormErrors:!0});case 6:n=e.sent,a.default.dispatch({type:i.ActionTypes.USER_ACTIVITY_STATISTICS_FETCH_SUCCESS,statistics:n.body}),e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",e.t0);case 13:case"end":return e.stop()}}),e,null,[[3,10]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({width:n,height:a},(0,i.default)(f),{viewBox:"0 0 20 20"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 .663v4.739A2.594 2.594 0 0014.6 8h4.74a.656.656 0 00.466-1.12L13.121.196A.654.654 0 0012 .663zm2.576 9.365A4.608 4.608 0 019.97 5.422V.058H1.994A2 2 0 000 2.052v15.952a2 2 0 001.994 1.994h15.952a2 2 0 001.994-1.994v-7.976h-5.364zM8 15.553a2 2 0 113.999 0h1.333a3.333 3.333 0 10-6.666 0h1.334zM2.716 13.5L2 12.784 2.784 12l.716.716.716-.716.784.784-.716.716.716.716-.784.784-.716-.716-.716.716L2 14.216l.716-.716zM15 12.784l.716.716-.716.716.784.784.716-.716.716.716.784-.784-.716-.716.716-.716-.784-.784-.716.716-.716-.716-.784.784z",fill:d}))}d.displayName="StickerError"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=n(383),l=v(n(55)),u=v(n(700)),s=v(n(47)),d=n(6118),f=n(139),c=v(n(6)),p=v(n(6133));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a,v,y,E=r.prototype;return E.renderDescription=function(){var e=this.props,t=e.paymentSource,n=e.descriptionClassName;return m(s.default,{className:(0,o.default)(p.default.description,n)},void 0,t instanceof i.CreditCardSourceRecord?c.default.Messages.PAYMENT_SOURCE_CARD_ENDING.format({brand:(0,f.upperCaseFirstChar)(t.brand),last_4:t.last4}):c.default.Messages.PAYMENT_SOURCE_PAYPAL)},E.renderSubText=function(){var e=this.props,t=e.paymentSource,n=e.locale,r="";return t instanceof i.CreditCardSourceRecord?r=c.default.Messages.PAYMENT_SOURCE_CARD_EXPIRES.format({month:(0,d.getLocalizedDisplayMonth)(t.expiresMonth,n),year:t.expiresYear}):t instanceof i.PaypalSourceRecord&&(r=t.email),r},E.render=function(){var e=this.props,t=e.isDefault,n=e.paymentSource,r=e.showSubtext,a=e.isForSubscription;return m(l.default,{},void 0,m(u.default,{type:this.typeString}),m(l.default,{direction:l.default.Direction.VERTICAL,className:p.default.descriptionWrapper},void 0,m(l.default,{align:l.default.Align.CENTER},void 0,this.renderDescription(),t?m("div",{className:p.default.defaultIndicator},void 0,c.default.Messages.DEFAULT):null,a?m("div",{className:p.default.premiumIndicator},void 0,c.default.Messages.PAYMENT_SOURCE_SUBSCRIPTION):null,n.invalid?m("div",{className:p.default.invalidIndicator},void 0,c.default.Messages.PAYMENT_SOURCE_INVALID):null),r?m("div",{className:p.default.subText},void 0,this.renderSubText()):null))},a=r,(v=[{key:"typeString",get:function(){var e=this.props.paymentSource;return e instanceof i.PaypalSourceRecord?u.default.Types.PAYPAL:e instanceof i.CreditCardSourceRecord?u.default.getType(e.brand):u.default.Types.UNKNOWN}}])&&_(a.prototype,v),y&&_(a,y),r}(a.PureComponent);t.default=E,E.displayName="PaymentDescription",E.defaultProps={isForSubscription:!1,isDefault:!1,showSubtext:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.redeemGiftCode=f,t.default=void 0;var r=l(n(14)),a=l(n(2)),o=n(275),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}var d=Object.freeze({});function f(e,t){return c.apply(this,arguments)}function c(){return(c=s(regeneratorRuntime.mark((function e(t,n){var l,u,s,f,c,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n=d),u=(l=n).channelId,s=void 0===u?null:u,f=l.paymentSourceId,c=void 0===f?null:f,a.default.dispatch({type:i.ActionTypes.GIFT_CODE_REDEEM,code:t}),e.prev=3,e.next=6,r.default.post({url:i.Endpoints.GIFT_CODE_REDEEM(t),body:{channel_id:s,payment_source_id:c},oldFormErrors:!0});case 6:return p=e.sent,a.default.dispatch({type:i.ActionTypes.GIFT_CODE_REDEEM_SUCCESS,code:t}),e.abrupt("return",{code:t,entitlement:p});case 11:throw e.prev=11,e.t0=e.catch(3),v=new o.BillingError(e.t0),a.default.dispatch({type:i.ActionTypes.GIFT_CODE_REDEEM_FAILURE,code:t,error:v}),v;case 16:case"end":return e.stop()}}),e,null,[[3,11]])})))).apply(this,arguments)}var p={redeemGiftCode:f};t.default=p},function(e,t,n){"use strict";var r;function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).id=t.id,n.guildId=t.guildId,n.userId=t.userId,n.user=t.user,n.ended=t.ended,n.endsAt=null!=t.endsAt?t.endsAt:null,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n),r.createFromServer=function(e){return new r({id:e.id,guildId:e.guild_id,userId:null!=e.user?e.user.id:e.user_id,user:e.user,ended:e.ended,endsAt:e.ends_at?new Date(e.ends_at):null})},r}(((r=n(62))&&r.__esModule?r:{default:r}).default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.premiumSubscriptionPlan,n=e.premiumSubscriptionPaymentSourceId,r=e.onClose,o=e.onBack,i=e.onSkip,d=e.analyticsLocation,f=a.useContext(s.default)===O.ThemeTypes.LIGHT?l.default.Colors.PRIMARY:l.default.Colors.WHITE,c=null==t||null==t.premiumSubscriptionType,p=y.default.getPrice(O.SubscriptionPlans.PREMIUM_MONTH_TIER_2),_=(0,m.formatPrice)(p.amount,p.currency),S=(0,h.usePremiumTrialOffer)(),C=null==S?void 0:S.trial_id;return a.createElement(a.Fragment,null,N(v.ModalContent,{className:T.default.content},void 0,N(v.ModalCloseButton,{onClick:r,className:T.default.closeButton}),N("div",{className:T.default.upsellImage}),N("div",{className:T.default.bodyText},void 0,null!=C?I.default.Messages.PREMIUM_UPSELL_FEATURE_PRETEXT_TRIAL:I.default.Messages.PREMIUM_UPSELL_FEATURE_PRETEXT.format({monthlyPrice:_})),N(A,{shouldUpsellFromNoneTier:c})),N(v.ModalFooter,{align:u.default.Align.CENTER,justify:u.default.Justify.END},void 0,N("div",{className:T.default.footerRight},void 0,N(l.default,{look:l.default.Looks.LINK,color:f,onClick:i},void 0,I.default.Messages.PREMIUM_UPSELL_CONTINUE_TO_BOOSTS),N(l.default,{color:l.default.Colors.GREEN,type:"submit",onClick:function(){r();var e=t.interval===O.SubscriptionIntervalTypes.YEAR?O.SubscriptionPlans.PREMIUM_YEAR_TIER_2:O.SubscriptionPlans.PREMIUM_MONTH_TIER_2;null!=n?(0,E.openPremiumSelectPlanModal)({initialPlanId:e,analyticsLocation:M({},d,{section:O.AnalyticsSections.PREMIUM_GUILD_PURCHASE_MODAL})}):(0,g.openPremiumSubscriptionNewPlanModal)({planId:e,analyticsLocation:M({},d,{section:O.AnalyticsSections.PREMIUM_GUILD_PURCHASE_MODAL}),trialId:C})}},void 0,null!=C?I.default.Messages.PREMIUM_TRIAL_CTA_BUTTON:I.default.Messages.PREMIUM_UPSELL_UPGRADE)),N("div",{className:T.default.backStep},void 0,N(l.default,{color:f,look:l.default.Looks.LINK,size:l.default.Sizes.NONE,onClick:function(){return o()}},void 0,I.default.Messages.BACK))))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=C(n(39)),l=C(n(29)),u=C(n(55)),s=C(n(284)),d=C(n(5954)),f=C(n(5830)),c=C(n(5955)),p=C(n(5980)),v=n(35),y=C(n(96)),m=n(281),_=n(280),h=n(5689),E=n(5688),g=n(5697),S=C(n(6003)),O=n(1),I=C(n(6)),T=C(n(6121));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e){var t=e.shouldUpsellFromNoneTier,n=(0,o.useStateFromStores)([i.default],(function(){return i.default.locale}));return N("div",{className:T.default.perksList},void 0,N(S.default,{icon:f.default,iconClassName:T.default.perkIconGuild,description:I.default.Messages.PREMIUM_UPSELL_FEATURE_FREE_GUILD_SUBSCRIPTION.format({numFreeGuildSubscriptions:_.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM})}),N(S.default,{icon:f.default,iconClassName:T.default.perkIconGuild,description:I.default.Messages.PREMIUM_UPSELL_FEATURE_GUILD_SUBSCRIPTION_DISCOUNT.format({percent:(0,m.formatPercent)(n,_.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100)})}),t?N(S.default,{icon:d.default,iconClassName:T.default.perkIconChatPerks,description:I.default.Messages.PREMIUM_UPSELL_FEATURE_CHAT_PERKS}):null,N(S.default,{icon:c.default,iconClassName:T.default.perkIconStream,description:I.default.Messages.PREMIUM_UPSELL_FEATURE_STREAM}),N(S.default,{icon:p.default,iconClassName:T.default.perkIconUpload,description:I.default.Messages.PREMIUM_UPSELL_FEATURE_UPLOAD}))}A.displayName="PremiumUpsellPerks"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(5686)),o=i(n(6123));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.text,n=e.color;return u("div",{className:o.default.upsellFooter},void 0,u(a.default,{className:o.default.upsellFooterIcon,color:n}),u("div",{},void 0,t))}s.displayName="PremiumUpsellFooter"},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageSize=R,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(394),i=n(192),l=b(n(3)),u=n(10160),s=n(287),d=b(n(1345)),f=b(n(8257)),c=b(n(8543)),p=b(n(8299)),v=n(10161),y=n(8535),m=b(n(403)),_=n(277),h=n(42),E=n(5687),g=b(n(10162)),S=b(n(10188)),O=n(8403),I=n(1),T=b(n(6)),C=b(n(7393));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=(0,_.makeLazy)({createPromise:function(){return Promise.all([n.e(0),n.e(68),n.e(12)]).then(n.t.bind(null,9260,7))},webpackId:9260});function R(e){return e<O.PAGE_WIDTH_THRESHOLD?O.PageSizes.SMALL:O.PageSizes.LARGE}l.default.initialize();var L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderStoreListing=function(e){var n=e.match.params,r=n.skuId,a=n.applicationId,i=n.slug,l=e.location,u=t.props.width,s=(0,o.parse)(l.search);return N(f.default,{page:I.AnalyticsPages.STORE_LISTING,root:!0},void 0,N(S.default,{skuId:r,applicationId:a,slug:i,location:l,storeListingId:s.store_listing_id,pageSize:R(u)}))},t.renderContent=function(){return N(i.Switch,{},void 0,N(i.Route,{path:I.Routes.APPLICATION_STORE,exact:!0,render:function(e){var t=e.location;return N(f.default,{page:I.AnalyticsPages.STORE_DIRECTORY_HOME,root:!0},void 0,N(g.default,{location:t}))}}),N(i.Route,{path:I.Routes.APPLICATION_STORE_LISTING_APPLICATION(":applicationId",":slug"),render:t.renderStoreListing}),N(i.Route,{path:I.Routes.APPLICATION_STORE_LISTING_APPLICATION(":applicationId"),render:t.renderStoreListing}),N(i.Route,{path:I.Routes.APPLICATION_STORE_LISTING_SKU(":skuId",":slug"),render:t.renderStoreListing}),N(i.Route,{path:I.Routes.APPLICATION_STORE_LISTING_SKU(":skuId"),render:t.renderStoreListing}),N(i.Redirect,{to:I.Routes.APP}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var a=r.prototype;return a.componentDidMount=function(){(0,u.updateLocation)(this.props.location),this.stopListeningToHistory=(0,h.getHistory)().listen((function(e){e.pathname.startsWith(I.Routes.APPLICATION_STORE)&&(0,u.updateLocation)(e)})),this.props.isAuthenticated&&(0,s.fetchPaymentSources)(),m.default.disable(),m.default.setLayout(v.APPLICATION_STORE_LAYOUT),m.default.enable(),(0,E.trackAppUIViewed)("application_store")},a.componentWillUnmount=function(){null!=this.stopListeningToHistory&&this.stopListeningToHistory(),m.default.disable(),m.default.setLayout(y.DEFAULT_LAYOUT),m.default.enable()},a.renderCustomErrorMessage=function(){return N("div",{},void 0,N("p",{},void 0,T.default.Messages.ERRORS_STORE_CRASH),N("p",{},void 0,T.default.Messages.ERRORS_ACTION_TO_TAKE))},a.render=function(){var e=this.props,t=e.isAuthenticated,n=e.location,r=t?N("div",{className:C.default.applicationStore},void 0,this.renderContent()):N(P,{className:C.default.applicationStore,location:n,render:this.renderContent});return N(d.default,{renderCustomMessage:this.renderCustomErrorMessage},void 0,r)},r}(a.PureComponent);L.displayName="ApplicationStore";var D=(0,i.withRouter)((0,c.default)((0,p.default)(L)));t.default=D},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=C(n(23)),l=n(680),u=n(92),s=n(3),d=C(n(2)),f=n(287),c=n(6043),p=C(n(6008)),v=C(n(6110)),y=C(n(1147)),m=C(n(467)),_=C(n(55)),h=C(n(6112)),E=C(n(468)),g=n(96),S=C(n(6113)),O=C(n(6)),I=C(n(6134)),T=C(n(5861));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e){var t=e.payments,n=e.locale,r=e.compactMode,i=e.numPages,u=a.useRef(null),s=a.useState(0),d=s[0],c=s[1],v=a.useState(null),y=v[0],m=v[1],_=t.slice(10*d,10*(d+1));a.useEffect((function(){var e;null===(e=u.current)||void 0===e||e.scrollTo({to:0})}),[d]);var g=a.useCallback((function(e){c(e);var n=t[t.length-1].id;e===i-1&&y!==n&&((0,f.fetchPayments)(10,n),m(n))}),[t,i,y]),O=(0,p.default)("billing-history",u);return P(l.ListNavigatorProvider,{navigator:O},void 0,P(l.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement(h.default,A({className:(0,o.default)(I.default.verticalFit,I.default.paginator),currentPageIndex:d,onChangePage:g,numPages:i,ref:t},l),a.createElement(E.default,{className:I.default.bottomDivider,ref:u},_.map((function(e,t){return P(S.default,{className:(0,o.default)(I.default.paymentRow,I.default.bottomDivider),payment:e,locale:n,compactMode:r},t)}))))})))}R.displayName="PaymentHistoryPage";var L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).scrollerRef=a.createRef(),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var l,s,p,v=r.prototype;return v.componentDidMount=function(){d.default.wait((function(){(0,c.fetchActivityStatistics)(),(0,f.fetchPayments)(20)}))},v.renderPremiumExternalSubscription=function(e){return(0,i.default)(null!=e.paymentGateway,"Expected payment gateway when rendering for external subscription"),P(m.default,{className:I.default.externalRow},void 0,P("div",{className:I.default.externalRowHeader},void 0,O.default.Messages.BILLING_EXTERNAL_HEADER.format({paymentGatewayName:u.PaymentGatewayToFriendlyName[e.paymentGateway]})),P("div",{className:I.default.externalRowBody},void 0,O.default.Messages.BILLING_EXTERNAL_DESCRIPTION.format({paymentGatewayName:u.PaymentGatewayToFriendlyName[e.paymentGateway],billingHistoryLink:(0,g.getExternalSubscriptionMethodUrl)(e.paymentGateway,"BILLING_HISTORY")})))},v.render=function(){var e=this.props,t=e.compactMode,n=e.payments,r=e.subscription,a=e.locale,i=null!=r&&r.isPurchasedExternally;return 0!==n.length||i?P("div",{className:I.default.verticalFit},void 0,null!=r&&i?this.renderPremiumExternalSubscription(r):null,n.length>0?P("div",{className:(0,o.default)(I.default.paymentPane,I.default.verticalFit)},void 0,t?null:P("div",{className:(0,o.default)(I.default.paymentRow,I.default.bottomDivider)},void 0,P(_.default,{className:I.default.paymentRowHeader},void 0,P("div",{className:T.default.date},void 0,O.default.Messages.BILLING_PAYMENT_TABLE_HEADER_DATE),P("div",{className:I.default.paymentRowHeaderDescription},void 0,O.default.Messages.BILLING_PAYMENT_TABLE_HEADER_DESCRIPTION),P("div",{className:T.default.amount},void 0,O.default.Messages.BILLING_PAYMENT_TABLE_HEADER_AMOUNT))),P(R,{compactMode:t,locale:a,payments:n,numPages:this.numPages})):null):null},l=r,(s=[{key:"numPages",get:function(){return Math.max(Math.ceil(this.props.payments.length/10),1)}}])&&M(l.prototype,s),p&&M(l,p),r}(a.PureComponent);function D(e){var t=(0,s.useStateFromStores)([v.default],(function(){return v.default.getPayments()})),n=(0,s.useStateFromStores)([y.default],(function(){return y.default.getPremiumTypeSubscription()}));return a.createElement(L,A({},e,{payments:t,subscription:n}))}L.displayName="PaymentHistory",L.defaultProps={compactMode:!1},D.displayName="ConnectedPaymentHistory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(6111));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=[];function f(e){var t=e.payment,n=o.default.createFromServer(t),r=d.findIndex((function(e){return e.id===t.id}));-1===r?(d.push(n),d.sort((function(e,t){return t.createdAt.getTime()-e.createdAt.getTime()}))):d[r]=n,d=[].concat(d)}var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getPayment=function(e){return d.find((function(t){return t.id===e}))},a.getPayments=function(){return d},r}(r.default.Store))(a.default,{BILLING_PAYMENTS_FETCH_SUCCESS:function(e){for(var t,n=function(){var e=t.value;null==d.find((function(t){return t.id===e.id}))&&d.push(o.default.createFromServer(e))},r=u(e.payments);!(t=r()).done;)n();d.sort((function(e,t){return t.createdAt.getTime()-e.createdAt.getTime()})),d=[].concat(d)},PAYMENT_UPDATE:f,BILLING_PAYMENT_FETCH_SUCCESS:f,LOGOUT:function(e){d=[]}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(62)),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(99)),o=d(n(383)),i=d(n(1198)),l=d(n(5858)),u=n(1);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n,r,s,d;function p(t){var n;return(n=e.call(this)||this).id=t.id,n.amount=t.amount,n.amountRefunded=t.amountRefunded,n.createdAt=t.createdAt,n.currency=t.currency,n.description=t.description,n.paymentSource=t.paymentSource,n.status=t.status,n.tax=t.tax,n.taxInclusive=t.taxInclusive,n.subscription=t.subscription,n.skuId=t.skuId,n.skuPrice=t.skuPrice,n.sku=t.sku,n.flags=t.flags,n}return n=e,(t=p).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),p.createFromServer=function(e){var t=null!=e.payment_source?o.default.createFromServer(e.payment_source):null,n=null!=e.sku?i.default.createFromServer(e.sku):null,r=null!=e.subscription?l.default.createFromServer(e.subscription):null;return new p({id:e.id,createdAt:new Date(e.created_at),currency:e.currency,tax:e.tax,taxInclusive:e.tax_inclusive,amount:e.amount,amountRefunded:e.amount_refunded,status:e.status,metadata:e.metadata,description:e.description,paymentSource:t,paymentGateway:e.payment_gateway,paymentGatewayPaymentId:e.payment_gateway_payment_id,flags:e.flags,subscription:r,skuId:e.sku_id,skuPrice:e.sku_price,sku:n})},r=p,(s=[{key:"isPremiumSubscription",get:function(){return null!=this.subscription&&u.PREMIUM_PLANS.has(this.subscription.planId)}},{key:"isPremiumGuildSubscription",get:function(){return null!=this.subscription&&null!=this.subscription.additionalPlans.find((function(e){var t=e.planId;return u.PREMIUM_GUILD_SUBSCRIPTION_PLANS.has(t)}))}},{key:"isGift",get:function(){return a.hasFlag(this.flags,u.PaymentFlags.GIFT)}},{key:"isPremiumGift",get:function(){return this.isGift&&Object.values(u.PremiumSubscriptionSKUs).includes(this.skuId)}},{key:"isPreorder",get:function(){return a.hasFlag(this.flags,u.PaymentFlags.PREORDER)}}])&&f(r.prototype,s),d&&f(r,d),p}(r.default);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(61)),l=f(n(5971)),u=f(n(5950)),s=f(n(6)),d=f(n(6132));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=a.forwardRef((function(e,t){var n,r,f=e.currentPageIndex,c=e.numPages,y=e.onChangePage,m=e.children,_=e.className,h=e.showPageCount,E=void 0===h||h,g=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["currentPageIndex","numPages","onChangePage","children","className","showPageCount"]),S=f<=0,O=f>=c-1;return a.createElement("div",p({className:(0,o.default)(d.default.paginator,_),ref:t},g),m,v("div",{className:d.default.pageActions},void 0,v(i.default,{className:(0,o.default)(d.default.pageButtonPrev,(n={},n[d.default.disabled]=S,n)),tabIndex:S?-1:0,onClick:S?void 0:function(){return y(f-1)}},void 0,v(l.default,{className:d.default.pageButtonIcon,"aria-label":s.default.Messages.PAGINATION_PREVIOUS})),v("div",{className:d.default.pageIndicator},void 0,E?s.default.Messages.PAGINATOR_OF_PAGES.format({currentPage:f+1,numPages:c}):s.default.Messages.PAGINATOR_CURRENT_PAGE.format({currentPage:f+1})),v(i.default,{className:(0,o.default)(d.default.pageButtonNext,(r={},r[d.default.disabled]=O,r)),tabIndex:O?-1:0,onClick:O?void 0:function(){return y(f+1)}},void 0,v(u.default,{className:d.default.pageButtonIcon,"aria-label":s.default.Messages.PAGINATION_NEXT}))))}));t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=j(n(9)),i=j(n(133)),l=j(n(5)),u=n(680),s=n(92),d=j(n(3)),f=n(290),c=j(n(5936)),p=n(383),v=j(n(71)),y=j(n(470)),m=j(n(271)),_=j(n(61)),h=j(n(55)),E=j(n(477)),g=j(n(700)),S=j(n(149)),O=j(n(683)),I=j(n(372)),T=j(n(255)),C=j(n(5694)),b=j(n(5686)),M=n(1161),N=n(99),A=j(n(96)),P=n(281),R=j(n(6045)),L=n(1),D=j(n(6)),w=j(n(5861));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(){return(U=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}).apply(this,arguments)}function G(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var V=function(e){return"https://"+L.SUPPORT_DOMAIN+"/hc/"+e.toLowerCase()+"/requests/new?ticket_form_id=360000118612"},W=(0,i.default)({TIME_PLAYED:null,PURCHASE_DATE:null,SKU_TYPE:null,ALREADY_REFUNDED:null,PAYMENT_STATUS:null,PAYMENT_GATEWAY:null,SKU_STICKER_PACK:null}),Y=[L.PaymentStatusTypes.FAILED,L.PaymentStatusTypes.REVERSED],z=[s.PaymentGateways.APPLE],K=function(e){var t=e.description,n=e.cost;return x("li",{className:w.default.paymentDetail},void 0,x(h.default,{justify:h.default.Justify.BETWEEN},void 0,x("div",{},void 0,t),x("div",{},void 0,n)))};K.displayName="PaymentDetail";var $=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={expanded:!1},t.refundRules=[{rule:W.TIME_PLAYED,canRefund:function(){if(t.isSkuPreorder)return!0;var e=t.timePlayed;return null==e||e.asMilliseconds()<l.default.duration(2,"hours").asMilliseconds()}},{rule:W.PURCHASE_DATE,canRefund:function(){var e=t.props.payment;if(t.isSkuPreorder)return!0;var n=e.isPremiumSubscription||e.isPremiumGuildSubscription||e.isPremiumGift?5:14;return t.daysSincePurchase<=n}},{rule:W.SKU_TYPE,canRefund:function(){var e=t.props.payment;return null==e.sku||e.sku.type!==L.SKUTypes.CONSUMABLE}},{rule:W.ALREADY_REFUNDED,canRefund:function(){var e=t.props.payment;return e.amountRefunded<e.amount}},{rule:W.PAYMENT_STATUS,canRefund:function(){var e=t.props.payment;return!Y.includes(e.status)}},{rule:W.PAYMENT_GATEWAY,canRefund:function(){var e=t.props.payment;return null==e.paymentGateway||!z.includes(e.paymentGateway)}},{rule:W.SKU_STICKER_PACK,canRefund:function(){var e=t.props.payment;return null==e.sku||!(0,N.hasFlag)(e.sku.flags,L.SKUFlags.STICKER_PACK)}}],t.handleExpandInfo=function(){t.setState({expanded:!t.state.expanded})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,H(t,n);var i,s,d,v=r.prototype;return v.validateRefundRules=function(){return this.refundRules.filter((function(e){return!(0,e.canRefund)()})).map((function(e){return e.rule}))},v.renderStatus=function(){switch(this.props.payment.status){case L.PaymentStatusTypes.PENDING:return x("span",{className:w.default.statusTagGrey},void 0,D.default.Messages.BILLING_TAG_PENDING);case L.PaymentStatusTypes.FAILED:return x("span",{className:w.default.statusTagRed},void 0,D.default.Messages.BILLING_TAG_FAILED);case L.PaymentStatusTypes.REFUNDED:return x("span",{className:w.default.statusTagGreen},void 0,D.default.Messages.BILLING_TAG_REFUNDED);case L.PaymentStatusTypes.REVERSED:return x("span",{className:w.default.statusTagRed},void 0,D.default.Messages.BILLING_TAG_REVERSED);default:return null}},v.renderPrice=function(){var e=this.props.payment;return x("span",{className:w.default.price},void 0,(0,P.formatPrice)(e.amount,e.currency))},v.renderPaymentBreakdown=function(){var e=this.props,t=e.payment,n=e.locale,r=t.taxInclusive,i=t.tax,l=t.amount,u=t.currency;return x("div",{className:(0,o.default)(w.default.paymentText,w.default.paymentBreakdown)},void 0,null!=t.paymentSource?x(R.default,{paymentSource:t.paymentSource,locale:n,descriptionClassName:w.default.paymentText}):null,x("ul",{},void 0,!r&&i>0?x(a.Fragment,{},void 0,x(K,{description:t.description,cost:(0,P.formatPrice)(l-i,u)}),x(K,{description:D.default.Messages.BILLING_PAYMENT_BREAKDOWN_TAXES,cost:(0,P.formatPrice)(i,u)})):null,x(K,{description:D.default.Messages.BILLING_PAYMENT_BREAKDOWN_TOTAL,cost:(0,P.formatPrice)(l,u)})))},v.renderRefundDetails=function(){var e=this.props,t=e.locale,n=e.payment,r=this.validateRefundRules();if(r.includes(W.PAYMENT_GATEWAY)||r.includes(W.PAYMENT_STATUS)||r.includes(W.ALREADY_REFUNDED)||r.includes(W.SKU_STICKER_PACK))return null;var o,i=0===r.length,l=V(t),u=n.isPremiumSubscription||n.isPremiumGuildSubscription||n.isPremiumGift?5:14;return o=r.includes(W.SKU_TYPE)?D.default.Messages.BILLING_APPLICATION_CONSUMABLE_REFUND_TEXT_UNABLE.format({supportURL:l}):i?n.isPreorder&&this.isSkuPreorder?D.default.Messages.BILLING_PREORDER_REFUND_TEXT.format({supportURL:l}):n.isPremiumSubscription||n.isPremiumGuildSubscription?D.default.Messages.BILLING_PREMIUM_REFUND_TEXT.format({dateLimit:u,supportURL:l}):n.isGift?D.default.Messages.BILLING_GIFT_REFUND_TEXT.format({dateLimit:u,supportURL:l}):D.default.Messages.BILLING_APPLICATION_REFUND_TEXT.format({dateLimit:u,playtimeLimit:2,supportURL:l}):n.isGift?D.default.Messages.BILLING_GIFT_REFUND_TEXT_UNABLE.format({dateLimit:u}):n.isPremiumSubscription||n.isPremiumGuildSubscription?D.default.Messages.BILLING_PREMIUM_REFUND_TEXT_UNABLE.format({dateLimit:u}):D.default.Messages.BILLING_APPLICATION_REFUND_TEXT_UNABLE.format({dateLimit:u,playtimeLimit:2}),x(a.Fragment,{},void 0,x("h2",{className:w.default.paymentHeader},void 0,D.default.Messages.BILLING_REFUND_HEADER),x("div",{className:w.default.paymentText},void 0,x("div",{},void 0,o),this.renderRefundActions(r)))},v.renderRefundActions=function(e){var t=this.props,n=t.locale,r=t.payment;if(this.isSkuPreorder||e.includes(W.SKU_TYPE))return null;var a=e.includes(W.PURCHASE_DATE)?T.default:I.default,o=e.includes(W.TIME_PLAYED)?T.default:I.default;return x(h.default,{justify:h.default.Justify.BETWEEN,align:h.default.Align.END},void 0,x(h.default,{},void 0,x("div",{className:w.default.refundCriteria},void 0,x("h3",{className:w.default.refundSubHeader},void 0,r.isPreorder?D.default.Messages.BILLING_REFUND_RELEASE_DATE_SUBHEADER:D.default.Messages.BILLING_REFUND_PURCHASE_DATE_SUBHEADER),x(h.default,{align:h.default.Align.CENTER},void 0,x(a,{className:w.default.refundCriteriaIcon}),x("div",{},void 0,D.default.Messages.BILLING_REFUND_PURCHASE_DATE.format({daysSincePurchase:this.daysSincePurchase})))),r.isPremiumSubscription||r.isGift||r.isPremiumGuildSubscription?null:x("div",{className:w.default.refundCriteria},void 0,x("h3",{className:w.default.refundSubHeader},void 0,D.default.Messages.BILLING_REFUND_PLAY_TIME_SUBHEADER),x(h.default,{},void 0,x(o,{className:w.default.refundCriteriaIcon}),x("div",{},void 0,null!=this.timePlayed?this.timePlayed.humanize():D.default.Messages.BILLING_REFUND_PLAY_TIME_NEVER_PLAYED)))),x(m.default,{href:V(n)},void 0,D.default.Messages.BILLING_REFUND_REPORT_A_PROBLEM))},v.renderDescription=function(){var e,t,n=this.props,r=n.compactMode,o=n.payment,i=n.application,u=n.stickerPack,s=this.state.expanded,d=o.sku,p=o.subscription;if(null!=p&&null!=p.planId){var v,y=[];A.default.isNoneSubscription(p.planId)||(y.push(A.default.getDisplayName(p.planId)),v=L.SubscriptionPlanInfo[p.planId]);for(var m,_=G(p.additionalPlans);!(m=_()).done;){var h=m.value,g=h.planId,O=h.quantity;y.push((O>1?O+"x ":"")+A.default.getDisplayName(g)),null==v&&(v=L.SubscriptionPlanInfo[g])}t=y.join(", "),e=x(E.default,{className:w.default.descriptionIcon,game:i,size:E.default.Sizes.XSMALL,skuId:null!=v?v.skuId:null})}else if(null!=d)if(t=o.isPreorder?D.default.Messages.PREORDER_SKU_NAME.format({name:d.name}):d.name,null!=u){var I=(0,f.getStickerPackPreviewSticker)(u);e=x(c.default,{disableAnimation:!s,isInteracting:s,sticker:I,className:w.default.descriptionIcon,size:24})}else e=x(E.default,{className:w.default.descriptionIcon,game:i,size:E.default.Sizes.XSMALL,skuId:d.id});else e=x(b.default,{className:w.default.descriptionIcon}),t=o.description;var T=x("div",{className:w.default.date},void 0,(0,M.dateFormat)((0,l.default)(o.createdAt),"MM/DD/YYYY")),N=o.isGift?x(S.default,{text:D.default.Messages.BILLING_GIFT_PURCHASE_TOOLTIP},void 0,(function(e){return a.createElement(C.default,U({className:w.default.giftIcon},e))})):null;return r?x("div",{className:w.default.description},void 0,e,x("div",{},void 0,t,T),N):x(a.Fragment,{},void 0,T,x("div",{className:w.default.description},void 0,e,x("div",{},void 0,t),N))},v.renderExpandedSection=function(){return x("div",{className:w.default.expandedInfo},void 0,x("h2",{className:w.default.paymentHeader},void 0,D.default.Messages.BILLING_PURCHASE_DETAILS_HEADER),this.renderPaymentBreakdown(),this.renderRefundDetails())},v.render=function(){var e=this,t=this.props,n=t.payment,r=t.className,i=t.compactMode,l=this.state.expanded;return x(u.ListNavigatorItem,{id:n.id},void 0,(function(t){var n;return a.createElement(_.default,U({onClick:e.handleExpandInfo,className:(0,o.default)(l?w.default.payment:w.default.hoverablePayment,r,(n={},n[w.default.compact]=i,n)),focusProps:{offset:4}},t),x(h.default,{className:w.default.summaryInfo,align:h.default.Align.CENTER},void 0,e.renderDescription(),x("div",{className:w.default.amount},void 0,e.renderStatus(),e.renderPrice()),x(O.default,{className:w.default.expand,direction:l?O.default.Directions.UP:O.default.Directions.DOWN})),l?e.renderExpandedSection():null)}))},i=r,(s=[{key:"timePlayed",get:function(){var e=this.props.applicationStatistics;return null!=e&&null!=e.total_discord_sku_duration?l.default.duration(e.total_discord_sku_duration,"seconds"):null}},{key:"daysSincePurchase",get:function(){var e=this.props.payment,t=null!=e.sku?e.sku.releaseDate:null,n=null!=t&&t.isAfter(e.createdAt)?t:e.createdAt;return(0,l.default)().diff(n,"days")}},{key:"isSkuPreorder",get:function(){var e=this.props.payment;return null!=e.sku&&e.sku.isPreorder()}},{key:"typeString",get:function(){var e=this.props.payment.paymentSource;return e instanceof p.PaypalSourceRecord?g.default.Types.PAYPAL:e instanceof p.CreditCardSourceRecord?g.default.getType(e.brand):g.default.Types.UNKNOWN}}])&&B(i.prototype,s),d&&B(i,d),r}(a.PureComponent);$.displayName="PaymentHistoryRow",$.defaultProps={compactMode:!1};var Z=d.default.connectStores([y.default,v.default],(function(e){var t=e.payment,n=null!=t.sku&&t.sku.type===L.SKUTypes.DURABLE_PRIMARY?t.sku.applicationId:null;return{applicationStatistics:null!=n?y.default.getCurrentUserStatisticsForApplication(n):null,application:null!=n?v.default.getGame(n):null,stickerPack:null}}))($);t.default=Z},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalizedDisplayMonth=function(e,t){var n=new Date;return n.setMonth(e-1),n.toLocaleString(t,{month:"short"})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={MenuStyle:!0};t.default=t.MenuStyle=void 0;var a=E(n(0)),o=_(n(9)),i=_(n(130)),l=n(8404),u=_(n(105)),s=n(721),d=_(n(272)),f=E(n(8726));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var c,p,v=_(n(8554)),y=E(n(8805)),m=_(n(7340));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,r){c||(c="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var i=new Array(o),l=0;l<o;l++)i[l]=arguments[l+3];t.children=i}if(t&&a)for(var u in a)void 0===t[u]&&(t[u]=a[u]);else t||(t=a||{});return{$$typeof:c,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){return function e(t){return null==t?[]:a.Children.toArray(t).flatMap((function(t){var n;return null==t||!1===t?[]:Array.isArray(t)?e(t):t.type===a.Fragment?null!==(n=e(t.props.children))&&void 0!==n?n:[]:[t]}))}(e).reduce((function(e,t){if(t.type===f.MenuSeparator)return e.push({type:"separator",navigable:!1}),e;if(t.type===f.MenuGroup){var n=O(t.props.children);return e.push({type:"groupstart",length:n.length,navigable:!1,props:t.props}),e.push.apply(e,n),e.push({type:"groupend",length:n.length,navigable:!1,props:t.props}),e}if(t.type===f.MenuItem)return e.push(null!=t.props.render?{type:"customitem",key:t.props.id,navigable:!0,render:t.props.render,props:t.props}:{type:"item",key:t.props.id,navigable:!0,label:t.props.label,children:t.props.children?O(t.props.children):void 0,onChildrenScroll:t.props.onChildrenScroll,props:t.props,childRowHeight:t.props.childRowHeight,listClassName:t.props.listClassName}),e;if(t.type===f.MenuCheckboxItem)return e.push({type:"checkbox",key:t.props.id,navigable:!0,props:t.props}),e;if(t.type===f.MenuRadioItem)return e.push({type:"radio",key:t.props.id,navigable:!0,props:t.props}),e;if(t.type===f.MenuControlItem)return e.push({type:"control",key:t.props.id,navigable:!0,props:t.props}),e;throw new Error("Menu API only allows Items and groups of Items as children. Received "+((null==t?void 0:t.type)||t||typeof t)+" ("+typeof t+") instead")}),[])}function I(e){var t,n=e.navId,r=e.style,f=void 0===r?p.FLEXIBLE:r,c=e.className,_=e.onClose,h=e.children,E=e.onSelect,I=O(h),T=function e(t){return t.reduce((function(t,n){return n.navigable?(t.push({key:n.key,children:"item"===n.type&&null!=n.children?e(n.children):void 0}),t):t}),[])}(I),C=a.useRef([]);(0,i.default)(C.current,T)||(C.current=T);var b=null===(t=I.find((function(e){return null!=e.key})))||void 0===t?void 0:t.key,M=(0,l.useMenuNavigator)({navId:n,items:C.current,initialFocusPath:u.default.keyboardModeEnabled&&b?[b]:[],closeMenu:_}),N=a.useRef(null);return(0,s.useFocusLock)(N),S(v.default.Provider,{value:E},void 0,a.createElement("div",g({className:(0,o.default)(m.default.menu,m.default[f],c)},M.getContainerProps(),{ref:N,"aria-label":e["aria-label"]}),S(d.default,{className:m.default.scroller},void 0,function e(t,n,r,o){var i=0,l=[];return t.reduce((function(t,u,s){var d=l.length>0?l[l.length-1]:t;switch(u.type){case"separator":d.push(S(y.Separator,{},"separator-"+s)),i=0;break;case"groupstart":i>0&&u.length>0&&(d.push(S(y.Separator,{},"separator-"+s)),i=0),l.push([]);break;case"groupend":l.length>0&&t.push(a.createElement(y.Group,g({key:"group-"+s,contents:l.pop()},u.props)));break;case"item":var f=u.children,c=u.childRowHeight,p=u.onChildrenScroll,v=u.listClassName,m=[].concat(r,[u.key]),_=n.isFocused(m),h=null!=f?{"aria-haspopup":!0}:{},E=a.createElement(y.Item,g({key:u.key},u.props,{label:u.label,hasSubmenu:null!=f,isFocused:_,menuItemProps:g({},n.getItemProps({path:m}),{},h),onClose:o}));null!=f?null!=c?d.push(a.createElement(y.SubmenuListItem,g({key:u.key+"-submenu"},u.props,{parentItem:E,isFocused:_,menuSubmenuProps:n.getSubmenuProps({path:m}),rows:e(f,n,m,o),rowHeight:c,onScroll:p,listClassName:v}))):d.push(a.createElement(y.SubmenuItem,g({key:u.key+"-submenu"},u.props,{parentItem:E,isFocused:_,menuSubmenuProps:n.getSubmenuProps({path:m}),renderSubmenu:function(){return e(f,n,m,o)}}))):d.push(E),i++;break;case"customitem":var O=[].concat(r,[u.key]);d.push(a.createElement(y.CustomItem,g({key:u.key},u.props,{isFocused:n.isFocused(O),menuItemProps:n.getItemProps({path:O}),onClose:o}),u.render)),i++;break;case"checkbox":var I=[].concat(r,[u.key]);d.push(a.createElement(y.CheckboxItem,g({key:u.key},u.props,{isFocused:n.isFocused(I),menuItemProps:n.getItemProps({path:I,role:"menuitemcheckbox"})}))),i++;break;case"radio":var T=[].concat(r,[u.key]);d.push(a.createElement(y.RadioItem,g({key:u.key},u.props,{isFocused:n.isFocused(T),menuItemProps:n.getItemProps({path:T,role:"menuitemradio"})}))),i++;break;case"control":var C=[].concat(r,[u.key]);d.push(a.createElement(y.ControlItem,g({key:u.key},u.props,{isFocused:n.isFocused(C),menuItemProps:n.getItemProps({path:C}),onClose:o}))),i++}return t}),[])}(I,M,[],_))))}t.MenuStyle=p,function(e){e.FIXED="styleFixed",e.FLEXIBLE="styleFlexible"}(p||(t.MenuStyle=p={})),I.displayName="Menu";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(14)),a=f(n(2)),o=f(n(727)),i=f(n(182)),l=f(n(755)),u=n(687),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}function v(){return(v=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}).apply(this,arguments)}var y={init:function(e,t,n){void 0===t&&(t=null),a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_INIT,guildId:e,section:t,location:n})},open:function(e,t,n){y.init(e,t,n),(0,u.pushLayer)(s.Layers.GUILD_SETTINGS)},close:function(){a.default.wait((function(){return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_CLOSE})}))},setSection:function(e){a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SET_SECTION,section:e})},setSearchQuery:function(e){a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SET_SEARCH_QUERY,searchQuery:e})},selectRole:function(e){a.default.wait((function(){return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_ROLE_SELECT,roleId:e})}))},updateEmbed:function(e,t,n){r.default.patch({url:s.Endpoints.GUILD_WIDGET(e),body:{enabled:t,channel_id:n},oldFormErrors:!0}).then((function(t){a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SET_WIDGET,guildId:e,enabled:t.body.enabled,channelId:t.body.channel_id})}))},updateMFALevel:function(e){var t=e.guildId,n=e.level,o=e.isEnabled;(0,l.default)({title:d.default.Messages.GUILD_SECURITY_REQ_MFA_LABEL,actionText:o?d.default.Messages.GUILD_SECURITY_REQ_MFA_TURN_OFF:d.default.Messages.GUILD_SECURITY_REQ_MFA_TURN_ON},(function(e){return r.default.post({url:s.Endpoints.GUILD_MFA(t),body:v({level:n},e),oldFormErrors:!0})})).then((function(e){return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SET_MFA_SUCCESS,level:e.body.level})}))},updateIcon:function(e,t){r.default.patch({url:s.Endpoints.GUILD(e),body:{icon:t},oldFormErrors:!0}).then((function(){a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_UPDATE,icon:t}),o.default.checkGuildTemplateDirty(e)}),(function(e){return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SUBMIT_FAILURE,errors:e.body})}))},cancelChanges:function(e){a.default.dirtyDispatch({type:s.ActionTypes.GUILD_SETTINGS_CANCEL_CHANGES,guildId:e})},updateGuild:function(e){a.default.dispatch(v({type:s.ActionTypes.GUILD_SETTINGS_UPDATE},e))},saveGuild:function(e,t){var n=t.name,i=t.description,l=t.icon,u=t.splash,d=t.banner,f=t.region,c=t.afkChannelId,p=t.afkTimeout,v=t.systemChannelId,y=t.verificationLevel,m=t.defaultMessageNotifications,_=t.explicitContentFilter,h=t.features,E=t.systemChannelFlags,g=t.preferredLocale,S=t.rulesChannelId,O=t.discoverySplash,I=t.publicUpdatesChannelId;return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SUBMIT}),r.default.patch({url:s.Endpoints.GUILD(e),body:{name:n,description:i,icon:l,splash:u,banner:d,region:f,features:h,preferred_locale:g,afk_channel_id:c,afk_timeout:p,system_channel_id:v,verification_level:y,default_message_notifications:m,explicit_content_filter:_,system_channel_flags:E,rules_channel_id:S,discovery_splash:O,public_updates_channel_id:I},oldFormErrors:!0}).then((function(t){a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SUBMIT_SUCCESS,guild:t.body}),o.default.checkGuildTemplateDirty(e)}),(function(e){return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_SUBMIT_FAILURE,errors:e.body})}))},updateGuildModeration:function(e,t){return r.default.patch({url:s.Endpoints.GUILD(e),body:{verification_level:t.verificationLevel,explicit_content_filter:t.explicitContentFilter},oldFormErrors:!0}).then((function(t){return o.default.checkGuildTemplateDirty(e),t}))},transferOwnership:function(e,t){return(0,l.default)({title:d.default.Messages.TRANSFER_OWNERSHIP,actionText:d.default.Messages.TRANSFER_OWNERSHIP},(function(n){return r.default.patch({url:s.Endpoints.GUILD(e),body:v({owner_id:t},n),oldFormErrors:!0})}))},deleteGuild:function(e,t){return(0,l.default)({title:d.default.Messages.DELETE_SERVER_TITLE.format({name:t}),actionText:d.default.Messages.DELETE_SERVER,disallowBackupCodes:!0},(function(t){return r.default.post({url:s.Endpoints.GUILD_DELETE(e),body:t,oldFormErrors:!0})})).then((function(){y.close()}))},leaveGuild:function(e){return p(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.default.delete({url:s.Endpoints.GUILD_LEAVE(e),body:{lurking:i.default.isLurking(e)},oldFormErrors:!0});case 2:y.close();case 3:case"end":return t.stop()}}),t)})))()},updateMemberRoles:function(e,t,n,o,i){return p(regeneratorRuntime.mark((function l(){return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,r.default.patch({url:s.Endpoints.GUILD_MEMBER(e,t),body:{roles:n},oldFormErrors:!0});case 2:o.forEach((function(n){return a.default.dispatch({type:s.ActionTypes.GUILD_ROLE_MEMBER_ADD,guildId:e,roleId:n,userId:t})})),i.forEach((function(n){return a.default.dispatch({type:s.ActionTypes.GUILD_ROLE_MEMBER_REMOVE,guildId:e,roleId:n,userId:t})}));case 4:case"end":return l.stop()}}),l)})))()},bulkAddMemberRoles:function(e,t,n){return r.default.patch({url:s.Endpoints.GUILD_ROLE_MEMBERS(e,t),body:{member_ids:n}}).then((function(n){a.default.dispatch({type:s.ActionTypes.GUILD_ROLE_MEMBER_BULK_ADD,guildId:e,roleId:t,added:n.body})}))},updateRolesEditSection:function(e){a.default.wait((function(){return a.default.dispatch({type:s.ActionTypes.GUILD_SETTINGS_ROLES_EDIT_SECTION_UPDATE,section:e})}))},enableIntegration:function(e,t,n){return r.default.post({url:s.Endpoints.GUILD_INTEGRATIONS(e),body:{type:t,id:n},oldFormErrors:!0})},disableIntegration:function(e,t){return r.default.delete({url:s.Endpoints.GUILD_INTEGRATION(e,t),oldFormErrors:!0})},updateIntegration:function(e,t,n,a,o){var i={expire_behavior:n,expire_grace_period:a,enable_emoticons:o};return r.default.patch({url:s.Endpoints.GUILD_INTEGRATION(e,t),body:i,oldFormErrors:!0})},syncIntegration:function(e,t){r.default.post({url:s.Endpoints.GUILD_INTEGRATION_SYNC(e,t),oldFormErrors:!0})}},m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EMPTY_METADATA=void 0;var r=S(n(8)),a=S(n(5)),o=S(n(3)),i=S(n(14)),l=S(n(28)),u=S(n(2)),s=S(n(199)),d=S(n(8527)),f=n(1213),c=n(8474),p=S(n(379)),v=S(n(31)),y=S(n(162)),m=S(n(8569)),_=S(n(89)),h=S(n(15)),E=S(n(12)),g=n(1);function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){return(I=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}).apply(this,arguments)}var T,C,b,M,N,A=["name","description","icon","splash","banner","region","afkChannelId","afkTimeout","systemChannelId","verificationLevel","defaultMessageNotifications","explicitContentFilter","features","systemChannelFlags","preferredLocale","rulesChannelId","discoverySplash","publicUpdatesChannelId"],P=!1,R=g.FormStates.CLOSED,L={},D=!1,w=null,j=null,k=0,U=g.MFALevels.NONE,G=null,F={primaryCategoryId:f.DEFAULT_DISCOVERY_CATEGORY_ID,secondaryCategoryIds:[],keywords:[],emojiDiscoverabilityEnabled:f.DEFAULT_EMOJI_DISCOVERABILITY_SETTING,partnerActionedTimestamp:null,partnerApplicationTimestamp:null};t.EMPTY_METADATA=F;var B=F,H=F,x=null,V=null,W=null;function Y(e){if(null==M||null==b||b.id!==e)return!1;var t=h.default.getGuild(e);return null!=t&&(b===M?M=b=t:(b=t,M=M.set("roles",b.roles)),!0)}function z(e){var t=e.guildId,n=e.section,r=void 0===n?null:n,a=e.location,o=h.default.getGuild(t);if(null==o)return K();b=M=o,R=g.FormStates.OPEN,L={},N=t,U=M.mfaLevel,H=B,G=a,$({section:r||T||g.GuildSettingsSections.OVERVIEW})}function K(){P=!1,R=g.FormStates.CLOSED,b=M=null,D=!1,w=null,j=null,k=0,x=null,V=null,W=null,T=null,C=null,U=g.MFALevels.NONE}function $(e){if(null==M)return!1;var t=T;if((T=e.section)===g.GuildSettingsSections.BANS)s.default.fetchGuildBans(M.id);else if(T===g.GuildSettingsSections.INSTANT_INVITES)i.default.get({url:g.Endpoints.GUILD_INSTANT_INVITES(M.id),oldFormErrors:!0}).then((function(e){u.default.dispatch({type:g.ActionTypes.GUILD_SETTINGS_LOADED_INVITES,invites:e.body})}));else if(T===g.GuildSettingsSections.WIDGET)i.default.get({url:g.Endpoints.GUILD_WIDGET(M.id),oldFormErrors:!0}).then((function(e){u.default.dispatch({type:g.ActionTypes.GUILD_SETTINGS_SET_WIDGET,enabled:e.body.enabled,channelId:e.body.channel_id})}));else if(T===g.GuildSettingsSections.INTEGRATIONS||T===g.GuildSettingsSections.ROLES){if(N=null,t!==e.section)return q(e)}else T===g.GuildSettingsSections.MEMBERS?N=M.id:T===g.GuildSettingsSections.VANITY_URL&&i.default.get({url:g.Endpoints.GUILD_VANITY_URL(M.id),oldFormErrors:!0}).then((function(e){var t=e.body,n=t.code,r=t.uses;u.default.dispatch({type:g.ActionTypes.GUILD_SETTINGS_SET_VANITY_URL,code:n,uses:r})}))}function Z(e){var t;return new m.default({code:e.code,temporary:e.temporary,revoked:e.revoked,inviter:null!=e.inviter?new _.default(e.inviter):null,channel:new v.default(e.channel),guild:null!=e.guild?new y.default(e.guild):null,uses:e.uses,maxUses:e.max_uses,maxAge:e.max_age,createdAt:(0,a.default)(null!==(t=e.created_at)&&void 0!==t?t:void 0)})}function q(e){return null!=M&&R===g.FormStates.OPEN&&((e.type!==g.ActionTypes.GUILD_INTEGRATIONS_UPDATE||e.guildId===M.id)&&void i.default.get({url:g.Endpoints.GUILD_INTEGRATIONS(M.id),query:{include_applications:!0},oldFormErrors:!0}).then((function(e){null!=M&&u.default.dispatch({type:g.ActionTypes.GUILD_SETTINGS_LOADED_INTEGATIONS,guildId:M.id,integrations:e.body})})))}var X=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var o=a.prototype;return o.initialize=function(){this.waitFor(h.default,E.default)},o.hasChanges=function(){return!r.default.isEqual(M,b)||!r.default.isEqual(H,B)},o.isOpen=function(){return P},o.getSection=function(){return T},o.showNotice=function(){return this.hasChanges()},o.getGuildId=function(){return M?M.id:null},o.showPublicSuccessModal=function(){return!l.default.get(c.PUBLIC_SUCCESS_MODAL_SEEN_KEY)},o.getGuild=function(){return M},o.isSubmitting=function(){return R===g.FormStates.SUBMITTING},o.getErrors=function(){return L},o.getSelectedRoleId=function(){return N},o.getProps=function(){return{submitting:this.isSubmitting(),integrations:W,section:T,errors:L,guild:M,bans:x,invites:V,selectedRoleId:N,embedEnabled:D,embedChannelId:w,mfaLevel:U,searchQuery:C,vanityURLCode:j,vanityURLUses:k,originalGuild:b,hasChanges:this.hasChanges(),guildMetadata:H,analyticsLocation:G}},a}(o.default.Store))(u.default,__OVERLAY__?{}:{GUILD_SETTINGS_INIT:z,GUILD_SETTINGS_OPEN:function(e){P=!0,z(e)},GUILD_SETTINGS_CLOSE:function(e){return K()},GUILD_SETTINGS_UPDATE:function(e){if(null==M)return!1;A.forEach((function(t){null!=M&&e.hasOwnProperty(t)&&(M=M.set(t,e[t]))})),function(){if(null==M)return!1;var e=M.toJS(),t=b.toJS();A.some((function(n){return e[n]!==t[n]}))||(M=b)}()},GUILD_SETTINGS_CANCEL_CHANGES:function(e){var t=e.guildId;L={};var n=h.default.getGuild(t);null!=n&&(b=M=n)},GUILD_SETTINGS_SUBMIT:function(e){return R=g.FormStates.SUBMITTING,void(L={})},GUILD_SETTINGS_SUBMIT_SUCCESS:function(e){R=g.FormStates.OPEN},GUILD_SETTINGS_SUBMIT_FAILURE:function(e){R=g.FormStates.OPEN,T=g.GuildSettingsSections.OVERVIEW,L=e.errors||{}},GUILD_SETTINGS_SET_SECTION:$,GUILD_SETTINGS_SET_SEARCH_QUERY:function(e){C=e.searchQuery},GUILD_SETTINGS_LOADED_BANS:function(e){x=e.bans.reduce((function(e,t){return null!=t.user&&null!=t.user.id&&(e[t.user.id]=t),e}),{})},GUILD_SETTINGS_LOADED_INVITES:function(e){V=e.invites.reduce((function(e,t){return e[t.code]=Z(t),e}),{})},GUILD_SETTINGS_SET_WIDGET:function(e){D=e.enabled,w=e.channelId},GUILD_SETTINGS_SET_VANITY_URL:function(e){j=e.code||null,k=e.uses},GUILD_SETTINGS_SET_MFA_SUCCESS:function(e){var t=e.level;U=t},GUILD_SETTINGS_ROLE_SELECT:function(e){var t=e.roleId;N=t},GUILD_SETTINGS_LOADED_INTEGATIONS:function(e){W=e.integrations.map((function(e){return null!=e.user&&(e.user=new _.default(e.user)),null!=e.application&&(e.application=new p.default(e.application)),e}))},GUILD_BAN_ADD:function(e){var t,n=e.user,r=e.guildId;return null!=x&&(null!=M&&M.id===r&&void(x=I({},x,(t={},t[n.id]={user:n,reason:null},t))))},GUILD_BAN_REMOVE:function(e){var t=e.user,n=e.guildId;return null!=x&&(null!=M&&M.id===n&&void delete(x=I({},x))[t.id])},GUILD_ROLE_CREATE:function(e){var t=e.guildId,n=e.role;if(!Y(t))return!1;null==N&&null!=M&&d.default.getCurrentConfig({guildId:M.id}).showNewRolesCreationFlow||(N=n.id)},GUILD_ROLE_UPDATE:function(e){if(!Y(e.guildId))return!1},GUILD_ROLE_DELETE:function(e){var t=e.guildId,n=e.roleId;if(!Y(t))return!1;N===n&&(N=null)},GUILD_UPDATE:function(e){if(null==M||M.id!==e.guild.id)return!1;var t=h.default.getGuild(M.id);if(null==t)return!1;var n=b=t,r=M.toJS();A.forEach((function(e){"icon"!==e&&"splash"!==e&&"banner"!==e&&"discoverySplash"!==e&&("rulesChannelId"!==e&&"publicUpdatesChannelId"!==e||r[e]!==c.CREATE_NEW_CHANNEL_VALUE)&&("features"!==e?n=n.set(e,r[e]):n.set(e,new Set(r[e])))})),M=n},GUILD_DELETE:function(e){if(null==M||M.id!==e.guild.id)return!1;K()},USER_CONNECTIONS_UPDATE:q,GUILD_INTEGRATIONS_UPDATE:q,INSTANT_INVITE_REVOKE_SUCCESS:function(e){delete(V=I({},V))[e.code]},INSTANT_INVITE_CREATE_SUCCESS:function(e){var t;V=I({},V,((t={})[e.invite.code]=Z(e.invite),t))},GUILD_UPDATE_DISCOVERY_METADATA_FROM_SERVER:function(e){var t,n,r,a=e.guildId,o=e.metadata;null!=M&&a===M.id&&(B={primaryCategoryId:o.primaryCategoryId||f.DEFAULT_DISCOVERY_CATEGORY_ID,secondaryCategoryIds:o.secondaryCategoryIds||[],keywords:o.keywords||[],emojiDiscoverabilityEnabled:null!==(t=o.emojiDiscoverabilityEnabled)&&void 0!==t?t:f.DEFAULT_EMOJI_DISCOVERABILITY_SETTING,partnerActionedTimestamp:null!==(n=o.partnerActionedTimestamp)&&void 0!==n?n:null,partnerApplicationTimestamp:null!==(r=o.partnerApplicationTimestamp)&&void 0!==r?r:null},H=B)},GUILD_DISCOVERY_METADATA_FETCH_FAIL:function(e){B=H=F},GUILD_DISCOVERY_CATEGORY_ADD:function(e){var t=e.guildId,n=e.categoryId;null!=M&&t===M.id&&(H=I({},H,{secondaryCategoryIds:[].concat(H.secondaryCategoryIds,[n])}),B=I({},B,{secondaryCategoryIds:[].concat(B.secondaryCategoryIds,[n])}))},GUILD_DISCOVERY_CATEGORY_DELETE:function(e){var t=e.guildId,n=e.categoryId;if(null!=M&&t===M.id){var r,a=H.secondaryCategoryIds.indexOf(n);-1!==a&&((r=[].concat(H.secondaryCategoryIds)).splice(a,1),H=I({},H,{secondaryCategoryIds:r})),-1!==(a=B.secondaryCategoryIds.indexOf(n))&&((r=[].concat(B.secondaryCategoryIds)).splice(a,1),B=I({},B,{secondaryCategoryIds:r}))}},GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL:function(e){var t=e.guildId,n=e.errors;null!=M&&t===M.id&&(L=n||{})},GUILD_UPDATE_DISCOVERY_METADATA:function(e){var t=e.guildId,n=e.primaryCategoryId,r=e.keywords,a=e.emojiDiscoverabilityEnabled;null!=M&&t===M.id&&(H=I({},H,{primaryCategoryId:null!=n?n:H.primaryCategoryId,keywords:null!=r?r:H.keywords,emojiDiscoverabilityEnabled:null!=a?a:H.emojiDiscoverabilityEnabled}))},GUILD_UPDATE_DISCOVERY_METADATA_FAIL:function(e){var t=e.guildId,n=e.errors;null!=M&&t===M.id&&(L=n||{})}});t.default=X},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MenuItemColor=void 0,t.MenuItemColor=r,function(e){e.DEFAULT="colorDefault",e.BRAND="colorBrand",e.DANGER="colorDanger",e.PREMIUM="colorPremium",e.GREEN="colorGreen"}(r||(t.MenuItemColor=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(98))&&r.__esModule?r:{default:r},l=n(13),u=n(393),s=n(1);function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this)._loadId=null,n._loadDate=n.props.root?Date.now():null,n.getLocation=(0,u.cachedFunction)((function(e,t,n,r){var a={};return null!=e&&(a.page=e),null!=t&&(a.section=t),null!=n&&(a.object=n),null!=r&&(a.objectType=r),a})),n.mergeLocation=(0,u.cachedFunction)((function(e,t){return c({},e,{},t)})),n.getContext=(0,u.cachedFunction)((function(e,t,n){return{location:e,loadDate:t,loadId:n}})),null!=t.loadId?n._loadId=t.loadId:t.root&&(n._loadId=i.default.v4()),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.renderProvider=function(e){var t=this.props,n=t.section,r=t.page,a=t.object,o=t.objectType,i=t.children,u=this.mergeLocation(e.location,this.getLocation(r,n,a,o)),s=this.getContext(u,this._loadDate||e.loadDate,this._loadId||e.loadId);return f(l.AnalyticsContext.Provider,{value:s},void 0,i)},a.render=function(){var e=this,t=this.props.context;return null!=t?this.renderProvider(t):f(l.AnalyticsContext.Consumer,{},void 0,(function(t){return e.renderProvider(t)}))},r}(o.Component);t.default=v,v.displayName="AnalyticsContext",v.Pages=s.AnalyticsPages,v.Sections=s.AnalyticsSections,v.Objects=s.AnalyticsObjects,v.ObjectTypes=s.AnalyticsObjectTypes,v.defaultProps={root:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=s(n(39)),l=n(1163),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t,n,r){void 0===n&&(n=u.default.Messages.COPY_ID);var s=(0,a.useStateFromStores)([i.default],(function(){return i.default.developerMode}),[]);return!__OVERLAY__&&s&&l.SUPPORTS_COPY?f(o.MenuItem,{id:"devmode-copy-id",label:n,action:function(n){var a=t&&n.shiftKey?t:e;(0,l.copy)(a),null==r||r()}},"devmode-copy-id"):null}c.displayName="useCopyIdItem"},,function(e,t,n){"use strict";var r,a,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationCommandOptionType=t.ApplicationCommandPermissionType=t.ApplicationCommandType=t.ApplicationCommandSectionType=void 0,t.ApplicationCommandSectionType=r,function(e){e[e.BUILT_IN=0]="BUILT_IN",e[e.GUILD=1]="GUILD",e[e.DM=2]="DM"}(r||(t.ApplicationCommandSectionType=r={})),t.ApplicationCommandType=a,function(e){e[e.BUILT_IN=0]="BUILT_IN",e[e.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",e[e.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",e[e.BOT=3]="BOT",e[e.PLACEHOLDER=4]="PLACEHOLDER"}(a||(t.ApplicationCommandType=a={})),t.ApplicationCommandPermissionType=o,function(e){e[e.ROLE=1]="ROLE",e[e.USER=2]="USER"}(o||(t.ApplicationCommandPermissionType=o={})),t.ApplicationCommandOptionType=i,function(e){e[e.SUB_COMMAND=1]="SUB_COMMAND",e[e.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",e[e.STRING=3]="STRING",e[e.INTEGER=4]="INTEGER",e[e.BOOLEAN=5]="BOOLEAN",e[e.USER=6]="USER",e[e.CHANNEL=7]="CHANNEL",e[e.ROLE=8]="ROLE",e[e.MENTIONABLE=9]="MENTIONABLE"}(i||(t.ApplicationCommandOptionType=i={}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTermsFormField=function(e){return!!e&&e.field_type===r.TERMS},t.GuildJoinRequestApplicationStatuses=t.UserVerificationFieldPlatforms=t.VerificationFormFieldTypes=t.MAX_RESULTS_PER_PAGE=void 0;var r,a,o;t.MAX_RESULTS_PER_PAGE=25,t.VerificationFormFieldTypes=r,function(e){e.TERMS="TERMS",e.TEXT_INPUT="TEXT_INPUT",e.PARAGRAPH="PARAGRAPH",e.MULTIPLE_CHOICE="MULTIPLE_CHOICE",e.VERIFICATION="VERIFICATION"}(r||(t.VerificationFormFieldTypes=r={})),t.UserVerificationFieldPlatforms=a,function(e){e.EMAIL="email",e.PHONE="phone"}(a||(t.UserVerificationFieldPlatforms=a={})),t.GuildJoinRequestApplicationStatuses=o,function(e){e.STARTED="STARTED",e.PENDING="PENDING",e.REJECTED="REJECTED",e.APPROVED="APPROVED"}(o||(t.GuildJoinRequestApplicationStatuses=o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBadgeWidthForValue=y,t.getBadgeCountString=m,t.IconBadge=t.TextBadge=t.NumberBadge=t.BadgeShapes=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=n(1),l=u(n(7449));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(){return(f=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}).apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var p={ROUND:l.default.baseShapeRound,ROUND_LEFT:l.default.baseShapeRoundLeft,ROUND_RIGHT:l.default.baseShapeRoundRight,SQUARE:""};function v(e){switch(e){case 1:case 4:case 6:return 1;default:return}}function y(e){return e<10?16:e<100?22:30}function m(e){return e<1e3?""+e:Math.min(Math.floor(e/1e3),9)+"k+"}t.BadgeShapes=p;var _=function(e){var t=e.count,n=e.color,r=void 0===n?i.Colors.STATUS_RED:n,u=e.disableColor,s=void 0!==u&&u,d=e.shape,_=void 0===d?p.ROUND:d,h=e.className,E=e.style,g=c(e,["count","color","disableColor","shape","className","style"]);return a.createElement("div",f({className:(0,o.default)(h,l.default.numberBadge,_),style:f({backgroundColor:s?void 0:r,width:y(t),paddingRight:v(t)},E)},g),m(t))};t.NumberBadge=_,_.displayName="NumberBadge";var h=function(e){var t=e.text,n=e.className,r=e.color,u=void 0===r?i.Colors.STATUS_RED:r,s=e.shape,d=void 0===s?p.ROUND:s,v=e.disableColor,y=void 0!==v&&v,m=e.style,_=c(e,["text","className","color","shape","disableColor","style"]);return a.createElement("div",f({className:(0,o.default)(n,l.default.textBadge,d),style:f({backgroundColor:y?void 0:u},m)},_),t)};t.TextBadge=h,h.displayName="TextBadge";var E=function(e){var t=e.icon,n=e.className,r=e.color,a=void 0===r?i.Colors.STATUS_RED:r,u=e.shape,s=void 0===u?p.ROUND:u,c=e.disableColor,v=void 0!==c&&c,y=e.style;return d("div",{className:(0,o.default)(n,l.default.iconBadge,s),style:f({backgroundColor:v?void 0:a},y)},void 0,d(t,{className:l.default.icon}))};t.IconBadge=E,E.displayName="IconBadge"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return f.apply(this,arguments)};var r=u(n(2)),a=n(1150),o=n(8555),i=u(n(8363)),l=u(n(9299));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(t,n,u){var s,d,f,c,p,v,y,m,_,h,E,g,S,O;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=(d=void 0===u?{}:u).withMutualGuilds,c=void 0!==f&&f,p=d.friendToken,v=d.preloadUserBanner,y=void 0===v||v,m=d.dispatchWait,_=void 0!==m&&m,(0,o.maybeFetchColor)(n),h=i.default.getUserProfile(t),E=i.default.getMutualGuilds(t),g=i.default.isFetching(t),S=!Array.isArray(E)&&c,O=y?l.default.preloadUserBannerImage:void 0,S||!(g||Date.now()-(null!==(s=null==h?void 0:h.lastFetched)&&void 0!==s?s:0)<6e4)){e.next=9;break}return e.abrupt("return",Promise.resolve());case 9:if(!_){e.next=14;break}return e.next=12,r.default.wait((function(){return(0,a.fetchProfile)(t,{withMutualGuilds:c,friendToken:p},O)}));case 12:e.next=16;break;case 14:return e.next=16,(0,a.fetchProfile)(t,{withMutualGuilds:c,friendToken:p},O);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=O(n(23)),a=O(n(14)),o=O(n(2)),i=O(n(154)),l=O(n(8389)),u=n(106),s=n(42),d=O(n(31)),f=O(n(10)),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1225)),p=O(n(36)),v=n(1242),y=n(121),m=n(8886),_=O(n(204)),h=n(698),E=n(1),g=O(n(6));function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){return e&&e.__esModule?e:{default:e}}function I(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){I(o,r,a,i,l,"next",e)}function l(e){I(o,r,a,i,l,"throw",e)}i(void 0)}))}}function C(e,t){return a.default.patch({url:E.Endpoints.CHANNEL(e),body:t}).then((function(e){return o.default.dispatch({type:E.ActionTypes.THREAD_UPDATE,channel:d.default.fromServer(e.body),guildHashes:void 0}),e}))}var b={archiveThread:function(e,t){var n={archived:!0};return t&&(n.locked=!0),C(e.id,n)},unarchiveThread:function(e,t){return T(regeneratorRuntime.mark((function n(){var r,a,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r={archived:!1},t&&(r.locked=!1),n.prev=2,n.next=5,C(e.id,r);case 5:return n.abrupt("return",n.sent);case 8:throw n.prev=8,n.t0=n.catch(2),(null===(a=n.t0.body)||void 0===a?void 0:a.code)===E.AbortCodes.TOO_MANY_THREADS?i.default.show({title:g.default.Messages.CANNOT_UNARCHIVE_THREAD,body:g.default.Messages.TOO_MANY_THREADS_MESSAGE}):(null===(o=n.t0.body)||void 0===o?void 0:o.code)===E.AbortCodes.TOO_MANY_ANNOUNCEMENT_THREADS?i.default.show({title:g.default.Messages.CANNOT_UNARCHIVE_THREAD,body:g.default.Messages.TOO_MANY_ANNOUNCEMENT_THREADS_MESSAGE}):429===n.t0.status?i.default.show({title:g.default.Messages.CANNOT_UNARCHIVE_THREAD,body:g.default.Messages.RATE_LIMITED}):i.default.show({title:g.default.Messages.ERROR,body:g.default.Messages.ERROR_OCCURRED_TRY_AGAIN}),n.t0;case 12:case"end":return n.stop()}}),n,null,[[2,8]])})))()},createThread:function(e,t,n,r,l){return T(regeneratorRuntime.mark((function u(){var s,d,c,p,y,m,_;return regeneratorRuntime.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return s=null!=t?E.Endpoints.CHANNEL_MESSAGE_THREADS(e.id,t):E.Endpoints.CHANNEL_THREADS(e.id),u.prev=1,u.next=4,a.default.post({url:s,body:{name:n,type:r,auto_archive_duration:l}});case 4:d=u.sent,o.default.dispatch({type:E.ActionTypes.SLOWMODE_RESET_COOLDOWN,slowmodeType:v.SlowmodeType.CreateThread,channelId:e.id}),o.default.dispatch({type:E.ActionTypes.THREAD_CREATE_LOCAL,channelId:d.body.id}),u.next=13;break;case 9:throw u.prev=9,u.t0=u.catch(1),(null===(c=u.t0.body)||void 0===c?void 0:c.code)===E.AbortCodes.TOO_MANY_THREADS?i.default.show({title:g.default.Messages.CANNOT_CREATE_THREAD,body:g.default.Messages.TOO_MANY_THREADS_MESSAGE}):(null===(p=u.t0.body)||void 0===p?void 0:p.code)===E.AbortCodes.TOO_MANY_ANNOUNCEMENT_THREADS?i.default.show({title:g.default.Messages.CANNOT_CREATE_THREAD,body:g.default.Messages.TOO_MANY_ANNOUNCEMENT_THREADS_MESSAGE}):(null===(y=u.t0.body)||void 0===y?void 0:y.code)===E.AbortCodes.SLOWMODE_RATE_LIMITED?(_=null!==(m=u.t0.body.retry_after)&&void 0!==m?m:0)>0&&o.default.dispatch({type:E.ActionTypes.SLOWMODE_SET_COOLDOWN,channelId:e.id,slowmodeType:v.SlowmodeType.CreateThread,cooldownMs:1e3*_}):429===u.t0.status?i.default.show({title:g.default.Messages.CANNOT_CREATE_THREAD,body:g.default.Messages.RATE_LIMITED}):i.default.show({title:g.default.Messages.ERROR,body:g.default.Messages.ERROR_OCCURRED_TRY_AGAIN}),u.t0;case 13:return u.abrupt("return",new Promise((function(e){f.default.addConditionalChangeListener((function(){var t=f.default.getChannel(d.body.id);if(null!=t)return o.default.wait((function(){e(t)})),!1}))})));case 14:case"end":return u.stop()}}),u,null,[[1,9]])})))()},joinThread:function(e,t){return T(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.default.post({url:E.Endpoints.THREAD_MEMBER(e.id),query:{location:t}});case 3:return n.abrupt("return",n.sent);case 6:n.prev=6,n.t0=n.catch(0),(null===(r=n.t0.body)||void 0===r?void 0:r.code)===E.AbortCodes.TOO_MANY_THREAD_MEMBERS?i.default.show({title:g.default.Messages.CANNOT_JOIN_THREAD,body:g.default.Messages.TOO_MANY_MEMBERS_MESSAGE}):i.default.show({title:g.default.Messages.ERROR,body:g.default.Messages.ERROR_OCCURRED_TRY_AGAIN});case 9:case"end":return n.stop()}}),n,null,[[0,6]])})))()},addMember:function(e,t,n){return T(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,a.default.post({url:E.Endpoints.THREAD_MEMBER(e.id,t),query:{location:n}});case 3:return r.abrupt("return",r.sent);case 6:r.prev=6,r.t0=r.catch(0),(null===(o=r.t0.body)||void 0===o?void 0:o.code)===E.AbortCodes.TOO_MANY_THREAD_MEMBERS?i.default.show({title:g.default.Messages.CANNOT_ADD_USER_TO_THREAD,body:g.default.Messages.TOO_MANY_MEMBERS_MESSAGE}):i.default.show({title:g.default.Messages.ERROR,body:g.default.Messages.ERROR_OCCURRED_TRY_AGAIN});case 9:case"end":return r.stop()}}),r,null,[[0,6]])})))()},leaveThread:function(e,t){return a.default.delete({url:E.Endpoints.THREAD_MEMBER(e.id),query:{location:t}})},removeMember:function(e,t,n){return a.default.delete({url:E.Endpoints.THREAD_MEMBER(e.id,t),query:{location:n}})},setAutoArchiveDuration:function(e,t){return a.default.patch({url:E.Endpoints.CHANNEL(e.id),body:{auto_archive_duration:t}})},openThreadSidebarForViewing:function(e){y.ComponentDispatch.dispatch(E.ComponentActions.POPOUT_CLOSE),p.default.getChannelId()!==e.parent_id&&(0,s.transitionToGuild)(e.guild_id,e.parent_id),(0,r.default)(null!=e.parent_id,"all threads must have parents"),o.default.dispatch({type:E.ActionTypes.THREAD_SIDEBAR_VIEW_THREAD,parentChannelId:e.parent_id,channelId:e.id}),setTimeout((function(){y.ComponentDispatch.dispatch(E.ComponentActions.FOCUS_CHANNEL_TEXT_AREA,{channelId:e.id})}),0)},openThreadSidebarForCreating:function(e,t,n){if((0,u.trackWithMetadata)(E.AnalyticEvents.THREAD_CREATION_STARTED,{location:n,channel_id:e.id,guild_id:e.guild_id}),y.ComponentDispatch.dispatch(E.ComponentActions.POPOUT_CLOSE),p.default.getChannelId()!==e.id&&(0,s.transitionToGuild)(e.guild_id,e.id),""===c.default.getDraft(e.id,c.DraftType.FirstThreadMessage)){var r=c.default.getDraft(e.id,c.DraftType.ChannelMessage);l.default.saveDraft(e.id,"",c.DraftType.ChannelMessage),l.default.saveDraft(e.id,r,c.DraftType.FirstThreadMessage)}setTimeout((function(){o.default.dispatch({type:E.ActionTypes.THREAD_SIDEBAR_CREATE_THREAD,parentChannelId:e.id,parentMessageId:null==t?void 0:t.id})}),0)},closeThreadSidebar:function(e){o.default.dispatch({type:E.ActionTypes.THREAD_SIDEBAR_CLOSE,parentChannelId:e})},setNotificationSetting:function(e,t){var n=this;return T(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if((0,h.trackThreadNotificationSettingsUpdated)(e,t),_.default.hasJoined(e.id)){r.next=4;break}return r.next=4,n.joinThread(e,"Change Notification Settings");case 4:return r.abrupt("return",a.default.patch({url:E.Endpoints.THREAD_MEMBER_SETTINGS(e.id),body:{flags:t}}));case 5:case"end":return r.stop()}}),r)})))()},loadArchivedThreads:function(e,t,n,r){o.default.dirtyDispatch({type:E.ActionTypes.LOAD_ARCHIVED_THREADS,channelId:t,listType:n,before:r}),a.default.get({url:m.ArchivedThreadListTypeAdapters[n].endpoint(t),query:{before:r},retries:2}).then((function(a){var i=a.body,l=i.threads,u=i.members,s=i.has_more;o.default.dispatch({type:E.ActionTypes.LOAD_ARCHIVED_THREADS_SUCCESS,guildId:e,channelId:t,listType:n,before:r,threads:l,members:(null!=u?u:[]).map((function(e){return(0,h.convertServerThreadMember)(e)})),hasMore:s})}),(function(){o.default.dispatch({type:E.ActionTypes.LOAD_ARCHIVED_THREADS_FAIL,channelId:t,listType:n,before:r})}))}};t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(9)),o=u(n(271)),i=u(n(8443)),l=u(n(7605));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t,n=e.icon,r=e.iconNode,o=e.timestamp,u=e.className,s=e.children,f=e.contentClassName,c=e.iconClassName,p=e.iconContainerClassName,v=e.compact,y=void 0!==v&&v;return d("div",{className:(0,a.default)(u,(t={},t[l.default.container]=!0,t[l.default.compact]=y,t[l.default.cozy]=!y,t))},void 0,null!=r&&d("div",{className:(0,a.default)(l.default.iconContainer,p)},void 0,r),null!=n&&d("div",{className:l.default.iconContainer},void 0,d("div",{"data-accessibility":"desaturate",className:(0,a.default)(l.default.icon,l.default.iconSize,c),style:{backgroundImage:"url('"+n+"')"}})),d("div",{className:(0,a.default)(f,l.default.content)},void 0,s,null!=o&&d(i.default,{timestamp:o})))}f.displayName="SystemMessage";var c=function(e){var t=e.onClick,n=e.children;return d("span",{className:l.default.action},void 0,"—",d(o.default,{onClick:t,className:l.default.actionAnchor},void 0,n))};c.displayName="SystemMessageAction",f.Action=c;var p=f;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=y(n(0)),o=p(n(9)),i=p(n(88)),l=p(n(8522)),u=n(149),s=n(85),d=p(n(1165)),f=y(n(474)),c=p(n(7611));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t,n=e.value,r=e.disabled,p=void 0!==r&&r,v=e.hideBorder,y=void 0!==v&&v,_=e.tooltipNote,h=e.onChange,E=e.className,g=e.style,S=e.note,O=e.children,I=a.useRef(null),T=a.useRef(null),C=(0,s.useUID)(),b=m(l.default,{id:C,checked:n,onChange:h,disabled:p,focusProps:{enabled:!1},innerRef:I});return m("div",{style:g,className:(0,o.default)(c.default.container,E,(t={},t[c.default.disabled]=p,t))},void 0,m(i.default,{within:!0,offset:-4,focusTarget:I,ringTarget:T},void 0,a.createElement("div",{className:c.default.labelRow,ref:T},m("label",{htmlFor:C,className:c.default.title},void 0,O),m("div",{className:c.default.control},void 0,null!=_?m(u.TooltipContainer,{text:_},void 0,b):b))),S&&m("div",{className:c.default.note},void 0,m(f.default,{disabled:p,type:f.Types.DESCRIPTION},void 0,S)),!y&&m(d.default,{className:c.default.dividerDefault}))}_.displayName="SwitchItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=z(n(0)),o=W(n(9)),i=W(n(23)),l=n(3),u=W(n(478)),s=n(1150),d=W(n(473)),f=W(n(8257)),c=W(n(8820)),p=n(5943),v=n(8298),y=W(n(486)),m=W(n(707)),_=n(293),h=W(n(163)),E=W(n(11)),g=W(n(71)),S=W(n(56)),O=W(n(15)),I=W(n(40)),T=W(n(256)),C=W(n(70)),b=W(n(160)),M=W(n(12)),N=W(n(61)),A=W(n(282)),P=n(41),R=z(n(279)),L=W(n(24)),D=W(n(468)),w=W(n(13)),j=W(n(258)),k=W(n(9302)),U=z(n(8822)),G=W(n(9304)),F=W(n(9321)),B=n(9112),H=n(1),x=W(n(6)),V=W(n(7473));function W(e){return e&&e.__esModule?e:{default:e}}function Y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Y=function(){return e},e}function z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function K(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $(){return($=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}).apply(this,arguments)}function Z(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Z(o,r,a,i,l,"next",e)}function l(e){Z(o,r,a,i,l,"throw",e)}i(void 0)}))}}function X(e){e.stopPropagation()}function J(e){var t,n=e.user,r=e.guildId,i=e.channelId,s=e.setNote,M=e.closePopout,W=e.setPopoutRef,Y=e.disableUserProfileLink,z=void 0===Y?__OVERLAY__:Y,Z=e.analyticsParams,J=void 0===Z?{}:Z,Q=a.useRef(null),ee=a.useState(!0),te=ee[0],ne=ee[1],re=a.useCallback((function(){var e=Q.current;null!=e&&ne(0===e.getScrollerState().scrollTop)}),[]);a.useLayoutEffect((function(){var e,t=Q.current;null!=t&&(null===(e=t.getScrollerNode())||void 0===e||e.scrollTo({top:0}))}),[]);var ae=(0,l.useStateFromStores)([O.default],(function(){return null!=r?O.default.getGuild(r):null})),oe=(0,l.useStateFromStores)([S.default],(function(){return null!=r?S.default.getMember(r,n.id):null})),ie=n.isNonUserBot(),le=(0,l.useStateFromStoresArray)([T.default],(function(){return[T.default.findActivity(n.id,(function(e){return e.type!==H.ActivityTypes.CUSTOM_STATUS})),T.default.findActivity(n.id,(function(e){return e.type===H.ActivityTypes.CUSTOM_STATUS})),ie?null:T.default.getStatus(n.id),T.default.isMobileOnline(n.id)]})),ue=le[0],se=le[1],de=le[2],fe=le[3],ce=(0,l.useStateFromStores)([h.default],(function(){return null!=h.default.getStreamForUser(n.id)})),pe=(0,l.useStateFromStores)([b.default],(function(){return b.default.hidePersonalInformation})),ve=a.useMemo((function(){var e;return null!=r?((e={})[r]=[n.id],e):{}}),[r,n.id]);(0,v.useSubscribeGuildMembers)(ve);var ye=(0,k.default)(n.id,r),me=j.default.getNickname(r,i,n),_e=E.default.getId()===n.id,he=(0,l.useStateFromStores)([I.default],(function(){return _e&&null!=ae&&(I.default.can(H.Permissions.CHANGE_NICKNAME,ae)||I.default.can(H.Permissions.MANAGE_NICKNAMES,ae))})),Ee=(0,p.useAndTriggerGuildMemberAvatarExperiment)(),ge=null!=ae&&_e&&Ee,Se=a.useCallback((function(){return null!=ue&&null!=ue.application_id&&null==g.default.getGame(ue.application_id)?u.default.fetchApplication(ue.application_id):Promise.resolve()}),[ue]);function Oe(){var e,t,r;null!=ue&&(e=ue.party,t=ue.assets,r=null!=ue.application_id?g.default.getGame(ue.application_id):null);var a=de;de===H.StatusTypes.ONLINE&&(a=fe?H.AnalyticsUserStatusTypes.ONLINE_MOBILE:H.AnalyticsUserStatusTypes.ONLINE_DESKTOP),w.default.track(H.AnalyticEvents.OPEN_POPOUT,$({type:"Profile Popout",other_user_id:n.id,application_id:null!=ue?ue.application_id:void 0,application_name:null!=ue?ue.name:void 0,sku_id:null!=r?r.primarySkuId:null,is_friend:C.default.isFriend(n.id),has_images:!(null==t||!t.large_image&&!t.small_image),party_max:null!=e&&null!=e.size?e.size[1]:void 0,party_id:null!=e?e.id:void 0,party_platform:null!=e&&(0,_.isSpotifyParty)(e.id)?H.PlatformTypes.SPOTIFY:null,game_platform:(0,y.default)(ue),profile_user_status:a,is_streaming:ce,has_custom_status:null!=se,profile_has_nitro_customization:null!=n.banner},J))}return a.useEffect((function(){function e(){return(e=q(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Se();case 2:Oe();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),a.useEffect((function(){Se()}),[Se]),K(f.default,{section:H.AnalyticsSections.PROFILE_POPOUT},void 0,a.createElement(A.default,{ref:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return null==W?void 0:W(e)})),"aria-label":n.username,className:V.default.userPopout,style:{width:300},onClick:X,onContextMenu:X},K("div",{className:V.default.headerNormal},void 0,K(U.default,{user:n,onClose:function(){return null==M?void 0:M()},guildId:r||void 0,bannerType:U.UserBannerTypes.POPOUT})),K(B.UserPopoutAvatar,{user:n,status:(0,m.default)(ue)?H.StatusTypes.STREAMING:de,isMobile:fe,guildId:r,onClose:M,disableUserProfileLink:z}),K(B.UserPopoutInfo,{user:n,nickname:me,onOpenPremiumSettings:function(){w.default.track(H.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:null,location_section:H.AnalyticsSections.PROFILE_POPOUT,location_object:H.AnalyticsObjects.TOOLTIP}),d.default.open(H.UserSettingsSections.PREMIUM),null==M||M()},identityCTA:function(){if(!he&&!ge||null==r)return null;var e=x.default.Messages.USER_POPOUT_IDENTITY_CTA_BOTH;return he&&!ge?e=x.default.Messages.USER_POPOUT_IDENTITY_CTA_NICKNAME:!he&&ge&&(e=x.default.Messages.USER_POPOUT_IDENTITY_CTA_AVATAR),K(N.default,{className:V.default.setIdentityLink,onClick:function(){return(0,P.openModal)((function(e){return a.createElement(c.default,$({},e,{guildId:r,user:n,analyticsSource:{page:H.AnalyticsPages.GUILD_CHANNEL,section:H.AnalyticsSections.PROFILE_POPOUT,object:H.AnalyticsObjects.EDIT_PER_SERVER_IDENTITY}}))}))}},void 0,K(L.default,{tag:"a",color:L.default.Colors.LINK,size:L.default.Sizes.SIZE_14},void 0,e))}(),usernameIcon:n.hasAvatarForGuild(r||void 0)&&K(R.default,{src:n.getAvatarURL(void 0),size:null==me?R.Sizes.SIZE_24:R.Sizes.SIZE_16,className:null==me?V.default.largeAvatar:V.default.miniAvatar,"aria-hidden":!0}),hasCustomStatus:null!=se}),a.createElement(D.default,{className:(0,o.default)(V.default.body,(t={},t[V.default.scrollerSeparator]=!te,t)),onScroll:re,ref:Q},K(B.UserPopoutProfileText,{hidePersonalInformation:pe,userBio:n.bio,customStatus:null!=se?K(B.UserPopoutCustomStatus,{customStatusActivity:se}):void 0}),K(G.default,{activity:ue,customStatusActivity:se,user:n,guild:ae,guildMember:oe,channelId:i,onClose:M,setNote:s,canDM:ye,hidePersonalInformation:pe})),K(F.default,{user:n,setNote:s,canDM:ye,onClose:M})))}function Q(e){var t=e.user,n=e.userId,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["user","userId"]),o=(0,l.useStateFromStores)([M.default],(function(){return M.default.getUser(n)}),[n]),u=a.useState(!1),d=u[0],f=u[1],c=null!=o?o:t;return a.useEffect((function(){function e(){return(e=q(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getUser)(n);case 2:f(!0);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null==o&&function(){e.apply(this,arguments)}()}),[o,n]),null==c?(d&&(0,i.default)(null!=c,"Unexpected missing user"),null):a.createElement(J,$({user:c},r))}J.displayName="UserPopout",Q.displayName="UserPopoutContainer";var ee=a.memo(Q);t.default=ee},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(88)),l=f(n(8550)),u=f(n(7419)),s=f(n(1244)),d=f(n(5701));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).onChange=function(e){var n=t.props,r=n.onChange,a=n.name;r&&r(e.currentTarget.value,a)},t.onFocus=function(e){var n=t.props,r=n.onFocus,a=n.name;r&&r(e,a)},t.onBlur=function(e){var n=t.props,r=n.onBlur,a=n.name;r&&r(e,a)},t.onKeyDown=function(e){var n=t.props.onKeyDown;n&&n(e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.getPaddingRight=function(){var e=this.props.maxLength;return null==e?10:7.23*(""+e).length+10},a.renderMaxLength=function(){var e=this.props,t=e.maxLength,n=e.value;if(null==t)return null;var r=t-(null!=n?n.length:0);return p("div",{className:u.default.maxLength},void 0,r)},a.renderErrorMessage=function(){var e=this.props.error;return null==e?null:p("div",{className:s.default.errorMessage},void 0,e)},a.render=function(){var e,t,n,r=this.props,a=r.disabled,f=r.value,c=r.placeholder,v=r.error,y=r.autoFocus,m=r.maxLength,_=r.resizeable,h=r.className,E=r.id,g=r.rows,S=r.flex,O=r.autosize?l.default:"textarea";return p("div",{className:(0,o.default)(s.default.inputWrapper,(e={},e[u.default.flex]=S,e))},void 0,p("div",{className:(0,o.default)(u.default.inputMaxLength,(t={},t[u.default.flex]=S,t))},void 0,p(i.default,{},void 0,p(O,{type:"text",className:(0,o.default)(s.default.inputDefault,u.default.textArea,d.default.scrollbarDefault,h,(n={},n[s.default.error]=v,n[s.default.disabled]=a,n[u.default.resizeable]=_,n)),style:{paddingRight:this.getPaddingRight()},id:E,disabled:a,placeholder:c,value:f,autoFocus:y,maxLength:m,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,rows:g})),this.renderMaxLength()),this.renderErrorMessage())},r}(a.PureComponent);y.displayName="TextArea",y.defaultProps={name:"",disabled:!1,placeholder:"",autoFocus:!1,resizeable:!1,flex:!1,autosize:!1,rows:3};var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a.forwardRef((function(t,n){return l(o.AnalyticsContext.Consumer,{},void 0,(function(r){return a.createElement(e,u({},t,{ref:n,analyticsContext:r}))}))}));return t.displayName="withAnalyticsContext("+(e.displayName||e.name||"")+")",t};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(13);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(){return(u=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}).apply(this,arguments)}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=e["aria-label"],p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","aria-label"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24","aria-label":c}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M11.383 3.07904C11.009 2.92504 10.579 3.01004 10.293 3.29604L6 8.00204H3C2.45 8.00204 2 8.45304 2 9.00204V15.002C2 15.552 2.45 16.002 3 16.002H6L10.293 20.71C10.579 20.996 11.009 21.082 11.383 20.927C11.757 20.772 12 20.407 12 20.002V4.00204C12 3.59904 11.757 3.23204 11.383 3.07904ZM14 5.00195V7.00195C16.757 7.00195 19 9.24595 19 12.002C19 14.759 16.757 17.002 14 17.002V19.002C17.86 19.002 21 15.863 21 12.002C21 8.14295 17.86 5.00195 14 5.00195ZM14 9.00195C15.654 9.00195 17 10.349 17 12.002C17 13.657 15.654 15.002 14 15.002V13.002C14.551 13.002 15 12.553 15 12.002C15 11.451 14.551 11.002 14 11.002V9.00195Z","aria-hidden":!0}))}d.displayName="Speaker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={HotspotStore:!0};Object.defineProperty(t,"HotspotStore",{enumerable:!0,get:function(){return l.default}});var a=n(395);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(1220);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i,l=(i=n(702))&&i.__esModule?i:{default:i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMAND_SENTINEL=t.REACTION_END_SENTINEL=t.REACTION_START_SENTINEL=t.EMOJI_SENTINEL=t.CHANNEL_SENTINEL=t.MENTION_SENTINEL=void 0;t.MENTION_SENTINEL="@";t.CHANNEL_SENTINEL="#";t.EMOJI_SENTINEL=":";t.REACTION_START_SENTINEL="+:";t.REACTION_END_SENTINEL=":";t.COMMAND_SENTINEL="/"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildApplicationCommands=function(e){return a.default.flatMap(e,(function(e){return(0,r.default)(null!=e.id,"Missing command id"),function e(t,n,r,a,o){if(n.hasOwnProperty("id")){if(null==(n=n).options||0===n.options.length)return[m(t,n,r,a,o)]}else if((n=n).type!==c.ApplicationCommandOptionType.SUB_COMMAND&&n.type!==c.ApplicationCommandOptionType.SUB_COMMAND_GROUP&&(null==n.options||0===n.options.length))return[m(t,n,r,a,o)];var i=[];if(null==n.options)return i;for(var l=n.options.filter((function(e){return e.type===c.ApplicationCommandOptionType.SUB_COMMAND_GROUP})),u=0;u<l.length;u++)i.push.apply(i,e(t,l[u],r,(null!=a?a:[]).concat([{name:l[u].name,type:c.ApplicationCommandOptionType.SUB_COMMAND_GROUP}]),(null!=o?o:[]).concat([u])));for(var s=n.options.filter((function(e){return e.type===c.ApplicationCommandOptionType.SUB_COMMAND})),d=0;d<s.length;d++)i.push(m(t,s[d],r,(null!=a?a:[]).concat([{name:s[d].name,type:c.ApplicationCommandOptionType.SUB_COMMAND}]),(null!=o?o:[]).concat([d])));0===l.length&&0===s.length&&i.push(m(t,n,r,a,o?o.concat([0]):void 0));return i}(e,e,e.application_id)}))},t.isSnowflake=function(e){return p.ID_REGEX.test(e.trim())},t.queryCommands=function(e,t,n,r,a,o,i,l){void 0===o&&(o=10);void 0===i&&(i=!0);void 0===l&&(l=!1);var u=[],f=a?new RegExp("^"+s.default.escape(n)+"\\s*$","i"):new RegExp("^"+s.default.escape(n),"i");if(!l&&(u=u.concat(_(t,f,e,o))).length>=o)return u.slice(0,o);var c=(0,d.getBuiltInCommands)(r,i,l);return u=u.concat(_(c,f,e,o))},t.getInteractionAuthor=function(e,t){if(null!=e.guild){var n=f.default.getGuildSection(e.guild.id,t);if(null!=n){var r;if(null!=n.bot)return[n.bot,null];var a={id:n.id,username:n.name,discriminator:"0000",avatar:null,bot:!0},o={id:n.id,name:n.name,icon:null!==(r=n.icon)&&void 0!==r?r:void 0};return[a,o]}}var i=u.default.getUser(t);if(null!=i)return[i,null];return[null,null]},t.hasAccess=function(e){if(null==e.defaultPermission)return!0;if(null!=e.permissions){var t=u.default.getCurrentUser(),n=e.permissions[t.id];if(null!=n)return n.permission;var r=l.default.getGuildId(),a=null!=r?i.default.getMember(r,t.id):null;if(null!=a){var o=null,s=[].concat(a.roles);null!=r&&s.push(r);for(var d,f=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(s);!(d=f()).done;){var c=d.value,p=e.permissions[c];if(null!=p&&(o=p.permission))break}if(null!==o)return o}}return e.defaultPermission},t.getApplicationCommandOptionQueryOptions=function(e){var t=e.type===c.ApplicationCommandOptionType.STRING,n=e.type===c.ApplicationCommandOptionType.CHANNEL,r=e.type===c.ApplicationCommandOptionType.USER||e.type===c.ApplicationCommandOptionType.MENTIONABLE,a=e.type===c.ApplicationCommandOptionType.ROLE||e.type===c.ApplicationCommandOptionType.MENTIONABLE;return{canMentionEveryone:t||a,canMentionHere:t,canMentionChannels:t||n,canMentionUsers:t||r,canMentionRoles:t||a,canMentionAnyGuildUser:r,canMentionNonMentionableRoles:a}},t.getApplicationCommandSectionName=function(e){return e.bot?e.bot.username:e.name};var r=v(n(23)),a=v(n(8)),o=n(286),i=v(n(56)),l=v(n(107)),u=v(n(12)),s=v(n(264)),d=n(8605),f=v(n(8341)),c=n(8260),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,a){var i,l,u;null!=e.permissions&&e.permissions.length>0&&(l={},null===(u=e.permissions)||void 0===u||u.forEach((function(e){l[e.id]=e})));return{version:e.version,guildId:e.guild_id,id:[e.id].concat(null!=a?a:[]).join("_"),name:[e.name].concat((null!=r?r:[]).map((function(e){return e.name}))).join(" "),applicationId:n,target:null!==(i=e.type)&&void 0!==i?i:o.ApplicationCommandTarget.CHAT,type:c.ApplicationCommandType.BOT,description:t.description,options:t.options,rootId:e.id,rootName:e.name,subCommandPath:r,defaultPermission:e.default_permission,permissions:l}}function _(e,t,n,r){var o=[];return(0,a.default)(e).forEach((function(e){t.test(e.name)&&(null==e.predicate||e.predicate(n))&&o.push(e)})),o.slice(0,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(8617));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=null,c=null,p=null,v={},y=!1;function m(){return f=null,c=null,v={},p=null,!0}var _=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getActiveCommand=function(){return f},a.getActiveOptionName=function(){return c},a.getActiveOption=function(){var e,t,n;return null!==(e=null===(t=f)||void 0===t||null===(n=t.options)||void 0===n?void 0:n.find((function(e){return e.name===c})))&&void 0!==e?e:null},a.getPreferredCommandId=function(){return p},a.getOptionStates=function(){return v},a.getOptionState=function(e){return v[e]},a.isInExperiment=function(){return y},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return m()},LOGOUT:function(e){return m()},APPLICATION_COMMAND_SET_ACTIVE_COMMAND:function(e){var t,n=e.command;if((null==n?void 0:n.id)===(null===(t=f)||void 0===t?void 0:t.id))return!1;f=n,c=null,p=null;var r={};if(null!=(null==n?void 0:n.options))for(var a,o=s(n.options);!(a=o()).done;){r[a.value.name]={isActive:!1,hasValue:!1,lastValidationResult:null}}return v=r,!0},APPLICATION_COMMAND_SET_PREFERRED_COMMAND:function(e){var t,n,r=e.commandId;return r!==p&&(null!==p||r!==(null!==(t=null===(n=f)||void 0===n?void 0:n.id)&&void 0!==t?t:null))&&(f=null,c=null,p=r,v={},!0)},APPLICATION_COMMAND_UPDATE_OPTIONS:function(e){for(var t=e.changedOptionStates,n=u({},v),r=0,a=Object.entries(t);r<a.length;r++){var o=a[r],i=o[0],l=o[1];if(i in v)if(void 0!==l.hasValue?l.hasValue:n[i].hasValue){var s=n[i];n[i]={hasValue:!0,isActive:void 0!==l.isActive?l.isActive:s.isActive,lastValidationResult:void 0!==l.lastValidationResult?l.lastValidationResult:s.lastValidationResult},void 0!==l.isActive&&(l.isActive?(null!=c&&(n[c]=u({},n[c]),n[c].isActive=!1),c=i):i===c&&(c=null))}else n[i]={hasValue:!1,isActive:!1,lastValidationResult:null},c===i&&(c=null)}return v=n,!0}});o.default.subscribe({},(function(e){y!==e.allowSlashCommands&&(y=e.allowSlashCommands,_.emitChange())}));var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutocompleteSelectionTypes=t.AutocompleteOptionTypes=t.SelectType=t.CommandMode=t.ChannelMentionMode=t.RoleMentionMode=t.UserMentionMode=t.GlobalMentionMode=t.LAYER_VERTICAL_BUFFER=t.LAYER_MAX_HEIGHT=t.DEFAULT_MAX_HEIGHT=t.MAX_COMMAND_AUTOCOMPLETE_RESULTS=void 0;t.MAX_COMMAND_AUTOCOMPLETE_RESULTS=7;t.DEFAULT_MAX_HEIGHT=490;t.LAYER_MAX_HEIGHT=200;var r,a,o,i,l,u,s,d;t.LAYER_VERTICAL_BUFFER=20,t.GlobalMentionMode=r,function(e){e[e.DENY=0]="DENY",e[e.ALLOW_EVERYONE=1]="ALLOW_EVERYONE",e[e.ALLOW_EVERYONE_OR_HERE=2]="ALLOW_EVERYONE_OR_HERE"}(r||(t.GlobalMentionMode=r={})),t.UserMentionMode=a,function(e){e[e.DENY=0]="DENY",e[e.ALLOW_CHANNEL=1]="ALLOW_CHANNEL",e[e.ALLOW_GUILD=2]="ALLOW_GUILD"}(a||(t.UserMentionMode=a={})),t.RoleMentionMode=o,function(e){e[e.DENY=0]="DENY",e[e.ALLOW_MENTIONABLE=1]="ALLOW_MENTIONABLE",e[e.ALLOW_ALL=2]="ALLOW_ALL"}(o||(t.RoleMentionMode=o={})),t.ChannelMentionMode=i,function(e){e[e.DENY=0]="DENY",e[e.ALLOW_SELECTABLE=1]="ALLOW_SELECTABLE"}(i||(t.ChannelMentionMode=i={})),t.CommandMode=l,function(e){e[e.DISABLED=0]="DISABLED",e[e.OLD_BUILT_INS=1]="OLD_BUILT_INS",e[e.NEW_TEXT_ONLY=2]="NEW_TEXT_ONLY",e[e.NEW=3]="NEW"}(l||(t.CommandMode=l={})),t.SelectType=u,function(e){e[e.INSERT=0]="INSERT",e[e.SEND=1]="SEND"}(u||(t.SelectType=u={})),t.AutocompleteOptionTypes=s,function(e){e.MENTIONS="MENTIONS",e.CHANNELS="CHANNELS",e.EMOJIS_AND_STICKERS="EMOJIS_AND_STICKERS",e.REACTIONS="REACTIONS",e.GIFS="GIFS",e.LEGACY_COMMANDS="LEGACY_COMMANDS",e.COMMANDS="COMMANDS",e.CHOICES="CHOICES"}(s||(t.AutocompleteOptionTypes=s={})),t.AutocompleteSelectionTypes=d,function(e){e.MENTION="MENTION",e.CHANNEL="CHANNEL",e.EMOJI="EMOJI",e.STICKER="STICKER",e.REACTION="REACTION",e.GIF="GIF",e.COMMAND="COMMAND",e.COMMAND_SUGGESTION="COMMAND_SUGGESTION",e.CHOICE="CHOICE",e.EMOJI_UPSELL="EMOJI_UPSELL"}(d||(t.AutocompleteSelectionTypes=d={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Caret=t.Divider=t.Icon=t.Title=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=n(88),l=p(n(61)),u=p(n(149)),s=p(n(5950)),d=p(n(47)),f=p(n(248)),c=p(n(7639));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.className,n=e.children,r=e.onContextMenu,a=e.onClick,i=e.muted,l=void 0!==i&&i;return y(d.default,{className:(0,o.default)(t,c.default.title),size:d.default.Sizes.SIZE_16,muted:l,onContextMenu:r,onClick:a},void 0,n)};t.Title=m,m.displayName="Title";var _=function(e){var t=e.className,n=e.iconClassName,r=e.children,a=e.selected,i=void 0!==a&&a,s=e.disabled,d=void 0!==s&&s,p=e.showBadge,v=void 0!==p&&p,m=e.color,_=e.foreground,h=e.background,E=e.icon,g=e.onClick,S=e.onContextMenu,O=e.tooltip,I=void 0===O?null:O,T=e.tooltipColor,C=e.tooltipPosition,b=void 0===C?u.default.Positions.BOTTOM:C,M=e.hideOnClick,N=void 0===M||M,A=e.role,P=e["aria-label"],R=e["aria-hidden"],L=e["aria-checked"],D=y(E,{x:0,y:0,width:24,height:24,className:(0,o.default)(n,c.default.icon),foreground:null!=_?_:void 0,background:null!=h?h:void 0,color:m}),w=P;return null==w&&"string"==typeof I&&(w=I),y(u.default,{text:I,color:T,position:b,hideOnClick:N},void 0,(function(e){var n,a=e.onMouseEnter,u=e.onMouseLeave,s=e.onFocus,p=e.onBlur;return y(l.default,{tag:"div",onClick:d?void 0:g,onContextMenu:d?void 0:S,onMouseEnter:a,onMouseLeave:u,onFocus:s,onBlur:p,className:(0,o.default)(t,(n={},n[c.default.iconWrapper]=!0,n[c.default.clickable]=!d&&null!=g,n[c.default.selected]=i,n)),role:A,"aria-label":w,"aria-hidden":R,"aria-checked":L,tabIndex:d||null==g?-1:0},void 0,v?y(f.default,{mask:f.default.Masks.HEADER_BAR_BADGE},void 0,D):D,v?y("span",{className:c.default.iconBadge}):null,r)}))};t.Icon=_,_.displayName="Icon";var h=function(e){var t=e.className;return y("div",{className:(0,o.default)(c.default.divider,t)})};t.Divider=h,h.displayName="Divider";var E=function(){return y(s.default,{className:c.default.caret})};t.Caret=E,E.displayName="Caret";var g=function(e){var t,n=e.className,r=e.children,l=e.toolbar,u=e.onDoubleClick,s=e["aria-label"],d=e.transparent,f=void 0!==d&&d,p=a.useRef(null);return a.createElement("section",{className:(0,o.default)(n,c.default.container,(t={},t[c.default.themed]=!f,t[c.default.transparent]=f,t)),"aria-label":s,ref:p},y(i.FocusRingScope,{containerRef:p},void 0,y("div",{className:c.default.children,onDoubleClick:u},void 0,r),null!=l?y("div",{className:c.default.toolbar},void 0,l):null))};g.displayName="HeaderBar",g.Icon=_,g.Title=m,g.Divider=h,g.Caret=E;var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InviteRow=void 0;var r,a=fe(n(0)),o=se(n(9)),i=se(n(8)),l=n(95),u=fe(n(3)),s=n(57),d=se(n(1211)),f=n(9630),c=se(n(1296)),p=se(n(8297)),v=se(n(8551)),y=fe(n(9631)),m=n(5937),_=n(180),h=n(1148),E=n(726),g=n(481),S=se(n(1258)),O=se(n(81)),I=se(n(163)),T=fe(n(8731)),C=se(n(10)),b=se(n(86)),M=se(n(8521)),N=se(n(9632)),A=se(n(40)),P=se(n(256)),R=se(n(70)),L=se(n(36)),D=se(n(107)),w=se(n(160)),j=se(n(39)),k=se(n(12)),U=se(n(365)),G=se(n(271)),F=se(n(29)),B=se(n(61)),H=n(8302),x=se(n(55)),V=se(n(1159)),W=se(n(8267)),Y=se(n(153)),z=se(n(149)),K=n(131),$=se(n(8367)),Z=n(35),q=fe(n(279)),X=se(n(24)),J=se(n(13)),Q=fe(n(8286)),ee=n(1163),te=n(1),ne=se(n(6)),re=se(n(7612)),ae=se(n(1170)),oe=se(n(370)),ie=se(n(7373)),le=se(n(1244)),ue=se(n(9633));function se(e){return e&&e.__esModule?e:{default:e}}function de(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return de=function(){return e},e}function fe(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=de();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ce(){return(ce=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}).apply(this,arguments)}function pe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ve(e,t)}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var me=Q.default.getMaxAgeOptions,_e=Q.default.getMaxUsesOptions,he=Q.default.INVITE_OPTIONS_FOREVER,Ee=Q.default.INVITE_OPTIONS_7_DAYS,ge=Q.default.INVITE_OPTIONS_UNLIMITED,Se=(0,h.registerUserExperiment)({id:h.Experiments.INVITE_EMPTY_STATE_IMAGES,title:"Invite Empty State image swap",description:["Adds new images when the user has no invite suggestions","Control: no image","Treatment 1: high five art","Treatment 2: envelope art"],buckets:[h.ExperimentBuckets.CONTROL,h.ExperimentBuckets.TREATMENT_1,h.ExperimentBuckets.TREATMENT_2]});function Oe(){switch((0,h.useAndTrackExposureToUserExperiment)(Se)){case h.ExperimentBuckets.TREATMENT_1:return ye("div",{className:(0,o.default)(re.default.inviteNoResultsImage,re.default.highFive)});case h.ExperimentBuckets.TREATMENT_2:return ye("div",{className:(0,o.default)(re.default.inviteNoResultsImage,re.default.envolope)});default:return null}}var Ie=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={sending:!1,invited:!1,hovered:!1},t.handleMouseEnter=function(){t.setState({hovered:!0})},t.handleMouseLeave=function(){t.setState({hovered:!1})},t.handleClickInvite=function(){var e,n=t.props,r=n.user,a=n.channel,o=n.location,i=n.code,l=n.row;if(null!=i){var u,s={code:i,location:o,suggested:null!==(e=null!=l?N.default.getSelectedInviteMetadata(l):null)&&void 0!==e?e:null};null!=a?u=ce({type:y.InvitePropertiesType.GROUP_DM,channel:a},s):null!=r&&(u=ce({type:y.InvitePropertiesType.USER,user:r},s)),null!=u&&(t.setState({sending:!0}),y.default.enqueue(u,(function(e){t.setState({sending:!1,invited:e})})))}},t}pe(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t){return this.state.sending!==t.sending||this.state.invited!==t.invited||this.state.hovered!==t.hovered||this.props.user!==e.user||this.props.channel!==e.channel},n.renderUserOrChannel=function(){var e,t,n=this.props,r=n.user,a=n.channel;return null!=r?(e=r.getAvatarURL(null==a?void 0:a.guild_id),t=r.username):null!=a&&(e=(0,m.getChannelIconURL)(a),t=(0,_.computeChannelName)(a,k.default,R.default)),null==e||null==t?null:ye(q.default,{src:e,"aria-label":t,size:q.Sizes.SIZE_32,className:re.default.inviteRowAvatar})},n.render=function(){var e,t=this.props,n=t.user,r=t.channel,a=this.state,o=a.sending,i=a.invited,l=a.hovered;return e=i?ye(F.default,{look:F.default.Looks.LINK,size:F.default.Sizes.SMALL,disabled:!0,color:j.default.theme===te.ThemeTypes.DARK?F.default.Colors.WHITE:F.default.Colors.BLACK},void 0,ne.default.Messages.INVITE_FRIEND_MODAL_SENT):ye(F.default,{color:F.default.Colors.GREEN,look:l?F.default.Looks.FILLED:F.default.Looks.OUTLINED,className:re.default.inviteRowButton,size:F.default.Sizes.SMALL,submitting:o,onClick:this.handleClickInvite},void 0,ne.default.Messages.INVITE_FRIEND_MODAL_INVITE),ye("div",{className:re.default.inviteRow,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},void 0,ye("div",{className:re.default.inviteRowInfo},void 0,this.renderUserOrChannel(),ye("div",{className:re.default.inviteRowName},void 0,null!=n?n.toString():null,null!=r?(0,_.computeChannelName)(r,k.default,R.default):null)),e)},t}(a.Component);t.InviteRow=Ie,Ie.displayName="InviteRow";var Te=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={focused:!1,copied:!1},t._unsetCopiedState=new s.DelayedCall(1e3,(function(){return t.setState({copied:!1})})),t.handleCopy=function(){var e=t.props,n=e.value,r=e.onCopy;t.setState({copied:!0}),t._unsetCopiedState.delay(),r(n)},t}pe(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this._unsetCopiedState.cancel()},n.render=function(){var e,t=this,n=this.props,r=n.value,a=n.autoFocus,i=n.hideValue,l=this.state,u=l.focused,s=l.copied;return ye("div",{className:(0,o.default)(le.default.input,ae.default.flexJustifyBetween,ae.default.flexCenter,(e={},e[le.default.success]=s,e[le.default.focused]=u,e))},void 0,ye(Y.default,{className:re.default.copyInput,name:"invite",value:i?ne.default.Messages.INSTANT_INVITE_HIDDEN:r,editable:!1,inputClassName:re.default.noBorder,autoFocus:a,onFocus:function(){return a?t.setState({focused:!0}):null},onBlur:function(){return a?t.setState({focused:!1}):null},spellCheck:"false",onClick:function(e){return e.currentTarget.select()}}),ee.SUPPORTS_COPY?ye(F.default,{size:F.default.Sizes.SMALL,color:s?F.default.Colors.GREEN:F.default.Colors.BRAND,className:re.default.copyButton,onClick:this.handleCopy},void 0,s?ne.default.Messages.INVITE_COPIED:ne.default.Messages.COPY):null)},t}(a.PureComponent);Te.displayName="InviteCopyInput";var Ce=u.default.connectStores([w.default],(function(){return{hideValue:w.default.hideInstantInvites}}))(Te),be=ye(v.default,{}),Me=ye(Oe,{}),Ne=function(e){function t(t){var n;(n=e.call(this,t)||this)._scroller=null,n._headerId=i.default.uniqueId(),n.handleGenerateNewLink=function(){var e=n.props,t=e.channel,r=e.source,a=null!=t?t.id:L.default.getChannelId();null!=a&&d.default.createInvite(a,{max_age:n.state.maxAge,max_uses:n.state.maxUses,temporary:n.state.temporary},r),n.state.maxAge===he.value||n.state.savedMaxAge===he.value?n.setState({settingsOpen:!1}):n.setState({settingsOpen:!1,savedMaxAge:he.value})},n.handleCopy=function(e){var t=n.props,r=t.channel,a=t.source,o=t.code;(0,ee.copy)(e);var i,l=null!=r?r.id:L.default.getChannelId();if(null!=r)i=r.type;else{var u=C.default.getChannel(l);null!=u&&(i=u.type)}J.default.track(te.AnalyticEvents.COPY_INSTANT_INVITE,{server:D.default.getGuildId(),channel:l,channel_type:i,location:a,code:o})},n.openSettings=function(){n.setState({settingsOpen:!0})},n.handleSelectMaxAge=function(e){n.setState({maxAge:parseInt(e.value,10),savedMaxAge:n.state.maxAge})},n.handleSelectMaxUses=function(e){n.setState({maxUses:parseInt(e.value,10)})},n.handleToggleTemporary=function(e){n.setState({temporary:e})},n.handleQueryChange=function(e){var t;null===(t=n._scroller)||void 0===t||t.scrollTo({to:0}),(0,f.searchInviteSuggestions)(e),n.setState({query:e})},n.handleClearSearch=function(){n.handleQueryChange("")},n.handleToggleMaxAge=function(){n.setState({maxAge:n.state.savedMaxAge,savedMaxAge:n.state.maxAge},n.handleGenerateNewLink)},n.handleDone=function(){var e=n.props,t=e.onDone,r=e.onClose;n.state.settingsOpen?n.setState({settingsOpen:!1}):r(),null==t||t()},n.getRowHeight=function(e,t){if(e>0)return 0;switch(n.props.rows[t].type){case Q.RowTypes.GROUP_DM:case Q.RowTypes.DM:case Q.RowTypes.FRIEND:return 44;default:return 0}},n.renderRow=function(e){var t=e.section,r=e.row;if(t>0)return null;var a=n.props.analyticsLocation,o=n.getInviteCode(),i=n.props.rows[r],l=i.type+"-"+i.item.id;switch(i.type){case Q.RowTypes.GROUP_DM:return ye(Ie,{row:i,channel:i.item,code:o,location:a},l);case Q.RowTypes.DM:case Q.RowTypes.FRIEND:return ye(Ie,{row:i,user:i.item,code:o,location:a},l);default:return null}};var r=t.maxAge,a=t.maxUses,o=t.temporary,l=t.forceSettings,u=t.guild.hasFeature(te.GuildFeatures.HUB)?he:Ee;return n.state={query:"",settingsOpen:!0===l,maxAge:null!=r?r:u.value,savedMaxAge:r===he.value?u.value:he.value,maxUses:a||ge.value,temporary:o||!1},n}pe(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.channel,n=e.code,r=e.guild,a=e.source,o=e.canCreateInvites,i=e.analyticsLocation,l=e.streamUserId,u=e.targetType,s=e.targetUserId,f=e.applicationId,c=e.initialCounts,p=e.rows,v=e.showFriends,y=this.state,m=y.maxAge,_=y.maxUses,h=y.temporary;if(o){var g=null!=t?t.id:L.default.getChannelId();if(null==g)return;d.default.createInvite(g,{validate:n||null,max_age:m,max_uses:_,target_user_id:s,target_type:u,target_application_id:f,temporary:h},a)}if(v&&J.default.track(te.AnalyticEvents.INVITE_SUGGESTION_OPENED,{location:a,num_suggestions:p.length,num_friends:c.numFriends,num_dms:c.numDms,num_group_dms:c.numGroupDms,guild_id:r.id}),null!=l){var S=I.default.getStreamForUser(l),O=(0,E.getStreamerApplication)(S,P.default);J.default.track(te.AnalyticEvents.OPEN_MODAL,{type:"Send Stream Invite",source:a,location:i,other_user_id:l,application_id:null!=O?O.id:null,application_name:null!=O?O.name:null,game_id:null!=O?O.id:null})}else null!=f||J.default.track(te.AnalyticEvents.OPEN_MODAL,{type:"Instant Invite Modal",source:a,location:i})},n.getInviteCode=function(){var e=this.props,t=e.code,n=e.vanityURLCode;return t||n},n.renderCopyInput=function(){var e=this.props,t=e.noInvitesAvailable,n=e.showFriends,r=this.state,i=r.maxAge,l=r.maxUses,u=(0,S.default)(this.getInviteCode()||"");return ye(a.Fragment,{},void 0,ye(Ce,{value:u,autoFocus:n,onCopy:this.handleCopy}),t?null:ye(X.default,{size:X.default.Sizes.SIZE_12,className:(0,o.default)(oe.default.marginTop8,re.default.footerText)},void 0,(0,Q.maxAgeString)(i,l)," ",n?ye(G.default,{onClick:this.openSettings},void 0,ne.default.Messages.INVITE_EDIT_LINK):null))},n.renderHeader=function(){var e,t=this.props,n=t.guild,r=t.showFriends,o=t.streamUserId,i=t.applicationId,l=t.welcomeToServer,u=t.channel,s=this.state,d=s.query,f=s.settingsOpen,c=null;return e=l?null:null!=o?ne.default.Messages.INVITE_STREAM_HEADER:null!=i?ne.default.Messages.EMBEDDED_ACTIVITIES_INVITE_TO_ACTIVITY:(null==u?void 0:u.isGuildStageVoice())?ne.default.Messages.STAGE_CHANNEL_INVITE_TO_STAGE_MODAL_HEADER:ne.default.Messages.GROUP_DM_INVITE_WITH_NAME.format({groupname:n.toString()}),c=f?ye(K.FormTitle,{id:this._headerId,tag:K.FormTitle.Tags.H2,className:oe.default.marginReset},void 0,ne.default.Messages.INVITE_SETTINGS_TITLE):r?ye("div",{className:re.default.header},void 0,ye(K.FormTitle,{id:this._headerId,tag:K.FormTitle.Tags.H2,className:oe.default.marginBottom8},void 0,e),ye(p.default,{query:d,className:oe.default.marginTop4,onQueryChange:this.handleQueryChange,placeholder:ne.default.Messages.INVITE_SEARCH_FOR_FRIENDS,autoFocus:!0,onClear:this.handleClearSearch})):ye(K.FormTitle,{id:this._headerId,tag:K.FormTitle.Tags.H2,className:oe.default.marginReset},void 0,e),ye(Z.ModalHeader,{separator:r&&!f},void 0,ye(Z.ModalCloseButton,{className:re.default.closeButton,onClick:this.handleDone}),ye("div",{className:re.default.headerContainer},void 0,l&&!f&&a.createElement(a.Fragment,null,ye("img",{className:re.default.welcomeImage,src:ue.default,alt:""}),ye("h1",{className:re.default.welcomeHeading},void 0,ne.default.Messages.INVITE_WELCOME_HEADING),ye("p",{className:re.default.welcomeSubheading},void 0,ne.default.Messages.INVITE_WELCOME_SUBHEADING)),null!=o?be:null,c))},n.renderSettingsBody=function(){var e=this.state,t=e.maxAge,n=e.maxUses,r=e.temporary,a=me.find((function(e){return e.value===t})),i=_e.find((function(e){return e.value===n}));return ye(Z.ModalContent,{className:re.default.settingsContent},void 0,ye("form",{onSubmit:this.handleGenerateNewLink},void 0,ye(K.FormItem,{title:ne.default.Messages.EXPIRE_AFTER,className:oe.default.marginTop20},void 0,ye(V.default,{value:a,clearable:!1,searchable:!1,options:me,onChange:this.handleSelectMaxAge})),ye(K.FormItem,{title:ne.default.Messages.MAX_NUMBER_OF_USES,className:(0,o.default)(oe.default.marginTop20,oe.default.marginBottom4)},void 0,ye(V.default,{value:i,clearable:!1,searchable:!1,options:_e,onChange:this.handleSelectMaxUses})),ye(K.FormItem,{className:(0,o.default)(oe.default.marginTop20,re.default.switch)},void 0,ye(W.default,{value:r,onChange:this.handleToggleTemporary,note:ne.default.Messages.TEMPORARY_MEMBERSHIP_EXPLANATION,hideBorder:!0},void 0,ye(X.default,{},void 0,ne.default.Messages.GRANT_TEMPORARY_MEMBERSHIP)))))},n.renderFriendsBody=function(){var e,t=this.props.rows,n=this.getInviteCode();return 0===t.length?e=ne.default.Messages.INVITE_FRIEND_MODAL_NO_RESULTS:null==n&&(e=ne.default.Messages.INVITE_FRIEND_MODAL_LOADING),null!=e?ye(Z.ModalContent,{className:(0,o.default)(oe.default.marginBottom20,oe.default.marginTop20)},void 0,ye(H.EmptyStateText,{},void 0,e)):ye(Z.ModalListContent,{className:re.default.scroller,sections:[t.length],renderSection:this.renderSection,sectionHeight:0,renderRow:this.renderRow,rowHeight:this.getRowHeight,paddingBottom:16})},n.renderSection=function(){return null},n.renderBody=function(){var e=this.props,t=e.guild,n=e.showFriends,r=e.streamUserId,a=e.applicationId;if(this.state.settingsOpen)return this.renderSettingsBody();if(n)return this.renderFriendsBody();var o=k.default.getCurrentUser(),i=t.isOwner(o)?ne.default.Messages.INVITE_SHARE_LINK_OWN_SERVER:ne.default.Messages.SHARE_INVITE_LINK_FOR_ACCESS;return null!=r?i=ne.default.Messages.INVITE_SHARE_LINK_TO_STREAM:null!=a&&(i=ne.default.Messages.EMBEDDED_ACTIVITIES_SHARE_LINK_TO_ACTIVITY),ye(Z.ModalContent,{className:re.default.noScroll},void 0,ye(x.default,{direction:x.default.Direction.VERTICAL,className:oe.default.marginBottom20},void 0,Me,ye(X.default,{className:re.default.subText},void 0,i),this.renderCopyInput()))},n.renderFooter=function(){var e,t=this,n=this.props,r=n.noInvitesAvailable,i=n.showFriends,l=n.streamUserId,u=n.applicationId,s=n.channel,d=this.state,f=d.settingsOpen,p=d.maxAge,v=j.default.theme,y=null;if(f)y=ye(a.Fragment,{},void 0,ye(F.default,{onClick:this.handleGenerateNewLink},void 0,ne.default.Messages.GENERATE_A_NEW_LINK),ye(F.default,{look:F.default.Looks.LINK,color:v===te.ThemeTypes.LIGHT?F.default.Colors.PRIMARY:F.default.Colors.WHITE,onClick:this.handleDone},void 0,ne.default.Messages.CANCEL));else if(i){var m=ne.default.Messages.INVITE_FOOTER_LINK_HEADER;null!=l?m=ne.default.Messages.INVITE_STREAM_FOOTER_LINK_HEADER:null!=u?m=ne.default.Messages.EMBEDDED_ACTIVITIES_INVITE_ACTIVITY_FOOTER_LINK_HEADER:(null==s?void 0:s.isGuildStageVoice())&&(m=ne.default.Messages.STAGE_CHANNEL_INVITE_TO_STAGE_MODAL_FOOTER),y=ye(x.default,{direction:x.default.Direction.VERTICAL,className:re.default.content},void 0,ye(K.FormTitle,{tag:K.FormTitle.Tags.H5,className:oe.default.marginBottom8},void 0,m),this.renderCopyInput())}else r||(y=ye(x.default,{justify:x.default.Justify.BETWEEN,className:oe.default.marginTop20},void 0,ye(c.default,{checked:p===he.value,onChange:this.handleToggleMaxAge},void 0,ye(X.default,{className:re.default.checkBoxLabel},void 0,ne.default.Messages.SET_INVITE_LINK_NEVER_EXPIRE)),ye(z.default,{text:ne.default.Messages.LINK_SETTINGS},void 0,(function(e){var n=e.onMouseEnter,r=e.onMouseLeave;return ye(B.default,{onClick:t.openSettings,onMouseEnter:n,onMouseLeave:r,className:ie.default.cursorPointer},void 0,ye($.default,{width:18,height:18,color:te.Colors.PRIMARY_DARK_400}))}))));return null!=y?ye(Z.ModalFooter,{className:f?re.default.settingsFooter:(0,o.default)((e={},e[re.default.noPadding]=!i,e[re.default.footer]=i,e))},void 0,y):null},n.render=function(){var e=this.props,t=e.transitionState,n=e.channel,r=e.guild;return ye("div",{className:this.props.showFriends?re.default.wrapper:void 0},void 0,ye(Z.ModalRoot,{impressionName:l.ImpressionNames.GUILD_INVITE,impressionMetadata:{invite_channel_id:null==n?void 0:n.id,invite_guild_id:r.id},"aria-labelledby":this._headerId,transitionState:t,className:re.default.modal},void 0,this.renderHeader(),this.renderBody(),this.renderFooter()))},t}(a.PureComponent);Ne.displayName="InstantInviteModal",Ne.defaultProps={analyticsLocation:te.AnalyticsLocations.GUILD_CREATE_INVITE_SUGGESTION};var Ae=a.forwardRef((function(e,t){var n=e.channel,r=e.guild,o=e.source,i=e.streamUserId,l=e.applicationId,s=e.transitionState,d=e.onClose,c=e.welcomeToServer,p=e.forceSettings,v=e.analyticsLocation,y=(0,u.useStateFromStores)([L.default,C.default,b.default],(function(){var e;return null!=n?n:null!==(e=C.default.getChannel(L.default.getChannelId()))&&void 0!==e?e:b.default.getDefaultChannel(r.id)}),[n,r.id]),m=null;null!=i?m=g.InviteTargetTypes.STREAM:null!=l&&(m=g.InviteTargetTypes.EMBEDDED_APPLICATION);var _=i,h=l,E=null!=n?n.getGuildId():null!=r?r.id:null,S=(0,u.useStateFromStoresArray)([N.default,M.default,U.default,T.default],(function(){var e=null!=y?y.id:null;return[N.default.getInviteSuggestionRows(),N.default.getTotalSuggestionsCount()>=1,N.default.getInitialCounts(),null!=e?M.default.getInvite(e,{targetType:m,targetUserId:_,targetApplicationId:h}):null,null!=n&&null!=y?U.default.getVoiceStatesForChannel(y):null,null!=E?T.default.getProps(E,e):null]}),[y,m,_,E]),I=S[0],P=S[1],R=S[2],D=S[3],w=S[4],j=S[5],k=(0,u.useStateFromStores)([A.default],(function(){return null!=y&&A.default.can(te.Permissions.CREATE_INSTANT_INVITE,y)}),[y]),G=null===D||!k,F=a.useState((function(){var e=new Set;return null!=i&&null!=w?w.forEach((function(t){var n=t.user;e.add(n.id)})):null!=E&&null!=j&&j.rows.forEach((function(t){t.type===T.MemberListRowTypes.MEMBER&&e.add(t.userId)})),e}))[0],B=null==n?void 0:n.id,H=(0,u.useStateFromStores)([O.default],(function(){return O.default.getStageInstanceByChannel(B)}),[B]);a.useEffect((function(){(0,f.loadInviteSuggestions)(F,r,n).catch(te.NOOP_NULL)}),[F,n,r]);var x=null!=D?D.code:void 0,V=null!=D?D.maxAge:void 0,W=null!=D?D.maxUses:void 0,Y=null!=D?D.temporary:void 0,z=G?r.vanityURLCode:null;return k||null==(null==H?void 0:H.invite_code)||(x=H.invite_code),a.createElement(Ne,{ref:t,canCreateInvites:k,noInvitesAvailable:G,channel:n,guild:r,streamUserId:i,vanityURLCode:z,targetType:m,targetUserId:_,applicationId:l,rows:I,showFriends:P,initialCounts:R,code:x,maxAge:V,maxUses:W,temporary:Y,source:o,welcomeToServer:c,forceSettings:p,analyticsLocation:v,transitionState:s,onClose:d})}));t.default=Ae},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canViewInviteModal=function(e,t,n,r){var a=n||t;return null!=a&&e.can(p.Permissions.CREATE_INSTANT_INVITE,a)||null!=t&&null!=t.vanityURLCode||null!=(null==r?void 0:r.invite_code)},t.generateRowsForQuery=function(e,t,n,r,a){var o=new Set,v=[],y={numFriends:0,numDms:0,numGroupDms:0};if(""===e){if(n)for(var _,E=m(n);!(_=E()).done;){var g=_.value;if(null!=r&&r>0&&v.length>=r)break;if(!t.has(g)){var S=d.default.getUser(g);null==S||null!=a&&l.default.isMember(a,S.id)||(o.add(S.id),v.push({type:h.FRIEND,item:S,isSuggested:!0}),y.numFriends++)}}for(var O,I=m(f.default.getPrivateChannelIds());!(O=I()).done;){var T=O.value;if(null!=r&&r>0&&v.length>=r)break;var C=i.default.getChannel(T);if(null!=C)if(C.type!==p.ChannelTypes.GROUP_DM){if(null!=u.default.lastMessageId(C.id)){var b=C.getRecipientId();if(null!=b&&!t.has(b)&&!o.has(b)){var M=d.default.getUser(b);if(null==M||M.bot||null!=a&&l.default.isMember(a,M.id))continue;o.add(M.id),v.push({type:h.DM,item:M,isSuggested:!1}),y.numDms++}}}else v.push({type:h.GROUP_DM,item:C,isSuggested:!1}),y.numGroupDms++}for(var N,A=m(s.default.getFriendIDs());!(N=A()).done;){var P=N.value;if(null!=r&&r>0&&v.length>=r)break;if(!t.has(P)&&!o.has(P)){var R=d.default.getUser(P);null==R||null!=a&&l.default.isMember(a,R.id)||(v.push({type:h.FRIEND,item:R,isSuggested:!1}),y.numFriends++)}}}else c.default.queryDMUsers(e,50,!1).forEach((function(e){var n=e.user;if(!t.has(n.id)){var r=i.default.getDMFromUserId(n.id);if(null!=r)null!=u.default.lastMessageId(r)&&(o.add(n.id),v.push({type:h.DM,item:n,isSuggested:!1}),y.numDms++)}})),c.default.queryGroupDMs(e,50,!1).forEach((function(e){var t=e.channel;v.push({type:h.GROUP_DM,item:t,isSuggested:!1}),y.numGroupDms++})),c.default.queryFriends(e,500,!1).forEach((function(e){var n=e.user;t.has(n.id)||o.has(n.id)||(v.push({type:h.FRIEND,item:n,isSuggested:!1}),y.numFriends++)}));return{rows:v,counts:y}},t.getMostRecentDMedUser=function(e,t){for(var n,r=m(f.default.getPrivateChannelIds());!(n=r()).done;){var a=n.value,o=i.default.getChannel(a);if(null!=o&&o.type===p.ChannelTypes.DM&&null!=u.default.lastMessageId(o.id)){var s=o.getRecipientId();if(null!=s&&!e.has(s)){var c=d.default.getUser(s);if(null==c||c.bot||null!=t&&l.default.isMember(t,c.id))continue;return c}}}return null},t.maxAgeString=function(e,t){var n=parseInt(t,10),r=0===n,a=I[e].value;switch(I[e].type){case E:return r?v.default.Messages.INVITE_EXPIRES_MINUTES:v.default.Messages.INVITE_EXPIRES_MINUTES_OR_USES.format({numUses:n});case g:return r?v.default.Messages.INVITE_EXPIRES_HOURS.format({numHours:a}):v.default.Messages.INVITE_EXPIRES_HOURS_OR_USES.format({numHours:a,numUses:n});case S:return r?v.default.Messages.INVITE_EXPIRES_DAYS_PLURAL.format({numDays:a}):v.default.Messages.INVITE_EXPIRES_DAYS_OR_USES_PLURAL.format({numDays:a,numUses:n});case O:return r?v.default.Messages.INVITE_EXPIRES_NEVER:v.default.Messages.INVITE_EXPIRES_USES.format({numUses:n});default:return""}},t.urgentShareMessageString=function(e,t){if(null==e)return v.default.Messages.INVITE_MESSAGE_PLACEHOLDER.format({link:t});var n=I[e].value;switch(I[e].type){case E:return v.default.Messages.INVITE_URGENT_MINUTES_PLACEHOLDER.format({numMinutes:n,link:t});case g:return v.default.Messages.INVITE_URGENT_HOURS_MESSAGE_PLACEHOLDER.format({numHours:n,link:t});case S:return v.default.Messages.INVITE_URGENT_DAYS_MESSAGE_PLACEHOLDER.format({numDays:n,link:t});default:return v.default.Messages.INVITE_MESSAGE_PLACEHOLDER.format({link:t})}},t.default=t.RowTypes=void 0;var r,a,o=y(n(133)),i=y(n(10)),l=y(n(56)),u=y(n(200)),s=y(n(70)),d=y(n(12)),f=y(n(699)),c=y(n(697)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}a=n(9368);var h=(0,o.default)({GROUP_DM:null,DM:null,FRIEND:null});t.RowTypes=h;var E="minutes",g="hours",S="days",O="never",I=((r={})[a.INVITE_OPTIONS_30_MINUTES.value]={value:30,type:E},r[a.INVITE_OPTIONS_1_HOUR.value]={value:1,type:g},r[a.INVITE_OPTIONS_6_HOURS.value]={value:6,type:g},r[a.INVITE_OPTIONS_12_HOURS.value]={value:12,type:g},r[a.INVITE_OPTIONS_1_DAY.value]={value:1,type:S},r[a.INVITE_OPTIONS_7_DAYS.value]={value:7,type:S},r[a.INVITE_OPTIONS_FOREVER.value]={value:0,type:O},r);var T={getMaxAgeOptions:a.MAX_AGE_OPTIONS,getMaxUsesOptions:a.MAX_USES_OPTIONS,INVITE_OPTIONS_FOREVER:a.INVITE_OPTIONS_FOREVER,INVITE_OPTIONS_1_DAY:a.INVITE_OPTIONS_1_DAY,INVITE_OPTIONS_7_DAYS:a.INVITE_OPTIONS_7_DAYS,INVITE_OPTIONS_12_HOURS:a.INVITE_OPTIONS_12_HOURS,INVITE_OPTIONS_6_HOURS:a.INVITE_OPTIONS_6_HOURS,INVITE_OPTIONS_1_HOUR:a.INVITE_OPTIONS_1_HOUR,INVITE_OPTIONS_30_MINUTES:a.INVITE_OPTIONS_30_MINUTES,INVITE_OPTIONS_UNLIMITED:a.INVITE_OPTIONS_UNLIMITED,INVITE_OPTIONS_ONCE:a.INVITE_OPTIONS_ONCE,INVITE_OPTIONS_5_TIMES:a.INVITE_OPTIONS_5_TIMES,INVITE_OPTIONS_10_TIMES:a.INVITE_OPTIONS_10_TIMES,INVITE_OPTIONS_25_TIMES:a.INVITE_OPTIONS_25_TIMES,INVITE_OPTIONS_50_TIMES:a.INVITE_OPTIONS_50_TIMES,INVITE_OPTIONS_100_TIMES:a.INVITE_OPTIONS_100_TIMES};t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,d:"M5.43309 21C5.35842 21 5.30189 20.9325 5.31494 20.859L5.99991 17H2.14274C2.06819 17 2.01168 16.9327 2.02453 16.8593L2.33253 15.0993C2.34258 15.0419 2.39244 15 2.45074 15H6.34991L7.40991 9H3.55274C3.47819 9 3.42168 8.93274 3.43453 8.85931L3.74253 7.09931C3.75258 7.04189 3.80244 7 3.86074 7H7.75991L8.45234 3.09903C8.46251 3.04174 8.51231 3 8.57049 3H10.3267C10.4014 3 10.4579 3.06746 10.4449 3.14097L9.75991 7H15.7599L16.4523 3.09903C16.4625 3.04174 16.5123 3 16.5705 3H18.3267C18.4014 3 18.4579 3.06746 18.4449 3.14097L17.7599 7H21.6171C21.6916 7 21.7481 7.06725 21.7353 7.14069L21.4273 8.90069C21.4172 8.95811 21.3674 9 21.3091 9H17.4099L17.0495 11.04H15.05L15.4104 9H9.41035L8.35035 15H10.5599V17H7.99991L7.30749 20.901C7.29732 20.9583 7.24752 21 7.18934 21H5.43309Z"}),s("path",{className:f,fill:d,d:"M13.4399 12.96C12.9097 12.96 12.4799 13.3898 12.4799 13.92V20.2213C12.4799 20.7515 12.9097 21.1813 13.4399 21.1813H14.3999C14.5325 21.1813 14.6399 21.2887 14.6399 21.4213V23.4597C14.6399 23.6677 14.8865 23.7773 15.0408 23.6378L17.4858 21.4289C17.6622 21.2695 17.8916 21.1813 18.1294 21.1813H22.5599C23.0901 21.1813 23.5199 20.7515 23.5199 20.2213V13.92C23.5199 13.3898 23.0901 12.96 22.5599 12.96H13.4399Z"}))}d.displayName="ThreadIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E,t.CenterControlButton=function(e){var t,n,r,i=e.color,u=void 0===i?"primaryDark":i,p=e.className,v=e.iconClassName,y=e.onPopoutClick,S=e.popoutOpen,O=void 0!==S&&S,I=h(e,["color","className","iconClassName","onPopoutClick","popoutOpen"]),T=a.createElement(E,m({},I,{onContextMenu:y,iconClassName:(0,o.default)(v,c.default.centerIcon),className:(0,o.default)(null==y?p:c.default.staticButton,c.default.centerButton,g[u])}));return a.createElement(a.Fragment,null,null!=y?_("div",{className:(0,o.default)(p,c.default.contextMenuContainer)},void 0,_(d.default,{mask:d.MaskIDs.CHANNEL_CALL_CONTROL_BUTTON,width:56,height:56},void 0,T),_(f.default,{},void 0,_(l.default,{onClick:y,onContextMenu:y,className:(0,o.default)(c.default.contextMenuNub,g[u],(t={},t[c.default.active]=O,t))},void 0,_(s.default,{className:(0,o.default)(c.default.contextMenuCaret,(n={},n[c.default.open]=O,n))})))):null,_("div",{className:(0,o.default)((r={},r[c.default.unmasked]=null!=y,r),null!=y?p:null)},void 0,T))};var r,a=y(n(0)),o=p(n(9)),i=p(n(29)),l=p(n(61)),u=p(n(149)),s=p(n(683)),d=y(n(248)),f=p(n(8400)),c=p(n(7401));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function E(e){var t=e.label,n=e.onClick,r=e.onContextMenu,l=e.className,s=e.iconClassName,d=e.iconComponent,p=e.themeable,v=void 0!==p&&p,y=e.disabled,E=void 0!==y&&y,g=e.active,S=void 0!==g&&g,O=e.tooltipPosition,I=void 0===O?u.default.Positions.TOP:O,T=e.shouldShowTooltip,C=void 0===T||T;return _(f.default,{},void 0,_(u.default,{position:I,text:t,shouldShow:C},void 0,(function(e){var u,f,p=e.onClick,y=e.onContextMenu,g=h(e,["onClick","onContextMenu"]);return a.createElement(i.default,m({"aria-label":t,look:i.default.Looks.BLANK,size:i.default.Sizes.NONE,onClick:function(e){null==p||p(),null==n||n(e)},onContextMenu:function(e){null==y||y(),null==r||r(e)},disabled:E,innerClassName:c.default.lineHeightReset,className:(0,o.default)((u={},u[c.default.active]=S,u),l)},g),_(d,{className:(0,o.default)(c.default.controlIcon,s,(f={},f[c.default.themeable]=v,f[c.default.active]=S,f))}))})))}E.displayName="ControlButton";var g={red:c.default.red,white:c.default.white,green:c.default.green,primaryDark:c.default.primaryDark,primaryLight:c.default.primaryLight,activeLight:c.default.activeLight}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformNativeFile=function(e,t){if(e instanceof File)return e;return f(e.data,e.filename,t)},t.makeFile=f,t.classifyFile=function(e){return p(e.name,e.type)},t.classifyFileName=p,t.sizeString=function(e){return r.default.filesize(e)},t.maxFileSize=v,t.anyFileTooLarge=function(e,t){var n=v(t);return Array.from(e).some((function(e){return e.size>n}))};var r=d(n(8794)),a=d(n(8)),o=d(n(66)),i=d(n(15)),l=d(n(12)),u=d(n(96)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,r){if(null==t&&(t="unknown",e instanceof Blob))switch(e.type){case"image/png":t+=".png"}if(null==r){e instanceof Blob&&(r=e.type);var a=n(10308);r=r||a.lookup(t)}if("function"!=typeof File||"Microsoft Edge"===o.default.name){var i=new Date,l=0;return null!=e.size&&"number"==typeof e.size?l=e.size:null!=e.byteLength&&"number"==typeof e.byteLength&&(l=e.byteLength),{lastModified:i.getTime(),lastModifiedDate:i,name:t,size:l,type:r}}return new File([e],t,{type:r})}var c=[{reType:/^image\/vnd.adobe.photoshop/,klass:"photoshop"},{reType:/^image\/svg\+xml/,klass:"webcode"},{reType:/^image\//,klass:"image"},{reType:/^video\//,klass:"video"},{reName:/\.pdf$/,klass:"acrobat"},{reName:/\.ae/,klass:"ae"},{reName:/\.sketch$/,klass:"sketch"},{reName:/\.ai$/,klass:"ai"},{reName:/\.(?:rar|zip|7z|tar|tar\.gz)$/,klass:"archive"},{reName:/\.(?:c\+\+|cpp|cc|c|h|hpp|mm|m|json|js|rb|rake|py|asm|fs|pyc|dtd|cgi|bat|rss|java|graphml|idb|lua|o|gml|prl|sls|conf|cmake|make|sln|vbe|cxx|wbf|vbs|r|wml|php|bash|applescript|fcgi|yaml|ex|exs|sh|ml|actionscript)$/,klass:"code"},{reName:/\.(?:txt|rtf|doc|docx|md|pages|ppt|pptx|pptm|key|log)$/,klass:"document"},{reName:/\.(?:xls|xlsx|numbers|csv)$/,klass:"spreadsheet"},{reName:/\.(?:html|xhtml|htm|js|xml|xls|xsd|css|styl)$/,klass:"webcode"},{reName:/\.(?:mp3|ogg|wav|flac)$/,klass:"audio"}];function p(e,t){e=e?e.toLowerCase():"";var n=a.default.find(c,(function(n){return n.reType&&t?n.reType.test(t):!(!n.reName||!e)&&n.reName.test(e)}));return n?n.klass:"unknown"}function v(e){var t=l.default.getCurrentUser(),n=u.default.getUserMaxFileSize(t);if(null==e)return n;var r=i.default.getGuild(e),a=null!=r?s.PremiumGuildLimits[r.premiumTier].fileSize:s.MAX_ATTACHMENT_SIZE;return Math.max(a,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationErrorText=function(e){if(null!=e.choices)return o.default.Messages.COMMAND_VALIDATION_CHOICE_ERROR;switch(e.type){case a.ApplicationCommandOptionType.BOOLEAN:return o.default.Messages.COMMAND_VALIDATION_BOOLEAN_ERROR;case a.ApplicationCommandOptionType.CHANNEL:return o.default.Messages.COMMAND_VALIDATION_CHANNEL_ERROR;case a.ApplicationCommandOptionType.INTEGER:return o.default.Messages.COMMAND_VALIDATION_INTEGER_ERROR;case a.ApplicationCommandOptionType.ROLE:return o.default.Messages.COMMAND_VALIDATION_ROLE_ERROR;case a.ApplicationCommandOptionType.USER:return o.default.Messages.COMMAND_VALIDATION_USER_ERROR;case a.ApplicationCommandOptionType.MENTIONABLE:return o.default.Messages.COMMAND_VALIDATION_MENTIONABLE_ERROR;default:return o.default.Messages.COMMAND_VALIDATION_GENERAL_ERROR}},t.DISCOVERY_COMMANDS_QUERY_LIMIT=t.DISCOVERY_COMMANDS_QUERY_LIMIT_MOBILE=t.DISCOVERY_COMMANDS_QUERY_LIMIT_WEB=t.SECTION_BUILT_IN=t.BOOLEAN_CHOICES=t.FALSE_OPTION_NAME=t.TRUE_OPTION_NAME=void 0;var r,a=n(8260),o=(r=n(6))&&r.__esModule?r:{default:r};t.TRUE_OPTION_NAME="True";t.FALSE_OPTION_NAME="False";var i=[{name:"True",value:"true"},{name:"False",value:"false"}];t.BOOLEAN_CHOICES=i;t.SECTION_BUILT_IN="-1";t.DISCOVERY_COMMANDS_QUERY_LIMIT_WEB=10;t.DISCOVERY_COMMANDS_QUERY_LIMIT_MOBILE=5;t.DISCOVERY_COMMANDS_QUERY_LIMIT=10},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAutocompleteRowId=L,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(9)),i=n(680),l=n(8279),u=b(n(8842)),s=n(180),d=n(8328),f=b(n(9399)),c=b(n(362)),p=n(290),v=b(n(15)),y=b(n(70)),m=b(n(12)),_=n(8619),h=b(n(61)),E=b(n(8847)),g=b(n(8848)),S=b(n(279)),O=b(n(47)),I=n(1),T=b(n(6)),C=b(n(7366));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,R(e,t)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e){return null!=e?"autocomplete-"+e:null}var D=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).selectable=!0,t.layoutClass=C.default.autocompleteRowVertical,t.handleMouseEnter=function(){var e=t.props,n=e.onHover,r=e.index,a=e.selected;null!=n&&!a&&"number"==typeof r&&n(r)},t.handleClick=function(e){var n=t.props,r=n.onClick,a=n.index;null!=r&&"number"==typeof a&&r(a,e)},t}P(t,e);var n=t.prototype;return n.isSelectable=function(){return this.selectable},n.renderContent=function(){throw new Error("AutocompleteRow: renderContent must be extended")},n.render=function(){var e,t=this,n=this.layoutClass,r=this.props,l=r.className,u=r.index,s=r.selected,d=this.isSelectable(),f=A("div",{className:(0,o.default)((e={},e[C.default.base]=!0,e[C.default.selectable]=d,e[C.default.selected]=d&&s,e))},void 0,this.renderContent());return d?A(i.ListNavigatorItem,{id:""+u},void 0,(function(e){var r;return a.createElement(h.default,N({},e,{className:(0,o.default)(l,n),id:null!==(r=L(u))&&void 0!==r?r:void 0,onMouseMove:t.handleMouseEnter,onClick:t.handleClick,role:"option"}),f)})):f},t}(a.PureComponent);D.displayName="AutocompleteRow";var w=function(e){function t(){return e.apply(this,arguments)||this}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.text,n=e.description;return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,t)),null!=n?A(_.AutocompleteRowContentSecondary,{},void 0,n):null)},t}(D),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).selectable=!1,t}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.className,n=e.title;return A(O.default,{className:(0,o.default)(C.default.contentTitle,t),size:O.default.Sizes.SIZE_12},void 0,n)},t}(D),k=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).layoutClass=C.default.dividerContainer,t.selectable=!1,t}return P(t,e),t.prototype.renderContent=function(){var e=this.props.className;return A("div",{className:(0,o.default)(e,C.default.divider)})},t}(D),U=function(e){function t(){return e.apply(this,arguments)||this}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.user,n=e.nick,r=e.status,a=e.hidePersonalInformation,o=e.guildId;return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowIcon,{},void 0,A(S.default,{size:S.default.Sizes.SIZE_24,src:t.getAvatarURL(o),"aria-label":t.username,status:r})),A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,n||t.username)),A(_.AutocompleteRowContentSecondary,{},void 0,A("span",{className:C.default.descriptionUsername},void 0,t.username),a?null:A("span",{className:C.default.descriptionDiscriminator},void 0,"#",t.discriminator)))},t}(D),G=function(e){function t(){return e.apply(this,arguments)||this}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.role,n=e.hideDescription;return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,A("span",{style:{color:t.colorString||void 0}},void 0,"@",t.name))),n?null:A(_.AutocompleteRowContentSecondary,{},void 0,T.default.Messages.MENTION_USERS_WITH_ROLE))},t}(D),F=function(e){function t(){return e.apply(this,arguments)||this}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.channel,n=e.category,r=t.type===I.ChannelTypes.GUILD_CATEGORY?E.default:(0,d.getChannelIconComponent)(t);return A(_.AutocompleteRowContent,{},void 0,null!=r&&A(_.AutocompleteRowIcon,{},void 0,A(r,{className:C.default.icon})),A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,(0,s.computeChannelName)(t,m.default,y.default))),null!=n?A(_.AutocompleteRowContentSecondary,{},void 0,n.name):null)},t}(D),B=function(e){function t(){return e.apply(this,arguments)||this}P(t,e);var n=t.prototype;return n.isSelectable=function(){return(0,l.hasAccess)(this.props.command)},n.renderContent=function(){var e=this.props.command;return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowIcon,{},void 0,A(g.default,{className:C.default.icon,foreground:C.default.iconForeground})),A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,e.name)),A(_.AutocompleteRowContentSecondary,{},void 0,e.description))},t}(D),H=function(e){function t(){return e.apply(this,arguments)||this}P(t,e);var n=t.prototype;return n.isSelectable=function(){return(0,l.hasAccess)(this.props.command)},n.renderContent=function(){var e=this.props,t=e.command,n=e.channel,r=e.showImage,a=e.selected,o=this.isSelectable();return A(u.default,{command:t,channel:n,showImage:r,showOptions:o&&a,isSelectable:o})},t}(D),x=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).layoutClass=(0,o.default)(C.default.autocompleteRowVertical,C.default.autocompleteRowVerticalSmall),t}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.emoji,n=e.sentinel,r=e.guild,a=t.url?A("img",{alt:"",className:C.default.emojiImage,src:t.url}):A("span",{className:C.default.emojiRaw},void 0,t.surrogates),o=null!=r?A(_.AutocompleteRowContentSecondary,{},void 0,r.name):null;return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowIcon,{},void 0,a),A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,n,t.name,n)),o)},t}(D),V=function(e){function t(){return e.apply(this,arguments)||this}return P(t,e),t.prototype.renderContent=function(){var e=this.props.name;return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{},void 0,e)))},t}(D),W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).layoutClass=(0,o.default)(C.default.autocompleteRowVertical,C.default.autocompleteRowVerticalSmall),t}return P(t,e),t.prototype.renderContent=function(){var e,t,n=this.props,r=n.queryMatch,a=n.renderSticker,o=n.selected,i=n.sticker;if((0,p.isStandardSticker)(i))e=null===(t=c.default.getStickerPack(i.pack_id))||void 0===t?void 0:t.name;else if((0,p.isGuildSticker)(i)){var l;e=null===(l=v.default.getGuild(i.guild_id))||void 0===l?void 0:l.name}return A(_.AutocompleteRowContent,{},void 0,A(_.AutocompleteRowIcon,{},void 0,a(i,!0===o)),A(_.AutocompleteRowContentPrimary,{},void 0,A(_.AutocompleteRowHeading,{className:C.default.stickerName},void 0,i.name),null!=r&&A(_.AutocompleteRowSubheading,{},void 0,T.default.Messages.AUTOCOMPLETE_STICKERS_QUERY_MATCH.format({queryMatch:r}))),null!=e&&A(_.AutocompleteRowContentSecondary,{},void 0,e))},t}(D),Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).layoutClass=C.default.autocompleteRowHorizontal,t}return P(t,e),t.prototype.renderContent=function(){var e=this.props,t=e.width,n=e.height;return A("img",{alt:"",src:e.src,width:t,height:n})},t}(D),z=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).selectable=!1,t}return P(t,e),t.prototype.renderContent=function(){return A(f.default,{emojis:this.props.emojis})},t}(D),K=function(e){function t(){return e.apply(this,arguments)||this}return P(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=e.innerClassName,i=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","className","innerClassName"]);return a.Children.count(t)>0?A("div",{className:(0,o.default)(C.default.autocomplete,n)},void 0,a.createElement("div",N({className:(0,o.default)(C.default.autocompleteInner,r)},i),t)):null},t}(a.PureComponent);K.displayName="Autocomplete",K.Generic=w,K.Title=j,K.Divider=k,K.User=U,K.Role=G,K.Channel=F,K.Command=B,K.NewCommand=H,K.Emoji=x,K.GIFIntegration=Y,K.Sticker=W,K.Option=V,K.EmojiUpsell=z;var $=K;t.default=$},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(273)),i=n(202),l=p(n(29)),u=p(n(55)),s=n(121),d=n(1),f=p(n(6)),c=p(n(7581));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={color:new o.default.Value(0)},t.handleOnSave=function(e){(0,t.props.onSave)(e)},t.handleOnReset=function(e){var n=t.props.onReset;n&&n(e)},t.emphasize=function(){var e=t.state.color;o.default.sequence([o.default.timing(e,{toValue:1,duration:170,easing:o.default.Easing.quad}),o.default.timing(e,{delay:500,toValue:0,duration:170,easing:o.default.Easing.quad})]).start()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.componentDidMount=function(){s.ComponentDispatch.subscribe(d.ComponentActions.EMPHASIZE_NOTICE,this.emphasize)},a.componentWillUnmount=function(){s.ComponentDispatch.unsubscribe(d.ComponentActions.EMPHASIZE_NOTICE,this.emphasize)},a.render=function(){var e=this.props,t=e.message,n=e.submitting,r=e.onReset,a=e.onSaveText,i=e.onResetText,s=e.onSaveButtonColor;return y(o.default.div,{className:c.default.container,style:this.getContainerStyle()},void 0,y(u.default,{align:u.default.Align.CENTER},void 0,y(u.default.Child,{},void 0,y(o.default.div,{className:c.default.message,style:this.getTextStyle()},void 0,t||f.default.Messages.SETTINGS_NOTICE_MESSAGE)),y(u.default,{grow:0,justify:u.default.Justify.END},void 0,null!=r&&y(l.default,{className:c.default.resetButton,size:l.default.Sizes.SMALL,color:l.default.Colors.PRIMARY,look:l.default.Looks.LINK,onClick:this.handleOnReset},void 0,y(o.default.span,{style:this.getTextStyle()},void 0,i||f.default.Messages.RESET)),y(l.default,{className:c.default.button,size:l.default.Sizes.SMALL,color:s||l.default.Colors.GREEN,submitting:n,onClick:this.handleOnSave},void 0,a||f.default.Messages.SAVE_CHANGES))))},a.getTextStyle=function(){var e=this.state.color,t=d.HEXColors.WHITE;return this.props.theme===d.ThemeTypes.LIGHT&&(t=d.HEXColors.PRIMARY_DARK_500),{color:e.interpolate({inputRange:[0,1],outputRange:[t,d.HEXColors.WHITE]})}},a.getContainerStyle=function(){var e=this.state.color,t=(0,i.hex2rgb)(d.HEXColors.PRIMARY_DARK_700,.9);return this.props.theme===d.ThemeTypes.LIGHT&&(t=(0,i.hex2rgb)(d.HEXColors.STATUS_GREY_100,.9)),{backgroundColor:e.interpolate({inputRange:[0,1],outputRange:[t,(0,i.hex2rgb)(d.HEXColors.STATUS_RED_500,.9)]})}},r}(a.PureComponent);_.displayName="SettingsNotice";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Item=t.Panel=t.Separator=t.Header=t.Looks=t.Types=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(424),l=n(202),u=f(n(61)),s=n(1),d=f(n(7601));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _,h={SIDE:d.default.side,TOP:d.default.top,TOP_PILL:d.default.topPill};t.Types=h,t.Looks=_,function(e){e[e.GREY=0]="GREY",e[e.BRAND=1]="BRAND",e[e.CUSTOM=2]="CUSTOM"}(_||(t.Looks=_={}));var E=function(e){var t=e.className,n=e.onClick,r=e.children,a=e["aria-expanded"],i=e["aria-controls"];return m(u.default,{tabIndex:null==n?-1:0,className:(0,o.default)(d.default.header,t),onClick:n,"aria-expanded":a,"aria-controls":i,focusProps:{offset:{top:-6}}},void 0,r)};t.Header=E,E.displayName="Header";var g=function(e){var t=e.style;return m("div",{className:d.default.separator,style:t})};t.Separator=g,g.displayName="Separator";var S,O=function(e){var t=e.children,n=e.id,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","id"]);return a.createElement("div",y({},r,{role:"tabpanel",id:I(n)}),t)};function I(e){return e+"-tab"}function T(e,t){if(null!=e){var n={};return t===S.SELECTED?(n.backgroundColor=e,n.color=s.Colors.WHITE,n):(t===S.HOVER&&(n.backgroundColor=(0,l.hex2rgb)(e,.1)),n.color=e,n)}}t.Panel=O,O.displayName="Panel",function(e){e.DEFAULT="Default",e.HOVER="Hover",e.SELECTED="Selected"}(S||(S={}));var C=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={hover:!1,active:!1},t.handleClick=function(e){var n=t.props,r=n.onClick,a=n.id,o=n.onItemSelect;null!=r?r(e):null!=o&&o(a)},t.handleMouseDown=function(){null!=t.props.color&&t.setState({active:!0})},t.handleMouseUp=function(){t.setState({active:!1})},t.handleMouseOver=function(){t.setState({hover:!0})},t.handleMouseOut=function(){t.setState({hover:!1,active:!1})},t}p(t,e);var n=t.prototype;return n.getStyle=function(){var e=this.props,t=e.color,n=e.id,r=e.selectedItem,a=e.itemType,o=this.state,i=o.hover,u=o.active;if(null!=t)return a===h.SIDE?null!=n&&r===n||u?T(t,S.SELECTED):i?T(t,S.HOVER):T(t):a===h.TOP?r===n?{borderColor:t,color:t}:i?{borderColor:(0,l.hex2rgb)(t,.1),color:(0,l.hex2rgb)(t,.6)}:{borderColor:"transparent",color:(0,l.hex2rgb)(t,.4)}:a===h.TOP_PILL?r===n?{backgroundColor:(0,l.hex2rgb)(t,.2),color:t}:{backgroundColor:t,color:s.Colors.WHITE}:void 0},n.render=function(){var e,t=this.props,n=t.children,r=t.className,i=t.id,l=t.selectedItem,s=t.color,f=t.disabled,c=t.onContextMenu,p=t.clickableRef,v=t.look,y=this.props["aria-label"];var m=l===i;return a.createElement(u.default,{className:(0,o.default)(r,(e={},e[d.default.item]=!0,e[d.default.brand]=v===_.BRAND,e[d.default.selected]=null==s&&m,e[d.default.themed]=v===_.GREY,e[d.default.disabled]=null==s&&f,e)),style:this.getStyle(),role:"tab","aria-selected":m,"aria-controls":I(""+i),"aria-disabled":f,tabIndex:m?0:-1,onMouseEnter:null!=s?this.handleMouseOver:void 0,onClick:this.handleClick,onMouseLeave:null!=s?this.handleMouseOut:void 0,onMouseUp:null!=s?this.handleMouseUp:void 0,onMouseDown:this.handleMouseDown,onContextMenu:c,"aria-label":y,ref:p},n)},t}(a.Component);t.Item=C,C.displayName="Item",C.defaultProps={disabled:!1,look:_.GREY};var b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).tabBarRef=a.createRef(),t.focusManager=(0,i.createFocusManager)({getFocusableElements:function(){var e=t.tabBarRef.current;if(null!=e){var n=e.querySelectorAll('[role="tab"][aria-disabled="false"]');return Array.from(n)}return[]}}),t.renderChildren=function(e){var n=t.props,r=n.selectedItem,o=n.onItemSelect,i=n.type,l=void 0===i?h.SIDE:i,u=n.look,s=void 0===u?_.GREY:u;return a.isValidElement(e)?a.cloneElement(e,{selectedItem:r,onItemSelect:o,itemType:l,look:s}):null},t.getNodeForKeydownEvent=function(e){var n=t.props.orientation,r=void 0===n?"horizontal":n,a="vertical"===r?s.KeyboardKeys.ARROW_UP:s.KeyboardKeys.ARROW_LEFT,o="vertical"===r?s.KeyboardKeys.ARROW_DOWN:s.KeyboardKeys.ARROW_RIGHT;switch(e.which){case a:return t.focusManager.getPreviousFocusableElement();case o:return t.focusManager.getNextFocusableElement();case s.KeyboardKeys.HOME:return t.focusManager.getFirstFocusableElement();case s.KeyboardKeys.END:return t.focusManager.getLastFocusableElement()}return null},t.handleKeyDown=function(e){var n=t.getNodeForKeydownEvent(e);null!=n&&(e.preventDefault(),n.focus())},t}return p(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=e.type,i=void 0===r?h.SIDE:r,l=e.style,u=e["aria-label"],s=e.orientation,d=void 0===s?"horizontal":s;return a.createElement("div",{ref:this.tabBarRef,className:(0,o.default)(t,i),style:l,role:"tabbar","aria-orientation":d,onKeyDown:this.handleKeyDown,"aria-label":u},a.Children.map(n,this.renderChildren))},t}(a.Component);b.displayName="TabBar",b.Types=h,b.Looks=_,b.Header=E,b.Item=C,b.Separator=g,b.Panel=O;var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(14)),a=l(n(2)),o=n(8262),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}var d=function(){var e=s(regeneratorRuntime.mark((function e(t){var n,l,u,s,d,f,c,p,v,y,m,_;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.guildId,l=t.status,u=void 0===l?o.GuildJoinRequestApplicationStatuses.PENDING:l,s=t.before,d=t.after,f=t.limit,c=void 0===f?o.MAX_RESULTS_PER_PAGE:f,a.default.dispatch({type:i.ActionTypes.GUILD_JOIN_REQUESTS_FETCH_START}),e.prev=2,e.next=5,r.default.get({url:i.Endpoints.GUILD_JOIN_REQUESTS(n),query:{status:u,limit:c,before:s,after:d}});case 5:p=e.sent,v=p.body,y=v.guild_join_requests,m=v.total,_=y.map((function(e){var t=e.user,n=e.user_id,r=e.guild_id,a=e.created_at,o=e.form_responses,i=e.rejection_reason,l=e.actioned_at,s=e.actioned_by_user;return{user:t,userId:n,guildId:r,createdAt:a,formResponses:o,rejectionReason:i,applicationStatus:u,actionedAt:l,actionedByUser:s}})),a.default.dispatch({type:i.ActionTypes.GUILD_JOIN_REQUESTS_FETCH_SUCCESS,status:u,requests:_,total:m,limit:c,guildId:n}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),a.default.dispatch({type:i.ActionTypes.GUILD_JOIN_REQUESTS_FETCH_FAILURE});case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=s(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.delete({url:i.Endpoints.GUILD_MEMBER_REQUEST_TO_JOIN(t)});case 3:return n=e.sent,a.default.dispatch({type:i.ActionTypes.USER_GUILD_JOIN_REQUEST_UPDATE,guildId:t,request:null}),e.abrupt("return",n);case 8:throw e.prev=8,e.t0=e.catch(0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),c={fetchGuildJoinRequests:d,ackUserGuildJoinRequest:function(){var e=s(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.patch({url:i.Endpoints.GUILD_JOIN_REQUEST_ACK(t)});case 2:return n=e.sent,a.default.dispatch({type:i.ActionTypes.ACK_APPROVED_GUILD_JOIN_REQUEST,guildId:t}),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),removeGuildJoinRequest:f,updateGuildJoinRequest:function(){var e=s(regeneratorRuntime.mark((function e(t,n,l,u){var s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===l&&(l=o.GuildJoinRequestApplicationStatuses.APPROVED),e.next=3,r.default.patch({url:i.Endpoints.GUILD_JOIN_REQUEST(t,n),body:{action:l,rejection_reason:u}});case 3:s=e.sent,a.default.dispatch({type:i.ActionTypes.GUILD_JOIN_REQUEST_UPDATE,guildId:t,status:s.body.application_status,request:s.body});case 5:case"end":return e.stop()}}),e)})));return function(t,n,r,a){return e.apply(this,arguments)}}(),actionAllPendingJoinRequests:function(){var e=s(regeneratorRuntime.mark((function e(t,n){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.patch({url:i.Endpoints.GUILD_JOIN_REQUESTS(t),body:{action:n}});case 2:return o=e.sent,a.default.dispatch({type:i.ActionTypes.GUILD_JOIN_REQUESTS_BULK_ACTION,guildId:t,action:n}),e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),resetGuildJoinRequest:function(){var e=s(regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.post({url:i.Endpoints.GUILD_MEMBER_REQUEST_TO_JOIN(t)});case 3:return n=e.sent,o=n.body,a.default.dispatch({type:i.ActionTypes.USER_GUILD_JOIN_REQUEST_UPDATE,guildId:t,request:o}),e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(0),e.t0;case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),fetchRequestToJoinGuilds:function(){var e=s(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:i.Endpoints.USER_JOIN_REQUEST_GUILDS});case 2:t=e.sent,a.default.dispatch({type:i.ActionTypes.USER_JOIN_REQUEST_GUILDS_FETCH,guilds:t.body});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(718)),a=l(n(8798)),o=l(n(1284)),i=l(n(1285));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}var s=null;function d(e,t){var n={};return null!=e.mention&&null!=s&&(n={mention:s}),(0,i.default)([e].concat(t,[n]))}s=n(9290).default;var f=d(o.default.RULES,[(0,a.default)({enableBuildOverrides:!0})]),c=d(o.default.CHANNEL_TOPIC_RULES,[(0,a.default)({enableBuildOverrides:!1,emojiTooltipPosition:"bottom"}),{codeBlock:{react:o.default.RULES.text.react}}]),p=d(o.default.EMBED_TITLE_RULES,[(0,a.default)({enableBuildOverrides:!1})]),v=d(o.default.INLINE_REPLY_RULES,[(0,a.default)({enableBuildOverrides:!1})]),y=d(o.default.GUILD_VERIFICATION_FORM_RULES,[(0,a.default)({enableBuildOverrides:!1})]),m={defaultRules:f,astParserFor:r.astParserFor,reactParserFor:r.reactParserFor,parse:r.reactParserFor(f),parseTopic:r.reactParserFor(c),parseEmbedTitle:r.reactParserFor(p),parseInlineReply:r.reactParserFor(v),parseGuildVerificationFormRule:r.reactParserFor(y),parseToAST:r.astParserFor(f),parseTopicToAST:r.astParserFor(c),parseEmbedTitleToAST:r.astParserFor(p),parseInlineReplyToAST:r.astParserFor(v)};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAnalyticsContext=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(13);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}t.useAnalyticsContext=function(){return r.useContext(a.AnalyticsContext)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SearchBarIcon=t.RichTagTypes=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=E(n(133)),l=E(n(88)),u=E(n(271)),s=E(n(61)),d=E(n(255)),f=E(n(5968)),c=E(n(279)),p=E(n(272)),v=n(121),y=n(259),m=n(1),_=E(n(6)),h=E(n(7411));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var T=Object.freeze({SMALL:h.default.small,MEDIUM:h.default.medium,LARGE:h.default.large}),C=(0,i.default)({MEMBER:null,ROLE:null});t.RichTagTypes=C;var b=function(e){var t,n,r,a=e.hasContent,i=e.onClear,l=e.className,u=e.themeOverride,c=e.size,p=void 0===c?T.SMALL:c;return I(s.default,{className:(0,o.default)(l,h.default.iconLayout,p,(0,y.getThemeClass)(u),(t={},t[h.default.clear]=a,t)),onClick:function(e){e.stopPropagation(),null!=i&&i(e)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},tabIndex:-1,"aria-hidden":!a,"aria-label":_.default.Messages.SEARCH_CLEAR},void 0,I("div",{className:h.default.iconContainer},void 0,I(f.default,{className:(0,o.default)((n={},n[h.default.icon]=!0,n[h.default.visible]=!a,n))}),I(d.default,{className:(0,o.default)((r={},r[h.default.icon]=!0,r[h.default.visible]=a,r))})))};t.SearchBarIcon=b,b.displayName="SearchBarIcon";var M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).ref=a.createRef(),t.containerRef=a.createRef(),t.handleKeyDown=function(e){var n=t.props,r=n.onActivate,a=n.onKeyDown,o=n.onQueryChange,i=n.useKeyboardNavigation;null!=a&&a(e);var l=t.ref.current;if(null!=l&&null==r)return e.keyCode===m.KeyboardKeys.ESCAPE&&l.value&&l.value.length>0?(l.value="",void(null!=o&&o(""))):void(i&&(t.props.gridResults?t.handleKeyDownGrid(e):t.handleKeyDownList(e)));e.keyCode!==m.KeyboardKeys.TAB&&null!=r&&r(e)},t.handleChange=function(e){var n=t.props.onQueryChange;null!=n&&n(e.currentTarget.value)},t.handleFocus=function(e){var n=t.props.onFocus;null!=n&&n(e)},t.handleClear=function(){var e=t.props.onClear,n=t.ref.current;null!=e&&e(),null!=n&&n.focus()},t.handleRemoveTag=function(e){var n=t.props.onRemoveTag;n&&n(e)},t.focus=function(){var e=t.ref.current;null!=e&&e.focus()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var i=r.prototype;return i.componentDidMount=function(){var e=this.props.subscribeToFocusEvent;e&&v.ComponentDispatch.subscribe(e,this.focus)},i.componentWillUnmount=function(){var e=this.props.subscribeToFocusEvent;e&&v.ComponentDispatch.unsubscribe(e,this.focus)},i.componentDidUpdate=function(e){var t=this.props,n=t.focusAfterReady,r=t.isReady;n&&!e.isReady&&r&&this.focus()},i.handleKeyDownGrid=function(e){var t=this.props,n=t.selectedRow,r=t.selectedColumn,a=t.sections,o=t.query,i=t.tags,l=t.onSelectionChange,u=t.onSelect,s=t.onRemoveTag,d=t.preventEscapePropagation;if(0!==a.length){switch(e.keyCode){case m.KeyboardKeys.BACKSPACE:(null==o||0===o.length)&&null!=i&&i.length>0&&(e.preventDefault(),e.stopPropagation(),s&&s(i.length-1));break;case m.KeyboardKeys.ARROW_DOWN:e.preventDefault(),e.stopPropagation(),-1===n?(n=0,r=0):((n+=1)>=a.length&&(n=a.length-1),r>=a[n]&&(r=a[n]-1));break;case m.KeyboardKeys.ARROW_UP:e.preventDefault(),e.stopPropagation(),(n-=1)<0?(n=0,r=0):r>=a[n]&&(r=a[n]-1);break;case m.KeyboardKeys.ARROW_LEFT:e.preventDefault(),e.stopPropagation(),-1===n&&(n=0),(r-=1)<0&&((n-=1)>=0?r=a[n]-1:n<0&&(n=0,r=0));break;case m.KeyboardKeys.ARROW_RIGHT:e.preventDefault(),e.stopPropagation(),-1===n&&(n=0),(r+=1)>=a[n]&&(r=0,(n+=1)>=a.length&&(r=a[n=a.length-1]-1));break;case m.KeyboardKeys.ENTER:if(e.preventDefault(),e.stopPropagation(),-1===n&&(n=0),-1===r&&(r=0),n>=a.length||r>=a[n])return;return void(null!=u&&u(n,r,e));case m.KeyboardKeys.ESCAPE:return e.preventDefault(),d&&e.stopPropagation(),void(null!=u&&u(null,null,e));default:return}null!=l&&l(n,r)}},i.handleKeyDownList=function(e){var t=this.props,n=t.sections,r=t.selectedSection,a=t.selectedRow,o=t.onSelect,i=t.onSelectionChange,l=t.query,u=t.tags,s=t.preventEscapePropagation,d=this.ref.current;if(null!=d)switch(e.keyCode){case m.KeyboardKeys.BACKSPACE:(null==l||0===l.length)&&null!=u&&u.length>0&&(e.preventDefault(),e.stopPropagation(),this.props.onRemoveTag&&this.props.onRemoveTag(u.length-1));break;case m.KeyboardKeys.ARROW_DOWN:e.preventDefault(),e.stopPropagation(),n.length>r&&++a>=n[r]&&(++r>=n.length&&(r=0),a=0),i&&i(r,a);break;case m.KeyboardKeys.ARROW_UP:e.preventDefault(),e.stopPropagation(),--a<0&&(--r<0&&(r=n.length-1),a=n[r]-1),i&&i(r,a);break;case m.KeyboardKeys.ENTER:e.preventDefault(),e.stopPropagation(),n.length>r&&n[r]>a&&o&&o(r,a,e);break;case m.KeyboardKeys.ESCAPE:e.preventDefault(),s&&e.stopPropagation(),o&&o(null,null,e),d.blur()}},i.render=function(){var e,t,n=this,r=this.props,i=r.autoFocus,s=r.query,f=r.placeholder,v=r.themeOverride,m=r.disabled,_=r.onClear,E=r.size,g=r.maxHeight,O=r.tags,T=r.onActivate,M=r.className,N=r["aria-activedescendant"],A=r.inputProps,P=r.focusAfterReady,R=null!=s&&s.length>0,L=!1,D=[];null!=O&&O.length>0&&("string"==typeof O[0]?O.forEach((function(e,t){return D.push(I(u.default,{focusProps:{offset:4},className:h.default.tag,onClick:n.handleRemoveTag.bind(n,t)},t,e,I(d.default,{className:h.default.close})))})):(L=!0,O.forEach((function(e,t){return D.push(I(u.default,{className:(0,o.default)(h.default.tag,h.default.richTag),onClick:n.handleRemoveTag.bind(n,t)},t,e.type===C.MEMBER&&e.avatar&&I(c.default,{src:e.avatar,"aria-label":e.label,size:c.default.Sizes.SIZE_16}),e.type===C.ROLE&&e.color&&I("span",{className:h.default.tagRoleColor,style:{backgroundColor:e.color}}),I("span",{className:h.default.tagLabel},void 0,e.label),I(d.default,{className:h.default.close})))}))));return I(l.default,{focusTarget:this.ref,ringTarget:this.containerRef},void 0,a.createElement("div",{ref:this.containerRef,className:(0,o.default)(M,h.default.container,E,(0,y.getThemeClass)(v),(e={},e[h.default.disabled]=m,e))},I(p.default,{className:h.default.inner,style:{maxHeight:g}},void 0,D,a.createElement("input",S({className:(0,o.default)(h.default.input,(t={},t[h.default.richTagInput]=L,t)),type:"text",ref:this.ref,spellCheck:"false",placeholder:f,value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,disabled:m,autoFocus:!P&&i,onMouseDown:T,"aria-activedescendant":N},A)),_?I(b,{size:E,themeOverride:v,hasContent:R,onClear:this.handleClear}):null)))},r}(a.Component);M.displayName="SearchBar",M.Sizes=T,M.defaultProps={size:T.SMALL,query:"",sections:[],selectedSection:0,selectedRow:-1,selectedColumn:-1,gridResults:!1,placeholder:_.default.Messages.DM_SEARCH_PLACEHOLDER,disabled:!1,autoFocus:!1,preventEscapePropagation:!0,useKeyboardNavigation:!0};var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n="SubscribeGuildMembersContainer("+function(e){return e.displayName||e.name||"Component"}(t)+")",l=function(n){var l,u;function f(t){var r;r=n.call(this,t)||this;var o=e(t);return a.default.forEach(o,(function(e,t){return(0,i.subscribeMembers)(t,e)})),r._subscriptions=o,r}u=n,(l=f).prototype=Object.create(u.prototype),l.prototype.constructor=l,d(l,u);var c=f.prototype;return c.componentDidUpdate=function(t){if(!(0,o.default)(this.props,t)){var n=e(this.props);null!=this._subscriptions&&a.default.isEqual(this._subscriptions,n)||(null!=this._subscriptions&&a.default.forEach(this._subscriptions,(function(e,t){return(0,i.unsubscribeMembers)(t,e)})),a.default.forEach(n,(function(e,t){return(0,i.subscribeMembers)(t,e)})),this._subscriptions=n)}},c.componentWillUnmount=function(){null!=this._subscriptions&&a.default.forEach(this._subscriptions,(function(e,t){return(0,i.unsubscribeMembers)(t,e)}))},c.render=function(){var e=this.props,n=e.forwardedRef,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["forwardedRef"]);return r.createElement(t,s({ref:n},a))},f}(r.Component);l.displayName="WrappedComponent",l.displayName=n;var u=r.forwardRef((function(e,t){return r.createElement(l,s({},e,{forwardedRef:t}))}));return u.displayName="ForwardRef("+n+")",u}},t.useSubscribeGuildMembers=function(e){r.useEffect((function(){return a.default.forEach(e,(function(e,t){return(0,i.subscribeMembers)(t,e)})),function(){a.default.forEach(e,(function(e,t){return(0,i.unsubscribeMembers)(t,e)}))}}),[e])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(8)),o=l(n(184)),i=n(9105);function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.forwardRef((function(t,n){var r=a.useRef();return a.useImperativeHandle(n,(function(){return{triggerResize:function(){var e;null===(e=r.current)||void 0===e||e.onResize()}}})),a.createElement(o.default,{ref:r},(function(n){var r=n.width,o=n.height;return a.createElement(e,l({},t,{width:r,height:o}))}))}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(10312))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=s(n(0)),o=n(3),i=(r=n(160))&&r.__esModule?r:{default:r},l=s(n(9333));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(){return(d=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}).apply(this,arguments)}function f(e){return e.isSystemUser()?l.BotTypes.SYSTEM_DM:e.bot?l.BotTypes.BOT:null}var c=function(e){var t=e.hideDiscriminator,n=void 0!==t&&t,r=e.user,u=e.nick,s=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["hideDiscriminator","user","nick"]),c=(0,o.useStateFromStores)([i.default],(function(){return i.default.hidePersonalInformation}))||n;return a.createElement(l.default,d({name:null!=u?u:r.toString(),discriminator:c||null!=u?null:r.discriminator,botType:f(r),botVerified:r.isVerifiedBot()},s))};c.displayName="DiscordTag";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemberVerificationModalStates=t.IN_APP_MEMBER_VERIFICATION_MODAL_KEY=t.MEMBER_VERIFICATION_TYPE=t.MAX_PARAGRAPH_RESPONSE_LENGTH=t.MAX_TEXT_RESPONSE_LENGTH=t.MAX_CHOICE_LENGTH=t.MAX_NUM_CHOICES=t.MAX_PLACEHOLDER_LENGTH=t.MAX_QUESTION_LENGTH=t.MAX_RULE_LENGTH=t.MAX_NUM_RULES=t.MAX_FORM_ELEMENTS=t.REQUIRED_FORM_FIELDS=void 0;var r=[{field_type:n(8262).VerificationFormFieldTypes.VERIFICATION}];t.REQUIRED_FORM_FIELDS=r;t.MAX_FORM_ELEMENTS=5;t.MAX_NUM_RULES=16;t.MAX_RULE_LENGTH=300;t.MAX_QUESTION_LENGTH=300;t.MAX_PLACEHOLDER_LENGTH=150;t.MAX_NUM_CHOICES=8;t.MAX_CHOICE_LENGTH=150;t.MAX_TEXT_RESPONSE_LENGTH=150;t.MAX_PARAGRAPH_RESPONSE_LENGTH=1e3;t.MEMBER_VERIFICATION_TYPE="Membership Gating";var a;t.IN_APP_MEMBER_VERIFICATION_MODAL_KEY="in-app-member-verification",t.MemberVerificationModalStates=a,function(e){e[e.VERIFICATION_INFO=0]="VERIFICATION_INFO"}(a||(t.MemberVerificationModalStates=a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EmptyStateText=t.EmptyStateImage=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(55)),l=n(1),u=d(n(7609)),s=d(n(370));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=a.createContext(l.ThemeTypes.DARK),_=m.Provider,h=m.Consumer,E=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this.props,t=e.lightSrc,n=e.darkSrc,r=e.width,a=e.height,d=e.offsetX,f=e.offsetY,v=e.style;return c(h,{},void 0,(function(e){return c(i.default.Child,{grow:0,className:(0,o.default)(u.default.image,s.default.marginBottom40),style:p({},v,{width:r,height:a,marginLeft:d,marginTop:f,backgroundImage:"url("+(e===l.ThemeTypes.DARK?n:t)+")"})})}))},t}(a.PureComponent);t.EmptyStateImage=E,E.displayName="EmptyStateImage";var g=function(e){var t=e.children,n=e.className,r=e.noteClassName,a=e.note,l=e.style;return c(i.default.Child,{grow:0,direction:i.default.Direction.VERTICAL,style:l},void 0,t&&c("h4",{className:(0,o.default)(n,u.default.title)},void 0,t),a&&c("div",{className:(0,o.default)(r,u.default.text,s.default.marginTop8)},void 0,a))};t.EmptyStateText=g,g.displayName="EmptyStateText";var S=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.theme,r=e.className,a=e.style;return c(_,{value:n},void 0,c(i.default,{direction:i.default.Direction.VERTICAL,align:i.default.Align.CENTER,justify:i.default.Justify.CENTER,className:(0,o.default)(u.default.wrapper,r),style:a},void 0,t))},t}(a.PureComponent);t.default=S,S.displayName="EmptyState",S.Text=g,S.Image=E},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.GuildSettingsRoleEditSections=void 0,t.GuildSettingsRoleEditSections=r,function(e){e[e.DISPLAY=0]="DISPLAY",e[e.PERMISSIONS=1]="PERMISSIONS",e[e.MEMBERS=2]="MEMBERS"}(r||(t.GuildSettingsRoleEditSections=r={}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultCustomContentScroller=C,t.default=t.ContentTypes=t.ListContentScroller=t.ScrollerContext=t.SectionTypes=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=m(n(9)),l=m(n(469)),u=m(n(1291)),s=m(n(8518)),d=n(468),f=n(1210),c=n(272),p=n(259),v=m(n(8746)),y=m(n(7381));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,S(e,t)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.SectionTypes={HEADER:"HEADER",DIVIDER:"DIVIDER",CUSTOM:"CUSTOM"};var O=o.createContext(null);t.ScrollerContext=O;var I,T=function(e){function t(){return e.apply(this,arguments)||this}g(t,e);var n=t.prototype;return n.renderContent=function(){var e=this.props,t=e.scrollerRef,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["scrollerRef"]);return h("div",{className:y.default.customContainer},void 0,o.createElement(f.ListAuto,E({},n,{className:(0,i.default)(y.default.customScroller,y.default.contentRegionScroller),ref:t})))},n.render=function(){return h("div",{className:y.default.customColumn},void 0,this.renderContent())},t}(o.PureComponent);function C(e){var t=e.children;return h("div",{className:y.default.customColumn},void 0,h("div",{className:y.default.customContainer},void 0,h(c.ScrollerAuto,{className:(0,i.default)(y.default.customScroller,y.default.contentRegionScroller)},void 0,t)))}t.ListContentScroller=T,T.displayName="ListContentScroller",T.defaultProps={paddingTop:60,paddingBottom:60},C.displayName="DefaultCustomContentScroller",t.ContentTypes=I,function(e){e.MINIMAL="minimal",e.CUSTOM="custom",e.DEFAULT="default"}(I||(t.ContentTypes=I={}));var b=Object.freeze(((r={})[I.MINIMAL]="contentColumnMinimal",r[I.CUSTOM]="contentColumnCustom",r[I.DEFAULT]="contentColumnDefault",r)),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._scroller=null,t._containerRef=o.createRef(),t._contentColumnRef=o.createRef(),t._toolsContainerRef=o.createRef(),t.setScrollerRef=function(e){t._scroller=e;var n=t.props.scrollerRef;null!=n&&(n.current=e)},t}g(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){e.section!==this.props.section&&this.resetScroll()},n.resetScroll=function(){null!=this._scroller&&this._scroller.scrollTo({to:0})},n.renderTools=function(){var e=this.props,t=e.closeAction,n=e.theme;return null==t?null:o.createElement("div",{className:y.default.toolsContainer,ref:this._toolsContainerRef},h(u.default,{containerRef:this._toolsContainerRef},void 0,h("div",{className:y.default.tools},void 0,h(v.default,{closeAction:t,theme:n,keybind:"ESC"}))))},n.renderNotice=function(){var e=this.props,t=e.notice,n=e.section;return null==t?null:h(s.default,{className:y.default.noticeRegion},n,t)},n.renderContent=function(){var e=this.props,t=e.content,n=e.contentType;if(n===I.CUSTOM)return h(l.default,{component:"div",className:y.default.contentRegion},void 0,t,this.renderTools(),this.renderNotice());var r=b[n||I.DEFAULT];return h(l.default,{component:"div",className:y.default.contentRegion},void 0,h("div",{className:y.default.contentTransitionWrap},void 0,o.createElement(d.AdvancedScrollerAuto,{className:y.default.contentRegionScroller,ref:this.setScrollerRef},h(O.Provider,{value:this._scroller},void 0,o.createElement("main",{className:(0,i.default)(y.default.contentColumn,y.default[r]),ref:this._contentColumnRef},h(u.default,{containerRef:this._contentColumnRef},void 0,t))),this.renderTools())),this.renderNotice())},n.renderSidebar=function(){var e=this.props,t=e.sidebar,n=e.sidebarTheme;return h("div",{className:(0,i.default)(y.default.sidebarRegion,(0,p.getThemeClass)(n))},void 0,h(d.AdvancedScrollerThin,{className:y.default.sidebarRegionScroller,fade:!0},void 0,h("nav",{className:y.default.sidebar},void 0,t)))},n.render=function(){return h("div",{className:y.default.standardSidebarView},void 0,this.renderSidebar(),this.renderContent())},t}(o.PureComponent);M.displayName="StandardSidebarView";var N=M;t.default=N},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:e.className},void 0,o("path",{className:e.foreground,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M5.88657 21C5.57547 21 5.3399 20.7189 5.39427 20.4126L6.00001 17H2.59511C2.28449 17 2.04905 16.7198 2.10259 16.4138L2.27759 15.4138C2.31946 15.1746 2.52722 15 2.77011 15H6.35001L7.41001 9H4.00511C3.69449 9 3.45905 8.71977 3.51259 8.41381L3.68759 7.41381C3.72946 7.17456 3.93722 7 4.18011 7H7.76001L8.39677 3.41262C8.43914 3.17391 8.64664 3 8.88907 3H9.87344C10.1845 3 10.4201 3.28107 10.3657 3.58738L9.76001 7H15.76L16.3968 3.41262C16.4391 3.17391 16.6466 3 16.8891 3H17.8734C18.1845 3 18.4201 3.28107 18.3657 3.58738L17.76 7H21.1649C21.4755 7 21.711 7.28023 21.6574 7.58619L21.4824 8.58619C21.4406 8.82544 21.2328 9 20.9899 9H17.41L16.35 15H19.7549C20.0655 15 20.301 15.2802 20.2474 15.5862L20.0724 16.5862C20.0306 16.8254 19.8228 17 19.5799 17H16L15.3632 20.5874C15.3209 20.8261 15.1134 21 14.8709 21H13.8866C13.5755 21 13.3399 20.7189 13.3943 20.4126L14 17H8.00001L7.36325 20.5874C7.32088 20.8261 7.11337 21 6.87094 21H5.88657ZM9.41045 9L8.35045 15H14.3504L15.4104 9H9.41045Z"}))}i.displayName="ChannelText"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderVideoComponent=k,t.renderAudioComponent=U,t.renderImageComponent=G,t.renderMaskedLinkComponent=F,t.renderPlaintextFilePreview=B,t.NewMessagesBar=function(e){var t,n=e.content,r=e.channelId,u=a.useState((function(){return(0,h.uid)("NewMessagesBarJumpToNewMessages_")}))[0],s=a.useCallback((function(){var e=f.default.ackMessageId(r);null!=e?i.default.jumpToMessage({channelId:r,messageId:e,offset:1,context:"Mark As Read"}):i.default.jumpToMessage({channelId:r,messageId:r,offset:1,context:"Mark As Read"})}),[r]),c=a.useCallback((function(){(0,l.ack)(r)}),[r]),p=a.useContext(E.MessagesInteractionContext).disableInteractions;return p?null:A("div",{className:(0,o.default)(b.default.newMessagesBar,(t={},t[b.default.disableInteractions]=p,t))},void 0,A(d.default,{offset:4},void 0,A("button",{type:"button",className:b.default.barButtonMain,onClick:s,"aria-label":C.default.Messages.JUMP_TO_LAST_UNREAD_MESSAGE,"aria-describedby":u},void 0,A("span",{id:u,className:b.default.span},void 0,n))),A(d.default,{offset:4},void 0,A("button",{type:"button",onClick:c,className:b.default.barButtonAlt},void 0,C.default.Messages.MARK_AS_READ,A(S.default,{className:b.default.barButtonIcon}))))},t.LoadingMore=V,t.PopoutLoadingAnimation=t.MessagePopoutContent=t.renderClickableTooltipNode=t.ErrorLoadingBar=t.JumpToPresentBar=t.JumpBarType=t.EXPRESSION_TOOLTIP_PROPS=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=M(n(390)),l=n(8321),u=M(n(9279)),s=M(n(1326)),d=M(n(88)),f=M(n(200)),c=M(n(61)),p=M(n(9282)),v=M(n(8801)),y=M(n(8593)),m=M(n(151)),_=M(n(149)),h=n(85),E=n(5973),g=M(n(683)),S=M(n(9287)),O=M(n(24)),I=n(48),T=n(9288),C=M(n(6)),b=M(n(7439));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(){return(P=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}).apply(this,arguments)}function R(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var L={delay:300,position:_.default.Positions.TOP};t.EXPRESSION_TOOLTIP_PROPS=L;var D,w=function(e){return function(t){e&&e(t),(0,T.setVolume)(t)}},j=function(e){return function(t){e&&e(t),(0,T.setMuted)(t)}};function k(e){var t=e.onVolumeChange,n=e.onMute,r=e.volume,o=e.autoMute,i=R(e,["onVolumeChange","onMute","volume","autoMute"]),l=w(t),u=j(n);return r=null==r?T.getVolume:r,o=null==o?T.getMuted:o,a.createElement(v.default,P({},i,{volume:r,autoMute:o,onVolumeChange:l,onMute:u,renderLinkComponent:F}))}function U(e){var t=e.onVolumeChange,n=e.volume,r=e.onMute,o=R(e,["onVolumeChange","volume","onMute"]),i=w(t),l=j(r);n=null==n?T.getVolume:n;return a.createElement(p.default,P({},o,{onVolumeChange:i,onMute:l,volume:n,autoMute:function(){return!1},renderLinkComponent:F}))}function G(e){return a.createElement(u.default,P({},e,{renderLinkComponent:F}))}function F(e){return a.createElement(s.default,e)}function B(e){return a.createElement(y.default,e)}k.displayName="renderVideoComponent",U.displayName="renderAudioComponent",G.displayName="renderImageComponent",F.displayName="renderMaskedLinkComponent",B.displayName="renderPlaintextFilePreview",t.JumpBarType=D,function(e){e[e.OLD_MESSAGES=0]="OLD_MESSAGES",e[e.REPLY=1]="REPLY"}(D||(t.JumpBarType=D={}));var H=function(e){var t=e.type,n=void 0===t?D.OLD_MESSAGES:t,r=e.onClick;return A(E.MessagesInteractionContext.Consumer,{},void 0,(function(e){return e.disableInteractions?null:A("div",{className:b.default.jumpToPresentBar},void 0,A(d.default,{offset:4},void 0,A("button",{type:"button",onClick:r,className:b.default.barButtonMain},void 0,function(e){switch(e){case D.OLD_MESSAGES:return C.default.Messages.YOURE_VIEWING_OLDER_MESSAGES;case D.REPLY:return C.default.Messages.JUMP_BAR_VIEWING_REPLY;default:return(0,I.assertNever)(e)}}(n))),null!=r?A(d.default,{offset:4},void 0,A("button",{type:"button",onClick:r,className:b.default.barButtonAlt},void 0,function(e){switch(e){case D.OLD_MESSAGES:return C.default.Messages.JUMP_TO_PRESENT;case D.REPLY:return C.default.Messages.JUMP_TO_ORIGINAL_MESSAGE;default:return(0,I.assertNever)(e)}}(n),A(g.default,{className:b.default.barButtonIcon}))):A(m.default,{type:m.default.Type.PULSING_ELLIPSIS,className:b.default.spinner,itemClassName:b.default.spinnerItem}))}))};t.JumpToPresentBar=H,H.displayName="JumpToPresentBar";var x=function(e){var t=e.onClick,n=e.loading;return A(E.MessagesInteractionContext.Consumer,{},void 0,(function(e){return e.disableInteractions?null:A(c.default,{className:b.default.messagesErrorBar,onClick:t,focusProps:{offset:{top:4,right:4,bottom:12,left:4}}},void 0,A("div",{className:b.default.barButtonMain},void 0,C.default.Messages.MESSAGES_FAILED_TO_LOAD),n?A(m.default,{type:m.default.Type.PULSING_ELLIPSIS,className:b.default.spinner,itemClassName:b.default.spinnerItem}):A("div",{className:b.default.barButtonAlt},void 0,C.default.Messages.MESSAGES_FAILED_TO_LOAD_TRY_AGAIN))}))};function V(){return A("div",{className:b.default.loadingMore,"aria-label":C.default.Messages.LOADING_MESSAGES_A11Y_LABEL},void 0,A(m.default,{className:b.default.spinner}))}t.ErrorLoadingBar=x,x.displayName="ErrorLoadingBar",V.displayName="LoadingMore";var W=function(e){return A("div",{className:b.default.tooltip},void 0,A(O.default,{color:O.default.Colors.CUSTOM},void 0,e),A(O.default,{className:b.default.clickCTA,color:O.default.Colors.CUSTOM},void 0,C.default.Messages.EMOJI_TOOLTIP_CLICK_CTA))};t.renderClickableTooltipNode=W,W.displayName="renderClickableTooltipNode";var Y=function(e){var t=e.children,n=e.className;return A("div",{className:(0,o.default)(b.default.popoutContainer,n)},void 0,t)};t.MessagePopoutContent=Y,Y.displayName="MessagePopoutContent";var z=function(e){var t=e.className;return A(Y,{className:t},void 0,A("div",{className:b.default.popoutLoadingBackground},void 0,A("div",{className:b.default.popoutLoadingForeground})))};t.PopoutLoadingAnimation=z,z.displayName="PopoutLoadingAnimation"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={open:function(e){a.default.dirtyDispatch({type:o.ActionTypes.POPOUT_OPEN,popout:e})},close:function(e){a.default.dirtyDispatch({type:o.ActionTypes.POPOUT_CLOSE,key:e})},closeAll:function(){a.default.dirtyDispatch({type:o.ActionTypes.POPOUT_CLOSE_ALL})},rerender:function(e){a.default.dirtyDispatch({type:o.ActionTypes.POPOUT_NEEDS_RERENDER,key:e})},didRerender:function(e){a.default.dirtyDispatch({type:o.ActionTypes.POPOUT_DID_RERENDER,key:e})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openUserProfileModal=function(e){var t=e.userId,n=e.section,u=e.guildId,s=void 0===u?l.ME:u,d=e.friendToken,f=o.default.getUser(t);if(null==f)return(0,a.fetchProfile)(t,{friendToken:d}).then((function(){r.default.dispatch({type:l.ActionTypes.USER_PROFILE_MODAL_OPEN,userId:t,section:n,guildId:s,friendToken:d})}));(0,i.default)(t,f.getAvatarURL(void 0),{withMutualGuilds:!0,friendToken:d}),r.default.dispatch({type:l.ActionTypes.USER_PROFILE_MODAL_OPEN,userId:t,section:n,guildId:s,friendToken:d})},t.closeUserProfileModal=function(){r.default.dispatch({type:l.ActionTypes.USER_PROFILE_MODAL_CLOSE})};var r=u(n(2)),a=n(1150),o=u(n(12)),i=u(n(8264)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setActiveCommand=function(e){o.default.dirtyDispatch({type:l.ActionTypes.APPLICATION_COMMAND_SET_ACTIVE_COMMAND,command:e})},t.setPreferredCommandId=function(e){o.default.dirtyDispatch({type:l.ActionTypes.APPLICATION_COMMAND_SET_PREFERRED_COMMAND,commandId:e})},t.updateOptionStates=function(e){o.default.dirtyDispatch({type:l.ActionTypes.APPLICATION_COMMAND_UPDATE_OPTIONS,changedOptionStates:e})},t.queryDmApplicationCommands=function(e,t){return f.apply(this,arguments)},t.clearGuildDiscoveryCommands=t.getApplicationDiscoveryCommands=t.queryGuildApplications=t.queryGuildApplicationCommands=void 0;var r=u(n(8)),a=u(n(14)),o=u(n(2)),i=u(n(97)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get(l.Endpoints.APPLICATION_BOT_COMMANDS(t));case 2:(r=e.sent).ok&&o.default.dirtyDispatch({type:l.ActionTypes.DM_APPLICATION_COMMANDS_UPDATE,botUserId:t,applicationCommands:r.body,commandTarget:n});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var c=r.default.debounce((function(e,t,n,r,a){o.default.dirtyDispatch({type:l.ActionTypes.APPLICATION_COMMAND_QUERY_REQUEST,guildId:e,query:t,limit:n,nonce:i.default.fromTimestamp(Date.now()),includeApplications:a,commandTarget:r})}),250,{leading:!0,trailing:!0,maxWait:750});t.queryGuildApplicationCommands=c;t.queryGuildApplications=function(e,t,n){o.default.dirtyDispatch({type:l.ActionTypes.APPLICATIONS_REQUEST,guildId:e,nonce:i.default.fromTimestamp(Date.now()),commandLimit:t,commandTarget:n})};t.getApplicationDiscoveryCommands=function(e,t,n,r,a,u){o.default.dirtyDispatch({type:l.ActionTypes.APPLICATION_COMMAND_DISCOVERY_REQUEST,guildId:e,offset:t,limit:n,isBefore:r,commandTarget:a,jumpDescriptor:u,nonce:i.default.fromTimestamp(Date.now())})};t.clearGuildDiscoveryCommands=function(){o.default.dirtyDispatch({type:l.ActionTypes.CLEAR_GUILD_DISCOVERY_COMMANDS})}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,d:"M21.526 8.149C21.231 7.966 20.862 7.951 20.553 8.105L18 9.382V7C18 5.897 17.103 5 16 5H4C2.897 5 2 5.897 2 7V17C2 18.104 2.897 19 4 19H16C17.103 19 18 18.104 18 17V14.618L20.553 15.894C20.694 15.965 20.847 16 21 16C21.183 16 21.365 15.949 21.526 15.851C21.82 15.668 22 15.347 22 15V9C22 8.653 21.82 8.332 21.526 8.149Z"}))}d.displayName="CallVideoCamera"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(9)),i=n(3),l=n(123),u=n(5937),s=A(n(180)),d=n(8328),f=A(n(39)),c=A(n(150)),p=n(193),v=n(252),y=A(n(29)),m=A(n(61)),_=A(n(55)),h=A(n(477)),E=A(n(375)),g=A(n(371)),S=A(n(149)),O=A(n(159)),I=A(n(279)),T=A(n(47)),C=A(n(24)),b=n(1),M=A(n(6)),N=A(n(7558));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var D=function(e){var t=e.text;return L(O.default,{className:N.default.header},void 0,t)};D.displayName="InviteHeader";var w=function(e){var t=e.resolving,n=e.children;return L("div",{className:N.default.content},void 0,t?L("div",{className:N.default.resolving},void 0,L("div",{className:N.default.resolvingBackground})):n)};w.displayName="InviteBody";var j=function(e){var t=e.title,n=e.onClick,r=e.expired,a=e.children,o=L(T.default,{size:T.default.Sizes.SIZE_16,className:(0,v.getClass)(N.default,"inviteDestination",r?"Expired":null!=n?"Joined":"")},void 0,t);return L(_.default,{className:N.default.guildInfo,direction:_.default.Direction.VERTICAL,justify:_.default.Justify.CENTER},void 0,null==n?o:L(m.default,{onClick:n},void 0,o),L(C.default,{tag:"strong",className:N.default.guildDetail},void 0,a))};j.displayName="InviteInfo";var k=function(e){var t=e.membersOnline,n=e.members,r=[];return null!=t&&t>0&&r.push(L(a.Fragment,{},"onlineCount",L("i",{className:N.default.statusOnline}),L("span",{className:N.default.count},void 0,M.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:t})))),null!=n&&r.push(L(a.Fragment,{},"memberCount",L("i",{className:N.default.statusOffline}),L("span",{className:N.default.count},void 0,M.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:n})))),L("div",{className:N.default.statusCounts},void 0,r)};k.displayName="InviteData";var U=function(e){var t=e.channel,n=e.guild,r=(0,d.getChannelIconComponent)(t,n);return null==t||null==r?null:L("div",{className:N.default.channel},void 0,L(r,{className:N.default.channelIcon,width:20,height:20}),L("span",{className:N.default.channelName},void 0,t.name))};U.displayName="InviteChannel";var G=function(e){var t=e.children,n=e.onClick,r=e.className,i=e.isDisabled,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","onClick","className","isDisabled"]);return a.createElement(y.default,R({},l,{disabled:i,onClick:n,size:N.default.buttonSize,className:(0,o.default)(N.default.button,r)}),t)};G.displayName="InviteActionButton",G.Colors=y.default.Colors,G.Looks=y.default.Looks,G.defaultProps={className:null,isDisabled:!1};var F=function(e){var t=e.children;return L("div",{className:N.default.wrapper},void 0,t)};F.displayName="InviteButton";var B=function(e){var t,n=e.guild,r=a.useState(!1),i=r[0],l=r[1],u=c.default.getGuildSplashURL({id:n.id,splash:n.splash,size:400*(0,p.getDevicePixelRatio)()});return null==u?null:L("div",{className:N.default.inviteSplash},void 0,L("img",{src:u,alt:"",className:(0,o.default)(N.default.inviteSplashImage,(t={},t[N.default.inviteSplashImageLoaded]=i,t)),onLoad:function(){return l(!0)}}))};B.displayName="InviteGuildSplash";var H=function(e){var t=e.guild;return L("div",{className:N.default.guildNameWrapper},void 0,t.hasFeature(b.GuildFeatures.VERIFIED)||t.hasFeature(b.GuildFeatures.PARTNERED)?L(E.default,{guild:t,tooltipPosition:S.default.Positions.TOP,tooltipColor:S.default.Colors.PRIMARY,className:N.default.guildBadge}):null,L("span",{className:N.default.guildName},void 0,t.name))};H.displayName="InviteGuildName";var x=function(e){var t=e.guildTemplate;return L("div",{className:N.default.guildNameWrapper},void 0,L("span",{className:N.default.guildName},void 0,t.serializedSourceGuild.name))};x.displayName="InviteGuildTemplateName",F.Header=D,F.Body=w,F.Icon=function(e){var t,n=e.application,r=e.guild,o=e.guildTemplate,d=e.channel,c=e.onClick,p=e.expired,y=void 0!==p&&p,m=null!==(t=(0,s.default)(d))&&void 0!==t?t:"",_=a.useContext(l.AccessibilityPreferencesContext).reducedMotion,E=(0,i.useStateFromStores)([f.default],(function(){return f.default.gifAutoPlay}));if(y||null==r&&null==d&&null==o)return L("div",{className:N.default.guildIconExpired});var S=null==r||null!=r.icon,O=(0,v.getClass)(N.default,"guildIcon",S?"Image":"",null!=c?"Joined":"");return null!=n?L(h.default,{game:n,onClick:c,size:N.default.applicationIcon,className:O}):null!=r?L(g.default,{onClick:c,active:!0,guild:r,className:O,animate:!_.enabled&&E}):null!=d?L(I.default,{onClick:c,src:(0,u.getChannelIconURL)(d),size:I.default.Sizes.SIZE_80,className:O,"aria-label":m}):null},F.Info=j,F.Data=k,F.Channel=U,F.Button=G,F.GuildSplash=B,F.GuildName=H,F.GuildTemplateName=x;var V=F;t.default=V},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=n(687),l=c(n(473)),u=c(n(61)),s=n(1),d=c(n(6)),f=c(n(7702));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){t.props.disableButton||((0,i.pushLayer)(s.Layers.USER_SETTINGS),l.default.setSection(s.UserSettingsSections.STREAMER_MODE))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.prototype.render=function(){var e;return v("div",{className:f.default.streamerModeEnabled},void 0,v("div",{className:f.default.streamerModeEnabledImage}),v(u.default,{className:(0,o.default)(f.default.streamerModeEnabledBtn,(e={},e[f.default.disabled]=this.props.disableButton,e)),onClick:this.handleClick},void 0,d.default.Messages.STREAMER_MODE_ENABLED))},r}(a.Component);m.displayName="StreamerModeEnabled",m.defaultProps={disableButton:!1};var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(8254)),o=l(n(8369)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}var d={init:function(){r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_INIT})},setSection:function(e){r.default.dirtyDispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SET_SECTION,section:e})},startEditingIntegration:function(e){r.default.dirtyDispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_START_EDITING_INTEGRATION,integrationId:e})},stopEditingIntegration:function(){r.default.dirtyDispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_STOP_EDITING_INTEGRATION})},updateIntegration:function(e){r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_UPDATE_INTEGRATION,settings:e})},startEditingWebhook:function(e){r.default.dirtyDispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_START_EDITING_WEBHOOK,webhookId:e})},stopEditingWebhook:function(){r.default.dirtyDispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_STOP_EDITING_WEBHOOK})},updateWebhook:function(e){r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_UPDATE_WEBHOOK,settings:e})},saveIntegration:function(e,t){return s(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SUBMITTING}),n.next=4,a.default.updateIntegration(e,t.id,t.expire_behavior,t.expire_grace_period,t.enable_emoticons);case 4:r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SAVE_SUCCESS}),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SAVE_FAILURE,errors:n.t0.body});case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()},saveWebhook:function(e,t){return s(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SUBMITTING}),n.next=4,o.default.update(e,t.id,t);case 4:r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SAVE_SUCCESS}),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),r.default.dispatch({type:i.ActionTypes.INTEGRATION_SETTINGS_SAVE_FAILURE,errors:n.t0.body});case 10:case"end":return n.stop()}}),n,null,[[0,7]])})))()}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9997)),i=v(n(9151)),l=v(n(8282)),u=v(n(16)),s=v(n(43)),d=n(299),f=v(n(10020)),c=v(n(10021)),p=v(n(7387));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){h(o,r,a,i,l,"next",e)}function l(e){h(o,r,a,i,l,"throw",e)}i(void 0)}))}}function g(){return S.apply(this,arguments)}function S(){return(S=E(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u.default.isOSX()||!u.default.embedded){e.next=14;break}return e.next=3,null===(n=(r=window.DiscordNative.remoteApp).getDefaultDoubleClickAction)||void 0===n?void 0:n.call(r);case 3:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=7;break}e.t0=void 0!==t;case 7:if(!e.t0){e.next=11;break}e.t2=t,e.next=12;break;case 11:e.t2="Maximize";case 12:"Minimize"===(a=e.t2)?s.default.minimize():"Maximize"===a&&s.default.maximize();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O=m(c.default,{}),I=m(i.default,{}),T=m(f.default,{}),C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).renderToolbar=function(){var e=t.props,n=e.isGuest,r=e.toolbar;return null==r||d.isMobile?null:m(a.Fragment,{},void 0,r,t.renderSearch(),O,n?null:I,T)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var i=r.prototype;return i.renderSearch=function(){var e=this.props,t=e.guildId,n=e.channelId;return e.hideSearch?null:null!=n?m(o.default,{className:p.default.search},t||n):null},i.renderLoggedOut=function(){var e=this.props,t=e.children,n=e.className,r=e["aria-label"];return m(l.default,{className:n,onDoubleClick:g,"aria-label":r},void 0,t)},i.renderLoggedIn=function(){var e=this.props,t=e.children,n=e.className,r=e.transparent,a=e["aria-label"];return m(l.default,{className:n,toolbar:this.renderToolbar(),transparent:r,onDoubleClick:g,"aria-label":a},void 0,t)},i.render=function(){return this.props.isAuthenticated?this.renderLoggedIn():this.renderLoggedOut()},r}(a.Component);C.displayName="HeaderBarContainer",C.Title=l.default.Title,C.Icon=l.default.Icon,C.Divider=l.default.Divider,C.Caret=l.default.Caret,C.defaultProps={isAuthenticated:!0,transparent:!1};var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,Object.defineProperty(t,"Positions",{enumerable:!0,get:function(){return i.TooltipPositions}});var r,a=d(n(0)),o=u(n(9)),i=d(n(149)),l=u(n(7428));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.children,n=e["aria-label"],r=e.className,u=e.position,s=a.useRef(null),d=null!=n?n:"string"==typeof t&&t;return f(i.default,{position:u||i.default.Positions.TOP,delay:500,text:t,"aria-label":d},void 0,(function(n){var i=n.onMouseEnter,u=n.onMouseLeave;return a.createElement("div",{className:(0,o.default)(r,l.default.overflow),ref:s,"aria-hidden":e["aria-hidden"],onMouseEnter:function(){var e=s.current;null!=e&&e.offsetWidth<e.scrollWidth&&(null==i||i())},onMouseLeave:u},t)}))}c.displayName="OverflowTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7397));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t,n=e.width,r=void 0===n?24:n,i=e.height,l=void 0===i?24:i,s=e.color,d=void 0===s?"currentColor":s,f=e.className,c=e.foreground,p=e.open,v=void 0!==p&&p;return u("svg",{className:(0,a.default)(o.default.arrow,f,(t={},t[o.default.open]=v,t)),width:r,height:l,viewBox:"0 0 24 24"},void 0,u("path",{className:c,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M16.59 8.59004L12 13.17L7.41 8.59004L6 10L12 16L18 10L16.59 8.59004Z"}))}s.displayName="DropdownArrow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ack=f,t.ackCategory=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!1);var r=i.default.getChannel(e);if(null==r||null==r.guild_id)return;var u=l.default.getCategories(r.guild_id);if(null==u[e])return;var s=u[e].filter((function(e){var t=e.channel;return(0,o.isGuildTextChannelType)(t.type)})).map((function(e){return e.channel.id})),c=[].concat(s);s.forEach((function(e){var t=a.default.getActiveJoinedThreadsForParent(r.guild_id,e);for(var n in t)c.push(n)}));for(var p,v=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(c);!(p=v()).done;){f(p.value,t,n)}},t.bulkAck=function(e){r.default.dispatch({type:u.ActionTypes.BULK_ACK,channels:e,context:u.CURRENT_APP_CONTEXT})},t.localAck=function(e){r.default.dispatch({type:u.ActionTypes.CHANNEL_LOCAL_ACK,channelId:e})},t.enableAutomaticAck=function(e){r.default.dirtyDispatch({type:u.ActionTypes.ENABLE_AUTOMATIC_ACK,channelId:e})},t.disableAutomaticAck=function(e){r.default.dirtyDispatch({type:u.ActionTypes.DISABLE_AUTOMATIC_ACK,channelId:e})};var r=s(n(2)),a=s(n(300)),o=n(31),i=s(n(10)),l=s(n(1252)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,a,o){void 0===t&&(t=!1),void 0===n&&(n=!1),r.default.dispatch({type:u.ActionTypes.CHANNEL_ACK,channelId:e,messageId:a,immediate:t,force:n,context:u.CURRENT_APP_CONTEXT,location:o})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=F;U(n(0));var r,a=n(389),o=j(n(8257)),i=n(286),l=j(n(8323)),u=j(n(8500)),s=j(n(8258)),d=j(n(8405)),f=U(n(8253)),c=j(n(8430)),p=j(n(9296)),v=j(n(11)),y=n(717),m=j(n(8378)),_=j(n(8379)),h=j(n(8380)),E=j(n(8603)),g=j(n(8340)),S=j(n(8384)),O=j(n(8385)),I=j(n(8607)),T=j(n(8386)),C=j(n(8505)),b=j(n(8343)),M=j(n(8608)),N=j(n(8387)),A=j(n(8324)),P=j(n(8435)),R=j(n(8407)),L=j(n(8388)),D=n(1),w=j(n(6));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e){var t=e.user,n=e.guildId,r=e.channelId,j=e.showMediaItems,k=void 0!==j&&j,U=e.showChatItems,F=void 0===U||U,B=e.showChannelCallItems,H=void 0!==B&&B,x=e.showModalItems,V=void 0===x||x,W=e.showStageChannelItems,Y=void 0!==W&&W,z=e.popoutPosition,K=void 0===z?y.PopoutPositions.RIGHT:z,$=e.target,Z=e.analyticsContext,q=e.context,X=e.onSelect,J=(0,A.default)(t.id,n,q),Q=(0,C.default)(t,n,q),ee=(0,b.default)(t.id,q),te=(0,L.default)(t.id),ne=(0,O.default)(t,q),re=(0,h.default)({user:t,guildId:n,channelId:r,target:$,popoutPosition:K,context:q}),ae=(0,_.default)(t),oe=(0,R.default)(t.id),ie=(0,N.default)(t.id),le=(0,d.default)(n,t.id,{page:D.AnalyticsPages.GUILD_CHANNEL,section:D.AnalyticsSections.CHAT_USERNAME,object:D.AnalyticsObjects.CONTEXT_MENU_ITEM},q),ue=(0,T.default)(t,n),se=(0,l.default)(null,t),de=(0,m.default)(t),fe=(0,S.default)(t),ce=(0,E.default)(t,n,r),pe=(0,P.default)(t.id,n),ve=(0,M.default)(t,n),ye=(0,s.default)(t.id),me=(0,I.default)(t.id,r),_e=(0,u.default)(r),he=(0,c.default)(t,q),Ee=(0,p.default)(t,n,r,q),ge=(0,g.default)(i.ApplicationCommandTarget.USER,r,n);return v.default.isGuest()||t.isNonUserBot()?null:G(o.default,{context:Z,object:D.AnalyticsObjects.CONTEXT_MENU},void 0,G(f.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":w.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:X},void 0,G(f.MenuGroup,{},void 0,he,Y&&Ee),G(f.MenuGroup,{},void 0,V&&J,F&&Q,ee,ne,V&&re,V&&ae,te),k&&G(f.MenuGroup,{},void 0,oe),G(f.MenuGroup,{},void 0,V&&se),G(f.MenuGroup,{},void 0,k&&ie,k&&me,V&&le,ge,V&&ue,de,V&&fe),G(f.MenuGroup,{},void 0,ce),G(f.MenuGroup,{},void 0,pe,ve),H&&G(f.MenuGroup,{},void 0,_e),G(f.MenuGroup,{},void 0,ye)))}F.displayName="GuildChannelUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.useStateFromStores)([I.default],(function(){return I.default.getActivities()})),r=(0,a.useStateFromStores)([g.default],(function(){return null!=t?g.default.getActivities(t.id,null==e?void 0:e.getGuildId()):[]}),[t,e]),w=(0,a.useStateFromStores)([E.default],(function(){return null==e||e.isPrivate()||E.default.can(L.Permissions.SEND_MESSAGES,e)}),[e]),j=(0,a.useStateFromStoresArray)([C.default],(function(){return r.map((function(e){return null!=e.application_id&&C.default.getState(e.application_id,L.ActivityActionTypes.JOIN)===L.ActivityActionStates.LOADING}))}),[r]),F=(0,a.useStateFromStoresArray)([m.default,h.default,_.default,S.default,O.default,T.default,E.default],(function(){return r.map((function(e){return(0,N.default)(t,e,m.default,h.default,_.default,S.default,O.default,T.default,E.default)}))}),[t,r]),B=(0,a.useStateFromStoresArray)([s.default,y.default],(function(){return r.map((function(e){return e.type===L.ActivityTypes.LISTENING&&null!=t?(0,c.default)(s.default,y.default,t,e):void 0}))}),[t,r]);if(!w)return null;var H=function(n,r){null!=e?o.default.sendActivityInvite({type:n,channelId:e.id,activity:r,location:L.AnalyticsLocations.CONTEXT_MENU}):null!=t&&o.default.sendActivityInviteUser({type:n,userId:t.id,activity:r,location:L.AnalyticsLocations.CONTEXT_MENU})},x=function(){var e,n=(e=regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.default.join(t.id,n.session_id,n.application_id,O.default.getVoiceChannelId(),null,R.ActivityIntent.PLAY,(0,A.default)(n,L.ActivityFlags.EMBEDDED));case 2:(0,P.default)(L.AnalyticsGameOpenTypes.JOIN,L.AnalyticsLocations.CONTEXT_MENU,t.id,n);case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){U(o,r,a,i,l,"next",e)}function l(e){U(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),V=[];n.forEach((function(e,t){e.type===L.ActivityTypes.PLAYING&&(0,A.default)(e,L.ActivityFlags.JOIN)?V.push(k(l.MenuItem,{id:"invite-to-join",label:D.default.Messages.USER_ACTIVITY_ACTION_INVITE_TO_JOIN,subtext:e.name,action:function(){return H(L.ActivityActionTypes.JOIN,e)}},"self"+t)):e.type===L.ActivityTypes.LISTENING&&(0,A.default)(e,L.ActivityFlags.SYNC)&&V.push(k(l.MenuItem,{id:"invite-to-listen",label:D.default.Messages.USER_ACTIVITY_ACTION_INVITE_TO_LISTEN_ALONG,subtext:e.name,action:function(){return H(L.ActivityActionTypes.LISTEN,e)}},"self"+t))})),V.length>0&&V.push(G);return r.forEach((function(n,r){if(n.type===L.ActivityTypes.PLAYING&&(0,A.default)(n,L.ActivityFlags.JOIN)&&null!=n.session_id&&null!=n.application_id)if(F[r]){var a=j[r];V.push(k(l.MenuItem,{id:"join",label:a?D.default.Messages.USER_ACTIVITY_JOINING:D.default.Messages.JOIN,disabled:a,hint:a?k(b.default,{type:b.default.Type.PULSING_ELLIPSIS}):null,subtext:n.name,action:function(){return x(n)}},r))}else V.push(k(l.MenuItem,{id:"ask-to-join",label:D.default.Messages.USER_ACTIVITY_ACTION_ASK_TO_JOIN,subtext:n.name,action:function(){return H(L.ActivityActionTypes.JOIN_REQUEST,n)}},r));else if(n.type===L.ActivityTypes.LISTENING&&(0,A.default)(n,L.ActivityFlags.SYNC)&&null!=B[r]){var o=B[r],i=o.notPlayable,s=o.playingSameTrack,c=o.isCurrentUser,y=o.syncingWithUser,m=o.syncingWithParty,_=c||i||s,h=c||y||m;V.push(k(l.MenuItem,{id:"spotify-play-"+n.session_id,action:function(){return(0,v.default)(o,u.SpotifyActionTypes.USER_ACTIVITY_PLAY)},label:(0,d.default)(o,u.SpotifyActionTypes.USER_ACTIVITY_PLAY),subtext:_?(0,f.default)(o,u.SpotifyActionTypes.USER_ACTIVITY_PLAY,null!=e?M.default.getNickname(e.guild_id,e.id,t):void 0):void 0,disabled:_},"spotify-play-"+n.session_id),k(l.MenuItem,{id:"spotify-sync-"+n.session_id,action:function(){return(0,p.default)(o,u.SpotifyActionTypes.USER_ACTIVITY_SYNC)},label:D.default.Messages.USER_ACTIVITY_LISTEN_ALONG,subtext:h?(0,f.default)(o,u.SpotifyActionTypes.USER_ACTIVITY_SYNC,null!=e?M.default.getNickname(e.guild_id,e.id,t):void 0):void 0,disabled:h},"spotify-sync-"+n.session_id))}})),V};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=w(n(1234)),i=w(n(478)),l=n(8253),u=n(293),s=w(n(708)),d=w(n(8817)),f=w(n(8727)),c=w(n(8728)),p=w(n(8729)),v=w(n(8730)),y=w(n(11)),m=w(n(10)),_=w(n(684)),h=w(n(15)),E=w(n(40)),g=w(n(256)),S=w(n(70)),O=w(n(36)),I=w(n(479)),T=w(n(80)),C=w(n(8429)),b=w(n(151)),M=w(n(258)),N=w(n(8597)),A=w(n(399)),P=w(n(8499)),R=n(156),L=n(1),D=w(n(6));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function U(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var G=k(l.MenuSeparator,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(8309)),o=n(8253),i=n(8310),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t,n){return n===l.AppContext.POPOUT?null:f(o.MenuItem,{id:"user-profile",label:u.default.Messages.PROFILE,action:function(){(0,i.openUserProfileModal)({userId:e,guildId:t||void 0}),a.default.close()}})}c.displayName="useUserProfileItem"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findPointInBlockNode=function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r=!1);var a=v(e,t,n,r);if(null==a)throw p.error(JSON.stringify({block:e.toJSON(),index:t,includePath:n})),new Error("Slate: Unable to find point in text node v2");return a},t.selectionToLineChar=function(e,t){if(!t.isCollapsed)return null;var n=e.getClosestBlock(t.start.key);if(null==n)return null;var r=e.nodes.indexOf(n);if(-1===r)return null;var a=y(n,t.start);return{line:r,character:a}},t.getOffsetOnLine=y,t.iterateNodes=function e(t,n){if(n(t),"text"!==t.object&&null!=t.nodes)for(var r,a=d(t.nodes);!(r=a()).done;){var o=r.value;e(o,n)}},t.restoringExactSelection=function(e,t){var n=m(e.value.document,e.value.selection.anchor),r=m(e.value.document,e.value.selection.focus);if(t(),null!=n&&null!=r){var o=_(e.value.document,n),i=_(e.value.document,r);null!=o&&null!=i&&e.select(a.Range.create({anchor:o,focus:i}))}},t.pointToLineChar=m,t.lineCharToPoint=_,t.serializeToVisualText=function e(t){return"document"===t.object||"block"===t.object&&a.Block.isBlockList(t.nodes)?t.nodes.map(e).join("\n"):t.text},t.catchAndLogExceptions=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,n)}catch(e){return p.error("Caught error during slate event handler, will ignore and continue\n",e),c.captureException(e),n[n.length-1]()}}},t.areStylesDisabledInEditor=function(e){if(1!==e.value.document.nodes.size)return!1;var t=e.value.document.nodes.first();if("block"!==t.object)return!1;var n=t.text;if(n.startsWith("/")){var r=!1;if(o.default.trackExposure({}),o.default.subscribe({},(function(e){r=e.allowSlashCommands}))(),!r)return!0}return n.startsWith("s/")||n.startsWith("+")},t.insertText=function(e,t,n){e.ensureSelection();var r=e.value,o=r.document,i=r.selection;i.isCollapsed||e.delete();var l=o.getClosestBlock(i.start.key),u=null==l?0:o.nodes.indexOf(l),s=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n");e.insertText(s[0]),s.length>1&&e.splitBlock().insertText(s[s.length-1]);for(var d=1;d<=s.length-2;d++){var f=a.Block.create({type:n,nodes:[a.Text.create({text:s[d]})]});e.insertNodeByKey(o.key,u+d,f)}},t.prependText=function(e,t){e.ensureSelection();var n=e.value.document.getFirstText();null!=n&&e.insertTextByKey(n.key,0,t)};var r=s(n(23)),a=n(8315),o=s(n(8617)),i=s(n(26)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8350));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=n(164).default,p=new i.default("SlateUtils");function v(e,t,n,a){if(void 0===n&&(n=!1),void 0===a&&(a=!1),"text"===e.object)return t>e.text.length?null:{key:e.key,offset:t};for(var o,i=t,u=e.nodes.size,s=0,f=d(e.nodes);!(o=f()).done;){var c=o.value,p=1===++s,v=s===u;(0,r.default)("text"===c.object||"inline"===c.object,"Slate: invalid object type %s-%s",c.object,c.type);var y=c.text;if("inline"===c.object&&(l.isOptionNode(c)?(0,r.default)(y.length>0,"Slate: command inline objects must have at least one character"):(0,r.default)(1===y.length,"Slate: non-command inline objects must have one character %s - %s",c.type,y)),i<=y.length){if("inline"!==c.object||a||v){if("inline"===c.object&&a&&!p){if(i===y.length){i=0;continue}var m=e.nodes.get(s-2),_={key:m.key,offset:m.text.length};return n&&(_.path=e.getPath(m.key)||void 0),_}var h={key:c.key,offset:i};return n&&(h.path=e.getPath(c.key)||void 0),h}i=0}else i-=y.length}return null}function y(e,t){for(var n,r=0,a=d(e.nodes);!(n=a()).done;){var o=n.value;if(o.key===t.key){r+=t.offset;break}r+=o.text.length}return r}function m(e,t){var n=e.getClosestBlock(t.key);if(null==n)return null;var a=function(e,t){return(0,r.default)("text"!==e.object&&"inline"!==e.object,"Slate: block may not be a text node"),e.nodes.indexOf(t)}(e,n);if(-1===a)return null;for(var o,i=0,l=d(n.nodes);!(o=l()).done;){var u=o.value;if(u.key===t.key){i+=t.offset;break}i+=u.text.length}return{line:a,character:i}}function _(e,t){var n=e.nodes.get(t.line);return(0,r.default)("block"===n.object,"Slate: The document should only contain block nodes"),v(n,t.character)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=d(n(397)),o=d(n(8422)),i=d(n(8549)),l=n(41),u=d(n(8589)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){return(p=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}).apply(this,arguments)}var v=[{name:s.default.Messages.IMAGES,extensions:["jpg","jpeg","png","gif"]}];function y(e,t){if(null!=e){var n=new FileReader;n.onload=function(n){var r;"string"==typeof(null===(r=n.target)||void 0===r?void 0:r.result)&&t(n.target.result,e.name)},n.readAsDataURL(e)}}function m(e,t,n){"image/gif"!==e.type?y(e,(function(e,u){var d=new Image;d.src=e,d.onload=function(){(0,l.openModal)((function(e){return r.createElement(i.default,p({},e,{imgURI:d.src,onCrop:t,filename:u,uploadType:n}))}))},d.onerror=function(){a.default.push(o.default,{title:s.default.Messages.PREMIUM_ALERT_ERROR_TITLE,help:s.default.Messages.UNABLE_TO_PROCESS_IMAGE})}})):y(e,(function(e,n){return t(e,n,!0)}))}var _=function(e){var t,n;function a(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return(t=e.call.apply(e,[this].concat(a))||this)._ref=r.createRef(),t._isMounted=!1,t.handleFileChange=function(e){var n=t.props,r=n.showEditingModal,a=n.uploadType,o=n.onFileSizeError,i=n.maxFileSizeBytes;if(e.stopPropagation(),e.preventDefault(),null!=e.currentTarget.files)for(var l=0;l<e.currentTarget.files.length;l++){var u=e.currentTarget.files[l];u.size>i?null==o||o():r?m(u,t.handleFileRead,a):y(u,t.handleFileRead)}},t.handleFileRead=function(e,n,r){var a=t.props.onChange;t._isMounted&&a(e,n,r)},t}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=a.prototype;return o.componentDidMount=function(){this._isMounted=!0},o.activateUploadDialogue=function(){var e;null===(e=this._ref.current)||void 0===e||e.activateUploadDialogue()},o.render=function(){var e=this.props,t=e.multiple,n=e.disabled,a=e.className,o=e.tabIndex,i=e["aria-label"];return r.createElement(u.default,{ref:this._ref,onChange:this.handleFileChange,filters:v,multiple:t,disabled:n,className:a,tabIndex:o,"aria-label":i})},a}(r.PureComponent);_.displayName="ImageInput",_.defaultProps={multiple:!0,showEditingModal:!1,tabIndex:-1,maxFileSizeBytes:1/0};var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChannelIconTooltipText=function(e,t,n,r){if(null==e)return null;if(e.id===(null==t?void 0:t.rulesChannelId))return A.default.Messages.CHANNEL_TOOLTIP_RULES;switch(e.type){case N.ChannelTypes.GUILD_TEXT:return r?A.default.Messages.CHANNEL_TOOLTIP_TEXT_ACTIVE_THREADS:e.isNSFW()?A.default.Messages.CHANNEL_TOOLTIP_TEXT_NSFW:(0,M.default)(e)?A.default.Messages.CHANNEL_TOOLTIP_TEXT_LIMITED:A.default.Messages.CHANNEL_TOOLTIP_TEXT;case N.ChannelTypes.GUILD_STAGE_VOICE:return n?A.default.Messages.CHANNEL_TOOLTIP_STAGE_LOCKED:(0,M.default)(e)?A.default.Messages.CHANNEL_TOOLTIP_STAGE_LIMITED:A.default.Messages.CHANNEL_TOOLTIP_STAGE;case N.ChannelTypes.GUILD_VOICE:return n?A.default.Messages.CHANNEL_TOOLTIP_VOICE_LOCKED:(0,M.default)(e)?A.default.Messages.CHANNEL_TOOLTIP_VOICE_LIMITED:A.default.Messages.CHANNEL_TOOLTIP_VOICE;case N.ChannelTypes.GUILD_ANNOUNCEMENT:return e.isNSFW()?A.default.Messages.CHANNEL_TOOLTIP_ANNOUNCEMENTS_NSFW:(0,M.default)(e)?A.default.Messages.CHANNEL_TOOLTIP_ANNOUNCEMENTS_LIMITED:A.default.Messages.CHANNEL_TOOLTIP_ANNOUNCEMENTS;case N.ChannelTypes.GUILD_STORE:return A.default.Messages.CHANNEL_TOOLTIP_STORE;default:return null}},t.getChannelIconComponent=function(e,t,n){var A;void 0===n&&(n={});var P=n,R=P.locked,L=void 0!==R&&R,D=P.video,w=void 0!==D&&D,j=P.stream,k=void 0!==j&&j,U=P.hasActiveThreads,G=void 0!==U&&U;if(null==e)return null;null==t&&(t=r.default.getGuild(e.getGuildId()));if((null==e?void 0:e.id)===(null===(A=t)||void 0===A?void 0:A.rulesChannelId))return u.default;switch(e.type){case N.ChannelTypes.GUILD_ANNOUNCEMENT:return G?e.isNSFW()?m.default:(0,M.default)(e)?h.default:a.default:e.isNSFW()?y.default:(0,M.default)(e)?v.default:p.default;case N.ChannelTypes.GUILD_STORE:return T.default;case N.ChannelTypes.DM:case N.ChannelTypes.GROUP_DM:return o.default;case N.ChannelTypes.PRIVATE_THREAD:return E.default;case N.ChannelTypes.ANNOUNCEMENT_THREAD:case N.ChannelTypes.PUBLIC_THREAD:return e.isNSFW()?_.default:b.default;case N.ChannelTypes.GUILD_TEXT:return G?e.isNSFW()?_.default:(0,M.default)(e)?E.default:b.default:e.isNSFW()?f.default:(0,M.default)(e)?d.default:s.default;case N.ChannelTypes.GUILD_STAGE_VOICE:return L?c.default:(0,M.default)(e)?I.default:O.default;case N.ChannelTypes.GUILD_VOICE:return L?c.default:k?C.default:(0,M.default)(e)?w?l.default:S.default:w?i.default:g.default;case N.ChannelTypes.GUILD_CATEGORY:default:return null}};var r=P(n(15)),a=P(n(9394)),o=P(n(8509)),i=P(n(8313)),l=P(n(9395)),u=P(n(8843)),s=P(n(8307)),d=P(n(8374)),f=P(n(8490)),c=P(n(1221)),p=P(n(8345)),v=P(n(8844)),y=P(n(8845)),m=P(n(9396)),_=P(n(8846)),h=P(n(9397)),E=P(n(8740)),g=P(n(8276)),S=P(n(8510)),O=P(n(291)),I=P(n(9398)),T=P(n(8620)),C=P(n(5955)),b=P(n(8287)),M=P(n(8489)),N=n(1),A=P(n(6));function P(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=y(n(8330)),l=y(n(9126)),u=n(8253),s=n(8256),d=n(31),f=y(n(40)),c=n(41),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e){return(0,o.useStateFromStores)([f.default],(function(){return!f.default.can(e.isThread()?p.Permissions.MANAGE_THREADS:p.Permissions.MANAGE_CHANNELS,e)||(0,d.isGuildSelectableChannelType)(e.type)&&!f.default.can(p.Permissions.VIEW_CHANNEL,e)||e.type===p.ChannelTypes.GUILD_VOICE&&!f.default.can(p.Permissions.CONNECT,e)}),[e])?null:_(u.MenuItem,{id:"delete-channel",label:e.type===p.ChannelTypes.GUILD_CATEGORY?v.default.Messages.DELETE_CATEGORY:e.isThread()?v.default.Messages.DELETE_THREAD:v.default.Messages.DELETE_CHANNEL,color:s.MenuItemColor.DANGER,action:function(){return(0,c.openModal)((function(t){return a.createElement(l.default,h({},t,{onConfirm:function(){t.onClose(),i.default.deleteChannel(e.id)},channel:e}))}))}})}E.displayName="useChannelDeleteItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=d,t.open=f,t.close=c,t.setSection=p,t.selectPermissionOverwrite=v,t.updateChannel=y,t.saveChannel=m,t.deleteChannel=_,t.default=void 0;var r=s(n(14)),a=s(n(2)),o=s(n(727)),i=s(n(10)),l=n(687),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e){a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_INIT,channelId:e})}function f(e){d(e),(0,l.pushLayer)(u.Layers.CHANNEL_SETTINGS)}function c(){a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_CLOSE})}function p(e){a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_SET_SECTION,section:e})}function v(e){a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_OVERWRITE_SELECT,overwriteId:e})}function y(e){var t=e.name,n=e.type,r=e.topic,o=e.bitrate,i=e.userLimit,l=e.nsfw,s=e.rateLimitPerUser,d=e.defaultAutoArchiveDuration,f=e.rtcRegion,c=e.videoQualityMode,p=e.autoArchiveDuration;a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_UPDATE,name:t,channelType:n,topic:r,bitrate:o,userLimit:i,nsfw:l,rateLimitPerUser:s,defaultAutoArchiveDuration:d,rtcRegion:f,videoQualityMode:c,autoArchiveDuration:p})}function m(e,t){var n,l=t.name,s=t.type,d=t.position,f=t.topic,c=t.bitrate,p=t.userLimit,v=t.nsfw,y=t.permissionOverwrites,m=t.rateLimitPerUser,_=t.defaultAutoArchiveDuration,h=t.rtcRegion,E=t.videoQualityMode,g=t.autoArchiveDuration,S=null===(n=i.default.getChannel(e))||void 0===n?void 0:n.getGuildId();return a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_SUBMIT}),r.default.patch({url:u.Endpoints.CHANNEL(e),body:{name:l,type:s,position:d,topic:f,bitrate:c,user_limit:p,nsfw:v,permission_overwrites:y,rate_limit_per_user:m,default_auto_archive_duration:_,rtc_region:h,video_quality_mode:E,auto_archive_duration:g},oldFormErrors:!0}).then((function(t){return a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_SUBMIT_SUCCESS,channelId:e}),null!=S&&o.default.checkGuildTemplateDirty(S),t}),(function(e){return a.default.dispatch({type:u.ActionTypes.CHANNEL_SETTINGS_SUBMIT_FAILURE,errors:e.body}),e}))}function _(e){var t,n=null===(t=i.default.getChannel(e))||void 0===t?void 0:t.getGuildId();r.default.delete({url:u.Endpoints.CHANNEL(e),oldFormErrors:!0}).then((function(){null!=n&&o.default.checkGuildTemplateDirty(n),c()}))}var h={init:d,open:f,close:c,setSection:p,selectPermissionOverwrite:v,updateChannel:y,saveChannel:m,deleteChannel:_};t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"}))}d.displayName="OverflowMenuHorizontal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sizes=t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(5943),i=(r=n(279))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n){return e.getAvatarURL(n,t)}var d=a.memo((function(e){var t=e.user,n=e.size,r=void 0===n?i.default.Sizes.SIZE_32:n,l=e.animate,d=void 0!==l&&l,f=e["aria-hidden"],c=void 0!==f&&f,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["user","size","animate","aria-hidden"]),v=a.useContext(o.GuildIDContext);return a.createElement(i.default,u({src:s(t,d,v),size:r,"aria-label":c?void 0:t.username,"aria-hidden":c},p))}));t.default=d;var f=i.default.Sizes;t.Sizes=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(8325)),a=s(n(3)),o=s(n(2)),i=s(n(1216)),l=s(n(201)),u=s(n(39));n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){return(f=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}).apply(this,arguments)}var c={};function p(e){var t=e.channelId;if(null==t||null==c[t])return!1;delete c[t]}var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.isEditing=function(e,t){var n;return(null===(n=c[e])||void 0===n?void 0:n.messageId)===t},a.isEditingAny=function(e){return null!=c[e]},a.getEditingTextValue=function(e){var t;return null===(t=c[e])||void 0===t?void 0:t.textValue},a.getEditingRichValue=function(e){var t;return null===(t=c[e])||void 0===t?void 0:t.richValue},a.getEditingMessageId=function(e){var t;return null===(t=c[e])||void 0===t?void 0:t.messageId},a.getEditingMessage=function(e){var t=c[e];return null!=t&&null!=t.messageId?l.default.getMessage(e,t.messageId):null},r}(a.default.Store))(o.default,{MESSAGE_START_EDIT:function(e){var t=e.channelId,n=e.messageId,a=e.content,o=!u.default.useRichChatTextBox;c[t]={channelId:t,messageId:n,textValue:i.default.unparse(a,t),richValue:r.default.deserialize(o?i.default.unparse(a,t):a)}},MESSAGE_UPDATE_EDIT:function(e){var t=e.channelId,n=e.textValue,r=e.richValue,a=c[t];if(null==a)return!1;c[t]=f({},a,{textValue:n,richValue:r})},MESSAGE_END_EDIT:p,CHANNEL_SELECT:p});t.default=v},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.IMAGE_GIF_RE=void 0;var r,a,o=c(n(0)),i=n(5965),l=n(193),u=n(1239),s=(r=n(8722))&&r.__esModule?r:{default:r},d=c(n(9281));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=/\.gif($|\?|#)/i;t.IMAGE_GIF_RE=m;var _=p(s.default,{}),h=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).state={readyState:d.ImageReadyStates.LOADING,hasMouseOver:!1},n._cancellers=new Set,n.observeVisibility=function(){r.visibilityObserver.observe(v(n))},n.unobserveVisibility=function(){r.visibilityObserver.unobserve(v(n))},n.handleImageLoad=function(e){return n.setState({readyState:e?d.ImageReadyStates.ERROR:d.ImageReadyStates.READY})},n.preloadImage=function(e,t){var r=e.width,a=e.height,o=n.props,i=o.width,l=o.height;1===i&&1===l||n.loadImage(n.getSrc((0,u.getRatio)(i,l,r,a)),t)},n.onMouseEnter=function(e){r.isAnimated(n.props)&&n.setState({hasMouseOver:!0});var t=n.props.onMouseEnter;null!=t&&t(e,{preloadImage:n.preloadImage})},n.onMouseLeave=function(){return n.setState({hasMouseOver:!1})},n.onClick=function(e){var t=n.props,r=t.onZoom,a=t.onClick;null!=a?a(e):null!=r&&(e.preventDefault(),r(e,{placeholder:n.getSrc(n.getRatio())}))},n.renderAccessory=function(){var e=n.state.hasMouseOver,t=null!=n.props.renderAccessory?n.props.renderAccessory():null;return e?t:_},(0,l.isImageLoaded)(n.getSrc(n.getRatio(),r.isAnimated(n.props)))&&(n.state.readyState=d.ImageReadyStates.READY),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.isAnimated=function(e){var t=e.src,n=e.original;return e.animated||m.test(n||t)};var a=r.prototype;return a.componentDidMount=function(){this.state.readyState===d.ImageReadyStates.LOADING&&this.loadImage(this.getSrc(this.getRatio(),r.isAnimated(this.props)),this.handleImageLoad),r.isAnimated(this.props)&&this.observeVisibility()},a.componentDidUpdate=function(e){var t=r.isAnimated(this.props);r.isAnimated(e)!==t&&(t?this.observeVisibility():this.unobserveVisibility())},a.componentWillUnmount=function(){r.isAnimated(this.props)&&this.unobserveVisibility(),this._cancellers.forEach((function(e){return e()})),this._cancellers.clear()},a.getSrc=function(e,t){void 0===t&&(t=!1);var n=this.props,r=n.src,a=n.width,o=n.height;return(0,l.getImageSrc)(r,a,o,e,t?"png":null)},a.getWidth=function(){var e=this.props,t=e.width,n=e.minWidth;return Math.max(Math.round(t*this.getRatio()),n)},a.getHeight=function(){var e=this.props,t=e.height,n=e.minHeight;return Math.max(Math.round(t*this.getRatio()),n)},a.getRatio=function(){var e=this.props,t=e.width,n=e.height,r=e.maxWidth,a=void 0===r?400:r,o=e.maxHeight,i=void 0===o?300:o;return(0,u.getRatio)(t,n,a,i)},a.loadImage=function(e,t){var n=this,r=this.props,a=r.width,o=r.height;if(1!==a||1!==o){var i=(0,l.loadImage)(e,(function(e,r){null!=i&&n._cancellers.delete(i),t&&t(e,r)}));null!=i&&this._cancellers.add(i)}},a.render=function(){var e=this.props,t=e.alt,n=e.placeholder,a=e.onZoom,i=e.shouldLink,l=e.onContextMenu,u=e.autoPlay,s=e.original,f=e.className,c=e.imageClassName,p=e.children,v=e.animated,y=e.shouldAnimate,m=e.minWidth,_=e.minHeight,h=e.renderItem,E=e.onClick,g=e.renderAccessory,S=e.tabIndex,O=this.state,I=O.readyState,T=O.hasMouseOver,C=!!a,b={alt:null!=t?t:"",readyState:I,onContextMenu:l,zoomable:C,className:f,imageClassName:c,minWidth:m,minHeight:_,tabIndex:S,width:this.getWidth(),height:this.getHeight(),renderItem:h,src:"",children:null!=p?function(e){var t=e.src,n=e.size,r=e.alt;return p({src:t,size:n,alt:r})}:void 0,onMouseEnter:this.onMouseEnter};if(1===b.width&&1===b.height)return null;switch((C||null!=E)&&(b.onClick=this.onClick),i&&(b.original=s||b.src),I){case d.ImageReadyStates.LOADING:null!=n&&(b.src=n);break;case d.ImageReadyStates.READY:if(r.isAnimated(this.props)){b.onMouseLeave=this.onMouseLeave;var M=(u||T)&&(null==y||y)&&r.visibilityObserver.isVisible(this);M?(b.src=this.getSrc(this.getRatio()),b.renderAccessory=g):(b.src=this.getSrc(this.getRatio(),!v),b.renderAccessory=this.renderAccessory),null!=p&&(b.children=function(e){var t=e.src,n=e.size,r=e.alt;return p({src:t,size:n,animating:M,alt:r})})}else b.src=this.getSrc(this.getRatio())}return o.createElement(d.default,b)},r}(o.Component);t.default=h,h.displayName="LazyImage",h.visibilityObserver=new i.VisibilityObserver({threshold:.7}),h.defaultProps={shouldLink:!1,autoPlay:!1,animated:!1,minWidth:0,minHeight:0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(23)),l=y(n(88)),u=n(8549),s=y(n(271)),d=n(139),f=y(n(8327)),c=n(1),p=y(n(6)),v=y(n(7448));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).inputRef=a.createRef(),t.handleRemove=function(){t.props.onChange(null)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var u=r.prototype;return u.handleExternalFileChange=function(e){(0,i.default)(null!=this.inputRef.current,"ImageInputRef asked to handleExternalFileChange when not mounted"),this.inputRef.current.handleFileChange(e)},u.render=function(){var e,t,n,r,i=this.props,u=i.avatar,y=i.hint,m=void 0===y?p.default.Messages.CHANGE_AVATAR:y,E=i.name,g=i.makeURL,S=i.disabled,O=i.onChange,I=i.showIcon,T=i.className,C=i.avatarClassName,b=i.hideSize,M=i.avatarStyle,N=i.showRemoveButton,A=i.showEditingModal,P=i.uploadType,R=i.maxFileSizeBytes,L=i.onFileSizeError;return(e=null!=u&&/^data:/.test(u)?u:g(u))?t='url("'+e+'")':n=h("div",{className:v.default.avatarUploaderAcronym},void 0,(0,d.getAcronym)(E)),S?h("div",{className:(0,o.default)(v.default.avatarUploader,v.default.disabled,T)},void 0,h("div",{className:(0,o.default)(v.default.avatarUploaderInner,C),style:_({},M,{backgroundImage:t})},void 0,n)):(null!=u?r=h(s.default,{className:v.default.removeButton,onClick:this.handleRemove},void 0,p.default.Messages.REMOVE):b||(r=h("small",{className:v.default.sizeInfo},void 0,p.default.Messages.MINIMUM_SIZE.format({size:c.AVATAR_SIZE}))),h("div",{className:(0,o.default)(v.default.avatarUploader,T)},void 0,h(l.default,{within:!0},void 0,h("div",{className:(0,o.default)(v.default.avatarUploaderInner,C),style:_({},M,{backgroundImage:t})},void 0,h("span",{"aria-hidden":!0},void 0,n),m&&h("div",{className:v.default.avatarUploaderHint},void 0,m),a.createElement(f.default,{ref:this.inputRef,onChange:O,className:v.default.fileInput,"aria-label":null!=m?m:p.default.Messages.CHANGE_AVATAR,showEditingModal:A,uploadType:P,tabIndex:0,maxFileSizeBytes:R,onFileSizeError:L}),I&&h("div",{className:v.default.avatarUploaderIndicator}))),N?r:null))},r}(a.PureComponent);g.displayName="AvatarUploader",g.defaultProps={name:"",makeURL:function(e){return e},disabled:!1,showIcon:!1,hideSize:!1,showRemoveButton:!0,showEditingModal:!0,uploadType:u.UploadTypes.AVATAR,maxFileSizeBytes:1/0};var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(9)),o=l(n(29)),i=l(n(7351));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e){var t=e.className,n=e.size,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className","size"]);return r.createElement(o.default,s({className:(0,a.default)(i.default.button,t),size:(0,a.default)(i.default.buttonSize,n)},l))}d.displayName="ActivityButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=M(n(0)),o=C(n(8)),i=n(3),l=C(n(9360)),u=M(n(8311)),s=n(8290),d=C(n(8383)),f=C(n(8341)),c=n(8504),p=n(8260),v=n(8279),y=n(8829),m=n(8342),_=C(n(9367)),h=n(8253),E=C(n(10)),g=C(n(15)),S=C(n(12)),O=n(1),I=C(n(6)),T=C(n(7479));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A=o.default.debounce((function(e,t,n,r){u.getApplicationDiscoveryCommands(e,t,n,!1,r)}),100,{maxWait:100}),P=N(_.default,{}),R=function(e,t,n){var r=(0,i.useStateFromStoresObject)([E.default,g.default],(function(){var e=E.default.getChannel(t);return{channel:e,guild:g.default.getGuild(null!=n?n:null==e?void 0:e.guild_id)}})),o=r.channel,_=r.guild;a.useEffect((function(){return function(){return u.clearGuildDiscoveryCommands()}}),[]),a.useEffect((function(){if(null!=(null==_?void 0:_.id))u.queryGuildApplications(null==_?void 0:_.id,15,e);else if((null==o?void 0:o.type)===O.ChannelTypes.DM){var t=S.default.getUser(o.getRecipientId());!0===(null==t?void 0:t.bot)&&null==d.default.getCommands(t.id,e)&&u.queryDmApplicationCommands(t.id,e)}}),[o,e,_]);var C=a.useCallback((function(t,n){void 0===n&&(n=s.DISCOVERY_COMMANDS_QUERY_LIMIT),(null==_?void 0:_.id)&&A(null==_?void 0:_.id,t,n,e)}),[_,e]),b=(0,y.useApplicationCommandsDiscoveryState)({channel:o,guild:_},1,e),M=b.discoveryCommands,R=b.hasMoreAfter,L=b.guildCommands,D=a.useCallback((function(e){null!=L&&!L.loadingMore&&R&&e+500>34*M.length-40&&C(L.bottomOffset)}),[M.length,R,L,C]),w=a.useCallback((function(e){if(e.type===p.ApplicationCommandType.PLACEHOLDER)return N(h.MenuItem,{id:"menu-command-"+e.id,render:function(){return P}},"menu-command-"+e.id);if(null!=o){var t=(0,c.getCommandSection)(e.applicationId,f.default,S.default,o),n=null!=t?(0,m.getIconComponent)(t):void 0;return N(h.MenuItem,{id:e.id,label:e.name,showIconFirst:!0,disabled:!(0,v.hasAccess)(e),icon:function(){return n?N(n,{section:t,width:16,height:16}):null},action:function(){}},e.id)}return null}),[o]);return l.default.useExperiment({})[0].allowCommands?N(h.MenuItem,{id:"apps",label:I.default.Messages.APPS,onChildrenScroll:D,childRowHeight:34,listClassName:T.default.list},void 0,M.map(w)):null};R.displayName="useAppsCommandItems";var L=R;t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(3)),a=f(n(2)),o=n(286),i=f(n(89)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8311)),u=n(8290),s=n(8260);n(1);function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=null,m=null,_=null,h={};function E(){y=null,m=null,_=null,h={}}function g(e,t,n,r){var a,o=h[e];if(null==o)return!1;var i=o.find((function(e){return e.id===t}));if(null==i||void 0===i.commandCountByTarget)return!1;var l=null!==(a=i.commandCountByTarget[r])&&void 0!==a?a:0;i.commandCountByTarget[r]=l+n,h[e]=[].concat(o)}var S=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.getRemoteGuildApplications=function(e){return null==e?null:h[e]},a.getGuildSectionsWithCommands=function(e,t){return this.getGuildSections(e).filter((function(e){var n,r;return(null!==(n=null===(r=e.commandCountByTarget)||void 0===r?void 0:r[t])&&void 0!==n?n:0)>0}))},a.getGuildSections=function(e){if(null==e)return[];var t=h[e];return null==t?[]:t.concat([])},a.getGuildSection=function(e,t){if(null==e)return null;var n,r=h[e];return null!=r&&null!==(n=r.find((function(e){return e.id===t})))&&void 0!==n?n:null},a.getTotalGuildCommands=function(e,t){for(var n,r=0,a=c(this.getGuildSections(e));!(n=a()).done;){var o,i;r+=null!==(o=null===(i=n.value.commandCountByTarget)||void 0===i?void 0:i[t])&&void 0!==o?o:0}return r},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return E()},LOGOUT:function(e){return E()},GUILD_APPLICATION_COMMANDS_UPDATE:function(e){var t,n=e.applications;if(e.nonce!==y||null==m||null==n||null==_)return!1;var r={};null===(t=h[m])||void 0===t||t.forEach((function(e){r[e.id]=e})),h[m]=n.sort((function(e,t){var n=e.name,r=t.name;return n===r?0:n<r?-1:1})).map((function(e){var t,n,a=null!==(t=null===(n=r[e.id])||void 0===n?void 0:n.commandCountByTarget)&&void 0!==t?t:{};return a[_]=e.command_count,{type:s.ApplicationCommandSectionType.GUILD,id:e.id,name:e.name,icon:e.icon,bot:null!=e.bot?new i.default(e.bot):void 0,commandCountByTarget:a}}))},APPLICATIONS_REQUEST:function(e){var t=e.nonce,n=e.guildId,r=e.commandTarget;y=t,m=n,_=r},APPLICATION_COMMAND_QUERY_REQUEST:function(e){var t=e.nonce,n=e.guildId;e.includeApplications&&(y=t,m=n)},INTEGRATION_CREATE:function(e){var t=e.guildId;return null==e.integration.application||m===t&&null!=_&&l.queryGuildApplications(t,u.DISCOVERY_COMMANDS_QUERY_LIMIT,_),!1},INTEGRATION_DELETE:function(e){var t=e.guildId,n=e.applicationId,r=h[t];if(null==n||null==r)return!1;var a=r.findIndex((function(e){return e.id===n}));if(a<0)return!1;r.splice(a,1),h[t]=[].concat(r)},APPLICATION_COMMAND_CREATE:function(e){var t;g(e.guildId,e.applicationId,1,null!==(t=e.command.type)&&void 0!==t?t:o.ApplicationCommandTarget.CHAT)},APPLICATION_COMMAND_DELETE:function(e){var t;g(e.guildId,e.applicationId,-1,null!==(t=e.command.type)&&void 0!==t?t:o.ApplicationCommandTarget.CHAT)}});t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pxToRem=function(e){return e/16+"rem"},t.isEligibleForCallout=function(e){if(null==e)return!1;return o.default.extractTimestamp(e.id)<(0,r.now)()-f},t.isChannelAvailableForCallout=function(e,t){var n;return(null!==(n=null==t?void 0:t.applicationCommandCount)&&void 0!==n?n:0)>1&&a.default.can(s.Permissions.USE_APPLICATION_COMMANDS,e)&&a.default.can(s.Permissions.SEND_MESSAGES,e)},t.getIconComponent=void 0;var r=n(206),a=d(n(40)),o=d(n(97)),i=n(8260),l=d(n(9365)),u=d(n(9366)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}var f=1e3*s.Durations.DAY*7;t.getIconComponent=function(e){return e.type===i.ApplicationCommandSectionType.BUILT_IN?u.default:l.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(391)),o=n(687),i=n(8253),l=d(n(11)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){var n=l.default.getId(),r=t===u.AppContext.POPOUT;return n===e||r?null:c(i.MenuItem,{id:"message-user",label:s.default.Messages.USER_POPOUT_MESSAGE,action:function(){a.default.openPrivateChannel(e),(0,o.popLayer)()}})}p.displayName="useMessageUserItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchStoreListingsForApplications=function(e){var t=e.filter((function(e){var t=i.default.getGame(e);if(null==t)return!0;var n=t.destinationSkuId;return null==n||null==u.default.getForSKU(n)}));if(0===t.length)return Promise.resolve();return(0,d.httpGetWithCountryCodeQuery)({url:f.Endpoints.STORE_PUBLISHED_LISTINGS_APPLICATIONS,query:{application_ids:t},oldFormErrors:!0}).then((function(e){a.default.dispatch({type:f.ActionTypes.STORE_LISTINGS_FETCH_SUCCESS,storeListings:e.body})}))},t.fetchAllStoreListingsForApplication=function(e){var t={application_id:e};return(0,d.httpGetWithCountryCodeQuery)({url:f.Endpoints.STORE_PUBLISHED_LISTINGS_SKUS,query:t,oldFormErrors:!0}).then((function(e){return a.default.dispatch({type:f.ActionTypes.STORE_LISTINGS_FETCH_SUCCESS,storeListings:e.body}),e.body}))},t.fetchStoreListingForSku=function(e){var t=l.default.get(e),n=null!=t&&s.default.inTestModeForApplication(t.applicationId);return(0,d.httpGetWithCountryCodeQuery)(n?f.Endpoints.STORE_LISTINGS_SKU(e):f.Endpoints.STORE_PUBLISHED_LISTINGS_SKU(e)).then((function(e){n?a.default.dispatch({type:f.ActionTypes.STORE_LISTINGS_FETCH_SUCCESS,storeListings:e.body}):a.default.dispatch({type:f.ActionTypes.STORE_LISTING_FETCH_SUCCESS,storeListing:e.body})}))},t.fetchStoreListingById=function(e){return(0,d.httpGetWithCountryCodeQuery)(f.Endpoints.STORE_LISTING(e)).then((function(e){a.default.dispatch({type:f.ActionTypes.STORE_LISTING_FETCH_SUCCESS,storeListing:e.body})}))},t.fetchStoreListingForApplication=function(e){return(0,d.httpGetWithCountryCodeQuery)(f.Endpoints.STORE_PUBLISHED_LISTINGS_APPLICATION(e)).then((function(e){a.default.dispatch({type:f.ActionTypes.STORE_LISTING_FETCH_SUCCESS,storeListing:e.body})}))},t.matureAgree=function(){a.default.dispatch({type:f.ActionTypes.APPLICATION_STORE_MATURE_AGREE})},t.matureDisagree=function(){(0,o.transitionTo)(f.Routes.APPLICATION_STORE)},t.joinPublishedStoreListingSkuGuild=function(e){return r.default.post({url:f.Endpoints.STORE_PUBLISHED_LISTINGS_SKU_JOIN_GUILD(e),oldFormErrors:!0})},t.goToSKUStoreListing=function(e,t){var n=(0,d.getStoreListingLocation)(e,t),r=n.pathname,a=p(n,["pathname"]);(0,o.transitionTo)(r,a)},t.goToApplicationStoreListing=function(e,t){var n=(0,d.getApplicationStoreListingLocation)(e,t),r=n.pathname,a=p(n,["pathname"]);(0,o.transitionTo)(r,a)};var r=c(n(14)),a=c(n(2)),o=n(42),i=c(n(71)),l=c(n(373)),u=c(n(8364)),s=c(n(1167)),d=n(289),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M3.9 8.26H2V15.2941H3.9V8.26Z",fill:d,className:f}),s("path",{d:"M19.1 4V5.12659L4.85 8.26447V18.1176C4.85 18.5496 5.1464 18.9252 5.5701 19.0315L9.3701 19.9727C9.4461 19.9906 9.524 20 9.6 20C9.89545 20 10.1776 19.8635 10.36 19.6235L12.7065 16.5242L19.1 17.9304V19.0588H21V4H19.1ZM9.2181 17.9944L6.75 17.3826V15.2113L10.6706 16.0753L9.2181 17.9944Z",fill:d,className:f}))}d.displayName="Megaphone"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderHeader=f,t.renderAutocompleteGroup=c,t.renderSticker=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(5936)),i=l(n(8291));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t,n,r,a){var o=n.length>0?e.format({prefix:r(n)}):t;return d(i.default.Title,{className:a,title:o},"autocomplete-title-"+o)}function c(e,t,n,r,o,i,l,u,c,p,v,y,m,_){if(void 0===y&&(y=0),null==_&&(null==n||0===n.length))return null;var h=null==n?void 0:n.map((function(e,n){var i=n+y;return a.createElement(u,s({onClick:o,onHover:r,selected:t===i,index:i},c(e,i)))}));return d(a.Fragment,{},v,null!=i&&null!=l?f(i,l,e,p,m):null,h,_)}function p(e,t){return d(o.default,{sticker:e,isInteracting:t,size:40})}f.displayName="renderHeader",c.displayName="renderAutocompleteGroup",p.displayName="renderSticker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEmojiPickerStore=t.resetStoreState=t.setActiveCategoryIndex=t.setSearchQuery=t.setSearchPlaceholder=t.setInspectedEmojiPosition=t.InspectedEmojiChangeSource=void 0;var r,a,o=(r=n(251))&&r.__esModule?r:{default:r};t.InspectedEmojiChangeSource=a,function(e){e[e.GRID_NAVIGATOR_EVENT=0]="GRID_NAVIGATOR_EVENT",e[e.MOUSE_EVENT=1]="MOUSE_EVENT"}(a||(t.InspectedEmojiChangeSource=a={}));var i=Object.freeze({inspectedEmojiPosition:{rowIndex:0,columnIndex:0},searchPlaceholder:null,searchQuery:"",activeCategoryIndex:0}),l=(0,o.default)((function(e){return i}));t.setInspectedEmojiPosition=function(e,t,n){l.setState({inspectedEmojiPosition:{rowIndex:t,columnIndex:e,source:n}})};t.setSearchPlaceholder=function(e){l.setState({searchPlaceholder:e})};t.setSearchQuery=function(e){l.setState({searchQuery:e})};t.setActiveCategoryIndex=function(e){l.setState({activeCategoryIndex:e})};t.resetStoreState=function(){l.setState(i)};var u=l;t.useEmojiPickerStore=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStickerPickerStore=t.resetStoreState=t.setShowPremiumUpsell=t.setSearchQuery=t.setSearchPlaceholder=t.setInspectedStickerPosition=t.setActiveCategoryIndex=void 0;var r,a=(r=n(251))&&r.__esModule?r:{default:r};var o=Object.freeze({inspectedStickerPosition:{rowIndex:0,columnIndex:0},activeCategoryIndex:0,searchPlaceholder:null,searchQuery:"",isSearchSuggestion:!1,showPremiumUpsell:!1}),i=(0,a.default)((function(e){return o}));t.setActiveCategoryIndex=function(e){i.setState({activeCategoryIndex:e})};t.setInspectedStickerPosition=function(e,t,n){i.setState({inspectedStickerPosition:{rowIndex:t,columnIndex:e,source:n}})};t.setSearchPlaceholder=function(e){i.setState({searchPlaceholder:e})};t.setSearchQuery=function(e,t){void 0===t&&(t=!1),i.setState({searchQuery:e,isSearchSuggestion:t})};t.setShowPremiumUpsell=function(e){i.setState({showPremiumUpsell:e})};t.resetStoreState=function(){i.setState(o)};var l=i;t.useStickerPickerStore=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useComponentAction=_,t.ComponentAction=function(e){return _(e),null},t.ComponentDispatchGroupProvider=t.ComponentDispatchGroupContext=t.ComponentDispatchGroup=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(64))&&r.__esModule?r:{default:r},l=n(121);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var a=r.prototype;return a.subscribe=function(e,t){l.ComponentDispatch.subscribe(e,t),this.on(e,t)},a.unsubscribe=function(e,t){l.ComponentDispatch.unsubscribe(e,t),this.off(e,t)},a.bumpDispatchPriority=function(){for(var e,t=d(this.eventNames());!(e=t()).done;){var n=e.value;if("string"==typeof n)for(var r,a=d(this.listeners(n));!(r=a()).done;){var o=r.value;l.ComponentDispatch.resubscribe(n,o)}}},r}(i.default);t.ComponentDispatchGroup=p;var v=function(){function e(){}var t=e.prototype;return t.subscribe=function(e,t){l.ComponentDispatch.subscribe(e,t)},t.unsubscribe=function(e,t){l.ComponentDispatch.unsubscribe(e,t)},t.bumpDispatchPriority=function(){0},e}(),y=o.createContext(new v);t.ComponentDispatchGroupContext=y;var m=o.forwardRef((function(e,t){var n=e.children,r=o.useRef(null);function a(){return null===r.current&&(r.current=new p),r.current}return o.useImperativeHandle(t,a),s(y.Provider,{value:a()},void 0,n)}));function _(e){var t=e.event,n=e.handler,r=o.useContext(y);return o.useEffect((function(){return r.subscribe(t,n),function(){r.unsubscribe(t,n)}}),[r,t,n]),null}t.ComponentDispatchGroupProvider=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContentBetweenNodes=g,t.toContent=S,t.isOptionNode=function(e){return null!=e&&"inline"===e.object&&"commandOption"===e.type},t.hasValueNodes=O,t.getOptionNode=I,t.getPreviousOptionNode=function(e,t){return C(e.inlines({onlyTypes:["commandOption"],path:t,direction:"backward",downward:!1}))},t.getNextOptionNode=T,t.getOptionNames=function(e){for(var t,n=e.inlines({onlyTypes:["commandOption"],downward:!0}),r=new Set,a=h(n);!(t=a()).done;){var o=t.value[0];r.add(o.data.get("name"))}return r},t.getOptionContent=function(e,t){var n=I(e,t);if(null==n)return null;if(O(n))return S(n.nodes);var r=T(e,n.key),o=e.getClosestBlock(n.key);return(0,a.default)(null!=o,"Failed to get parent block when fetching option content"),g({parent:o,startNode:n,endNode:r})},t.getOptionContents=function(e){var t=e.inlines({onlyTypes:["commandOption"],downward:!0})[Symbol.iterator](),n=t.next();if(n.done)return{};var r,o={},i=n.value[0];do{var l=t.next();r=l.done?null:l.value[0];var u=void 0;if(O(i))u=S(i.nodes);else{var s=e.getClosestBlock(i.key);(0,a.default)(null!=s,"Failed to get parent block when fetching option contents"),u=g({parent:s,startNode:i,endNode:r})}var d=i.data.get("name");o[d]=u,i=r}while(null!=r);return o},t.wrapOptionValueNodes=function(e,t){var n=e.value.document,o=n.getClosestBlock(t.key);(0,a.default)(null!=o,"Current option does not have a parent block");var i=T(n,t.key),l=N({parent:o,startNode:t,endNode:i,relativeTo:n});(0,a.default)(null!=l,"Failed to find content range for current incomplete option");var u=l.anchor.path.last(),s=l.focus.path.last(),d=t.nodes.toArray(),f=o.nodes.slice(u,s+1).toArray();(0,a.default)(f.length>0,"Attempted to complete current incomplete option with no content"),e.withoutNormalizing((function(){for(var n,a=h(d);!(n=a()).done;){var o=n.value;e.removeNodeByKey(o.key)}for(var i=f.length-1;i>=0;i--)e.moveNodeByKey(f[i].key,t.key,0);var l=f[0],u=f[f.length-1];l.key===u.key&&"text"===l.object?e.setTextByKey(u.key,u.text.trim(),r.default.Set()):("text"===u.object?e.setTextByKey(u.key,u.text.trimEnd(),r.default.Set()):e.insertTextByKey(t.key,f.length,""),"text"===l.object?e.setTextByKey(l.key,l.text.trimStart(),r.default.Set()):e.insertTextByKey(t.key,0,""))})),function(e,t,n){var r=e.value,o=r.document,i=r.selection,l=o.getNode(t);(0,a.default)(null!=l,"Failed to get parent block for fixing selection");var u=o.getNode(n);(0,a.default)(null!=u,"Failed to get wrapping option node for fixing selection");var s=M(l,u);(0,a.default)(null!=s,"Failed to find text node after wrapped option node"),i.anchor.isInNode(u)&&e.moveAnchorToStartOfNode(s);i.focus.isInNode(u)&&e.moveFocusToStartOfNode(s)}(e,o.key,t.key)},t.unwrapOptionValueNodes=function(e,t,n){var r=e.value.document,a=r.getPath(t.key),i=o.PathUtils.lift(a),l=a.last();if(!O(t)){if(n){e.focus();var u=r.getNextSibling(t.key);null!=u&&e.moveToStartOfNode(u)}return}n&&(e.focus(),e.moveAnchorToStartOfNode(t),e.moveFocusToEndOfNode(t));e.withoutNormalizing((function(){t.nodes.reverse().forEach((function(n,r){var o=t.nodes.size-r-1,u=a.push(o);e.moveNodeByPath(u,i,l+1)})),e.insertNodeByPath(i,l+1,o.Inline.create({type:"commandOption",data:{name:t.data.get("name")},nodes:[o.Text.create({text:" "})]})),e.removeNodeByKey(t.key)}))},t.findMatchingCommand=function(e,t,n,r,a){if(!e.startsWith(p.COMMAND_SENTINEL))return null;var o=v.default.getChannel(t),d=null!=n?y.default.getGuild(n):null;if(null==o)return null;var _=e.indexOf(":"),h=!1;_>=0&&(_=e.lastIndexOf(" ",_),h=!0);_<0&&(_=e.length-1);var E=e.substring(1,_+1);if(0===E.length)return null;var g=E.split(" ",4);g.length>3&&(h=!0,g.pop());var S=(0,s.getContextCommands)(o,i.ApplicationCommandTarget.CHAT,l.default,u.default,m.default),O={channel:o,guild:d},I=function(e){var t=g.slice(0,e).join(" "),n=(0,c.queryCommands)(O,S,t,i.ApplicationCommandTarget.CHAT,!1,2,r,a),o=n.filter((function(e){return e.name===t}));if(o.length>0){var l=o[0],u=f.default.getPreferredCommandId();if(null!=u){var s=o.find((function(e){return e.id===u}));if(null!=s)return{v:s}}var d=h||e<g.length,p=1===n.length;if(d||p)return{v:l}}if(n.length>0)return"break"};e:for(var T=g.length;T>0;T--){var C=I(T);switch(C){case"break":break e;default:if("object"==typeof C)return C.v}}return null},t.getRangeBetweenNodes=N,t.COMMAND_OPTION_TYPE=void 0;var r=_(n(8269)),a=_(n(23)),o=n(8315),i=n(286),l=_(n(8383)),u=_(n(8469)),s=n(8504),d=n(8434),f=_(n(8280)),c=n(8279),p=n(8278),v=_(n(10)),y=_(n(15)),m=_(n(40));function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){var t=e.parent,n=N({parent:t,startNode:e.startNode,endNode:e.endNode,includeStart:e.includeStart,includeEnd:e.includeEnd});if(null==n)return[{type:"text",text:""}];var r=t.getNode(o.PathUtils.lift(n.start.path)),a=n.start.path.last(),i=n.end.path.last();return S(r.nodes.skip(a).take(i-a+1))}function S(e){var t=[];if(e.forEach((function(e){if(null!=e)switch(e.object){case"text":t.push({type:"text",text:e.text});break;case"inline":switch(e.type){case"textMention":t.push({type:"textMention",text:e.data.get("text")});break;case"mention":t.push({type:"userMention",userId:e.data.get("id")});break;case"roleMention":t.push({type:"roleMention",roleId:e.data.get("id")});break;case"channel":t.push({type:"channelMention",channelId:e.data.get("id")});break;case"emoji":var n=e.data.get("data");t.push({type:"emoji",name:n.name,surrogate:n.surrogate});break;case"customEmoji":var r=e.data.get("data");t.push({type:"customEmoji",emojiId:r.emojiId,name:r.name,animated:r.animated})}}})),(t=(0,d.filterEmpty)(t)).length>0){var n=t[0];"text"===n.type&&(n.text=n.text.trimStart());var r=t[t.length-1];"text"===r.type&&(r.text=r.text.trimEnd())}return t}function O(e){var t=e.nodes.count();return t>1||1===t&&" "!==e.nodes.first().text}function I(e,t){return C(e.inlines({onlyTypes:["commandOption"],downward:!0,match:function(e){return e.data.get("name")===t}}))}function T(e,t,n){return C(e.inlines({onlyTypes:["commandOption"],path:t,direction:"forward",downward:!1,match:function(e){return!n||!O(e)}}))}function C(e){var t=e[Symbol.iterator]().next();return t.done?null:t.value[0]}function b(e,t){for(var n,r=null,a=h(e.nodes);!(n=a()).done;){var o=n.value;if(o.key===t.key)return r;"text"===o.object&&(r=o)}return null}function M(e,t){for(var n,r=!1,a=h(e.nodes);!(n=a()).done;){var o=n.value;if(o.key===t.key)r=!0;else if(r&&"text"===o.object)return o}return null}function N(e){var t=e.parent,n=e.startNode,r=e.endNode,a=e.includeStart,i=e.includeEnd,l=e.relativeTo,u=null,s=0;if(null===n)u=t.getFirstText();else if("text"===n.object)u=n;else{var d,f;if(a)s=null!==(d=null===(f=u=b(t,n))||void 0===f?void 0:f.text.length)&&void 0!==d?d:0;null===u&&(u=M(t,n),s=0)}var c,p,v=null,y=0;if(null===r)y=null!==(c=null===(p=v=t.getLastText())||void 0===p?void 0:p.text.length)&&void 0!==c?c:0;else if("text"===r.object)y=(v=r).text.length;else{var m,_;if(i&&(v=M(t,r),y=0),null===v)y=null!==(m=null===(_=v=b(t,r))||void 0===_?void 0:_.text.length)&&void 0!==m?m:0}if(null==u&&null!=v&&(u=v,s=0),null==v&&null!=u&&(v=u,y=u.text.length),null==u||null==v)return null;var h=(null!=l?l:t).getPath(u.key),E=(null!=l?l:t).getPath(v.key);return null==h||null==E?null:o.Range.create({anchor:o.Point.create({key:u.key,path:h,offset:s}),focus:o.Point.create({key:v.key,path:E,offset:y})})}t.COMMAND_OPTION_TYPE="commandOption"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;b(n(0));var r,a=n(389),o=T(n(8257)),i=T(n(8323)),l=T(n(8258)),u=b(n(8253)),s=T(n(8430)),d=T(n(11)),f=T(n(8378)),c=T(n(8379)),p=T(n(8380)),v=T(n(8384)),y=T(n(8385)),m=T(n(8386)),_=T(n(8343)),h=T(n(8387)),E=T(n(8324)),g=T(n(8407)),S=T(n(8388)),O=n(1),I=T(n(6));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e){var t=e.user,n=e.channelId,r=e.showMediaItems,T=void 0!==r&&r,C=e.target,b=e.analyticsContext,N=e.mediaEngineContext,A=e.onSelect,P=(0,E.default)(t.id),R=(0,_.default)(t.id),L=(0,y.default)(t),D=(0,p.default)({user:t,channelId:n,target:C}),w=(0,c.default)(t),j=(0,S.default)(t.id),k=(0,g.default)(t.id),U=(0,h.default)(t.id,N),G=(0,m.default)(t),F=(0,i.default)(null,t),B=(0,f.default)(t),H=(0,v.default)(t),x=(0,l.default)(t.id),V=(0,s.default)(t);return d.default.isGuest()||t.isNonUserBot()?null:M(o.default,{context:b,object:O.AnalyticsObjects.CONTEXT_MENU},void 0,M(u.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":I.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:A},void 0,M(u.MenuGroup,{},void 0,V),M(u.MenuGroup,{},void 0,P,R,L,D,w,j),T&&M(u.MenuGroup,{},void 0,k),M(u.MenuGroup,{},void 0,F),M(u.MenuGroup,{},void 0,T&&U,G,B,H),M(u.MenuGroup,{},void 0,x)))}N.displayName="UserGenericContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.className,n=e.tooltip,r=e.color,s=e.size,d=void 0===s?v.SIZE_32:s,p=e.icon,y=e.onClick,m=e.disabled,_=e.focusProps;return a.createElement(a.Fragment,null,f(l.default,{text:n,shouldShow:!m},void 0,(function(e){var l;return a.createElement(i.default,c({},e,{"aria-label":n,"aria-disabled":m,className:(0,o.default)(t,u.default.button,r,d,(l={},l[u.default.disabled]=m,l)),onClick:y,focusProps:_}),p)})))},t.CircleIconButtonSizes=t.CircleIconButtonColors=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(61)),l=s(n(149)),u=s(n(7642));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}var p={TERTIARY:u.default.tertiary,SECONDARY:u.default.secondary,PRIMARY:u.default.primary};t.CircleIconButtonColors=p;var v={SIZE_24:u.default.size24,SIZE_32:u.default.size32,SIZE_36:u.default.size36};t.CircleIconButtonSizes=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HelpMessageFontSizes=t.HelpMessageTypes=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o,i=f(n(9)),l=f(n(686)),u=f(n(1236)),s=f(n(5827)),d=f(n(7668));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.children,n=e.messageType,r=e.className,f=e.fontSize,c=void 0===f?o.FONT_SIZE_14:f,v=function(e){switch(e){case a.WARNING:return s.default;case a.INFO:return u.default;case a.ERROR:return l.default}}(n),y=function(e){switch(e){case a.WARNING:return d.default.warning;case a.INFO:return d.default.info;case a.ERROR:return d.default.error}}(n),m=function(e){switch(e){case o.FONT_SIZE_14:return d.default.fontSize14;case o.FONT_SIZE_16:return d.default.fontSize16}}(c);return p("div",{className:(0,i.default)(d.default.container,y,m,r)},void 0,p(v,{className:d.default.icon}),p("div",{className:d.default.text},void 0,t))}t.HelpMessageTypes=a,function(e){e[e.WARNING=0]="WARNING",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR"}(a||(t.HelpMessageTypes=a={})),t.HelpMessageFontSizes=o,function(e){e[e.FONT_SIZE_14=0]="FONT_SIZE_14",e[e.FONT_SIZE_16=1]="FONT_SIZE_16"}(o||(t.HelpMessageFontSizes=o={})),v.displayName="HelpMessage";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=s(n(9)),l=s(n(22)),u=s(n(7676));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){switch(e){case a.LEFT:return u.default.left;case a.RIGHT:return u.default.right;case a.UP:return null;case a.DOWN:return u.default.down;default:throw new Error("Invalid Direction "+e)}}!function(e){e.LEFT="LEFT",e.RIGHT="RIGHT",e.UP="UP",e.DOWN="DOWN"}(a||(a={}));var v=function(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,u=e.color,s=void 0===u?"currentColor":u,d=e.direction,v=e.foreground,y=e.className,m=e.title,_=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","direction","foreground","className","title"]);return o.createElement("svg",f({},(0,l.default)(_),{width:n,height:a,className:(0,i.default)(y,p(d)),viewBox:"0 0 24 24"}),null!=m?c("title",{},void 0,m):null,c("polygon",{className:v,fill:s,fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))};v.displayName="Arrow",v.Directions=a;var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(8)),a=v(n(63)),o=n(202),i=v(n(3)),l=v(n(2)),u=n(8303),s=v(n(8974)),d=n(48),f=v(n(78)),c=v(n(8255)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(){return(_=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}).apply(this,arguments)}var h,E=new Set,g=p.FormStates.CLOSED,S=!1,O=!1,I=[],T=[],C=u.GuildSettingsRoleEditSections.DISPLAY;function b(){return null==h||null==I?[]:s.default.calculatePositionDeltas(r.default.values(h.roles),I,(function(e){return e.id}),(function(e){var t=e.originalPosition;return null!=t?t:1/0}),!1)}function M(e){var t=e.section;if(null!=h||t!==p.GuildSettingsSections.ROLES)return!1;N()}function N(){h=c.default.getProps().guild,S=!1,O=!1,E.clear(),g=p.FormStates.OPEN,I=null!=h?(0,r.default)(h.roles).values().value():[],T=[].concat(I)}var A=r.default.debounce((function(){var e=!1;O&&((O=b().length>0)||(e=!0)),E.forEach((function(t){r.default.isEqual(R(t),function(e){return T.find((function(t){return t.id===e}))}(t))&&(E.delete(t),e=!0)})),0===E.size&&(S=!1),e&&D.emitChange()}),500);function P(e,t){var n=I.indexOf(e);if(n<0)return!1;var r=_({},e,{},t);I[n]=r,I=[].concat(I),S=!0,E.add(r.id),A()}function R(e){return I.find((function(t){return t.id===e}))}function L(e){var t=e.guildId;if(null==h||t!==h.id||g===p.FormStates.SUBMITTING)return!1;h=c.default.getProps().guild;var n=[];null!=h&&(n=(0,r.default)(h.roles).values().value()),E.forEach((function(e){var t=R(e),r=-1;null==n.find((function(t,n){if(t.id===e)return r=n,!0}))||null==t?E.delete(e):n[r]=t})),0===E.size&&(S=!1),O=!1,I=[].concat(n)}var D=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a,o,i,l=r.prototype;return l.initialize=function(){this.waitFor(c.default)},l.hasChanges=function(){return S||O},l.getSortDeltas=function(){return b()},l.showNotice=function(){return this.hasChanges()},l.getRole=function(e){return R(e)},a=r,(o=[{key:"hasSortChanges",get:function(){return O}},{key:"guild",get:function(){return h}},{key:"editedRoleIds",get:function(){return Array.from(E)}},{key:"roles",get:function(){return I}},{key:"formState",get:function(){return g}},{key:"lastRoleEditSection",get:function(){return C}}])&&y(a.prototype,o),i&&y(a,i),r}(i.default.Store))(l.default,__OVERLAY__?{}:{GUILD_SETTINGS_ROLES_INIT:function(e){return N()},GUILD_SETTINGS_INIT:M,GUILD_SETTINGS_SET_SECTION:M,GUILD_SETTINGS_ROLES_SORT_UPDATE:function(e){var t=e.roles;if(null!=I&&t.length!==I.length)return!1;I=t.map((function(e){return R(e)})).filter(d.isNotNullish),O=!0,A()},GUILD_SETTINGS_ROLES_UPDATE_PERMISSIONS:function(e){var t=e.id,n=e.flag,r=e.allow,o=R(t);if(null==o)return!1;var i=o.permissions;return P(o,{permissions:i=r?a.default.add(i,n):a.default.remove(i,n)})},GUILD_SETTINGS_ROLES_UPDATE_PERMISSION_SET:function(e){var t=e.id,n=e.permissions,r=R(t);return null!=r&&P(r,{permissions:n})},GUILD_SETTINGS_ROLES_CLEAR_PERMISSIONS:function(e){var t=R(e.id);return null!=t&&P(t,{permissions:f.default.NONE})},GUILD_SETTINGS_ROLES_UPDATE_NAME:function(e){var t=e.id,n=e.name,r=R(t);return null!=r&&P(r,{name:n})},GUILD_SETTINGS_ROLES_UPDATE_COLOR:function(e){var t=e.id,n=e.color,r=0===n?null:(0,o.int2hex)(n),a=R(t);return null!=a&&P(a,{color:n,colorString:r})},GUILD_SETTINGS_ROLES_UPDATE_SETTINGS:function(e){var t=e.id,n=e.hoist,r=e.mentionable,a=R(t);return null!=a&&P(a,{hoist:n,mentionable:r})},GUILD_SETTINGS_CLOSE:function(e){return h=null,T=I=[],E.clear(),S=!1,O=!1,void(g=p.FormStates.CLOSED)},GUILD_ROLE_CREATE:L,GUILD_ROLE_UPDATE:L,GUILD_ROLE_DELETE:L,GUILD_SETTINGS_ROLES_SUBMITTING:function(e){g=p.FormStates.SUBMITTING},GUILD_SETTINGS_ROLES_SAVE_SUCCESS:function(e){N()},GUILD_SETTINGS_ROLES_EDIT_SECTION_UPDATE:function(e){var t=e.section;C=t}}),w=D;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transitionToChannel=function(e,t,n){void 0===n&&(n=!0);if(i.default.hasModalOpen())return;a.default.closeAll(),n&&r.default.channelListScrollTo(e,t),o.default.getState().updatePath(l.Routes.CHANNEL(e,t))},t.transitionToPage=function(e){if(i.default.hasModalOpen())return;a.default.closeAll(),o.default.getState().updatePath(e)};var r=u(n(1226)),a=u(n(8309)),o=u(n(5939)),i=u(n(690)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,t.TutorialIndicatorPositions=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(67),i=n(3),l=f(n(8691)),u=n(9189),s=f(n(8692)),d=f(n(161));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.TutorialIndicatorPositions=r,function(e){e.TOP="top",e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom"}(r||(t.TutorialIndicatorPositions=r={}));var y=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var i=r.prototype;return i.componentDidMount=function(){var e=this.props,t=e.visible;null==e.inlineSpecs&&this.show(t)},i.componentWillUnmount=function(){null==this.props.inlineSpecs&&this.show(!1)},i.componentDidUpdate=function(e){var t=e.position,n=e.offsetX,r=e.offsetY,a=e.tutorialId,o=e.visible,i=e.windowSize;a!==this.props.tutorialId?l.default.hide(a):o===this.props.visible&&t===this.props.position&&n===this.props.offsetX&&r===this.props.offsetY&&i===this.props.windowSize||this.show(this.props.visible)},i.show=function(e){var t=this.props,n=t.tutorialId,r=t.position,a=t.offsetX,i=t.offsetY,u=t.visible,s=t.inlineSpecs,d=t.preventInvert,f=t.popoutOffset;if(e&&null==s){var c=(0,o.findDOMNode)(this);if(!(c&&c instanceof Element))return;var p=c.getBoundingClientRect(),v=p.top,y=p.left,m=p.right,_=p.bottom;l.default.show(n,{position:r,targetWidth:m-y,targetHeight:_-v,preventInvert:d,x:y,y:v,offset:{x:a,y:i},popoutOffset:f})}else u&&l.default.hide(n)},i.render=function(){var e=this.props,t=e.inlineSpecs,n=e.tutorialId,r=e.children,o=e.visible,i=e.position,l=e.preventInvert,d=s.default.getData()[n];return null!=t&&null!=d?a.createElement(a.Fragment,null,r,o&&a.createElement(u.TutorialIndicator,p({preventInvert:l,position:i,tutorialId:n,tutorialDefinition:d,visible:o},t))):a.Children.only(r)},r}(a.Component);function m(e){var t=e.tutorialId,n=(0,i.useStateFromStores)([s.default],(function(){return s.default.shouldShow(t)}),[t]),r=(0,i.useStateFromStores)([d.default],(function(){return d.default.windowSize()}),[]);return a.createElement(y,p({},e,{visible:n,windowSize:r}))}y.displayName="TutorialIndicator",y.defaultProps={position:r.TOP,offsetX:0,offsetY:0},m.displayName="ConnectedTutorialIndicator"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderMentionBadge=K,t.renderUnavailableBadge=$,t.renderIconBadge=Z,t.HubDefault=t.DragPlaceholder=t.GuildDiscovery=t.GuildCapUpsell=t.CreateJoinGuildButton=t.AppDownloadButton=t.UnavailableGuildsButton=t.CircleIconButton=t.Separator=t.ListItemTooltip=t.renderListItem=void 0;var r,a=H(n(0)),o=F(n(9)),i=n(680),l=n(8700),u=H(n(8357)),s=n(1213),d=(n(8262),F(n(1295))),f=n(8444),c=n(280),p=F(n(8445)),v=n(42),y=F(n(271)),m=F(n(61)),_=n(1149),h=F(n(149)),E=F(n(10032)),g=F(n(8313)),S=(F(n(372)),F(n(255)),F(n(1313))),O=F(n(8376)),I=(F(n(1224)),F(n(9207))),T=F(n(8662)),C=F(n(5686)),b=(F(n(1215)),F(n(5951))),M=F(n(8536)),N=F(n(8276)),A=F(n(291)),P=F(n(8464)),R=n(8263),L=F(n(8465)),D=F(n(248)),w=F(n(13)),j=F(n(8701)),k=n(1),U=F(n(6)),G=F(n(7367));function F(e){return e&&e.__esModule?e:{default:e}}function B(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return B=function(){return e},e}function H(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=B();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function x(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V(e,t)}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(){return(W=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}).apply(this,arguments)}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var z={x:-16,y:0,targetWidth:48,targetHeight:48,offset:{x:0,y:0}};function K(e){return Y(R.NumberBadge,{count:e})}function $(){return Y(R.IconBadge,{icon:E.default,disableColor:!0,className:G.default.unavailableBadge})}function Z(e){var t,n,r,i=e.audio,l=e.video,u=e.screenshare,s=e.participating,d=e.liveStage,f=e.participatingInStage;e.joinRequestStatus;if(d&&!s||f)n=A.default;else if(u)n=T.default;else if(l)n=g.default;else{if(!i)return null;n=N.default}var c=null==r?{disableColor:!0}:{color:r};return a.createElement(R.IconBadge,W({icon:n},c,{className:(0,o.default)(G.default.iconBadge,(t={},t[G.default.participating]=s||f,t))}))}K.displayName="renderMentionBadge",$.displayName="renderUnavailableBadge",Z.displayName="renderIconBadge";var q=function(e,t){return a.createElement("div",{className:G.default.listItem,ref:t},e)};t.renderListItem=q,q.displayName="renderListItem";var X=function(e){var t=e.children,n=e.text,r=e.color,o=e.disableWrapper,i=void 0!==o&&o,l=e.disabled,u=void 0!==l&&l,s=e.hideOnClick,d=void 0===s||s,f=e.shouldShow,c=e.forceOpen;return Y(h.default,{shouldShow:f,forceOpen:c,spacing:20,hideOnClick:d,text:u?null:n,position:h.default.Positions.RIGHT,color:r,"aria-label":!1,tooltipClassName:G.default.listItemTooltip},void 0,(function(e){return i?a.cloneElement(a.Children.only(t),W({},e)):a.createElement("div",W({className:G.default.listItemWrapper},e),t)}))};t.ListItemTooltip=X,X.displayName="ListItemTooltip";var J=function(){return q(Y("div",{className:G.default.guildSeparator}))};t.Separator=J;var Q=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={hovered:!1},t}return x(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.onClick,i=n.onContextMenu,l=n.children,u=n.selected,s=n.tooltipText,d=n.lowerBadge,f=n.lowerBadgeWidth,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(n,["onClick","onContextMenu","children","selected","tooltipText","lowerBadge","lowerBadgeWidth"]),p=this.state.hovered;return q(Y(a.Fragment,{},void 0,Y("div",{className:G.default.pill},void 0,Y(P.default,{hovered:p,selected:u})),Y(X,{text:s},void 0,Y(L.default,{className:G.default.circleButtonMask,selected:u||p,lowerBadge:d,lowerBadgeWidth:f},void 0,a.createElement(m.default,W({onMouseEnter:function(){return t.setState({hovered:!0})},onMouseLeave:function(){return t.setState({hovered:!1})},className:(0,o.default)((e={},e[G.default.circleIconButton]=!0,e[G.default.selected]=u||p,e)),onClick:r,"aria-label":s,onContextMenu:i,focusProps:{enabled:!1}},c),l)))))},t}(a.PureComponent);t.CircleIconButton=Q,Q.displayName="CircleIconButton";t.UnavailableGuildsButton=function(e){var t=e.unavailableGuilds;return t>0?q(Y(X,{text:U.default.Messages.PARTIAL_OUTAGE.format({count:t}),color:h.default.Colors.RED},void 0,Y(y.default,{href:(0,d.default)(k.LocalizedLinks.TWITTER),target:"_blank",className:G.default.guildsError,"aria-label":U.default.Messages.PARTIAL_OUTAGE_A11Y.format({count:t})},void 0,Y("span",{"aria-hidden":!0,className:G.default.errorInner},void 0,"!")))):null};var ee=Y(J,{}),te=function(e){function t(){return e.apply(this,arguments)||this}return x(t,e),t.prototype.render=function(){var e=this.props,t=e.disable,n=e.onClick,r=e.selected;return t?null:Y(a.Fragment,{},void 0,ee,Y(i.ListNavigatorItem,{id:"app-download-button"},void 0,(function(e){return a.createElement(Q,W({onClick:n,selected:r,tooltipText:U.default.Messages.DOWNLOAD_APPS},e),Y(O.default,{className:G.default.circleIcon}))})))},t}(a.PureComponent);t.AppDownloadButton=te,te.displayName="AppDownloadButton";var ne=function(e){function t(){return e.apply(this,arguments)||this}return x(t,e),t.prototype.render=function(){var e=this.props,t=e.isOwnerOfAny,n=e.disableTooltip,r=e.onContextMenu,o=e.onClick,l=e.selected,s=e.folderIndex,d=Y(j.default,{folderIndex:s,isLastItem:!0}),f=Y(i.ListNavigatorItem,{id:"create-join-button"},void 0,(function(e){return a.createElement(Q,W({onClick:o,selected:l,onContextMenu:r,tooltipText:U.default.Messages.ADD_A_SERVER},e),Y(b.default,{className:G.default.circleIcon}),null!=s&&d)}));return n?f:Y("div",{className:G.default.tutorialContainer},void 0,Y(u.default,{tutorialId:t?"create-more-servers":"create-first-server",inlineSpecs:z,position:u.TutorialIndicatorPositions.RIGHT},void 0,f))},t}(a.PureComponent);function re(){return Y("div",{className:G.default.upsellTooltip},void 0,Y(C.default,{width:22,height:22,className:G.default.upsellIcon,color:_.GradientCssUrls.PREMIUM_TIER_2}),Y("span",{className:G.default.upsellText},void 0,U.default.Messages.GUILD_CAP_UPSELL_TOOLTIP))}function ae(){var e=a.useState(!1),t=e[0],n=e[1],r=a.useState(!1),l=r[0],u=r[1];function s(){u(!l),l||(0,p.default)({analyticsSource:{page:k.AnalyticsPages.GUILD_LIST},analyticsLocation:{page:k.AnalyticsPages.GUILD_LIST,section:k.AnalyticsSections.GUILD_CAP_UPSELL_MODAL},onCloseCallback:function(){(0,f.hideInlineGuildCapUpsell)(),u(!1),n(!1)}})}a.useEffect((function(){w.default.track(k.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:c.PremiumUpsellTypes.GUILD_CAP_INLINE_SERVER_LIST,location:{page:k.AnalyticsPages.GUILD_LIST}})}),[]);var d=Y(P.default,{hovered:t,selected:l});return Y(i.ListNavigatorItem,{id:"nitro-guild-cap-upsell"},void 0,(function(e){var r;return q(a.createElement(a.Fragment,null,Y("div",{className:G.default.pill},void 0,d),Y(X,{text:re()},void 0,Y(L.default,{className:G.default.circleButtonMask,selected:l||t,upperBadge:Y(R.IconBadge,{icon:E.default,color:k.Colors.PREMIUM_TIER_2_PURPLE})},void 0,a.createElement(m.default,W({onMouseEnter:function(){return n(!0)},onMouseLeave:function(){return n(!1)},className:(0,o.default)((r={},r[G.default.nitroUpsell]=!0,r[G.default.selected]=l||t,r)),onClick:s,"aria-label":U.default.Messages.GUILD_CAP_UPSELL_TOOLTIP,focusProps:{enabled:!1}},e),Y(M.default,{className:G.default.circleIcon,foreground:G.default.nitroUpsellIcon}))))))}))}t.CreateJoinGuildButton=ne,ne.displayName="CreateJoinGuildButton",re.displayName="renderTooltip",ae.displayName="GuildCapUpsellRenderer";var oe=Y(ae,{}),ie=a.memo((function(){return(0,f.useShouldShowInlineGuildCapUpsell)()?oe:null}));t.GuildCapUpsell=ie;var le=Y(S.default,{width:24,height:24}),ue=function(e){function t(){return e.apply(this,arguments)||this}x(t,e);var n=t.prototype;return n.onClick=function(){window.location.pathname.startsWith(k.Routes.GUILD_DISCOVERY)&&((0,l.clearSearch)(),(0,l.selectCategory)(s.DISCOVERY_ALL_CATEGORIES_ID,!0)),(0,v.transitionTo)(k.Routes.GUILD_DISCOVERY)},n.render=function(){var e=this,t=this.props.selected;return Y(i.ListNavigatorItem,{id:"guild-discover-button"},void 0,(function(n){return a.createElement(Q,W({onClick:e.onClick,selected:t,tooltipText:U.default.Messages.GUILD_DISCOVERY_TOOLTIP},n),le)}))},t}(a.PureComponent);t.GuildDiscovery=ue,ue.displayName="GuildDiscovery";var se=function(e){var t=e.className;return Y(D.default,{mask:D.default.Masks.SQUIRCLE,className:(0,o.default)(t,G.default.placeholderMask),width:48,height:48,style:{display:"block"}},void 0,Y("div",{className:G.default.dragInner}))};t.DragPlaceholder=se,se.displayName="DragPlaceholder";var de=Y(I.default,{width:24,height:24}),fe=function(){return Y(i.ListNavigatorItem,{id:"guild-hub-button"},void 0,(function(e){return a.createElement(Q,W({selected:!0,tooltipText:U.default.Messages.HUB_DISCORD_HUBS},e),de)}))};t.HubDefault=fe,fe.displayName="HubDefault"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(13)),i=u(n(16)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}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}).apply(this,arguments)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c={desktopType:i.default.embedded?l.DesktopNotificationTypes.ALL:l.DesktopNotificationTypes.NEVER,disabledSounds:[],ttsType:l.TTSNotificationTypes.NEVER,disableUnreadBadge:!1,taskbarFlash:!0},p=c;function v(e,t){__OVERLAY__||o.default.track(e,t)}function y(e){var t=e.desktopType;p.desktopType=t,v(l.AnalyticEvents.LOCAL_SETTINGS_UPDATED,{notifications_enabled:t===l.DesktopNotificationTypes.ALL})}var m=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a,o,i,l=r.prototype;return l.initialize=function(e){p=e||c},l.getState=function(){return p},l.getDesktopType=function(){return p.desktopType},l.getTTSType=function(){return p.ttsType},l.getDisabledSounds=function(){return p.disabledSounds},l.getDisableUnreadBadge=function(){return p.disableUnreadBadge},l.isSoundDisabled=function(e){return-1!==p.disabledSounds.indexOf(e)},a=r,(o=[{key:"taskbarFlash",get:function(){return p.taskbarFlash}}])&&d(a.prototype,o),i&&d(a,i),r}(r.default.PersistedStore);m.persistKey="notifications",m.migrations=[function(e){var t=s({},e);return t.disabledSounds=t.disabledSounds||[],t.disableUnreadBadge=t.disableUnreadBadge||!1,t.taskbarFlash=null==t.taskbarFlash||t.taskbarFlash,t.ttsType=t.ttsType||l.TTSNotificationTypes.NEVER,null==t.desktopType&&(t.desktopType=i.default.embedded?l.DesktopNotificationTypes.ALL:l.DesktopNotificationTypes.NEVER),t}];var _=new m(a.default,{NOTIFICATIONS_SET_DESKTOP_TYPE:y,NOTIFICATIONS_SET_TTS_TYPE:function(e){var t=e.ttsType;p.ttsType=t},NOTIFICATIONS_SET_DISABLED_SOUNDS:function(e){var t=e.sounds;p.disabledSounds=t},NOTIFICATIONS_SET_PERMISSION_STATE:function(e){var t=e.enabled,n=e.source;v(l.AnalyticEvents.ENABLE_NOTIFICATIONS,{enabled:t===l.NotificationPermissionTypes.ENABLED,source:n}),t===l.NotificationPermissionTypes.BLOCKED?y({desktopType:l.DesktopNotificationTypes.NEVER}):t===l.NotificationPermissionTypes.ENABLED&&y({desktopType:l.DesktopNotificationTypes.ALL})},NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE:function(e){var t=e.disableUnreadBadge;p.disableUnreadBadge=t},NOTIFICATIONS_SET_TASKBAR_FLASH:function(e){var t=e.taskbarFlash;p.taskbarFlash=t}});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MarkerPositions=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=c(n(9)),l=c(n(8)),u=c(n(105)),s=c(n(88)),d=c(n(149)),f=c(n(7395));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(){return(m=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}).apply(this,arguments)}function _(e,t){for(var n=0,r=0;r<t.length;r++){var a=t[r];if(e===a)return r;if(e<a)return 0===n||a-e<n?r:r-1;n=e-a}return null}function h(e){var t=e.markers,n=e.initialValue,r=e.minValue,a=e.maxValue,o=e.equidistant,i=[],l=[];if(null==t)return{min:r,max:a,range:a-r,sortedMarkers:i,markerPositions:l};var u=_(n,i=t.sort((function(e,t){return e-t}))),s=i[0],d=i[i.length-1],f=d-s;if(o){var c=100/(i.length-1);l=i.map((function(e,t){return t*c}))}else{l=i.map((function(e){return 100*(e-s)/f}))}return{min:s,max:d,range:f,sortedMarkers:i,markerPositions:l,closestMarkerIndex:u}}function E(e){return m({value:Math.min(Math.max(e.initialValue,e.minValue),e.maxValue),initialValueProp:e.initialValue,newClosestIndex:null},h(e))}t.MarkerPositions=a,function(e){e[e.ABOVE=0]="ABOVE",e[e.BELOW=1]="BELOW"}(a||(t.MarkerPositions=a={}));var g=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).containerRef=o.createRef(),n.grabberRef=o.createRef(),n.moveGrabber=function(e){var t=n.state,r=t.sortedMarkers,a=t.value,o=t.min,i=t.max,u=n.props,s=u.asValueChanges,d=u.onValueChange,f={};if(u.stickToMarkers){var c=r.indexOf(a);if(c<0)return;var p=c+e,v=r[p];if(null==v)return;f.value=v,f.closestMarkerIndex=p,f.newClosestIndex=p}else f.value=l.default.clamp(a+e,o,i);n.setState(f),f.value!==n.state.value&&(s&&s(f.value),d&&d(f.value))},n.handleContainerMouseDown=function(e){var t=n.props,r=t.disabled,a=t.maxValue,o=t.minValue,i=t.asValueChanges,l=t.onValueChange,u=t.stickToMarkers,s=n.state,d=s.sortedMarkers,f=s.markerPositions;if(!r){var c=e.clientX,p=e.currentTarget;if(1===(null==p?void 0:p.nodeType)){var v,y=p.getBoundingClientRect(),m=(c-y.left)/y.width;if(u){var _=f.reduce((function(e,t,n){var r=Math.abs(t/100-m);return r<=e.smallestDelta?{smallestDelta:r,nextClosestMarkerIndex:n}:e}),{smallestDelta:1,nextClosestMarkerIndex:-1}).nextClosestMarkerIndex;if(-1===_)return;n.setState({closestMarkerIndex:_}),v=d[_]}else{v=o+(a-o)*m,n.setState({value:v}),n.handleMouseDown(e)}null!=l&&l(v),null!=i&&i(v)}}},n.handleKeyDown=function(e){var t=n.props,r=t.disabled,a=t.orientation,o=t.keyboardStep,i=void 0===o?1:o;if(!r){var l=e.key,u=[],s=[];switch(a){case"horizontal":u=["ArrowRight"],s=["ArrowLeft"];break;case"vertical":u=["ArrowUp"],s=["ArrowDown"];break;default:u=["ArrowRight","ArrowUp"],s=["ArrowLeft","ArrowDown"]}s.includes(l)?(e.preventDefault(),e.stopPropagation(),n.moveGrabber(-i)):u.includes(l)&&(e.preventDefault(),e.stopPropagation(),n.moveGrabber(i))}},n.handleMouseDown=function(e){var t,r;if(!n.props.disabled){e.stopPropagation();var a=n.containerRef.current;if(null==a||null===(t=a.ownerDocument)||void 0===t||t.addEventListener("mousemove",n.handleMouseMove,!0),null==a||null===(r=a.ownerDocument)||void 0===r||r.addEventListener("mouseup",n.handleMouseUp,!0),1!==(null==a?void 0:a.nodeType))throw new Error("[UIKit]Slider.handleMouseDown(): assert failed: domNode nodeType !== Element");n.setState({x:e.clientX,active:!0,boundingRect:a.getBoundingClientRect(),newClosestIndex:n.state.closestMarkerIndex})}},n.handleMouseUp=function(e){e.stopPropagation(),n.reset();var t=n.props,r=t.onValueChange,a=t.stickToMarkers,o=n.state.newClosestIndex;a&&null!=o?(r&&r(n.state.sortedMarkers[o]),n.setState({newClosestIndex:null,closestMarkerIndex:o})):r&&r(n.state.value),n.setState({active:!1})},n.handleMouseMove=function(e){e.preventDefault(),n.props.stickToMarkers?n.moveStaggered(e):n.moveSmoothly(e)},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.state=m({active:!1,focused:!1},E(t)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.getDerivedStateFromProps=function(e,t){return e.initialValue!==t.initialValueProp?m({},E(e),{active:t.active}):null};var c=r.prototype;return c.componentWillUnmount=function(){this.reset()},c.renderMark=function(e){var t=this.props.onMarkerRender;return null!=t?t(e):e},c.render=function(){var e,t=this,n=this.state,r=n.value,l=n.active,c=n.focused,p=n.sortedMarkers,y=n.markerPositions,_=n.closestMarkerIndex,h=n.newClosestIndex,E=n.min,g=n.max,S=this.props,O=S.disabled,I=S.stickToMarkers,T=S.className,C=S.children,b=S.barStyles,M=S.fillStyles,N=S.mini,A=S.hideBubble,P=S.defaultValue,R=S.orientation,L=S.onValueRender,D=S.renderMarker,w=S.barClassName,j=S.grabberClassName,k=S.grabberStyles,U=void 0===k?{}:k,G=S.markerPosition,F=void 0===G?a.ABOVE:G,B=S["aria-label"],H=0;I?null!=y&&(null!=h?H=y[h]:null!=_&&(H=y[_])):H=this.scaleValue(r);var x=H+"%",V=y&&p?y.map((function(e,n){var r,l=p[n],u=null!=P&&P===l,s=t.renderMark(l);return v("div",{className:(0,i.default)(f.default.mark,(r={},r[f.default.defaultValue]=u,r[f.default.markAbove]=F===a.ABOVE,r[f.default.markBelow]=F===a.BELOW,r)),style:{left:e+"%"}},n,null!=D?D(l):o.createElement(o.Fragment,null,v("div",{className:f.default.markValue},void 0,s),v("div",{className:f.default["markDash"+(null==s?"simple":"")]})))})):null,W=L?L(r):H.toFixed(0)+"%";return v(s.default,{focusTarget:this.containerRef,ringTarget:this.grabberRef},void 0,o.createElement("div",{className:(0,i.default)(f.default.slider,T,(e={},e[f.default.disabled]=O,e[f.default.mini]=N,e)),"aria-valuemin":E,"aria-valuemax":g,"aria-valuenow":r,"aria-disabled":O,"aria-orientation":R,"aria-label":B,role:"slider",tabIndex:0,onKeyDown:this.handleKeyDown,onMouseDown:this.handleContainerMouseDown,onFocus:this.onFocus,onBlur:this.onBlur,ref:this.containerRef},v("input",{type:"number",className:f.default.input,value:H.toFixed(0),readOnly:!0}),v("div",{className:f.default.track},void 0,V),v("div",{className:(0,i.default)(f.default.bar,w),style:b},void 0,v("div",{className:f.default.barFill,style:m({},M,{width:x})})),C,v("div",{className:f.default.track},void 0,v(d.default,{color:d.default.Colors.GREY,hideOnClick:!1,text:A||I?null:W,forceOpen:l||c&&u.default.keyboardModeEnabled},void 0,(function(e){return o.createElement("div",m({},e,{className:(0,i.default)(f.default.grabber,j),style:m({},U,{left:x}),onMouseDown:t.handleMouseDown,ref:t.grabberRef}))})))))},c.reset=function(){var e,t,n,r;null===(e=this.containerRef.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t||t.removeEventListener("mousemove",this.handleMouseMove,!0),null===(n=this.containerRef.current)||void 0===n||null===(r=n.ownerDocument)||void 0===r||r.removeEventListener("mouseup",this.handleMouseUp,!0)},c.scaleValue=function(e){return 100*(e-this.state.min)/this.state.range},c.unscaleValue=function(e){return e*this.state.range/100+this.state.min},c.focus=function(){var e;null===(e=this.containerRef.current)||void 0===e||e.focus()},c.blur=function(){var e;null===(e=this.containerRef.current)||void 0===e||e.blur()},c.moveStaggered=function(e){var t=this.state,n=t.boundingRect,r=t.x,a=void 0===r?0:r,o=t.closestMarkerIndex,i=t.markerPositions,l=t.sortedMarkers,u=this.props.asValueChanges,s=n||{},d=s.left,f=s.right;if(!(e.clientX<=d||e.clientX>=f)){var c,p=f-d,v=(e.clientX-a)/p,y=i[o]+100*v;if(this.props.equidistant)c=_(y,i);else c=_(this.unscaleValue(y),l);null!=c&&u&&u(l[c]),this.setState({newClosestIndex:c})}},c.moveSmoothly=function(e){var t=this.props,n=t.minValue,r=t.maxValue,a=t.handleSize,o=t.asValueChanges,i=this.state.boundingRect,l=i.left,u=i.right,s=this.state.x-e.clientX,d=(this.state.value-n)/(r-n);if(!(e.clientX<=l&&s<0||e.clientX>=u&&s>0)){var f=u-l-a,c=f*d;d=Math.min(Math.max(c-s,0),f)/f}var p=n+d*(r-n);o&&o(p),this.setState({value:p,x:e.clientX})},r}(o.PureComponent);g.displayName="Slider",g.defaultProps={initialValue:10,minValue:0,maxValue:100,keyboardStep:1,handleSize:10,disabled:!1,stickToMarkers:!1,fillStyles:{}};var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t={});return d(t.formatInline?a.default.parseInlineReply:a.default.parse,e,t)},t.renderMessageMarkupToAST=function(e,t){void 0===t&&(t={});return d(t.formatInline?a.default.parseInlineReplyToAST:a.default.parseToAST,e,l({},t,{toAST:!0}))};n(307);var r,a=(r=n(8295))&&r.__esModule?r:{default:r},o=n(1308),i=n(1);function l(){return(l=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}).apply(this,arguments)}var u=new Set([i.EmbedTypes.IMAGE,i.EmbedTypes.GIFV]),s=new Set(["strong","em","u","text","inlineCode","s","spoiler"]);function d(e,t,n){n.toAST;var r=n.renderMediaEmbeds,a=void 0===r||r,i=n.formatInline,l=void 0!==i&&i,d=n.isInteracting,p=void 0!==d&&d,v=n.postProcessor,y={allowLinks:null!=t.webhookId,channelId:t.channel_id,mentionChannels:t.mentionChannels,isInteracting:p},m=!1,_=e(t.content,!0,y,(function(e,n){return Array.isArray(e)||(e=[e]),a&&(e=function(e,t){if(1!==e.length||1!==t.length)return e;var n=e[0],r=t[0];if("link"===n.type&&u.has(r.type)&&(0,o.isEmbedInline)(r))return[];return e}(e,t.embeds)),l||(e=function(e,t){if(t)return f(e);"paragraph"===e[0].type&&e[0].content instanceof Array&&(e[0].content=f(e[0].content));return e}(e,n)),m=function(e,t){if(t)return c(e);if("paragraph"===e[0].type&&e[0].content instanceof Array)return c(e[0].content);return!1}(e,n),l&&(e=function e(t){return t.forEach((function(t){s.has(t.type)&&null!=t.content&&(Array.isArray(t.content)?e(t.content):t.content=t.content.replace(/\n/g," "))})),t}(e)),null!=v&&(e=v(e,n)),e}));return{hasSpoilerEmbeds:m,content:_}}function f(e){if(e.some((function(e){return"emoji"!==e.type&&"customEmoji"!==e.type&&("string"!=typeof e.content||""!==e.content.trim())})))return e;var t=0;return e.forEach((function(e){if("emoji"!==e.type&&"customEmoji"!==e.type||(t+=1),t>27)return!1})),t>27||e.forEach((function(e){e.jumboable=!0})),e}function c(e){return e.some((function(e){return"spoiler"===e.type&&Array.isArray(e.content)&&e.content.some((function(e){return"link"===e.type}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=n(468),l=u(n(7398));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=a.memo(a.forwardRef((function(e,t){var n=e.onScroll,r=e.listPadding,u=void 0===r?[0,0,0,0]:r,s=e.renderRow,f=e.renderSection,c=e.renderSectionHeader,p=e.renderSectionFooter,v=e.renderListHeader,y=e.rowCount,m=e.rowCountBySection,_=e.rowHeight,h=e.sectionMarginBottom,E=e.sectionHeaderHeight,g=e.sectionFooterHeight,S=e.listHeaderHeight,O=e.stickyHeaders,I=void 0!==O&&O,T=e.className,C=e.hideScrollbar,b=void 0!==C&&C,M=e.fade,N=void 0!==M&&M,A=e.initialScrollTop,P=void 0===A?0:A,R=a.useState(-1),L=R[0],D=R[1],w=a.useRef(null),j=a.useRef(-1),k=a.useRef(0),U=a.useRef(-1);a.useLayoutEffect((function(){var e,t=null===(e=w.current)||void 0===e?void 0:e.getScrollerNode();null!=t&&(t.scrollTop=P)}),[]);var G=a.useCallback((function(){var e="function"==typeof S?S():S;return null==e?0:e}),[S]),F=a.useCallback((function(e,t,n){return"function"==typeof _?_(n,{sectionIndex:e,sectionRowIndex:t}):_}),[_]),B=a.useCallback((function(e){var t="function"==typeof E?E(e):E;return null==t?0:t}),[E]),H=a.useCallback((function(e){var t="function"==typeof g?g(e):g;return null==t?0:t}),[g]),x=a.useCallback((function(e){var t="function"==typeof h?h(e):h;return null==t?0:t}),[h]),V=a.useRef([]),W=a.useRef([]),Y=a.useMemo((function(){var e=0,t=null!=m,n=t?m.length:1,r=u[0],a=[],o=[];r+=G();for(var i=0;i<n;i++){var l=t?m[i]:y,s=0!==(null==m?void 0:m[i]);o[i]={firstRowIndex:e,offset:{top:r,bottom:-1}},r+=B(i);for(var d=0;d<l;d++){var f=r+(s?F(i,d,e):0),c={top:r,bottom:f};a[e]={sectionIndex:i,offset:c},r=f,e++}r+=H(i)+x(i),o[i].offset.bottom=r}return{totalHeight:r+=u[2],rowDescriptors:a,sectionDescriptors:o}}),[F,H,B,x,u,y,m,G]),z=Y.totalHeight,K=Y.rowDescriptors,$=Y.sectionDescriptors;V.current=$,W.current=K;var Z=a.useCallback((function(){var e,t=null===(e=w.current)||void 0===e?void 0:e.getScrollerNode();if(null!=t){var n=t.offsetHeight,r=t.scrollTop;j.current=n,D(r)}}),[]);a.useLayoutEffect((function(){-1===j.current&&Z()}),[Z]),a.useEffect((function(){var e,t=null===(e=w.current)||void 0===e?void 0:e.getScrollerNode();if(null!=t){var n=new ResizeObserver(Z);return n.observe(t),function(){return n.disconnect()}}}),[Z]);var q=a.useCallback((function(){var e,t=null===(e=w.current)||void 0===e?void 0:e.getScrollerNode();null!=t&&(window.cancelAnimationFrame(U.current),U.current=window.requestAnimationFrame((function(){var e=t.scrollTop;k.current=e,null==n||n(e),D(e)})))}),[n]);a.useImperativeHandle(t,(function(){return{scrollTo:function(e,t){var n;void 0===t&&(t={});var r=t.animate,a=void 0!==r&&r;null===(n=w.current)||void 0===n||n.scrollTo({to:e,animate:a})},scrollRowIntoView:function(e,t){void 0===t&&(t={});var n=t,r=n.animate,a=void 0!==r&&r,o=n.offset,i=void 0===o?0:o,l=W.current[e];null!=l&&window.requestAnimationFrame((function(){var t=l.sectionIndex,n=l.offset,r=n.top,o=n.bottom,u=B(t),s=r-(I?u:0)-i<=k.current,d=o+i>=k.current+j.current;if(s){var f,c=k.current+u-r,p=I?k.current-c:r;null===(f=w.current)||void 0===f||f.scrollTo({to:0===e?0:p-i,animate:a})}else if(d){var v,y=o-(k.current+j.current);null===(v=w.current)||void 0===v||v.scrollTo({to:k.current+y+i,animate:a})}}))},scrollToSectionTop:function(e,t){void 0===t&&(t={});var n=t,r=n.animate,a=void 0!==r&&r,o=n.offset,i=void 0===o?0:o,l=V.current[e];null!=l&&window.requestAnimationFrame((function(){var t;null===(t=w.current)||void 0===t||t.scrollTo({to:(0===e?0:l.offset.top)+i,animate:a})}))},getListDimensions:function(){return{height:j.current,totalHeight:z}},getSectionDescriptors:function(){return V.current},getRowDescriptors:function(){return W.current},getScrollerNode:function(){var e;return null===(e=w.current)||void 0===e?void 0:e.getScrollerNode()},scrollIntoViewNode:function(e){var t;return null===(t=w.current)||void 0===t?void 0:t.scrollIntoViewNode({node:e})}}}),[B,I,z]);var X=a.useMemo((function(){if(-1===j.current||-1===L)return{visibleItems:null,listOffset:0};var e=L,t=L+j.current,n=0,r=u[0],a=[],o=G();null!=v&&e<o?a.push(v()):r+=o;for(var i=0;i<$.length;i++){var l=$[i],d=l.firstRowIndex,y=l.offset,m=y.top,_=y.bottom,h=_-m;if(0!==h){var E=B(i),g=H(i),S=x(i);if(_<=e)r=_;else{if(!(_>e&&m<t))break;n=d;var O=[],T=0,C=0,b=m+E>=e&&m<=t;for(null!=c&&(I||b)&&O.push(c(i)),b||I||(r+=E);T+E+g<h-S;){var M=F(i,C,n),N=m+T+E,A=N+M;if(A<=e)r=A-(I?E:0);else{if(!(A>e&&N<t))break;O.push(s(n,{sectionIndex:i,sectionRowIndex:C}))}T+=M,C++,n++}var P=m+E+T;null!=p&&(P+g>=e&&P<=t)&&O.push(p(i)),null!=f?a.push(f(i,O)):a=[].concat(a,O)}}}return{visibleItems:a,listOffset:r}}),[F,H,B,x,u,s,f,p,c,L,$,I,v,G]),J=X.visibleItems,Q=X.listOffset,ee=a.useMemo((function(){var e,t,n;return{top:Q,right:null!==(e=null==u?void 0:u[1])&&void 0!==e?e:0,bottom:null!==(t=null==u?void 0:u[2])&&void 0!==t?t:0,left:null!==(n=null==u?void 0:u[3])&&void 0!==n?n:0}}),[Q,u]),te=a.useMemo((function(){return{height:z}}),[z]),ne=b?i.AdvancedScrollerNone:i.AdvancedScrollerThin;return a.createElement(ne,{fade:N,className:(0,o.default)(l.default.scroller,T),ref:w,onScroll:q},d("div",{className:l.default.listItems,style:ee},void 0,J),d("div",{className:l.default.listHeight,style:te}))})));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(8)),a=d(n(3)),o=d(n(2)),i=d(n(89)),l=d(n(15)),u=d(n(256)),s=d(n(361));n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=new Set,p={},v={},y={};function m(){if(0===Object.keys(y).length)return!1;y={}}function _(e){if(null==y[e.user.id])return!1;delete y[e.user.id]}var h=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(s.default)},a.isFetching=function(e){return c.has(e)},a.getUserProfile=function(e){return p[e]},a.getMutualFriends=function(e){return v[e]},a.getMutualGuilds=function(e){return y[e]},r}(a.default.Store))(o.default,{USER_PROFILE_FETCH_START:function(e){var t=e.userId;c.add(t)},USER_PROFILE_FETCH_FAILURE:function(e){var t,n=e.userId;p[n]=null!==(t=p[n])&&void 0!==t?t:{connectedAccounts:[],premiumSince:null,premiumGuildSince:null,lastFetched:Date.now()},c.delete(n)},USER_PROFILE_FETCH_SUCCESS:function(e){if(c.delete(e.user.id),null!=e.mutual_guilds){var t={};e.mutual_guilds.forEach((function(e){var n=e.id,r=e.nick,a=l.default.getGuild(n);null!=a&&(t[n]={guild:a,nick:r})})),y[e.user.id]=s.default.getFlattenedGuilds().filter((function(e){return null!=t[e.id]})).map((function(e){return{guild:t[e.id].guild,nick:t[e.id].nick}}))}var n=e.premium_since||null;p[e.user.id]={connectedAccounts:e.connected_accounts||[],premiumSince:null!=n?new Date(n):null,premiumGuildSince:null!=e.premium_guild_since?new Date(e.premium_guild_since):null,lastFetched:Date.now()}},LOAD_MUTUAL_FRIENDS:function(e){v[e.userId]=(0,r.default)(e.mutualFriends).map((function(e){return{key:e.id,user:new i.default(e),status:u.default.getStatus(e.id)}})).sortBy((function(e){return e.user.username.toLowerCase()})).value()},GUILD_JOIN:function(e){return m()},GUILD_DELETE:function(e){return m()},GUILD_MEMBER_ADD:_,GUILD_MEMBER_REMOVE:_});t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(9373)),i=u(n(39)),l=n(48);n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c,p={},v={},y={},m={};function _(e){var t=e.id,n=e.sku.id,r=p[t],a=o.default.createFromServer(e);null!=r&&!r.isSlimDirectoryVersion()&&a.isSlimDirectoryVersion()||(!1===e.published?(null==y[n]&&(y[n]=new Set),y[n].add(t)):m[n]=t,p[t]=a)}function h(e,t){return e+":"+t}function E(e){for(var t,n=d(e.storeListings);!(t=n()).done;){_(t.value)}}function g(){p={},m={},y={},v={}}function S(e){var t,n=null!==(t=null==e?void 0:e.settings.locale)&&void 0!==t?t:i.default.locale;if(c===n)return!1;g(),c=n}var O=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(i.default),this.syncWith([i.default],S),c=i.default.locale},a.get=function(e){return p[e]},a.getForSKU=function(e,t){var n=m[e];return null!=t?v[h(t,e)]:null!=n?p[n]:null},a.getUnpublishedForSKU=function(e){var t=y[e];return null==t?[]:Array.from(t).map((function(e){return p[e]})).filter(l.isNotNullish)},a.getForChannel=function(e,t){return v[h(e,t)]},a.getStoreListing=function(e){var t=e.storeListingId,n=e.skuId,r=e.channelId;if(e.isTestMode&&null!=n){var a=this.getUnpublishedForSKU(n);if(null!=a&&a.length>0)return a[0]}if(null!=t)return this.get(t);if(null!=r){if(null==n)throw new Error("getStoreListing with channel expects a skuId");return this.getForChannel(r,n)}return null!=n?this.getForSKU(n):null},r}(r.default.Store))(a.default,{STORE_LISTINGS_FETCH_SUCCESS:E,APPLICATION_STORE_DIRECTORY_FETCH_SUCCESS:E,STORE_LISTING_FETCH_SUCCESS:function(e){var t=e.storeListing,n=e.channelId;if(null!=n){var r=o.default.createFromServer(t);v[h(n,r.skuId)]=r,m[r.skuId]=r.id}else _(t)},USER_SETTINGS_UPDATE:S,APPLICATION_STORE_CLEAR_DATA:function(e){return g()},GIFT_CODE_RESOLVE_SUCCESS:function(e){var t=e.giftCode;if(null==t.store_listing)return!1;_(t.store_listing)}});t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useExpressionPickerStore=t.setExpressionPickerView=t.toggleExpressionPicker=t.closeExpressionPicker=t.openExpressionPicker=void 0;var r,a=(r=n(251))&&r.__esModule?r:{default:r};var o=Object.freeze({activeView:null,activeViewType:null}),i=(0,a.default)((function(e){return o})),l=function(e,t){i.setState({activeView:e,activeViewType:t})};t.openExpressionPicker=l;var u=function(e){void 0!==e&&e!==i.getState().activeViewType||i.setState({activeView:null,activeViewType:null})};t.closeExpressionPicker=u;t.toggleExpressionPicker=function(e,t){i.getState().activeView===e?u():l(e,t)};t.setExpressionPickerView=function(e){i.setState({activeView:e})};var s=i;t.useExpressionPickerStore=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSKUIdFromURL=function(e){var t=(0,a.matchPath)(e,{path:l.Routes.APPLICATION_STORE_LISTING_SKU(":skuId",":slug")});return null!=t?t.params.skuId:null},t.getGenreURLSlugFromId=function(e){return f[e]},t.getGenreIdFromURLSlug=function(e){return d[e]},t.getGenreText=function(e){switch(e){case l.SKUGenres.ACTION:return u.default.Messages.APPLICATION_STORE_GENRE_ACTION;case l.SKUGenres.ACTION_RPG:return u.default.Messages.APPLICATION_STORE_GENRE_ACTION_RPG;case l.SKUGenres.BRAWLER:return u.default.Messages.APPLICATION_STORE_GENRE_BRAWLER;case l.SKUGenres.HACK_AND_SLASH:return u.default.Messages.APPLICATION_STORE_GENRE_HACK_AND_SLASH;case l.SKUGenres.PLATFORMER:return u.default.Messages.APPLICATION_STORE_GENRE_PLATFORMER;case l.SKUGenres.STEALTH:return u.default.Messages.APPLICATION_STORE_GENRE_STEALTH;case l.SKUGenres.SURVIVAL:return u.default.Messages.APPLICATION_STORE_GENRE_SURVIVAL;case l.SKUGenres.ADVENTURE:return u.default.Messages.APPLICATION_STORE_GENRE_ADVENTURE;case l.SKUGenres.ACTION_ADVENTURE:return u.default.Messages.APPLICATION_STORE_GENRE_ACTION_ADVENTURE;case l.SKUGenres.METROIDVANIA:return u.default.Messages.APPLICATION_STORE_GENRE_METROIDVANIA;case l.SKUGenres.OPEN_WORLD:return u.default.Messages.APPLICATION_STORE_GENRE_OPEN_WORLD;case l.SKUGenres.PSYCHOLOGICAL_HORROR:return u.default.Messages.APPLICATION_STORE_GENRE_PSYCHOLOGICAL_HORROR;case l.SKUGenres.SANDBOX:return u.default.Messages.APPLICATION_STORE_GENRE_SANDBOX;case l.SKUGenres.SURVIVAL_HORROR:return u.default.Messages.APPLICATION_STORE_GENRE_SURVIVAL_HORROR;case l.SKUGenres.VISUAL_NOVEL:return u.default.Messages.APPLICATION_STORE_GENRE_VISUAL_NOVEL;case l.SKUGenres.DRIVING_RACING:return u.default.Messages.APPLICATION_STORE_GENRE_DRIVING_RACING;case l.SKUGenres.VEHICULAR_COMBAT:return u.default.Messages.APPLICATION_STORE_GENRE_VEHICULAR_COMBAT;case l.SKUGenres.MASSIVELY_MULTIPLAYER:return u.default.Messages.APPLICATION_STORE_GENRE_MASSIVELY_MULTIPLAYER;case l.SKUGenres.MMORPG:return u.default.Messages.APPLICATION_STORE_GENRE_MMORPG;case l.SKUGenres.ROLE_PLAYING:return u.default.Messages.APPLICATION_STORE_GENRE_ROLE_PLAYING;case l.SKUGenres.DUNGEON_CRAWLER:return u.default.Messages.APPLICATION_STORE_GENRE_DUNGEON_CRAWLER;case l.SKUGenres.ROGUELIKE:return u.default.Messages.APPLICATION_STORE_GENRE_ROGUELIKE;case l.SKUGenres.SHOOTER:return u.default.Messages.APPLICATION_STORE_GENRE_SHOOTER;case l.SKUGenres.LIGHT_GUN:return u.default.Messages.APPLICATION_STORE_GENRE_LIGHT_GUN;case l.SKUGenres.SHOOT_EM_UP:return u.default.Messages.APPLICATION_STORE_GENRE_SHOOT_EM_UP;case l.SKUGenres.FPS:return u.default.Messages.APPLICATION_STORE_GENRE_FPS;case l.SKUGenres.DUAL_JOYSTICK_SHOOTER:return u.default.Messages.APPLICATION_STORE_GENRE_DUAL_JOYSTICK_SHOOTER;case l.SKUGenres.SIMULATION:return u.default.Messages.APPLICATION_STORE_GENRE_SIMULATION;case l.SKUGenres.FLIGHT_SIMULATOR:return u.default.Messages.APPLICATION_STORE_GENRE_FLIGHT_SIMULATOR;case l.SKUGenres.TRAIN_SIMULATOR:return u.default.Messages.APPLICATION_STORE_GENRE_TRAIN_SIMULATOR;case l.SKUGenres.LIFE_SIMULATOR:return u.default.Messages.APPLICATION_STORE_GENRE_LIFE_SIMULATOR;case l.SKUGenres.FISHING:return u.default.Messages.APPLICATION_STORE_GENRE_FISHING;case l.SKUGenres.SPORTS:return u.default.Messages.APPLICATION_STORE_GENRE_SPORTS;case l.SKUGenres.BASEBALL:return u.default.Messages.APPLICATION_STORE_GENRE_BASEBALL;case l.SKUGenres.BASKETBALL:return u.default.Messages.APPLICATION_STORE_GENRE_BASKETBALL;case l.SKUGenres.BILLIARDS:return u.default.Messages.APPLICATION_STORE_GENRE_BILLIARDS;case l.SKUGenres.BOWLING:return u.default.Messages.APPLICATION_STORE_GENRE_BOWLING;case l.SKUGenres.BOXING:return u.default.Messages.APPLICATION_STORE_GENRE_BOXING;case l.SKUGenres.FOOTBALL:return u.default.Messages.APPLICATION_STORE_GENRE_FOOTBALL;case l.SKUGenres.GOLF:return u.default.Messages.APPLICATION_STORE_GENRE_GOLF;case l.SKUGenres.HOCKEY:return u.default.Messages.APPLICATION_STORE_GENRE_HOCKEY;case l.SKUGenres.SKATEBOARDING_SKATING:return u.default.Messages.APPLICATION_STORE_GENRE_SKATEBOARDING_SKATING;case l.SKUGenres.SNOWBOARDING_SKIING:return u.default.Messages.APPLICATION_STORE_GENRE_SNOWBOARDING_SKIING;case l.SKUGenres.SOCCER:return u.default.Messages.APPLICATION_STORE_GENRE_SOCCER;case l.SKUGenres.TRACK_FIELD:return u.default.Messages.APPLICATION_STORE_GENRE_TRACK_FIELD;case l.SKUGenres.SURFING_WAKEBOARDING:return u.default.Messages.APPLICATION_STORE_GENRE_SURFING_WAKEBOARDING;case l.SKUGenres.WRESTLING:return u.default.Messages.APPLICATION_STORE_GENRE_WRESTLING;case l.SKUGenres.STRATEGY:return u.default.Messages.APPLICATION_STORE_GENRE_STRATEGY;case l.SKUGenres.FOUR_X:return u.default.Messages.APPLICATION_STORE_GENRE_FOUR_X;case l.SKUGenres.ARTILLERY:return u.default.Messages.APPLICATION_STORE_GENRE_ARTILLERY;case l.SKUGenres.RTS:return u.default.Messages.APPLICATION_STORE_GENRE_RTS;case l.SKUGenres.TOWER_DEFENSE:return u.default.Messages.APPLICATION_STORE_GENRE_TOWER_DEFENSE;case l.SKUGenres.TURN_BASED_STRATEGY:return u.default.Messages.APPLICATION_STORE_GENRE_TURN_BASED_STRATEGY;case l.SKUGenres.WARGAME:return u.default.Messages.APPLICATION_STORE_GENRE_WARGAME;case l.SKUGenres.MOBA:return u.default.Messages.APPLICATION_STORE_GENRE_MOBA;case l.SKUGenres.FIGHTING:return u.default.Messages.APPLICATION_STORE_GENRE_FIGHTING;case l.SKUGenres.PUZZLE:return u.default.Messages.APPLICATION_STORE_GENRE_PUZZLE;case l.SKUGenres.CARD_GAME:return u.default.Messages.APPLICATION_STORE_GENRE_CARD_GAME;case l.SKUGenres.EDUCATION:return u.default.Messages.APPLICATION_STORE_GENRE_EDUCATION;case l.SKUGenres.FITNESS:return u.default.Messages.APPLICATION_STORE_GENRE_FITNESS;case l.SKUGenres.GAMBLING:return u.default.Messages.APPLICATION_STORE_GENRE_GAMBLING;case l.SKUGenres.MUSIC_RHYTHM:return u.default.Messages.APPLICATION_STORE_GENRE_MUSIC_RHYTHM;case l.SKUGenres.PARTY_MINI_GAME:return u.default.Messages.APPLICATION_STORE_GENRE_PARTY_MINI_GAME;case l.SKUGenres.PINBALL:return u.default.Messages.APPLICATION_STORE_GENRE_PINBALL;case l.SKUGenres.TRIVIA_BOARD_GAME:return u.default.Messages.APPLICATION_STORE_GENRE_TRIVIA_BOARD_GAME;default:return u.default.Messages.APPLICATION_STORE_GENRE_MISCELLANEOUS}},t.canUserInstall=function(e){var t=(0,i.nativePlatformTypeToSKUOperatingSystem)(o.default.getPlatform());return e.type===l.SKUTypes.DURABLE_PRIMARY&&null!=t&&e.supportedOperatingSystems.includes(t)},t.getReadablePreorderReleaseDate=function(e){var t=e.preorderReleaseAt,n=e.preorderApproximateReleaseDate;if(null!=t)return t.format("MMMM DD");if(null==n)return null;for(var a=0;a<c.length;a++){var o=c[a],i=o[0],l=o[1],u=(0,r.default)(n,i,!0);if(u.isValid())return u.format(l)}return n};var r=s(n(5)),a=n(54),o=s(n(16)),i=n(289),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}var d={},f={};Object.keys(l.StoreApplicationGenresFilter).forEach((function(e){var t=e.toLowerCase().replace(/_/g,"-"),n=l.StoreApplicationGenresFilter[e];d[t]=n,f[n]=t}));var c=[["YYYY-MM-DD","MMMM DD, Y"],["YYYY-MM","MMMM Y"],["MM-DD","MMMM DD"],["MM","MMMM"],["YYYY","Y"]]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return 16===n||16===a?o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M14 7V9C14 9 12.5867 9 12.5733 9.00667C12.42 9.58667 12.1733 10.1267 11.84 10.6067L12.74 11.5067L11.4933 12.7533L10.5933 11.8533C10.1133 12.1867 9.57334 12.44 8.99334 12.5867V14H6.99334V12.58C6.41334 12.4333 5.87334 12.18 5.39334 11.8467L4.49333 12.7467L3.24667 11.5L4.14667 10.6C3.81333 10.1267 3.56 9.58 3.41333 9H2V7H3.41333C3.56 6.42 3.81333 5.88 4.14667 5.4L3.24667 4.5L4.5 3.24667L5.4 4.14667C5.87334 3.81333 6.42 3.56 7 3.41333V2H9V3.41333C9.58 3.56667 10.12 3.81333 10.6 4.14667L11.5067 3.25333L12.7533 4.5L11.8533 5.4C12.1867 5.87334 12.44 6.42 12.5867 7H14ZM8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z"})):o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}d.displayName="Gear"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return 16===n||16===a?o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{className:f,fill:d,d:"M14 2H16V3H14V5H13V3H11V2H13V0H14V2Z"}),s("path",{className:f,fill:d,d:"M6.5 8.00667C7.88 8.00667 9 6.88667 9 5.50667C9 4.12667 7.88 3.00667 6.5 3.00667C5.12 3.00667 4 4.12667 4 5.50667C4 6.88667 5.12 8.00667 6.5 8.00667Z"}),s("path",{className:f,fill:d,d:"M6.5 8.34C3.26 8.34 1 9.98666 1 12.34V13.0067H12V12.34C12 9.98 9.74 8.34 6.5 8.34Z"})):o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3H24V5H21V8H19V5H16V3H19V0H21V3ZM10 12C12.205 12 14 10.205 14 8C14 5.795 12.205 4 10 4C7.795 4 6 5.795 6 8C6 10.205 7.795 12 10 12ZM10 13C5.289 13 2 15.467 2 19V20H18V19C18 15.467 14.711 13 10 13Z"}))}d.displayName="PersonAdd"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(8)),a=l(n(14)),o=l(n(2)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u=["Spidey Bot","Captain Hook"],s={fetchForGuild:function(e){o.default.dirtyDispatch({type:i.ActionTypes.WEBHOOKS_FETCHING,guildId:e}),a.default.get({url:i.Endpoints.GUILD_WEBHOOKS(e),oldFormErrors:!0}).then((function(t){var n=t.body;return o.default.dispatch({type:i.ActionTypes.WEBHOOKS_UPDATE,guildId:e,webhooks:n})})).catch((function(t){var n=t.body;o.default.dispatch({type:i.ActionTypes.WEBHOOKS_UPDATE,guildId:e,error:n.message})}))},fetchForChannel:function(e,t){o.default.dirtyDispatch({type:i.ActionTypes.WEBHOOKS_FETCHING,guildId:e,channelId:t}),a.default.get({url:i.Endpoints.CHANNEL_WEBHOOKS(t),oldFormErrors:!0}).then((function(n){var r=n.body;return o.default.dispatch({type:i.ActionTypes.WEBHOOKS_UPDATE,guildId:e,channelId:t,webhooks:r})}))},create:function(e,t,n){return null==n&&(n=u[r.default.random(0,u.length-1)]),a.default.post({url:i.Endpoints.CHANNEL_WEBHOOKS(t),body:{name:n},oldFormErrors:!0}).then((function(t){var n=t.body;return o.default.dispatch({type:i.ActionTypes.WEBHOOK_CREATE,guildId:e,webhook:n}),n}))},delete:function(e,t){return a.default.delete({url:i.Endpoints.WEBHOOK(t),oldFormErrors:!0}).then((function(){o.default.dispatch({type:i.ActionTypes.WEBHOOK_DELETE,guildId:e,webhookId:t})}))},update:function(e,t,n){return a.default.patch({url:i.Endpoints.WEBHOOK(t),body:n,oldFormErrors:!0}).then((function(t){var n=t.body;return o.default.dispatch({type:i.ActionTypes.WEBHOOK_UPDATE,guildId:e,webhook:n}),n}))}};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(8330)),i=n(8253),l=n(31),u=f(n(40)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.id,n=(0,a.useStateFromStoresObject)([u.default],(function(){return{canManageChannels:u.default.can(s.Permissions.MANAGE_CHANNELS,e),canManageRoles:u.default.can(s.Permissions.MANAGE_ROLES,e),canManageWebhooks:u.default.can(s.Permissions.MANAGE_WEBHOOKS,e),canViewChannel:u.default.can(s.Permissions.VIEW_CHANNEL,e),canConnectChannel:u.default.can(s.Permissions.CONNECT,e)}}),[e]),r=n.canManageChannels,f=n.canManageRoles,c=n.canManageWebhooks,v=n.canViewChannel,y=n.canConnectChannel;return __OVERLAY__?null:r||f||c?(0,l.isGuildSelectableChannelType)(e.type)&&!v||e.isVocal()&&!y?null:p(i.MenuItem,{id:"edit-channel",label:e.type===s.ChannelTypes.GUILD_CATEGORY?d.default.Messages.EDIT_CATEGORY:d.default.Messages.EDIT_CHANNEL,action:function(){return o.default.open(t)}}):null}v.displayName="useChannelEditItem"},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyMessageIcon=v,t.EmptyMessageHeader=y,t.EmptyMessageBody=m,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(8541),l=d(n(47)),u=d(n(24)),s=d(n(7814));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t,n=e.locked,r=void 0!==n&&n;return p("div",{className:(0,o.default)(s.default.emptyChannelIcon,(t={},t[s.default.locked]=r,t))})}function y(e){var t=e.children;return p(l.default,{className:s.default.header,size:l.default.Sizes.SIZE_32},void 0,t)}function m(e){var t=e.children;return p(u.default,{size:u.default.Sizes.SIZE_16,color:u.default.Colors.CUSTOM,className:s.default.description},void 0,t)}function _(e){var t=e.className,n=e.channelId,r=e.children,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className","channelId","children"]);return a.createElement("div",c({className:(0,o.default)(t,s.default.container),id:(0,i.getMessageDOMId)(n)},l),r)}v.displayName="EmptyMessageIcon",y.displayName="EmptyMessageHeader",m.displayName="EmptyMessageBody",_.displayName="EmptyMessage";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{className:e.background,fill:l,d:"M14 8C14 7.44772 13.5523 7 13 7H9.76001L10.3657 3.58738C10.4201 3.28107 10.1845 3 9.87344 3H8.88907C8.64664 3 8.43914 3.17391 8.39677 3.41262L7.76001 7H4.18011C3.93722 7 3.72946 7.17456 3.68759 7.41381L3.51259 8.41381C3.45905 8.71977 3.69449 9 4.00511 9H7.41001L6.35001 15H2.77011C2.52722 15 2.31946 15.1746 2.27759 15.4138L2.10259 16.4138C2.04905 16.7198 2.28449 17 2.59511 17H6.00001L5.39427 20.4126C5.3399 20.7189 5.57547 21 5.88657 21H6.87094C7.11337 21 7.32088 20.8261 7.36325 20.5874L8.00001 17H14L13.3943 20.4126C13.3399 20.7189 13.5755 21 13.8866 21H14.8709C15.1134 21 15.3209 20.8261 15.3632 20.5874L16 17H19.5799C19.8228 17 20.0306 16.8254 20.0724 16.5862L20.2474 15.5862C20.301 15.2802 20.0655 15 19.7549 15H16.35L16.6758 13.1558C16.7823 12.5529 16.3186 12 15.7063 12C15.2286 12 14.8199 12.3429 14.7368 12.8133L14.3504 15H8.35045L9.41045 9H13C13.5523 9 14 8.55228 14 8Z"}),o("path",{className:s,fill:l,d:"M21.025 5V4C21.025 2.88 20.05 2 19 2C17.95 2 17 2.88 17 4V5C16.4477 5 16 5.44772 16 6V9C16 9.55228 16.4477 10 17 10H19H21C21.5523 10 22 9.55228 22 9V5.975C22 5.43652 21.5635 5 21.025 5ZM20 5H18V4C18 3.42857 18.4667 3 19 3C19.5333 3 20 3.42857 20 4V5Z"}))}i.displayName="ChannelTextLimited"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=I(n(9)),o=n(680),i=n(3),l=I(n(706)),u=n(1209),s=I(n(10)),d=I(n(40)),f=I(n(8424)),c=n(99),p=I(n(8590)),v=I(n(682)),y=I(n(8497)),m=n(8830),_=I(n(8652)),h=I(n(8653)),E=I(n(8654)),g=I(n(8931)),S=n(1),O=I(n(7343));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e){var t,n=e.message,I=e.compact,T=void 0!==I&&I,b=e.className,M=e.onContextMenu,N=e.onClick,A=e.disableInteraction,P=void 0!==A&&A,R=e.renderMediaEmbeds,L=void 0===R||R,D=e.channel,w=(e.isGroupStart,e.animateAvatar,e.subscribeToComponentDispatch,e.renderThreadAccessory),j=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["message","compact","className","onContextMenu","onClick","disableInteraction","renderMediaEmbeds","channel","isGroupStart","animateAvatar","subscribeToComponentDispatch","renderThreadAccessory"]),k=(0,y.default)(n,L),U=k.content,G=k.hasSpoilerEmbeds,F=n.type===S.MessageTypes.REPLY?n.messageReference:void 0,B=(0,i.useStateFromStores)([l.default],(function(){return l.default.getMessageByReference(F)})),H=(0,o.useListItem)(n.id),x=(0,v.default)(n),V=(0,u.useCanSeeThreads)(),W=(0,i.useStateFromStores)([s.default],(function(){return n.hasFlag(S.MessageFlags.HAS_THREAD)&&s.default.getChannel(n.id)})),Y=(0,i.useStateFromStores)([d.default],(function(){return d.default.can(S.Permissions.CREATE_INSTANT_INVITE,D)}));return(0,p.default)(n,Y)?null:r.createElement(f.default,C({compact:T,className:(0,a.default)(b,(t={},t[O.default.ephemeral]=(0,c.hasFlag)(n.flags,S.MessageFlags.EPHEMERAL),t[O.default.disableInteraction]=P,t)),disableInteraction:P,childrenRepliedMessage:(0,g.default)(n,F,B,T),childrenHeader:(0,h.default)(C({},e,{guildId:D.guild_id,author:x})),childrenAccessories:(0,m.renderSimpleAccessories)(e,G),childrenMessageContent:(0,_.default)(e,U),childrenSystemMessage:(0,E.default)(e),onContextMenu:M,onClick:N,hasThread:w&&V&&null!=W&&n.hasFlag(S.MessageFlags.HAS_THREAD),hasReply:n.type===S.MessageTypes.REPLY},H,j))}b.displayName="ChannelMessage";var M=r.memo(b);t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M16.293 9.293L17.707 10.707L12 16.414L6.29297 10.707L7.70697 9.293L11 12.586V2H13V12.586L16.293 9.293ZM18 20V18H20V20C20 21.102 19.104 22 18 22H6C4.896 22 4 21.102 4 20V18H6V20H18Z"}))}d.displayName="Download"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,i=Math.round(screen.width/2-350),l=screen.height>640?Math.round(screen.height/2-320):0;a.default.isDesktop()||(n=window.open(location.protocol+"//"+location.host+o.Routes.CONNECTIONS(e)+"?loading=true","authorize","scrollbars=yes,resizable=yes,toolbar=no,location=yes,top="+l+",left="+i+",width=700,height=640"));r.default.authorize(e,t).then((function(e){var t=e.body.url;null!=t&&(null!=n?n.location.href=t:window.open(t))}))};var r=i(n(739)),a=i(n(16)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t="ContextMenu");var n=e.id,r=e.username,v=e.bot,y=(0,o.useStateFromStores)([s.default],(function(){return s.default.getCurrentUser().id===n}),[n]),h=(0,o.useStateFromStoresArray)([u.default],(function(){return[u.default.isFriend(n),u.default.isBlocked(n)]}),[n]),E=h[0],g=h[1],S=a.useState(!1),O=S[0],I=S[1];if(v||y)return null;return _(l.MenuItem,E?{id:"remove-friend",label:p.default.Messages.REMOVE_FRIEND,action:function(){(0,f.openModal)((function(e){return a.createElement(d.default,m({header:p.default.Messages.REMOVE_FRIEND_TITLE.format({name:r}),confirmText:p.default.Messages.REMOVE_FRIEND,cancelText:p.default.Messages.CANCEL,onConfirm:function(){i.default.removeRelationship(n,{location:t}),I(!1)}},e),_(c.default,{size:c.default.Sizes.SIZE_16},void 0,p.default.Messages.REMOVE_FRIEND_BODY.format({name:r})))}))}}:{id:"add-friend",label:O?p.default.Messages.ADD_FRIEND_BUTTON_AFTER:p.default.Messages.ADD_FRIEND,action:function(){O||(i.default.addRelationship(n,{location:t}),I(!0))},disabled:g||O&&!E})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=v(n(1217)),l=n(8253),u=v(n(70)),s=v(n(12)),d=v(n(466)),f=n(41),c=v(n(24)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(9297)),l=n(8253),u=c(n(9298)),s=c(n(70)),d=n(41),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e){var t=e.id,n=(0,o.useStateFromStoresArray)([s.default],(function(){var e;return[s.default.isFriend(t),null!==(e=s.default.getNickname(t))&&void 0!==e?e:null]}),[t]),r=n[0],c=n[1],p=(0,i.default)();if(!r||!p)return null;var m=null==c?"add-friend-nickname":"edit-friend-nickname",_=null==c?f.default.Messages.ADD_FRIEND_NICKNAME:f.default.Messages.CHANGE_FRIEND_NICKNAME;return v(l.MenuItem,{id:m,label:_,action:function(){(0,d.openModal)((function(t){return a.createElement(u.default,y({user:e,nickname:c},t))}))}})}m.displayName="useAddFriendNicknameItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=m(n(0)),o=n(8253),i=v(n(8264)),l=v(n(8821)),u=v(n(8268)),s=v(n(11)),d=v(n(160)),f=m(n(8382)),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){E(o,r,a,i,l,"next",e)}function l(e){E(o,r,a,i,l,"throw",e)}i(void 0)}))}}function S(e){var t=e.user,n=e.guildId,r=e.channelId,v=e.target,y=e.popoutPosition,m=void 0===y?f.default.Positions.RIGHT:y,E=e.context,S=t.id,O=(0,l.default)(S),I=O.loading,T=O.note,C=!I&&null!=T&&T.length>0,b=E===c.AppContext.POPOUT;return S===s.default.getId()||d.default.hidePersonalInformation||b?null:_(o.MenuItem,{id:"note",label:I?p.default.Messages.LOADING_NOTE:C?p.default.Messages.EDIT_NOTE:p.default.Messages.ADD_NOTE,action:g(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=v){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,i.default)(t.id,t.getAvatarURL(n||void 0));case 4:(0,f.openPopout)(v,{closeOnScroll:!1,render:function(e){return a.createElement(u.default,h({},e,{user:t,userId:S,guildId:null!=n?n:void 0,channelId:null!=r?r:void 0,setNote:!0}))},position:m,offsetX:15,shadow:!1});case 5:case"end":return e.stop()}}),e)})))})}S.displayName="useAddNoteItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyChatRestrictions=function(e){var t=e.target,n=e.type,m=e.content,_=e.stickers,g=e.channel,S=e.restrictMentions,O=void 0===S||S,I=e.respectCooldown,T=void 0===I||I,C=p.default.canUseIncreasedMessageLength(s.default.getNullableCurrentUser());return new Promise((function(e){return function(e){var t=e.target,n=e.type,s=e.content,p=e.stickers,m=e.channel,_=e.restrictMentions,g=e.respectCooldown,S=e.userCanUsePremiumMessageLength,O=e.resolve,I=n===v.TextareaTypes.FORM;if(0===s.length&&!I&&(null==p||0===p.length))return void O({valid:!1,failureReason:v.MessageRestrictionTypes.EMPTY_MESSAGE});var T=S?v.MAX_MESSAGE_LENGTH_PREMIUM:v.MAX_MESSAGE_LENGTH,C=!S;if(s.length>T)return C?null!=m&&a.default.dispatch({type:v.ActionTypes.MESSAGE_LENGTH_UPSELL,channel:m,content:s}):function(e,t){(0,d.openModal)((function(n){return r.createElement(o.default,E({title:y.default.Messages.MESSAGE_TOO_LONG_HEADER,body:y.default.Messages.MESSAGE_TOO_LONG_BODY_TEXT.format({currentLength:e,maxLength:t}),confirmText:y.default.Messages.OKAY},n))})),f.default.track(v.AnalyticEvents.OPEN_MODAL,{type:"Message Too Long Alert",message_content_length:e})}(s.length,T),void O({valid:!1,failureReason:v.MessageRestrictionTypes.MESSAGE_TOO_LONG});if(null!=m){if(null!=m.getGuildId()&&g&&u.default.getSlowmodeCooldownGuess(m.id)>0)return void O({valid:!1,failureReason:v.MessageRestrictionTypes.SLOWMODE_COOLDOWN});if(t)for(var b,M=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(c.RESTRICTIONS);!(b=M()).done;){var N=b.value,A=N.check,P=N.analyticsType,R=N.animation,L=A(s,m,_);if(!1!==L)return void(0,i.showPopout)(t,n,m,(function(){return O({valid:!1,failureReason:v.MessageRestrictionTypes.SHOUTING_CANCELLED})}),(function(){return O({valid:!0})}),(function(){return O({valid:!1,failureReason:v.MessageRestrictionTypes.SHOUTING_CANCELLED})}),P,L,R)}}if(l.default.isFull())return(0,d.openModal)((function(e){return r.createElement(o.default,E({title:y.default.Messages.MESSAGE_RATE_LIMITED_HEADER,body:y.default.Messages.MESSAGE_RATE_LIMITED_BODY,confirmText:y.default.Messages.MESSAGE_RATE_LIMITED_BUTTON},e))})),void O({valid:!1,failureReason:v.MessageRestrictionTypes.RATE_LIMITED});O({valid:!0})}({target:t,type:n,content:m,stickers:_,channel:g,restrictMentions:O,respectCooldown:T,userCanUsePremiumMessageLength:C,resolve:e})}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=m(n(2)),o=m(n(218)),i=n(9323),l=m(n(1324)),u=m(n(1242)),s=m(n(12)),d=n(41),f=m(n(13)),c=n(9324),p=m(n(96)),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(){return(E=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openPopout=E,t.default=t.Positions=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=v(n(9)),u=v(n(67)),s=v(n(98)),d=v(n(8309)),f=v(n(1238)),c=n(121),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(){return(_=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}).apply(this,arguments)}t.Positions=r,function(e){e.TOP="top",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left"}(r||(t.Positions=r={})),function(e){e.DEFAULT="default",e.SPRING="spring",e.NONE="none"}(a||(a={})),function(e){e.TOP="top",e.MIDDLE="middle"}(o||(o={}));var h={position:r.TOP,backdrop:!1,animationType:"default",closeOnScroll:!0,toggleClose:!0,shadow:!0,preventInvert:!1,preventCloseFromModal:!1,preventClickPropagation:!1,preventCloseOnUnmount:!1,zIndexBoost:0,offsetX:0,offsetY:0,arrowAlignment:o.TOP,showArrow:!1};function E(e,t,n,r){var a=t.offsetX,o=void 0===a?0:a,i=t.offsetY,l=void 0===i?0:i,s=e;if(s instanceof Element||(s=u.default.findDOMNode(e)),!(s instanceof Element))return null;var f=0,c=s.getBoundingClientRect(),p=c.top,v=c.left,y=c.right,m=c.bottom;null!=r&&(f=r.pageX-v);var h=_({key:n,targetWidth:y-v,targetHeight:m-p,x:v+o,y:p+l,clickPos:f},t);d.default.open(h)}var g=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).getStateFromStores=function(){n.setState({isOpen:f.default.isOpen(""+n.state.uniqueId)})},n.toggle=function(e){var t=n.state.isOpen;t&&n.props.toggleClose?n.close():t||n.open(e)},n.close=function(){var e=n.state,t=e.isOpen,r=e.uniqueId,a=n.props.onClose;t&&d.default.close(r),c.ComponentDispatch.unsubscribe(p.ComponentActions.POPOUT_CLOSE,n.close),a&&a()},n.handleClick=function(e){var t=n.props,r=t.children;if(null!=t.render){e.preventDefault(),e.stopPropagation();var a=i.Children.only(r).props.onClick;n.toggle(e),a&&a(e)}},n.state={uniqueId:t.uniqueId||s.default.v4(),isOpen:!1},f.default.addChangeListener(n.getStateFromStores);var r=t.subscribeTo;return null!=r&&c.ComponentDispatch.subscribe(r,n.toggle),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.componentDidUpdate=function(e,t){e.position!==this.props.position&&this.state.isOpen?this.open():t.isOpen&&!this.state.isOpen&&this.close()},a.componentWillUnmount=function(){var e=this.props,t=e.subscribeTo,n=e.preventCloseOnUnmount;null!=t&&c.ComponentDispatch.unsubscribe(t,this.toggle),f.default.removeChangeListener(this.getStateFromStores),n?c.ComponentDispatch.unsubscribe(p.ComponentActions.POPOUT_CLOSE,this.close):this.close()},a.open=function(e,t){void 0===t&&(t=this.props);var n=t,r=n.position,a=n.animationType,o=n.preventInvert,i=n.zIndexBoost,l=n.offsetX,u=n.offsetY,s=n.closeOnScroll,d=n.containerClass,f=n.dependsOn,v=n.shadow,y=n.backdrop,m=n.render,_=n.onOpen,h=n.preventCloseFromModal,g=n.arrowAlignment,S=n.showArrow,O=n.forceTheme;if(null==m)return null;var I={position:r,offsetX:l,offsetY:u,animationType:a,preventInvert:o,zIndexBoost:i,closeOnScroll:s,containerClass:d,dependsOn:f,shadow:v,backdrop:y,render:m,preventCloseFromModal:h,arrowAlignment:g,showArrow:S,forceTheme:O};c.ComponentDispatch.subscribe(p.ComponentActions.POPOUT_CLOSE,this.close),E(null!=e&&e.currentTarget instanceof Element?e.currentTarget:this,I,this.state.uniqueId,e),_&&_()},a.render=function(){var e=this.props.children;if(null!=e){var t=i.Children.only(e);return i.cloneElement(t,{onClick:this.handleClick,className:(0,l.default)(t.props.className,{"popout-open":this.state.isOpen})})}return null},r}(i.PureComponent);g.displayName="DeprecatedPopout",g.Positions=r,g.Animations=a,g.ArrowAlignments=o,g.defaultProps=h;var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=p(n(3)),l=p(n(2)),u=p(n(10)),s=p(n(36)),d=p(n(12)),f=n(8279),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=u.default.getChannel(e),n=null!=t&&t.type===c.ChannelTypes.DM?t.getRecipientId():null,i=d.default.getUser(n);if(null!=i&&i.bot||(n=null),r===n)return!1;r=n,a=null,o=null}var m=new(function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var l=i.prototype;return l.initialize=function(){this.waitFor(u.default)},l.getCommands=function(e,t){return r===e&&t===o?a:null},i}(i.default.Store))(l.default,{LOGOUT:function(e){return r=null,a=null,void(o=null)},CONNECTION_OPEN:function(e){var t;null!=(t=s.default.getChannelId())&&y(t)},CHANNEL_SELECT:function(e){var t=e.channelId;null!=t&&y(t)},DM_APPLICATION_COMMANDS_UPDATE:function(e){var t=e.botUserId,n=e.applicationCommands,i=e.commandTarget;if(t!==r)return!1;a=(0,f.buildApplicationCommands)(n).filter((function(e){return e.target===i})),o=i}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=y(n(1217)),l=n(8253),u=y(n(70)),s=y(n(12)),d=y(n(466)),f=n(41),c=y(n(24)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){void 0===t&&(t="ContextMenu");var n=e.id,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getCurrentUser().id===n}),[n]),y=(0,o.useStateFromStores)([u.default],(function(){return u.default.isBlocked(n)}),[n]);if(r)return null;function m(){i.default.addRelationship(n,{location:t},p.RelationshipTypes.BLOCKED)}return h(l.MenuItem,{id:"block",label:y?v.default.Messages.UNBLOCK:v.default.Messages.BLOCK,action:function(){return y?i.default.removeRelationship(n,{location:t}):(0,f.openModal)((function(t){return a.createElement(d.default,_({header:v.default.Messages.CONFIRM_USER_BLOCK_TITLE.format({name:e.username}),confirmText:v.default.Messages.BLOCK,cancelText:v.default.Messages.CANCEL,onConfirm:m},t),h(c.default,{size:c.default.Sizes.SIZE_16},void 0,v.default.Messages.CONFIRM_USER_BLOCK_BODY.format({name:e.username})))}))}})}E.displayName="useBlockUserItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(391)),i=n(8253),l=c(n(11)),u=c(n(10)),s=c(n(36)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){var n=l.default.getId(),r=t===d.AppContext.POPOUT,c=(0,a.useStateFromStores)([s.default,u.default],(function(){return s.default.getVoiceChannelId()===u.default.getDMFromUserId(e.id)}));return n===e.id||r||c||e.bot?null:v(i.MenuItem,{id:"call",label:f.default.Messages.CALL,action:function(){return o.default.openPrivateChannel(e.id,!0)}})}y.displayName="useCallUserItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=E(n(391)),l=E(n(1211)),u=E(n(390)),s=n(8253),d=E(n(10)),f=E(n(86)),c=E(n(40)),p=E(n(70)),v=E(n(361)),y=E(n(12)),m=n(8286),_=n(1),h=E(n(6));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e,t){i.default.ensurePrivateChannel(e).then((function(e){null!=d.default.getChannel(e)&&u.default.sendInvite(e,t,"context_menu",null)}))}function T(e,t){var n=(0,o.useStateFromStores)([y.default],(function(){return y.default.getCurrentUser()}),[]),r=(0,o.useStateFromStores)([v.default],(function(){return v.default.getFlattenedGuilds()}),[]),i=a.useState({}),u=i[0],d=i[1];var E=r.filter((function(e){return(0,m.canViewInviteModal)(c.default,e)&&e.id!==t}));return n.id===e.id||e.bot||0===E.length||p.default.isBlocked(e.id)?null:S(s.MenuItem,{id:"invite-to-server",label:h.default.Messages.INVITE_TO_SERVER},void 0,E.map((function(t){return u[t.id]?S(s.MenuItem,{id:t.id,disabled:!0,label:h.default.Messages.INVITE_SENT},t.id):S(s.MenuItem,{id:t.id,label:t.name,action:function(){return function(e,t){var n,r,a=f.default.getDefaultChannel(e.id);null!=a&&(d(O({},u,((n={})[e.id]=!0,n))),c.default.can(_.Permissions.CREATE_INSTANT_INVITE,e)?l.default.createInvite(a.id,(r={},r.max_uses=1,r.unique=!0,r),"User Invite Context Menu").then((function(e){return I(t,e.code)})):I(t,e.vanityURLCode))}(t,e.id)}},t.id)})))}T.displayName="useInviteUserToGuildItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t=o.MediaEngineContextTypes.DEFAULT);var n=s.default.getCurrentUser().id===e,r=(0,a.useStateFromStoresObject)([u.default],(function(){return n?{muted:u.default.isSelfMute(t),deafened:u.default.isSelfDeaf(t)}:{muted:u.default.isLocalMute(e,t),localVideoDisabled:u.default.isLocalVideoDisabled(e,t)}}),[n]),f=r.muted,c=r.deafened,v=void 0!==c&&c,y=r.localVideoDisabled,m=void 0!==y&&y;return n?[p(l.MenuCheckboxItem,{id:"mute",label:d.default.Messages.SOUND_MUTE,action:function(){return i.default.toggleSelfMute(t)},checked:f},"self-mute"),p(l.MenuCheckboxItem,{id:"deafen",label:d.default.Messages.DEAFEN,action:function(){return i.default.toggleSelfDeaf(t)},checked:v},"self-deafen")]:[p(l.MenuCheckboxItem,{id:"mute",label:d.default.Messages.SOUND_MUTE,action:function(){return i.default.toggleLocalMute(e,t)},checked:f},"self-mute"),u.default.supports(o.Features.DISABLE_VIDEO)?p(l.MenuCheckboxItem,{id:"disable-video",label:d.default.Messages.DISABLE_VIDEO,action:function(){return i.default.setDisableLocalVideo(e,!m,t)},checked:m},"disable-video"):null]};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(34),i=f(n(288)),l=n(8253),u=f(n(51)),s=f(n(12)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=d(n(1332)),i=n(8253),l=d(n(256)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=(0,a.useStateFromStores)([l.default],(function(){return(0,o.default)(l.default.findActivity(e,(function(e){return e.type===u.ActivityTypes.STREAMING})))}),[e]);return null==t?null:c(i.MenuItem,{id:"watch-stream",label:s.default.Messages.WATCH_STREAM,action:function(){return window.open(t,"_blank")}})}p.displayName="useWatchStreamItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={clearDraft:function(e,t){a.default.dirtyDispatch({type:o.ActionTypes.DRAFT_CLEAR,channelId:e,draftType:t})},saveDraft:function(e,t,n){a.default.dirtyDispatch({type:o.ActionTypes.DRAFT_SAVE,channelId:e,draft:t,draftType:n})},changeDraft:function(e,t,n){a.default.dirtyDispatch({type:o.ActionTypes.DRAFT_CHANGE,channelId:e,draft:t,draftType:n})},changeThreadSettings:function(e,t){a.default.dirtyDispatch({type:o.ActionTypes.THREAD_SETTINGS_DRAFT_CHANGE,channelId:e,draft:t})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingReply=function(e){var t=e.message,n=e.channel,r=e.shouldMention,i=e.showMentionToggle;a.default.dispatch({type:o.ActionTypes.CREATE_PENDING_REPLY,message:t,channel:n,shouldMention:r,showMentionToggle:i})},t.setPendingReplyShouldMention=function(e,t){a.default.dispatch({type:o.ActionTypes.SET_PENDING_REPLY_SHOULD_MENTION,channelId:e,shouldMention:t})},t.deletePendingReply=function(e){a.default.dispatch({type:o.ActionTypes.DELETE_PENDING_REPLY,channelId:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Q();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=J(n(9)),i=J(n(64)),l=J(n(8312)),u=n(3),s=J(n(390)),d=J(n(8617)),f=J(n(105)),c=J(n(8280)),p=J(n(9392)),v=n(8278),y=J(n(9402)),m=n(8622),_=n(1218),h=J(n(9418)),E=n(8365),g=J(n(8560)),S=J(n(9478)),O=J(n(88)),I=J(n(182)),T=J(n(8869)),C=n(8390),b=J(n(1276)),M=n(5940),N=n(290),A=n(1209),P=n(1225),R=J(n(56)),L=J(n(40)),D=J(n(8628)),w=J(n(39)),j=J(n(12)),k=n(8349),U=J(n(78)),G=J(n(16)),F=J(n(96)),B=J(n(9480)),H=J(n(9495)),x=J(n(9496)),V=J(n(9497)),W=J(n(9498)),Y=J(n(9500)),z=n(8849),K=J(n(9502)),$=J(n(9505)),Z=J(n(9508)),q=n(1),X=J(n(7344));function J(e){return e&&e.__esModule?e:{default:e}}function Q(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Q=function(){return e},e}function ee(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function te(e,t){var n,r,J,Q,te=e.textValue,ne=e.richValue,re=e.className,ae=e.innerClassName,oe=e.disabled,ie=e.placeholder,le=e.channel,ue=e.type,se=e.focused,de=e.renderAttachButton,fe=e.shouldRenderPremiumGiftButton,ce=e.shouldUploadLongMessages,pe=e.pendingReply,ve=e.onChange,ye=e.onResize,me=e.onBlur,_e=e.onFocus,he=e.onKeyDown,Ee=e.onSubmit,ge=e.promptToUpload,Se=e.highlighted,Oe=e.canExecuteCommands,Ie=e.canMentionRoles,Te=e.canMentionChannels,Ce=e.maxCharacterCount,be=e.characterCountClassName,Me=e.autoSuggestEnabled,Ne=void 0!==Me&&Me,Ae=e.canAttachStickers,Pe=void 0!==Ae&&Ae,Re=e.canAddGIFs,Le=void 0!==Re&&Re,De=e.disableAutoFocus,we=ue===q.TextareaTypes.THREAD_CREATION?P.DraftType.FirstThreadMessage:P.DraftType.ChannelMessage,je=a.useState((function(){return new i.default}))[0],ke=a.useRef(null),Ue=a.useRef(null),Ge=a.useRef(null),Fe=a.useRef(null),Be=a.useRef(null),He=a.useRef(null),xe=a.useRef(null),Ve=a.useRef(null),We=a.useRef(null);a.useEffect((function(){je.emit("text-changed",te,ne)}),[te,ne,je]);if(null!=t&&"function"==typeof t)throw Error("Only Ref objects are supported");null==t&&(t=Fe);var Ye=(0,u.useStateFromStores)([w.default],(function(){return w.default.useRichChatTextBox}),[])&&!G.default.isAndroid()&&null!=window.ResizeObserver,ze=le.getGuildId(),Ke=(0,u.useStateFromStores)([I.default],(function(){return null!=ze&&I.default.isLurking(ze)}),[ze]),$e=(0,u.useStateFromStores)([R.default,j.default],(function(){var e,t,n=j.default.getCurrentUser();return null!==(e=null!=ze&&null!=n?null===(t=R.default.getMember(ze,n.id))||void 0===t?void 0:t.isPending:null)&&void 0!==e&&e})),Ze=(0,u.useStateFromStoresObject)([L.default],(function(){var e=le.isPrivate(),t=L.default.can(q.Permissions.SEND_MESSAGES,le),n=t&&L.default.can(q.Permissions.ATTACH_FILES,le),r=(0,A.computeIsReadonlyThread)(le);return{disabled:oe||$e||!e&&!t||r,canAttachFiles:e||$e||n}}),[oe,le]),qe=Ze.disabled,Xe=Ze.canAttachFiles,Je=(0,u.useStateFromStores)([j.default],(function(){return F.default.canUseIncreasedMessageLength(j.default.getCurrentUser())})),Qe=(0,T.default)(),et=(0,u.useStateFromStores)([f.default],(function(){return f.default.fontSize})),tt=(0,u.useStateFromStores)([D.default],(function(){return D.default.isEnabled()})),nt=(0,E.useExpressionPickerStore)((function(e){return[e.activeView,e.activeViewType]}),l.default),rt=nt[0],at=nt[1];a.useEffect((function(){return function(){(0,E.closeExpressionPicker)(ue)}}),[ue]);var ot=(0,u.useStateFromStores)([c.default],(function(){return Oe?c.default.getActiveCommand():null}),[Oe]),it=a.useCallback((function(){var e;null==rt&&(null===(e=Ge.current)||void 0===e||e.handleOuterClick())}),[rt]),lt=function(e,t,n,r){var o=a.useState(!1),i=o[0],l=o[1],u=a.useCallback((function(a,o,u){var s,d;if(!i){l(!0);var f=null!==(s=null===(d=b.default.getStickerPreview(r))||void 0===d?void 0:d.map((function(e){return e.id})))&&void 0!==s?s:[];e(a,f,o,u).then((function(e){var r=e.shouldClear,a=e.shouldRefocus;null!=n.current&&(r&&t===q.TextareaTypes.NORMAL&&n.current.clearValue(),l(!1),(0,E.closeExpressionPicker)(),a&&n.current.focus())}))}}),[n,e,i,t,r]);return{submitting:i,submit:u}}(Ee,ue,Ge,le.id),ut=lt.submitting,st=lt.submit,dt=function(e,t){return a.useCallback((function(n){var r;(0,E.closeExpressionPicker)(),e(n.url),null===(r=t.current)||void 0===r||r.focus()}),[t,e])}(st,Ge),ft=function(e){return a.useCallback((function(t,n,r){void 0===r&&(r=!1);var a=e.current;null!=t&&null!=a&&a.insertEmoji(t,n,r),n&&(0,E.closeExpressionPicker)()}),[e])}(Ge),ct=function(e,t,n,r,o){return a.useCallback((function(a,i){var l;if(!n){var u;if((0,N.shouldAttachSticker)(i,r,o))(0,z.trackStickerPreviewSelect)({sticker:a,stickerSelectLocation:i,isReplacement:null!=b.default.getStickerPreview(o)}),(0,M.addStickerPreview)(o,a);else s.default.sendStickers(o,[a.id],"",s.default.getSendMessageOptionsForReply(t)),(0,C.deletePendingReply)(o),null===(u=e.current)||void 0===u||u.clearValue();(0,E.closeExpressionPicker)(),null===(l=e.current)||void 0===l||l.focus()}}),[n,e,t,r,o])}(Ge,pe,qe,te,le.id),pt=a.useCallback((function(){var e;return null==He||null===(e=He.current)||void 0===e?void 0:e.hide()}),[]),vt=a.useCallback((function(e){je.emit("autocomplete-visibility-change",e)}),[je]);!function(e,t,n,r){var o=a.useCallback((function(){t||(0,E.toggleExpressionPicker)(_.ExpressionPickerViewType.EMOJI,e)}),[t,e]),i=a.useCallback((function(){!t&&n&&(0,E.toggleExpressionPicker)(_.ExpressionPickerViewType.GIF,e)}),[n,t,e]),l=a.useCallback((function(){!t&&r&&(0,E.toggleExpressionPicker)(_.ExpressionPickerViewType.STICKER,e)}),[r,t,e]);(0,k.useComponentAction)({event:q.ComponentActions.TOGGLE_EMOJI_POPOUT,handler:o}),(0,k.useComponentAction)({event:q.ComponentActions.TOGGLE_GIF_PICKER,handler:i}),(0,k.useComponentAction)({event:q.ComponentActions.TOGGLE_STICKER_PICKER,handler:l})}(ue,qe,Le,Pe);var yt=!qe&&(fe||null==ue||ue===q.TextareaTypes.NORMAL||ue===q.TextareaTypes.RULES_INPUT),mt=U.default.canEveryoneRole(q.Permissions.SEND_MESSAGES,le),_t=qe&&!((Ke||$e)&&mt)||ut&&ue!==q.TextareaTypes.RULES_INPUT,ht=qe?null:null==de?void 0:de(X.default.attachButton),Et=(0,u.useStateFromStores)([g.default],(function(){return g.default.expressionSuggestionsEnabled})),gt=(0,u.useStateFromStores)([b.default],(function(){return b.default.getStickerPreview(le.id)})),St=null!=gt&&gt.length>0,Ot=d.default.useExperiment({})[0].allowSlashCommands&&Ye,It=null==rt||null==at||at!==ue,Tt=!Ot||!Oe||!se||te!==v.COMMAND_SENTINEL,Ct=null!=pe,bt=a.useCallback((function(){var e,t;return!(Tt||!(null===(e=Ue.current)||void 0===e?void 0:e.onTabOrEnter()))||((null===(t=ke.current)||void 0===t?void 0:t.onTabOrEnter(!1))||!1)}),[Tt]),Mt=a.useCallback((function(){var e,t;return!(Tt||!(null===(e=Ue.current)||void 0===e?void 0:e.onTabOrEnter()))||((null===(t=ke.current)||void 0===t?void 0:t.onTabOrEnter(!0))||!1)}),[Tt]),Nt=a.useCallback((function(e){var t,n;return!(Tt||!(null===(t=Ue.current)||void 0===t?void 0:t.onMoveSelection(e)))||((null===(n=ke.current)||void 0===n?void 0:n.onMoveSelection(e))||!1)}),[Tt]);return ee(m.EventEmitterProvider,{value:je},void 0,a.createElement("div",{ref:t,className:(0,o.default)(re,(n={},n[X.default.channelTextArea]=!0,n[X.default.channelTextAreaDisabled]=_t,n[X.default.highlighted]=Se,n)),onMouseDown:it},ee(K.default,{type:ue,channel:le,editorRef:Ge,activeCommand:ot,pendingReply:pe}),a.createElement("div",{ref:Be,onScroll:pt,className:(0,o.default)(ae,(r={},r[X.default.scrollableContainer]=!0,r[X.default.webkit]="Blink"===platform.layout,r[X.default.hasConnectedBar]=null!=ot||null!=pe,r))},Pe?ee(Y.default,{channelId:le.id}):null,ee("div",{className:(0,o.default)((J={},J[X.default.inner]=!0,J[X.default.innerDisabled]=_t,J[X.default.sansAttachButton]=ue!==q.TextareaTypes.FORM&&ue!==q.TextareaTypes.EDIT&&ue!==q.TextareaTypes.RULES_INPUT,J[X.default.sansAttachButtonCreateThread]=ue===q.TextareaTypes.THREAD_CREATION,J))},void 0,ht,ee(O.default,{ringTarget:t,ringClassName:X.default.focusRing},void 0,a.createElement(B.default,{ref:Ge,focused:se,useSlate:Ye,textValue:te,richValue:ne,disabled:qe,placeholder:ie,isPreviewing:(Ke||$e)&&mt,channel:le,type:ue,draftType:we,canPasteFiles:Xe,shouldUploadLongMessages:ce,uploadPromptCharacterCount:q.MAX_MESSAGE_LENGTH_PREMIUM,maxCharacterCount:null!=Ce?Ce:Qe,onChange:ve,onResize:ye,onBlur:me,onFocus:_e,onKeyDown:he,onSubmit:st,onTab:bt,onEnter:Mt,onMoveSelection:Nt,onSelectionChanged:function(e){null!=Ge.current&&je.emit("selection-changed",e)},onMaybeShowAutocomplete:function(){var e;null===(e=ke.current)||void 0===e||e.onMaybeShowAutocomplete()},promptToUpload:ge,fontSize:et,spellcheckEnabled:tt,canUseCommands:Oe,canOnlyUseTextCommands:Ct,disableAutoFocus:De,className:ue===q.TextareaTypes.THREAD_CREATION?X.default.textAreaThreadCreation:void 0})),ue!==q.TextareaTypes.RULES_INPUT?ee("div",{className:X.default.buttons},void 0,fe?ee(V.default,{disabled:qe,channel:le}):null,ue===q.TextareaTypes.NORMAL?a.createElement(a.Fragment,null,a.createElement(x.default,{ref:xe,disabled:qe,type:ue}),a.createElement(W.default,{ref:Ve,disabled:qe,type:ue})):null,a.createElement(H.default,{ref:We,disabled:qe,type:ue})):null)),Tt?null:a.createElement(p.default,{ref:Ue,channel:le,canOnlyUseTextCommands:Ct}),a.createElement(y.default,{ref:ke,channel:le,canMentionRoles:Ie,canMentionChannels:Te,canExecuteCommands:Oe,useNewSlashCommands:Ot,canOnlyUseTextCommands:Ct,canSendStickers:ue===q.TextareaTypes.NORMAL||ue===q.TextareaTypes.SIDEBAR,textValue:te,focused:se,expressionPickerView:rt,type:ue,editorRef:Ge,onSendMessage:st,onSendSticker:ct,onVisibilityChange:vt}),Ye&&null!=ne&&yt?ee($.default,{showPremiumFlair:ue===q.TextareaTypes.NORMAL&&te.length>q.MAX_MESSAGE_LENGTH&&Je,document:ne.document,maxCharacterCount:null!=Ce?Ce:Qe,currentLength:te.length,showCharacterCountAfter:null!=Ce?Ce:Qe/10,className:be,upsellAroundLimit:ue===q.TextareaTypes.NORMAL&&!Je}):null,Ye&&!__OVERLAY__&&null!=ne&&null==ot?a.createElement(Z.default,{ref:He,editorRef:Ge,containerRef:Be,value:ne}):null,Et&&Ne&&!St&&!0!==(null===(Q=ke.current)||void 0===Q?void 0:Q.isVisible())&&!__OVERLAY__&&null!=ne?ee(S.default,{editorRef:Ge,channel:le,isEditorFocused:se,onSelectSticker:ct}):null),It?null:ee(h.default,{positionTargetRef:t,isEditingMessage:ue===q.TextareaTypes.EDIT,onSelectGIF:dt,onSelectEmoji:ft,onSelectSticker:ct,emojiButtonRef:We,stickerButtonRef:Ve,gifButtonRef:xe,channel:le,canAddGIFs:Le,canAttachStickers:Pe}))}te.displayName="ChannelTextAreaContainer";var ne=a.memo(a.forwardRef(te));t.default=ne},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useExpressionPickerGridKeyboardNavigation=t.useSynchronizedActiveCategoryIndexForScrollPosition=t.useSynchronizedScrollPositionForActiveCategoryIndex=t.useExpressionPickerGridWidth=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(8))&&r.__esModule?r:{default:r},i=n(8404),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}t.useExpressionPickerGridWidth=function(e){var t=e.gridWrapperRef,n=e.containerWidth,r=e.showingEmptyState,i=e.listPaddingLeft,l=void 0===i?0:i,u=e.listScrollbarWidth,s=void 0===u?0:u,d=a.useState(void 0),f=d[0],c=d[1],p=a.useCallback((function(){if(null==t.current)return null;c(t.current.offsetWidth-l-s)}),[t,l,s]);return a.useLayoutEffect((function(){p()}),[n,p,r]),a.useEffect((function(){var e=o.default.debounce(p,250);return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[p]),f};t.useSynchronizedScrollPositionForActiveCategoryIndex=function(e){var t=e.activeCategoryIndex,n=e.listRef,r=e.searchQuery,o=a.useRef(r),i=a.useRef(!0);a.useLayoutEffect((function(){var e;""===r&&""!==o.current&&(null===(e=n.current)||void 0===e||e.scrollToSectionTop(t));o.current=r}),[r,t,n]),a.useLayoutEffect((function(){var e;i.current&&(null===(e=n.current)||void 0===e||e.scrollToSectionTop(t),i.current=!1)}),[t,n]),a.useEffect((function(){o.current=r}),[r])};t.useSynchronizedActiveCategoryIndexForScrollPosition=function(e){var t=e.activeCategoryIndex,n=e.listRef,r=e.isScrolling,i=e.searchQuery,u=e.scrollOffset,s=void 0===u?0:u,d=e.onActiveCategoryIndexChange,f=a.useRef(l.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID),c=a.useMemo((function(){return o.default.debounce((function(){r.current=!1}),250)}),[r]),p=a.useMemo((function(){return o.default.debounce((function(e){""===i&&(window.cancelAnimationFrame(f.current),f.current=window.requestAnimationFrame((function(){var r,a=null===(r=n.current)||void 0===r?void 0:r.getSectionDescriptors();if(null!=a){var o=a.findIndex((function(t,n){var r=a[n+1],o=e+s>=t.offset.top,i=null!=r&&e+s<r.offset.top;return null!=r&&!o&&!i||o&&i||o&&null==r})),i=-1===o?0:o;t!==i&&d(i)}})))}),50)}),[i,n,t,s,d]);return a.useCallback((function(e){r.current=!0,c(),p(e)}),[r,c,p])};t.useExpressionPickerGridKeyboardNavigation=function(e){var t=e.columnCounts,n=e.gridNavigatorId,r=e.itemGrid,o=e.itemList,l=e.onGridNavigatorItemSelect,u=e.onGridNavigatorPositionChange,s=a.useRef(!1),d=a.useCallback((function(e,t){var n=r[t];if(null!=n)return n[e]}),[r]),f=a.useCallback((function(e){var t=e.focusedX,n=e.focusedY;s.current=!0;var r=d(t,n);if(null!=r){var a=r.visibleRowIndex,i=r.columnIndex;u(i,a),null!=o.current&&o.current.scrollRowIntoView(n)}}),[d,o,u]),c=a.useCallback((function(e,t,n){switch(n.type){case i.ActionType.NAVIGATE_UP:case i.ActionType.NAVIGATE_DOWN:case i.ActionType.NAVIGATE_RIGHT:case i.ActionType.NAVIGATE_LEFT:case i.ActionType.NAVIGATE_INLINE_START:case i.ActionType.NAVIGATE_INLINE_END:case i.ActionType.NAVIGATE_START:case i.ActionType.NAVIGATE_END:case i.ActionType.NAVIGATE_CROSSLINE_START:case i.ActionType.NAVIGATE_CROSSLINE_END:f(t)}}),[f]),p=a.useCallback((function(e,t,n){var r=d(e,t);null!=r&&l(r,n)}),[d,l]),v=(0,i.useGridNavigator)({navId:n,columnCounts:t,onDispatch:c,onSelect:p,autoFocusElement:!1,useVirtualFocus:!0}),y=v.dispatch,m=v.getItemProps,_=v.getRowProps,h=v.getContainerProps,E=a.useMemo((function(){var e=h();return{gridContainerProps:e,handleGridContainerKeyDown:e.onKeyDown}}),[h]),g=E.gridContainerProps,S=E.handleGridContainerKeyDown;return a.useEffect((function(){var e=function(){s.current=!1};return window.addEventListener("mousemove",e),function(){return window.removeEventListener("mousemove",e)}}),[]),{gridDispatch:y,getItemProps:m,getRowProps:_,gridContainerProps:g,handleGridContainerKeyDown:S,isUsingKeyboardNavigation:s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Sizes=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(8264)),l=y(n(8268)),u=y(n(89)),s=y(n(61)),d=y(n(278)),f=y(n(8276)),c=y(n(1349)),p=y(n(248)),v=y(n(7504));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g={SIZE_16:16,SIZE_24:24};function S(e,t){var n=e instanceof u.default?e:null!=e?e.user:null;return null!=n?n.id:"user-"+t}function O(e){return E("div",{className:v.default.moreUsers},void 0,e)}function I(e){switch(void 0===e&&(e=g.SIZE_24),e){case g.SIZE_16:return v.default.size16;default:return v.default.size24}}t.Sizes=g,O.displayName="defaultRenderMoreUsers";var T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={popoutUserId:null},t._ref=a.createRef(),t.defaultRenderUser=function(e,n,r){var a=t.props,o=a.showUserPopout,i=a.guildId;if(null==e){if(t.props.showDefaultAvatarsForNullUsers){var l=(r||0)%c.default.DEFAULT_AVATARS.length;return E("img",{src:c.default.DEFAULT_AVATARS[l],alt:"",className:v.default.avatar})}return E("div",{className:v.default.emptyUser})}var u=E("img",{src:e.getAvatarURL(i),alt:e.username,className:v.default.avatar},e.id);return o?E(s.default,{className:v.default.clickableAvatar,onClick:function(){null!=t._ref.current&&null!=e&&t.setState({popoutUserId:e.id})},tabIndex:-1},e.id,u):u},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var u=r.prototype;return u.renderUsers=function(){for(var e=this.props,t=e.users,n=e.max,r=e.renderUser,o=void 0===r?this.defaultRenderUser:r,i=e.renderMoreUsers,l=e.count,u=e.size,s=[],d=t.length===n?t.length:n-1,f=0;f<d&&f<t.length;){var c=f===t.length-1,y=o(t[f],c,f);s.push(c?E("div",{className:v.default.avatarContainer},S(t[f]||null,f),y):E(p.default,{className:v.default.avatarContainerMasked,height:u,width:u,mask:p.default.Masks.VOICE_USER_SUMMARY_ITEM},S(t[f],f),y)),f++}if(null!=l){if(l>=n)s.push(E(a.Fragment,{},"more-users",i(n+"+",n)));else if(l>t.length){var m=l-t.length;s.push(E(a.Fragment,{},"more-users",i("+"+m,m)))}}else if(f<t.length){var _=Math.min(t.length-f,99);s.push(E(a.Fragment,{},"more-users",i("+"+_,_)))}return s},u.renderIcon=function(){return this.props.renderIcon?E(f.default,{foreground:v.default.foreground,className:v.default.icon}):null},u.render=function(){var e=this,t=this.props,n=t.className,r=t.size,u=t.users,s=t.guildId,f=t.showUserPopout,c=this.state.popoutUserId,p=u.find((function(e){return null!=e&&e.id===c}));return E(d.default,{position:d.default.Positions.RIGHT,preload:null==p?void 0:function(){return(0,i.default)(p.id,p.getAvatarURL(s))},shouldShow:f&&null!=c,fixed:!0,renderPopout:function(t){return null==c?null:a.createElement(l.default,_({},e.props,t,{userId:c,guildId:e.props.guildId}))},onRequestClose:function(){return e.setState({popoutUserId:null})}},void 0,(function(t){return a.createElement("div",_({className:(0,o.default)(n,v.default.container,I(r)),ref:e._ref},t),e.renderIcon(),e.renderUsers())}))},r}(a.PureComponent);T.displayName="UserSummaryItem",T.defaultProps={max:10,renderMoreUsers:O,renderIcon:!1,showDefaultAvatarsForNullUsers:!1,size:g.SIZE_24};var C=T;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=d(n(0)),o=u(n(9)),i=d(n(248)),l=u(n(7506));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.className,n=e.guild,r=e.isSelected,u=void 0===r||r,s=e.width,d=void 0===s?32:s,c=e.height,p=void 0===c?32:c,v=e.shouldAnimate,y=void 0===v||v,m=a.useState(!1),_=m[0],h=m[1],E=n.getIconURL(y&&u),g=function(){return h(!0)},S=function(){return h(!1)};return f("div",{onFocus:g,onBlur:S,onMouseOver:g,onMouseLeave:S},void 0,f(i.default,{className:(0,o.default)(l.default.mask,t),mask:u||_?i.MaskIDs.SQUIRCLE:i.MaskIDs.AVATAR_DEFAULT,width:d,height:p},void 0,null==E?f("div",{className:(0,o.default)(l.default.guildIcon,l.default.guildIconWithoutImage)},void 0,f("div",{className:l.default.guildAcronym},void 0,n.acronym)):f("img",{alt:n.toString(),src:E,className:l.default.guildIcon})))};c.displayName="GuildEmojiIcon";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return l.default.embedded&&null!=e&&""!==e?null!=e&&(0,o.isStickerAssetUrl)(e)?null:[c(a.MenuItem,{id:"copy-native-link",label:s.default.Messages.COPY_LINK,action:function(){return u.default.copy(e)}},"copy-native-link"),c(a.MenuItem,{id:"open-native-link",label:s.default.Messages.OPEN_LINK,action:function(n){return(0,i.handleClick)({href:e,trusted:(0,i.isLinkTrusted)(e,t),shouldConfirm:!0},n)}},"open-native-link")]:null};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8253),o=n(290),i=n(730),l=d(n(16)),u=d(n(43)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isKnownLang=function(e){return e.toLowerCase()in h},t.isPointInCodeBlock=function(e,t){var n=e.value.document,r=n.getFirstText();if(null==r)return!1;var a=u.default.serializeSelection(n,{start:{key:r.key,offset:0},end:t},"raw",!0).match(/```/g);return null!=a&&a.length>0&&a.length%2!=0},t.getLineState=function(e){var t=e.data.get("lineType");return null==t?null:JSON.parse(t)},t.default=function(){return{onChange:s.catchAndLogExceptions(A),decorateNode:s.catchAndLogExceptions(F),renderDecoration:B}},t.computeLineStates=L,t.findBackticksOnLine=j,t.caseInsensitiveLangRegex=t.langRegex=void 0;var r=c(n(0)),a=d(n(8785)),o=d(n(23)),i=d(n(404)),l=d(n(1231)),u=d(n(8439)),s=c(n(8326));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(){return(p=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}).apply(this,arguments)}function v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var m,_=a.default.listLanguages(),h=Object.create(null),E=v(_);!(m=E()).done;){var g=m.value;g=g.toLowerCase();var S=a.default.getLanguage(g);if(null!=S){var O=S.aliases;if(h[g]=g,null!=O)for(var I,T=v(O);!(I=T()).done;){var C=I.value;h[C.toLowerCase()]=g}}}var b=/^[a-z0-9_+\-.#]+$/;t.langRegex=b;var M=/^[a-z0-9_+\-.#]+$/i;for(var N in t.caseInsensitiveLangRegex=M,h)if(!N.match(b))throw new Error("Language name does not match regex: "+N);function A(e,t){!function(e,t){for(var n,r=v(t);!(n=r()).done;){var a=n.value,o=D(a);a.line.data.get("lineType")!=o&&e.setNodeByKey(a.line.key,{data:{lineType:o}})}}(e,L(e.value.document)),t()}var P=null,R=[];function L(e){if(P===e)return R;for(var t,n=[],r=null,i=v(e.nodes);!(t=i()).done;){var l=t.value;(0,o.default)("block"===l.object,"Slate: Invalid block type: "+l.object+" "+l.type),r=w(l,null!=r&&(r.isInCodeBlock||r.opensCodeBlock),null!=r&&(r.isStyledCodeBlockLine||r.opensCodeBlockOnOwnLine),null==r||!r.opensCodeBlock&&r.closesCodeBlock?null:r.lang),n.push(r)}return function(e){for(var t,n=[],r=!1,o=v(e);!(t=o()).done;){var i=t.value,l=i===e[e.length-1];if((i.closesCodeBlock||l)&&(r&&l&&!i.closesCodeBlock&&n.push(i),r=!1,n.length>0)){var u=n.map((function(e){return e.line.text})).join("\n"),s=n[0].lang;null!=s&&null!=a.default.getLanguage(s)&&function(){var e=G(u,s);null!=e&&n.forEach((function(t,n){return t.syntaxHighlightedHtml=e[n]}))}(),n=[]}r&&n.push(i),i.opensCodeBlock&&(r=!0)}}(n),P=e,R=n,n}function D(e){if(!e.isStyledCodeBlockLine&&!e.wasInCodeBlock)return null;var t={type:"code",lang:e.lang,wasInCodeBlock:e.wasInCodeBlock,isInCodeBlock:e.isInCodeBlock,isStyledCodeBlockLine:e.isStyledCodeBlockLine,syntaxHighlightedHtml:e.syntaxHighlightedHtml};return JSON.stringify(t)}function w(e,t,n,r){var a=j(e.text),o=a[0],i=a[a.length-1],l=null==i?null:e.text.substring(i+3),u=t&&null!=o,s=t&&0===a.length,d=n&&0===a.length,f=(u?a.slice(1):a).length%2==1,c=f&&(null==l||""===l||null!=l.match(M)),p=c&&null!=l&&h[l.toLowerCase()]||null;return{line:e,wasInCodeBlock:t,isInCodeBlock:s,isStyledCodeBlockLine:d,lang:f||u?p:r,syntaxHighlightedHtml:null,closesCodeBlock:u,opensCodeBlock:f,opensCodeBlockOnOwnLine:c}}function j(e){for(var t,n=[],r=/\\|```/g;null!=(t=r.exec(e));)"\\"!==t[0]?n.push(t.index):r.lastIndex+=1;return n}var k={max:1/0,maxAge:6e4,updateAgeOnGet:!0},U=new i.default(k);function G(e,t){var n=e+"-"+t,r=U.get(n);if(null!=r)return r;var a=l.default.highlight(t,e);if(null==a)return null;var o=a.value.split("\n");return U.set(n,o),o}function F(e,t,n){if("block"!==e.object)return n();if(null==e.data.get("lineType"))return n();var r=t.value.document,a=r.nodes.indexOf(e),o=L(r)[a],i=o.syntaxHighlightedHtml,l=o.isStyledCodeBlockLine;if(null==i||!l)return n();for(var u,d=i.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'"),f=/(?:<span class="([^"]*)">)|(?:<\/span>)/g,c=[],p=[],v=0,y=0;u=f.exec(d);){var m=u.index+u[0].length,_=u.index-y;u.index>y&&(c.length>0&&p.push({type:"SlateCodeBlocks:"+c.join(":"),anchor:s.findPointInBlockNode(e,v,!0),focus:s.findPointInBlockNode(e,v+_,!0)}),v+=_),"</span>"===u[0]?c.pop():c.push(u[1]),y=m}return[].concat(p,n())}function B(e,t,n){var a=e.children,o=e.decoration,i=e.attributes;if(""===e.text)return n();if(o.type.startsWith("SlateCodeBlocks:")){var l=o.type.split(":").slice(1);return r.createElement("span",p({className:l.join(" ")},i),a)}return n()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;h(n(0));var r,a=n(389),o=m(n(8258)),i=h(n(8253)),l=n(1209),u=m(n(11)),s=m(n(8901)),d=m(n(8329)),f=m(n(8441)),c=m(n(8639)),p=m(n(8902)),v=m(n(9127)),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.channel,n=e.onSelect,r=(0,f.default)(t),m=(0,s.default)(t),_=(0,d.default)(t),h=(0,o.default)(t.id),g=(0,c.default)(t,"Context Menu"),S=(0,v.default)(t),O=(0,p.default)(t),I=(0,l.useCanSeeThreads)();return u.default.isGuest()||!I?null:E(i.default,{navId:"thread-context",onClose:a.closeContextMenu,"aria-label":y.default.Messages.THREAD_ACTIONS_MENU_LABEL,onSelect:n},void 0,E(i.MenuGroup,{},void 0,r,S),E(i.MenuGroup,{},void 0,g),E(i.MenuGroup,{},void 0,O),E(i.MenuGroup,{},void 0,m,_),E(i.MenuGroup,{},void 0,h))}g.displayName="ChannelListThreadContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(41),o=f(n(13)),i=f(n(8410)),l=n(8301),u=n(8648),s=f(n(8906)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}var v=function(){o.default.track(d.AnalyticEvents.MODAL_DISMISSED,{type:l.MEMBER_VERIFICATION_TYPE})},y=function(e,t){(0,a.openModal)((function(t){return r.createElement(s.default,p({},t,{guildId:e,onComplete:function(t){return i.default.submitVerificationForm(e,t)},onClose:function(e){if(void 0===e&&(e=!1),!e){if(u.useMemberVerificationFormNoticeStore.getState().hasUnsubmittedChanges)return void(0,u.setShowWarning)(!0);v()}t.onClose()}}))}),{modalKey:l.IN_APP_MEMBER_VERIFICATION_MODAL_KEY,onCloseRequest:function(){v(),u.useMemberVerificationFormNoticeStore.getState().hasUnsubmittedChanges?(0,u.setShowWarning)(!0):(0,a.closeModal)(l.IN_APP_MEMBER_VERIFICATION_MODAL_KEY)},onCloseCallback:t})};t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.useStateFromStoresArray)([f.default],(function(){return[f.default.isChannelMuted(e.guild_id,e.id),f.default.getChannelMuteConfig(e.guild_id,e.id)]})),r=n[0],y=n[1],m=(0,d.useMutedUntilText)(y),h=(0,c.default)(e,!0);function E(t){t&&e.type===p.ChannelTypes.GUILD_CATEGORY&&(0,i.categoryCollapse)(e.id),l.default.updateChannelOverrideSettings(e.guild_id,e.id,{muted:t})}var g=v.default.Messages.MUTE_CHANNEL_GENERIC,S=v.default.Messages.UNMUTE_CHANNEL_GENERIC;switch(e.type){case p.ChannelTypes.GUILD_CATEGORY:g=v.default.Messages.MUTE_CATEGORY,S=v.default.Messages.UNMUTE_CATEGORY;break;case p.ChannelTypes.GROUP_DM:g=v.default.Messages.MUTE_CONVERSATION,S=v.default.Messages.UNMUTE_CONVERSATION;break;case p.ChannelTypes.DM:g=v.default.Messages.MUTE_CHANNEL.format({name:h}),S=v.default.Messages.UNMUTE_CHANNEL.format({name:h});break;default:g=v.default.Messages.MUTE_CHANNEL_GENERIC,S=v.default.Messages.UNMUTE_CHANNEL_GENERIC}var O=[{time:s.MuteUntilSeconds.MINUTES_15,label:v.default.Messages.MUTE_DURATION_15_MINUTES},{time:s.MuteUntilSeconds.HOURS_1,label:v.default.Messages.MUTE_DURATION_1_HOUR},{time:s.MuteUntilSeconds.HOURS_8,label:v.default.Messages.MUTE_DURATION_8_HOURS},{time:s.MuteUntilSeconds.HOURS_24,label:v.default.Messages.MUTE_DURATION_24_HOURS},{time:s.MuteUntilSeconds.ALWAYS,label:v.default.Messages.MUTE_DURATION_ALWAYS}];return r?_(u.MenuItem,{id:"unmute-channel",label:S,subtext:m,action:function(){return E(!1)}}):_(u.MenuItem,{id:"mute-channel",label:g,action:function(){return E(!0)}},void 0,O.map((function(n){var r=n.time,o=n.label;return _(u.MenuItem,{id:""+r,label:o,action:function(){return function(n){e.type===p.ChannelTypes.GUILD_CATEGORY&&(0,i.categoryCollapse)(e.id);var r=n>0?(0,a.default)().add(n,"second").toISOString():null;l.default.updateChannelOverrideSettings(e.guild_id,e.id,{muted:!0,mute_config:{selected_time_window:n,end_time:r}},t)}(r)}},r)})))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(5)),o=n(3),i=n(8450),l=y(n(8477)),u=n(8253),s=n(1271),d=n(8512),f=y(n(181)),c=y(n(180)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePreventIdle=u,t.default=s;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8661);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e){var t=a.useContext(o.IdleHandlerContext),n=t.onPreventIdle,r=t.onAllowIdle;return{preventIdle:a.useCallback((function(){n(e)}),[e,n]),allowIdle:a.useCallback((function(){r(e)}),[e,r])}}function s(e){var t=e.children,n=e.className,r=a.useContext(o.IdleHandlerContext),i=r.onForceIdle,s=r.onActive,d=u("interact"),f=d.preventIdle,c=d.allowIdle;a.useEffect((function(){return function(){return c()}}),[c]);var p=a.useCallback((function(e){var t,n=null!==(t=e.target.ownerDocument)&&void 0!==t?t:document;e.currentTarget.contains(n.activeElement)||i()}),[i]);return l("div",{className:n,onMouseEnter:f,onMouseLeave:c,onFocus:s,onBlur:p},void 0,t)}s.displayName="PreventIdle"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=s(n(55)),i=s(n(47)),l=s(n(24)),u=s(n(7722));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t,n,r){if(null!=t)return f("img",{alt:"",src:t,className:(0,a.default)(u.default.iconWrapper,r)});var i=null;null!=e&&(i="string"==typeof e?f("img",{alt:"",src:e,className:(0,a.default)(u.default.icon,r)}):f(e,{className:(0,a.default)(u.default.icon,r)}));return f(o.default,{align:o.default.Align.CENTER,justify:o.default.Justify.CENTER,style:{backgroundColor:n},className:u.default.iconWrapper},void 0,i)}function p(e,t,n,r,s){var d=null==n?void 0:n.map((function(e,t){var n=e.icon,o=e.text;return f("div",{className:(0,a.default)(u.default.detailsWrapper,s?u.default.headerDetailsWrapper:null)},t,null!=n?f(n,{width:16,height:16,className:u.default.detailsIcon}):null,f(l.default,{size:l.default.Sizes.SIZE_12,color:l.default.Colors.HEADER_SECONDARY,className:r},void 0,o))}));return f(o.default,{direction:o.default.Direction.VERTICAL},void 0,f(i.default,{tag:i.default.Tags.H3,size:s?i.default.Sizes.SIZE_24:i.default.Sizes.SIZE_16,className:s?u.default.header:u.default.secondaryHeader},void 0,e),null!=t?f(l.default,{size:l.default.Sizes.SIZE_14,color:l.default.Colors.HEADER_SECONDARY},void 0,t):null,f(o.default,{direction:o.default.Direction.HORIZONTAL,align:o.default.Align.CENTER,wrap:o.default.Wrap.WRAP},void 0,d))}function v(e){var t=e.name,n=e.description,r=e.icon,a=e.imageSrc,i=e.iconBackgroundColor,l=e.iconClassName,s=e.details,d=e.detailsClassName,v=e.isHeader;return f(o.default,{justify:o.default.Justify.CENTER,className:u.default.wrapper},void 0,null!=r||null!=a?f(o.default.Child,{shrink:0,grow:0},void 0,c(r,a,i,l)):null,p(t,n,s,d,v))}c.displayName="renderIcon",p.displayName="renderDetails",v.displayName="IntegrationInfo"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageSizes=t.PAGE_WIDTH_THRESHOLD=void 0;t.PAGE_WIDTH_THRESHOLD=1e3;var r=Object.freeze({SMALL:"small",LARGE:"large"});t.PageSizes=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(8820)),l=n(5943),u=n(8298),s=n(8277),d=n(8253),f=g(n(11)),c=g(n(15)),p=g(n(40)),v=g(n(12)),y=n(41),m=n(8263),_=n(1),h=g(n(6)),E=g(n(7451));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t,n,r,g){var S=c.default.getGuild(e),T=f.default.getId();(0,o.useStateFromStores)([p.default],(function(){return p.default.getGuildVersion(e)}),[e]);var C=(0,o.useStateFromStores)([s.HotspotStore],(function(){return s.HotspotStore.hasHotspot(s.HotspotLocations.GUILD_PER_SERVER_AVATAR_BADGE)})),b=a.useMemo((function(){var n;return(n={})[e]=[t],n}),[e,t]);(0,u.useSubscribeGuildMembers)(b);var M=r===_.AppContext.POPOUT,N=(0,l.useAndTriggerGuildMemberAvatarExperiment)();if(null==S||M)return null;var A=T===t&&(p.default.can(_.Permissions.CHANGE_NICKNAME,S)||p.default.can(_.Permissions.MANAGE_NICKNAMES,S));N=T===t&&N;var P=p.default.canManageUser(_.Permissions.MANAGE_NICKNAMES,t,S);if(!(A||P||N))return null;var R=v.default.getUser(t);if(null==R)return null;var L=N?h.default.Messages.CHANGE_IDENTITY:h.default.Messages.CHANGE_NICKNAME;return I(d.MenuItem,{id:"change-nickname",label:a.createElement(a.Fragment,null,L,N&&C?I(m.TextBadge,{text:h.default.Messages.NEW,className:E.default.newBadge}):null),icon:g,action:function(){return(0,y.openModal)((function(t){return a.createElement(i.default,O({},t,{guildId:e,user:R,analyticsSource:n}))}))}})}T.displayName="useChangeIdentityItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={startTyping:function(e){a.default.dispatch({type:o.ActionTypes.TYPING_START_LOCAL,channelId:e})},stopTyping:function(e){a.default.dispatch({type:o.ActionTypes.TYPING_STOP_LOCAL,channelId:e})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(34),l=y(n(288)),u=n(8253),s=y(n(8733)),d=y(n(51)),f=y(n(12)),c=n(8425),p=y(n(16)),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e,t){void 0===t&&(t=i.MediaEngineContextTypes.DEFAULT);var n=(0,o.useStateFromStores)([d.default],(function(){return d.default.getLocalVolume(e,t)}),[e,t]),r=e===f.default.getCurrentUser().id,y=t===i.MediaEngineContextTypes.STREAM;return r?null:_(u.MenuControlItem,{id:"user-volume",label:y?v.default.Messages.STREAM_VOLUME:v.default.Messages.USER_VOLUME,control:function(r,o){return a.createElement(s.default,h({},r,{ref:o,value:(0,c.amplitudeToPerceptual)(n),maxValue:p.default.embedded?200:100,onChange:function(n){return l.default.setLocalVolume(e,(0,c.perceptualToAmplitude)(n),t)},"aria-label":v.default.Messages.FORM_LABEL_INPUT_VOLUME}))}})}E.displayName="useUserVolumeItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=U(n(9)),i=U(n(378)),l=n(8404),u=n(3),s=U(n(8511)),d=U(n(274)),f=U(n(8257)),c=n(8296),p=n(8392),v=n(8277),y=n(280),m=U(n(249)),_=U(n(39)),h=U(n(282)),E=U(n(13)),g=n(139),S=n(1168),O=n(8347),I=n(5949),T=U(n(9424)),C=U(n(9433)),b=n(8861),M=U(n(9435)),N=U(n(9436)),A=U(n(9456)),P=U(n(9457)),R=U(n(9460)),L=n(1),D=U(n(6)),w=U(n(7368)),j=U(n(7352)),k=U(n(7353));function U(e){return e&&e.__esModule?e:{default:e}}function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(){return(B=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}).apply(this,arguments)}var H=(0,g.cssValueToNumber)(j.default.emojiContainerPaddingVertical),x=(0,g.cssValueToNumber)(j.default.emojiContainerPaddingHorizontal),V=(0,g.cssValueToNumber)(j.default.emojiListPaddingTop),W=(0,g.cssValueToNumber)(j.default.emojiListPaddingLeft),Y=(0,g.cssValueToNumber)(k.default.expressionPickerListSectionHeadingHeight),z=function(e){return e.stopPropagation()},K=function(e,t){(0,O.setInspectedEmojiPosition)(e,t,O.InspectedEmojiChangeSource.GRID_NAVIGATOR_EVENT)},$=(0,i.default)(I.trackEmojiSearchEmpty,200),Z=(0,i.default)(I.trackEmojiSearchResultsViewed,200),q=a.memo((function(e){var t,n=e.pickerIntention,r=e.channel,i=e.closePopout,g=e.emojiSize,j=void 0===g?S.EmojiSize.MEDIUM:g,k=e.inExpressionPicker,U=void 0!==k&&k,G=e.onSelectEmoji,q=e.containerWidth,X=e.onNavigateAway,J=a.useState(!1),Q=J[0],ee=J[1],te=a.useRef(""),ne=(0,O.useEmojiPickerStore)((function(e){return e.searchQuery})),re=a.useRef(null),ae=a.useRef(null),oe=a.useRef(null),ie=(0,c.useAnalyticsContext)().location,le=a.useMemo((function(){return B({},ie,{section:L.AnalyticsSections.EMOJI_PICKER_POPOUT})}),[ie]),ue=(0,u.useStateFromStores)([m.default],(function(){return m.default.diversitySurrogate})),se=(0,u.useStateFromStores)([m.default],(function(){var e=ne.replace(/^:/,"").replace(/:$/,"");return""===e?null:m.default.search(r,e,0,n)}),[r,n,ne],u.statesWillNeverBeEqual),de=null==se?0:se.locked.length+se.unlocked.length,fe=(0,u.useStateFromStores)([_.default],(function(){return _.default.emojiPickerCollapsedSections}),[]),ce=a.useMemo((function(){return new Set(fe)}),[fe]),pe=a.useCallback((function(e){d.default.updateLocalSettings({emojiPickerCollapsedSections:Array.from(e)})}),[]),ve=(0,p.useExpressionPickerGridWidth)({gridWrapperRef:re,containerWidth:q,listPaddingLeft:W,listScrollbarWidth:8}),ye=j+2*H,me=(0,b.useEmojiGrid)({gridWidth:ve,channel:r,pickerIntention:n,emojiSearchResults:se,collapsedSections:ce,gridPaddingTop:V,emojiPaddingHorizontal:x,emojiSpriteSize:j,emojiRowHeight:ye,emojiSectionHeadingHeight:Y}),_e=me.rowCountBySection,he=me.sectionDescriptors,Ee=me.emojiGrid,ge=me.columnCounts,Se=(0,b.useEmojiSelectHandler)({pickerIntention:n,selectedChannel:r,closePopout:i,onSelectEmoji:G,setIsPremiumUpsellOpen:ee,emojiSelectAnalytics:function(){""!==ne&&(0,I.trackEmojiSearchSelect)(B({},le,{object:L.AnalyticsObjects.EMOJI}))},trackPremiumUpsellOpened:function(e,t){E.default.track(L.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:y.PremiumUpsellTypes.EMOJI_PICKER_EMOJI_CLICKED,is_animated:e.animated,is_external:null!=e.guildId&&e.guildId!==(null==t?void 0:t.getGuildId()),has_search_query:null!=ne&&""!==ne,location:B({},le,{object:L.AnalyticsObjects.EMOJI})})}}),Oe=a.useCallback((function(){i(),null==X||X()}),[i,X]),Ie=function(e){var t=e.columnCounts,n=e.onSelectEmoji,r=e.emojiGrid,o=e.emojiList,i=(0,u.useStateFromStores)([m.default],(function(){return m.default.getDisambiguatedEmojiContext()}),[]),d=a.useCallback((function(e,t){null!=e.emoji&&t.altKey?i.isFavoriteEmoji(e.emoji)?s.default.unfavoriteEmoji(e.emoji):s.default.favoriteEmoji(e.emoji):n(e.emoji,!t.shiftKey)}),[n,i]),f=(0,p.useExpressionPickerGridKeyboardNavigation)({columnCounts:t,gridNavigatorId:"emoji-picker-grid",itemGrid:r,itemList:o,onGridNavigatorItemSelect:d,onGridNavigatorPositionChange:K}),c=f.gridDispatch,v=f.getItemProps,y=f.getRowProps,_=f.gridContainerProps,h=f.handleGridContainerKeyDown,E=f.isUsingKeyboardNavigation;return a.useEffect((function(){return O.useEmojiPickerStore.subscribe((function(e){if(null!=e){var t=e.columnIndex,n=e.rowIndex;e.source!==O.InspectedEmojiChangeSource.GRID_NAVIGATOR_EVENT&&c({type:l.GridActionType.SET_FOCUSED_POSITION,x:t,y:n})}}),(function(e){return e.inspectedEmojiPosition}))}),[c]),{getItemProps:v,getRowProps:y,gridContainerProps:_,handleGridContainerKeyDown:h,isUsingKeyboardNavigation:E}}({columnCounts:ge,onSelectEmoji:G,emojiGrid:Ee,emojiList:ae}),Te=Ie.getItemProps,Ce=Ie.getRowProps,be=Ie.gridContainerProps,Me=Ie.handleGridContainerKeyDown,Ne=Ie.isUsingKeyboardNavigation;!function(e,t){var n=a.useState(null),r=n[0],o=n[1];a.useEffect((function(){var e;null!=r&&(null===(e=t.current)||void 0===e||e.scrollToSectionTop(r),o(null))}),[t,r]),a.useEffect((function(){o(O.useEmojiPickerStore.getState().activeCategoryIndex)}),[e])}(q,ae),function(e,t,n){a.useLayoutEffect((function(){var e;null===(e=n.current)||void 0===e||e.focus()}),[e,t,n])}(q,ue,oe),a.useEffect((function(){return E.default.track(L.AnalyticEvents.OPEN_POPOUT,{type:"Emoji Picker"}),O.resetStoreState}),[]),a.useEffect((function(){return function(){return(0,v.hideHotspot)(v.HotspotLocations.FAVORITE_EMOJI_TOOLTIP)}}),[]),a.useLayoutEffect((function(){var e,t=O.useEmojiPickerStore.getState().inspectedEmojiPosition,n=t.columnIndex,r=t.rowIndex;null==(null===(e=Ee[r])||void 0===e?void 0:e[n])&&0!==n&&(0,O.setInspectedEmojiPosition)(0,0)}),[Ee]),a.useEffect((function(){if(""===te.current&&""!==ne&&(0,I.trackEmojiSearchStart)(le),0===de&&""!==ne)$(le);else if(""!==ne&&te.current!==ne){var e;Z(de,null!==(e=null==se?void 0:se.locked.length)&&void 0!==e?e:0,le)}te.current=ne}),[ne,le,de,se]);var Ae=U?"div":h.default,Pe=null!=ve;return a.createElement(f.default,le,F(Ae,{id:S.EMOJI_PICKER_TAB_PANEL_ID,"aria-labelledby":U?S.EMOJI_PICKER_TAB_ID:void 0,role:U?"tabpanel":void 0,className:(0,o.default)(w.default.wrapper,(t={},t[w.default.emojiPickerInExpressionPicker]=U,t))},void 0,F("div",{className:w.default.emojiPicker,onScroll:z,role:"combobox","aria-controls":"emoji-picker-grid","aria-haspopup":"grid","aria-owns":"emoji-picker-grid","aria-expanded":Pe,"aria-labelledby":U?S.EMOJI_PICKER_TAB_ID:void 0,"aria-label":U?void 0:D.default.Messages.EXPRESSION_PICKER_EMOJI},void 0,F("div",{className:w.default.header},void 0,a.createElement(R.default,{emojiListRef:ae,gridNavigatorId:"emoji-picker-grid",onKeyDown:Me,ref:oe}),F(C.default,{searchBarRef:oe,className:w.default.diversitySelector,inExpressionPicker:U,selectedSurrogate:ue})),a.createElement("div",{className:w.default.bodyWrapper,ref:re},F(A.default,{channel:r,closePopout:i}),a.createElement("div",B({className:w.default.emojiPickerListWrapper,id:"emoji-picker-grid"},be),Pe?F(N.default,{collapsedSections:ce,diversitySurrogate:ue,emojiGrid:Ee,emojiListRef:ae,emojiRowHeight:ye,emojiSize:j,getEmojiItemProps:Te,getEmojiRowProps:Ce,gridWidth:ve,isUsingKeyboardNavigation:Ne,onEmojiSelect:Se,rowCount:Ee.length,rowCountBySection:_e,sectionDescriptors:he,setCollapsedSections:pe}):null)),F(M.default,{emojiGrid:Ee,className:w.default.inspector}),Q?F(P.default,{onLearnMore:Oe,onClose:function(){return ee(!1)},channel:r}):null),F(T.default,{className:w.default.categoryList,emojiListRef:ae,sectionDescriptors:he,intention:n,channel:r})))}));t.default=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(89)),l=f(n(8276)),u=f(n(279)),s=f(n(7578)),d=f(n(7373));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t,n){return v("div",{className:t},n,e)}y.displayName="defaultRenderMoreUsers";var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).defaultRenderUser=function(e,n,r,a){var l=t.props,f=l.onClick,c=l.size,p=l.guildId,y=e instanceof i.default?e:null!=e?e.user:null;return null==y?v("div",{className:(0,o.default)(s.default.emptyUser,n)},r):v(u.default,{tabIndex:0,src:y.getAvatarURL(p),size:c,"aria-label":y.username,className:(0,o.default)(n,d.default.cursorPointer,s.default.avatarSize),onClick:function(e){return null!=f?f(e,y,t._ref):null}},y.id)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var f=r.prototype;return f.renderUsers=function(){for(var e=this.props,t=e.users,n=e.max,r=e.renderUser,a=void 0===r?this.defaultRenderUser:r,o=e.renderMoreUsers,i=[],l=t.length===n?t.length:n-1,u=0;u<l&&u<t.length;){var d=u===t.length-1;i.push(a(t[u]||null,d?null:s.default.avatarMasked,"user-"+u,d)),u++}if(u<t.length){var f=Math.min(t.length-u,99);i.push(o("+"+f,s.default.moreUsers,"more-users",f))}return i},f.renderIcon=function(){return this.props.icon?v("div",{className:s.default.iconContainer},void 0,v(l.default,{width:16,height:16,foreground:s.default.foreground,className:s.default.icon})):null},f.render=function(){var e=this,t=this.props.className;return a.createElement("div",{className:(0,o.default)(t,s.default.container),ref:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(t){return e._ref=t}))},this.renderIcon(),this.renderUsers())},r}(a.PureComponent);m.displayName="VoiceUserSummaryItem",m.defaultProps={max:10,renderMoreUsers:y,size:u.default.Sizes.SIZE_24};var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(14)),a=s(n(2)),o=s(n(56)),i=s(n(1174)),l=s(n(12)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){d(o,r,a,i,l,"next",e)}function l(e){d(o,r,a,i,l,"throw",e)}i(void 0)}))}}var c={fetchVerificationForm:function(){var e=f(regeneratorRuntime.mark((function e(t,n){var s,d,f,c,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null!=n?n:i.default.getInviteCodeForGuildId(t),d=l.default.getCurrentUser(),f=!o.default.isMember(t,null==d?void 0:d.id),e.prev=3,e.next=6,r.default.get({url:u.Endpoints.GUILD_MEMBER_VERIFICATION(t),query:{with_guild:f,invite_code:s},oldFormErrors:!0});case 6:if(null!=(c=e.sent).body){e.next=9;break}throw c;case 9:return p=c.body,a.default.dispatch({type:u.ActionTypes.MEMBER_VERIFICATION_FORM_UPDATE,guildId:t,form:{version:p.version,description:p.description,formFields:p.form_fields,guild:p.guild}}),e.abrupt("return",p);case 14:e.prev=14,e.t0=e.catch(3),a.default.dispatch({type:u.ActionTypes.MEMBER_VERIFICATION_FORM_FETCH_FAIL,guildId:t});case 17:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,n){return e.apply(this,arguments)}}(),updateVerificationForm:function(){var e=f(regeneratorRuntime.mark((function e(t,n){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.patch({url:u.Endpoints.GUILD_MEMBER_VERIFICATION(t),body:{form_fields:n},oldFormErrors:!0});case 2:o=e.sent,i=o.body,a.default.dispatch({type:u.ActionTypes.MEMBER_VERIFICATION_FORM_UPDATE,guildId:t,form:{version:i.version,description:i.description,formFields:i.form_fields}});case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),updateVerificationFormDescription:function(){var e=f(regeneratorRuntime.mark((function e(t,n){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.patch({url:u.Endpoints.GUILD_MEMBER_VERIFICATION(t),body:{description:n},oldFormErrors:!0});case 2:o=e.sent,i=o.body,a.default.dispatch({type:u.ActionTypes.MEMBER_VERIFICATION_FORM_UPDATE,guildId:t,form:{version:i.version,description:i.description,formFields:i.form_fields}});case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),enableVerificationForm:function(){var e=f(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.patch({url:u.Endpoints.GUILD_MEMBER_VERIFICATION(t),body:{enabled:n},oldFormErrors:!0});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),submitVerificationForm:function(){var e=f(regeneratorRuntime.mark((function e(t,n){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.put({url:u.Endpoints.GUILD_MEMBER_REQUEST_TO_JOIN(t),body:{version:n.version,form_fields:n.formFields}});case 3:return o=e.sent,i=o.body,a.default.dispatch({type:u.ActionTypes.USER_GUILD_JOIN_REQUEST_UPDATE,guildId:t,request:i}),e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(0),e.t0;case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NO_MEMBER_VERIFICATION_FORM=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={version:"",description:"",formFields:[]};t.NO_MEMBER_VERIFICATION_FORM=l;var u={};var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.get=function(e){if(null!=e)return u[e]},r}(r.default.Store))(a.default,{INVITE_ACCEPT_SUCCESS:function(e){var t,n=e.invite,r=n.member_verification_form,a=n.guild;return null!=a&&null!=r&&(u[a.id]={version:r.version,description:null!==(t=r.description)&&void 0!==t?t:"",formFields:r.form_fields,guild:a},!0)},MEMBER_VERIFICATION_FORM_UPDATE:function(e){var t=e.form,n=e.guildId;u[n]=null!=t?t:l},MEMBER_VERIFICATION_FORM_FETCH_FAIL:function(e){var t,n=e.guildId;u[n]=null!==(t=u[n])&&void 0!==t?t:l},GUILD_DELETE:function(e){var t=e.guild;delete u[null==t?void 0:t.id]}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=J(n(0)),o=q(n(9)),i=q(n(273)),l=n(1250),u=n(3),s=q(n(469)),d=J(n(287)),f=n(8413),c=n(5946),p=q(n(473)),v=q(n(8746)),y=q(n(8747)),m=q(n(8748)),_=n(5972),h=q(n(8919)),E=q(n(15)),g=q(n(39)),S=q(n(12)),O=q(n(161)),I=q(n(5832)),T=n(8655),C=q(n(61)),b=q(n(1164)),M=q(n(9599)),N=q(n(8518)),A=q(n(1221)),P=q(n(9130)),R=q(n(8749)),L=n(1230),D=n(41),w=n(8263),j=q(n(47)),k=q(n(24)),U=n(272),G=q(n(13)),F=n(483),B=n(121),H=q(n(93)),x=n(5935),V=n(8921),W=q(n(9605)),Y=q(n(8922)),z=q(n(9609)),K=n(1),$=q(n(6)),Z=q(n(7600));function q(e){return e&&e.__esModule?e:{default:e}}function X(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return X=function(){return e},e}function J(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=X();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Q(){var e=function(e,t){t||(t=e.slice(0));return e.raw=t,e}(["0px 8px 16px ",""]);return Q=function(){return e},e}function ee(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function te(){return(te=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}).apply(this,arguments)}function ne(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function re(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ae(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oe(e,t)}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ie=(0,l.cssValueToNumber)(Z.default.carouselInactiveOffsetY),le=(0,l.cssValueToNumber)(Z.default.contentMinWidth),ue=new Set([K.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS_GUILD_AFFINITY,K.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS]),se=function(e){function t(){return e.apply(this,arguments)||this}ae(t,e);var n=t.prototype;return n.renderPerk=function(e,t){var n=(0,V.getPerkIcon)(e.icon,t),r=n.icon,a=n.className;return re("div",{className:Z.default.perk},e.title,re(r,{className:(0,o.default)(Z.default.perkIcon,a)}),re("div",{className:Z.default.perkText},void 0,e.title),e.isNew?re(w.TextBadge,{className:Z.default.newBadge,text:$.default.Messages.NEW}):null)},n.render=function(){var e=this,t=this.props,n=t.subscriberCount,r=t.tier,o=K.PremiumGuildSubscriptionsRequired[r.tier],i=n>=o,l=r.tier!==K.PremiumGuildTiers.NONE&&r.tier!==K.PremiumGuildTiers.TIER_1;return re("div",{className:Z.default.tier},r.tier,re("div",{className:i?Z.default.tierHeaderUnlocked:Z.default.tierHeaderLocked},void 0,re(R.default,{tier:r.tier,className:Z.default.tierIcon}),re("div",{className:Z.default.tierTitle},void 0,r.title),i?re("div",{className:Z.default.tierUnlocked},void 0,$.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_UNLOCKED):re(a.Fragment,{},void 0,re("div",{className:Z.default.tierRequirements},void 0,$.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_TIER_REQUIREMENT.format({required:o})),re(A.default,{className:Z.default.tierLock}))),re("div",{className:Z.default.tierBody},void 0,re("div",{className:Z.default.previousPerks},void 0,l?$.default.Messages.PREMIUM_GUILD_PERKS_MODAL_PREVIOUS_PERKS:$.default.Messages.PREMIUM_GUILD_PERKS_MODAL_BASE_PERKS),null!=r.perks&&re("div",{},void 0,r.perks.map((function(t){return e.renderPerk(t,i)})))))},t}(a.Component);se.displayName="GuildPremiumTierPerksModalCard";var de=re(z.default,{}),fe=re(m.default,{}),ce=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={selectedTier:t.props.guild.premiumTier!==K.PremiumGuildTiers.NONE?t.props.guild.premiumTier:K.PremiumGuildTiers.TIER_1,error:null},t.handleClose=function(){t.props.close(),G.default.track(K.AnalyticEvents.MODAL_DISMISSED,{type:K.AnalyticsPages.PREMIUM_GUILD_USER_MODAL,location_section:t.props.locationSection})},t.selectTier=function(e){t.setState({selectedTier:e})},t.handleSubscribeModalClose=function(e){var n=t.props,r=n.guild,a=n.channelNotice;e&&(r.premiumTier!==K.PremiumGuildTiers.NONE&&t.selectTier(r.premiumTier),null!=a&&ue.has(a.type)&&ue.forEach((function(e){(0,f.hideNotice)(e,{suppressAnalyticsTracking:!0})})))},t.openPaymentModal=function(e){var n=e.analyticsLocation,r=e.numberOfSubscriptionsToAdd,o=e.onClose,i=t.props.guild,l=(0,x.getAvailableUserPremiumGuildSubscriptionSlots)(I.default.slots),u=l.length,s=function(e){null==o||o(),t.handleSubscribeModalClose(e)};if(u>0&&(null==r||u>=r)){var d;1===u?d=l.slice(0,1):null!=r&&(d=l.slice(0,r));var f=(0,D.openModal)((function(e){var t=e.onClose,n=ne(e,["onClose"]);return a.createElement(Y.default,te({},n,{onClose:function(e){t(),s(e)},selectedGuild:i,locationSection:K.AnalyticsPages.PREMIUM_GUILD_USER_MODAL,userPremiumGuildSubscriptionSlots:d}))}),{onCloseRequest:function(){(0,D.closeModal)(f),s(!1)}})}else(0,_.openPremiumGuildSubscriptionPurchaseModal)({analyticsLocation:n,guildId:i.id,closeLayer:t.handleClose,totalNumberOfSlotsToAssign:null!=r?r:1,onCloseModal:s})},t.handleDismissError=function(){t.setState({error:null})},t}ae(t,e);var r=t.prototype;return r.componentDidMount=function(){G.default.track(K.AnalyticEvents.OPEN_MODAL,{type:K.AnalyticsPages.PREMIUM_GUILD_USER_MODAL,location_section:this.props.locationSection}),B.ComponentDispatch.subscribe(K.ComponentActions.LAYER_POP_ESCAPE_KEY,this.handleClose)},r.componentDidUpdate=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props.layerTransitionState,t.layerTransitionState===n||n!==L.TransitionStates.ENTERED){e.next=10;break}return e.prev=2,e.next=5,Promise.all([(0,c.fetchUserPremiumGuildSubscriptionSlots)(),(0,c.fetchPremiumSubscriptionCooldown)(),d.fetchSubscriptions(),d.fetchPaymentSources()]);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),this.setState({error:e.t0});case 10:case"end":return e.stop()}}),e,this,[[2,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){ee(o,r,a,i,l,"next",e)}function l(e){ee(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),r.componentWillUnmount=function(){B.ComponentDispatch.unsubscribe(K.ComponentActions.LAYER_POP_ESCAPE_KEY,this.handleClose)},r.canSelectTier=function(e){return e!==K.PremiumGuildTiers.NONE},r.renderClose=function(){return re("div",{className:Z.default.closeWrapper},void 0,re("div",{className:Z.default.closeContent},void 0,re(v.default,{className:Z.default.closeIcon,closeAction:this.handleClose,theme:this.props.theme,keybind:"ESC"})))},r.renderProgressBar=function(){var e,t=this.props,n=t.guild,r=t.layerTransitionState,a=t.theme,i=r!==L.TransitionStates.ENTERING;return re("div",{className:(0,o.default)(Z.default.progressBarWrapper,(e={},e[Z.default.progressBarWrapperVisible]=i,e))},void 0,i?re(M.default,{selectedTier:this.state.selectedTier,guild:n,onSelectTier:this.selectTier,canSelectTier:this.canSelectTier,initialAnimationDelay:100,openPaymentModal:this.openPaymentModal,theme:a}):null)},r.renderCarouselItem=function(e,t){var n=this,r=null!=t?t.interpolate({inputRange:[0,1],outputRange:[K.HEXColors.TRANSPARENT,(0,F.hexWithOpacity)(K.HEXColors.BLACK,this.props.theme===K.ThemeTypes.DARK?.2:.1)]}):K.HEXColors.TRANSPARENT;return re(i.default.div,{className:Z.default.tierWrapper,style:null!=t?{transform:[{translateY:t.interpolate({inputRange:[0,1],outputRange:[ie+"px","0px"]})}],boxShadow:i.default.template(Q(),r),opacity:t.interpolate({inputRange:[0,1],outputRange:[.5,1]})}:null},void 0,re(C.default,{className:this.state.selectedTier===e.tier?Z.default.carouselItemSelected:Z.default.carouselItemClickable,onClick:function(){return n.selectTier(e.tier)}},void 0,re(se,{subscriberCount:this.props.guild.premiumSubscriberCount,tier:e})))},r.getCarouselAlignment=function(e){switch(e){case K.PremiumGuildTiers.TIER_1:return T.Alignment.LEFT;case K.PremiumGuildTiers.TIER_3:return T.Alignment.RIGHT;default:return T.Alignment.CENTER}},r.renderCarousel=function(){var e=this,t=this.state.selectedTier,n=this.props,r=n.layerTransitionState,a=n.viewportWidth;return r===L.TransitionStates.ENTERING?re("div",{className:Z.default.carouselPlaceholder}):re("div",{className:(0,o.default)(Z.default.carouselContainer,Z.default.carouselContainerVisible)},void 0,re(T.CarouselWithPreview,{className:Z.default.carousel,edgeItems:0,items:(0,x.getTiers)(),renderItem:function(t,n,r){return e.renderCarouselItem(t,r)},currentIndex:t-1,itemSize:{width:365,margin:30},width:a,gutter:(a-le)/2,align:this.getCarouselAlignment(t),hideOverflow:!1}))},r.render=function(){var e=this,t=this.state.error;return re(a.Fragment,{},void 0,this.renderClose(),re(U.ScrollerAuto,{className:Z.default.perksModal},void 0,re("div",{className:Z.default.perksModalContentWrapper},void 0,re("div",{className:Z.default.content},void 0,re("img",{className:Z.default.headerGraphic,alt:"",src:n(9611)}),re(P.default,{className:Z.default.headerLogo}),re(k.default,{size:k.default.Sizes.SIZE_16,className:Z.default.headerBlurb},void 0,$.default.Messages.PREMIUM_GUILD_PERKS_MODAL_BLURB.format({helpdeskArticle:H.default.getArticleURL(K.HelpdeskArticles.GUILD_SUBSCRIPTIONS),openPremiumGuildSettings:function(){e.handleClose(),p.default.open(K.UserSettingsSections.PREMIUM_GUILD_SUBSCRIPTION)}})),re(W.default,{closeLayer:this.handleClose,guild:this.props.guild,openPaymentModal:this.openPaymentModal}),this.renderProgressBar()),this.renderCarousel(),re("div",{className:Z.default.content},void 0,re(j.default,{className:Z.default.subscriberPerksHeader,size:j.default.Sizes.SIZE_24},void 0,$.default.Messages.PREMIUM_GUILD_PERKS_MODAL_SUBSCRIBER_PERKS_HEADER),de,re("div",{className:Z.default.divider}),fe,re(y.default,{onOpenPremiumClick:this.handleClose})))),re(s.default,{},void 0,null!=t?re(N.default,{className:Z.default.slideIn},void 0,re(b.default,{onDismiss:this.handleDismissError},void 0,t.message)):null))},t}(a.PureComponent);ce.displayName="PremiumGuildPerksModal";var pe=function(e){var t=e.guildId,n=(0,u.useStateFromStores)([S.default],(function(){return S.default.getCurrentUser()})),r=(0,u.useStateFromStores)([g.default],(function(){return g.default.theme})),o=(0,u.useStateFromStores)([E.default],(function(){return E.default.getGuild(t)}),[t]),i=(0,u.useStateFromStores)([O.default],(function(){return O.default.windowSize()})).width,l=(0,u.useStateFromStores)([h.default],(function(){return h.default.getNotice(o)}),[o]);return null==o?null:a.createElement(ce,te({},e,{guild:o,theme:r,currentUser:n,channelNotice:l,viewportWidth:i}))};pe.displayName="PremiumGuildPerksModalConnected";var ve=pe;t.default=ve},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showNotice=function(e,t){a.default.dirtyDispatch({type:o.ActionTypes.CHANNEL_NOTICE_SHOW,noticeType:e,guild:t})},t.hideNotice=function(e,t){void 0===t&&(t={});var n=t.suppressAnalyticsTracking,r=void 0!==n&&n;a.default.dirtyDispatch({type:o.ActionTypes.CHANNEL_NOTICE_HIDE,noticeType:e,suppressAnalyticsTracking:r})},t.hidePremiumGuildGracePeriodNotice=function(e){a.default.dispatch({type:o.ActionTypes.PREMIUM_GUILD_GRACE_PERIOD_NOTICE_DISMISS,guildId:e})},t.hideEnablePublicGuildUpsellNotice=function(e){a.default.dispatch({type:o.ActionTypes.PUBLIC_UPSELL_NOTICE_DISMISS,guildId:e})},t.hideMaxMemberCountChannelNotice=function(e,t){a.default.dispatch({type:o.ActionTypes.MAX_MEMBER_COUNT_NOTICE_DISMISS,guildId:e,noticeType:t})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LiveIndicatorShapes=t.LiveIndicatorSizes=t.LiveIndicatorLooks=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=f(n(9)),i=f(n(133)),l=n(8263),u=n(1),s=f(n(6)),d=f(n(7399));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=(0,i.default)({RED:null,GRAY:null});t.LiveIndicatorLooks=v;var y={LARGE:d.default.liveLarge,SMALL:d.default.liveSmall};t.LiveIndicatorSizes=y;var m=((r={})[l.BadgeShapes.ROUND]=d.default.liveShapeRound,r[l.BadgeShapes.ROUND_LEFT]=d.default.liveShapeRoundLeft,r[l.BadgeShapes.ROUND_RIGHT]=d.default.liveShapeRoundRight,r[l.BadgeShapes.SQUARE]="",r);function _(e){var t=e.className,n=e.style,r=e.shape,a=void 0===r?l.BadgeShapes.ROUND:r,i=e.look,f=void 0===i?v.RED:i,c=e.size,_=void 0===c?y.LARGE:c;return f===v.RED?p(l.TextBadge,{text:s.default.Messages.LIVE,className:(0,o.default)(t,d.default.live,_),color:u.Colors.STATUS_RED,shape:m[a],style:n}):p(l.TextBadge,{text:s.default.Messages.LIVE,className:(0,o.default)(t,d.default.live,_,d.default.grey),disableColor:!0,shape:m[a],style:n})}t.LiveIndicatorShapes=m,_.Looks=v,_.Sizes=y;var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=!1,u={},s=function(){u={userAffinties:[],inverseUserAffinties:[],lastFetched:0}};s();var d=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.initialize=function(e){null!=e&&(u=e)},a.needsRefresh=function(){return Date.now()-u.lastFetched>864e5},a.getFetching=function(){return l},a.getState=function(){return u},a.getUserAffinities=function(){return u.userAffinties},a.getUserAffinitiesUserIds=function(){var e=new Set;return u.userAffinties.forEach((function(t){e.add(t.user_id)})),e},a.getInverseUserAffinities=function(){return u.inverseUserAffinties},a.getInverseUserAffinitiesUserIds=function(){var e=new Set;return u.inverseUserAffinties.forEach((function(t){e.add(t.user_id)})),e},r}(r.default.PersistedStore);d.persistKey="UserAffinitiesStore";var f=new d(a.default,{LOAD_USER_AFFINITIES_SUCCESS:function(e){var t=e.affinities;u.userAffinties=t.user_affinities,u.inverseUserAffinties=t.inverse_user_affinities,u.lastFetched=Date.now(),l=!1},LOAD_USER_AFFINITIES:function(e){l=!0},LOAD_USER_AFFINITIES_FAILURE:function(e){l=!1},LOGOUT:function(e){s()}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(9)),o=u(n(61)),i=u(n(6)),l=u(n(7660));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=Object.freeze({DEFAULT:l.default.default,FILLED:l.default.filled});function c(e){var t=e.className,n=e.onClick,r=e["aria-label"],u=e.look,s=void 0===u?f.DEFAULT:u;return d(o.default,{"aria-label":null!=r?r:i.default.Messages.REMOVE,className:(0,a.default)(l.default.button,s,t),onClick:n})}c.displayName="RemoveButton",c.Looks=f},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=m(n(397)),l=m(n(473)),u=n(5689),s=n(415),d=m(n(61)),f=m(n(13)),c=n(1),p=m(n(6)),v=m(n(7416)),y=m(n(7360));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(){var e=(0,u.usePremiumTrialOffer)();return E("div",{className:v.default.premiumPromo},void 0,E(d.default,{onClick:function(){f.default.track(c.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:null,location_section:c.AnalyticsSections.FILE_UPLOAD_POPOUT}),i.default.pop(),l.default.open(c.UserSettingsSections.PREMIUM)},className:v.default.content},void 0,null!=e?p.default.Messages.PREMIUM_UPLOAD_PROMO_TRIAL.format({maxUploadPremium:p.default.Messages.FILE_UPLOAD_LIMIT_PREMIUM_TIER_2}):p.default.Messages.PREMIUM_UPLOAD_PROMO.format({maxUploadPremium:p.default.Messages.FILE_UPLOAD_LIMIT_PREMIUM_TIER_2}),E("img",{alt:"",className:v.default.navArrow,src:n(9264)})))};g.displayName="PremiumPromo";var S=E(g,{}),O=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n),r.prototype.render=function(){var e=this.props.promo;return E("div",{className:y.default.uploadModalIn},void 0,E("div",{className:(0,o.default)(y.default.uploadDropModal,y.default.error)},void 0,E("div",{className:y.default.inner},void 0,E("div",{className:y.default.icons},void 0,E("div",{className:y.default.wrapOne},void 0,E("div",{className:(0,o.default)(y.default.icon,y.default.one)})),E("div",{className:y.default.wrapThree},void 0,E("div",{className:(0,o.default)(y.default.icon,y.default.three)})),E("div",{className:y.default.wrapTwo},void 0,E("div",{className:(0,o.default)(y.default.icon,y.default.two)}))),E("div",{className:y.default.title},void 0,this.props.title),E("div",{className:y.default.instructions},void 0,this.props.help),e?S:null)))},r}(a.Component);O.displayName="UploadError",O.modalConfig={backdropStyle:s.BackdropStyles.DARK,backdropInstant:!0};var I=O;t.default=I},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.GuildScheduledEventEntityTypes=t.GuildScheduledEventStatusDone=t.GuildScheduledEventStatus=void 0,t.GuildScheduledEventStatus=r,function(e){e[e.SCHEDULED=1]="SCHEDULED",e[e.ACTIVE=2]="ACTIVE",e[e.COMPLETED=3]="COMPLETED",e[e.CANCELED=4]="CANCELED"}(r||(t.GuildScheduledEventStatus=r={}));var a,o=new Set([r.COMPLETED,r.CANCELED]);t.GuildScheduledEventStatusDone=o,t.GuildScheduledEventEntityTypes=a,function(e){e[e.NONE=0]="NONE",e[e.STAGE_INSTANCE=1]="STAGE_INSTANCE"}(a||(t.GuildScheduledEventEntityTypes=a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(88)),l=s(n(8496)),u=s(n(7341));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=function(e){var t,n=e.className,r=e.compact,s=void 0!==r&&r,d=e.zalgo,p=void 0===d||d,v=e.disableInteraction,y=void 0!==v&&v,m=e.childrenRepliedMessage,_=e.childrenExecutedCommand,h=e.childrenHeader,E=e.childrenSystemMessage,g=e.childrenButtons,S=e.childrenMessageContent,O=e.childrenAccessories,I=e.messageRef,T=e.focusProps,C=void 0===T?{offset:{left:4,right:4}}:T,b=e.hasThread,M=e.isSystemMessage,N=e.hasReply,A=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className","compact","zalgo","disableInteraction","childrenRepliedMessage","childrenExecutedCommand","childrenHeader","childrenSystemMessage","childrenButtons","childrenMessageContent","childrenAccessories","messageRef","focusProps","hasThread","isSystemMessage","hasReply"]),P=a.createElement(i.default,C,a.createElement("div",f({className:(0,o.default)(n,(t={},t[u.default.wrapper]=!0,t[u.default.compact]=s,t[u.default.cozy]=!s,t[u.default.zalgo]=p,t[u.default.hasThread]=b,t[u.default.isSystemMessage]=M,t[u.default.hasReply]=N,t)),ref:I},A),m,_,c("div",{className:u.default.contents,role:"document"},void 0,E,h,null==E&&S),O,null!=g?c("div",{className:u.default.buttonContainer},void 0,g):null));return y?c(l.default,{},void 0,P):P};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.perceptualToAmplitude=function(e,t){void 0===t&&(t=100);if(0===e)return 0;var n;n=e>t?(e-t)/t*6:e/t*50-50;return t*Math.pow(10,n/20)},t.amplitudeToPerceptual=function(e,t){void 0===t&&(t=100);if(0===e)return 0;var n,r=20*Math.log10(e/t);n=r>0?r/6+1:(50+r)/50;return t*n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9)),o=n(202),i=u(n(61)),l=u(n(7441));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}var f=function(e){var t,n=e.children,u=e.className,s=e.color,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","className","color"]),c=r.useState(!1),p=c[0],v=c[1],y=r.useCallback((function(){v(!0)}),[v]),m=r.useCallback((function(){v(!1)}),[v]),_={};return null!=s&&(_={color:(0,o.int2hex)(s),backgroundColor:p?(0,o.int2rgba)(s,.3):(0,o.int2rgba)(s,.1)}),r.createElement(i.default,d({},f,{tag:"span",className:(0,a.default)(u,(t={},t[l.default.wrapper]=!0,t.mention=!0,t.interactive=f.onClick,t)),onMouseEnter:y,onMouseLeave:m,style:_,tabIndex:null!=f.onClick?0:-1}),n)};f.displayName="Mention";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"function"==typeof e?e(t):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sync=function(e,t){a.default.dispatch({type:i.ActionTypes.ACTIVITY_SYNC,activity:e,userId:t})},t.play=function(e,t){u(e,t).then((function(n){return a.default.dispatch({type:i.ActionTypes.ACTIVITY_PLAY,activity:e,userId:t,metadata:n})})).catch((function(){return a.default.dispatch({type:i.ActionTypes.ACTIVITY_PLAY,activity:e,userId:t})}))},t.getMetadata=u;var r=l(n(14)),a=l(n(2)),o=l(n(256)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=o.default.getActivityMetadata(t);return null!=n?Promise.resolve(n):null==e.session_id?Promise.reject(new Error("null/undefined session_id")):r.default.get({url:i.Endpoints.USER_ACTIVITY_METADATA(t,e.session_id,e.application_id),oldFormErrors:!0}).then((function(e){var n=e.body;return a.default.dispatch({type:i.ActionTypes.ACTIVITY_METADATA_UPDATE,metadata:n,userId:t}),n}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=n(57),o=l(n(2)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}var d={},f={};function c(e,t,n){var r=n.applicationId,l=d[r]||{};if(l[t]=e,d[r]=l,!__OVERLAY__&&e===i.ActivityActionStates.FAILED){null!=f[r]&&f[r].stop();var u=new a.Timeout;u.start(12e4,(function(){return o.default.dispatch({type:i.ActionTypes.ACTIVITY_LAUNCH_FAIL,applicationId:r,activityType:t})})),f[r]=u}}var p=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.getState=function(e,t){var n=d[e];return n&&n[t]},a.getStates=function(){return d},r}(r.default.Store))(o.default,{OVERLAY_INITIALIZE:function(e){var t=e.activityLauncherStates;d=s({},t)},ACTIVITY_JOIN_LOADING:function(e){return c(i.ActivityActionStates.LOADING,i.ActivityActionTypes.JOIN,e)},ACTIVITY_JOIN_FAILED:function(e){return c(i.ActivityActionStates.FAILED,i.ActivityActionTypes.JOIN,e)},ACTIVITY_JOIN:function(e){return c(i.ActivityActionStates.COMPLETE,i.ActivityActionTypes.JOIN,e)},EMBEDDED_ACTIVITY_CLOSE:function(e){return c(i.ActivityActionStates.COMPLETE,i.ActivityActionTypes.JOIN,e)},ACTIVITY_LAUNCH_FAIL:function(e){var t=e.applicationId,n=e.activityType,r=d[t];if(null==r||r[n]!==i.ActivityActionStates.FAILED)return!1;delete r[n]}});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=y(n(15)),l=y(n(40)),u=y(n(12)),s=y(n(80)),d=n(301),f=y(n(205)),c=y(n(8599)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){var n=(0,c.default)(),r=null==n?void 0:n.id,y=null==n?void 0:n.guild_id,m=(0,a.useStateFromStores)([i.default],(function(){return i.default.getGuild(y)}),[y]),h=(0,a.useStateFromStores)([s.default],(function(){return null!=r?s.default.getVoiceStateForChannel(r,e.id):null}),[r,e.id]),E=u.default.getCurrentUser().id===e.id,g=(0,a.useStateFromStores)([f.default],(function(){return f.default.getPermissionsForUser(e.id,r)}),[r,e.id]),S=(0,a.useStateFromStores)([l.default],(function(){return null!=r&&l.default.canWithPartialContext(p.Permissions.MUTE_MEMBERS,{channelId:r})}),[r]);if(null==n||null==m||null==h||t===p.AppContext.POPOUT)return null;if(!S)return null;if(g.speaker)return null;return _(o.MenuItem,{id:"invite-speaker",label:E?v.default.Messages.STAGE_CHANNEL_USER_SET_MYSELF_TO_SPEAKER:v.default.Messages.STAGE_CHANNEL_USER_INVITE_TO_SPEAK,action:function(){E?(0,d.audienceAckRequestToSpeak)(n,!1):(0,d.inviteUserToStage)(n,e.id)}})}h.displayName="useInviteToSpeakItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s("path",{className:f,fill:d,d:"M20 6.00201H14V3.00201C14 2.45001 13.553 2.00201 13 2.00201H4C3.447 2.00201 3 2.45001 3 3.00201V22.002H5V14.002H10.586L8.293 16.295C8.007 16.581 7.922 17.011 8.076 17.385C8.23 17.759 8.596 18.002 9 18.002H20C20.553 18.002 21 17.554 21 17.002V7.00201C21 6.45001 20.553 6.00201 20 6.00201Z"}))}d.displayName="Flag"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimeUnit=w,t.getTimeAndUnit=function(e,t){var n=null!=e?w(e,(function(e){return t.includes(e)})):E.NONE,r=null!=n?P[n]:null;return{unit:n,time:null!=e&&null!=r?Math.floor(r(e)):null}},t.default=t.TimeUnitMax=t.TimeUnitConversion=t.TimeUnits=void 0;var r,a,o,i,l,u,s,d,f,c,p,v,y,m,_,h,E,g,S=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),O=C(n(8)),I=n(57),T=C(n(6));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,r){_||(_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var i=new Array(o),l=0;l<o;l++)i[l]=arguments[l+3];t.children=i}if(t&&a)for(var u in a)void 0===t[u]&&(t[u]=a[u]);else t||(t=a||{});return{$$typeof:_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(){return(A=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}).apply(this,arguments)}!function(e){e.ACTIVITY_FEED="ACTIVITY_FEED",e.ACTIVITY_FEED_NEW="ACTIVITY_FEED_NEW",e.USER_ACTIVITY="USER_ACTIVITY",e.GAME_LIBRARY_TIME_PLAYED="GAME_LIBRARY_TIME_PLAYED",e.GAME_LIBRARY_LAST_PLAYED="GAME_LIBRARY_LAST_PLAYED"}(h||(h={})),t.TimeUnits=E,function(e){e.NONE="NONE",e.SECONDS="SECONDS",e.MINUTES="MINUTES",e.HOURS="HOURS",e.DAYS="DAYS",e.WEEKS="WEEKS",e.MONTHS="MONTHS",e.YEARS="YEARS"}(E||(t.TimeUnits=E={})),function(e){e.START="START",e.END="END",e.TIME="TIME"}(g||(g={}));var P=((r={})[E.NONE]=function(e){return 0},r[E.SECONDS]=function(e){return 60*e},r[E.MINUTES]=function(e){return e},r[E.HOURS]=function(e){return e/60},r[E.DAYS]=function(e){return e/60/24},r[E.WEEKS]=function(e){return e/60/24/7},r[E.MONTHS]=function(e){return e/60/24/31},r[E.YEARS]=function(e){return e/60/24/365},r);t.TimeUnitConversion=P;var R=[{unit:E.NONE,max:0},{unit:E.SECONDS,max:1},{unit:E.MINUTES,max:60},{unit:E.HOURS,max:1440},{unit:E.DAYS,max:44640},{unit:E.WEEKS,max:40320},{unit:E.MONTHS,max:525600},{unit:E.YEARS,max:1/0}];t.TimeUnitMax=R;var L=function(e){return function(t,n){return null==n?"":e().format(A({time:t},n))}},D=((m={})[h.ACTIVITY_FEED]=((i={})[g.START]=((a={})[E.SECONDS]=function(){return T.default.Messages.GAME_FEED_USER_PLAYING_JUST_STARTED},a[E.MINUTES]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYING_FOR_MINUTES.format({time:e})},a[E.HOURS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYING_FOR_HOURS.format({time:e})},a[E.DAYS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYING_FOR_DAYS.format({time:e})},a),i[g.END]=((o={})[E.SECONDS]=function(){return T.default.Messages.GAME_FEED_USER_PLAYING_JUST_ENDED},o[E.MINUTES]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYED_MINUTES_AGO.format({time:e})},o[E.HOURS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYED_HOURS_AGO.format({time:e})},o[E.DAYS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYED_DAYS_AGO.format({time:e})},o[E.WEEKS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYED_WEEKS_AGO.format({time:e})},o[E.MONTHS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYED_MONTHS_AGO.format({time:e})},o[E.YEARS]=function(e){return T.default.Messages.GAME_FEED_USER_PLAYED_YEARS_AGO.format({time:e})},o),i),m[h.ACTIVITY_FEED_NEW]=((s={})[g.START]=((l={})[E.SECONDS]=L((function(){return T.default.Messages.ACTIVITY_FEED_USER_PLAYING_JUST_STARTED})),l[E.MINUTES]=L((function(){return T.default.Messages.ACTIVITY_FEED_USER_PLAYING_FOR_MINUTES})),l[E.HOURS]=L((function(){return T.default.Messages.ACTIVITY_FEED_USER_PLAYING_FOR_HOURS})),l[E.DAYS]=L((function(){return T.default.Messages.ACTIVITY_FEED_USER_PLAYING_FOR_DAYS})),l),s[g.END]=((u={})[E.SECONDS]=function(e){return T.default.Messages.ACTIVITY_FEED_USER_PLAYED_SECONDS_AGO.format({time:e})},u[E.MINUTES]=function(e){return T.default.Messages.ACTIVITY_FEED_USER_PLAYED_MINUTES_AGO.format({time:e})},u[E.HOURS]=function(e){return T.default.Messages.ACTIVITY_FEED_USER_PLAYED_HOURS_AGO.format({time:e})},u[E.DAYS]=function(e){return T.default.Messages.ACTIVITY_FEED_USER_PLAYED_DAYS_AGO.format({time:e})},u),s),m[h.USER_ACTIVITY]=((f={})[g.START]=((d={})[E.SECONDS]=function(){return T.default.Messages.GAME_FEED_USER_PLAYING_JUST_STARTED},d[E.MINUTES]=function(e,t,n){return void 0===n&&(n=!1),n?T.default.Messages.GAME_FEED_USER_PLAYING_FOR_MINUTES.format({time:e}):T.default.Messages.USER_ACTIVITY_USER_PLAYING_FOR_MINUTES.format({time:e})},d[E.HOURS]=function(e,t,n){return void 0===n&&(n=!1),n?T.default.Messages.GAME_FEED_USER_PLAYING_FOR_HOURS.format({time:e}):T.default.Messages.USER_ACTIVITY_USER_PLAYING_FOR_HOURS.format({time:e})},d[E.DAYS]=function(e,t,n){return void 0===n&&(n=!1),n?T.default.Messages.GAME_FEED_USER_PLAYING_FOR_DAYS.format({time:e}):T.default.Messages.USER_ACTIVITY_USER_PLAYING_FOR_DAYS.format({time:e})},d),f),m[h.GAME_LIBRARY_TIME_PLAYED]=((p={})[g.TIME]=((c={})[E.NONE]=function(){return T.default.Messages.GAME_LIBRARY_TIME_PLAYED_NONE},c[E.SECONDS]=function(e){return T.default.Messages.GAME_LIBRARY_TIME_PLAYED_SECONDS.format({time:e})},c[E.MINUTES]=function(e){return T.default.Messages.GAME_LIBRARY_TIME_PLAYED_MINUTES.format({time:e})},c[E.HOURS]=function(e){return T.default.Messages.GAME_LIBRARY_TIME_PLAYED_HOURS.format({time:e})},c),p),m[h.GAME_LIBRARY_LAST_PLAYED]=((y={})[g.END]=((v={})[E.NONE]=function(){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_NONE},v[E.SECONDS]=function(){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_JUST_NOW},v[E.MINUTES]=function(e){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_MINUTES.format({time:e})},v[E.HOURS]=function(e){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_HOURS.format({time:e})},v[E.DAYS]=function(e){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_DAYS.format({time:e})},v[E.WEEKS]=function(e){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_WEEKS.format({time:e})},v[E.MONTHS]=function(e){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_MONTHS.format({time:e})},v[E.YEARS]=function(e){return T.default.Messages.GAME_LIBRARY_LAST_PLAYED_YEARS.format({time:e})},v),y),m);function w(e,t){var n=R.findIndex((function(t){var n=t.max;return t.unit===E.NONE&&e===n||e<n})),r=O.default.findLast(R,(function(e){var n=e.unit;return t(n)}),n);if(null!=r)return r.unit;var a=R.find((function(e){var n=e.unit;return t(n)}));return a?a.unit:null}var j=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).timer=new I.Interval,t.state={time:t.getDiff()},t.update=function(){t.setState({time:t.getDiff()})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var a=r.prototype;return a.componentDidMount=function(){this.timer.start(1e4,this.update)},a.componentDidUpdate=function(e){var t=this.props,n=t.start,r=t.end,a=t.time;e.start===n&&e.end===r&&e.time===a||this.update()},a.componentWillUnmount=function(){this.timer.stop()},a.getDiff=function(){var e=this.props,t=e.start,n=e.end,r=e.time;if(null!=r)return r/1e3/60;var a=Date.now(),o=0;return null!=t?o=a-t:null!=n&&(o=a-n),Math.abs(o)/1e3/60},a.getTimeUnit=function(e,t,n){var r=w(e,(function(e){return function(e,t,n){var r=D[n];if(null!=r){var a=r[t];if(null!=a)return null!=a[e]}return!1}(e,n,t)}));if(null==r)throw new Error("Could not get the time unit in PlayTime with time: "+e+" for type: "+n+" in location: "+t);return r},a.getType=function(){var e=this.props,t=e.start,n=e.end,r=e.time;return null!=t?g.START:null!=n?g.END:null!=r?g.TIME:null},a.transformTime=function(e,t){return P[e](t)},a.render=function(){var e=this.props,t=e.location,n=e.className,r=e.messageProps,a=e.isApplicationStreaming,o=this.state.time,i=this.getType();if(null==i)return null;var l=this.getTimeUnit(o,t,i),u=D[t][i];if(null==u)return null;var s=u[l],d=Math.floor(this.transformTime(l,o));return M("span",{className:n},void 0,s&&s(d,r,a))},r}(S.PureComponent);j.displayName="PlayTime",j.Locations=h,j.Types=g;var k=j;t.default=k},function(e,t,n){"use strict";var r,a;Object.defineProperty(t,"__esModule",{value:!0}),t.UserProfileSections=t.BadgeKeys=void 0,t.BadgeKeys=r,function(e){e[e.STAFF=0]="STAFF",e[e.PARTNER=1]="PARTNER",e[e.HYPESQUAD=2]="HYPESQUAD",e[e.HYPESQUAD_ONLINE_HOUSE_1=3]="HYPESQUAD_ONLINE_HOUSE_1",e[e.HYPESQUAD_ONLINE_HOUSE_2=4]="HYPESQUAD_ONLINE_HOUSE_2",e[e.HYPESQUAD_ONLINE_HOUSE_3=5]="HYPESQUAD_ONLINE_HOUSE_3",e[e.BUG_HUNTER_LEVEL_1=6]="BUG_HUNTER_LEVEL_1",e[e.BUG_HUNTER_LEVEL_2=7]="BUG_HUNTER_LEVEL_2",e[e.EARLY_VERIFIED_DEVELOPER=8]="EARLY_VERIFIED_DEVELOPER",e[e.EARLY_SUPPORTER=9]="EARLY_SUPPORTER",e[e.CERTIFIED_MODERATOR=10]="CERTIFIED_MODERATOR",e[e.PREMIUM=11]="PREMIUM",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_1=12]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_1",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_2=13]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_2",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_3=14]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_3",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_4=15]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_4",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_5=16]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_5",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_6=17]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_6",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_7=18]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_7",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_8=19]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_8",e[e.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_9=20]="PREMIUM_GUILD_SUBSCRIPTION_LEVEL_9"}(r||(t.BadgeKeys=r={})),t.UserProfileSections=a,function(e){e.USER_INFO="USER_INFO",e.ACTIVITY="ACTIVITY",e.MUTUAL_GUILDS="MUTUAL_GUILDS",e.MUTUAL_FRIENDS="MUTUAL_FRIENDS"}(a||(t.UserProfileSections=a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterEmpty=u,t.getBoolean=s,t.getOptionalBoolean=function(e,t){return null==e[t]?null:s(e,t)},t.getChannelId=d,t.getOptionalChannelId=function(e,t){return null==e[t]?null:d(e,t)},t.getUserId=f,t.getOptionalUserId=function(e,t){return null==e[t]?null:f(e,t)},t.getRoleId=c,t.getOptionalRoleId=function(e,t){return null==e[t]?null:c(e,t)},t.getString=p,t.getOptionalString=function(e,t){return null==e[t]?null:p(e,t)};var r,a=(r=n(23))&&r.__esModule?r:{default:r},o=n(8290);function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return null==e?[]:e.filter((function(e){return"text"!==e.type||""!==e.text.trim()}))}function s(e,t){var n,r=u(e[t]);return(0,a.default)(1===r.length,"Contains multiple values"),(0,a.default)("text"===(null===(n=r[0])||void 0===n?void 0:n.type),"First value is not text"),r[0].text===o.TRUE_OPTION_NAME}function d(e,t){var n,r=u(e[t]);return(0,a.default)(1===r.length,"Contains multiple values"),(0,a.default)("channelMention"===(null===(n=r[0])||void 0===n?void 0:n.type),"First value is not a channel mention"),r[0].channelId}function f(e,t){var n,r=u(e[t]);return(0,a.default)(1===r.length,"Contains multiple values"),(0,a.default)("userMention"===(null===(n=r[0])||void 0===n?void 0:n.type),"First value is not a user mention"),r[0].userId}function c(e,t){var n,r=u(e[t]);return(0,a.default)(1===r.length,"Contains multiple values"),(0,a.default)("roleMention"===(null===(n=r[0])||void 0===n?void 0:n.type),"First value is not a role mention"),r[0].roleId}function p(e,t){for(var n,r="",a=i(e[t]);!(n=a()).done;){var o=n.value;switch(o.type){case"text":r+=o.text;break;case"userMention":r+="<@!"+o.userId+">";break;case"channelMention":r+="<#"+o.channelId+">";break;case"roleMention":r+="<@&"+o.roleId+">";break;case"textMention":r+=o.text;break;case"emoji":r+=o.surrogate;break;case"customEmoji":r+="<"+(o.animated?"a":"")+":"+o.name.replace(/:/g,"").split("~")[0]+":"+o.emojiId+">"}}return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(202),o=n(3),i=v(n(8254)),l=n(8253),u=v(n(56)),s=v(n(15)),d=v(n(40)),f=n(1),c=v(n(6)),p=v(n(7480));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t;return m("div",{className:p.default.roleRow},void 0,m("div",{className:p.default.roleDot,style:{backgroundColor:null!==(t=e.colorString)&&void 0!==t?t:(0,a.int2hex)(f.DEFAULT_ROLE_COLOR)}}),m("div",{},void 0,e.name))}function h(e,t){var n=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuild(t)}),[t]),r=(0,o.useStateFromStoresObject)([u.default,d.default],(function(){var r=u.default.getMember(t,e);return{userRoles:null!=r?r.roles:[],isGuildMember:!!r,canManageRoles:null!=n&&d.default.can(f.Permissions.MANAGE_ROLES,n)}}),[e,t,n]),a=r.userRoles,p=r.isGuildMember,v=r.canManageRoles;if(__OVERLAY__)return null;if(null==a||null==n)return null;if(!p)return null;var y=d.default.getHighestRole(n),h=Object.values(n.roles).filter((function(e){return e.id!==n.id})),E=v?h.map((function(r){var o=r.managed||!d.default.isRoleHigher(n,y,r),u=-1!==a.indexOf(r.id);return o&&!u?null:m(l.MenuCheckboxItem,{id:r.id,label:function(){return _(r)},disabled:o,action:function(){return function(n){a.includes(n.id)?i.default.updateMemberRoles(t,e,a.filter((function(e){return e!==n.id})),[],[n.id]):i.default.updateMemberRoles(t,e,a.concat([n.id]),[n.id],[])}(r)},checked:u},r.id)})):h.filter((function(e){return-1!==a.indexOf(e.id)})).map((function(e){return e.id===n.id?null:m(l.MenuItem,{id:e.id,label:function(){return _(e)}},e.id)}));return 0===E.length?null:m(l.MenuItem,{id:"roles",label:c.default.Messages.ROLES_LIST.format({numRoles:3})},void 0,E)}_.displayName="coloredRoleLabel",h.displayName="useUserRolesItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7482));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(e){var t=e.className,n=e.children,r=e["aria-label"];return u("h2",{className:(0,a.default)(t,o.default.container),"aria-label":r},void 0,n)};s.displayName="ListSectionItem";var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){return(l=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}).apply(this,arguments)}var u={};function s(){u={}}var d=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getPendingReply=function(e){return u[e]},r}(r.default.Store))(a.default,{CREATE_PENDING_REPLY:function(e){var t=e.channel,n=e.message,r=e.shouldMention,a=void 0===r||r,o=e.showMentionToggle,i=void 0===o||o;u[t.id]={channel:t,message:n,shouldMention:a,showMentionToggle:i}},SET_PENDING_REPLY_SHOULD_MENTION:function(e){var t=e.channelId,n=e.shouldMention;if(!(t in u))return!1;u[t]=l({},u[t],{shouldMention:n})},DELETE_PENDING_REPLY:function(e){var t=e.channelId;delete u[t]},CONNECTION_OPEN:function(e){return s()},LOGOUT:function(e){return s()},MESSAGE_DELETE:function(e){var t,n,r=e.id,a=e.channelId;if((null===(t=u[a])||void 0===t||null===(n=t.message)||void 0===n?void 0:n.id)!==r)return!1;delete u[a]}});t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(8)),a=i(n(3)),o=i(n(2));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s={},d={favorites:[],timesFavorited:0};var f=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var o=a.prototype;return o.initialize=function(e){null!=e&&(d=e).favorites.forEach((function(e){s[e.url]=e}))},o.getState=function(){return d},o.getFavorites=function(){return d.favorites},o.shouldShowTooltipOnFavorite=function(){return d.timesFavorited<=2},o.getIsFavorite=function(e){return null!=s[e]},o.getRandomFavorite=function(){return r.default.sample(d.favorites)},a}(a.default.PersistedStore);f.persistKey="GIFFavoritesStore",f.migrations=[function(e){return null==e?{favorites:[],timesFavorited:0}:Array.isArray(e)?{favorites:e,timesFavorited:0}:e},function(e){return Array.isArray(e.favorites)?e:{favorites:[],timesFavorited:0}}];var c=new f(o.default,{GIF_FAVORITE_ADD:function(e){var t=e.gif;if(null!=s[t.url])return!1;d=u({},d,{favorites:[t].concat(d.favorites)}),s[t.url]=t,d.timesFavorited+=1},GIF_FAVORITE_REMOVE:function(e){var t=e.url;if(!delete s[t])return!1;var n=d.favorites,r=n.findIndex((function(e){var n=e.url;return t===n}));if(null==r)return!1;d.favorites=n.slice(0,r).concat(n.slice(r+1,n.length))}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeInlineObject=h,t.default=void 0;var r=p(n(23)),a=n(180),o=p(n(10)),i=p(n(15)),l=p(n(70)),u=p(n(107)),s=p(n(12)),d=n(48),f=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8350));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}var v={serialize:function(e,t){var n=y(e,new E(t));(0,r.default)(null!=n,"Slate: Should not have null markdown ever");var a=e.nodes.last();"block"===a.object&&"blockQuote"===a.type&&(n=n.replace(/(\n>\s*)+$/,""));return n},serializeSelection:function(e,t,n,a){void 0===a&&(a=!1);var o=y(e,new g(e,t,n));if(null==o){if(a)return"";(0,r.default)(null!=o,"Slate: Should not have null markdown ever")}return o}};function y(e,t){var n=t.startNode(e);switch(e.object){case"document":return function(e,t){return _(e,"\n",t)}(e,t);case"block":switch(e.type){case"line":case"paragraph":return m(e,t);case"blockQuote":var r=m(e,t);return n&&null!=r?"> "+r:r;default:throw new Error("Slate: Unknown block-object type: "+e.type)}case"inline":return t.outputInlineObject(h(e,t.mode));case"text":return t.outputText(e.text);default:throw new Error("Slate: Unknown object type: "+e.object+"-"+e.type)}}function m(e,t){return _(e,"",t)}function _(e,t,n){(0,r.default)("text"!==e.object,"Slate: node cannot be a text node");var a=e.nodes;if(0===a.size)return"";var o=a.map((function(e){return y(e,n)})).filter(d.isNotNullish);return 0===o.size?null:o.join(t)}function h(e,t){switch(e.type){case"emoji":var n=e.data.get("data");return null!=n.surrogate&&"raw"===t?n.surrogate:n.name;case"customEmoji":var r=e.data.get("data"),d=r.animated?"a":"";return"plain"===t?r.name:"<"+d+":"+r.name.replace(/:/g,"").split("~")[0]+":"+r.emojiId+">";case"mention":var c=e.data.get("id"),p="<@!"+c+">";if("plain"===t){var v=s.default.getUser(c);return null==v?p:"@"+v.username+"#"+v.discriminator}return p;case"textMention":return""+e.data.get("text");case"roleMention":var y=i.default.getGuild(u.default.getGuildId()),m=e.data.get("id"),_="<@&"+m+">";return"plain"===t?null==y||null==y.roles[m]?_:"@"+y.roles[m].name:_;case"channel":var E=e.data.get("id"),g="<#"+E+">";if("plain"===t){var S=o.default.getChannel(E);return null==S?g:(0,a.computeChannelName)(S,s.default,l.default,!0)}return g;case"commandOption":var O=e.data.get("name");return f.hasValueNodes(e)?O+":"+e.nodes.map((function(e){return null==e?"":"inline"===e.object?h(e,t):e.text})).join("")+" ":O+": ";default:throw new Error("Slate: Unknown inline-object type: "+e.type)}}t.default=v;var E=function(){function e(e){this.mode=e,this.mode=e}var t=e.prototype;return t.startNode=function(e){return!0},t.outputInlineObject=function(e){return e},t.outputText=function(e){return e},e}(),g=function(){function e(e,t,n){var r=t.start,a=r.key,o=r.offset,i=t.end,l=i.key,u=i.offset;this.document=e,this.mode=n,this.startKey="",this.startOffset=0,this.endKey="",this.endOffset=0,this.isIn=!1,this.isSkippingBlockquotes=!1,this.currentKey="",this.document=e,this.startKey=a,this.startOffset=o,this.endKey=l,this.endOffset=u;var s=this.document.getClosestBlock(this.startKey);this.isSkippingBlockquotes=null!=s&&"block"===s.object&&"blockQuote"===s.type&&!this.isFirstBlockQuoteNode(s)}var t=e.prototype;return t.startNode=function(e){this.currentKey=e.key;var t=this.shouldOutputMarkupSyntax(e);return this.currentKey===this.startKey&&(this.isIn=!0),this.currentKey===this.endKey&&(this.isIn=!1),t},t.shouldOutputMarkupSyntax=function(e){return this.isIn&&this.isSkippingBlockquotes&&"block"===e.object&&"blockQuote"!==e.type&&(this.isSkippingBlockquotes=!1),!this.isSkippingBlockquotes&&(!!this.isIn||"block"===e.object&&"blockQuote"===e.type&&this.isFirstBlockQuoteNode(e))},t.isFirstBlockQuoteNode=function(e){var t=e.getFirstText(),n=this.document.getPreviousSibling(e.key);return 0===this.startOffset&&null!=t&&t.key===this.startKey&&(null==n||"block"!==n.object||"blockQuote"!==n.type)},t.outputInlineObject=function(e){return this.isIn?e:null},t.outputText=function(e){return this.startKey===this.currentKey&&this.endKey===this.currentKey?e.substring(this.startOffset,this.endOffset):this.startKey===this.currentKey?e.substring(this.startOffset):this.endKey===this.currentKey?e.substring(0,this.endOffset):this.isIn?e:null},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){void 0===t&&(t=!0);void 0===n&&(n=!1);if(!e.available)return o.default.Messages.GAME_ACTION_BUTTON_UNAVAILABLE;if(e.premium&&!n)return o.default.Messages.APPLICATION_STORE_FREE_WITH_PREMIUM;var r=e.getPrice(null,t);if(null!=r)return r.amount>0?(0,a.formatPrice)(r.amount,r.currency):o.default.Messages.APPLICATION_STORE_FREE;return o.default.Messages.GAME_ACTION_BUTTON_UNAVAILABLE};var r,a=n(281),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8321),i=n(8253),l=d(n(200)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=(0,a.useStateFromStores)([l.default],(function(){return e.type===u.ChannelTypes.GUILD_CATEGORY?l.default.hasCategoryUnread(e.id):l.default.hasUnread(e.id)}),[e.id,e.type]);return c(i.MenuItem,{id:"mark-channel-read",label:s.default.Messages.MARK_AS_READ,action:function(){e.type===u.ChannelTypes.GUILD_CATEGORY?(0,o.ackCategory)(e.id,!0,!0):(0,o.ack)(e.id,!0,!0)},disabled:!t})}p.displayName="useChannelMarkAsReadItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderSingleLineMessage=L,t.repliedMessageElementId=D,t.default=w;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=C(n(5)),l=n(5943),u=C(n(8640)),s=C(n(8644)),d=n(706),f=C(n(9550)),c=n(290),p=C(n(61)),v=C(n(278)),y=C(n(8606)),m=C(n(8793)),_=C(n(8900)),h=n(150),E=n(1161),g=n(48),S=C(n(8515)),O=n(1),I=C(n(6)),T=C(n(7341));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e){var t=e.width,n=void 0===t?12:t,r=e.height,a=void 0===r?8:r,o=e.color,i=void 0===o?"currentColor":o;return M("svg",{className:e.className,width:n,height:a,viewBox:"0 0 12 8"},void 0,M("path",{d:"M0.809739 3.59646L5.12565 0.468433C5.17446 0.431163 5.23323 0.408043 5.2951 0.401763C5.35698 0.395482 5.41943 0.406298 5.4752 0.432954C5.53096 0.45961 5.57776 0.50101 5.61013 0.552343C5.64251 0.603676 5.65914 0.662833 5.6581 0.722939V2.3707C10.3624 2.3707 11.2539 5.52482 11.3991 7.21174C11.4028 7.27916 11.3848 7.34603 11.3474 7.40312C11.3101 7.46021 11.2554 7.50471 11.1908 7.53049C11.1262 7.55626 11.0549 7.56204 10.9868 7.54703C10.9187 7.53201 10.857 7.49695 10.8104 7.44666C8.72224 5.08977 5.6581 5.63359 5.6581 5.63359V7.28135C5.65831 7.34051 5.64141 7.39856 5.60931 7.44894C5.5772 7.49932 5.53117 7.54004 5.4764 7.5665C5.42163 7.59296 5.3603 7.60411 5.29932 7.59869C5.23834 7.59328 5.18014 7.57151 5.13128 7.53585L0.809739 4.40892C0.744492 4.3616 0.691538 4.30026 0.655067 4.22975C0.618596 4.15925 0.599609 4.08151 0.599609 4.00269C0.599609 3.92386 0.618596 3.84612 0.655067 3.77562C0.691538 3.70511 0.744492 3.64377 0.809739 3.59646Z",className:e.foreground,fill:i}))}function A(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r;return M("svg",{className:e.className,width:n,height:a,viewBox:"0 0 18 18"},void 0,M("path",{fill:"#3ba55c",d:"M0 8h14.2l-3.6-3.6L12 3l6 6-6 6-1.4-1.4 3.6-3.6H0",className:e.foreground}))}function P(e,t,n,r,a){var i;return M("img",{alt:"",src:null!=(null==t?void 0:t.guildMemberAvatar)&&null!=n?(0,h.getGuildMemberAvatarURLSimple)({guildId:n,userId:e.id,avatar:t.guildMemberAvatar}):e.getAvatarURL(n),onClick:r,onContextMenu:a,className:(0,o.default)((i={},i[T.default.replyAvatar]=!0,i[T.default.clickable]=null!=r,i))})}function R(e,t){var n=e.baseMessage,r=e.referencedMessage,a=e.showUsernamePopout,o=e.onClickUsername,i=e.onContextMenu,l=e.onPopoutRequestClose,s=(null==r?void 0:r.state)===d.ReferencedMessageState.LOADED?r.message:void 0;return null==s||s.type===O.MessageTypes.USER_JOIN?null:M(u.default,{message:s,compact:!0,withMentionPrefix:(0,f.default)(n,s),showPopout:a,renderPopout:t,onClick:o,onContextMenu:i,onPopoutRequestClose:l})}function L(e,t,n,r,a){var o,i,l,u=!t||Array.isArray(t)&&0===t.length,s=(0,c.getMessageStickers)(e).length>0,d=null!=e.interaction;return n?o=I.default.Messages.REPLY_QUOTE_MESSAGE_BLOCKED:s&&u?o=I.default.Messages.REPLY_QUOTE_STICKER:d&&u?o=I.default.Messages.REPLY_QUOTE_COMMAND:u?o=I.default.Messages.REPLY_QUOTE_NO_TEXT_CONTENT:i=M(S.default,{message:e,content:t,className:r}),s?l=M(_.default,{className:a}):d?l=M(y.default,{className:a}):(u||e.attachments.length>0||e.embeds.length>0)&&(l=M(m.default,{className:a})),{contentPlaceholder:o,renderedContent:i,icon:l}}function D(e){return"reply-context-"+e.id}function w(e){var t,n=e.author,r=e.baseAuthor,u=e.baseMessage,f=e.referencedMessage,c=e.renderPopout,y=a.useMemo((function(){return null!=c&&f.state===d.ReferencedMessageState.LOADED?function(e){return c(e,f.message)}:void 0}),[f,c]),m=a.useContext(l.GuildIDContext),_=function(e,t,n){var r=e.referencedMessage,a=e.compact,o=e.isReplyAuthorBlocked,i=e.author,l=e.showAvatarPopout,u=e.onClickAvatar,s=e.onContextMenu,f=e.onPopoutRequestClose;if(a||r.state!==d.ReferencedMessageState.LOADED||o)return M("div",{className:T.default.replyBadge},void 0,M(N,{className:T.default.replyIcon}));if(r.message.type===O.MessageTypes.USER_JOIN)return M(A,{className:T.default.userJoinSystemMessageIcon});var c=function(){return P(r.message.author,i,t,u,s)};return null!=n&&null!=l?M(v.default,{renderPopout:n,shouldShow:l,position:v.default.Positions.RIGHT,onRequestClose:f},void 0,c):c()}(e,m,y),h=R(e,y),S=function(e){var t=e.content,n=e.referencedMessage,r=e.isReplyAuthorBlocked,i=n.state!==d.ReferencedMessageState.DELETED?e.onClickReply:void 0;switch(n.state){case d.ReferencedMessageState.LOADED:var l=L(n.message,t,r,T.default.repliedTextContent,T.default.repliedTextContentIcon),u=l.contentPlaceholder,s=l.renderedContent,f=l.icon;return a.createElement(a.Fragment,null,M(p.default,{className:(0,o.default)(T.default.repliedTextPreview,T.default.clickable),onClick:i},void 0,null!=s?s:M("span",{className:T.default.repliedTextPlaceholder},void 0,u)),f);case d.ReferencedMessageState.NOT_LOADED:return M(p.default,{className:(0,o.default)(T.default.repliedTextPreview,T.default.clickable),onClick:i},void 0,M("span",{className:T.default.repliedTextPlaceholder},void 0,I.default.Messages.REPLY_QUOTE_MESSAGE_NOT_LOADED));case d.ReferencedMessageState.DELETED:return M("div",{className:T.default.repliedTextPreview},void 0,M("span",{className:T.default.repliedTextPlaceholder},void 0,I.default.Messages.REPLY_QUOTE_MESSAGE_DELETED));default:(0,g.assertNever)(n)}}(e),C=a.useMemo((function(){return e.compact?(0,s.default)((0,E.dateFormat)((0,i.default)(),"LT")):null}),[e.compact]);return null!=n&&null!=r&&(t=I.default.Messages.CHANNEL_MESSAGE_REPLY_A11Y_LABEL.format({author:null==n?void 0:n.nick,repliedAuthor:null==r?void 0:r.nick})),M("div",{id:D(u),className:(0,o.default)(T.default.repliedMessage,C),"aria-label":t},void 0,_,h,S)}N.displayName="ReplyIcon",A.displayName="UserJoinSystemMessageIcon",P.displayName="baseRenderAvatar",R.displayName="renderUsername",w.displayName="RepliedMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(8644)),l=d(n(149)),u=n(1161),s=d(n(7341));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t,n=e.children,r=e.className,d=e.compact,f=void 0!==d&&d,v=e.timestamp,y=e.isVisibleOnlyOnHover,m=void 0!==y&&y,_=e.cozyAlt,h=void 0!==_&&_,E=e.isInline,g=void 0===E||E,S=f?(0,u.dateFormat)(v,"LT"):(0,u.calendarFormat)(v),O=f?(0,i.default)(S):null;return p("span",{className:(0,o.default)(r,O,(t={},t[s.default.timestamp]=!0,t[s.default.timestampVisibleOnHover]=m,t[s.default.timestampInline]=g,t[s.default.alt]=h,t))},void 0,p(l.default,{text:(0,u.dateFormat)(v,"LLLL"),"aria-label":S,tooltipClassName:s.default.timestampTooltip,delay:750},void 0,(function(e){return a.createElement("time",c({},e,{dateTime:v.toISOString()}),null!=n?n:a.createElement(a.Fragment,null,p("i",{className:s.default.separator,"aria-hidden":!0},void 0,f?"[":" — "),S,f&&p("i",{className:s.default.separator,"aria-hidden":!0},void 0,"]"," ")))})))}v.displayName="MessageTimestamp";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useShouldShowInlineGuildCapUpsell=function(){var e=(0,r.useStateFromStores)([o.default],(function(){return o.default.getGuildCount()>=95})),t=(0,r.useStateFromStores)([a.HotspotStore],(function(){return a.HotspotStore.hasHotspot(a.HotspotLocations.GUILD_CAP_INLINE_UPSELL)})),n=(0,r.useStateFromStoresObject)([i.default],(function(){var e;return null==(null===(e=i.default.getNullableCurrentUser())||void 0===e?void 0:e.premiumType)}));return e&&t&&n},t.hideInlineGuildCapUpsell=function(){(0,a.hideHotspot)(a.HotspotLocations.GUILD_CAP_INLINE_UPSELL)},t.isAtGuildCapAndNonPremium=function(){var e=o.default.getGuildCount()>=u.MAX_USER_GUILDS,t=l.default.canUseIncreasedGuildCap(i.default.getNullableCurrentUser());return e&&!t};var r=n(3),a=n(8277),o=s(n(15)),i=s(n(12)),l=s(n(96)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.onCloseCallback,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onCloseCallback"]);(0,o.openModal)((function(e){return r.createElement(i.default,s({},e,n,{guildCount:a.default.getGuildCount(),"aria-labelledby":"nitro-guild-cap-upsell"}))}),{onCloseCallback:t})};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(15)),o=n(41),i=l(n(9570));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(8314)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=u(a.default.Body,{resolving:!0});function d(){return u(a.default,{},void 0,u(a.default.Header,{text:o.default.Messages.INVITE_BUTTON_RESOLVING}),s)}d.displayName="ResolvingInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(8650)),l=c(n(1279)),u=c(n(5834)),s=c(n(12)),d=c(n(9585)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){y(o,r,a,i,l,"next",e)}function l(e){y(o,r,a,i,l,"throw",e)}i(void 0)}))}}var _=a.forwardRef((function(e,t){var n=e.onAddedPhone,r=e.onClose,c=e.transitionState,p=(0,o.useStateFromStores)([s.default],(function(){return s.default.getNullableCurrentUser()})),y=a.useState(null),_=y[0],h=y[1],E=a.useState(null),g=E[0],S=E[1],O=a.useState(null),I=O[0],T=O[1],C=a.useState(!1),b=C[0],M=C[1],N=a.useCallback(function(){var e=m(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.prev=1,e.next=4,u.default.beginAddPhone(t);case 4:T(null),h(t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),T(new l.default(e.t0));case 11:M(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),[]),A=a.useCallback(function(){var e=m(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=_&&null!=p){e.next=2;break}return e.abrupt("return");case 2:return M(!0),e.prev=3,e.next=6,u.default.verifyPhone(_,t);case 6:n=e.sent,r=n.token,T(null),S(r),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),T(new l.default(e.t0));case 15:M(!1);case 16:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t){return e.apply(this,arguments)}}(),[p,_]),P=a.useCallback(function(){var e=m(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=g){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,u.default.addPhone(g,t);case 4:null==n||n(),r();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[n,r,g]);return null!=g?v(i.default,{onClose:r,transitionState:c,title:f.default.Messages.USER_SETTINGS_EDIT_ACCOUNT_PASSWORD_LABEL,handleSubmit:P}):v(d.default,{onClose:r,transitionState:c,error:null==I?void 0:I.getAnyErrorMessage(),working:b,validPhone:null!=_,onAddPhone:N,onVerifyPhone:A})}));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?23:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 20 23"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M19.487 5.126L10.487 0.126C10.184 -0.042 9.81798 -0.042 9.51498 0.126L0.514977 5.126C0.197977 5.302 0.000976562 5.636 0.000976562 5.999C0.000976562 6.693 0.114977 22.999 10.001 22.999C19.887 22.999 20.001 6.693 20.001 5.999C20.001 5.636 19.804 5.302 19.487 5.126ZM10.001 5.999C11.382 5.999 12.501 7.118 12.501 8.499C12.501 9.88 11.382 10.999 10.001 10.999C8.61998 10.999 7.50098 9.88 7.50098 8.499C7.50098 7.118 8.61998 5.999 10.001 5.999ZM6.25098 16C6.25098 13.699 7.69998 12.25 10.001 12.25C12.302 12.25 13.751 13.699 13.751 16H6.25098Z"})))}d.displayName="PersonShield"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(e.type){case g.ChannelTypes.DM:return r.default;case g.ChannelTypes.GROUP_DM:return p.default;case g.ChannelTypes.GUILD_ANNOUNCEMENT:return e.isNSFW()?f.default:(0,E.default)(e)?d.default:s.default;case g.ChannelTypes.GUILD_TEXT:return e.id===(null==t?void 0:t.rulesChannelId)?o.default:e.isNSFW()?u.default:(0,E.default)(e)?l.default:i.default;case g.ChannelTypes.GUILD_STAGE_VOICE:return _.default;case g.ChannelTypes.GUILD_VOICE:return(0,E.default)(e)?m.default:y.default;case g.ChannelTypes.ANNOUNCEMENT_THREAD:case g.ChannelTypes.PUBLIC_THREAD:return e.isNSFW()?c.default:h.default;case g.ChannelTypes.PRIVATE_THREAD:return e.isNSFW()?c.default:v.default;case g.ChannelTypes.GUILD_DIRECTORY:return a.default;default:return null}};var r=S(n(8509)),a=S(n(9613)),o=S(n(8843)),i=S(n(8307)),l=S(n(8374)),u=S(n(8490)),s=S(n(8345)),d=S(n(8844)),f=S(n(8845)),c=S(n(8846)),p=S(n(696)),v=S(n(8740)),y=S(n(8276)),m=S(n(8510)),_=S(n(291)),h=S(n(8287)),E=S(n(8489)),g=n(1);function S(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.categoryCollapse=function(e){a.default.dispatch({type:o.ActionTypes.CATEGORY_COLLAPSE,id:e})},t.categoryExpand=function(e){a.default.dispatch({type:o.ActionTypes.CATEGORY_EXPAND,id:e})},t.categoryCollapseAll=function(e){a.default.dispatch({type:o.ActionTypes.CATEGORY_COLLAPSE_ALL,guildId:e})},t.categoryExpandAll=function(e){a.default.dispatch({type:o.ActionTypes.CATEGORY_EXPAND_ALL,guildId:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}var s={welcomeScreenViewed:function(e,t){void 0===t&&(t=!1),a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_VIEW,guildId:e,isLurking:t})},fetchWelcomeScreen:function(){var e=u(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_FETCH_START}),e.prev=1,e.next=4,r.default.get({url:o.Endpoints.GUILD_WELCOME_SCREEN(t),oldFormErrors:!0});case 4:return n=e.sent,a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_FETCH_SUCCESS,guildId:t,welcomeScreen:n.body}),e.abrupt("return",n.body);case 9:e.prev=9,e.t0=e.catch(1),a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_FETCH_FAIL});case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),resetWelcomeScreen:function(){a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_SETTINGS_RESET})},updateSettings:function(e){a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_SETTINGS_UPDATE,settings:e})},saveWelcomeScreen:function(){var e=u(regeneratorRuntime.mark((function e(t,n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_SUBMIT}),e.prev=1,e.next=4,r.default.patch({url:o.Endpoints.GUILD_WELCOME_SCREEN(t),body:{description:n.description,welcome_channels:n.channels,enabled:n.enabled},oldFormErrors:!0});case 4:i=e.sent,a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_SUBMIT_SUCCESS,guildId:t,welcomeScreen:i.body}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),a.default.dispatch({type:o.ActionTypes.WELCOME_SCREEN_SUBMIT_FAILURE});case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,n){return e.apply(this,arguments)}}()};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRemoteIconURL=U,t.containsSameValues=function(e,t){return r.default.isEqual(e,r.default.pick(t,Object.keys(e)))},t.validateOrigin=G,t.transformChannel=function(e,t){var n=[],r=e.getGuildId();[N.ChannelTypes.GUILD_CATEGORY].concat(p.GUILD_VOCAL_CHANNEL_TYPES).includes(e.type)||n.push(new Promise((function(t){m.default.whenReady(e.id,(function(){return t()})),u.default.fetchMessages({channelId:e.id,limit:N.MAX_MESSAGES_PER_CHANNEL})})));return Promise.all(n).then((function(){var n,a=(!e.isNSFW()||!0===(null===(n=g.default.getNullableCurrentUser())||void 0===n?void 0:n.nsfwAllowed))&&t?m.default.getMessages(e.id).toArray().map(F):[],o=Object.values(S.default.getVoiceStatesForChannel(e.id)).map((function(t){return B(r,e.id,t)}));return{id:e.id,name:e.name,type:e.type,topic:e.topic,bitrate:e.bitrate,user_limit:e.userLimit,guild_id:r,position:e.position,messages:a,voice_states:o}}))},t.transformInternalTextMessage=F,t.transformVoiceState=B,t.transformRelationship=function(e,t,n){var r=g.default.getUser(t);return{type:e,user:null!=r?(0,M.default)(r):null,presence:{status:h.default.getStatus(t),activity:null!=n?h.default.getApplicationActivity(t,n):h.default.getPrimaryActivity(t)}}},t.isMatchingOrigin=H,t.transformShortcut=x,t.getDeprecatedVoiceSettings=function(){var e=y.default.getSettings(),t=function(e){return Object.values(e).sort((function(e,t){return e.index-t.index})).map((function(e){return{id:e.id,name:e.name}}))},n=[];e.modeOptions.shortcut&&Array.isArray(e.modeOptions.shortcut)&&(n=x(e.modeOptions.shortcut));return{input:{available_devices:t(y.default.getInputDevices()),device_id:e.inputDeviceId,volume:e.inputVolume},output:{available_devices:t(y.default.getOutputDevices()),device_id:e.outputDeviceId,volume:e.outputVolume},mode:{type:e.mode,auto_threshold:e.modeOptions.autoThreshold,threshold:e.modeOptions.threshold,shortcut:n,delay:e.modeOptions.delay},automatic_gain_control:e.automaticGainControl,echo_cancellation:e.echoCancellation,noise_suppression:e.noiseSuppression,qos:e.qos,silence_warning:e.silenceWarning,deaf:e.deaf,mute:e.mute}},t.getVoiceSettings=function(e){var t=y.default.getSettings(e),n="";t.modeOptions.shortcut&&Array.isArray(t.modeOptions.shortcut)&&(n=(0,C.toString)(t.modeOptions.shortcut));return{input_mode:{type:t.mode,shortcut:n},local_mutes:Object.keys(t.localMutes),local_volumes:t.localVolumes,self_mute:t.mute,self_deaf:t.deaf}},t.hasMessageReadPermission=function(e,t,n){var r=v.default.getGuild(e.getGuildId());return(r?r.getApplicationId():e.getApplicationId())===t||n.indexOf(N.OAuth2Scopes.MESSAGES_READ)>-1},t.getVoiceConnectionState=function(e){switch(e){case N.RTCConnectionStates.RTC_CONNECTED:case N.RTCConnectionStates.RTC_CONNECTING:case N.RTCConnectionStates.RTC_DISCONNECTED:return e.replace(/^RTC_/,"VOICE_");default:return e}},t.validateSocketClient=function(e,t,n){return V.apply(this,arguments)},t.computeActivityFlags=function(e,t){void 0===t&&(t=!1);var n=e.instance,r=e.secrets,a=e.party,o=0;n&&(o|=N.ActivityFlags.INSTANCE);(null==r?void 0:r.join)&&(o|=N.ActivityFlags.JOIN);if(t)return o|=N.ActivityFlags.EMBEDDED,o|=N.ActivityFlags.PARTY_PRIVACY_VOICE_CHANNEL;((null==a?void 0:a.privacy)===N.ActivityPartyPrivacy.PUBLIC||l.default.get("ACTIVITIES_FORCE_PUBLIC"))&&(E.default.allowActivityPartyPrivacyFriends&&(o|=N.ActivityFlags.PARTY_PRIVACY_FRIENDS),E.default.allowActivityPartyPrivacyVoiceChannel&&(o|=N.ActivityFlags.PARTY_PRIVACY_VOICE_CHANNEL));return o},t.validateActivityInvite=function(e,t,n){switch(e){case N.ActivityActionTypes.JOIN:return null!=t&&null!=t.id&&null!=n.join;default:return!1}},t.unlockOverlay=function(e){return _.default.isReady(e)?(s.default.setLocked(!1,e),{lock:function(){s.default.setLocked(!0,e)},context:N.AppContext.OVERLAY}):(T.default.focus(null,!0),{lock:function(){T.default.setForegroundProcess(e)},context:N.AppContext.APP})};var r=A(n(8)),a=A(n(142)),o=A(n(14)),i=A(n(10954)),l=A(n(28)),u=A(n(390)),s=A(n(695)),d=A(n(1359)),f=A(n(8295)),c=n(682),p=n(31),v=A(n(15)),y=A(n(51)),m=A(n(201)),_=A(n(1287)),h=A(n(256)),E=A(n(39)),g=A(n(12)),S=A(n(80)),O=A(n(258)),I=A(n(264)),T=A(n(43)),C=n(401),b=A(n(689)),M=A(n(1304)),N=n(1);function A(e){return e&&e.__esModule?e:{default:e}}function P(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){P(o,r,a,i,l,"next",e)}function l(e){P(o,r,a,i,l,"throw",e)}i(void 0)}))}}var L=function(){var e=N.API_HOST.split(":")[0];if(!e.includes("."))return e;var t=e.split("."),n=t[t.length-1];return/^\d+$/.test(n)?e:t.slice(-2).join(".")}(),D=new RegExp("^"+I.default.escape("https://")+"(?:[a-z]+\\.)?("+I.default.escape(L)+"|discordapp.com|discord.com)$"),w=["207646673902501888"],j={};function k(e){return"customEmoji"===e.type&&(e.type="emoji"),"emoji"===e.type&&e.src&&(e.src=U(e.src)),Array.isArray(e.content)&&(e.content=e.content.map(k)),e}function U(e){return/^http/.test(e)?e:location.protocol+"//"+location.host+("/"===e.charAt(0)?"":"/")+e}function G(e,t){return void 0===t&&(t=[]),t.indexOf(e)>-1}function F(e){var t=f.default.parseToAST(e.content,!0,{channelId:e.channel_id}).map(k),n=(0,c.getMessageAuthor)(e),r=n.colorString,a=n.nick;return{id:e.id,blocked:e.blocked,bot:e.bot,content:e.content,content_parsed:t.length?t:void 0,nick:a,author_color:r,edited_timestamp:e.edited_timestamp||e.editedTimestamp,timestamp:e.timestamp,tts:e.tts,mentions:e.mentions,mention_everyone:e.mention_everyone||e.mentionEveryone,mention_roles:e.mention_roles||e.mentionRoles,embeds:e.embeds,attachments:e.attachments,author:e.author?(0,M.default)(e.author):void 0,pinned:e.pinned,type:e.type}}function B(e,t,n){var r=n.mute,a=n.deaf,o=n.selfMute,i=n.selfDeaf,l=n.suppress,u=n.userId,s=g.default.getUser(u);if(!s)throw new Error("Invalid user id: "+u);return{nick:O.default.getName(e,t,s),mute:y.default.isLocalMute(s.id),volume:y.default.getLocalVolume(s.id),pan:y.default.getLocalPan(s.id),voice_state:{mute:r,deaf:a,self_mute:o,self_deaf:i,suppress:l},user:(0,M.default)(s)}}function H(e){if(null==e)return!1;var t,n=window.location.origin;if(e===n)return!0;try{t=a.default.parse(e).hostname}catch(e){return!1}return window.location.hostname===t&&"localhost"===t||!e.match("staging")&&!(!D.test(e)||!D.test(n))}function x(e){return e.map((function(e){return{type:e[0],code:e[1],name:(0,C.codeToKey)(e)||"unknown"}}))}function V(){return(V=R(regeneratorRuntime.mark((function e(t,n,r){var a,l,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n&&(t.authorization.scopes=[N.RPC_LOCAL_SCOPE]),r||!H(n)){e.next=6;break}return t.authorization.scopes=[N.RPC_PRIVATE_SCOPE,N.RPC_PRIVATE_LIMITED_SCOPE],e.abrupt("return",Promise.resolve());case 6:if(r){e.next=8;break}return e.abrupt("return",Promise.reject(new b.default(N.RPCCloseCodes.INVALID_CLIENTID,"No Client ID Specified")));case 8:return null==(a=j[r])&&(l=T.default.releaseChannel!==N.PublicReleaseChannels.CANARY&&!w.includes(r)&&t.transport!==N.TransportTypes.POST_MESSAGE,u=l?2:60,a=new i.default(u,6e4),j[r]=a),e.next=12,a.process();case 12:return e.abrupt("return",o.default.get({url:N.Endpoints.APPLICATION_RPC(r),oldFormErrors:!0}).then((function(e){var a=e.body,o=a.rpc_origins,i=a.id,l=a.name,u=a.icon,s=a.cover_image,f=a.flags;if("string"==typeof n)if(t.transport===N.TransportTypes.POST_MESSAGE){var c=(0,d.default)(r);if(null==c||!G(n,[c]))throw new b.default(N.RPCCloseCodes.INVALID_ORIGIN,"Invalid Origin")}else if(!G(n,o))throw new b.default(N.RPCCloseCodes.INVALID_ORIGIN,"Invalid Origin");t.application={id:i,name:l,icon:u,coverImage:s,flags:f}}),(function(){throw new b.default(N.RPCCloseCodes.INVALID_CLIENTID,"Invalid Client ID")})));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,l){for(var u,s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(a.ApplicationStreamSettingRequirements);!(u=s()).done;){var d=u.value;if((null==d.preset||e===d.preset)&&t===d.resolution&&n===d.fps&&(0,o.default)(d,r,l))return!0}return!1};var r,a=n(713),o=(r=n(9664))&&r.__esModule?r:{default:r};function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){e.exports=n.p+"81b90eae4fc67502d59808a7c219ee65.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),d))}f.displayName="Calendar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(3),a=n(203),o=s(n(1280)),i=s(n(15)),l=s(n(40)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}var d=function(e){var t=(0,r.useStateFromStores)([i.default],(function(){return i.default.getGuild(e)}),[e]),n=o.default.useExperiment({guildId:e})[0].enabled,s=(0,r.useStateFromStores)([l.default],(function(){return null!=t&&l.default.can(u.Permissions.MANAGE_EVENTS,t)}),[t]),d=(0,r.useStateFromStores)([l.default],(function(){return null!=t&&s&&l.default.can(a.MODERATE_STAGE_CHANNEL_PERMISSIONS,t)}),[t,s]),f=null!=t&&t.hasFeature(u.GuildFeatures.COMMUNITY);return{canManageEvents:n&&f&&s,canStartEvents:n&&f&&d,canSeeEvents:n&&f}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomDateShortcut=function(){return o.default.sample(j())},t.refreshSearchTokens=function(){Object.assign(V,(t=[_.default.Messages.SEARCH_ANSWER_HAS_LINK,_.default.Messages.SEARCH_ANSWER_HAS_EMBED,_.default.Messages.SEARCH_ANSWER_HAS_ATTACHMENT,_.default.Messages.SEARCH_ANSWER_HAS_VIDEO,_.default.Messages.SEARCH_ANSWER_HAS_IMAGE,_.default.Messages.SEARCH_ANSWER_HAS_SOUND],(e={})[m.SearchTokenTypes.FILTER_FROM]={regex:P(_.default.Messages.SEARCH_FILTER_FROM),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_FROM),validator:B,getAutocompletions:G},e[m.SearchTokenTypes.ANSWER_USERNAME_FROM]={follows:[m.SearchTokenTypes.FILTER_FROM],regex:H,validator:R,mutable:!0,componentType:x.ANSWER,queryKey:"author_id"},e[m.SearchTokenTypes.FILTER_MENTIONS]={regex:P(_.default.Messages.SEARCH_FILTER_MENTIONS),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_MENTIONS),validator:B,getAutocompletions:G},e[m.SearchTokenTypes.ANSWER_USERNAME_MENTIONS]={follows:[m.SearchTokenTypes.FILTER_MENTIONS],regex:H,validator:R,mutable:!0,componentType:x.ANSWER,queryKey:"mentions"},e[m.SearchTokenTypes.FILTER_HAS]={regex:P(_.default.Messages.SEARCH_FILTER_HAS),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_HAS),getAutocompletions:function(e,n,r){return U(e,r,t)}},e[m.SearchTokenTypes.ANSWER_HAS]={regex:new RegExp("(?:\\s*-?("+t.map((function(e){return y.default.escape(e)})).join("|")+"))","i"),follows:[m.SearchTokenTypes.FILTER_HAS],validator:w,componentType:x.ANSWER,queryKey:"has"},e[m.SearchTokenTypes.FILTER_FILE_TYPE]={regex:P(_.default.Messages.SEARCH_FILTER_FILE_TYPE),key:A(_.default.Messages.SEARCH_FILTER_FILE_TYPE),componentType:x.FILTER},e[m.SearchTokenTypes.ANSWER_FILE_TYPE]={regex:/(?:\s*([^\s]+))/,follows:[m.SearchTokenTypes.FILTER_FILE_TYPE],mutable:!0,componentType:x.ANSWER,queryKey:"attachment_extensions"},e[m.SearchTokenTypes.FILTER_FILE_NAME]={regex:P(_.default.Messages.SEARCH_FILTER_FILE_NAME),key:A(_.default.Messages.SEARCH_FILTER_FILE_NAME),componentType:x.FILTER},e[m.SearchTokenTypes.ANSWER_FILE_NAME]={regex:/(?:\s*([^\s]+)(?=\s))/,follows:[m.SearchTokenTypes.FILTER_FILE_NAME],mutable:!0,componentType:x.ANSWER,queryKey:"attachment_filename"},e[m.SearchTokenTypes.FILTER_BEFORE]={regex:P(_.default.Messages.SEARCH_FILTER_BEFORE),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_BEFORE),getAutocompletions:function(e,t,n){return k(e,n,m.SearchTokenTypes.FILTER_BEFORE)}},e[m.SearchTokenTypes.FILTER_ON]={regex:P("("+_.default.Messages.SEARCH_FILTER_ON+"|"+_.default.Messages.SEARCH_FILTER_DURING+")"),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_DURING),getAutocompletions:function(e,t,n){return k(e,n,m.SearchTokenTypes.FILTER_ON)}},e[m.SearchTokenTypes.FILTER_AFTER]={regex:P(_.default.Messages.SEARCH_FILTER_AFTER),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_AFTER),getAutocompletions:function(e,t,n){return k(e,n,m.SearchTokenTypes.FILTER_AFTER)}},e[m.SearchTokenTypes.ANSWER_BEFORE]={regex:N,follows:[m.SearchTokenTypes.FILTER_BEFORE],componentType:x.ANSWER,mutable:!0,validator:function(e){return L(e,"before")}},e[m.SearchTokenTypes.ANSWER_ON]={regex:N,follows:[m.SearchTokenTypes.FILTER_ON],componentType:x.ANSWER,mutable:!0,validator:function(e){return L(e,"on")}},e[m.SearchTokenTypes.ANSWER_AFTER]={regex:N,follows:[m.SearchTokenTypes.FILTER_AFTER],componentType:x.ANSWER,mutable:!0,validator:function(e){return L(e,"after")}},e[m.SearchTokenTypes.FILTER_IN]={regex:P(_.default.Messages.SEARCH_FILTER_IN),componentType:x.FILTER,key:A(_.default.Messages.SEARCH_FILTER_IN),validator:F,getAutocompletions:function(e,t,n){"#"===e[0]&&(e=e.substring(1));var r=v.default.queryChannels(e,t,1/0).map((function(e){return e.channel})).filter((function(e){return!e.isThread()}));if(!e.trim()){var a=d.default.getChannelId(t),i=r.find((function(e){return e.id===a}));i&&(r.splice(r.indexOf(i),1),r.unshift(i))}var u=l.default.getTextChannelNameDisambiguations(t);return(0,o.default)(r).take(n).map((function(e){return{text:""+u[e.id].name,channel:e}})).value()}},e[m.SearchTokenTypes.ANSWER_IN]={regex:/(?:\s*#?([^ ]+))/i,mutable:!0,follows:[m.SearchTokenTypes.FILTER_IN],componentType:x.ANSWER,validator:D,queryKey:"channel_id"},e));var e,t},t.getFilterAutocompletions=function(e,t){void 0===t&&(t=Object.keys(V).length);return(0,o.default)(V).keys().filter((function(e){return m.IS_SEARCH_FILTER_TOKEN.test(e)})).filter((function(e){return null!=V[e].key})).map((function(e){return{token:e,text:V[e].key}})).filter((function(t){var n=t.text;return(0,r.default)(e.toLowerCase(),n)})).take(t).value()},t.default=t.ComponentTypes=void 0;var r=E(n(480)),a=E(n(133)),o=E(n(8)),i=E(n(5)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(86)),u=E(n(70)),s=E(n(1241)),d=E(n(36)),f=E(n(107)),c=E(n(160)),p=E(n(12)),v=E(n(697)),y=E(n(264)),m=n(1),_=E(n(6));function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){return e&&e.__esModule?e:{default:e}}function g(){return(g=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}).apply(this,arguments)}function S(){return new Set(i.default.months().map((function(e){return e.toLowerCase()})))}function O(){return new Set(i.default.weekdays().map((function(e){return e.toLowerCase()})))}function I(){var e=(new Date).getFullYear();return new Set(o.default.range(2015,e+1).map((function(e){return e.toString()})))}function T(e,t){return[e,e.clone().add(1,t)]}function C(e,t){return void 0===t&&(t=0),T((0,i.default)().startOf(e).add(t,e),e)}function b(e,t,n){return T((0,i.default)(e,t).local(),n)}function M(){var e;return(e={})[_.default.Messages.SEARCH_SHORTCUT_TODAY]=function(){return C("day")},e[_.default.Messages.SEARCH_SHORTCUT_YESTERDAY]=function(){return C("day",-1)},e[_.default.Messages.SEARCH_SHORTCUT_WEEK]=function(){return C("week")},e[_.default.Messages.SEARCH_SHORTCUT_MONTH]=function(){return C("month")},e[_.default.Messages.SEARCH_SHORTCUT_YEAR]=function(){return C("year")},e}var N=new RegExp("(?:\\s*(([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})|([0-9]{4})-([0-9]{1,2})|\\d{4}|([^\\d\\s]+)))","i");function A(e){return e+":"}function P(e){return new RegExp(A(e),"i")}function R(e){var t,n=e.getMatch(1),r=function(e){return null!=e?null==e?void 0:e.id:null};return!!(t=m.ID_REGEX.test(n)?n:n===m.ME?r(p.default.getCurrentUser()):r(p.default.findByTag(e.getMatch(2),e.getMatch(3))))&&(e.setData("userId",t),!0)}function L(e,t){var n,r,a=e.getFullMatch().trim().toLowerCase(),o=M()[a];if(null!=o){var i=o();n=i[0],r=i[1]}else if(S().has(a)){var l=b(a,"MMMM","month");n=l[0],r=l[1]}else if(O().has(a)){var u=b(a,"dddd","day");n=u[0],r=u[1]}else if(I().has(a)){var s=b(a,"YYYY","year");n=s[0],r=s[1]}else{var d=b(a,m.SEARCH_DATE_FORMAT,"day");n=d[0],r=d[1]}return!(!n.isValid()||!r.isValid())&&("before"===t?(r=n,n=null):"after"===t&&(n=r,r=null),e.setData("start",n),e.setData("end",r),!0)}function D(e){var t=e.getMatch(1),n=f.default.getGuildId(),r=l.default.getChannels(n)[l.GUILD_SELECTABLE_CHANNELS_KEY],a=l.default.getTextChannelNameDisambiguations(n),i=o.default.chain(r).map((function(e){return e.channel})).find((function(e){return t===a[e.id].name})).value();return!!i&&(e.setData("channel",i),!0)}function w(e){var t,n=(t={},t[_.default.Messages.SEARCH_ANSWER_HAS_LINK]="link",t[_.default.Messages.SEARCH_ANSWER_HAS_EMBED]="embed",t[_.default.Messages.SEARCH_ANSWER_HAS_ATTACHMENT]="file",t[_.default.Messages.SEARCH_ANSWER_HAS_VIDEO]="video",t[_.default.Messages.SEARCH_ANSWER_HAS_IMAGE]="image",t[_.default.Messages.SEARCH_ANSWER_HAS_SOUND]="sound",t)[e.getMatch(1)];return!!n&&(e.setData("has",n),!0)}function j(){return[].concat(Array.from(S()),Array.from(O()),Array.from(I()),Object.keys(M()))}function k(e,t,n){return U(e,t,j()).map((function(e){return g({},e,{group:n,key:n+"-"+e.text})}))}function U(e,t,n){return(0,o.default)(n).filter((function(t){return(0,r.default)(e.toLocaleLowerCase(),t.toLowerCase())})).take(t).map((function(e){return{text:e}})).value()}function G(e,t,n,r){void 0===n&&(n=10),void 0===r&&(r=!1);var a,o=s.default.getSearchType(t);switch(e=e.split("#")[0],o){case m.SearchTypes.GUILD:a=v.default.queryGuildUsers;break;case m.SearchTypes.CHANNEL:a=v.default.queryChannelUsers;break;default:return[]}return a(t,e,n,r).filter((function(e){var t=e.user;return!u.default.isBlocked(t.id)})).map((function(e){var t=e.user;return{text:t.tag,user:t}}))}function F(){return s.default.getSearchType()===m.SearchTypes.GUILD}function B(){return!c.default.hidePersonalInformation}var H=/^(?:\s*(\d{17,20}|@me|([^@#:]+)#([0-9]{4})))/i,x=(0,a.default)({FILTER:null,ANSWER:null});t.ComponentTypes=x;var V={};var W=V;t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddMembers=me,t.default=void 0;var r,a,o=de(n(0)),i=ue(n(9)),l=ue(n(8)),u=n(95),s=n(92),d=n(3),f=ue(n(9168)),c=ue(n(199)),p=ue(n(9736)),v=ue(n(9738)),y=n(286),m=ue(n(106)),_=n(180),h=n(1229),E=n(8574),g=n(8482),S=n(42),O=n(203),I=n(8971),T=n(9169),C=n(31),b=ue(n(10)),M=ue(n(71)),N=ue(n(56)),A=ue(n(15)),P=ue(n(40)),R=ue(n(70)),L=ue(n(12)),D=ue(n(29)),w=ue(n(55)),j=de(n(8353)),k=ue(n(1162)),U=n(703),G=ue(n(8267)),F=ue(n(153)),B=n(85),H=ue(n(476)),x=ue(n(474)),V=ue(n(159)),W=ue(n(8307)),Y=ue(n(8374)),z=ue(n(9740)),K=ue(n(1221)),$=ue(n(8345)),Z=ue(n(8276)),q=ue(n(8510)),X=ue(n(291)),J=ue(n(8620)),Q=n(35),ee=ue(n(47)),te=n(374),ne=ue(n(24)),re=n(292),ae=ue(n(93)),oe=n(1),ie=ue(n(6)),le=ue(n(7669));function ue(e){return e&&e.__esModule?e:{default:e}}function se(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return se=function(){return e},e}function de(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=se();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function fe(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ve(){return(ve=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}).apply(this,arguments)}function ye(e,t,n,r){var a=[{icon:e?Y.default:W.default,label:ie.default.Messages.TEXT_CHANNEL,value:oe.ChannelTypes.GUILD_TEXT,description:ie.default.Messages.CREATE_TEXT_CHANNEL_DESCRIPTION},{icon:e?q.default:Z.default,label:ie.default.Messages.VOICE_CHANNEL,value:oe.ChannelTypes.GUILD_VOICE,description:ie.default.Messages.CREATE_VOICE_CHANNEL_DESCRIPTION}];return n&&a.push({icon:$.default,iconSize:24,label:ie.default.Messages.NEWS_CHANNEL,value:oe.ChannelTypes.GUILD_ANNOUNCEMENT,description:ie.default.Messages.CREATE_NEWS_CHANNEL_DESCRIPTION}),t&&a.push({icon:J.default,iconSize:24,label:ie.default.Messages.STORE_CHANNEL,value:oe.ChannelTypes.GUILD_STORE,description:ie.default.Messages.CREATE_STORE_CHANNEL_DESCRIPTION}),r&&a.push({icon:X.default,iconSize:24,label:ie.default.Messages.STAGE_VOICE_CHANNEL,value:oe.ChannelTypes.GUILD_STAGE_VOICE,description:ie.default.Messages.CREATE_STAGE_CHANNEL_DESCRIPTION}),a.map((function(e){var t=e.icon,n=e.iconSize,r=e.label,a=e.value,l=e.description;return{name:pe(w.default,{align:w.default.Align.CENTER},void 0,o.createElement(t,ve({},null!=n?{width:n,height:n}:null,{className:le.default.icon,background:le.default.background,foreground:le.default.foreground})),pe("div",{},void 0,pe(ne.default,{size:ne.default.Sizes.SIZE_16,className:le.default.radioText},void 0,r),pe(ne.default,{size:ne.default.Sizes.SIZE_12,color:ne.default.Colors.HEADER_SECONDARY,className:(0,i.default)(le.default.radioText)},void 0,l))),value:a}}))}function me(e){var t=e.onChange,n=e.guildId,r=e.channelType,a=e.description,i=o.useState({}),l=i[0],u=i[1],s=(0,d.useStateFromStores)([A.default],(function(){return A.default.getGuild(n)})),f=r===oe.ChannelTypes.GUILD_STAGE_VOICE;return o.useEffect((function(){t(l)}),[l,t]),null==s?null:pe(Q.ModalContent,{className:le.default.addMembersContainer},void 0,pe(g.AddMembersBody,{guild:s,channel:null,permission:f?O.MODERATE_STAGE_CHANNEL_PERMISSIONS:(0,C.getViewPermission)(r),pendingAdditions:l,setPendingAdditions:u,isStageChannel:f,description:a}))}!function(e){e.CHANNEL_INFO="CHANNEL_INFO",e.ADD_MEMBERS="ADD_MEMBERS"}(a||(a={})),me.displayName="AddMembers";var _e=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).headerId=(0,B.uid)(),n.setInputRef=function(e){n._input=e},n.handleNameChange=function(e){var t=n.state.channelType;(0,C.isGuildTextChannelType)(t)&&(e=(0,re.sanitizeGuildTextChannelName)(e)),n.setState({name:e})},n.handleTypeChange=function(e){var t=e.value,r=n.state.name;(0,C.isGuildTextChannelType)(t)&&(r=(0,re.sanitizeGuildTextChannelName)(r)),t===oe.ChannelTypes.GUILD_STAGE_VOICE&&n.setState({isPrivate:!1}),n.setState({channelType:t,name:r})},n.handlePrivacyChange=function(e){n.setState({isPrivate:e})},n.handleApplicationChange=function(e){n.setState({applicationId:e})},n.handleSKUChange=function(e){n.setState({skuId:e})},n.handleShowBranchesToggle=function(e){n.setState({showBranches:e,branchId:null})},n.handleBranchChange=function(e){n.setState({branchId:e})},n.handleHasBranchesChange=function(e){n.setState({hasBranches:e})},n.handleSubmit=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var r,a,o,i,u,s,d,c,p,v,m,_,g,O,I,b,M,N,A,P,R,L,D;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),r=n.props,a=r.cloneChannel,o=r.categoryId,i=r.user,u=r.memberRoleIds,s=r.isAdmin,d=r.onClose,c=r.owner,p=n.state,v=p.name,m=p.pendingPermissionOverwrites,_=p.channelType,g=p.skuId,O=p.branchId,I=p.isPrivate,null!=(b=n.getGuildId())){e.next=6;break}return e.abrupt("return");case 6:return null!=a?(M=l.default.values(a.permissionOverwrites),N=a.bitrate,A=a.userLimit):_===oe.ChannelTypes.GUILD_ANNOUNCEMENT?M=(0,re.permissionOverwritesForAnnouncement)(b):(I&&(M=(0,re.permissionOverwritesForRoles)(b,_,[],!0),(P=(0,E.extractPermissionOverwrites)(m,_)).length>0&&(M=M.concat(P)),R=!!c&&i.id===c.id,M.some((function(e){return u.has(e.id)}))||s||R||M.push((0,re.permissionOverwriteForUser)(i.id,_))),_===oe.ChannelTypes.GUILD_STAGE_VOICE&&(M=[],Object.values(m).forEach((function(e){var t=e.row;t.id&&(t.rowType===h.RowType.ROLE?M.push((0,T.createModeratorOverwrite)(t.id,y.PermissionOverwriteType.ROLE)):t.rowType===h.RowType.MEMBER&&M.push((0,T.createModeratorOverwrite)(t.id,y.PermissionOverwriteType.MEMBER)))})))),n.setState({errors:{}}),e.prev=8,e.next=11,f.default.createChannel(b,_,v,M,N,A,_!==oe.ChannelTypes.GUILD_CATEGORY?o:null,g,O);case 11:if(null!=(L=e.sent)&&201===L.status){e.next=14;break}return e.abrupt("return");case 14:D=L.body,(0,C.isGuildTextChannelType)(_)&&(0,S.transitionToGuild)(D.guild_id,D.id),d(),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),n.setState({errors:e.t0.body});case 22:case"end":return e.stop()}}),e,null,[[8,19]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){fe(o,r,a,i,l,"next",e)}function l(e){fe(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();var r=t.channelType,o=t.cloneChannel;return n.state={channelType:r||oe.ChannelTypes.GUILD_TEXT,name:null!=o?(0,_.computeChannelName)(o,L.default,R.default):"",pendingPermissionOverwrites:{},isPrivate:!1,prevGuildId:t.guildId,applicationId:null,skuId:null,branchId:null,showBranches:!1,hasBranches:!1,slide:a.CHANNEL_INFO,errors:{}},n.handlePermissionOverwriteChange=n.handlePermissionOverwriteChange.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ce(t,n);var d=r.prototype;return d.componentDidMount=function(){var e=this._input;null!=e&&e.select();var t=this.props,n=t.guildId,r=t.applications;t.canCreateStoreChannel&&null==r&&c.default.fetchApplications(n),m.default.trackWithMetadata(oe.AnalyticEvents.OPEN_MODAL,{type:"Create Channel"})},d.componentDidUpdate=function(e,t){!t.isPrivate&&this.state.isPrivate&&this.state.channelType===oe.ChannelTypes.GUILD_ANNOUNCEMENT&&this.setState({channelType:oe.ChannelTypes.GUILD_TEXT}),!t.isPrivate&&this.state.isPrivate&&m.default.trackWithMetadata(oe.AnalyticEvents.OPEN_MODAL,{type:"Create Private Channel"})},d.getGuildId=function(e){return void 0===e&&(e=this.props),e.guildId},d.canSubmit=function(){var e=this.props,t=e.canViewChannels,n=e.canConnect,r=this.state,a=r.isPrivate,o=r.channelType,i=r.skuId;return""!==r.name&&(!(a&&!(0,E.canCreatePrivateChannel)(o,t,n))&&(o!==oe.ChannelTypes.GUILD_STORE||null!=i))},d.getIconComponent=function(){var e=this.state,t=e.isPrivate,n=e.channelType;switch(n){case oe.ChannelTypes.GUILD_TEXT:return t?Y.default:W.default;case oe.ChannelTypes.GUILD_VOICE:return t?q.default:Z.default;case oe.ChannelTypes.GUILD_STORE:return J.default;case oe.ChannelTypes.GUILD_ANNOUNCEMENT:return $.default;case oe.ChannelTypes.GUILD_STAGE_VOICE:return X.default;default:return(0,C.isGuildTextChannelType)(n)?W.default:s.NOOP_NULL}},d.renderHeader=function(){var e,t,n=this.props,r=n.cloneChannel,a=n.categoryId,o=n.onClose,i=this.state,l=i.channelType,u=i.isPrivate;if(e=null!=r?ie.default.Messages.CLONE_CHANNEL:l===oe.ChannelTypes.GUILD_CATEGORY?ie.default.Messages.CREATE_CATEGORY:l===oe.ChannelTypes.GUILD_TEXT?u?ie.default.Messages.CREATE_PRIVATE_TEXT_CHANNEL:ie.default.Messages.CREATE_TEXT_CHANNEL:l===oe.ChannelTypes.GUILD_STORE?ie.default.Messages.CREATE_STORE_CHANNEL:l===oe.ChannelTypes.GUILD_ANNOUNCEMENT?ie.default.Messages.CREATE_NEWS_CHANNEL:l===oe.ChannelTypes.GUILD_STAGE_VOICE?ie.default.Messages.CREATE_STAGE_CHANNEL:u?ie.default.Messages.CREATE_PRIVATE_VOICE_CHANNEL:ie.default.Messages.CREATE_VOICE_CHANNEL,null!=a){var s=b.default.getChannel(a);t=pe(ne.default,{size:ne.default.Sizes.SIZE_12,className:le.default.subtitle},void 0,ie.default.Messages.IN_CATEGORY.format({categoryName:s?s.name:""}))}return pe(Q.ModalHeader,{separator:!1,direction:w.default.Direction.VERTICAL,align:w.default.Align.CENTER,className:le.default.header},void 0,pe(ee.default,{tag:ee.default.Tags.H2,size:ee.default.Sizes.SIZE_24,className:le.default.modalTitle},void 0,e),pe(ne.default,{size:ne.default.Sizes.SIZE_16,color:ne.default.Colors.HEADER_SECONDARY,className:le.default.headerSubtitle},void 0,t),pe(Q.ModalCloseButton,{onClick:o,className:le.default.closeButton}))},d.renderName=function(){var e,t,n=this.props,r=n.cloneChannel,a=n.channelType,o=this.state.errors;null!=o.name&&(e=pe(ne.default,{size:ne.default.Sizes.SIZE_12,color:ne.default.Colors.STATUS_RED,className:le.default.error},void 0,o.name)),null!=r&&(t=pe(x.default,{className:le.default.cloneInfo,type:x.default.Types.DESCRIPTION},void 0,ie.default.Messages.CLONE_CHANNEL_HELP.format({name:(0,_.computeChannelName)(r,L.default,R.default,!0)})));var i,l=a===oe.ChannelTypes.GUILD_CATEGORY;i=l?ie.default.Messages.CATEGORY_NAME:ie.default.Messages.FORM_LABEL_CHANNEL_NAME;var u=this.getIconComponent();return pe(H.default,{title:i,titleClassName:le.default.sectionTitle,className:le.default.name},void 0,pe(F.default,{value:this.state.name,onChange:this.handleNameChange,inputRef:this.setInputRef,maxLength:100,placeholder:l?ie.default.Messages.CATEGORY_NAME_PLACEHOLDER:ie.default.Messages.CHANNEL_NAME_PLACEHOLDER,className:le.default.inputWrapper,inputClassName:l?null:le.default.inputInner,prefixElement:l?null:pe(u,{className:le.default.inputPrefix,width:16,height:16}),autoFocus:!0}),e,t)},d.renderType=function(){var e=this.props,t=e.cloneChannel,n=e.applications,r=e.canCreateStoreChannel,a=e.canCreateAnnouncementChannel,o=e.canCreateStageChannel,i=this.state,l=i.channelType,u=i.isPrivate;if(null==t&&l!==oe.ChannelTypes.GUILD_CATEGORY){var s=null!=n&&n.length>0;return pe(H.default,{title:ie.default.Messages.CHANNEL_TYPE,titleClassName:le.default.sectionTitle,className:le.default.type},void 0,pe(k.default,{options:ye(u,r&&s,a,o),value:l,onChange:this.handleTypeChange}))}},d.renderChannelTypeDescription=function(e){var t;return e===oe.ChannelTypes.GUILD_ANNOUNCEMENT&&(t=ie.default.Messages.FORM_HELP_NEWS.format({documentationLink:ae.default.getArticleURL(oe.HelpdeskArticles.ANNOUNCEMENT_CHANNELS)})),null==t?null:pe(x.default,{className:le.default.channelTypeDescription,type:x.default.Types.DESCRIPTION},void 0,t)},d.renderStoreOptions=function(){var e=this.props.applications,t=this.state,n=t.applicationId,r=t.skuId,a=t.branchId,i=t.showBranches,l=t.hasBranches;if(null==e||0===e.length)throw new Error("Unexpected empty applications");return pe("div",{},void 0,pe(V.default,{tag:V.default.Tags.H5},void 0,ie.default.Messages.CREATE_STORE_CHANNEL_APPLICATION),pe(te.SingleSelect,{options:e.map((function(e){return{label:e.name,value:e.id}})),placeholder:ie.default.Messages.CREATE_STORE_CHANNEL_SELECT_APPLICATION,value:n,onChange:this.handleApplicationChange,className:le.default.storeChannelOptionSelector}),null!=n?pe(o.Fragment,{},void 0,pe(V.default,{tag:V.default.Tags.H5},void 0,ie.default.Messages.CREATE_STORE_CHANNEL_SKU),pe(v.default,{applicationId:n,onChange:this.handleSKUChange,selectedSkuId:r,className:le.default.storeChannelOptionSelector},n)):null,null!=n&&l?pe(G.default,{hideBorder:!0,onChange:this.handleShowBranchesToggle,value:i,note:ie.default.Messages.CREATE_STORE_CHANNEL_BETA_NOTE.format({devPortalUrl:oe.MarketingURLs.API_DOCS_GAME_AND_SERVER_MANAGEMENT})},void 0,pe(z.default,{className:le.default.switchIcon}),ie.default.Messages.CREATE_STORE_CHANNEL_BETA_TITLE):null,null!=n?pe(o.Fragment,{},void 0,i?pe(V.default,{tag:V.default.Tags.H5},void 0,ie.default.Messages.CREATE_STORE_CHANNEL_BRANCH):null,pe(p.default,{applicationId:n,onChange:this.handleBranchChange,selectedBranchId:a,hide:!i,onHasBranchesChange:this.handleHasBranchesChange,className:le.default.storeChannelOptionSelector},n)):null)},d.renderPrivacyOptions=function(){var e=this.props.cloneChannel,t=this.state,n=t.channelType,r=t.isPrivate;if(null!=e||n===oe.ChannelTypes.GUILD_ANNOUNCEMENT)return null;var a=ie.default.Messages.PRIVATE_CHANNEL,o=ie.default.Messages.CHANNEL_PERMISSIONS_PRIVATE_CHANNEL_DESCRIPTION;return n===oe.ChannelTypes.GUILD_CATEGORY?(a=ie.default.Messages.PRIVATE_CATEGORY,o=ie.default.Messages.CHANNEL_PERMISSIONS_PRIVATE_CATEGORY_DESCRIPTION):n===oe.ChannelTypes.GUILD_VOICE&&(o=ie.default.Messages.CHANNEL_PERMISSIONS_PRIVATE_CHANNEL_DESCRIPTION_VOICE),pe(H.default,{},"privacy-switch",pe(G.default,{hideBorder:!0,onChange:this.handlePrivacyChange,value:r,note:o},void 0,pe(K.default,{className:le.default.switchIcon}),a))},d.renderError=function(e){var t,n,r=this.state,a=r.channelType,o=r.isPrivate,l=r.errors,u=this.props,s=u.canConnect,d=u.canViewChannels;if(Object.values(l).length>0){if(l.message)t=l.message;else if(e||null==l.name){var f=Object.values(l)[0];f.length>0&&(t=f)}}else o&&!(0,E.canCreatePrivateChannel)(a,d,s)&&(t=(0,E.getPrivateChannelHintText)(a));if(null!=t)return pe("div",{className:(0,i.default)(le.default.createError,(n={},n[le.default.addMemberError]=e,n))},void 0,pe(j.default,{messageType:j.HelpMessageTypes.ERROR},void 0,t))},d.renderFooter=function(){var e,t=this,n=this.props,r=n.channelType,o=n.onClose,i=this.state.channelType,l=this.state.isPrivate;e=r===oe.ChannelTypes.GUILD_CATEGORY?ie.default.Messages.CREATE_CATEGORY:ie.default.Messages.CREATE_CHANNEL;var u=l||i===oe.ChannelTypes.GUILD_STAGE_VOICE;return pe(Q.ModalFooter,{},void 0,u?pe(D.default,{type:"button",onClick:function(){t.setState({slide:a.ADD_MEMBERS})},disabled:!this.canSubmit()},void 0,ie.default.Messages.NEXT):pe(D.default,{type:"submit",disabled:!this.canSubmit()},void 0,e),pe(D.default,{onClick:o,look:D.default.Looks.LINK,color:D.default.Colors.PRIMARY},void 0,ie.default.Messages.CANCEL))},d.renderAddMemberFooter=function(){var e,t=this,n=this.props.channelType,r=this.state.pendingPermissionOverwrites;return e=0===Object.keys(r).length?ie.default.Messages.SKIP:n===oe.ChannelTypes.GUILD_CATEGORY?ie.default.Messages.CREATE_CATEGORY:ie.default.Messages.CREATE_CHANNEL,pe(Q.ModalFooter,{},void 0,pe(D.default,{type:"submit",disabled:!this.canSubmit()},void 0,e),pe(D.default,{onClick:function(){t.setState({slide:a.CHANNEL_INFO})},look:D.default.Looks.LINK,color:D.default.Colors.PRIMARY},void 0,ie.default.Messages.BACK))},d.handlePermissionOverwriteChange=function(e){this.setState({pendingPermissionOverwrites:e})},d.renderCreateChannelContent=function(){var e=this.state.channelType;return o.createElement(o.Fragment,null,this.renderHeader(),pe(Q.ModalContent,{className:le.default.modalContent},void 0,this.renderType(),this.renderName(),e===oe.ChannelTypes.GUILD_STORE?this.renderStoreOptions():null,this.renderChannelTypeDescription(e),e===oe.ChannelTypes.GUILD_STAGE_VOICE?null:this.renderPrivacyOptions()),this.renderError(),this.renderFooter())},d.renderAddMemberSlideContent=function(){var e=this.state,t=e.name,n=e.channelType,r=this.props,a=r.guildId,i=r.onClose,l=this.getIconComponent(),u=n===oe.ChannelTypes.GUILD_STAGE_VOICE;return o.createElement(o.Fragment,null,pe(Q.ModalHeader,{separator:!1,direction:w.default.Direction.VERTICAL,align:w.default.Align.CENTER,className:le.default.header},void 0,pe(ee.default,{tag:ee.default.Tags.H2,size:ee.default.Sizes.SIZE_24,style:{fontWeight:700}},void 0,u?ie.default.Messages.CHANNEL_PERMISSIONS_ADD_MODERATOR_TITLE:ie.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE),pe(ne.default,{size:ne.default.Sizes.SIZE_16,color:ne.default.Colors.HEADER_SECONDARY,className:le.default.headerSubtitle},void 0,pe(l,{height:16,width:16,className:le.default.headerSubtitleIcon}),t),pe(Q.ModalCloseButton,{onClick:i,className:le.default.closeButton})),this.renderError(!0),pe(me,{onChange:this.handlePermissionOverwriteChange,guildId:a,channelType:n}),this.renderAddMemberFooter())},d.renderSlides=function(){var e=this.state.slide,t={impression_group:u.ImpressionGroups.CHANNEL_ADD_FLOW};return pe("div",{},void 0,pe(U.Slides,{activeSlide:e,width:440},void 0,pe(U.Slide,{id:a.CHANNEL_INFO,impressionName:u.ImpressionNames.CHANNEL_ADD_INFO,impressionMetadata:t},void 0,this.renderCreateChannelContent()),pe(U.Slide,{id:a.ADD_MEMBERS,impressionName:u.ImpressionNames.CHANNEL_ADD_MEMBERS,impressionMetadata:t},void 0,this.renderAddMemberSlideContent())))},d.render=function(){var e=this.props.transitionState;return pe("form",{onSubmit:this.handleSubmit},void 0,pe(Q.ModalRoot,{transitionState:e,className:le.default.modal,"aria-labelledby":this.headerId},void 0,this.renderSlides()))},r}(o.PureComponent);_e.displayName="CreateChannel";var he=o.forwardRef((function(e,t){var n=e.channelType,r=e.guildId,a=e.cloneChannelId,i=(0,d.useStateFromStoresObject)([A.default,L.default,P.default,b.default,M.default,N.default],(function(){var e,t,o,i=A.default.getGuild(r),l=L.default.getCurrentUser(),u=null!=i&&null!=i.ownerId?L.default.getUser(i.ownerId):null,s=new Set(null!==(e=null===(t=N.default.getMember(r,l.id))||void 0===t?void 0:t.roles)&&void 0!==e?e:[]),d=P.default.can(oe.Permissions.ADMINISTRATOR,i),f=b.default.getChannel(a);return{applications:M.default.getApplicationsForGuild(r),canCreateStoreChannel:null!=i&&i.hasFeature(oe.GuildFeatures.COMMERCE),canCreateAnnouncementChannel:null!=i&&i.hasFeature(oe.GuildFeatures.NEWS),user:l,owner:u,memberRoleIds:s,canViewChannels:P.default.can(oe.Permissions.VIEW_CHANNEL,i),canConnect:P.default.can(oe.Permissions.CONNECT,i),isAdmin:d,cloneChannel:f,channelType:null!==(o=null==f?void 0:f.type)&&void 0!==o?o:n,canManageRoles:P.default.can(oe.Permissions.MANAGE_ROLES,i),canManageChannels:P.default.can(oe.Permissions.MANAGE_CHANNELS,i)}})),l=i.canManageRoles,u=i.canManageChannels,s=(0,I.useGuildEligibleForStageChannels)(r)&&l&&u;return o.createElement(_e,ve({},e,i,{canCreateStageChannel:s,ref:t}))}));t.default=he},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateRoleSort=function(e){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_SORT_UPDATE,roles:e})},t.init=function(){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_INIT})},t.updateRolePermissions=function(e,t,n){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_UPDATE_PERMISSIONS,id:e,flag:t,allow:n})},t.updateRolePermissionSet=function(e,t){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_UPDATE_PERMISSION_SET,id:e,permissions:t})},t.clearRolePermissions=function(e){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_CLEAR_PERMISSIONS,id:e})},t.updateRoleName=function(e,t){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_UPDATE_NAME,id:e,name:t})},t.updateRoleColor=function(e,t){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_UPDATE_COLOR,id:e,color:t})},t.toggleRoleSettings=function(e,t,n){r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_UPDATE_SETTINGS,id:e,hoist:t,mentionable:n})},t.saveRoleSettings=function(e,t,n){return r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_SUBMITTING}),new Promise((function(r){var o=function n(){if(null==t||0===t.length)return r();var o=t.pop();if(null==o||""===o.name)return n();a.default.updateRole(e,o.id,o.name,o.permissions,o.color,o.hoist,o.mentionable).then(n,n)};null!=n&&n.length>0?a.default.batchRoleUpdate(e,n).then(o,o):o()})).then((function(){return r.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_ROLES_SAVE_SUCCESS})}))};var r=i(n(2)),a=i(n(199)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={},u={};var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.getRoleMemberCount=function(e){return null!=e?l[e]:null},a.shouldFetch=function(e){if(null==e)return!1;var t=u[e];return null==t||Date.now()-t>12e4},r}(r.default.Store))(a.default,{GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS:function(e){var t=e.guildId,n=e.roleMemberCount;l[t]=n,u[t]=Date.now()},GUILD_ROLE_MEMBER_BULK_ADD:function(e){var t=e.guildId,n=e.roleId,r=e.added,a=l[t];if(null==a)return!1;if(null==a[n])return!1;var o=Object.keys(r).length;a[n]+=o},GUILD_ROLE_MEMBER_ADD:function(e){var t=e.guildId,n=e.roleId,r=l[t];return null!=r&&(null!=r[n]&&void(r[n]=r[n]+1))},GUILD_ROLE_MEMBER_REMOVE:function(e){var t=e.guildId,n=e.roleId,r=l[t];return null!=r&&(null!=r[n]&&void(r[n]=Math.max(r[n]-1,0)))},GUILD_ROLE_CREATE:function(e){var t=e.guildId,n=e.role;null==l[t]&&(l[t]={}),l[t][n.id]=0},GUILD_DELETE:function(e){var t=e.guild;delete l[t.id],delete u[t.id]}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updatePartnerApplication=function(e,t){a.default.dispatch({type:o.ActionTypes.PARTNER_APPLICATION_UPDATE,guildId:e,updates:t})},t.submitPartnerApplication=function(e,t){return s.apply(this,arguments)},t.fetchPartnerRequirements=function(e){return d.apply(this,arguments)};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}function s(){return(s=u(regeneratorRuntime.mark((function e(t,n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=n&&t===n.guildId){e.next=2;break}return e.abrupt("return");case 2:return a.default.dispatch({type:o.ActionTypes.PARTNER_APPLICATION_SUBMIT,guildId:t}),i={guild_id:n.guildId,partner_type:n.serverType,invite_url:n.inviteUrl,website:n.website,primary_category_id:n.primaryCategoryId,secondary_category_ids:n.secondaryCategoryIds,community_description:n.description,why_you:n.whyYou,first_name:n.firstName,last_name:n.lastName,country:n.country,primary_language:n.language,primary_platform:n.platform,primary_platform_other:n.platform,survey:n.survey,survey_other:n.surveyOther},n.connectedAccounts.forEach((function(e){var t=e.type;i[t+"_id"]=e.id})),e.prev=5,e.next=8,r.default.post({url:o.Endpoints.PARTNERS_APPLY,body:i,oldFormErrors:!0});case 8:return a.default.dispatch({type:o.ActionTypes.PARTNER_APPLICATION_SUBMIT_SUCCESS,guildId:t}),e.abrupt("return",!0);case 12:return e.prev=12,e.t0=e.catch(5),a.default.dispatch({type:o.ActionTypes.PARTNER_APPLICATION_SUBMIT_FAILURE,guildId:t,error:null===e.t0||void 0===e.t0?void 0:e.t0.body}),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[5,12]])})))).apply(this,arguments)}function d(){return(d=u(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:o.ActionTypes.PARTNER_REQUIREMENTS_FETCH_START,guildId:t}),e.prev=1,e.next=4,r.default.get({url:o.Endpoints.PARTNER_REQUIREMENTS(t),oldFormErrors:!0});case 4:n=e.sent,a.default.dispatch({type:o.ActionTypes.PARTNER_REQUIREMENTS_FETCH_SUCCESS,guildId:t,checklist:n.body}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),a.default.dispatch({type:o.ActionTypes.PARTNER_REQUIREMENTS_FETCH_FAILURE,guildId:t});case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EMPTY_APPLICATION=void 0;var r=s(n(3)),a=s(n(2)),o=s(n(1258)),i=s(n(86)),l=s(n(8521)),u=s(n(107));n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){return(f=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}).apply(this,arguments)}var c={guildId:null,inviteUrl:"",description:"",whyYou:"",serverType:null,primaryCategoryId:null,secondaryCategoryIds:null,website:"",firstName:"",lastName:"",country:null,platform:null,connectedAccounts:[],otherPlatform:"",errors:null,survey:null,surveyOther:""};t.EMPTY_APPLICATION=c;var p=!1,v={};function y(){var e,t,n,r=u.default.getGuildId(),a=null!=r?null===(e=i.default.getDefaultChannel(r))||void 0===e?void 0:e.id:null,s=null!=a?null===(t=l.default.getInvite(a))||void 0===t?void 0:t.code:null;if(null==r)return!1;var d=null!==(n=v[r])&&void 0!==n?n:f({},c,{guildId:r});return""===d.inviteUrl&&null!=s&&(v[r]=f({},d,{inviteUrl:(0,o.default)(s)}),!0)}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.initialize=function(){this.syncWith([l.default],y)},a.getApplication=function(e){return v[e]},a.isSubmitting=function(){return p},r}(r.default.Store))(a.default,{PARTNER_APPLICATION_UPDATE:function(e){var t,n=e.guildId,r=e.updates,a=null!==(t=v[n])&&void 0!==t?t:c;v[n]=f({},a,{},r)},PARTNER_APPLICATION_SUBMIT:function(e){var t,n=e.guildId;(null!==(t=v[n])&&void 0!==t?t:c).errors=null,p=!0},PARTNER_APPLICATION_SUBMIT_SUCCESS:function(e){var t=e.guildId;p=!1,delete v[t]},PARTNER_APPLICATION_SUBMIT_FAILURE:function(e){var t,n=e.guildId,r=e.error;p=!1,(null!==(t=v[n])&&void 0!==t?t:c).errors=r}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeChannelSortable=function(e){return(0,a.DropTarget)("DRAGGABLE_GUILD_CHANNEL",{drop:function(e,t){var n=t.getItem(),a=(0,v.getDropData)(s.default.getChannel(n.id),n.position,e.channel,e.position,n.channelList);if(null!=a){var l=s.default.getChannel(n.id);if(null!=l){var u=e.channel.getGuildId(),_=d.default.getCategories(u),h=f.default.getGuild(u);if(null!=h){var g,S=(0,v.getDnDUpdates)(l,s.default.getChannel(a.referenceId),a.parentId,_);if(0!==S.length)if(S=S.filter((function(e){var t=e.id,n=s.default.getChannel(t);if(null==n)return!1;var r=s.default.getChannel(n.parent_id);return n.type===m.ChannelTypes.GUILD_CATEGORY||null==r?c.default.can(m.Permissions.MANAGE_CHANNELS,h):c.default.can(m.Permissions.MANAGE_CHANNELS,r)})),l.parent_id!==a.parentId&&S.find((function(e){if(e.id!==l.id)return!1;var t=s.default.getChannel(e.parent_id);if(!(null!=t&&c.default.can(m.Permissions.MANAGE_ROLES,l)&&c.default.can(m.Permissions.MANAGE_ROLES,t)))return!0;var n=y.default.areChannelsLocked(l,t),r=y.default.areChannelsLocked(l,s.default.getChannel(l.parent_id));return(null==l.parent_id&&!n||r&&!n)&&(g=e),!0})),null!=g){var O=s.default.getChannel(g.parent_id);null!=O&&(0,p.openModal)((function(e){return r.createElement(i.default,E({},e,{channel:l,category:O,onConfirm:function(){null!=g&&(g.lock_permissions=!0,o.default.batchChannelUpdate(u,S))},onCancel:function(){null!=g&&o.default.batchChannelUpdate(u,S)}}))}))}else o.default.batchChannelUpdate(u,S)}}}},canDrop:function(e,t){var n=t.getItem(),r=s.default.getChannel(n.id);if(null==r)return!1;var a=(0,v.getDropData)(s.default.getChannel(n.id),n.position,e.channel,e.position,n.channelList),o=f.default.getGuild(n.guildId);if(null==a||null==o)return!1;var i=s.default.getChannel(a.parentId),l=s.default.getChannel(r.parent_id),u=c.default.can(m.Permissions.MANAGE_CHANNELS,o),d=null!=l?c.default.can(m.Permissions.MANAGE_CHANNELS,l):u,p=null!=i?c.default.can(m.Permissions.MANAGE_CHANNELS,i):u;return d&&p}},(function(e,t){var n=t.getItem();return null==n||null==n.isChannelDrag?{connectChannelDropTarget:e.dropTarget(),sorting:!1,sortingType:null,sortingPosition:null,sortingParent:null}:{connectChannelDropTarget:e.dropTarget(),sorting:!0,sortingType:n.type,sortingPosition:t.isOver()&&t.canDrop()?n.position:null,sortingParent:t.isOver()&&t.canDrop()?n.parent:null}}))((0,a.DragSource)("DRAGGABLE_GUILD_CHANNEL",{canDrag:function(e){var t=e.channel,n=f.default.getGuild(t.getGuildId());if(null==n)return!1;if(t.type===m.ChannelTypes.GUILD_CATEGORY)return c.default.can(m.Permissions.MANAGE_CHANNELS,n);var r=s.default.getChannel(t.parent_id);return null!=r&&c.default.can(m.Permissions.MANAGE_CHANNELS,r)||null==r&&c.default.can(m.Permissions.MANAGE_CHANNELS,n)},beginDrag:function(e){var t=e.channel,n=t.id,r=t.parent_id,a=t.guild_id,o=t.type,i=e.position,s=d.default.getCategories(a);return{isChannelDrag:!0,id:n,position:i,parentId:r,type:o,channelList:(0,l.default)(s._categories,s,(function(e){var t=e.channel;return t.type===m.ChannelTypes.GUILD_CATEGORY&&s[t.id]&&0===s[t.id].length?c.default.can(m.Permissions.MANAGE_CHANNELS,t)&&c.default.can(m.Permissions.VIEW_CHANNEL,t):!u.default.isCollapsed(t.parent_id)})),guildId:a}}},(function(e){return{connectChannelDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}}))(e))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(5941),o=_(n(199)),i=_(n(9191)),l=_(n(1282)),u=_(n(1212)),s=_(n(10)),d=_(n(1252)),f=_(n(15)),c=_(n(40)),p=n(41),v=n(9024),y=_(n(78)),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(){return(E=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=n(122),i=l(n(7799));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=Object.freeze({tension:400,friction:30}),f=Object.freeze({opacity:0,height:8,x:-4});function c(e){var t=e.selected,n=void 0!==t&&t,r=e.hovered,l=void 0!==r&&r,u=e.unread,c=void 0!==u&&u,p=e.className,v={opacity:1,height:n?40:l?20:8,x:0},y=(0,o.useTransition)(n||l||c,{config:d,keys:function(e){return e?"pill":"empty"},immediate:!l&&!document.hasFocus(),initial:n||l||c?v:null,from:f,leave:f,enter:v,update:v});return s("div",{className:(0,a.default)(p,i.default.wrapper),"aria-hidden":!0},void 0,y((function(e,t){return t&&s(o.animated.span,{className:i.default.item,style:e})})))}c.displayName="AnimatedHalfPill"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=n(10435),l=p(n(10436)),u=n(122),s=p(n(98)),d=n(57),f=p(n(469)),c=p(n(7800));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h={friction:13,tension:240,duration:150},E={duration:150,friction:3},g={friction:30,tension:900,mass:1},S={duration:150,friction:10,tension:100,mass:1},O=(0,i.interpolate)("M48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24Z","M0 24C0 16.5449 0 12.8174 1.21793 9.87706C2.84183 5.95662 5.95662 2.84183 9.87706 1.21793C12.8174 0 16.5449 0 24 0C31.4551 0 35.1826 0 38.1229 1.21793C42.0434 2.84183 45.1582 5.95662 46.7821 9.87706C48 12.8174 48 16.5449 48 24C48 31.4551 48 35.1826 46.7821 38.1229C45.1582 42.0434 42.0434 45.1582 38.1229 46.7821C35.1826 48 31.4551 48 24 48C16.5449 48 12.8174 48 9.87706 46.7821C5.95662 45.1582 2.84183 42.0434 1.21793 38.1229C0 35.1826 0 31.4551 0 24Z",{maxSegmentLength:1.5}),I=function(e){function t(){return e.apply(this,arguments)||this}m(t,e);var n=t.prototype;return n.componentDidMount=function(){this.forceUpdate()},n.componentWillAppear=function(e){e()},n.componentWillEnter=function(e){e()},n.componentWillLeave=function(e){this.timeoutId=setTimeout(e,300)},n.componentWillUnmount=function(){clearTimeout(this.timeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,r=e.animatedStyle;return y(u.animated.div,{className:n,style:r},void 0,t)},t}(a.Component);function T(e){var t=e.selected,n=e.upperBadge,r=e.lowerBadge;return t||null!=n||null!=r}I.displayName="BadgeContainer";var C=y("rect",{width:"150%",height:"150%",x:"-25%",y:"-25%",fill:"white"}),b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).timeout=new d.Timeout,t.state={renderComplex:!1,hasRenderedBadge:!1,maskId:s.default.v4(),focused:!1},t.handleTimeout=function(){t.timeout.stop(),t.setState({renderComplex:!1})},t.handleFocus=function(){t.setState({focused:!0})},t.handleBlur=function(){t.setState({focused:!1})},t}m(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.hasRenderedBadge,r=t.upperBadgeMask,a=t.lowerBadgeMask,o=t.borderRadiusMask,i=t.renderComplex,l=e.upperBadge,s=e.lowerBadge,d=!1;return(null!=l&&null==r||null!=s&&null==a)&&(d=!0,n=!0,r=new u.Controller({spring:0}),a=new u.Controller({spring:0})),T(e)&&null==o&&(d=!0,o=new u.Controller({spring:0})),!i&&T(e)&&(d=!0,i=!0),d?{hasRenderedBadge:n,lowerBadgeMask:a,upperBadgeMask:r,borderRadiusMask:o,renderComplex:i}:null};var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.selected,n=e.lowerBadge,r=e.upperBadge,a=this.state,o=a.borderRadiusMask,i=a.lowerBadgeMask,l=a.upperBadgeMask;null==o||o.update({spring:t?1:0,immediate:!0}).start(),null==i||i.update({spring:null!=n?1:0,immediate:!0}).start(),null==l||l.update({spring:null!=r?1:0,immediate:!0}).start()},n.componentWillUnmount=function(){var e=this.state,t=e.borderRadiusMask,n=e.lowerBadgeMask,r=e.upperBadgeMask;null==t||t.dispose(),null==n||n.dispose(),null==r||r.dispose()},n.componentDidUpdate=function(e){var t=this.props,n=t.selected,r=t.lowerBadge,a=t.upperBadge,o=this.state,i=o.borderRadiusMask,u=o.lowerBadgeMask,s=o.upperBadgeMask,d=o.renderComplex;n&&!e.selected?null==i||i.update({spring:1,immediate:!1,config:h}).start():!n&&e.selected&&(null==i||i.update({spring:0,immediate:!1,config:E}).start()),null!=r&&null==e.lowerBadge?null==u||u.update({spring:1,immediate:!document.hasFocus(),config:g}).start():null==r&&null!=e.lowerBadge&&(null==u||u.update({spring:0,immediate:!document.hasFocus(),config:S}).start()),null!=a&&null==e.upperBadge?null==s||s.update({spring:1,immediate:!document.hasFocus(),config:g}).start():null==a&&null!=e.upperBadge&&(null==s||s.update({spring:0,immediate:!document.hasFocus(),config:S}).start()),!d||T(this.props)||this.timeout.isStarted()?T(this.props)&&this.timeout.isStarted()&&this.timeout.stop():this.timeout.start((0,l.default)(108e5,18e6),this.handleTimeout)},n.getBadgePositionInterpolation=function(e,t){if(void 0===t&&(t=1),null!=e)return e.springs.spring.to([0,1],[20,0]).to((function(e){return"translate("+e+" "+e*t+")"}))},n.getLowerBadgeStyles=function(){var e=this.state.lowerBadgeMask;if(null!=e){var t=e.springs.spring;return{opacity:t.to([0,.5,1],[0,0,1]),transform:t.to((function(e){return"translate("+(16-16*e)+"px, "+(16-16*e)+"px)"}))}}},n.getUpperBadgeStyles=function(){var e=this.state.upperBadgeMask;if(null!=e){var t=e.springs.spring;return{opacity:t.to([0,.5,1],[0,0,1]),transform:t.to((function(e){return"translate("+(16-16*e)+"px, "+-1*(16-16*e)+"px)"}))}}},n.getPathInterpolation=function(){var e;return null===(e=this.state.borderRadiusMask)||void 0===e?void 0:e.springs.spring.to(O)},n.render=function(){var e,t=this.props,n=t.children,r=t.className,i=t.lowerBadge,l=t.lowerBadgeWidth,s=t.style,d=t.upperBadge,p=this.state,v=p.maskId,m=p.lowerBadgeMask,_=p.upperBadgeMask,h=p.focused,E=p.hasRenderedBadge;if(!p.renderComplex)return y("div",{className:(0,o.default)(r,(e={},e[c.default.wrapperSimple]=!0,e[c.default.simpleFocused]=h,e)),style:s,onFocus:this.handleFocus,onBlur:this.handleBlur},"wrapper",y("svg",{width:48,height:48,viewBox:"0 0 48 48",className:c.default.svg,overflow:"visible"},"svg",y("foreignObject",{mask:"url(#"+v+")",x:0,y:0,width:48,height:48},"foreign-object",n)));var g=v+"-upper_badge_masks",S=v+"-lower_badge_masks",O=v+"-blob_mask",T=v+"-stroke_mask";return y("div",{className:(0,o.default)(r,c.default.wrapper),style:s,onFocus:this.handleFocus,onBlur:this.handleBlur},"wrapper",y("svg",{width:48,height:48,viewBox:"0 0 48 48",className:c.default.svg,overflow:"visible"},"svg",y("defs",{},void 0,y(u.animated.path,{d:this.getPathInterpolation(),id:O}),E?y(u.animated.rect,{id:g,x:28,y:-4,width:24,height:24,rx:12,ry:12,transform:this.getBadgePositionInterpolation(_,-1)}):null,E?y(u.animated.rect,{id:S,x:48-(l+8)+4,y:28,width:l+8,height:24,rx:12,ry:12,transform:this.getBadgePositionInterpolation(m)}):null),y("mask",{id:v,fill:"black",x:0,y:0,width:48,height:48},void 0,y("use",{href:"#"+O,fill:"white"}),E?a.createElement(a.Fragment,null,y("use",{href:"#"+g,fill:"black"}),y("use",{href:"#"+S,fill:"black"})):null),E?y("mask",{id:T},void 0,C,y("use",{href:"#"+g,fill:"black"}),y("use",{href:"#"+S,fill:"black"})):null,h?y(a.Fragment,{},void 0,y("g",{className:c.default.focusStroke,mask:"url(#"+T+")"},void 0,y("use",{href:"#"+O})),y("g",{className:c.default.focusFill},void 0,null!=d?y("use",{href:"#"+g}):null,null!=i?y("use",{href:"#"+S}):null)):null,y("foreignObject",{mask:"url(#"+v+")",x:0,y:0,width:48,height:48},"foreign-object",n)),y(f.default,{component:a.Fragment},void 0,null!=i?y(I,{className:c.default.lowerBadge,animatedStyle:this.getLowerBadgeStyles()},"lower-badge",i):null,null!=d?y(I,{className:c.default.upperBadge,animatedStyle:this.getUpperBadgeStyles()},"upper-badge",d):null))},t}(a.Component);b.displayName="BlobMask",b.defaultProps={selected:!1,lowerBadgeWidth:16};var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configureJoin=function(e){var t=e.getGuildId();null!=t&&o.default.open(t,S.GuildSettingsSections.OVERVIEW)},t.copyId=function(e,t,n){(0,_.copy)(n.shiftKey?t.channel_id+"-"+t.id:t.id)},t.copyLink=function(e,t){(0,_.copy)(location.protocol+"//"+location.host+S.Routes.CHANNEL(e.guild_id,e.id,t.id))},t.deleteMessage=function(e,t,n){t.state===S.MessageStates.SEND_FAILED||n.shiftKey?i.default.deleteMessage(e.id,t.id,t.state===S.MessageStates.SEND_FAILED):u.default.confirmDelete(e,t)},t.editMessage=function(e,t){i.default.startEditMessage(e.id,t.id,t.content)},t.markMessageUnread=function(e,t){(0,E.default)(e.id,t.id)},t.pinMessage=function(e,t,n){if(!1===t.pinned)return void(n.shiftKey?a.default.pinMessage(e,t.id):u.default.confirmPin(e,t));n.shiftKey?a.default.unpinMessage(e,t.id):u.default.confirmUnpin(e,t)},t.publishMessage=function(e,t){(0,d.confirmPublish)(e.id,t.id)},t.retrySendMessage=function(e,t){(0,g.default)(e,t,void 0,h.default.getOptions(t.id))},t.reportMessage=function(e,t){l.default.openReportMessageModal(e,t)},t.showReactionsModal=function(e,t){(0,y.openModal)((function(e){return r.createElement(s.default,T({},e,{message:t}))}))},t.speakMessage=function(e,t){i.default.speakMessage(e.id,t.id)},t.stopSpeakingMessage=function(){i.default.stopSpeakingMessage()},t.replyToMessage=function(e,t,n){var r=e.isPrivate(),a=null!=t.webhookId,o=t.author.id===p.default.getId();(0,f.createPendingReply)({channel:e,message:t,shouldMention:!n.shiftKey&&!a&&!o,showMentionToggle:!r&&!a&&!o}),m.ComponentDispatch.dispatchToLastSubscribed(S.ComponentActions.TEXTAREA_FOCUS)},t.createThread=function(e,t){c.default.openThreadSidebarForCreating(e,t,"Message")},t.gotoThread=function(e,t){var n=v.default.getChannel(t.id);null!=n&&c.default.openThreadSidebarForViewing(n)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=O(n(8581)),o=O(n(8254)),i=O(n(390)),l=O(n(8495)),u=O(n(8487)),s=O(n(9047)),d=n(8896),f=n(8390),c=O(n(8265)),p=O(n(11)),v=O(n(10)),y=n(41),m=n(121),_=n(1163),h=O(n(9048)),E=O(n(8706)),g=O(n(9049)),S=n(1);function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(){return(T=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SpoilerDisplayContext=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=c(n(9)),l=n(48),u=c(n(61)),s=c(n(149)),d=c(n(6)),f=c(n(7364));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e.TEXT="text",e.ATTACHMENT="attachment",e.EMBED="embed"}(a||(a={}));var m=function(e){var t=e.className;return y("div",{className:(0,i.default)(f.default.spoilerWarning,t)},void 0,d.default.Messages.SPOILER)};m.displayName="SpoilerWarning";var _=o.createContext(!1);t.SpoilerDisplayContext=_;var h=y(m,{}),E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={visible:!1},t.revealSpoiler=function(e){var n=t.state.visible;if(!n){n||e.preventDefault(),t.setState({visible:!0});var r=t.props.onReveal;null!=r&&r()}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var c=r.prototype;return c.renderWithTooltip=function(e){return y(s.default,{position:s.default.Positions.LEFT,text:this.state.visible?null:d.default.Messages.SPOILER_REVEAL},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return o.cloneElement(o.Children.only(e),{onMouseEnter:n,onMouseLeave:r})}))},c.renderSpoilerAttachment=function(){var e=this,t=this.props,n=t.children,r=t.inline,a=this.state.visible,o=y(_.Consumer,{},void 0,(function(t){var o,l=t||a;return y(u.default,{onClick:l?void 0:e.revealSpoiler,"aria-label":l?void 0:d.default.Messages.SPOILER,"aria-expanded":l,className:(0,i.default)((o={},o[f.default.spoilerText]=r,o[f.default.hidden]=!l,o[f.default.spoilerContainer]=!r,o)),role:l?"presentation":"button",tabIndex:l?-1:0},void 0,l||r?null:h,y("div",{"aria-hidden":!l},void 0,n(!l)))}));return r?this.renderWithTooltip(o):o},c.renderSpoilerEmbed=function(){var e=this,t=this.props.children,n=this.state.visible;return y(_.Consumer,{},void 0,(function(r){var a=r||n;return y(u.default,{"aria-label":a?void 0:d.default.Messages.SPOILER,"aria-expanded":a,className:f.default.spoilerContainer,onClick:a?void 0:e.revealSpoiler,role:a?"presentation":"button",tabIndex:a?-1:0},void 0,a?null:y(m,{className:f.default.embed}),y("div",{"aria-hidden":!a},void 0,t(!a)))}))},c.renderSpoilerText=function(){var e=this,t=this.props,n=t.children,r=t.renderTextElement,a=this.state.visible,s=y(_.Consumer,{},void 0,(function(t){var s,c,p=t||a,v=o.Children.toArray(n(p)),m=v.some((function(e){return o.isValidElement(e)&&"pre"===e.type})),_=v.some((function(e){return o.isValidElement(e)&&"blockquote"===e.type}));return c=m||_?o.Children.map(v,(function(e){return o.isValidElement(e)&&null!=e.type?o.cloneElement(e,{"aria-hidden":!p,tabIndex:-1,className:(0,i.default)(null!=e.props?e.props.className:null,f.default.inlineContent)}):null})).filter(l.isNotNullish):y("span",{"aria-hidden":!p,className:f.default.inlineContent},void 0,null!=r?v.map((function(e){return o.isValidElement(e)?r(e,p):e})):v),y(u.default,{tag:"span",onClick:p?void 0:e.revealSpoiler,"aria-label":p?void 0:d.default.Messages.SPOILER,"aria-expanded":p,tabIndex:p?-1:0,role:p?"presentation":"button",className:(0,i.default)(f.default.spoilerText,(s={},s[f.default.hidden]=!p,s[f.default.codeBlock]=m,s[f.default.quoteBlock]=_,s))},void 0,c)}));return this.renderWithTooltip(s)},c.render=function(){var e=this.props.type,t=void 0===e?a.TEXT:e;switch(t){case a.TEXT:return this.renderSpoilerText();case a.ATTACHMENT:return this.renderSpoilerAttachment();case a.EMBED:return this.renderSpoilerEmbed();default:return(0,l.assertNever)(t)}},r}(o.PureComponent);E.displayName="Spoiler",E.Types=a;var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivityEmoji=g,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=n(3),l=m(n(5938)),u=m(n(185)),s=m(n(732)),d=m(n(1334)),f=m(n(39)),c=m(n(149)),p=m(n(8804)),v=n(1),y=m(n(7445));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}function g(e){var t=e.emoji,n=e.className,r=e.animate,s=void 0===r||r,d=e.hideTooltip,p=(0,i.useStateFromStores)([f.default],(function(){return f.default.animateEmoji})),v=null!=t.id?":"+t.name+":":u.default.translateSurrogatesToInlineEmoji(t.name),m={className:(0,o.default)(y.default.emoji,n),emojiId:t.id,emojiName:t.name,autoplay:!0,animated:Boolean(t.animated&&p&&s)};return d?a.createElement(l.default,m):h(c.default,{text:v},void 0,(function(e){return a.createElement(l.default,E({},e,m))}))}var S=function(e){var t=e.className,n=e.text,r=a.useRef(null),i=a.useRef(null),l=a.useState(!1),u=l[0],s=l[1];return a.useLayoutEffect((function(){var e=r.current,t=i.current;if(null!=e&&null!=t){var n=e.clientWidth<t.clientWidth&&e.clientHeight<=t.clientHeight;s(!n)}}),[n]),h(c.default,{text:u||!n?null:n,delay:150,"aria-label":!1},void 0,(function(e){return a.createElement(a.Fragment,null,a.createElement("div",E({},e,{className:t,ref:r}),n),a.createElement("div",{className:(0,o.default)(y.default.textRuler,t),ref:i,"aria-hidden":!0},n))}))};S.displayName="ActivityText";var O=function(e){var t=e.activities,n=e.applicationStream,r=e.className,a=e.textClassName,o=e.emojiClassName,i=e.animate,l=void 0===i||i,u=e.hideTooltip,f=void 0!==u&&u,c=e.hideEmoji,m=void 0!==c&&c,_=null!=t?t.find((function(e){return e.type===v.ActivityTypes.CUSTOM_STATUS})):null,E=null;null==_||null==_.emoji||m||(E=h(g,{emoji:_.emoji,animate:l,hideTooltip:f,className:o}));var O=(0,d.default)(t,n),I=null!=O&&O.length>0;return null!=E||I?h("div",{className:r},void 0,E,h(S,{text:O,className:a}),null!=t&&t.some(s.default)?h(p.default,{width:16,height:16,className:y.default.icon}):null):null};O.displayName="ActivityStatus";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NO_COMMANDS=void 0;var r=i(n(3)),a=i(n(2)),o=n(8279);n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u,s,d,f,c,p=Object.freeze([]);t.NO_COMMANDS=p;var v,y=[];var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getResultCommands=function(e){return e===c?y:p},a.hasResults=function(e,t){return t===c&&(e=e.trimEnd().split(" ")[0].toLocaleLowerCase(),!(null==f||0!==y.length||!e.startsWith(f))||f===e)},r}(r.default.Store))(a.default,{LOGOUT:function(e){return v=void 0,y=[],u=void 0,s=void 0,f=void 0,d=void 0,void(c=void 0)},CHANNEL_SELECT:function(e){var t=e.guildId;if(v===t)return!1;v=t,y=[],u=void 0,s=void 0,f=void 0,d=void 0,c=void 0},GUILD_APPLICATION_COMMANDS_UPDATE:function(e){var t,n=e.applicationCommands;if(e.nonce!==u)return!1;y=(0,o.buildApplicationCommands)(n),f=null===(t=s)||void 0===t?void 0:t.toLocaleLowerCase(),c=d},APPLICATION_COMMAND_QUERY_REQUEST:function(e){var t=e.nonce,n=e.query,r=e.commandTarget;u=t,s=n,d=r}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ApplicationBuyButton=void 0;var r,a=G(n(0)),o=k(n(9)),i=n(394),l=n(3),u=k(n(154)),s=n(8615),d=G(n(5672)),f=n(8344),c=k(n(473)),p=n(8837),v=n(8296),y=k(n(8440)),m=n(42),_=k(n(71)),h=k(n(39)),E=k(n(12)),g=k(n(161)),S=k(n(5826)),O=k(n(8634)),I=k(n(373)),T=k(n(1167)),C=k(n(29)),b=k(n(5828)),M=k(n(149)),N=k(n(5686)),A=k(n(13)),P=n(99),R=k(n(96)),L=n(8366),D=n(1),w=k(n(6)),j=k(n(7546));function k(e){return e&&e.__esModule?e:{default:e}}function U(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return U=function(){return e},e}function G(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=U();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(){return(B=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}).apply(this,arguments)}function H(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){H(o,r,a,i,l,"next",e)}function l(e){H(o,r,a,i,l,"throw",e)}i(void 0)}))}}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){A.default.track(D.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location:e})}var z=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleViewInStore=function(e){var n=t.props,r=n.sku,a=n.skuId,o=n.application,i=n.onClick;if(null==r)throw new Error("Unexpected missing sku");null!=i&&i(e),null!=a?(0,f.goToSKUStoreListing)(r.id,{analyticsSource:t.analyticsLocation,slug:r.slug}):null!=o&&(0,f.goToApplicationStoreListing)(o.id,{analyticsSource:t.analyticsLocation,slug:o.slug})},t.handleClick=function(){var e=x(regeneratorRuntime.mark((function e(n){var r,a,o,l,d,f,v,y,_,h,E,g,S,O,I;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,a=r.isAuthenticated,o=r.applicationId,l=r.sku,d=r.targetSkuId,f=r.entitlementBranchId,v=r.isUserPremium,y=r.onClick,_=r.isInTestMode,h=r.storeListingAnalyticsProperties,E=r.asGift,g=r.forceDistribution,null!=l){e.next=3;break}throw new Error("should not be able to buy without sku");case 3:if(null!=y&&null!=n&&y(n),null==l.externalPurchaseUrl){e.next=7;break}return window.open(l.externalPurchaseUrl),e.abrupt("return");case 7:if(a){e.next=11;break}return S={redirect_to:D.Routes.APPLICATION_STORE_LISTING_SKU(l.id,l.slug)},(0,m.transitionTo)(D.Routes.LOGIN,{search:(0,i.stringify)(S)}),e.abrupt("return");case 11:if(O=null!=f,!l.premium||g||v||_||O){e.next=17;break}Y(t.analyticsLocation),c.default.open(D.UserSettingsSections.PREMIUM),e.next=38;break;case 17:if((l.requiresPayment||g)&&!O){e.next=29;break}return e.prev=18,e.next=21,t.purchaseOrGrantSKU(l);case 21:I=e.sent,(0,s.openPurchaseConfirmationModal)(l.applicationId,l.id,I,{analyticsSource:t.analyticsLocation}),e.next=27;break;case 25:e.prev=25,e.t0=e.catch(18);case 27:e.next=38;break;case 29:if(null==d){e.next=38;break}return e.prev=30,e.next=33,(0,p.openSKUPaymentModal)(o,d,t.analyticsLocation,{promotionId:null!=h?h.promotionId:null,isGift:E});case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(30),e.t1===D.PaymentModalPriceChangedError&&u.default.show({title:w.default.Messages.PAYMENT_PRICE_CHANGE_TITLE,body:w.default.Messages.PAYMENT_PRICE_CHANGE_BODY,confirmText:w.default.Messages.OKAY});case 38:case"end":return e.stop()}}),e,null,[[18,25],[30,35]])})));return function(t){return e.apply(this,arguments)}}(),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,W(t,n);var l,v,_,h=r.prototype;return h.componentDidMount=function(){var e=this.props,t=e.sku,n=e.applicationId,r=e.targetSkuId;null==t&&null!=r&&d.fetchSKU(n,r).catch((function(){}))},h.componentDidUpdate=function(e){this.props.locale!==e.locale&&null!=this.props.targetSkuId&&d.fetchSKU(this.props.applicationId,this.props.targetSkuId).catch((function(){}))},h.purchaseOrGrantSKU=function(){var e=x(regeneratorRuntime.mark((function e(t){var n,r,a,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props,r=n.channelId,a=n.entitlementBranchId,o=n.analyticsContext,null==r||null==a){e.next=6;break}return e.next=4,d.grantChannelBranchEntitlement(t.applicationId,r,t.id);case 4:return i=e.sent,e.abrupt("return",i);case 6:return e.next=8,d.purchaseSKU(t.applicationId,t.id,{analyticsLoadId:o.loadId});case 8:return l=e.sent,e.abrupt("return",l.entitlements);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),h.wrapWithDisabledTooltip=function(e,t){var n=this.props,r=n.className,i=n.tooltipPosition;return F("div",{className:(0,o.default)(j.default.disabledButtonWrapper,r)},void 0,e,F(M.default,{text:t,position:i},void 0,(function(e){return a.createElement("div",B({className:j.default.disabledButtonOverlay},e))})))},h.renderButton=function(e,t){void 0===t&&(t=Object.freeze({}));var n,r=this.props,i=r.isPurchasing,l=r.wrapperClassName,u=r.className,s=r.fullWidth,d=r.size,f=r.isWindowFocused,c=r.color,p=r.customDisabledColor,v=r.pauseAnimation,y=r.isEntitled,m=r.asGift,_=r.sku,h=r.entitlementBranchId,E=r.isInTestMode,g=r.innerClassName,S=!0===y&&(null==_||_.type!==D.SKUTypes.CONSUMABLE),O=null!=h,I=!0===t.disabled||null!=_&&!_.available&&!O&&!E||S&&!m,T=t.disabledTooltipText,M={wrapperClassName:l,className:u,fullWidth:s,size:d,color:I&&null!=p?p:null!=c?c:C.default.Colors.GREEN,hover:this.hover,innerClassName:(0,o.default)(null!=g?g:null,j.default.applicationBuyButton),disabled:I,submitting:i||!0===t.submitting,onClick:null!=t.onClick?t.onClick:this.handleClick};return n=!0===t.useShinyButton?a.createElement(b.default,B({},M,{pauseAnimation:!f||v}),t.buttonIcon,e):a.createElement(C.default,M,t.buttonIcon,e),null!=T?this.wrapWithDisabledTooltip(n,T):n},h.renderFreeButton=function(e,t){var n=this.props,r=n.isEntitled,a=n.isUserPremium,o=n.isInTestMode,i=n.forceDistribution;if(null!=n.entitlementBranchId)return(0,L.canUserInstall)(e)&&!r?this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_INSTALL):this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_ADD_TO_LIBRARY);var l=e.getPrice();return e.premium&&!i&&(a||o)?(0,L.canUserInstall)(e)&&!r?this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_INSTALL,t):this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_ADD_TO_LIBRARY,t):null==l||0!==l.amount||e.premium&&!(0,P.hasFlag)(e.flags,D.SKUFlags.PREMIUM_AND_DISTRIBUTION)?void 0:(0,L.canUserInstall)(e)&&!r?this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_INSTALL):this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_ADD_TO_LIBRARY)},h.render=function(){var e=this.props,t=e.isAuthenticated,n=e.sku,r=e.onStoreListing,a=e.shouldRenderPrice,o=e.forceDistribution,i=e.asGift,l=e.isInTestMode,u={useShinyButton:!0,buttonIcon:F(N.default,{className:j.default.premiumIcon})};if(null==n)return this.renderButton(null,{submitting:!0});if(i)return n.isPreorder()?this.renderButton(w.default.Messages.APPLICATION_STORE_PREORDER_AS_GIFT):this.renderButton(w.default.Messages.APPLICATION_STORE_BUY_AS_GIFT);var s=this.renderFreeButton(n,u);if(null!=s)return s;if(!r)return this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_VIEW_IN_STORE,{onClick:this.handleViewInStore});var d=n.getPrice();return!n.available&&!l||!n.premium&&null==d?this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_UNAVAILABLE,{disabled:!0}):n.restricted?this.renderButton(w.default.Messages.APPLICATION_STORE_BUY,{disabledTooltipText:w.default.Messages.GAME_ACTION_BUTTON_RESTRICTED_IN_REGION}):n.premium&&!o?this.renderButton(w.default.Messages.APPLICATION_STORE_GET_PREMIUM,u):t||null!=n.externalPurchaseUrl?n.isPreorder()?this.renderButton(a?w.default.Messages.APPLICATION_STORE_PREORDER_FOR_PRICE.format({price:(0,y.default)(n,!0,!0)}):w.default.Messages.APPLICATION_STORE_PREORDER):this.renderButton(a?w.default.Messages.APPLICATION_STORE_BUY_FOR_PRICE.format({price:(0,y.default)(n,!0,!0)}):w.default.Messages.APPLICATION_STORE_BUY):this.renderButton(w.default.Messages.GAME_ACTION_BUTTON_LOGIN_TO_BUY)},l=r,(v=[{key:"analyticsLocation",get:function(){var e=this.props,t=e.storeListingAnalyticsProperties,n=e.asGift,r=null!=t?t.promotionId:null;return B({},this.props.analyticsContext.location,{object:D.AnalyticsObjects.BUTTON_CTA,objectType:n?D.AnalyticsObjectTypes.GIFT:D.AnalyticsObjectTypes.BUY,promotionId:r})}},{key:"hover",get:function(){var e=this.props,t=e.hover,n=e.color;return null!=t?t:null!=n?C.default.Hovers.GREEN:C.default.Hovers.DEFAULT}}])&&V(l.prototype,v),_&&V(l,_),r}(a.Component);t.ApplicationBuyButton=z,z.displayName="ApplicationBuyButton",z.defaultProps={tooltipPosition:M.default.Positions.TOP,onStoreListing:!1,shouldRenderPrice:!1,pauseAnimation:!1,asGift:!1,forceDistribution:!1};var K=a.forwardRef((function(e,t){var n=e.entitlementBranchId,r=e.applicationId,o=e.channelId,i=e.skuId,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["entitlementBranchId","applicationId","channelId","skuId"]),s=(0,l.useStateFromStores)([T.default],(function(){return T.default.inTestModeForApplication(r)})),d=(0,l.useStateFromStoresArray)([_.default,E.default,I.default,S.default],(function(){var e=_.default.getGame(r),t=E.default.getNullableCurrentUser(),a=null==i&&null!=e?e.destinationSkuId:i,o=null!=a?I.default.get(a):null,l=null!=n?n:r;return[e,t,o,null!=a?S.default.isEntitledToSku(t,a,r,l):null,R.default.canInstallPremiumApplications(t),a]})),f=d[0],c=d[1],p=d[2],y=d[3],m=d[4],C=d[5],b=(0,l.useStateFromStores)([g.default],(function(){return g.default.isFocused()})),M=(0,l.useStateFromStores)([O.default],(function(){return O.default.isPurchasingSKU})),N=(0,l.useStateFromStores)([h.default],(function(){return h.default.locale})),A=(0,v.useAnalyticsContext)();if(null!=n&&null==o)throw new Error("Unexpected entitlementBranchId without a channelId");return a.createElement(z,B({},u,{applicationId:r,skuId:i,entitlementBranchId:n,channelId:o,application:f,sku:p,isAuthenticated:null!=c,isInTestMode:s,isEntitled:y,isUserPremium:m,isWindowFocused:b,isPurchasing:M,locale:N,analyticsContext:A,ref:t,targetSkuId:C}))}));t.default=K},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return o.default.embedded&&null!=e&&0!==(null==e?void 0:e.length)?[s(a.MenuItem,{id:"search-google",label:i.default.Messages.SEARCH_WITH_GOOGLE,action:function(){return window.open("https://www.google.com/search?q="+encodeURIComponent(e),"_blank")}})]:null};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8253),o=l(n(16)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(9501)),l=s(n(6)),u=s(n(7538));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=a.forwardRef((function(e,t){var n,r=e.className,s=e.contentClassName,d=e.isUnread,c=e.children,p=e.id;return a.createElement("div",{className:(0,o.default)(r,(n={},n[u.default.divider]=!0,n[u.default.isUnread]=d,n[u.default.hasContent]=null!=c,n)),ref:t,id:p},null!=c?f("span",{className:(0,o.default)(u.default.content,s)},void 0,c):null,d?f("span",{className:u.default.unreadPill},void 0,f(i.default,{foreground:u.default.unreadPillCapStroke,className:u.default.unreadPillCap}),l.default.Messages.NEW):null)}));t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeThreadNotificationSetting=u,t.useThreadNotificationSetting=function(e){return(0,r.useStateFromStores)([o.default,a.default],(function(){return u(e)}),[e])};var r=n(3),a=l(n(181)),o=l(n(204)),i=n(392);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=o.default.flags(e.id);if(null==t)return i.ThreadMemberFlags.NO_MESSAGES;if(t&i.ThreadMemberFlags.ALL_MESSAGES)return i.ThreadMemberFlags.ALL_MESSAGES;if(t&i.ThreadMemberFlags.ONLY_MENTIONS)return i.ThreadMemberFlags.ONLY_MENTIONS;if(t&i.ThreadMemberFlags.NO_MESSAGES)return i.ThreadMemberFlags.NO_MESSAGES;var n=t&i.ThreadMemberFlags.HAS_INTERACTED,r=a.default.isGuildOrCategoryOrChannelMuted(e.guild_id,e.parent_id);return n&&!r?i.ThreadMemberFlags.ALL_MESSAGES:i.ThreadMemberFlags.ONLY_MENTIONS}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMUNITY_UPSELL_MINIMUM_GUILD_SIZE=t.MODERATOR_PERMISSIONS_FLAG=t.MODERATOR_PERMISSIONS=t.CREATE_NEW_CHANNEL_VALUE=t.PUBLIC_GUILD_UPDATES_WEBHOOK_USER_ID=t.PUBLIC_GUILD_ANNOUNCEMENTS_GUILD_ID=t.PUBLIC_SUCCESS_MODAL_SEEN_KEY=t.RADIO_BUTTON_ACCEPTED_STATES=void 0;var r,a,o=(r=n(63))&&r.__esModule?r:{default:r},i=n(1);t.RADIO_BUTTON_ACCEPTED_STATES=a,function(e){e.ACCEPTED="ACCEPTED",e.UNACCEPTED="UNACCEPTED"}(a||(t.RADIO_BUTTON_ACCEPTED_STATES=a={}));t.PUBLIC_SUCCESS_MODAL_SEEN_KEY="publicSuccessModalSeen";t.PUBLIC_GUILD_ANNOUNCEMENTS_GUILD_ID="667560445975986187";t.PUBLIC_GUILD_UPDATES_WEBHOOK_USER_ID="669627189624307712";t.CREATE_NEW_CHANNEL_VALUE="1";var l=[i.Permissions.ADMINISTRATOR,i.Permissions.MANAGE_GUILD,i.Permissions.MANAGE_CHANNELS,i.Permissions.MANAGE_ROLES,i.Permissions.KICK_MEMBERS,i.Permissions.BAN_MEMBERS,i.Permissions.MANAGE_MESSAGES,i.Permissions.MENTION_EVERYONE];t.MODERATOR_PERMISSIONS=l;var u=o.default.combine.apply(o.default,l);t.MODERATOR_PERMISSIONS_FLAG=u;t.COMMUNITY_UPSELL_MINIMUM_GUILD_SIZE=1e3},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M12 5C5.648 5 1 12 1 12C1 12 5.648 19 12 19C18.352 19 23 12 23 12C23 12 18.352 5 12 5ZM12 16C9.791 16 8 14.21 8 12C8 9.79 9.791 8 12 8C14.209 8 16 9.79 16 12C16 14.21 14.209 16 12 16Z"}),s("path",{fill:d,className:f,d:"M12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14Z"}))}d.displayName="Eye"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=j;D(n(0));var r,a=n(389),o=R(n(8257)),i=n(286),l=R(n(8323)),u=R(n(8500)),s=R(n(8441)),d=R(n(8399)),f=R(n(8258)),c=D(n(8253)),p=R(n(8430)),v=R(n(11)),y=R(n(8378)),m=R(n(8379)),_=R(n(8380)),h=R(n(8340)),E=R(n(8384)),g=R(n(8385)),S=R(n(9650)),O=R(n(8607)),I=R(n(8386)),T=R(n(8929)),C=R(n(8387)),b=R(n(8324)),M=R(n(8407)),N=R(n(8388)),A=n(1),P=R(n(6));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e){var t=e.user,n=e.channel,r=e.channelSelected,R=void 0!==r&&r,L=e.showMute,D=void 0===L||L,j=e.showMediaItems,k=void 0!==j&&j,U=e.showChannelCallItems,G=void 0!==U&&U,F=e.showModalItems,B=void 0===F||F,H=e.target,x=e.context,V=e.analyticsContext,W=e.onSelect,Y=(0,b.default)(t.id,null,x),z=(0,g.default)(t,x),K=(0,_.default)({user:t,channelId:n.id,target:H,context:x}),$=(0,m.default)(t),Z=(0,N.default)(t.id),q=(0,S.default)(n.id,R),X=(0,I.default)(t),J=(0,l.default)(null,t),Q=(0,M.default)(t.id),ee=(0,T.default)(t.id,n.id),te=(0,y.default)(t),ne=(0,C.default)(t.id),re=(0,O.default)(t.id,n.id),ae=(0,E.default)(t),oe=(0,d.default)(n),ie=(0,f.default)(t.id),le=(0,s.default)(n),ue=(0,u.default)(n.id),se=(0,p.default)(t),de=(0,h.default)(i.ApplicationCommandTarget.USER,n.id);if(v.default.isGuest()||t.isNonUserBot())return null;var fe=n.isManaged();return w(o.default,{context:V,object:A.AnalyticsObjects.CONTEXT_MENU},void 0,w(c.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":P.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:W},void 0,w(c.MenuGroup,{},void 0,le),w(c.MenuGroup,{},void 0,se),w(c.MenuGroup,{},void 0,B&&Y,z,!fe&&ee,B&&K,B&&$,Z,q),w(c.MenuGroup,{},void 0,k&&Q),w(c.MenuGroup,{},void 0,B&&J),w(c.MenuGroup,{},void 0,k&&ne,k&&re,de,B&&X,te,B&&ae),w(c.MenuGroup,{},void 0,D&&oe),G&&w(c.MenuGroup,{},void 0,ue),w(c.MenuGroup,{},void 0,ie)))}j.displayName="DMUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(8751)),o=n(1380),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u={open:function(e){r.default.dispatch({type:i.ActionTypes.NOTIFICATION_SETTINGS_MODAL_OPEN,guildId:e})},close:function(){r.default.dispatch({type:i.ActionTypes.NOTIFICATION_SETTINGS_MODAL_CLOSE})},updateGuildNotificationSettings:function(e,t,n){a.default.saveUserGuildSettings(e,t),r.default.dispatch({type:i.ActionTypes.USER_GUILD_SETTINGS_GUILD_UPDATE,guildId:e,settings:t}),(0,o.trackGuildNotificationSettingsUpdate)(e,t,n)},updateChannelOverrideSettings:function(e,t,n,l){var u,s={channel_overrides:(u={},u[t]=n,u)};a.default.saveUserGuildSettings(e,s),r.default.dispatch({type:i.ActionTypes.USER_GUILD_SETTINGS_CHANNEL_UPDATE,guildId:e,channelId:t,settings:n}),(0,o.trackChannelNotificationSettingsUpdate)(e,t,n,l)}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,a.useStateFromStoresArray)([i.default],(function(){return e.map((function(e){return{id:e,application:i.default.getGame(e),fetching:i.default.isFetching(e),failed:i.default.didFetchingFail(e)}}))}));return r.useEffect((function(){var e=t.filter((function(e){var t=e.application,n=e.fetching,r=e.failed;return null==t&&!n&&!r})).map((function(e){return e.id}));0!==e.length&&o.default.fetchApplications(e)}),[t]),t.map((function(e){return e.application}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=l(n(478)),i=l(n(71));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(1);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}var i=r.createContext(a.AppContext.APP);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSearchOptionAnswer=function(e){switch(e){case u.SearchTokenTypes.FILTER_FROM:return s.default.Messages.SEARCH_ANSWER_FROM;case u.SearchTokenTypes.FILTER_MENTIONS:return s.default.Messages.SEARCH_ANSWER_MENTIONS;case u.SearchTokenTypes.FILTER_HAS:return s.default.Messages.SEARCH_ANSWER_HAS;case u.SearchTokenTypes.FILTER_BEFORE:case u.SearchTokenTypes.FILTER_ON:case u.SearchTokenTypes.FILTER_AFTER:return s.default.Messages.SEARCH_ANSWER_DATE;case u.SearchTokenTypes.FILTER_IN:return s.default.Messages.SEARCH_ANSWER_IN;case u.SearchTokenTypes.FILTER_FILE_TYPE:return s.default.Messages.SEARCH_ANSWER_FILE_TYPE;case u.SearchTokenTypes.FILTER_FILE_NAME:return s.default.Messages.SEARCH_ANSWER_FILE_NAME}},t.getSearchQueryFromTokens=function(e){var t={};e.forEach((function(e){var n=e.type;if(!u.IS_SEARCH_FILTER_TOKEN.test(n)){switch(n){case u.SearchTokenTypes.ANSWER_BEFORE:case u.SearchTokenTypes.ANSWER_ON:case u.SearchTokenTypes.ANSWER_AFTER:var r=e.getData("start"),a=e.getData("end");return r&&(t.min_id=l.default.fromTimestamp(r)),void(a&&(t.max_id=l.default.fromTimestamp(a)))}var o=function(e){var t=i.default[e],n=t?t.queryKey:null;n||(n="content");return n}(n);null==t[o]&&(t[o]=new Set);var s=t[o];switch(n){case u.SearchTokenTypes.ANSWER_USERNAME_FROM:case u.SearchTokenTypes.ANSWER_USERNAME_MENTIONS:s.add(e.getData("userId"));break;case u.SearchTokenTypes.ANSWER_FILE_TYPE:case u.SearchTokenTypes.ANSWER_FILE_NAME:s.add(e.getMatch(1));break;case u.SearchTokenTypes.ANSWER_IN:s.add(e.getData("channel").id);break;case u.SearchTokenTypes.ANSWER_HAS:s.add(e.getData("has"));break;default:s.add(e.getFullMatch().trim())}}}));for(var n=0,r=Object.entries(t);n<r.length;n++){var a=r[n],o=a[0],s=a[1];s instanceof Set&&(t[o]=Array.from(s))}t.content&&(t.content=t.content.join(" ").trim(),t.content||delete t.content);return t},t.getNonTokenQuery=function(e){return e.map((function(e){return e.type===o.default.NON_TOKEN_TYPE?e.getFullMatch():""})).join(" ").trim()},t.getSelectionScope=function(e,t,n){var r,a,o=e.find((function(o,i){return t>=o.start&&t<=o.end&&n>=o.start&&n<=o.end?(e[i+1]&&(a=e[i+1]),!0):(r=o,!1)}));if(!o)return null;return{previousToken:r,currentToken:o,nextToken:a,focusOffset:t,anchorOffset:n}},t.getAutocompleteMode=function(e,t){var n,r=e=e||{},a=r.currentToken,i=r.nextToken,l=r.previousToken;if(0===t.length)return{type:u.SearchPopoutModes.EMPTY,filter:null,token:null};if(!a)return{type:u.SearchPopoutModes.FILTER_ALL,filter:null,token:null};if(u.IS_SEARCH_FILTER_TOKEN.test(a.type)){if(!i||i.type===o.default.NON_TOKEN_TYPE)return{type:u.SearchPopoutModes.FILTER,filter:a.type,token:i};if(i&&!u.IS_SEARCH_ANSWER_TOKEN.test(i.type))return{type:u.SearchPopoutModes.FILTER,filter:a.type,token:null}}if(a.type===o.default.NON_TOKEN_TYPE&&l&&u.IS_SEARCH_FILTER_TOKEN.test(l.type))return{type:u.SearchPopoutModes.FILTER,filter:l.type,token:a};a.type===o.default.NON_TOKEN_TYPE&&(n=a);return{type:u.SearchPopoutModes.FILTER_ALL,filter:null,token:n}},t.getFlattenedStringArray=function(e,t){var n=[];return(0,a.default)(e).forEach((function(e){if(e&&e.results.length){var r=e.group;n=n.concat(e.results.map((function(e){var n=e.text;if(t===u.SearchPopoutModes.FILTER_ALL){r=e.group||r;var a=i.default[r];a&&a.key&&(n=a.key+" "+n)}return n})))}})),n.filter((function(e){return e}))},t.getTotalResults=function(e){return e.reduce((function(e,t){return t?t.results.length+e:e}),0)},t.getQueryFromTokens=function(e){if(!e)return"";return e.map((function(e){return e.getFullMatch()})).join("")},t.tokenizeQuery=function(e){return v.tokenize(e)},t.clearTokenCache=function(){return v.clearCache()},t.showDatePicker=function(e){return null!=e?p[e]:null},t.filterHasAnswer=function(e,t){var n=u.IS_SEARCH_FILTER_TOKEN.test(e.type);if(!t&&n||t&&n&&!u.IS_SEARCH_ANSWER_TOKEN.test(t.type))return!1;return!0},t.refreshSearchTokens=function(){(0,i.refreshSearchTokens)(),v.reset(),(0,a.default)(i.default).forOwn((function(e,t){return v.addRule(c({type:t},e))}))},t.ShowDatePicker=void 0;var r,a=f(n(8)),o=f(n(8526)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8457)),l=f(n(97)),u=n(1),s=f(n(6));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=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}).apply(this,arguments)}var p=((r={})[u.SearchTokenTypes.FILTER_BEFORE]=!0,r[u.SearchTokenTypes.FILTER_AFTER]=!0,r[u.SearchTokenTypes.FILTER_ON]=!0,r);t.ShowDatePicker=p;var v=new o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updatePermission=function(e,t,n){r.default.dispatch({type:o.ActionTypes.CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION,id:e,allow:t,deny:n})},t.selectPermission=function(e){r.default.dispatch({type:o.ActionTypes.CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION,id:e})},t.setAdvancedMode=function(e){r.default.dispatch({type:o.ActionTypes.CHANNEL_SETTINGS_PERMISSIONS_SET_ADVANCED_MODE,advancedMode:e})},t.init=function(){r.default.dispatch({type:o.ActionTypes.CHANNEL_SETTINGS_PERMISSIONS_INIT})},t.savePermissionUpdates=function(e,t,n){return r.default.dispatch({type:o.ActionTypes.CHANNEL_SETTINGS_PERMISSIONS_SUBMITTING}),new Promise((function(n){!function r(){if(0===t.length)return n();var o=t.pop();if(null==o)return r();a.default.updatePermissionOverwrite(e,o).then(r,r)}()})).then((function(){r.default.dispatch({type:o.ActionTypes.CHANNEL_SETTINGS_PERMISSIONS_SAVE_SUCCESS,silent:n})}))};var r=i(n(2)),a=i(n(391)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFullRowId=$,t.AddMembersBody=J,t.MemberRoleSelector=Q,t.default=ee;var r,a=x(n(0)),o=B(n(9)),i=n(3),l=n(8481),u=n(8297),s=B(n(8970)),d=n(31),f=B(n(10)),c=B(n(56)),p=B(n(15)),v=B(n(160)),y=B(n(1222)),m=B(n(29)),_=B(n(1160)),h=B(n(61)),E=B(n(55)),g=n(85),S=n(131),O=B(n(8374)),I=B(n(8448)),T=B(n(8510)),C=n(35),b=B(n(279)),M=B(n(47)),N=B(n(24)),A=B(n(1210)),P=B(n(13)),R=n(292),L=B(n(723)),D=B(n(264)),w=n(1229),j=x(n(8574)),k=B(n(9739)),U=n(1),G=B(n(6)),F=B(n(7666));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function V(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){V(o,r,a,i,l,"next",e)}function l(e){V(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Y(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function z(){return(z=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}).apply(this,arguments)}function K(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $(e){return e.rowType+":"+e.id}function Z(e){return K(S.FormTitle,{tag:S.FormTitle.Tags.H5,className:(0,o.default)(F.default.sectionTitle,F.default.rowHeight)},e,e)}function q(e,t){return t?e.slice(1):e}function X(e){var t,n=e.children,r=e.rowLabel,a=e.checked,i=e.onSelect,l=e.disabled,u=e.showCheckbox,s=e.selected,d=e.onMouseEnter;return K(h.default,{onClick:function(e){l||(e.preventDefault(),i())},onMouseEnter:d,className:(0,o.default)(F.default.addMemberRow,(t={},t[F.default.selectedRow]=s,t))},void 0,K(E.default,{justify:E.default.Justify.BETWEEN,align:E.default.Align.CENTER},void 0,u?K(_.default,{size:18,value:a,disabled:l,type:_.default.Types.INVERTED},void 0,K("div",{className:F.default.checkboxLabel},void 0,n)):n,null!=r?K(N.default,{color:N.default.Colors.MUTED,size:N.default.Sizes.SIZE_12},void 0,r):null))}function J(e){var t=e.guild,n=e.channel,r=e.permission,o=e.pendingAdditions,l=e.setPendingAdditions,s=e.isStageChannel,d=void 0===s?null!=n&&n.isGuildStageVoice():s,f=e.description,p=a.useState(!1),v=p[0],y=p[1],m=a.useState(""),_=m[0],h=m[1];function E(e){var t=q(_.trim(),v);return new RegExp(""+D.default.escape(t),"i").test(e)}var g,S=(0,i.useStateFromStores)([c.default],(function(){return c.default.getMemberIds(t.id)}));v?g=[]:d?g=j.getRolesRowsWithPermissionDisabled(t,n,r,E):0===(g=j.getRolesRows(t,n,r,E)).length&&(""!==_.trim()||j.hasCustomRoles(t)||(g=j.getNoRolesRow()));var O=j.getMembersRows(S,n,t,r,E);var I={placeholderText:G.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_PLACEHOLDER,hintText:G.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_SUBTITLE,renderEmptyText:function(e){return G.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_NO_RESULT.format({query:e})}};return K(Q,{pendingAdditions:o,query:_,onQueryChange:function(e){var n=e.trim(),r="@"===n.charAt(0);L.default.requestMembers(t.id,q(n,r),w.MEMBER_REQUEST_COUNT),h(e),y(r)},onClickRow:function(e){var t=$(e);l((function(n){var r,a=z({},n);t in a?delete a[t]:(e.rowType===w.RowType.ROLE||e.rowType===w.RowType.ADMINISTRATOR?r={type:u.RichTagTypes.ROLE,label:e.name,color:e.colorString}:e.rowType!==w.RowType.MEMBER&&e.rowType!==w.RowType.OWNER||(r={type:u.RichTagTypes.MEMBER,label:e.name,avatar:e.avatarURL}),null!=r&&(a[t]={display:r,row:e}));return a}))},onRemovePendingAddition:function(e){l((function(t){t[e];return function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,[e].map(Y))}))},roles:g,members:O,placeholderText:I.placeholderText,hintText:I.hintText,renderEmptyText:I.renderEmptyText,isStageChannel:d,description:f})}function Q(e){var t,n=e.listClassName,r=e.pendingAdditions,l=e.query,u=e.onQueryChange,d=e.onClickRow,f=e.onRemovePendingAddition,c=e.roles,p=e.members,m=e.placeholderText,_=e.hintText,h=e.renderEmptyText,g=e.isStageChannel,S=e.focusSearchAfterReady,O=e.isReady,T=e.description,C=a.useRef(null),M=a.useRef(null),P=(0,i.useStateFromStores)([v.default],(function(){return v.default.hidePersonalInformation})),R=a.useState(!1),L=R[0],D=R[1],U=a.useState(0),B=U[0],H=U[1],x=a.useState(-1),V=x[0],W=x[1],Y=a.useCallback((function(e,t,n){var r;(void 0===n&&(n=!0),H(e),W(t),n)&&(null===(r=M.current)||void 0===r||r.scrollToIndex({section:null!=e?e:0,row:null!=t?t:0,padding:8}))}),[]),z=a.useCallback((function(e,t){if(null==t)u("");else{var n=(e===w.AddMembersSections.ROLES?c:p)[t];n.rowType!==w.RowType.EMPTY_STATE&&d(n)}}),[c,p,d,u]),q=a.useCallback((function(e){var t;null!=e&&e.rowType!==w.RowType.EMPTY_STATE&&(d(e),u(""),null===(t=C.current)||void 0===t||t.focus())}),[d,u]),J=a.useMemo((function(){return Object.keys(r)}),[r]);var Q=p.some((function(e){return!e.disabled}))||c.some((function(e){return!e.disabled}))||""===l.trim();function ee(){var e;D(!(null===(e=M.current)||void 0===e?void 0:e.isScrolledToTop())&&Q)}a.useEffect((function(){ee()}));var te;return K("div",{className:F.default.content},void 0,(null==(te=T)&&g&&(te=G.default.Messages.CHANNEL_PERMISSIONS_MODERATOR_DESCRIPTION),te&&K(N.default,{color:N.default.Colors.HEADER_SECONDARY,className:F.default.description},void 0,te)),K("div",{className:(0,o.default)(F.default.searchBox,(t={},t[F.default.scrollSeparator]=L,t))},void 0,a.createElement(k.default,{ref:C,query:l,onQueryChange:u,selectedSection:B,selectedRow:V,onSelectionChange:Y,onSelect:z,tags:J.map((function(e){return r[e].display})),sections:[c.length,p.length],onRemoveTag:function(e){f(J[e])},placeholder:m,focusAfterReady:S,isReady:O}),null!=_?K(N.default,{size:N.default.Sizes.SIZE_12},void 0,_):null),Q?a.createElement(A.default,{ref:M,className:(0,o.default)(F.default.roleMemberList,n),sections:[c.length,p.length],renderRow:function(e){var t,n,o=e.section,i=e.row,l=null,u=!1,s=!1,d=!1;switch(o){case w.AddMembersSections.ROLES:u=(n=$(l=c[i]))in r||l.disabled,s=l.disabled,d=B===w.AddMembersSections.ROLES&&V===i,t=a.createElement(a.Fragment,null,K("div",{className:F.default.rowHeight},void 0,K(I.default,{color:l.colorString,height:20})),K("div",{className:F.default.rowLabel},void 0,K(N.default,{className:F.default.rowTitle,color:l.rowType===w.RowType.EMPTY_STATE?N.default.Colors.MUTED:N.default.Colors.STANDARD},void 0,l.name),g&&l.disabled?K(N.default,{color:N.default.Colors.HEADER_SECONDARY,size:N.default.Sizes.SIZE_12},void 0,G.default.Messages.CHANNEL_PERMISSIONS_ROLE_ALREADY_HAS_PERMISSIONS):null));break;case w.AddMembersSections.MEMBERS:u=(n=$(l=p[i]))in r||l.disabled,s=l.disabled,d=B===w.AddMembersSections.MEMBERS&&V===i,t=a.createElement(a.Fragment,null,K(b.default,{src:l.avatarURL,size:b.default.Sizes.SIZE_24,"aria-label":l.name}),K(N.default,{className:F.default.rowLabel},void 0,l.name),l.bot&&K(y.default,{verified:l.verifiedBot}),!P&&K(N.default,{color:N.default.Colors.MUTED,className:F.default.rowLabelSubText},void 0,l.userTag))}return null==l?null:K(X,{rowLabel:j.getRowTypeLabel(l.rowType),checked:u,disabled:s,onSelect:function(){return q(l)},showCheckbox:l.rowType!==w.RowType.EMPTY_STATE,onMouseEnter:function(){return Y(o,i,!1)},selected:d},n,K(E.default,{align:E.default.Align.CENTER,justify:E.default.Justify.START},void 0,t))},rowHeight:40,renderSection:function(e){switch(e.section){case w.AddMembersSections.ROLES:return Z(G.default.Messages.ROLES);case w.AddMembersSections.MEMBERS:return Z(G.default.Messages.MEMBERS)}},sectionHeight:32,onScroll:ee}):K(E.default,{className:n,align:E.default.Align.CENTER,justify:E.default.Justify.CENTER,direction:E.default.Direction.VERTICAL},void 0,K(s.default,{className:F.default.noResultIcon}),K(N.default,{},void 0,h(l))))}function ee(e){var t=e.transitionState,n=e.onClose,r=e.channelId,o=e.newChannel,l=e.inSettings,u=(0,g.useUID)(),s=a.useState(!1),c=s[0],v=s[1],y=a.useState({}),_=y[0],h=y[1],S=(0,i.useStateFromStores)([f.default],(function(){return f.default.getChannel(r)}),[r]),I=(0,i.useStateFromStores)([p.default],(function(){return p.default.getGuild(null==S?void 0:S.getGuildId())}));if(a.useEffect((function(){P.default.track(U.AnalyticEvents.OPEN_MODAL,{type:"Grant Channel Access"})}),[]),null==S||null==I)return null;var b=o&&0===Object.keys(_).length;function A(){return(A=W(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=S&&0!==Object.keys(_).length){e.next=3;break}return n(),e.abrupt("return");case 3:return v(!0),e.prev=4,e.next=7,te(S,_,l);case 7:n(),v(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),v(!1);case 14:case"end":return e.stop()}}),e,null,[[4,11]])})))).apply(this,arguments)}var R=(0,d.isGuildTextChannelType)(S.type)?O.default:T.default;return K(C.ModalRoot,{transitionState:t,size:C.ModalSize.SMALL,"aria-labelledby":u,className:F.default.modalRoot},void 0,K(C.ModalHeader,{separator:!1,direction:E.default.Direction.VERTICAL,align:E.default.Align.CENTER,className:F.default.header},void 0,K(M.default,{tag:M.default.Tags.H2,size:M.default.Sizes.SIZE_24},void 0,G.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE),K(N.default,{size:N.default.Sizes.SIZE_16,color:N.default.Colors.HEADER_SECONDARY,className:F.default.headerSubtitle},void 0,K(R,{height:16,width:16,className:F.default.headerSubtitleIcon}),S.name)),K(J,{guild:I,channel:S,permission:S.viewPermission,pendingAdditions:_,setPendingAdditions:h}),K(C.ModalFooter,{},void 0,!b&&a.createElement(a.Fragment,null,K(m.default,{onClick:function(){return A.apply(this,arguments)},look:m.default.Looks.FILLED,size:m.default.Sizes.SMALL,className:F.default.button,submitting:c},void 0,G.default.Messages.DONE),K(m.default,{look:m.default.Looks.LINK,color:m.default.Colors.TRANSPARENT,onClick:n,size:m.default.Sizes.SMALL},void 0,G.default.Messages.CANCEL)),b&&K(m.default,{look:m.default.Looks.FILLED,color:m.default.Colors.GREY,onClick:n,size:m.default.Sizes.SMALL},void 0,G.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_SKIP)))}function te(e,t,n){var r=[];return Object.values(t).forEach((function(t){var n=t.row;n.id&&(n.rowType===w.RowType.ROLE?r.push((0,R.permissionOverwriteForRole)(n.id,e.type)):n.rowType===w.RowType.MEMBER&&r.push((0,R.permissionOverwriteForUser)(n.id,e.type)))})),(0,l.savePermissionUpdates)(e.id,r,n)}Z.displayName="renderSectionTitle",X.displayName="AddMembersRow",J.displayName="AddMembersBody",Q.displayName="MemberRoleSelector",ee.displayName="AddMembersModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=n(48),i=n(1213),l=(n(1),u(n(6)));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=null,f=[],c=[],p={};var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.getPrimaryCategories=function(){return f},a.getDiscoveryCategories=function(){var e=i.DISCOVERY_SIDEBAR_CATEGORIES.slice(1).map((function(e){return c.find((function(t){return t.categoryId===e.categoryId}))})).filter(o.isNotNullish);return[{categoryId:i.DISCOVERY_ALL_CATEGORIES_ID,name:l.default.Messages.HOME}].concat(e)},a.getAllCategories=function(){return c},a.getFetchedLocale=function(){return d},a.getCategoryName=function(e){return e===i.DISCOVERY_ALL_CATEGORIES_ID?l.default.Messages.HOME:p[e]},r}(r.default.Store))(a.default,{GUILD_DISCOVERY_CATEGORY_FETCH_SUCCESS:function(e){var t,n=e.categories,r=e.locale,a=[],o=[];if(n.sort((function(e,t){return e.name<t.name?-1:1})).forEach((function(e){var n=e.id,r=e.name,l=e.is_primary;n!==i.DEFAULT_DISCOVERY_CATEGORY_ID&&(n!==i.OTHER_DISCOVERY_CATEGORY_ID?(l&&a.push({categoryId:n,name:r}),o.push({categoryId:n,name:r}),p[n]=r):t={categoryId:n,name:r})})),null!=t){var l=t,u=l.categoryId,s=l.name;a.push({categoryId:u,name:s}),p[u]=s}d=r,f=a,c=o}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){void 0===n&&(n=e.type);var r=(0,o.useStateFromStores)([u.default],(function(){return u.default.can(d.Permissions.MANAGE_CHANNELS,e)}),[e]);if(__OVERLAY__||!r)return null;var c=function(){(0,s.openModal)((function(t){return a.createElement(i.default,y({},t,{channelType:n,guildId:e.guild_id,categoryId:e.parent_id}))}))};switch(n){case d.ChannelTypes.GUILD_TEXT:return v(l.MenuItem,{id:"create-text-channel",label:f.default.Messages.CREATE_TEXT_CHANNEL,action:c});case d.ChannelTypes.GUILD_VOICE:return v(l.MenuItem,{id:"create-voice-channel",label:f.default.Messages.CREATE_VOICE_CHANNEL,action:c});default:return null}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(8458)),l=n(8253),u=c(n(40)),s=n(41),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=v(n(8283)),l=n(8253),u=n(8256),s=v(n(40)),d=n(41),f=n(8286),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n){return(0,o.useStateFromStores)([s.default],(function(){return(0,f.canViewInviteModal)(s.default,t,e,n)}))?m(l.MenuItem,{id:"invite-people",label:p.default.Messages.INVITE_PEOPLE,color:u.MenuItemColor.BRAND,action:function(){return(0,d.openModal)((function(n){return a.createElement(i.default,_({},n,{guild:t,channel:e,source:c.InstantInviteSources.CONTEXT_MENU}))}))}}):null}h.displayName="useInvitePeopleItem"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(9)),i=T(n(8581)),l=T(n(390)),u=n(180),s=T(n(8375)),d=T(n(70)),f=T(n(12)),c=T(n(29)),p=T(n(8525)),v=T(n(8267)),y=T(n(466)),m=n(41),_=T(n(24)),h=n(99),E=n(8705),g=T(n(10073)),S=n(1),O=T(n(6)),I=T(n(7372));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={report:!1},t.handleDelete=function(){var e=t.state.report,n=t.props,r=n.channel,o=n.message;e?(0,m.openModal)((function(e){return a.createElement(g.default,M({},e,{channel:r,message:o,onReport:function(){return l.default.deleteMessage(r.id,o.id)}}))})):l.default.deleteMessage(r.id,o.id)},t.handleToggleReport=function(e){t.setState({report:e})},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n),r.prototype.render=function(){var e,t,n=this.state.report,r=this.props,o=r.channel,i=r.message,l=r.showContextMenuHint,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(r,["channel","message","showContextMenuHint"]),d=o.type===S.ChannelTypes.GUILD_ANNOUNCEMENT&&(0,h.hasFlag)(i.flags,S.MessageFlags.CROSSPOSTED);return l&&(e=N(p.default,{className:I.default.spacingTop},void 0,O.default.Messages.DELETE_MESSAGE_CONTEXT_MENU_HINT.format())),(0,E.canReportMessage)(i)&&(t=N(v.default,{value:n,onChange:this.handleToggleReport,hideBorder:!0,className:I.default.spacingTop},void 0,O.default.Messages.DELETE_MESSAGE_REPORT)),a.createElement(y.default,M({header:d?O.default.Messages.MODIFY_FOLLOWED_NEWS_HEADER:O.default.Messages.DELETE_MESSAGE_TITLE,confirmText:O.default.Messages.DELETE,cancelText:O.default.Messages.CANCEL,onConfirm:this.handleDelete},u),N(_.default,{size:_.default.Sizes.SIZE_16,className:I.default.spacing},void 0,d?O.default.Messages.DELETE_FOLLOWED_NEWS_BODY:O.default.Messages.DELETE_MESSAGE_BODY),N("div",{className:I.default.message},void 0,N(s.default,{channel:o,message:i,disableInteraction:!0})),t,e)},r}(a.PureComponent);A.displayName="DeleteModal";var P={confirmPin:function(e,t){var n=N(s.default,{channel:e,message:t,animateAvatar:!1,disableInteraction:!0});(0,m.openModal)((function(r){var o,l=(0,u.computeChannelName)(e,f.default,d.default);return o=e.isPrivate()?O.default.Messages.PIN_MESSAGE_BODY_PRIVATE_CHANNEL:O.default.Messages.PIN_MESSAGE_BODY.format({channelName:l}),a.createElement(y.default,M({header:O.default.Messages.PIN_MESSAGE_TITLE,confirmText:O.default.Messages.PIN_CONFIRM,cancelText:O.default.Messages.CANCEL,confirmButtonColor:c.default.Colors.BRAND,onConfirm:function(){return i.default.pinMessage(e,t.id)}},r),N(_.default,{size:_.default.Sizes.SIZE_16,className:I.default.spacing},void 0,o),N("div",{className:I.default.message},void 0,n))}))},confirmUnpin:function(e,t){var n=N(s.default,{channel:e,message:t,disableInteraction:!0});(0,m.openModal)((function(r){return a.createElement(y.default,M({header:O.default.Messages.UNPIN_MESSAGE_TITLE,confirmText:O.default.Messages.UNPIN_CONFIRM,cancelText:O.default.Messages.CANCEL,onConfirm:function(){return i.default.unpinMessage(e,t.id)}},r),N(_.default,{size:_.default.Sizes.SIZE_16,className:I.default.spacing},void 0,O.default.Messages.UNPIN_MESSAGE_BODY),N("div",{className:(0,o.default)(I.default.message,I.default.spacing)},void 0,n),N(p.default,{},void 0,O.default.Messages.UNPIN_MESSAGE_CONTEXT_MENU_HINT.format()))}))},confirmDelete:function(e,t,n){void 0===n&&(n=!1),(0,m.openModal)((function(r){return a.createElement(A,M({channel:e,message:t,showContextMenuHint:n},r))}))},confirmEdit:function(e,t,n){(0,m.openModal)((function(r){return a.createElement(y.default,M({header:O.default.Messages.MODIFY_FOLLOWED_NEWS_HEADER,confirmText:O.default.Messages.CONFIRM,cancelText:O.default.Messages.CANCEL,confirmButtonColor:c.default.Colors.BRAND,onConfirm:function(){return l.default.editMessage(e,t,{content:n})}},r),N(_.default,{size:_.default.Sizes.SIZE_16,className:I.default.spacing},void 0,O.default.Messages.EDIT_FOLLOWED_NEWS_BODY))}))}};t.default=P},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null==e)return!1;var t=e.type;if(null==e.guild_id||!o.GUILD_NON_CATEGORY_CHANNEL_TYPES.has(t))return!1;if(e.isVocal()&&!i.default.canEveryoneRole(r.Permissions.CONNECT,e))return!0;var n=e.permissionOverwrites[e.guild_id];return null!=n&&a.default.has(n.deny,r.Permissions.VIEW_CHANNEL)};var r=n(92),a=l(n(63)),o=n(31),i=l(n(78));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground,d=e.background;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{className:s,fill:l,d:"M14 8C14 7.44772 13.5523 7 13 7H9.76001L10.3657 3.58738C10.4201 3.28107 10.1845 3 9.87344 3H8.88907C8.64664 3 8.43914 3.17391 8.39677 3.41262L7.76001 7H4.18011C3.93722 7 3.72946 7.17456 3.68759 7.41381L3.51259 8.41381C3.45905 8.71977 3.69449 9 4.00511 9H7.41001L6.35001 15H2.77011C2.52722 15 2.31946 15.1746 2.27759 15.4138L2.10259 16.4138C2.04905 16.7198 2.28449 17 2.59511 17H6.00001L5.39427 20.4126C5.3399 20.7189 5.57547 21 5.88657 21H6.87094C7.11337 21 7.32088 20.8261 7.36325 20.5874L8.00001 17H14L13.3943 20.4126C13.3399 20.7189 13.5755 21 13.8866 21H14.8709C15.1134 21 15.3209 20.8261 15.3632 20.5874L16 17H19.5799C19.8228 17 20.0306 16.8254 20.0724 16.5862L20.2474 15.5862C20.301 15.2802 20.0655 15 19.7549 15H16.35L16.6758 13.1558C16.7823 12.5529 16.3186 12 15.7063 12C15.2286 12 14.8199 12.3429 14.7368 12.8133L14.3504 15H8.35045L9.41045 9H13C13.5523 9 14 8.55228 14 8Z"}),o("path",{className:d,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M19.8914 3.80204L22.2438 8.55654C22.5726 9.22119 22.0891 9.99999 21.3475 10L16.6179 10C15.8745 10 15.391 9.21769 15.7235 8.55279L18.1007 3.79829C18.4701 3.05951 19.5251 3.06172 19.8914 3.80204ZM18.4998 5H19.4999V7.5H18.4999L18.4998 5ZM18.4998 8.49887C18.4998 8.77589 18.7238 9 18.9998 9C19.2759 9 19.4999 8.77589 19.4999 8.49887C19.4999 8.22224 19.2759 7.99773 18.9998 7.99773C18.7238 7.99773 18.4998 8.22224 18.4998 8.49887Z"}))}i.displayName="ChannelTextNSFW"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDescriptiveInviteError=function(e){switch(e){case a.AbortCodes.TOO_MANY_USER_GUILDS:return{title:o.default.Messages.TOO_MANY_USER_GUILDS_TITLE,description:o.default.Messages.TOO_MANY_USER_GUILDS_DESCRIPTION};case a.AbortCodes.GUILD_AT_CAPACITY:return{title:o.default.Messages.SERVER_IS_CURRENTLY_FULL,description:o.default.Messages.PLEASE_TRY_AGAIN_LATER};default:return null}},t.getInviteError=function(e){switch(e){case a.AbortCodes.TOO_MANY_USER_GUILDS:return o.default.Messages.TOO_MANY_USER_GUILDS_DESCRIPTION;case a.AbortCodes.GUILD_AT_CAPACITY:return o.default.Messages.MAX_GUILD_MEMBERS_REACHED_ERROR;default:return o.default.Messages.INVITE_MODAL_ERROR_DEFAULT}};var r,a=n(1),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=(0,((r=n(310))&&r.__esModule?r:{default:r}).default)({id:"2021-04_stage_tickets",label:"Stage Tickets",kind:"guild",defaultConfig:{enabled:!1},treatments:[{id:1,label:"On",config:{enabled:!0}}]});t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(14)),a=u(n(2)),o=n(289),i=n(8423),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}var f={createGuildEvent:function(e,t){var n;return r.default.post({url:l.Endpoints.GUILD_EVENTS_FOR_GUILD(e),body:{name:t.name,description:t.description,image:t.image,privacy_level:t.privacyLevel,scheduled_start_time:t.scheduledStartTime,scheduled_end_time:t.scheduledEndTime,entity_type:t.entityType,tickets:null===(n=t.tickets)||void 0===n?void 0:n.map((function(e){return{price_tier:e.priceTier,image:e.image,color:e.color}})),channel_id:t.channelId}})},fetchGuildEventsForGuild:function(e){return d(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,o.httpGetWithCountryCodeQuery)(l.Endpoints.GUILD_EVENTS_FOR_GUILD(e));case 2:return n=t.sent,r=n.body,a.default.dispatch({type:l.ActionTypes.FETCH_GUILD_EVENTS_FOR_GUILD,guildId:e,guildScheduledEvents:r}),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})))()},cancelGuildEvent:function(e){return r.default.patch({url:l.Endpoints.GUILD_EVENT(e),body:{status:i.GuildScheduledEventStatus.CANCELED}})},getTicketPriceTiers:function(){return r.default.get({url:l.Endpoints.PRICE_TIERS})},getGuildEventsForCurrentUser:function(){return d(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:l.Endpoints.USER_GUILD_EVENTS});case 2:t=e.sent,n=t.body,a.default.dispatch({type:l.ActionTypes.GUILD_SCHEDULED_EVENT_RSVPS_FETCH_SUCESS,guildScheduledEvents:n});case 5:case"end":return e.stop()}}),e)})))()},createRsvpForGuildEvent:function(e){return r.default.post({url:l.Endpoints.USER_GUILD_EVENT(e)})},deleteRsvpForGuildEvent:function(e){return r.default.delete({url:l.Endpoints.USER_GUILD_EVENT(e)})}};t.default=f},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HubEmailConnectionSteps=void 0,t.HubEmailConnectionSteps=r,function(e){e[e.VERIFY_EMAIL=0]="VERIFY_EMAIL",e[e.EMAIL_CONFIRMATION=1]="EMAIL_CONFIRMATION",e[e.EMAIL_WAITLIST=2]="EMAIL_WAITLIST"}(r||(t.HubEmailConnectionSteps=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}var s={report:function(e){return r.default.post({url:o.Endpoints.REPORT,body:e,oldFormErrors:!0})},getReasons:function(e){return r.default.get({url:o.Endpoints.REPORT,query:e,oldFormErrors:!0}).then((function(e){return e.body}))},getOptions:function(){return u(regeneratorRuntime.mark((function e(){var t,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:o.Endpoints.REPORT_OPTIONS,oldFormErrors:!0});case 2:return t=e.sent,n=t.body,a=n.reduce((function(e,t){return null!=t.sub_question&&null!=t.sub_types&&(e[t.value]={subTypeQuestion:t.sub_question,subTypes:t.sub_types}),e}),{}),e.abrupt("return",{typeOptions:n,subTypeOptions:a});case 6:case"end":return e.stop()}}),e)})))()},submitReport:function(e,t,n,a,i){return u(regeneratorRuntime.mark((function l(){var u;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,r.default.post({url:o.Endpoints.REPORT_V2,body:{token:e,report_type:t,report_sub_type:n,subject:a,description:i},oldFormErrors:!0});case 2:return u=l.sent,l.abrupt("return",u);case 4:case"end":return l.stop()}}),l)})))()},openReportMessageModal:function(e,t){a.default.dispatch({type:o.ActionTypes.REPORT_MESSAGE_MODAL_OPEN,channel:e,message:t})},tokenizeReportedMessage:function(e,t){return u(regeneratorRuntime.mark((function n(){var a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.default.post({url:o.Endpoints.STAGE_REPORT(e,t),body:{channel_id:e},oldFormErrors:!0});case 2:return a=n.sent,n.abrupt("return",a.body.token);case 4:case"end":return n.stop()}}),n)})))()}};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useFocusBlock=i,t.default=l;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(85);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t){var n="data-focus-blocked-"+(0,a.useUID)();r.useLayoutEffect((function(){if(t){var r=e.current;if(null!=r){for(var a=function(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return e.tabIndex>=0&&!e.disabled?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}})}(r),o=a.currentNode;null!==o;){var i=o,l=i.tabIndex;i.tabIndex=-1,i.setAttribute(n,String(l)),o=a.nextNode()}return function(){r.querySelectorAll("["+n+"]").forEach((function(e){var t=e.getAttribute(n);if(null!=t){var r=parseInt(t,10);e.tabIndex=r}}))}}}}),[t])}function l(e){var t=e.children,n=e.enabled,a=void 0===n||n,o=r.useRef(null);return i(o,a),r.createElement("div",{ref:o},t)}l.displayName="FocusBlock"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,l){void 0===n&&(n=!1);void 0===l&&(l=!1);return r.useMemo((function(){return null!=e.customRenderedContent?e.customRenderedContent:e.type===i.MessageTypes.APPLICATION_COMMAND&&0===e.content.length||e.hasFlag(i.MessageFlags.LOADING)?(0,o.default)(e):(0,a.default)(e,{renderMediaEmbeds:t,formatInline:l,isInteracting:n})}),[e.content,e.customRenderedContent,e.embeds,e.interaction,e.state,e.type,t,l,n])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(8361)),o=l(n(9370)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.isSpotifyPlayable=function(e){if(null!=e.getActiveSocketAndDevice())return!0;return l.default.isProtocolRegistered()},t.ensureSpotifyPlayable=function(){var t=u.default.getActiveSocketAndDevice();if(null!=t)return Promise.resolve(t);if(!l.default.isProtocolRegistered())return Promise.reject(new Error("protocol is not registered"));var n=u.default.getPlayableComputerDevices();if(a.default.isObservedAppRunning(r.default.get(s.PlatformTypes.SPOTIFY).name)&&n.length>0){var d=n[0],c=d.socket,p=d.device;return(0,o.setActiveDevice)(c.accountId,p.id),Promise.resolve({socket:c,device:p})}return new Promise((function(t,r){var a=setTimeout((function(){u.default.removeChangeListener(l),r(new Error("timeout launching spotify"))}),3e4),l=function r(){for(var i,l=function(){var l=i.value,s=l.socket,d=l.device;null==n.find((function(e){return e.device.id===d.id}))&&(clearTimeout(a),u.default.removeChangeListener(r),e((function(){(0,o.setActiveDevice)(s.accountId,d.id),t({socket:s,device:d})})))},s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(u.default.getPlayableComputerDevices());!(i=s()).done;)l()};u.default.addChangeListener(l),window.open(i.SPOTIFY_APP_PROTOCOL+":")}))},t.isSpotifyPremium=function(){var e=u.default.getActiveSocketAndDevice();if(null==e)return null;return e.socket.isPremium},t.ensureSpotifyPremium=function(){var e=u.default.getActiveSocketAndDevice();if(null==e)return Promise.reject(new Error("no active profile"));var t=e.socket;if(t.isPremium)return Promise.resolve();return(0,o.getProfile)(t.accountId,t.accessToken).then((function(){if(!t.isPremium)return Promise.reject(new Error("spotify account is not premium"))}))};var r=d(n(183)),a=d(n(79)),o=n(1367),i=n(293),l=d(n(1310)),u=d(n(708)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}}).call(this,n(68).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,i){a.default.track(o.AnalyticEvents.APPLICATION_OPENED,{type:e,source:t,application_id:r.application_id,party_id:null!=r.party?r.party.id:void 0,other_user_id:n,message_id:i})};var r,a=(r=n(13))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=s(n(705)),i=n(8253),l=s(n(688)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getVoiceParticipantsHidden(e)}));return f(i.MenuCheckboxItem,{id:"no-video-hide",label:u.default.Messages.STREAM_SHOW_NON_VIDEO,checked:!t,action:function(){return o.default.toggleVoiceParticipantsHidden(e,!t)}})}c.displayName="useHideNoVideoParticipantsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,f.useStateFromStores)([h.default],(function(){var t;return h.default.getGuildVersion(null===(t=e.guild)||void 0===t?void 0:t.id)})),!1;return!1===e.wrap?a.createElement(K,e):a.createElement(z,e)},t.MemberRole=void 0;var r,a=j(n(0)),o=D(n(9)),i=D(n(480)),l=D(n(8)),u=D(n(98)),s=j(n(680)),d=n(202),f=n(3),c=n(389),p=D(n(8254)),v=D(n(8299)),y=D(n(8502)),m=D(n(88)),_=D(n(56)),h=D(n(40)),E=D(n(12)),g=D(n(61)),S=j(n(8503)),O=D(n(282)),I=D(n(55)),T=D(n(278)),C=n(85),b=D(n(255)),M=D(n(8431)),N=D(n(5951)),A=D(n(78)),P=n(1),R=D(n(6)),L=D(n(7455));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(){return(k=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}).apply(this,arguments)}function U(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var B=function(){return Promise.resolve()},H=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).filterRoles=function(e){var n=t.props,r=n.guild,a=n.userId,o=h.default.getHighestRole(r),u=(0,l.default)(r.roles).filter((function(e){return e.id!==r.id})).filter((function(e){return!e.managed})).filter((function(e){return h.default.isRoleHigher(r,o,e)})).filter((function(t){return(0,i.default)(e.toLowerCase(),t.name.toLowerCase())})),s=_.default.getMember(r.id,a);return s&&(u=u.filter((function(e){return-1===s.roles.indexOf(e.id)}))),u.value()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,F(t,n),r.prototype.render=function(){var e=this;return G(S.default,{value:new Set,onChange:this.props.onSelect,placeholder:R.default.Messages.ADD_ROLE_PLACEHOLDER,"aria-label":R.default.Messages.ADD_ROLE_A11Y_LABEL,onClose:this.props.onClose},void 0,(function(t){return e.filterRoles(t).map((function(e){var t;return G(S.ComboboxItem,{value:e.id},e.id,G("div",{className:L.default.popoutRoleDot,style:{backgroundColor:null!==(t=e.colorString)&&void 0!==t?t:(0,d.int2hex)(P.DEFAULT_ROLE_COLOR)}}),G(S.ComboboxItem.Label,{},void 0,e.name))}))}))},r}(a.Component);function x(e){var t,n=e.userRoles,r=e.position,i=U(e,["userRoles","position"]),l=(0,C.useUID)();return G(O.default,{className:(0,o.default)(L.default.overflowRolesPopout,(t={},t[L.default.popoutBottom]=r===T.default.Positions.BOTTOM,t[L.default.popoutTop]=r===T.default.Positions.TOP,t)),"aria-labelledby":l},void 0,G("div",{className:L.default.overflowRolesPopoutArrowWrapper},void 0,G("div",{className:L.default.overflowRolesPopoutArrow})),G(I.default,{className:L.default.overflowRolesPopoutHeader,align:I.default.Align.CENTER},void 0,G(M.default,{color:P.HEXColors.PRIMARY_DARK_400,className:L.default.overflowRolesPopoutHeaderIcon}),G("div",{className:L.default.overflowRolesPopoutHeaderText,id:l},void 0,R.default.Messages.ROLES_LIST.format({numRoles:n.length}))),a.createElement(z,k({},i,{wrap:!0,userRoles:n})))}H.displayName="AddRolesPopout",x.displayName="OverflowRolesPopout";var V=a.forwardRef((function(e,t){var n,r,i=e.className,l=e.role,u=e.canRemove,f=e.onRemove,p=(0,s.useListItem)(l.id),v=p.tabIndex,_=U(p,["tabIndex"]),h=a.useCallback((function(e){(0,c.openContextMenu)(e,(function(e){return a.createElement(y.default,k({},e,{id:l.id}))}))}),[l.id]),E=null!==(n=l.colorString)&&void 0!==n?n:P.HEXColors.PRIMARY_DARK_300,S=P.HEXColors.WHITE,O=(0,d.hex2int)(E);return null!=O&&(0,d.getDarkness)(O)<.3&&(S=P.HEXColors.PRIMARY_DARK_630),G(m.default,{},void 0,a.createElement("div",k({ref:t,className:(0,o.default)(L.default.role,i),style:{borderColor:null!==(r=(0,d.hex2rgb)(E,.6))&&void 0!==r?r:void 0},onContextMenu:h,"aria-label":u?R.default.Messages.GUILD_SETTINGS_MEMBERS_REMOVE_ROLE.format({roleName:l.name}):l.name,tabIndex:v},_,{role:"option","aria-selected":!1}),G(g.default,{className:L.default.roleCircle,style:{backgroundColor:E},onClick:u?f:void 0,tabIndex:u?v:-1,focusProps:{focusClassName:L.default.roleRemoveIconFocused},"aria-hidden":!0},void 0,u&&G(b.default,{color:S,className:L.default.roleRemoveIcon,"aria-hidden":!0})),G("div",{"aria-hidden":!0,className:L.default.roleName},void 0,l.name)))}));function W(e){var t=e.user,n=e.numRolesHidden,r=(0,s.useListItem)("overflow-more-roles-"+t.id);return G(T.default,{renderPopout:function(t){var n=t.position;return a.createElement(x,k({},e,{position:null!=n?n:T.default.Positions.TOP}))},position:T.default.Positions.TOP,align:T.default.Align.CENTER},void 0,(function(e){return G(m.default,{},void 0,a.createElement("button",k({},e,{className:L.default.overflowButton},r),"+"+n))}))}function Y(e){var t=e.guild,n=e.user,r=e.handleAddRole,o=(0,s.useListItem)("overflow-add-roles-"+n.id);return G(T.default,{renderPopout:function(e){var a=e.closePopout;return G(H,{guild:t,userId:n.id,onSelect:r,onClose:a})},position:T.default.Positions.BOTTOM,align:T.default.Align.CENTER},void 0,(function(e){return G(m.default,{},void 0,a.createElement("button",k({},e,{className:L.default.addButton,"aria-label":R.default.Messages.GUILD_SETTINGS_MEMBERS_ADD_ROLE,type:"button"},o),G(N.default,{className:L.default.addButtonIcon,"aria-hidden":!0})))}))}function z(e){var t=e.user,n=e.guild,r=e.userRoles,i=e.wrap,l=void 0===i||i,d=e.width,f=e.className,c=e.readOnly,v=a.useRef({});var y=a.useCallback((function(e){var a=r.filter((function(t){return t!==e.id}));p.default.updateMemberRoles(n.id,t.id,a,[],[e.id])}),[r,n.id,t.id]),m=a.useCallback((function(e){var a=r;-1===a.indexOf(e)&&(a=a.concat([e])),p.default.updateMemberRoles(n.id,t.id,a,[e],[])}),[r,n.id,t.id]),_=a.useState(null),g=_[0],S=_[1],O=a.useMemo((function(){var e=Object.values(n.roles).filter((function(e){return r.includes(e.id)}));return null!=g?e.slice(0,g):e}),[n.roles,g,r]),I=r.length-O.length;a.useLayoutEffect((function(){if(!l){if("number"!=typeof d)throw new Error("Unexpected null width");for(var e=0,t=0,n=d-30-4,r=0;r<O.length;r++){var a=O[r],o=v.current[a.id];if(null!=o){if((t+=o.offsetWidth+4)>n)break;e++}}S((function(t){return e<O.length?e:t}))}}),[l,d,O]);var T,C=E.default.getCurrentUser(),b=!c&&h.default.can(P.Permissions.MANAGE_ROLES,n),M=A.default.getHighestRole(n,C.id),N=a.useMemo((function(){return"roles-"+u.default.v4()}),[]),D=(0,s.default)({id:N,isEnabled:!0,scrollToStart:B,scrollToEnd:B}),w=O.map((function(e){return a.createElement(V,{role:e,canRemove:b&&A.default.isRoleHigher(n,C.id,M,e),onRemove:function(){return y(e)},ref:function(t){return n=e.id,void(null!=(r=t)?v.current[n]=r:delete v.current[n]);var n,r},key:e.id})}));return null!=g&&0!==I?T=a.createElement(W,k({},e,{numRolesHidden:I})):b&&(T=a.createElement(Y,k({},e,{handleAddRole:m}))),G(s.ListNavigatorProvider,{navigator:D},void 0,G(s.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,n=U(e,["ref"]);return a.createElement("div",k({className:(0,o.default)(L.default.root,f),"aria-label":R.default.Messages.ROLES_LIST.format({numRoles:r.length}),ref:t},n),w,T)})))}t.MemberRole=V,W.displayName="OverflowMoreRolesButton",Y.displayName="OverflowAddRolesButton",z.displayName="MemberRolesList";var K=(0,v.default)(z)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(389),i=s(n(8253)),l=s(n(8258)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t,n=(0,l.default)(e.id,e.shiftId);return a.useEffect((function(){null==n&&(0,o.closeContextMenu)()}),[n]),f(i.default,{onSelect:e.onSelect,navId:"dev-context","aria-label":null!==(t=e["aria-label"])&&void 0!==t?t:u.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onClose:o.closeContextMenu},void 0,n)}c.displayName="DeveloperContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,Object.defineProperty(t,"ComboboxItem",{enumerable:!0,get:function(){return i.ComboboxItem}});var r,a=f(n(0)),o=s(n(9)),i=f(n(8595)),l=s(n(282)),u=s(n(7454));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.children,n=e.placeholder,r=e.value,s=e.onChange,d=e.onClose,f=a.useCallback((function(e){s(e),null==d||d()}),[s,d]);return c(l.default,{className:(0,o.default)(u.default.container)},void 0,c(i.default,{value:r,onChange:f,placeholder:n,children:t,listClassName:u.default.list}))}p.displayName="ComboboxPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCommandSection=function(e,t){return(0,r.useStateFromStores)([s.default,o.default],(function(){return y(t,s.default,o.default,e)}),[t,e])},t.useContextCommands=function(e,t){return(0,r.useStateFromStores)([l.default,u.default,a.default],(function(){return v(e,t,l.default,u.default,a.default)}),[e,t])},t.getContextCommands=v,t.getCommandSection=y;var r=n(3),a=p(n(40)),o=p(n(12)),i=n(8605),l=p(n(8383)),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8469)),s=p(n(8341)),d=n(8260),f=n(1);function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n,r,a){if(e.type===f.ChannelTypes.DM){var o,i=e.getRecipientId();return null!==(o=n.getCommands(i,t))&&void 0!==o?o:u.NO_COMMANDS}return null!=e.guild_id&&a.can(f.Permissions.USE_APPLICATION_COMMANDS,e)?r.getResultCommands(t):u.NO_COMMANDS}function y(e,t,n,r,a){var o=i.BUILT_IN_SECTIONS.find((function(t){return t.id===e}));if(null!=o)return o;if(null!=a)return t.getGuildSection(a,e);if(null!=(null==r?void 0:r.guild_id))return t.getGuildSection(null==r?void 0:r.guild_id,e);if((null==r?void 0:r.type)===f.ChannelTypes.DM&&e===r.getRecipientId()){var l=n.getUser(r.getRecipientId());return null==l?null:{id:e,type:d.ApplicationCommandSectionType.DM,name:l.username,icon:l.avatar}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=v(n(8406)),i=n(8253),l=v(n(10)),u=v(n(40)),s=v(n(36)),d=v(n(160)),f=n(121),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t,n){var r=(0,a.useStateFromStoresArray)([s.default,l.default,u.default],(function(){var e=s.default.getChannelId(t),n=l.default.getChannel(e);return[e,null!=n&&(n.isMultiUserDM()||u.default.can(c.Permissions.SEND_MESSAGES,n))]}),[t]),v=r[0],y=r[1],_=n===c.AppContext.POPOUT;if(!y||_)return null;return m(i.MenuItem,{id:"mention",label:p.default.Messages.MENTION,action:function(){var t=e.username,n=e.discriminator,r="@"+t;d.default.hidePersonalInformation||(r+="#"+n),f.ComponentDispatch.dispatchToLastSubscribed(c.ComponentActions.INSERT_TEXT,{content:r}),null!=v&&o.default.startTyping(v)}})}_.displayName="useMentionUserItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInteractionTimeoutTimestamp=v,t.getInteractionStatusViewState=t.InteractionStatusViewState=t.handleInteractionResponse=t.getFirstSkemaErrorMessage=t.executeMessageComponentInteraction=void 0;var r=c(n(757)),a=c(n(14)),o=n(206),i=c(n(390)),l=n(286),u=n(8612),s=c(n(8610)),d=n(8611),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(){return(p=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}).apply(this,arguments)}function v(e){return null==e||""===e||Number.isNaN(e)?Date.now():r.default.extractTimestamp(e)+9e5}t.executeMessageComponentInteraction=function(e){var t=e.componentType,n=e.messageId,o=e.messageFlags,i=e.customId,d=e.hash,c=e.indices,v=e.applicationId,m=e.channelId,_=e.guildId,E=e.httpBodyData,g=e.localState,S=r.default.fromTimestamp(Date.now());if(s.default.canQueueInteraction(n,S)){(0,u.addQueued)(S,n,{data:{interactionType:l.InteractionTypes.MESSAGE_COMPONENT,customId:i,indices:c},onFailure:function(e,t){return y(m,e,t)}}),null!=g&&(0,u.queueInteractionComponentState)(n,S,g,c);var O={type:l.InteractionTypes.MESSAGE_COMPONENT,nonce:S,guild_id:_,channel_id:m,message_flags:o,message_id:n,application_id:v,data:p({component_type:t,custom_id:i,hash:d},E)};a.default.post({url:f.Endpoints.INTERACTIONS,body:O,timeout:3e3},(function(e){return h(S,e)}))}};var y=function(e,t,n){null==n&&null!=t&&i.default.sendClydeError(e,t)},m=function e(t){for(var n in t){var r=t[n];if(null!=r){var a,o;if("_errors"===n&&Array.isArray(r))return null!==(a=null===(o=r[0])||void 0===o?void 0:o.message)&&void 0!==a?a:null;if("object"==typeof r)return e(r)}}return null};t.getFirstSkemaErrorMessage=m;var _,h=function(e,t){if(!t.ok){if(!t.hasErr){if(t.status>=400&&t.status<500&&t.body){var n,r=null;return t.body.code===f.AbortCodes.INVALID_FORM_BODY&&t.body.errors?(r=m(t.body.errors),void(0,u.setFailed)(e,void 0,r)):void(0,u.setFailed)(e,t.status,null===(n=t.body)||void 0===n?void 0:n.message)}return void(0,u.setFailed)(e,t.body.code)}(0,u.setFailed)(e)}};t.handleInteractionResponse=h,t.InteractionStatusViewState=_,function(e){e[e.SENDING=0]="SENDING",e[e.CREATED=1]="CREATED",e[e.FAILED=2]="FAILED"}(_||(t.InteractionStatusViewState=_={}));t.getInteractionStatusViewState=function(e,t){var n=null==t?void 0:t.state,r=e.state===f.MessageStates.SENT&&v(e.id)<(0,o.now)(),a=(null==t?void 0:t.data.interactionType)===l.InteractionTypes.APPLICATION_COMMAND,i=e.type===f.MessageTypes.APPLICATION_COMMAND;return a&&n===d.InteractionState.QUEUED||i&&e.state===f.MessageStates.SENDING?_.SENDING:a&&n===d.InteractionState.CREATED||e.hasFlag(f.MessageFlags.LOADING)&&!r?_.CREATED:e.hasFlag(f.MessageFlags.LOADING)&&r||i&&e.state===f.MessageStates.SEND_FAILED?_.FAILED:void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackSearchStart=m,t.trackSearchResultViewed=_,t.search=function(e,t,n,r){void 0===n&&(n=!1);""===e?g():(i.default.dispatch({type:c.ActionTypes.GIF_PICKER_QUERY,query:e}),n?h(e,t,r):E(e,t,r))},t.fetchSuggestions=function(e){if(""===e||null==e)return;o.default.get({url:c.Endpoints.GIFS_SUGGEST,query:{q:e,provider:c.GIFProviders.TENOR,limit:5,locale:u.default.locale},oldFormErrors:!0}).then((function(t){var n=t.body;i.default.dispatch({type:c.ActionTypes.GIF_PICKER_SUGGESTIONS_SUCCESS,query:e,items:n})}))},t.resetSearch=g,t.trackSelectGIF=function(e){var t=e.type,n=e.index,r=e.offset,a=e.limit,i=e.results,u=e.totalResults,d=e.query,p=e.gifId,y=(0,f.calculateAnalyticsMetadata)(s.default.getAnalyticsID(),t,{offset:r,limit:a,results:i,totalResults:u});l.default.trackWithMetadata(c.AnalyticEvents.SEARCH_RESULT_SELECTED,v({},y,{index_num:n,source_object:"GIF Picker",query:d})),null!=p&&o.default.post({url:c.Endpoints.GIFS_SELECT,body:{id:p,q:d},oldFormErrors:!0})},t.initializeSearch=function(){var e=a.default.v4().replace(y,"");l.default.trackWithMetadata(c.AnalyticEvents.SEARCH_OPENED,{search_type:c.SearchTypes.GIF,load_id:e}),i.default.wait((function(){i.default.dispatch({type:c.ActionTypes.GIF_PICKER_INITIALIZE,analyticsID:e})}))},t.fetchTrending=function(){o.default.get({url:c.Endpoints.GIFS_TRENDING,query:{provider:c.GIFProviders.TENOR,locale:u.default.locale,media_format:s.default.getSelectedFormat()},oldFormErrors:!0}).then((function(e){var t=e.body,n=t.categories,r=t.gifs;i.default.dispatch({type:c.ActionTypes.GIF_PICKER_TRENDING_FETCH_SUCCESS,trendingCategories:n,trendingGIFPreview:r[0]})}))},t.fetchTrendingGIFs=function(e){var t=Date.now();m(c.GIFPickerResultTypes.TRENDING_GIFS),o.default.get({url:c.Endpoints.GIFS_TRENDING_GIFS,query:{media_format:s.default.getSelectedFormat(),provider:c.GIFProviders.TENOR,locale:u.default.locale,limit:e},oldFormErrors:!0}).then((function(n){var r=n.body;_(r,c.GIFPickerResultTypes.TRENDING_GIFS,{startTime:t,limit:e}),i.default.dispatch({type:c.ActionTypes.GIF_PICKER_QUERY_SUCCESS,items:r})}),(function(){i.default.dispatch({type:c.ActionTypes.GIF_PICKER_QUERY_FAILURE})}))},t.addFavoriteGIF=function(e){i.default.dispatch({type:c.ActionTypes.GIF_FAVORITE_ADD,gif:e}),d.default.track(c.AnalyticEvents.GIF_FAVORITED)},t.removeFavoriteGIF=function(e){i.default.dispatch({type:c.ActionTypes.GIF_FAVORITE_REMOVE,url:e}),d.default.track(c.AnalyticEvents.GIF_UNFAVORITED)},t.fetchTrendingSearchTerms=function(){o.default.get({url:c.Endpoints.GIFS_TRENDING_SEARCH,query:{provider:c.GIFProviders.TENOR,limit:5,locale:u.default.locale},oldFormErrors:!0}).then((function(e){var t=e.body;i.default.dispatch({type:c.ActionTypes.GIF_PICKER_TRENDING_SEARCH_TERMS_SUCCESS,items:t})}))};var r=p(n(8)),a=p(n(98)),o=p(n(14)),i=p(n(2)),l=p(n(106)),u=p(n(39)),s=p(n(8613)),d=p(n(13)),f=n(9371),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){return(v=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}).apply(this,arguments)}var y=/-/g;function m(e){var t,n=null!=e?((t={})[e]=1,t):{};l.default.trackWithMetadata(c.AnalyticEvents.SEARCH_STARTED,{search_type:c.SearchTypes.GIF,load_id:s.default.getAnalyticsID(),num_modifiers:Object.keys(n).length,modifiers:n})}function _(e,t,n){void 0===n&&(n={});var r=n,a=r.startTime,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(r,["startTime"]),i={offset:0,limit:null,totalResults:e.length},u=(0,f.calculateAnalyticsMetadata)(s.default.getAnalyticsID(),t,v({},i,{},o,{results:e})),d=null==a?{}:{load_duration_ms:Date.now()-a};l.default.trackWithMetadata(c.AnalyticEvents.SEARCH_RESULT_VIEWED,v({},u,{},d))}function h(e,t,n){var r=Date.now();m(t),o.default.get({url:c.Endpoints.GIFS_SEARCH,query:{q:e,media_format:s.default.getSelectedFormat(),provider:c.GIFProviders.TENOR,locale:u.default.locale,limit:n},oldFormErrors:!0}).then((function(a){var o=a.body;_(o,t,{startTime:r,limit:n}),i.default.dispatch({type:c.ActionTypes.GIF_PICKER_QUERY_SUCCESS,query:e,items:o})}),(function(){return i.default.dispatch({type:c.ActionTypes.GIF_PICKER_QUERY_FAILURE,query:e})}))}var E=r.default.debounce(h,250);function g(){i.default.dispatch({type:c.ActionTypes.GIF_PICKER_QUERY,query:""})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M17,13.6 L17.3999992,13.6 C19.0406735,13.6 20.496781,12.8097754 21.4084757,11.5891722 L21.8198761,18.8298199 C21.913864,20.4840062 20.6490733,21.9011814 18.994887,21.9951692 C18.9382174,21.9983891 18.8814679,22 18.8247069,22 L5.1752931,22 C3.51843885,22 2.1752931,20.6568542 2.1752931,19 C2.1752931,18.943239 2.17690401,18.8864895 2.18012387,18.8298199 L2.59152425,11.5891732 C3.503219,12.8097758 4.95932613,13.6 6.6,13.6 L7,13.6 L7,15 L9,15 L9,13.6 L15,13.6 L15,15 L17,15 L17,13.6 Z M7,16 L7,18 L9,18 L9,16 L7,16 Z M15,16 L17,16 L17,18 L15,18 L15,16 Z M15,11.6 L9,11.6 L9,9 L7,9 L7,11.6 L6.6,11.6 C4.94314575,11.6 3.6,10.2568542 3.6,8.6 L3.6,5 C3.6,3.34314575 4.94314575,2 6.6,2 L17.3999992,2 C19.0568535,2 20.3999992,3.34314575 20.3999992,5 L20.3999992,8.6 C20.3999992,10.2568542 19.0568535,11.6 17.3999992,11.6 L17,11.6 L17,9 L15,9 L15,11.6 Z"})))}d.displayName="Library"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))}d.displayName="At"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{className:e.background,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M15 12C15 12.0007 15 12.0013 15 12.002C15 12.553 14.551 13.002 14 13.002V15.002C15.654 15.002 17 13.657 17 12.002C17 12.0013 17 12.0007 17 12H15ZM19 12C19 12.0007 19 12.0013 19 12.002C19 14.759 16.757 17.002 14 17.002V19.002C17.86 19.002 21 15.863 21 12.002C21 12.0013 21 12.0007 21 12H19ZM10.293 3.29604C10.579 3.01004 11.009 2.92504 11.383 3.07904C11.757 3.23204 12 3.59904 12 4.00204V20.002C12 20.407 11.757 20.772 11.383 20.927C11.009 21.082 10.579 20.996 10.293 20.71L6 16.002H3C2.45 16.002 2 15.552 2 15.002V9.00204C2 8.45304 2.45 8.00204 3 8.00204H6L10.293 3.29604Z"}),o("path",{className:s,fill:l,d:"M21.025 5V4C21.025 2.88 20.05 2 19 2C17.95 2 17 2.88 17 4V5C16.4477 5 16 5.44772 16 6V9C16 9.55228 16.4477 10 17 10H19H21C21.5523 10 22 9.55228 22 9V5.975C22 5.43652 21.5635 5 21.025 5ZM20 5H18V4C18 3.42857 18.4667 3 19 3C19.5333 3 20 3.42857 20 4V5Z"}))}i.displayName="SpeakerLimited"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={setDiversityColor:function(e){a.default.dispatch({type:o.ActionTypes.EMOJI_DIVERSITY_COLOR_CHANGE,color:e})},fetchEmoji:function(e){a.default.maybeDispatch({type:o.ActionTypes.EMOJI_FETCH,guildId:e}),r.default.get({url:o.Endpoints.GUILD_EMOJIS(e),oldFormErrors:!0}).then((function(t){return a.default.dispatch({type:o.ActionTypes.EMOJI_FETCH_SUCCESS,guildId:e,emojis:t.body})}),(function(){return a.default.dispatch({type:o.ActionTypes.EMOJI_FETCH_FAILURE,guildId:e})}))},uploadEmoji:function(e,t,n){return a.default.dispatch({type:o.ActionTypes.EMOJI_UPLOAD_START,guildId:e}),r.default.post({url:o.Endpoints.GUILD_EMOJIS(e),body:{image:t,name:n},oldFormErrors:!0}).then((function(){return a.default.dispatch({type:o.ActionTypes.EMOJI_UPLOAD_STOP,guildId:e})}),(function(t){return a.default.dispatch({type:o.ActionTypes.EMOJI_UPLOAD_STOP,guildId:e}),Promise.reject(t)}))},deleteEmoji:function(e,t){a.default.dispatch({type:o.ActionTypes.EMOJI_DELETE,guildId:e,emojiId:t}),r.default.delete({url:o.Endpoints.GUILD_EMOJI(e,t),oldFormErrors:!0})},updateEmoji:function(e,t,n){r.default.patch({url:o.Endpoints.GUILD_EMOJI(e,t),body:{name:n},oldFormErrors:!0})},favoriteEmoji:function(e){a.default.dispatch({type:o.ActionTypes.EMOJI_FAVORITE,emoji:e})},unfavoriteEmoji:function(e){a.default.dispatch({type:o.ActionTypes.EMOJI_UNFAVORITE,emoji:e})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useMutedUntilText=s,t.default=function(e){var t=e.muteConfig,n=e.className,r=s(t);return null!=r?u(a.default,{size:a.default.Sizes.SIZE_12,color:a.default.Colors.MUTED,className:n},void 0,r):null};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(24)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){return null==e||null==e.end_time?null:o.default.Messages.MUTED_UNTIL_TIME.format({endTime:new Date(e.end_time).toLocaleString(o.default.getLocale(),{month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit"})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openStickerPackViewAllModal=t.StickerPackViewAllModalFooter=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=L(n(9)),i=L(n(378)),l=n(3),u=n(692),s=L(n(5696)),d=L(n(12)),f=L(n(271)),c=L(n(29)),p=L(n(5828)),v=L(n(5686)),y=n(35),m=n(41),_=L(n(13)),h=L(n(96)),E=n(139),g=n(9464),S=n(398),O=n(5944),I=L(n(362)),T=n(290),C=n(8626),b=L(n(8866)),M=L(n(9466)),N=n(1),A=L(n(6)),P=L(n(7523)),R=L(n(7349));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var k=(0,E.cssValueToNumber)(R.default.stickerPurchasePackPreviewDimensions),U=(0,E.cssValueToNumber)(R.default.stickerPurchasePackPreviewPadding),G=(0,E.cssValueToNumber)(R.default.stickerPurchasePackPreviewMargin),F=k+2*U,B=(0,i.default)(g.resetInspectedStickerPosition,250),H=function(){B.cancel()},x=function(e){var t=e.visibleRowIndex,n=e.columnIndex;B.cancel(),(0,g.setInspectedStickerPosition)(n,t,S.InspectedStickerChangeSource.MOUSE_EVENT)},V=function(e){var t,n=e.stickerPack,r=e.width,i=e.hasHeaderImage,l=e.isScrolling,u=e.onInspect,s=a.useMemo((function(){return[(0,T.createStickerPackCategory)(n)]}),[n]),d=(0,g.useStickerViewAllStore)((function(e){return e.inspectedStickerPosition})),f=(0,O.useStickersGrid)({stickersCategories:s,stickerNodeMargin:G,stickerNodeWidth:F,listWidth:r}),c=f.rowCountBySection,p=f.stickersGrid,v=f.gutterWidth;return j("div",{className:(0,o.default)(P.default.container,(t={},t[P.default.containerWithHeader]=i,t))},void 0,j(M.default,{className:P.default.header,stickerPack:n,withDescription:!0},n.id),j("div",{onFocus:H,onBlur:B,onMouseOver:H,onMouseOut:B},void 0,function(){if(0===c.length)return null;for(var e=[],t=0;t<c[0];t++)e.push(j(b.default,{enlargeOnInteraction:!0,preferAnimation:!0,gutterWidth:v,inspectedStickerPosition:d,isScrolling:l,onInspect:u,rowIndex:t,stickerDescriptors:p[t],stickerPadding:U,stickerSize:k,isDisplayingIndividualStickers:!0,checkSendability:!1},t));return e}()))};V.displayName="StickerPackViewAllModalBody";var W=function(e){var t=e.onClose,n=e.stickerPack;(0,O.useFetchStickerPacks)();var r=(0,l.useStateFromStores)([d.default],(function(){return d.default.getNullableCurrentUser()})),a=(0,l.useStateFromStores)([I.default],(function(){return I.default.isPremiumPack(n.id)}));return j(y.ModalFooter,{className:P.default.footer},void 0,j(f.default,{onClick:t,className:P.default.skuPreviewFooterCloseButton},void 0,A.default.Messages.CLOSE),a&&!h.default.isPremium(r,N.PremiumTypes.TIER_2)&&j(p.default,{color:c.default.Colors.GREEN,type:"submit",innerClassName:P.default.premiumButtonInner,onClick:function(){t(),(0,C.openStickerPackPremiumUpsellModal)({section:N.AnalyticsSections.STICKER_PACK_VIEW_ALL})}},void 0,j(v.default,{className:P.default.premiumButtonNitroWheel}),A.default.Messages.STICKER_PACK_AVAILABLE_WITH_PREMIUM))};t.StickerPackViewAllModalFooter=W,W.displayName="StickerPackViewAllModalFooter";var Y=function(e){var t=e.stickerPack,n=e.onClose,r=(0,T.getStickerPackBannerAssetUrl)(t,1024);return null==r?null:j(y.ModalHeader,{className:P.default.headerWithImage},void 0,j("div",{role:"image",style:{backgroundImage:"url("+r+")"},className:P.default.backgroundImage}),j(y.ModalCloseButton,{className:P.default.closeButton,onClick:n}))};Y.displayName="StickerPackViewAllModalHeader";var z=function(e){var t=e.onClose,n=e.stickerPack,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClose","stickerPack"]),o=a.useState(null),i=o[0],l=o[1],d=a.useRef(null);return a.useLayoutEffect((function(){(0,g.resetInspectedStickerPosition)(),null!=d.current&&l(d.current.offsetWidth)}),[]),a.createElement(y.ModalRoot,w({},r,{"aria-labelledby":"sticker-pack-sku-preview-modal"}),j(s.default,{hideBreadcrumbs:!0,body:a.createElement("div",{ref:d},null!=i&&j(V,{stickerPack:n,hasHeaderImage:!0,onInspect:x,width:i})),footer:j(W,{onClose:t,stickerPack:n}),header:j(Y,{onClose:t,stickerPack:n}),onScroll:B,steps:[u.Step.SKU_PREVIEW],currentStep:u.Step.SKU_PREVIEW}))};z.displayName="StickerPackViewAllModal";t.openStickerPackViewAllModal=function(e){var t=e.stickerPack,n=e.sourceSticker,r=e.analyticsLocation;return _.default.track(N.AnalyticEvents.STICKER_PACK_VIEW_ALL,{sticker_id:null==n?void 0:n.id,sticker_pack_id:t.id,location:r}),_.default.track(N.AnalyticEvents.OPEN_MODAL,{type:N.AnalyticsSections.STICKER_PACK_VIEW_ALL,location:r}),(0,m.openModal)((function(e){return a.createElement(z,w({stickerPack:t},e))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var u={createChannelFollower:function(e,t){return r.default.post({url:o.Endpoints.CHANNEL_FOLLOWERS(t),body:{webhook_channel_id:e},oldFormErrors:!0})},fetchChannelFollowerStats:function(e){return(t=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a.default.dirtyDispatch({type:o.ActionTypes.CHANNEL_FOLLOWER_STATS_FETCH_START}),t.prev=1,t.next=4,r.default.get({url:o.Endpoints.CHANNEL_FOLLOWER_STATS(e),body:{channel_id:e},oldFormErrors:!0});case 4:n=t.sent,a.default.dispatch({type:o.ActionTypes.CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS,stats:n.body,channelId:e}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),a.default.dispatch({type:o.ActionTypes.CHANNEL_FOLLOWER_STATS_FETCH_FAILURE,channelId:e});case 11:case"end":return t.stop()}}),t,null,[[1,8]])})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))})();var t},dismissPublishBump:function(e){a.default.dispatch({type:o.ActionTypes.CHANNEL_FOLLOWING_PUBLISH_BUMP_DISMISSED,messageId:e})},permanentlyHidePublishBump:function(e){a.default.dispatch({type:o.ActionTypes.CHANNEL_FOLLOWING_PUBLISH_BUMP_HIDE_PERMANENTLY,channelId:e})}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(10342)),l=p(n(184)),u=p(n(8443)),s=n(1),d=p(n(6)),f=p(n(7342)),c=p(n(7341));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t,n,r=e.className,l=e.message,p=e.children,v=e.content,m=e.onUpdate,_=l.isEdited(),h=l.state===s.MessageStates.SEND_FAILED,E=l.state===s.MessageStates.SENDING,g=l.type===s.MessageTypes.APPLICATION_COMMAND,S=null===(t=l.editedTimestamp)||void 0===t?void 0:t.toString(),O=a.useRef(!1);return a.useLayoutEffect((function(){O.current?null!=m&&m():O.current=!0}),[m,l.content,v,S,p]),y("div",{className:(0,o.default)(r,f.default.markup,(n={},n[c.default.messageContent]=!0,n[c.default.isSending]=E&&!g,n[c.default.markupRtl]="rtl"===(0,i.default)(l.content),n[c.default.isFailed]=h,n))},void 0,p||function(e,t){return e.hasFlag(s.MessageFlags.SOURCE_MESSAGE_DELETED)?d.default.Messages.SOURCE_MESSAGE_DELETED:t}(l,v),_&&null!=l.editedTimestamp&&y(u.default,{timestamp:l.editedTimestamp},void 0,y("span",{className:c.default.edited},void 0,"(",d.default.Messages.MESSAGE_EDITED,")")))}m.displayName="MessageContent";var _=a.memo(m,(function(e,t){var n,r,a=t.message,o=e.message;return(0,l.default)(e,t,["message"])&&a.content===o.content&&a.state===o.state&&(null===(n=a.editedTimestamp)||void 0===n?void 0:n.toString())===(null===(r=o.editedTimestamp)||void 0===r?void 0:r.toString())}));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedVideo=N,t.EmbedGIFV=A,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=I(n(142)),l=n(293),u=n(1161),s=n(1308),d=n(1239),f=I(n(61)),c=I(n(9551)),p=I(n(8337)),v=I(n(8467)),y=I(n(8592)),m=n(8517),_=n(5973),h=I(n(255)),E=n(1),g=I(n(6)),S=I(n(7571)),O=I(n(7342));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e){var t=e.className,n=e.maxWidth,r=e.maxHeight,l=e.thumbnail,u=e.video,s=e.allowFullScreen,f=void 0===s||s,c=e.renderImageComponent,p=e.renderVideoComponent,v=e.renderLinkComponent,m=e.playable,_=void 0===m||m,h=e.autoPlay,E=void 0!==h&&h,g=e.autoMute,O=e.volume,I=e.onPlay,T=e.onEnded,C=e.onVolumeChange,N=e.onMute,A=e.href,P=a.useState(E),R=P[0],L=P[1],D=function(e){e.preventDefault(),e.stopPropagation(),I&&I(!1),L(!0)},w=l.width,j=l.height;R&&null!=u&&(w=u.width,j=u.height);var k=(0,d.fit)(w,j,n,r);w=Math.max(k.width,256),j=Math.max(k.height,144);var U=l.proxyURL||l.url;if(null!=u&&null!=u.proxyURL)return M("div",{className:(0,o.default)(S.default.embedVideo,t)},void 0,p({poster:U,src:u.proxyURL,width:w,height:j,autoPlay:E,onEnded:T,naturalWidth:u.width,naturalHeight:u.height,onVolumeChange:C,playable:_,autoMute:g,volume:O,onPlay:I,onMute:N}));if(R&&null!=u){var G=i.default.parse(u.url,!0);G.query=b({},G.query,{autoplay:"1",auto_play:"1"}),G.search=null;var F=i.default.format(G);return M("div",{className:(0,o.default)(S.default.embedVideo,t),style:{width:w,height:j}},void 0,M("iframe",{className:S.default.embedIframe,src:F,width:w,height:j,frameBorder:0,allowFullScreen:f,sandbox:"allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"}))}return M("div",{className:(0,o.default)(S.default.embedVideo,t),style:{width:w,height:j}},void 0,c({src:U,width:w,height:j,className:S.default.embedVideoImageComponent,imageClassName:S.default.embedVideoImageComponentInner,onClick:_&&null!=u?D:null}),M("div",{className:S.default.embedVideoActions},void 0,M("div",{className:S.default.centerContent},void 0,_?M(y.default,{onPlay:null!=u?D:null,externalURL:A,renderLinkComponent:v}):null)))}function A(e){var t=e.className,n=e.href,r=e.autoPlay,a=e.maxWidth,i=e.maxHeight,l=e.thumbnail,u=e.video,s=e.renderImageComponent,d=e.playable,f=void 0===d||d;return M(c.default,{className:(0,o.default)(S.default.embedVideo,t),original:n,poster:l.proxyURL||l.url,src:u.proxyURL||u.url,width:l.width,height:l.height,naturalHeight:u.height,naturalWidth:u.width,maxWidth:a,maxHeight:i,autoPlay:r,playable:f,renderImageComponent:s})}function P(e){var t=e.className,n=e.embed.url;if(null==n)return null;var r=null,a=null;try{var u=i.default.parse(n,!0);r=u.host,a=u.pathname}catch(e){return null}if("open.spotify.com"!==r||null==a)return null;var s=a.split("/"),d=null!=s[1]?s[1].toLowerCase():null,f=null!=s[3]?s[3].toLowerCase():null,c=s[4];return!["track","playlist","album","artist","user"].includes(d||"")||"user"===d&&"playlist"!==f?null:("user"===d&&"playlist"===f&&null!=c&&(a="/playlist/"+c),M("iframe",{className:(0,o.default)(S.default.embedSpotify,t),src:l.SpotifyEndpoints.EMBED(a),style:{width:400,height:"track"===d?80:300},frameBorder:0,sandbox:"allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"}))}N.displayName="EmbedVideo",A.displayName="EmbedGIFV",P.displayName="SpotifyEmbed";var R=M(h.default,{width:16,height:16}),L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:!t.props.spoiler},t.renderGalleryImageChildren=function(e){var t=e.src,n=e.alt;return M("img",{className:S.default.embedGalleryImageElement,alt:n,src:t})},t.renderImageChildren=function(e){var t=e.src,n=e.size,r=e.alt;return M("img",{className:e.className||void 0,alt:r,src:t,style:n})},t.onReveal=function(){t.setState({isVisible:!0})},t.renderMediaEmbed=function(e){var n;void 0===e&&(e=!1);var r=t.props,a=r.spoiler,i=r.className;return M("div",{"aria-hidden":e,className:(0,o.default)(S.default.embed,i,(n={},n[S.default.spoilerAttachment]=a,n[S.default.hiddenSpoiler]=e,n))},void 0,t.renderMedia(e))},t.renderEmbedContent=function(e){var n,r;void 0===e&&(e=!1);var a=t.props,i=a.className,l=a.onSuppressEmbed,u=a.spoiler,s=t.renderAll(),d=s.provider,f=s.author,c=s.title,p=s.description,v=s.fields,y=s.thumbnail,m=s.media,_=s.footer;return M("div",{className:(0,o.default)(i,S.default.embedFull,O.default.markup,(n={},n[S.default.hiddenSpoiler]=e,n[S.default.spoilerEmbed]=u,n)),"aria-hidden":e,style:{borderColor:t.getEmbedColor(e),maxWidth:t.getMaxWidth()}},void 0,M("div",{className:(0,o.default)((r={},r[S.default.grid]=!0,r[S.default.hasThumbnail]=null!=y,r))},void 0,l?t.renderSuppressButton(l):null,d,f,c,p,v,m,y,_))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var a=r.prototype;return a.renderProvider=function(e){void 0===e&&(e=!0);var t=this.props,n=t.embed.provider,r=t.renderLinkComponent;return null==n?null:M("div",{className:(0,o.default)(S.default.embedProvider,S.default.embedMargin)},void 0,null!=n.url?r({className:S.default.embedLink,href:n.url,tabIndex:e?0:-1,children:n.name,target:"_blank",rel:"noreferrer noopener"}):M("span",{},void 0,n.name))},a.renderAuthor=function(e){void 0===e&&(e=!0);var t=this.props,n=t.embed.author,r=t.renderLinkComponent;return null==n?null:M("div",{className:(0,o.default)(S.default.embedAuthor,S.default.embedMargin)},void 0,null!=n.iconProxyURL?M("img",{alt:"",className:S.default.embedAuthorIcon,src:n.iconProxyURL}):null,null!=n.url?r({className:S.default.embedAuthorNameLink,href:n.url,tabIndex:e?0:-1,children:n.name,target:"_blank",rel:"noreferrer noopener"}):M("span",{className:S.default.embedAuthorName},void 0,n.name))},a.renderTitle=function(e){void 0===e&&(e=!0);var t=this.props,n=t.embed,r=t.renderLinkComponent,a=t.renderTitle,i=n.rawTitle,l=n.url;return null==i?null:M("div",{className:(0,o.default)(S.default.embedTitle,S.default.embedMargin)},void 0,null!=l?r({className:S.default.embedTitleLink,href:l,tabIndex:e?0:-1,children:a(n,i),target:"_blank",rel:"noreferrer noopener"}):a(n,i))},a.renderDescription=function(){var e=this.props,t=e.embed,n=e.renderDescription,r=t.rawDescription;return null==r?null:M("div",{className:(0,o.default)(S.default.embedDescription,S.default.embedMargin)},void 0,n(t,r))},a.renderThumbnail=function(e){void 0===e&&(e=!0);var t=this.props,n=t.embed.thumbnail,r=t.maxThumbnailWidth,a=t.maxThumbnailHeight,o=t.renderImageComponent,i=t.autoPlayGif;return null==n?null:M(_.MessagesInteractionContext.Consumer,{},void 0,(function(t){var l=t.disableAnimations;return o({className:S.default.embedThumbnail,src:n.proxyURL||n.url,original:n.url,width:n.width,height:n.height,maxWidth:r,maxHeight:a,shouldLink:e,autoPlay:i&&!l})}))},a.renderFields=function(){var e=this,t=this.props.embed,n=t.fields;if(null==n)return null;var r=[],a=null;return n.forEach((function(n){var o=n.rawName,i=n.rawValue,l=n.inline;l||null==a||(r.push(a),a=null),null==a&&(a=[]),a.push([e.props.renderTitle(t,o),e.props.renderDescription(t,i)]),3!==a.length&&l||(r.push(a),a=null)})),null!=a&&r.push(a),M("div",{className:S.default.embedFields},void 0,r.map((function(e,t){var n=e.length;return e.map((function(e,r){var a,o,i,l,u=e[0],s=e[1];return M("div",{className:S.default.embedField,style:{gridColumn:(a=r,o=n,i=12/o,l=a*i,l+1+" / "+(l+i+1))}},t+"-"+r,M("div",{className:S.default.embedFieldName},void 0,u),M("div",{className:S.default.embedFieldValue},void 0,s))}))})))},a.renderImages=function(e){var t=this,n=void 0===e?{}:e,r=n.hiddenSpoiler,a=void 0!==r&&r,o=n.isVisible,i=void 0===o||o,l=this.props,u=l.embed,s=l.maxMediaHeight;if(null==u.images)return null;var d=u.images.map((function(e){return t.renderImage({hiddenSpoiler:a,isVisible:i,image:e,isGalleryImage:!0})})),f=d[0],c=d[1],p=d[2],v=d[3];return null==f&&null==c&&null==p&&null==v?null:M("div",{className:S.default.embedGalleryImagesWrapper,style:{height:s}},void 0,M("div",{className:S.default.embedGallerySide},void 0,f,null!=v&&p),M("div",{className:S.default.embedGallerySide},void 0,c,null==v&&null!=p&&p,null!=v&&v))},a.renderImage=function(e){var t=this,n=void 0===e?{}:e,r=n.hiddenSpoiler,a=void 0!==r&&r,i=n.isVisible,l=void 0===i||i,u=n.image,s=n.isGalleryImage,d=void 0!==s&&s,f=this.props,c=f.maxMediaWidth,v=f.maxMediaHeight,y=f.renderImageComponent,h=f.className,E=f.autoPlayGif;if(null==u)return null;var g=p.default.isAnimated({src:u.proxyURL||u.url,original:u.url,animated:!1});return M(m.GIFAccessoryContext.Consumer,{},void 0,(function(e){return M(_.MessagesInteractionContext.Consumer,{},u.url,(function(n){var r,i=n.disableAnimations;return y({className:(0,o.default)(h,(r={},r[S.default.embedMedia]=!d,r[S.default.embedImage]=!d,r)),src:u.proxyURL||u.url,width:u.width,height:u.height,maxWidth:c,maxHeight:v,children:d?t.renderGalleryImageChildren:t.renderImageChildren,renderAccessory:g?e:null,original:u.url,autoPlay:E&&!i&&!a,shouldLink:l})}))}))},a.renderVideo=function(e){var t=void 0===e?{}:e,n=t.gifv,r=void 0!==n&&n,a=t.isVisible,o=void 0===a||a,i=t.hiddenSpoiler,l=void 0!==i&&i,u=this.props,s=u.embed,d=s.url,f=s.thumbnail,c=s.video,p=u.maxMediaWidth,v=u.maxMediaHeight,y=u.renderVideoComponent,m=u.renderImageComponent,h=u.renderLinkComponent,E=u.allowFullScreen,g=u.autoPlayGif;return null==d||null==f?null:r?null==c?null:M(_.MessagesInteractionContext.Consumer,{},void 0,(function(e){var t=e.disableAnimations;return M(A,{className:S.default.embedMedia,href:d,thumbnail:f,video:c,maxWidth:p,maxHeight:v,autoPlay:!l&&g&&!t&&o,renderImageComponent:m,playable:o})})):M(N,{className:S.default.embedMedia,href:d,allowFullScreen:E,thumbnail:f,video:c,maxWidth:p,maxHeight:v,renderImageComponent:m,renderVideoComponent:y,renderLinkComponent:h,playable:o&&!l})},a.renderFooter=function(){var e=this.props.embed,t=e.footer,n=e.timestamp;if(null!=t){var r=t.iconProxyURL||t.iconURL;return M("div",{className:(0,o.default)(S.default.embedFooter,S.default.embedMargin)},void 0,null!=r?M("img",{alt:"",className:S.default.embedFooterIcon,src:r}):null,M("span",{className:S.default.embedFooterText},void 0,t.text,null!=t.text&&null!=n?M("span",{className:S.default.embedFooterSeparator},void 0,"•"):null,null!=n?(0,u.calendarFormat)(n):null))}if(null!=n)return M("div",{className:(0,o.default)(S.default.embedFooter,S.default.embedMargin)},void 0,M("span",{className:S.default.embedFooterText},void 0,(0,u.calendarFormat)(n)))},a.renderMedia=function(e){void 0===e&&(e=!1);var t=this.props.embed,n=this.state.isVisible;switch(t.type){case E.EmbedTypes.GIFV:return this.renderVideo({gifv:!0,hiddenSpoiler:e,isVisible:n});case E.EmbedTypes.VIDEO:default:return null!=t.video?this.renderVideo({gifv:!1,hiddenSpoiler:e,isVisible:n}):null!=t.images?this.renderImages({hiddenSpoiler:e,isVisible:n}):this.renderImage({hiddenSpoiler:e,isVisible:n,image:t.image})}},a.renderAll=function(){var e,t=this.props,n=t.embed,r=t.hideMedia,a=this.state.isVisible,o=this.renderProvider(a),i=this.renderAuthor(a),l=this.renderTitle(a);switch(n.type){case E.EmbedTypes.IMAGE:case E.EmbedTypes.VIDEO:case E.EmbedTypes.GIFV:break;default:e=this.renderDescription()}var u,s=this.renderFields();r||(u=this.renderMedia(!a));var d=this.renderFooter(),f=null==u;return n.type===E.EmbedTypes.RICH&&(f=null==n.video),{provider:o,author:i,title:l,description:e,thumbnail:!r&&f?this.renderThumbnail(a):null,fields:s,media:u,footer:d}},a.getMaxWidth=function(){var e=this.props,t=e.maxMediaWidth,n=e.maxMediaHeight,r=e.embed,a=r.image,o=r.video,i=a||o;if(null!=i){var l=(0,d.fit)(i.width,i.height,t,n).width;return l>=300?l+32:void 0}},a.isInline=function(){var e=this.props,t=e.hideMedia,n=e.embed;return!t&&(0,s.isEmbedInline)(n)},a.renderSuppressButton=function(e){return M(f.default,{focusProps:{offset:{bottom:4}},className:S.default.embedSuppressButton,onClick:e,"aria-label":g.default.Messages.SUPPRESS_ALL_EMBEDS},void 0,R)},a.getEmbedColor=function(e){var t=this.props.embed.color;return null!=t&&"#ffffff"===t.toLowerCase()||e?void 0:t},a.render=function(){var e=this.props,t=e.embed,n=e.spoiler,r=e.className;return null!=t.provider&&"Spotify"===t.provider.name?M(P,{embed:t,className:r}):this.isInline()?n?M(v.default,{type:v.default.Types.ATTACHMENT,onReveal:this.onReveal},void 0,this.renderMediaEmbed):this.renderMediaEmbed():n?M(v.default,{type:v.default.Types.EMBED,onReveal:this.onReveal},void 0,this.renderEmbedContent):this.renderEmbedContent()},r}(a.PureComponent);t.default=L,L.displayName="Embed",L.defaultProps={hideMedia:!1,allowFullScreen:!0,maxThumbnailWidth:80,maxThumbnailHeight:80,maxMediaWidth:400,maxMediaHeight:300,spoiler:!1}},function(e,t,n){"use strict";function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.GIFAccessoryContext=void 0;var a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0)).createContext((function(){return null}));t.GIFAccessoryContext=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SlideIn=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(273)),l=n(123),u=s(n(7582));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v={friction:7,tension:60},y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).animation=new i.default.Value(0),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.componentWillAppear=function(e){this.animateTo(1).start(e)},a.componentWillEnter=function(e){this.animateTo(1).start(e)},a.componentWillLeave=function(e){this.context.reducedMotion.enabled?this.animateTo(0).start(e):i.default.stagger(250,[this.animateTo(1.3),this.animateTo(0)]).start(e)},a.animateTo=function(e){return i.default.spring(this.animation,c({},v,{toValue:e}))},a.getAnimatedStyle=function(){var e=this.context.reducedMotion;return i.default.accelerate({opacity:this.animation,transform:e.enabled?void 0:[{translateY:this.animation.interpolate({inputRange:[0,1],outputRange:["150%","0%"]})}]})},a.render=function(){var e=this.props,t=e.className,n=e.children;return f(i.default.div,{className:(0,o.default)(t,u.default.slider),style:this.getAnimatedStyle()},void 0,n)},r}(a.Component);t.SlideIn=y,y.displayName="SlideIn",y.contextType=l.AccessibilityPreferencesContext;var m=y;t.default=m},function(e,t,n){e.exports=n.p+"e06a573355c490f7ce6e3125ac01db81.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M4 2.5C2.897 2.5 2 3.397 2 4.5V15.5C2 16.604 2.897 17.5 4 17.5H11V19.5H7V21.5H17V19.5H13V17.5H20C21.103 17.5 22 16.604 22 15.5V4.5C22 3.397 21.103 2.5 20 2.5H4ZM14.5483 6L16 7.45174L13.4466 9.99485L16 12.5483L14.5483 14L12.0051 11.4466L9.45174 14L8 12.5483L10.5534 9.99485L8 7.45174L9.45174 6L12.0051 8.55341L14.5483 6Z",fill:d}))}d.displayName="StopStream"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=n(481),i=l(n(8569));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s={},d={},f={};var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),r.prototype.getInvite=function(e,t){var n,r,a=void 0===t?{}:t,i=a.targetType,l=a.targetUserId,u=a.targetApplicationId;return i===o.InviteTargetTypes.STREAM&&null!=l?null===(n=d[e])||void 0===n?void 0:n[l]:i===o.InviteTargetTypes.EMBEDDED_APPLICATION&&null!=u?null===(r=f[e])||void 0===r?void 0:r[u]:s[e]},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return s={},d={},void(f={})},CHANNEL_DELETE:function(e){var t=e.channel;delete s[t.id],delete d[t.id],delete f[t.id]},INSTANT_INVITE_CREATE:function(e){},INSTANT_INVITE_CREATE_SUCCESS:function(e){var t=e.channelId,n=e.invite,r=i.default.createFromServer(n);r.targetType===o.InviteTargetTypes.STREAM&&null!=r.targetUser?(null==d[t]&&(d[t]={}),d[t][String(r.targetUser.id)]=r):r.targetType===o.InviteTargetTypes.EMBEDDED_APPLICATION&&null!=r.targetApplication?(null==f[t]&&(f[t]={}),f[t][r.targetApplication.id]=r):s[t]=r},INSTANT_INVITE_CREATE_FAILURE:function(e){var t=e.channelId;s[t]=null},INSTANT_INVITE_REVOKE_SUCCESS:function(e){var t=e.channelId;s[t]=null}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(122),l=n(123),u=f(n(88)),s=n(1),d=f(n(7610));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y={mass:1,tension:250},m={TOP:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z",BOTTOM:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"},_={TOP:"M6.56666 11.0013L6.56666 8.96683L13.5667 8.96683L13.5667 11.0013L6.56666 11.0013Z",BOTTOM:"M13.5582 8.96683L13.5582 11.0013L6.56192 11.0013L6.56192 8.96683L13.5582 8.96683Z"},h={TOP:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z",BOTTOM:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"};function E(e,t){var n=e.to({output:[s.Colors.PRIMARY_DARK_400,s.Colors.STATUS_GREEN_600]}),r=t?[m.TOP,m.TOP,h.TOP,h.TOP]:[m.TOP,_.TOP,_.TOP,h.TOP],a=t?[m.BOTTOM,m.BOTTOM,h.BOTTOM,h.BOTTOM]:[m.BOTTOM,_.BOTTOM,_.BOTTOM,h.BOTTOM];return v("svg",{viewBox:"0 0 20 20",fill:"none"},void 0,v(i.animated.path,{fill:n,d:e.to({range:[0,.3,.7,1],output:r})}),v(i.animated.path,{fill:n,d:e.to({range:[0,.3,.7,1],output:a})}))}function g(e){var t=e.id,n=e.onChange,r=e.checked,f=e.disabled,c=e.className,m=e.focusProps,_=e.innerRef,h=a.useContext(l.AccessibilityPreferencesContext).reducedMotion,g=a.useRef(null),S=a.useState(!1),O=S[0],I=S[1],T=(0,i.useSpring)({config:y,opacity:f?.3:1,state:O?r?.7:.3:r?1:0}),C=T.state,b=T.opacity;return a.createElement(u.default,p({},m,{within:!0,offset:-2}),v(i.animated.div,{className:(0,o.default)(d.default.container,c),onMouseDown:function(){return!f&&I(!0)},onMouseUp:function(){return I(!1)},onMouseLeave:function(){return I(!1)},style:{opacity:b,backgroundColor:C.to({output:[s.Colors.PRIMARY_DARK_400,s.Colors.STATUS_GREEN_600]})},tabIndex:-1},void 0,v(i.animated.svg,{className:d.default.slider,viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet",style:{left:C.to({range:[0,.3,.7,1],output:[-3,1,8,12]})}},void 0,v(i.animated.rect,{fill:"white",x:C.to({range:[0,.3,.7,1],output:[4,0,0,4]}),y:C.to({range:[0,.3,.7,1],output:[0,1,1,0]}),height:C.to({range:[0,.3,.7,1],output:[20,18,18,20]}),width:C.to({range:[0,.3,.7,1],output:[20,28,28,20]}),rx:"10"}),E(C,h.enabled)),a.createElement("input",{id:t,type:"checkbox",ref:function(e){g.current=e,null!=_&&(_.current=e)},className:d.default.input,tabIndex:f?-1:0,onKeyDown:function(e){f||e.repeat||" "!==e.key&&"Enter"!==e.key||I(!0)},onKeyUp:function(e){var t;f||!O||e.repeat||(I(!1),"Enter"===e.key&&(null===(t=g.current)||void 0===t||t.click()))},onChange:function(e){I(!1),null==n||n(e.currentTarget.checked,e)},checked:r,disabled:f})))}E.displayName="renderSwitchIcon",g.displayName="Switch"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NO_WELCOME_SCREEN=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(9652));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={};t.NO_WELCOME_SCREEN=u;var s={},d={},f=!1,c=!1,p=!1;function v(e){var t=e.invite.guild;return null!=(null==t?void 0:t.welcome_screen)&&(s[t.id]=t.welcome_screen,!0)}function y(e){var t=e.welcomeScreen,n=e.guildId;s[n]=t||u}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(o.default)},a.get=function(e){if(null!=e)return s[e]},a.isFetching=function(){return c},a.hasError=function(){return p},a.hasSeen=function(e,t){return void 0===t&&(t=!1),null!=e&&(t?f:d[e]||!1)},r}(r.default.Store))(a.default,{INVITE_RESOLVE_SUCCESS:v,INVITE_ACCEPT_SUCCESS:v,WELCOME_SCREEN_SUBMIT_SUCCESS:y,WELCOME_SCREEN_UPDATE:y,WELCOME_SCREEN_VIEW:function(e){var t=e.guildId,n=e.isLurking;d[t]=!0,n&&(f=!0)},GUILD_STOP_LURKING:function(e){f=!1},GUILD_DELETE:function(e){var t=e.guild.id;d[t]=!1},WELCOME_SCREEN_FETCH_START:function(e){return c=!0,void(p=!1)},WELCOME_SCREEN_FETCH_SUCCESS:function(e){c=!1,p=!1;var t=e.welcomeScreen,n=e.guildId;s[n]=t||u},WELCOME_SCREEN_FETCH_FAIL:function(e){return c=!1,void(p=!0)}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7619));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var d=function(e){var t=e.aspectRatio,n=e.style,r=e.className,i=e.children;return u("div",{className:(0,a.default)(o.default.outer,r),style:s({paddingTop:1/t*100+"%"},n)},void 0,u("div",{className:o.default.inner},void 0,i))};d.displayName="AspectRatioSizer";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(47)),l=f(n(24)),u=n(1),s=f(n(6)),d=f(n(7640));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y={BLOCK:d.default.block,INLINE:d.default.inline},m=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=e.textClassName,a=e.type,f=void 0===a?y.BLOCK:a,c=e.style;return p("div",{className:(0,o.default)(n,f),style:c},void 0,p(i.default,{size:i.default.Sizes.SIZE_12,color:u.Colors.STATUS_GREEN_600,className:d.default.pro},void 0,s.default.Messages.FORM_LABEL_ROLES_PRO_TIP,":"),p(l.default,{className:(0,o.default)(d.default.tip,r)},void 0,t))},r}(a.PureComponent);m.displayName="Protip",m.Types=y;var _=m;t.default=_},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Token=t.QueryTokenizer=t.NON_TOKEN_TYPE=void 0;var a=/.+/g;function o(e,t,n){if(!t)return null;for(var r=0;r<t.length;r++){var a=t[r],o=i(e.match(a.regex),n),l=void 0;if(o){var s=a.cache;if(s&&(l=s.get(o[0]))&&((l=new u(l)).start=o.index),!l){if(l=new u(o,a.type),a.validator&&!a.validator(l))continue;s&&!s.has(o[0])&&s.set(o[0],l)}return l}}return null}function i(e,t){if(!e)return null;var n=[].concat(e);return n.index=t,n}t.NON_TOKEN_TYPE="NON_TOKEN";var l=function(){function e(e,t){var n=this;void 0===e&&(e=[]),this.reset(e,t),e.forEach((function(e){return n.addRule(e)}))}var t=e.prototype;return t.reset=function(e){this._rules=[],this._followers={},this._nonTokenType=e||"NON_TOKEN"},t.addRule=function(e){var t,n=this,r=e.type,a=e.follows,o=e.validator,i=e.regex;"^"!==i.source.charAt(0)&&(i=new RegExp("^"+i.source,i.flags)),o&&(t=new Map),a?a.forEach((function(e){n._followers[e]||(n._followers[e]=[]),n._followers[e].push({regex:i,type:r,validator:o,cache:t})})):this._rules.push({regex:i,type:r,validator:o,cache:t})},t.tokenize=function(e){for(var t,n=e,r="",o=0,l=[];n.length;){var s=this._getMatch(n,t,o+r.length);s?(r&&l.push(new u(i(r.match(a),o),this._nonTokenType)),t=s,l.push(s),o+=t.length+r.length,n=n.substring(t.length),r=""):(r+=n[0],n=n.substring(1))}return r&&l.push(new u(i(r.match(a),o),this._nonTokenType)),l},t.clearCache=function(){for(var e in this._rules.forEach((function(e){return e.cache&&e.cache.clear()})),this._followers){this._followers[e].forEach((function(e){return e.cache&&e.cache.clear()}))}},t._getMatch=function(e,t,n){var r,a=t?t.type:null;return t&&t.end===n&&(r=o(e,this._followers[a],n)),r||(r=o(e,this._rules,n)),r},e}();t.QueryTokenizer=l;var u=function(){function e(t,n){t instanceof e?(this.match=[].concat(t.match),this.start=t.start,this.type=t.type,t._data&&(this._data=t._data)):(this.match=[].concat(t),this.start=t.index||0,this.type=n)}var t,n,a,o=e.prototype;return o.valueOf=function(){return this.match[0]},o.getFullMatch=function(){return this.match[0]},o.getMatch=function(e){return void 0===e&&(e=0),this.match[e]},o.setData=function(e,t){this._data||(this._data=new Map),this._data.set(e,t)},o.getData=function(e){if(this._data)return this._data.get(e)},t=e,(n=[{key:"end",get:function(){return this.start+this.length}},{key:"length",get:function(){return this.match[0].length}}])&&r(t.prototype,n),a&&r(t,a),e}();t.Token=u,l.NON_TOKEN_TYPE="NON_TOKEN",l.Token=u;var s=l;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"guild",id:"2021-04_desktop_roles_creation",label:"Desktop Roles Creation",defaultConfig:{showNewRolesCreationFlow:!1},treatments:[{id:1,label:"Show the new guild roles creation modal",config:{showNewRolesCreationFlow:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 4 14"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("ellipse",{fill:d,cx:"3.75",cy:"1",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"3.75",cy:"4.61111107",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"0",cy:"4.61111107",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"3.75",cy:"8.22222227",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"0",cy:"8.22222227",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"3.75",cy:"11.83333337",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"0",cy:"11.83333337",rx:"1.125",ry:"1.08333333"}),s("ellipse",{fill:d,cx:"0",cy:"1",rx:"1.125",ry:"1.08333333"})))}d.displayName="Drag"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useGuildMembers=_,t.useGuildRoleMembers=function(e,t,n){r.useEffect((function(){(0,c.requestMembersForRole)(e,t).catch(n)}),[e,t]);var a=_(e);return r.useMemo((function(){return a.filter((function(e){return e.roles.includes(t)}))}),[a,t])},t.useQueryGuildMembers=function(e,t){var n=r.useRef(!1);r.useEffect((function(){f.default.requestMembers(e,t,200),""===t||n.current||(s.default.track(v.AnalyticEvents.SEARCH_STARTED,{search_type:"Role Members"}),n.current=!0)}),[e,t])},t.filterFullMembersByQuery=function(e,t){var n=e.trim().toLowerCase();return t.id===n||(0,a.default)(n,t.name.toLowerCase())||(0,a.default)(n,t.userTag.toLowerCase())},t.getSectionAnalyticsName=function(e){switch(e){case p.GuildSettingsRoleEditSections.MEMBERS:return"Members";case p.GuildSettingsRoleEditSections.PERMISSIONS:return"Permissions";case p.GuildSettingsRoleEditSections.DISPLAY:return"Role Settings";default:(0,d.assertNever)(e)}},t.MAX_PREFETCH_MEMBER_COUNT=t.ADD_MEMBER_QUERY_LIMIT=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=y(n(480)),o=n(3),i=y(n(56)),l=y(n(160)),u=y(n(12)),s=y(n(13)),d=n(48),f=y(n(723)),c=n(8674),p=n(8303),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}t.ADD_MEMBER_QUERY_LIMIT=50;function _(e){return(0,o.useStateFromStores)([i.default,u.default,l.default],(function(){return i.default.getMembers(e).map((function(t){var n,r=u.default.getUser(t.userId);return null==r?null:{name:null!==(n=t.nick)&&void 0!==n?n:r.username,userTag:l.default.hidePersonalInformation?r.username:r.tag,id:t.userId,avatarSource:r.getAvatarSource(e),avatarURL:r.getAvatarURL(e),bot:r.bot,verifiedBot:r.isVerifiedBot(),roles:t.roles,key:t.userId}})).filter(d.isNotNullish)}),[e])}t.MAX_PREFETCH_MEMBER_COUNT=1e3},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionTemplates=t.DEFAULT_TEMPLATE_TYPE=t.PermissionTemplateTypes=t.CREATE_ROLE_DESKTOP_MODAL_WIDTH=t.ROLE_NAME_MAX_LENGTH=void 0;var r,a=u(n(63)),o=u(n(78)),i=n(1),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}t.ROLE_NAME_MAX_LENGTH=100;var s;t.CREATE_ROLE_DESKTOP_MODAL_WIDTH=440,t.PermissionTemplateTypes=s,function(e){e[e.COSMETIC=0]="COSMETIC",e[e.MEMBER=1]="MEMBER",e[e.MODERATOR=2]="MODERATOR",e[e.MANAGER=3]="MANAGER"}(s||(t.PermissionTemplateTypes=s={}));var d=s.COSMETIC;t.DEFAULT_TEMPLATE_TYPE=d;var f=o.default.DEFAULT,c=a.default.remove(f,i.Permissions.MENTION_EVERYONE),p=a.default.combine(f,i.Permissions.VIEW_AUDIT_LOG,i.Permissions.MANAGE_NICKNAMES,i.Permissions.KICK_MEMBERS,i.Permissions.BAN_MEMBERS,i.Permissions.MANAGE_MESSAGES,i.Permissions.MUTE_MEMBERS,i.Permissions.DEAFEN_MEMBERS,i.Permissions.MOVE_MEMBERS,i.Permissions.PRIORITY_SPEAKER),v=a.default.combine(p,i.Permissions.MANAGE_CHANNELS,i.Permissions.MANAGE_ROLES,i.Permissions.MANAGE_EMOJIS,i.Permissions.MANAGE_GUILD,i.Permissions.MANAGE_WEBHOOKS,i.Permissions.SEND_TTS_MESSAGES),y=a.default.add(v,i.Permissions.VIEW_GUILD_ANALYTICS),m=((r={})[s.COSMETIC]={key:"template_cosmetic",color:i.Colors.BRAND,permissions:o.default.NONE,title:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_NAME_COSMETIC},description:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_DESCRIPTION_COSMETIC},contents:function(){return[l.default.Messages.ROLE_PERMISSION_TEMPLATE_COSMETIC_CONTENT_1,l.default.Messages.ROLE_PERMISSION_TEMPLATE_COSMETIC_CONTENT_2]},contentPreface:function(){return""}},r[s.MEMBER]={key:"template_member",color:i.Colors.STATUS_GREEN_600,permissions:f,communityPermissions:c,title:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_NAME_MEMBER},description:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_DESCRIPTION_MEMBER},contents:function(){return[l.default.Messages.ROLE_PERMISSION_TEMPLATE_MEMBER_CONTENT_1,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MEMBER_CONTENT_2,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MEMBER_CONTENT_3]},contentPreface:function(){return""}},r[s.MODERATOR]={key:"template_moderator",color:i.Colors.STATUS_YELLOW,permissions:p,title:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_NAME_MODERATOR},description:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_DESCRIPTION_MODERATOR},contents:function(){return[l.default.Messages.ROLE_PERMISSION_TEMPLATE_MODERATOR_CONTENT_1,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MODERATOR_CONTENT_2,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MODERATOR_CONTENT_3]},contentPreface:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_MODERATOR_CONTENT_PREFACE}},r[s.MANAGER]={key:"template_manager",color:i.Colors.STATUS_RED,permissions:v,communityPermissions:y,title:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_NAME_MANAGER},description:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_DESCRIPTION_MANAGER},contents:function(){return[l.default.Messages.ROLE_PERMISSION_TEMPLATE_MANAGER_CONTENT_1,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MANAGER_CONTENT_2,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MANAGER_CONTENT_3,l.default.Messages.ROLE_PERMISSION_TEMPLATE_MANAGER_CONTENT_4]},contentPreface:function(){return l.default.Messages.ROLE_PERMISSION_TEMPLATE_MANAGER_CONTENT_PREFACE}},r);t.PermissionTemplates=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useScrolledToTop=function(){var e=a.useState(!0),t=e[0],n=e[1];return{scrolledToTop:t,handleScroll:function(e){n(0===e.currentTarget.scrollTop)}}},t.default=function(e){var t=e.guild,n=e.role,r=e.selectedSection,f=e.setSelectedSection,h=a.useCallback((function(e){f(e)}),[f]),E=(0,o.useStateFromStores)([p.default],(function(){var e;return null===(e=p.default.getRoleMemberCount(t.id))||void 0===e?void 0:e[n.id]}),[n.id,t.id]),g=t.id===n.id,T=(0,y.default)(n);a.useEffect((function(){g&&f(v.GuildSettingsRoleEditSections.PERMISSIONS)}),[g,f]);var C=(0,l.useHasGuildRoleItems)(t,n);return a.createElement(a.Fragment,null,S("div",{className:_.default.titleContainer},void 0,S(c.default,{className:_.default.titleText,color:c.default.Colors.HEADER_PRIMARY,size:c.default.Sizes.SIZE_16},void 0,m.default.Messages.ROLE_EDIT_TITLE_WITH_NAME.format({roleName:n.name})),C?S(u.default,{className:_.default.menu,onClick:function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(l.default,O({},e,{guild:t,role:n}))}))},"aria-label":m.default.Messages.MORE_OPTIONS},void 0,I):null),null!=T?S(s.default,{messageType:s.HelpMessageTypes.WARNING,fontSize:s.HelpMessageFontSizes.FONT_SIZE_14},void 0,T):null,S(d.default,{className:_.default.tabBar,"aria-label":m.default.Messages.OPTIONS,selectedItem:r,type:d.default.Types.TOP,look:d.default.Looks.BRAND,onItemSelect:h},void 0,S(d.Item,{className:_.default.tabBarItem,id:v.GuildSettingsRoleEditSections.DISPLAY,disabled:g},void 0,m.default.Messages.ROLE_EDIT_TAB_DISPLAY),S(d.Item,{className:_.default.tabBarItem,id:v.GuildSettingsRoleEditSections.PERMISSIONS},void 0,m.default.Messages.ROLE_EDIT_TAB_PERMISSIONS),S(d.Item,{className:_.default.tabBarItem,id:v.GuildSettingsRoleEditSections.MEMBERS,disabled:g},void 0,g?m.default.Messages.ROLE_EDIT_TAB_MANAGE_MEMBERS:m.default.Messages.ROLE_EDIT_TAB_MEMBERS_WITH_LIST.format({numMembers:E||"0"}))))};var r,a=g(n(0)),o=n(3),i=n(389),l=g(n(8576)),u=h(n(61)),s=g(n(8353)),d=g(n(8293)),f=h(n(8331)),c=h(n(24)),p=h(n(8460)),v=n(8303),y=h(n(9774)),m=h(n(6)),_=h(n(7680));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var I=S(f.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.viewAsRoles=function(e,t){f.default.track(p.AnalyticEvents.VIEW_AS_ROLES_SELECTED,y({num_roles:Object.keys(t).length},(0,i.collectGuildAnalyticsMetadata)(e))),o.default.close(),a.default.dispatch({type:p.ActionTypes.VIEW_AS_ROLES_UPDATE,guildId:e,roles:t});var n=u.default.getChannel(d.default.getChannelId());if(!r.default.has(c.default.computePermissionsForRoles(t,n),p.Permissions.VIEW_CHANNEL)){var v=s.default.getDefaultChannel(e);null!=v&&(0,l.transitionTo)(p.Routes.CHANNEL(e,v.id))}},t.viewAsRolesStop=function(e){a.default.dispatch({type:p.ActionTypes.VIEW_AS_ROLES_STOP,guildId:e})};var r=v(n(63)),a=v(n(2)),o=v(n(8254)),i=n(106),l=n(42),u=v(n(10)),s=v(n(86)),d=v(n(36)),f=v(n(13)),c=v(n(78)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){return(y=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={},u=!1;var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.isLoading=function(){return u},a.passesChecklist=function(e){var t;return!u&&(null===(t=l[e])||void 0===t?void 0:t.sufficient)},a.isPendingSuccess=function(e){var t=l[e];return null!=t&&(!u&&t.healthScorePending&&t.safeEnvironment&&0===Object.keys(t.nsfwProperties).length&&t.size&&t.protected)},a.getDiscoveryChecklist=function(e){return l[e]},r}(r.default.Store))(a.default,{DISCOVER_CHECKLIST_FETCH_START:function(e){u=!0},DISCOVER_CHECKLIST_FETCH_FAILURE:function(e){u=!1},DISCOVER_CHECKLIST_FETCH_SUCCESS:function(e){var t=e.checklist,n=e.guildId;u=!1,l[n]={guildId:t.guild_id,safeEnvironment:t.safe_environment,healthy:t.healthy,healthScorePending:t.health_score_pending,nsfwProperties:t.nsfw_properties,size:t.size,protected:t.protected,sufficient:t.sufficient,sufficientWithoutGracePeriod:t.sufficient_without_grace_period,gracePeriodEndDate:null!=t.grace_period_end_date?new Date(t.grace_period_end_date):null,retentionHealthy:t.retention_healthy,engagementHealthy:t.engagement_healthy,minimumGuildSize:null!=t.minimum_size?t.minimum_size:1e3,healthScore:t.health_score,minimumGuildAge:t.minimum_age||0,age:t.age}}});t.default=s},function(e,t,n){"use strict";var r,a,o,i,l;Object.defineProperty(t,"__esModule",{value:!0}),t.PLATFORM_OPTIONS=t.PrimaryPlatformTypes=t.PartnerReasons=t.PartnerTypes=t.PartnerApplicationSteps=t.ApplicationTypes=void 0,t.ApplicationTypes=r,function(e){e.PARTNER="partner"}(r||(t.ApplicationTypes=r={})),t.PartnerApplicationSteps=a,function(e){e.SERVER="server",e.USER="user",e.SUBMIT="submit"}(a||(t.PartnerApplicationSteps=a={})),t.PartnerTypes=o,function(e){e.CONTENT_CREATOR="CONTENT_CREATOR",e.COMMUNITY="COMMUNITY",e.BRAND="BRAND",e.SOFTWARE="SOFTWARE",e.OTHER="OTHER"}(o||(t.PartnerTypes=o={})),t.PartnerReasons=i,function(e){e.TALK_WITH_OTHER_PARTNERS="TALK_WITH_OTHER_PARTNERS",e.COMMUNITY_TEAM_ACCESS="COMMUNITY_TEAM_ACCESS",e.NEW_IDEAS_SUGGESTIONS="NEW_IDEAS_SUGGESTIONS",e.EARLY_ACCESS_TO_FEATURES="EARLY_ACCESS_TO_FEATURES",e.OTHER="OTHER"}(i||(t.PartnerReasons=i={})),t.PrimaryPlatformTypes=l,function(e){e.TWITTER="TWITTER",e.TWITCH="TWITCH",e.YOUTUBE="YOUTUBE",e.REDDIT="REDDIT",e.FACEBOOK="FACEBOOK",e.INSTAGRAM="INSTAGRAM",e.SOUNDCLOUD="SOUNDCLOUD",e.OTHER="OTHER"}(l||(t.PrimaryPlatformTypes=l={}));var u=[{value:l.TWITTER,label:"Twitter"},{value:l.TWITCH,label:"Twitch"},{value:l.YOUTUBE,label:"YouTube"},{value:l.REDDIT,label:"Reddit"},{value:l.FACEBOOK,label:"Facebook"},{value:l.INSTAGRAM,label:"Instagram"},{value:l.SOUNDCLOUD,label:"Soundcloud"},{value:l.OTHER,label:"Other"}];t.PLATFORM_OPTIONS=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNameForKeybindGroup=function(e){switch(e){case o.NAVIGATION:return k.default.Messages.USER_SETTINGS_KEYBINDS_NAVIGATION_SECTION_TITLE;case o.VOICE_AND_VIDEO:return k.default.Messages.USER_SETTINGS_KEYBINDS_VOICE_AND_VIDEO_SECTION_TITLE;case o.CHAT:return k.default.Messages.USER_SETTINGS_KEYBINDS_CHAT_SECTION_TITLE;case o.MISCELLANEOUS:return k.default.Messages.USER_SETTINGS_KEYBINDS_MISCELLANEOUS_SECTION_TITLE;case o.MESSAGE:return k.default.Messages.USER_SETTINGS_KEYBINDS_MESSAGE_SECTION_TITLE}},t.getDescriptionForKeybindGroup=function(e){switch(e){case o.MESSAGE:return k.default.Messages.USER_SETTINGS_KEYBINDS_MESSAGE_DESCRIPTION;default:return null}},t.getDefaultLayoutContent=function(){return[{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_SERVERS,binds:U(j.KeybindActions.SERVER_PREV,j.KeybindActions.SERVER_NEXT),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_CHANNELS,binds:U(j.KeybindActions.CHANNEL_PREV,j.KeybindActions.CHANNEL_NEXT),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_BACK_FORWARD,binds:U(j.KeybindActions.NAVIGATE_BACK,j.KeybindActions.NAVIGATE_FORWARD),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_UNREAD_CHANNELS,binds:U(j.KeybindActions.UNREAD_PREV,j.KeybindActions.UNREAD_NEXT),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_UNREAD_MENTION_CHANNELS,binds:U(j.KeybindActions.MENTION_CHANNEL_PREV,j.KeybindActions.MENTION_CHANNEL_NEXT),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_TO_CALL,binds:U(j.KeybindActions.JUMP_TO_CURRENT_CALL),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_PREVIOUS_GUILD,binds:U(j.KeybindActions.TOGGLE_PREVIOUS_GUILD),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_QUICKSWITCHER,binds:U(j.KeybindActions.QUICKSWITCHER_SHOW),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_CREATE_GUILD,binds:U(j.KeybindActions.CREATE_GUILD),group:o.NAVIGATION},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_SERVER_READ,binds:U(j.KeybindActions.MARK_SERVER_READ),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_CHANNEL_READ,binds:U(j.KeybindActions.MARK_CHANNEL_READ),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_CREATE_DM_GROUP,binds:U(j.KeybindActions.CREATE_DM_GROUP),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_PINS,binds:U(j.KeybindActions.TOGGLE_CHANNEL_PINS),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_INBOX,binds:U(j.KeybindActions.TOGGLE_INBOX_UNREADS_TAB),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_TOP_INBOX_CHANNEL_READ,binds:U(j.KeybindActions.MARK_TOP_INBOX_CHANNEL_READ),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_USERS,binds:U(j.KeybindActions.TOGGLE_USERS),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_SEARCH_EMOJIS,binds:U(j.KeybindActions.SEARCH_EMOJIS),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_SEARCH_GIFS,binds:U(j.KeybindActions.SEARCH_GIFS),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_SEARCH_STICKERS,binds:U(j.KeybindActions.SEARCH_STICKERS),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_SCROLL_CHAT,binds:U(j.KeybindActions.SCROLL_UP,j.KeybindActions.SCROLL_DOWN),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_JUMP_TO_FIRST_UNREAD,binds:U(j.KeybindActions.JUMP_TO_FIRST_UNREAD),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_FOCUS_TEXT_AREA,binds:U(j.KeybindActions.TEXTAREA_FOCUS),group:o.CHAT},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_UPLOAD_FILE,binds:U(j.KeybindActions.UPLOAD_FILE),group:o.CHAT,groupEnd:!0},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_MUTE,binds:U(j.KeybindActions.TOGGLE_MUTE),group:o.VOICE_AND_VIDEO},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_DEAFEN,binds:U(j.KeybindActions.TOGGLE_DEAFEN),group:o.VOICE_AND_VIDEO},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_ACCEPT,binds:U(j.KeybindActions.CALL_ACCEPT),group:o.VOICE_AND_VIDEO},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_DECLINE,binds:U(j.KeybindActions.MARK_CHANNEL_READ),group:o.VOICE_AND_VIDEO},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_START,binds:U(j.KeybindActions.CALL_START),group:o.VOICE_AND_VIDEO,groupEnd:!0},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_HELP,binds:U(j.KeybindActions.TOGGLE_HELP),group:o.MISCELLANEOUS},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_SEARCH,binds:U(j.KeybindActions.FOCUS_SEARCH),group:o.MISCELLANEOUS},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_EASTER_EGG,binds:["h+h+right+n+k"],group:o.MISCELLANEOUS,groupEnd:!0},{description:k.default.Messages.EDIT_MESSAGE,binds:["e"],group:o.MESSAGE},{description:k.default.Messages.DELETE_MESSAGE,binds:["backspace"],group:o.MESSAGE},{description:k.default.Messages.PIN_MESSAGE,binds:["p"],group:o.MESSAGE},{description:k.default.Messages.ADD_REACTION,binds:["plus"],group:o.MESSAGE},{description:k.default.Messages.MESSAGE_ACTION_REPLY,binds:["r"],group:o.MESSAGE},{description:k.default.Messages.COPY_TEXT,binds:["mod+c"],group:o.MESSAGE},{description:k.default.Messages.MARK_UNREAD,binds:["alt+enter"],group:o.MESSAGE},{description:k.default.Messages.KEYBIND_DESCRIPTION_MODAL_FOCUS_TEXT_AREA,binds:["escape"],group:o.MESSAGE,groupEnd:!0}]},t.default=t.DEFAULT_LAYOUT=t.KeybindGroup=void 0;var r,a,o,i=n(9002),l=n(9003),u=n(9931),s=n(9932),d=n(9933),f=n(9934),c=n(1322),p=n(9006),v=n(9007),y=n(9008),m=n(1340),_=n(9009),h=n(9010),E=n(9011),g=n(9935),S=n(9936),O=n(9012),I=n(9013),T=n(9014),C=n(9015),b=n(9016),M=n(9938),N=n(9939),A=n(1298),P=n(9940),R=n(9941),L=n(9017),D=n(9943),w=n(9018),j=n(1),k=(r=n(6))&&r.__esModule?r:{default:r};function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e){var t=G[e];if(null==t)throw new Error("getBindsFor(...): No bind for "+t);return t.binds[0]}))}t.KeybindGroup=o,function(e){e.NAVIGATION="NAVIGATION",e.CHAT="CHAT",e.VOICE_AND_VIDEO="VOICE_AND_VIDEO",e.MISCELLANEOUS="MISCELLANEOUS",e.MESSAGE="MESSAGE"}(o||(t.KeybindGroup=o={}));var G=((a={})[j.KeybindActions.SERVER_NEXT]=O.SERVER_NEXT,a[j.KeybindActions.SERVER_PREV]=O.SERVER_PREV,a[j.KeybindActions.CHANNEL_NEXT]=l.CHANNEL_NEXT,a[j.KeybindActions.CHANNEL_PREV]=l.CHANNEL_PREV,a[j.KeybindActions.NAVIGATE_BACK]=l.NAVIGATE_BACK,a[j.KeybindActions.NAVIGATE_FORWARD]=l.NAVIGATE_FORWARD,a[j.KeybindActions.UNREAD_NEXT]=L.UNREAD_NEXT,a[j.KeybindActions.UNREAD_PREV]=L.UNREAD_PREV,a[j.KeybindActions.MENTION_CHANNEL_NEXT]=L.MENTION_NEXT,a[j.KeybindActions.MENTION_CHANNEL_PREV]=L.MENTION_PREV,a[j.KeybindActions.TOGGLE_PREVIOUS_GUILD]=l.TOGGLE_PREVIOUS_GUILD,a[j.KeybindActions.JUMP_TO_GUILD]=c.JUMP_TO_GUILD,a[j.KeybindActions.SUBMIT]=I.SUBMIT,a[j.KeybindActions.TEXTAREA_FOCUS]=T.TEXTAREA_FOCUS,a[j.KeybindActions.MARK_CHANNEL_READ]=p.MARK_CHANNEL_READ,a[j.KeybindActions.MARK_SERVER_READ]=v.MARK_SERVER_READ,a[j.KeybindActions.TOGGLE_CHANNEL_PINS]=M.TOGGLE_CHANNEL_PINS,a[j.KeybindActions.TOGGLE_INBOX_UNREADS_TAB]=P.TOGGLE_INBOX_UNREADS_TAB,a[j.KeybindActions.MARK_TOP_INBOX_CHANNEL_READ]=P.MARK_TOP_INBOX_CHANNEL_READ,a[j.KeybindActions.TOGGLE_USERS]=R.TOGGLE_USERS,a[j.KeybindActions.TOGGLE_HELP]=N.TOGGLE_HELP,a[j.KeybindActions.TOGGLE_MUTE]=C.TOGGLE_MUTE,a[j.KeybindActions.TOGGLE_DEAFEN]=C.TOGGLE_DEAFEN,a[j.KeybindActions.TOGGLE_CATEGORY_COLLAPSED]=b.TOGGLE_CATEGORY_COLLAPSED,a[j.KeybindActions.SCROLL_UP]=h.SCROLL_UP,a[j.KeybindActions.SCROLL_DOWN]=h.SCROLL_DOWN,a[j.KeybindActions.QUICKSWITCHER_SHOW]=m.QUICKSWITCHER_SHOW,a[j.KeybindActions.CREATE_DM_GROUP]=u.CREATE_DM_GROUP,a[j.KeybindActions.SEARCH_EMOJIS]=E.SEARCH_EMOJIS,a[j.KeybindActions.SEARCH_GIFS]=g.SEARCH_GIFS,a[j.KeybindActions.SEARCH_STICKERS]=S.SEARCH_STICKERS,a[j.KeybindActions.TOGGLE_HOTKEYS]=A.TOGGLE_HOTKEYS,a[j.KeybindActions.JUMP_TO_FIRST_UNREAD]=y.JUMP_TO_FIRST_UNREAD,a[j.KeybindActions.CREATE_GUILD]=s.CREATE_GUILD,a[j.KeybindActions.UPLOAD_FILE]=D.UPLOAD_FILE,a[j.KeybindActions.RETURN_TO_AUDIO_CHANNEL]=_.RETURN_TO_AUDIO_CHANNEL,a[j.KeybindActions.CALL_ACCEPT]=i.CALL_ACCEPT,a[j.KeybindActions.CALL_START]=i.CALL_START,a[j.KeybindActions.FOCUS_SEARCH]=d.FOCUS_SEARCH,a[j.KeybindActions.JUMP_TO_CURRENT_CALL]=f.JUMP_TO_CURRENT_CALL,a[j.KeybindActions.ZOOM_IN]=w.ZOOM_IN,a[j.KeybindActions.ZOOM_OUT]=w.ZOOM_OUT,a[j.KeybindActions.ZOOM_RESET]=w.ZOOM_RESET,a);t.DEFAULT_LAYOUT=G;var F=G;t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 18 18"}),s("polygon",{fillRule:"nonzero",className:f,fill:d,points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}d.displayName="PlusAlt"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=n(3),i=T(n(8330)),l=b(n(8357)),u=T(n(8283)),s=T(n(81)),d=n(31),f=T(n(163)),c=T(n(15)),p=T(n(40)),v=T(n(61)),y=T(n(149)),m=T(n(8367)),_=T(n(8368)),h=n(41),E=n(9024),g=n(8286),S=n(1),O=T(n(6)),I=T(n(7346));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P={offset:{top:-4,right:-4,bottom:-4,left:-4}};function R(e){var t=e.channel,n=e.disableManageChannels,r=e.tabIndex,a=e.handleEditClick;return(0,o.useStateFromStores)([p.default],(function(){return n||!p.default.can(S.Permissions.MANAGE_CHANNELS,t)&&!p.default.can(S.Permissions.MANAGE_ROLES,t)&&!p.default.can(S.Permissions.MANAGE_WEBHOOKS,t)||(0,d.isGuildSelectableChannelType)(t.type)&&!p.default.can(S.Permissions.VIEW_CHANNEL,t)||t.isVocal()&&!p.default.can(S.Permissions.CONNECT,t)||!d.EDITABLE_CHANNEL_TYPES.has(t.type)}))?null:A(y.default,{text:O.default.Messages.EDIT_CHANNEL},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave,o=e.onFocus,i=e.onBlur;return A(v.default,{className:I.default.iconItem,onClick:a,tabIndex:r,"aria-label":O.default.Messages.EDIT_CHANNEL,focusProps:P,onMouseEnter:t,onMouseLeave:n,onFocus:o,onBlur:i},void 0,A(m.default,{width:16,height:16,className:I.default.actionIcon}))}))}function L(e){var t=e.channel,n=e.isDefaultChannel,r=e.locked,i=e.tabIndex,u=e.handleInviteClick,d=(0,o.useStateFromStores)([c.default],(function(){return c.default.getGuild(t.getGuildId())})),f=(0,o.useStateFromStores)([s.default],(function(){return s.default.getStageInstanceByChannel(t.id)}),[t.id]),m=(0,o.useStateFromStores)([p.default],(function(){return(0,g.canViewInviteModal)(p.default,d,t,f)})),h=(0,o.useStateFromStores)([p.default],(function(){return p.default.can(S.Permissions.CREATE_INSTANT_INVITE,t)?O.default.Messages.CREATE_INSTANT_INVITE:O.default.Messages.INVITE_TO_SERVER}));if(!r&&m){var E=A(_.default,{width:16,height:16,className:I.default.actionIcon,"aria-hidden":!0});return n&&(E=A(l.default,{tutorialId:"instant-invite",position:l.TutorialIndicatorPositions.LEFT},void 0,A("div",{},void 0,E))),A(y.default,{text:h},void 0,(function(e){return a.createElement(v.default,N({className:I.default.iconItem},e,{onClick:u,tabIndex:i,"aria-label":h,focusProps:P}),E)}))}return null}R.displayName="ConnectedEditButton";var D=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleInviteClick=function(){var e=t.props.channel,n=c.default.getGuild(e.getGuildId());if(null!=n){var r=f.default.getAllActiveStreams().filter((function(t){return t.state!==S.ApplicationStreamStates.ENDED&&t.channelId===e.id}));(0,h.openModal)((function(t){return a.createElement(u.default,N({},t,{guild:n,channel:e,streamUserId:1===r.length?r[0].ownerId:null,source:S.InstantInviteSources.GUILD_CHANNELS}))}))}},t.handleEditClick=function(){i.default.open(t.props.channel.id)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var o=r.prototype;return o.renderEditButton=function(){return a.createElement(R,N({},this.props,{handleEditClick:this.handleEditClick}))},o.renderInviteButton=function(){return a.createElement(L,N({},this.props,{handleInviteClick:this.handleInviteClick}))},o.getClassName=function(){var e=this.props,t=e.position,n=e.sortingPosition;return null!=n?t>n?I.default.containerDragAfter:I.default.containerDragBefore:I.default.containerDefault},o.isDisabled=function(){var e=this.props,t=e.channel,n=e.sorting,r=e.sortingType;return!!n&&!(0,E.areTypesInSameSection)(r,t.type)},r}(a.PureComponent);t.default=D,D.defaultProps={isDefaultChannel:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(680),l=n(8328),u=y(n(88)),s=y(n(8976)),d=y(n(8319)),f=y(n(149)),c=y(n(24)),p=n(1),v=y(n(7357));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E={SELECTED:v.default.modeSelected,CONNECTED:v.default.modeConnected,UNREAD:v.default.modeUnread,MUTED:v.default.modeMuted,LOCKED:v.default.modeLocked};function g(e){e.stopPropagation()}function S(e){switch(e){case p.ChannelTypes.GUILD_STAGE_VOICE:case p.ChannelTypes.GUILD_VOICE:return v.default.typeVoice;case p.ChannelTypes.ANNOUNCEMENT_THREAD:case p.ChannelTypes.PUBLIC_THREAD:case p.ChannelTypes.PRIVATE_THREAD:return v.default.typeThread;case p.ChannelTypes.GUILD_ANNOUNCEMENT:case p.ChannelTypes.GUILD_TEXT:case p.ChannelTypes.GUILD_STORE:default:return v.default.typeDefault}}var O=function(e){var t=e.className,n=e.channel,r=e.guild,i=e.locked,u=e.hasActiveThreads,s=(0,l.getChannelIconComponent)(n,r,{locked:i,hasActiveThreads:u});if(null==s)return null;var d=(0,l.getChannelIconTooltipText)(n,r,i,u);return h(f.default,{text:d,delay:500},void 0,(function(e){return a.createElement("div",_({},e,{className:v.default.iconContainer}),h(s,{className:(0,o.default)(v.default.icon,t)}))}))};function I(e){var t=e.channel,n=e.name,r=e.muted,l=e.selected,f=e.connected,y=e.unread,m=e.locked,I=e.hasActiveThreads,T=e.onClick,C=e.onMouseDown,b=e.onMouseUp,M=e.onContextMenu,N=e.connectDragPreview,A=e.className,P=e.iconClassName,R=e.subtitle,L=e.channel.type,D=e.onMouseEnter,w=e.onMouseLeave,j=e["aria-label"],k=e.children,U=e.guild,G=(0,i.useListItem)(t.id),F=G.role,B=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(G,["role"]),H=a.useRef(null),x=a.useRef(null),V=t.getGuildId(),W=p.Routes.CHANNEL(V,t.id),Y=t.isVocal(),z=Y&&!f,K=a.createElement("div",{className:v.default.content,ref:x},a.createElement(s.default,_({role:z?"button":"link",href:Y?void 0:W,ref:H,className:v.default.mainContent,onClick:function(){return T&&T(t)}},B,{"aria-label":j,focusProps:{enabled:!1}}),h(O,{className:P,channel:t,guild:U,hasActiveThreads:I,locked:m}),h(d.default,{className:v.default.name,"aria-hidden":!0},void 0,h("div",{className:v.default.channelName},void 0,null==n?t.name:n),R&&h(c.default,{color:c.default.Colors.MUTED,size:c.default.Sizes.SIZE_12,className:v.default.subtitle},void 0,R))),a.Children.count(k)>0?h("div",{onClick:g,className:v.default.children},void 0,k):null),$=null!=T||null!=b||null!=C;return h(u.default,{focusTarget:H,ringTarget:x,offset:{top:2,bottom:2,right:4}},void 0,h("div",{className:(0,o.default)(A,$?v.default.wrapper:v.default.notInteractive,l?E.SELECTED:f?E.CONNECTED:m?E.LOCKED:r?E.MUTED:y?E.UNREAD:null,S(L)),onMouseUp:function(e){return null==b?void 0:b(e,t)},onMouseDown:function(e){return null==C?void 0:C(e,t)},onContextMenu:function(e){return null==M?void 0:M(e,t)},onMouseEnter:D,onMouseLeave:w,role:F},void 0,r||!y||l?null:h("div",{className:v.default.unread}),N?N(K):K))}O.displayName="ChannelItemIcon",I.displayName="ChannelItem"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.JoinRequestGuild=t.HubGuild=t.LurkingGuild=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=z();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=Y(n(9)),i=n(5941),l=n(680),u=n(3),s=Y(n(184)),d=n(57),f=Y(n(391)),c=n(389),p=Y(n(274)),v=Y(n(8573)),y=Y(n(10033)),m=Y(n(1233)),_=Y(n(5939)),h=Y(n(8559)),E=Y(n(8599)),g=Y(n(163)),S=Y(n(11)),O=Y(n(298)),I=Y(n(1223)),T=Y(n(15)),C=Y(n(94)),b=Y(n(36)),M=Y(n(107)),N=Y(n(361)),A=Y(n(181)),P=Y(n(12)),R=Y(n(80)),L=Y(n(161)),D=Y(n(8464)),w=n(8263),j=Y(n(8465)),k=Y(n(8702)),U=n(393),G=n(8358),F=Y(n(10034)),B=Y(n(8701)),H=Y(n(8859)),x=n(1),V=Y(n(6)),W=Y(n(7389));function Y(e){return e&&e.__esModule?e:{default:e}}function z(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return z=function(){return e},e}function K(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function $(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Z(){return(Z=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}).apply(this,arguments)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var X={analyticsSource:{page:x.AnalyticsPages.GUILD_CHANNEL,section:x.AnalyticsSections.CHANNEL_LIST,object:x.AnalyticsObjects.CHANNEL}},J=$("div",{},void 0,$(G.DragPlaceholder,{})),Q=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isHovered:!1,isDropHovering:!1,isPreviewingFolder:!1},t.setDropHoveringDelayedCall=new d.DelayedCall(200,(function(){return t.setState({isDropHovering:!0})})),t.getMemoizedTo=(0,U.cachedFunction)((function(e){return{pathname:e,state:X}})),t.handleMouseDown=function(){var e=t.props,n=e.guild,r=e.selectedChannelId,a=e.unavailable,o=e.isJoinRequestGuild;null==n||null==r||a||o||f.default.preload(n.id,r)},t.handleContextMenu=function(e){var n=t.props,r=n.guild,o=n.isJoinRequestGuild,i=n.hasContextMenu;null!=r&&i&&(0,c.openContextMenu)(e,(function(e){return o?a.createElement(y.default,Z({},e,{guild:r})):a.createElement(v.default,Z({},e,{guild:r}))}))},t.handleMouseLeave=function(){!t.props.sorting&&t.setState({isHovered:!1})},t.handleMouseEnter=function(){!t.props.sorting&&t.setState({isHovered:!0})},t.handleKeyDown=function(e){var n,r=t.props.folderName;"ArrowLeft"===e.key&&null!=r&&(null===(n=document.querySelector("[aria-owns="+r+"]"))||void 0===n||n.focus())},t.handleDragOverChanged=function(e){e?t.setDropHoveringDelayedCall.delay():(t.setDropHoveringDelayedCall.cancel(),t.setState({isDropHovering:!1}))},t.handleFolderPreviewAnimationStart=function(){t.state.isDropHovering&&t.setState({isPreviewingFolder:!0})},t.handleFolderPreviewAnimationRest=function(){!t.state.isDropHovering&&t.setState({isPreviewingFolder:!1})},t.setRef=function(e){var n=t.props,r=n.setRef,a=n.guildId;null!=r&&r(a,e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,q(t,n),r.getDerivedStateFromProps=function(e,t){var n=e.sorting,r=t.isHovered;return n&&r?{isHovered:!1}:null};var i=r.prototype;return i.shouldComponentUpdate=function(e,t){return!(0,s.default)(this.props,e,["treeItemProps"])||(!(0,s.default)(this.state,t)||!(0,s.default)(this.props.treeItemProps,e.treeItemProps))},i.componentDidUpdate=function(e){var t=this.props,n=t.dragging,r=t.guildId,a=t.onDragStart;n&&!e.dragging&&null!=a&&a(r)},i.componentWillUnmount=function(){this.setDropHoveringDelayedCall.cancel()},i.render=function(){var e=this.props,t=e.guild,n=e.selected,r=e.unread,i=e.setRef,l=e.draggable,u=e.badge,s=e.connectDragSource,d=e.sorting,f=e.draggingGuildId,c=e.audio,p=e.video,v=e.screenshare,y=e.isCurrentUserInThisGuildVoice,m=e.liveStage,_=e.isInStageChannel,h=e.unavailable,E=e.animatable,g=e.selectedChannelId,S=e.folderIndex,O=e.index,I=e.route,T=(e.joinRequestStatus,e.treeItemProps),C=this.state,b=C.isHovered,M=C.isDropHovering,N=C.isPreviewingFolder;if(null==t)return null;var A,P,R=f===t.id;if(R)A=J;else{var L,U=M||N?$(F.default,{guild:t,show:M,active:n,onAnimationStart:this.handleFolderPreviewAnimationStart,onAnimationRest:this.handleFolderPreviewAnimationRest}):a.createElement(k.default,Z({ariaLabel:V.default.Messages.GUILD_TOOLTIP_A11Y_LABEL.format({guildName:t.toString(),mentions:u}),to:this.getMemoizedTo(I||x.Routes.CHANNEL(t.id,g)),name:t.toString(),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu,onKeyDown:this.handleKeyDown,icon:t.getIconURL(b&&E),selected:n||b},T,{role:"treeitem"})),Y=h?(0,G.renderUnavailableBadge)():(0,G.renderIconBadge)({audio:c,video:p,screenshare:v,liveStage:m,participating:y,participatingInStage:_}),z=u>0?(0,G.renderMentionBadge)(u):null;A=$("div",{className:(0,o.default)(W.default.blobContainer,(L={},L[W.default.sorting]=d,L[W.default.wobble]=M,L))},void 0,$(j.default,{selected:M||n||b,upperBadge:Y,lowerBadge:z,lowerBadgeWidth:(0,w.getBadgeWidthForValue)(u)},void 0,U)),l&&null!=s&&(A=s(A))}return l&&null!=S&&(P=$(B.default,{folderIndex:S,index:O,onDragOverChanged:this.handleDragOverChanged})),(0,G.renderListItem)($(a.Fragment,{},void 0,$(D.default,{hovered:!R&&b,selected:!R&&n,unread:!R&&r,className:W.default.pill}),$(H.default,{guild:t,disabled:d},void 0,A),P),null!=i?this.setRef:null)},r}(a.Component);Q.displayName="Guild",Q.defaultProps={unread:!1,audio:!1,video:!1,screenshare:!1,isCurrentUserInThisGuildVoice:!1,liveStage:!1,isInStageChannel:!1,unavailable:!1,badge:0,draggable:!0,hasContextMenu:!0,sorting:!1,isJoinRequestGuild:!1};var ee=function(e){var t,n=e.guild,r=e.guildId,o=K(e,["guild","guildId"]),i=(0,l.useListItem)(null!=r?r:""),u=(null===(t=(0,E.default)())||void 0===t?void 0:t.guild_id)===r;return null==n||null==r?null:a.createElement(Q,Z({guildId:r,guild:n},o,{draggable:!1,dragging:!1,treeItemProps:i,isInStageChannel:u}))};t.LurkingGuild=ee,ee.displayName="LurkingGuild";var te=function(e){var t,n=e.guild,r=e.invite,o=K(e,["guild","invite"]),i=(0,l.useListItem)(null!==(t=n.id)&&void 0!==t?t:""),s=(0,u.useStateFromStores)([L.default],(function(){return L.default.isFocused()}));return null==n?null:a.createElement(Q,Z({},o,{guildId:n.id,guild:n,animatable:s,draggable:!1,dragging:!1,hasContextMenu:!1,treeItemProps:i,selected:!0,route:x.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(n.id,r.code)}))};t.HubGuild=te,te.displayName="HubGuild";function ne(e){var t,n,r=e.guildId,o=(0,u.useStateFromStores)([T.default],(function(){return T.default.getGuild(r)})),i=(null===(t=(0,h.default)(r))||void 0===t?void 0:t.length)>0,s=(0,u.useStateFromStores)([A.default],(function(){return A.default.isMuted(r)})),d=(null===(n=(0,E.default)())||void 0===n?void 0:n.guild_id)===r,f=(0,u.useStateFromStores)([O.default],(function(){return O.default.isUnavailable(r)})),c=(0,u.useStateFromStores)([L.default],(function(){return L.default.isFocused()})),p=(0,_.default)((function(e){return e.guildId})),v=(0,u.useStateFromStores)([b.default],(function(){return b.default.getChannelId(r)})),y=(0,u.useStateFromStoresObject)([I.default],(function(){return{badge:I.default.getMentionCount(r),unread:I.default.hasUnread(r)}})),M=y.badge,N=y.unread,D=(0,u.useStateFromStoresObject)([C.default],(function(){return{selectedVoiceGuildId:C.default.getGuildId(),selectedVoiceChannelId:C.default.getChannelId()}})),w=D.selectedVoiceGuildId,j=D.selectedVoiceChannelId,k=w===r,U=(0,u.useStateFromStores)([S.default],(function(){return S.default.getId()})),G=(0,u.useStateFromStores)([g.default],(function(){if(!k)return!1;var e=g.default.getActiveStreamForUser(U);return null!=e&&e.guildId===r})),F=(0,u.useStateFromStores)([g.default],(function(){return g.default.getAllApplicationStreams().some((function(e){return e.guildId===r}))})),B=(0,u.useStateFromStores)([R.default],(function(){return k&&null!=j&&R.default.hasVideo(j)}),[k,j]),H=(0,u.useStateFromStores)([m.default,P.default],(function(){var e,t=(null===(e=P.default.getCurrentUser())||void 0===e?void 0:e.isStaff())?m.default.getRequest(r):null;return null!=(null==t?void 0:t.applicationStatus)&&null==(null==t?void 0:t.lastSeen)?t.applicationStatus:null})),x=!1,V=!1,W=!1;k?(x=!B,V=B,W=G):W=!s&&F;var Y=(0,l.useListItem)(null!=r?r:"");return a.createElement(Q,Z({},e,{guild:o,unavailable:f,animatable:c,selected:p===r,selectedChannelId:v,badge:M,unread:N,isCurrentUserInThisGuildVoice:k,liveStage:i,isInStageChannel:d,audio:x,video:V,screenshare:W,treeItemProps:Y,joinRequestStatus:H}))}t.JoinRequestGuild=function(e){var t=e.guildId,n=K(e,["guildId"]),r=(0,l.useListItem)(null!=t?t:""),o=(0,u.useStateFromStoresObject)([m.default,P.default],(function(){var e,n=(null===(e=P.default.getCurrentUser())||void 0===e?void 0:e.isStaff())?m.default.getRequest(t):null,r=null!=(null==n?void 0:n.applicationStatus)&&null==(null==n?void 0:n.lastSeen)?n.applicationStatus:null;return{requestToJoinGuild:m.default.getJoinRequestGuild(t),joinRequestStatus:r}})),i=o.requestToJoinGuild,s=o.joinRequestStatus,d=(0,u.useStateFromStores)([L.default],(function(){return L.default.isFocused()})),f=(0,u.useStateFromStores)([M.default],(function(){return M.default.getGuildId()}));return null!=i?a.createElement(Q,Z({},n,{guildId:t,guild:i,animatable:d,draggable:!1,dragging:!1,treeItemProps:r,selected:t===f,isJoinRequestGuild:!0,joinRequestStatus:s,route:x.Routes.GUILD_MEMBER_VERIFICATION(t)})):null},ne.displayName="ConnectedGuild";var re=(0,i.DragSource)(x.GuildsBarDragTypes.GUILD,{beginDrag:function(e){return{folderIndex:e.folderIndex,index:e.index}},endDrag:function(e){null!=e.onDragEnd&&e.onDragEnd(),p.default.updateRemoteSettings({guildFolders:N.default.guildFolders})}},(function(e,t){return{connectDragSource:e.dragSource(),dragging:t.isDragging()}}),{arePropsEqual:s.default})(ne);t.default=re},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageDOMId=function(e){return"chat-messages-"+e},t.MESSAGE_ID_PREFIX=void 0;t.MESSAGE_ID_PREFIX="chat-messages"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useClickMessageAuthorUsername=function(e,t,n,r){var a=b("usernameProfile",n,r);return M(e.author.id,t.id,a)},t.useClickReferencedMessageAuthorUsername=function(e,t,n,r){var a=b("referencedUsernameProfile",n,r);return M(null==e?void 0:e.author.id,t.id,a)},t.useClickInteractionUserUsername=function(e,t,n,r){var a=b("interactionUsernameProfile",n,r);return M(null==e?void 0:e.user.id,t.id,a)},t.useClickMessageAuthorAvatar=function(e,t){return N(b("avatarProfile",e,t))},t.useClickReferencedMessageAuthorAvatar=function(e,t){return N(b("referencedAvatarProfile",e,t))},t.useClickInteractionUserAvatar=function(e,t){return N(b("interactionAvatarProfile",e,t))},t.useContextMenuMessage=function(e,t,n){var a=t.id,i=e.id,l=e.flags,f=(0,v.hasFlag)(l,S.MessageFlags.EPHEMERAL),c=(0,_.default)(e);return r.useCallback((function(e,t){if(y.default.embedded&&!f){var l=u.default.getChannel(a),p=d.default.getMessage(a,i),v=s.default.isEditing(a,i);null==l||null==p||v||(n({contextMenu:!0}),(0,o.openContextMenu)(e,(function(e){return c?r.createElement(g.default,C({},e,{message:p,channel:l,attachment:t})):r.createElement(E.default,C({},e,{message:p,channel:l,attachment:t}))}),{onClose:function(){return n({contextMenu:!1})}}))}}),[f,a,i,n,c])},t.useContextMenuUser=function(e,t){return r.useCallback((function(n){var r=c.default.getUser(e),a=u.default.getChannel(t);null!=r&&null!=a&&(n.stopPropagation(),(0,m.openUserContextMenu)(n,r,a))}),[e,t])},t.useClickMessage=function(e,t){var n=e.id,a=t.id;return r.useCallback((function(e){e.altKey&&(e.preventDefault(),(0,h.default)(a,n))}),[a,n])},t.useHoveredMessage=function(e,t,n){var a=S.ComponentActions.ANIMATE_CHAT_AVATAR(e+":"+t),o=r.useRef(n),i=r.useState(n),l=i[0],u=i[1];o.current=l||o.current;var s=r.useCallback((function(){l||(p.ComponentDispatch.dispatch(a,!0),u(!0))}),[a,l]),d=r.useCallback((function(){p.ComponentDispatch.dispatch(a,!1),u(!1)}),[a]);return{hasHovered:o.current,isHovered:l,handleMouseEnter:s,handleMouseLeave:d}},t.useFocusInside=function(e,t){var n=r.useState(!1),a=n[0],o=n[1],i=r.useState(!1),l=i[0],u=i[1],s=r.useCallback((function(t){(t.target===t.currentTarget||t.currentTarget.contains(document.activeElement))&&(u(!0),o(!0)),null!=e&&e(t)}),[e]),d=r.useCallback((function(e){e.target!==e.currentTarget&&e.currentTarget.contains(document.activeElement)||o(!1),null!=t&&t(e)}),[t]);return{handleFocus:s,handleBlur:d,isFocused:a,hasFocused:l}},t.useClickReply=function(e,t,n){void 0===n&&(n=!1);return r.useCallback((function(){null!=t&&(n?a.default.show({title:O.default.Messages.UNBLOCK_TO_JUMP_TITLE,body:O.default.Messages.UNBLOCK_TO_JUMP_BODY.format({name:t.author.username}),confirmText:O.default.Messages.OKAY}):i.default.jumpToMessage({channelId:t.channel_id,messageId:t.id,flash:!0,returnMessageId:e.id}))}),[n,e.id,t])},t.useClickInteractionCommandName=function(e,t){var n=b("interactionData",e,t);return r.useCallback((function(e){e.preventDefault(),e.stopPropagation(),n()}),[n])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=I(n(154)),o=n(389),i=I(n(390)),l=I(n(8406)),u=I(n(10)),s=I(n(8333)),d=I(n(201)),f=I(n(160)),c=I(n(12)),p=n(121),v=n(99),y=I(n(16)),m=n(8928),_=I(n(685)),h=I(n(8706)),E=I(n(10093)),g=I(n(10104)),S=n(1),O=I(n(6));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n){return r.useCallback((function(){var r;n(((r={})[e]=!t,r))}),[e,n,t])}function M(e,t,n){return r.useCallback((function(r){var a=c.default.getUser(e);if(null!=a)if(r.preventDefault(),r.stopPropagation(),r.shiftKey){var o=a.username,i=a.tag,u="@"+(f.default.hidePersonalInformation?o:i);p.ComponentDispatch.dispatchToLastSubscribed(S.ComponentActions.INSERT_TEXT,{content:u}),l.default.startTyping(t)}else n()}),[e,t,n])}function N(e){return r.useCallback((function(t){t.preventDefault(),t.stopPropagation(),e()}),[e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).state={isAuthenticated:o.default.isAuthenticated()},e.onStoreChange=function(){e.setState({isAuthenticated:o.default.isAuthenticated()})},e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,u(n,r);var s=i.prototype;return s.componentDidMount=function(){o.default.addChangeListener(this.onStoreChange)},s.componentWillUnmount=function(){o.default.removeChangeListener(this.onStoreChange)},s.render=function(){return a.createElement(e,l({},this.props,{isAuthenticated:this.state.isAuthenticated}))},i}(a.Component)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(11))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),a=n(417),o=d(n(749)),i=n(41),l=d(n(13)),u=c(n(8588)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n){return r.createElement(u.default,p({onSuccess:function(){o.default.flowStep(a.FlowType.CREATE_GUILD,a.CreateGuildSteps.SUCCESS),e.onClose()},onSlideChange:function(e){return function(e,t){switch(e){case u.CreateGuildSlideTypes.GUILD_TEMPLATES:o.default.flowStepOrStart(a.FlowType.CREATE_GUILD,a.CreateGuildSteps.GUILD_TEMPLATES),l.default.track(s.AnalyticEvents.OPEN_MODAL,{type:"Create Guild Templates",location:t});break;case u.CreateGuildSlideTypes.CUSTOMIZE_GUILD:o.default.flowStep(a.FlowType.CREATE_GUILD,a.CreateGuildSteps.GUILD_CREATE),l.default.track(s.AnalyticEvents.OPEN_MODAL,{type:"Create Guild Step 2",location:t});break;case u.CreateGuildSlideTypes.CREATION_INTENT:l.default.track(s.AnalyticEvents.OPEN_MODAL,{type:"Server Intent Discovery",location:t});break;case u.CreateGuildSlideTypes.JOIN_GUILD:o.default.flowStep(a.FlowType.CREATE_GUILD,a.CreateGuildSteps.JOIN_GUILD),l.default.track(s.AnalyticEvents.OPEN_MODAL,{type:"Join Guild",location:t})}}(e,n)},initialSlide:t,hasJoinButton:!0},e))}v.displayName="renderModal";var y={CREATE_GUILD_MODAL_KEY:"create-guild",openCreateGuildModal:function(e){var t=e.initialSlide,n=e.location;(0,i.openModal)((function(e){return v(e,t,n)}),{modalKey:"create-guild"})},updateCreateGuildModal:function(e){var t=e.slide,n=e.location;(0,i.updateModal)("create-guild",(function(e){return v(e,t,n)}))}};t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.UploadTypes=void 0;var r,a=_(n(0)),o=n(8),i=_(n(29)),l=y(n(8360)),u=n(85),s=n(131),d=y(n(8793)),f=n(35),c=n(1),p=y(n(6)),v=y(n(7417));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g;function S(e,t,n){var r={top:0,bottom:0,left:0,right:0},a=e-n.width,o=t-n.height;return 0!==a&&(r.left=-Math.abs(a/2),r.right=a/2),0!==o&&(r.bottom=-Math.abs(o/2),r.top=o/2),r}t.UploadTypes=g,function(e){e[e.AVATAR=0]="AVATAR",e[e.BANNER=1]="BANNER"}(g||(t.UploadTypes=g={}));var O=function(e){var t=e.imgURI,n=e.transitionState,r=e.onCrop,y=e.filename,m=e.onClose,_=e.uploadType,O=void 0===_?g.AVATAR:_,I=a.useState({width:0,height:0}),T=I[0],C=I[1],b=a.useState({top:0,bottom:0,left:0,right:0}),M=b[0],N=b[1],A=a.useState(!1),P=A[0],R=A[1],L=a.useState(1),D=L[0],w=L[1],j=a.useState({x:0,y:0}),k=j[0],U=j[1],G=a.useState(null),F=G[0],B=G[1],H=a.useRef({x:0,y:0}),x=a.createRef(),V=(0,u.useUID)(),W=O===g.AVATAR,Y=a.useCallback((function(e,t,n){H.current=function(e,t,n){return{x:(0,o.clamp)(e,n.left,n.right),y:(0,o.clamp)(t,n.bottom,n.top)}}(e,t,n),null!=x.current&&(x.current.style.transform="translate3d("+H.current.x+"px, "+H.current.y+"px, 0)")}),[x]),z=function(){if(!(null==x.current||D>1)){var e=x.current.getBoundingClientRect(),t=e.width,n=e.height,r=function(e,t,n){switch(e){case g.AVATAR:return{width:t,height:n};case g.BANNER:return t/n<2.5?{width:t,height:n}:{width:t*(227.2/n),height:227.2}}}(O,t,n),a=r.width,o=r.height,i=function(e,t,n){switch(e){case g.AVATAR:var r=Math.min(t,n);return{width:r,height:r};case g.BANNER:var a=Math.min(t,568);return{width:a,height:.4*a}}}(O,a,o);B({width:a,height:o}),C(i),N(S(a,o,i))}},K=a.useCallback((function(e){var t=H.current,n=t.x,r=t.y;if(P&&(e.clientX!==n||e.clientY!==r)){var a=e.clientX-k.x,o=e.clientY-k.y;Y(a,o,M)}}),[M,P,k,Y]),$=function(){R(!1)};return a.useEffect((function(){return window.addEventListener("mouseup",$),window.addEventListener("resize",z),function(){window.removeEventListener("mouseup",$),window.removeEventListener("resize",z)}})),a.useEffect((function(){if(P)return window.addEventListener("mousemove",K),function(){return window.removeEventListener("mousemove",K)}}),[K,P]),E(f.ModalRoot,{onAnimationEnd:z,transitionState:n,size:f.ModalSize.MEDIUM,"aria-labelledby":V},void 0,E(f.ModalHeader,{separator:!1,id:V},void 0,E(s.FormTitle,{tag:s.FormTitleTags.H4},void 0,p.default.Messages.AVATAR_UPLOAD_EDIT_MEDIA)),E(f.ModalContent,{className:v.default.modalContent},void 0,E("div",{className:O===g.AVATAR?v.default.editingContainerAvatar:v.default.editingContainerBanner},void 0,a.createElement("img",{style:h({opacity:null==F?0:1,transform:"translate3d("+H.current.x+"px, "+H.current.y+"px, 0px)"},function(){if(null==F)return{};var e=F.width/F.height;if(O===g.BANNER&&e>2.5){var t=T.height/F.height;return{width:F.width*D*t,minWidth:F.width*D*t,height:F.height*D*t}}return{width:F.width*D,minWidth:F.width*D,height:F.height*D}}()),className:v.default.image,src:t,alt:"avatar",ref:x,onMouseDown:function(e){var t=e.clientX-H.current.x,n=e.clientY-H.current.y;U({x:t,y:n}),R(!0)},draggable:!1}),E("div",{className:O===g.AVATAR?v.default.overlayAvatar:v.default.overlayBanner,style:{opacity:null==F?0:1,width:T.width,height:T.height}})),E("div",{className:v.default.sliderContainer},void 0,E(d.default,{className:v.default.icon,width:24,height:24}),E(l.default,{initialValue:1,minValue:1,maxValue:2,keyboardStep:.025,asValueChanges:function(e){if(null!=F){var t=S(F.width*e,F.height*e,T),n=H.current,r=n.x,a=n.y;(0,o.inRange)(r,t.right,t.left)&&(0,o.inRange)(a,t.top,t.bottom)||Y(r,a,t),w(e),N(t)}},equidistant:!0,hideBubble:!0}),E(d.default,{className:v.default.icon,width:48,height:48}))),E(f.ModalFooter,{className:v.default.modalFooter},void 0,E(i.default,{className:v.default.cancelButton,look:i.default.Looks.LINK,color:i.default.Colors.PRIMARY,size:i.ButtonSizes.SMALL,onClick:m},void 0,p.default.Messages.AVATAR_UPLOAD_CANCEL),E(i.default,{size:i.ButtonSizes.SMALL,onClick:function(){if(null!=x.current){var e=x.current,t=e.naturalWidth/e.width,n=T.width/2,a=T.height/2,o=(e.width/2-n-H.current.x)*t,i=(e.height/2-a-H.current.y)*t,l=T.width*t,u=T.height*t,s=W?c.AVATAR_MAX_SIZE:c.USER_BANNER_MAX_WIDTH,d=W?c.AVATAR_MAX_SIZE:c.USER_BANNER_MAX_HEIGHT,f=Math.min(l,s),p=Math.min(u,d),v=document.createElement("canvas");v.width=f,v.height=p;var _=v.getContext("2d");null!=_&&_.drawImage(e,o,i,l,u,0,0,v.width,v.height),r(v.toDataURL("image/png"),y),m()}}},void 0,p.default.Messages.AVATAR_UPLOAD_APPLY)))};O.displayName="ImageCroppingModal";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(88)),l=u(n(5701));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(){return(f=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}).apply(this,arguments)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v,y=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-transform","width","padding-left","padding-right","border-width","box-sizing"],m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleSetRef=function(e){n._textArea=e},n.handleChange=function(e){var t=n.props.onChange;t&&t(e),n.calculateSize()},n.state={height:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var u,s,m,_=r.prototype;return _.componentDidMount=function(){var e=this;Promise.resolve().then((function(){return e.calculateSize()}))},_.componentDidUpdate=function(e,t){var n=this;if(this.state.height!==t.height){var r=this.props.onResize;r&&r(this.state.height)}e.value!==this.props.value&&Promise.resolve().then((function(){return n.calculateSize()}))},_.calculateSize=function(){var e=this._textArea;if(null!=e){var t=this.props,n=t.fontWidthEstimate,r=t.rows,a=e.value;if(null!=n&&-1===a.indexOf("\n")&&a.length*n<.8*e.offsetWidth)this.setState({height:void 0});else{null==v&&null!=document.body&&(v=document.createElement("textarea"),document.body.appendChild(v));var o=this.calculateNodeStyling(e),i=o.paddingSize,l=o.borderSize,u=o.boxSizing,s=o.sizingStyle;v.setAttribute("style",s+";\n  visibility:hidden;\n  overflow:hidden;\n  position:absolute;\n  z-index:-1000;\n  top:0;\n  right:0;\n"),v.value=a,null!=r?v.setAttribute("rows",""+r):v.removeAttribute("rows");var d=v.scrollHeight;"border-box"===u?d+=l:"content-box"===u&&(d-=i),this.setState({height:d})}}},_.calculateNodeStyling=function(e){var t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing")||t.getPropertyValue("-moz-box-sizing")||t.getPropertyValue("-webkit-box-sizing"),r=parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("padding-top")),a=parseFloat(t.getPropertyValue("border-bottom-width"))+parseFloat(t.getPropertyValue("border-top-width"));return{sizingStyle:y.map((function(e){return e+":"+t.getPropertyValue(e)})).join(";"),paddingSize:r,borderSize:a,boxSizing:n}},_.clear=function(){null!=this._textArea&&(this._textArea.value=""),this.calculateSize()},_.blur=function(){var e=this._textArea;null!=e&&e.blur()},_.focus=function(){var e=this._textArea;null!=e&&e.focus()},_.setSelection=function(e,t){null!=this._textArea&&(this._textArea.selectionStart=e,this._textArea.selectionEnd=t)},_.render=function(){var e=this.props,t=e.style,n=e.className,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["style","className"]);delete r.fontWidthEstimate,delete r.onResize;var u=f({},this.state,{},t);return d(i.default,{},void 0,a.createElement("textarea",f({},r,{className:(0,o.default)(n,l.default.scrollbarGhostHairline),ref:this.handleSetRef,style:u,onChange:this.handleChange})))},u=r,(s=[{key:"selectionStart",get:function(){return this._textArea&&this._textArea.selectionStart||0}},{key:"selectionEnd",get:function(){return this._textArea&&this._textArea.selectionEnd||0}},{key:"value",get:function(){return this._textArea&&this._textArea.value||""}}])&&c(u.prototype,s),m&&c(u,m),r}(a.PureComponent);m.displayName="TextAreaAutosize",m.defaultProps={autoFocus:!1,disabled:!1,autoCorrect:"off"};var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(262),i=n(57),l=s(n(16)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._flashTitleInterval=new i.Interval,t.state={titleIndex:null},t.handleFocus=function(){t._flashTitleInterval.stop(),t.setState({titleIndex:null}),document.removeEventListener("focusin",t.handleFocus)},t.rotateTitle=function(){var e=t.state.titleIndex;document.hasFocus()?(t._flashTitleInterval.stop(),t.setState({titleIndex:null})):t.setState({titleIndex:(e+1)%t.titles.length})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a,s,d,v=r.prototype;return v.componentDidMount=function(){l.default.embedded||document.hasFocus()||(this.setState({titleIndex:0}),this._flashTitleInterval.start(1e3,this.rotateTitle),document.addEventListener("focusin",this.handleFocus))},v.componentWillUnmount=function(){this._flashTitleInterval.stop(),document.removeEventListener("focusin",this.handleFocus)},v.render=function(){return null!=this.title?f(o.Helmet,{},void 0,f("title",{},void 0,this.title)):null},a=r,(s=[{key:"titles",get:function(){return[u.default.Messages.GO_LIVE_HEY,u.default.Messages.GO_LIVE_LOOK,u.default.Messages.GO_LIVE_LISTEN]}},{key:"title",get:function(){var e=this.state.titleIndex;return null!=e?this.titles[e]:null}}])&&c(a.prototype,s),d&&c(a,d),r}(a.PureComponent);t.default=v,v.displayName="TitleFocusFlasher"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(29)),o=n(85),i=n(131),l=n(35),u=f(n(24)),s=f(n(6)),d=f(n(7424));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.onClose,n=e.transitionState,r=e.body,f=(0,o.useUID)();return p(l.ModalRoot,{transitionState:n,"aria-labelledby":f},void 0,p(l.ModalHeader,{id:f,separator:!1},void 0,p(i.FormTitle,{tag:i.FormTitle.Tags.H2,className:d.default.title},void 0,s.default.Messages.STREAM_REPORTED)),p(l.ModalContent,{},void 0,p(u.default,{size:u.default.Sizes.SIZE_16},void 0,r)),p(l.ModalFooter,{},void 0,p(a.default,{color:a.default.Colors.BRAND,onClick:t},void 0,s.default.Messages.DONE)))}v.displayName="ProblemReported"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(192),l=d(n(88)),u=d(n(61)),s=d(n(7444));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=a.forwardRef((function(e,t){var n,r,d,f=e.avatar,v=e.name,y=e.children,m=e.subText,_=e.decorators,h=e.onClick,E=e.selected,g=e.muted,S=e.to,O=e.selectedClassName,I=e.innerClassName,T=e.wrapContent,C=e.highlighted,b=e.focusProps,M=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["avatar","name","children","subText","decorators","onClick","selected","muted","to","selectedClassName","innerClassName","wrapContent","highlighted","focusProps"]);M.className=(0,o.default)(M.className,s.default.container,((n={})[s.default.selected]=E,n[s.default.highlighted]=C,n[O||""]=E,n[s.default.clickable]=!E&&(S||h),n));var N=p("div",{className:(0,o.default)(I,s.default.layout,(r={},r[s.default.muted]=!E&&g,r[s.default.wrappedLayout]=T,r))},void 0,p("div",{className:s.default.avatar},void 0,f),p("div",{className:s.default.content},void 0,p("div",{className:s.default.nameAndDecorators},void 0,p("div",{className:(0,o.default)(s.default.name,(d={},d[s.default.wrappedName]=T,d))},void 0,v),_),null!=m?p("div",{className:s.default.subText},void 0,m):null),null!=y?p("div",{className:s.default.children},void 0,y):null);return null!=S?a.createElement(l.default,b,a.createElement(i.Link,c({to:S,onClick:h},M,{role:"listitem",ref:t}),N)):null!=h?a.createElement(u.default,c({onClick:h,focusProps:b},M,{role:"listitem",innerRef:t}),N):a.createElement(l.default,b,a.createElement("div",c({},M,{role:"listitem",ref:t}),N))}));t.default=v},function(e,t,n){"use strict";function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0)).createContext(void 0);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maybeFetchColor=function(e){return m.apply(this,arguments)},t.default=function(e,t,n){var o=(0,i.useStateFromStores)([l.default],(function(){return l.default.desaturateUserColors})),u=y((function(a){var i,l;if(null==e)return t;var u=n;return null==u&&(u=o?r.HSL:r.RGB),null!==(i=null===(l=a.colors[e])||void 0===l?void 0:l[u])&&void 0!==i?i:t}));return a.useEffect((function(){null!=e&&u===t&&_(e)}),[e,u,t]),u},t.ColorFormats=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(251)),i=n(3),l=d(n(105)),u=n(483),s=n(1239);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){p(o,r,a,i,l,"next",e)}function l(e){p(o,r,a,i,l,"throw",e)}i(void 0)}))}}t.ColorFormats=r,function(e){e.HEX="hex",e.HSL="hsl",e.RGB="rgb"}(r||(t.ColorFormats=r={}));var y=(0,o.default)((function(){return{colors:{},fetching:{}}}));function m(){return(m=v(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==y.getState().colors[t]){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,_(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return h.apply(this,arguments)}function h(){return(h=v(regeneratorRuntime.mark((function e(t){var n,r,a,o,i,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!y.getState().fetching[t]){e.next=2;break}return e.abrupt("return");case 2:return y.setState((function(e){var n;return{fetching:c({},e.fetching,(n={},n[t]=!0,n))}})),e.prev=3,e.next=6,(0,s.getPrimaryColorForAvatar)(t);case 6:n=e.sent,r=n[0],a=n[1],o=n[2],i="rgb("+r+", "+a+", "+o+")",l=(0,u.rgbToHsl)(r,a,o),d=(0,u.rgbToHex)(r,a,o),y.setState((function(e){var n,r;return{fetching:c({},e.fetching,(n={},n[t]=!1,n)),colors:c({},e.colors,(r={},r[t]={rgb:i,hsl:l,hex:d},r))}})),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(3),y.setState((function(e){var n;return{fetching:c({},e.fetching,(n={},n[t]=!1,n))}}));case 19:case"end":return e.stop()}}),e,null,[[3,16]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.UserActivityTypes=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(1214),l=E(n(8600)),u=n(8596),s=E(n(163)),d=E(n(10)),f=E(n(71)),c=E(n(15)),p=E(n(80)),v=E(n(29)),y=E(n(8823)),m=n(252),_=n(1),h=E(n(7463));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.type,n=e.source,r=e.activity,a=e.applicationStream,o=e.user,i=e.guildId,u=e.channelId,s=e.onAction,d=e.onOpenConnections;return O(l.default,{className:(0,m.getClass)(h.default,"actions",t),type:t,source:n,activity:r,applicationStream:a,user:o,guildId:i,look:v.default.Looks.FILLED,color:v.default.Colors.GREY,channelId:u,onOpenConnections:d,onAction:s})}function T(e){var t=e.activity,n=e.user,r=e.useStoreStream,l=void 0===r||r,v=e.showActions,m=void 0===v||v,h=e.hideHeader,E=void 0!==h&&h,g=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["activity","user","useStoreStream","showActions","hideHeader"]),O=(0,o.useStateFromStores)([s.default],(function(){return l?s.default.getStreamForUser(n.id):null})),T=(0,o.useStateFromStores)([c.default,p.default,d.default],(function(){var e,r;return(0,i.hasFlag)(t,_.ActivityFlags.EMBEDDED)?c.default.getGuild(null===(e=d.default.getChannel(null===(r=p.default.getVoiceStateForSession(n.id,null==t?void 0:t.session_id))||void 0===r?void 0:r.channelId))||void 0===e?void 0:e.getGuildId()):null})),C=(0,o.useStateFromStores)([c.default],(function(){return null!=O?c.default.getGuild(O.guildId):null})),b=(0,o.useStateFromStores)([f.default],(function(){return null!=t?null!=t.application_id?f.default.getGame(t.application_id):f.default.getGameByName(t.name):null}));return a.createElement(y.default,S({},g,{activity:t,user:n,application:b,hideHeader:E,activityGuild:null!=T?T:C,renderActions:m?function(){return a.createElement(I,S({},g,{applicationStream:O,activity:t,user:n}))}:null,onOpenSpotifyTrack:u.openTrack,onOpenSpotifyArtist:u.openArtist,onOpenSpotifyAlbum:u.openAlbum}))}I.displayName="UserActivityActionsContainer",T.displayName="UserActivityContainer";var C=y.default.Types;t.UserActivityTypes=C;var b=T;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(8)),a=c(n(5)),o=c(n(3)),i=n(57),l=c(n(2)),u=c(n(5960)),s=c(n(5851)),d=n(402),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v={},y={},m=[],_=[],h=[],E=new Set,g={},S={},O=new Set;function I(e){var t=s.default.createFromServer(e),n=t.code;if(null!=y[n])y[n]=y[n].merge(t);else if(y[n]=t,null!=t.expiresAt){var r=new i.Timeout;v[n]=r,function e(t){var n=y[t];if(null==n||null==n.expiresAt)return;var r=n.expiresAt.valueOf()-(0,a.default)().valueOf();if(r<=0)delete y[t],delete v[t],N.emitChange();else{var o=v[t];if(null==o)return;o.start(Math.min(f.MAX_TIMEOUT_MS,r),(function(){return e(t)}))}}(n)}}function T(e,t){if(void 0===t&&(t=!1),t&&!O.has(e.channel_id))return!1;var n=(0,d.findGiftCodes)(e.content);return 0===n.length||n.forEach((function(e){m.includes(e)||h.includes(e)||(C({code:e}),l.default.wait((function(){return u.default.resolveGiftCode(e,!1,!0).catch(f.NOOP_NULL)})))})),!1}function C(e){var t=e.code;m.includes(t)||(m=[].concat(m,[t]))}function b(e){return T(e.message,!0)}function M(e){var t=e.channelId,n=e.messages;O.add(t),n.forEach((function(e){return T(e,!0)}))}var N=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var o=a.prototype;return o.get=function(e){var t=y[e];return null==t||t.isExpired()?null:t},o.getError=function(e){return null!=e?S[e]:null},o.getForGifterSKUAndPlan=function(e,t,n){return r.default.values(y).filter((function(r){return r.userId===e&&r.skuId===t&&(null==n||r.subscriptionPlanId===n)&&!r.isExpired()}))},o.getIsResolved=function(e){return h.includes(e)},o.getIsAccepting=function(e){return _.includes(e)},o.getUserGiftCodesFetchingForSKUAndPlan=function(e,t){return E.has((0,d.makeComboId)(e,t))},o.getUserGiftCodesLoadedAtForSKUAndPlan=function(e,t){return g[(0,d.makeComboId)(e,t)]},o.getResolvingCodes=function(){return m},o.getResolvedCodes=function(){return h},o.getAcceptingCodes=function(){return _},a}(o.default.Store))(l.default,{CONNECTION_OPEN:function(e){return O.clear(),!1},CHANNEL_SELECT:function(e){var t=e.channelId;return null!=t&&O.add(t),!1},GIFT_CODE_RESOLVE:C,GIFT_CODE_RESOLVE_SUCCESS:function(e){var t=e.giftCode;return m=m.filter((function(e){return e!==t.code})),h.includes(t.code)||(h=[].concat(h,[t.code])),I(t)},GIFT_CODE_RESOLVE_FAILURE:function(e){var t=e.code;m=m.filter((function(e){return e!==t})),h.includes(t)||(h=[].concat(h,[t]))},GIFT_CODE_REDEEM:function(e){var t=e.code;_.includes(t)||(_=[].concat(_,[t]))},GIFT_CODE_REDEEM_SUCCESS:function(e){var t=e.code;_=_.filter((function(e){return e!==t}));var n=y[t];null!=n&&(y[t]=n.merge({redeemed:!0,uses:n.uses+1}))},GIFT_CODE_REDEEM_FAILURE:function(e){var t=e.code,n=e.error;_=_.filter((function(e){return e!==t}));var r=y[t];if(S[t]=n,null!=r)switch(n.code){case f.AbortCodes.UNKNOWN_GIFT_CODE:y[t]=r.set("revoked",!0);break;case f.AbortCodes.INVALID_GIFT_REDEMPTION_EXHAUSTED:y[t]=r.set("uses",r.maxUses)}},GIFT_CODE_REVOKE_SUCCESS:function(e){var t=e.code;delete y[t];var n=v[t];null!=n&&(n.stop(),delete v[t]),h.includes(t)||(h=[].concat(h,[t]))},GIFT_CODE_CREATE_SUCCESS:function(e){I(e.giftCode)},GIFT_CODES_FETCH:function(e){var t=e.skuId,n=e.subscriptionPlanId;E.add((0,d.makeComboId)(t,n))},GIFT_CODES_FETCH_SUCCESS:function(e){var t=e.giftCodes,n=e.skuId,r=e.subscriptionPlanId;t.forEach(I);var a=(0,d.makeComboId)(n,r);g[a]=Date.now(),E.delete(a)},GIFT_CODES_FETCH_FAILURE:function(e){var t=e.skuId,n=e.subscriptionPlanId;E.delete((0,d.makeComboId)(t,n))},MESSAGE_CREATE:b,MESSAGE_UPDATE:b,LOAD_MESSAGES_SUCCESS:M,LOAD_MESSAGES_AROUND_SUCCESS:M,LOAD_RECENT_MENTIONS_SUCCESS:function(e){e.messages.forEach((function(e){return T(e)}))},LOAD_PINNED_MESSAGES_SUCCESS:function(e){e.messages.forEach((function(e){return T(e)}))},SEARCH_FINISH:function(e){e.messages.forEach((function(e){e.forEach((function(e){return T(e)}))}))},GIFT_CODE_UPDATE:function(e){var t=e.uses,n=e.code,r=y[n];null!=r&&(y[n]=r.set("uses",Math.max(r.uses,t)))}}),A=N;t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(2)),a=v(n(8389)),o=v(n(390)),i=v(n(397)),l=v(n(8422)),u=v(n(9376)),s=n(8390),d=v(n(8437)),f=v(n(1225)),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n,v,m,_){var h={content:"",tts:!1,hasSpoiler:m,filename:_};if(null!=v){h.content=v.content,h.tts=v.tts;var E=d.default.getPendingReply(e);if(null!=E){var g=o.default.getSendMessageOptionsForReply(E);h.type=c.MessageTypes.REPLY,h.message_reference=g.messageReference,h.allowed_mentions=g.allowedMentions,(0,s.deletePendingReply)(e)}}var S=new u.default(c.Endpoints.MESSAGES(e));S.on("start",(function(t){r.default.dispatch({type:c.ActionTypes.UPLOAD_START,channelId:e,file:t,uploader:S})})),S.on("progress",(function(t){r.default.dispatch({type:c.ActionTypes.UPLOAD_PROGRESS,channelId:e,file:t})})),S.on("error",(function(u,s){r.default.dispatch({type:c.ActionTypes.UPLOAD_FAIL,channelId:e,file:u}),s!==c.AbortCodes.EXPLICIT_CONTENT?(i.default.push(l.default,{title:p.default.Messages.UPLOAD_AREA_UPLOAD_FAILED_TITLE,help:p.default.Messages.UPLOAD_AREA_UPLOAD_FAILED_HELP.format({onClick:function(){i.default.pop(),y(e,t,n,v)}})}),""!==h.content&&""===f.default.getDraft(e,n)&&a.default.saveDraft(e,h.content,n)):o.default.sendClydeError(e,s)})),S.on("complete",(function(t){r.default.dispatch({type:c.ActionTypes.UPLOAD_COMPLETE,channelId:e,file:t})})),S.upload(t,h)}var m={instantBatchUpload:function(e,t,n){Array.prototype.forEach.call(t,(function(t){y(e,t,n)}))},upload:y,cancel:function(e){r.default.dispatch({type:c.ActionTypes.UPLOAD_CANCEL_REQUEST,file:e})}};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllLiveStageChannels=function(){return u.default.getAllStageInstances().map((function(e){return a.default.getChannel(e.channel_id)})).filter(i.isNotNullish).filter((function(e){return o.default.can(l.JOIN_VOCAL_CHANNEL_PERMISSIONS,e)}))},t.useAllLiveStageChannels=function(){return d((0,r.useStateFromStores)([u.default],(function(){return u.default.getAllStageInstances().map((function(e){return e.channel_id}))}),[]))},t.default=function(e){return d((0,r.useStateFromStoresArray)([u.default],(function(){return Object.keys(u.default.getStageInstancesByGuild(e))}),[e]))};var r=n(3),a=s(n(10)),o=s(n(40)),i=n(48),l=n(203),u=s(n(81));function s(e){return e&&e.__esModule?e:{default:e}}function d(e){var t=(0,r.useStateFromStoresArray)([a.default],(function(){return e.map((function(e){return a.default.getChannel(e)})).filter(i.isNotNullish)}),[e]);return(0,r.useStateFromStoresArray)([o.default],(function(){return t.filter((function(e){return o.default.can(l.JOIN_VOCAL_CHANNEL_PERMISSIONS,e)}))}),[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s={expressionSuggestionsEnabled:!0},d=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a,o,u,d=r.prototype;return d.initialize=function(e){null!=e&&(s=e)},d.getState=function(){return s},a=r,(o=[{key:"expressionSuggestionsEnabled",get:function(){return s.expressionSuggestionsEnabled}}])&&i(a.prototype,o),u&&i(a,u),r}(r.default.PersistedStore);d.persistKey="ExpressionSuggestionsPersistedStore";var f=new d(a.default,{EXPRESSION_SUGGESTIONS_TOGGLE:function(e){s=u({},s,{expressionSuggestionsEnabled:!s.expressionSuggestionsEnabled})}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSupported=s,t.setEnabled=function(e){return null!=d?d.then((function(t){t.enabled=e})):Promise.resolve()},t.setLearnedWords=function(e){return null!=d?d.then((function(t){return t.setLearnedWords(e)})):Promise.resolve()},t.isMisspelled=function(e,t){void 0===t&&(t=!1);return null!=d?d.then((function(n){return n.isMisspelled(e,t)})):Promise.resolve(!1)},t.getCorrections=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=5);return null!=d?d.then((function(r){return r.getCorrectionsForMisspelling(e,t).slice(0,n)})):Promise.resolve([])},t.replaceWithCorrection=function(e){return null!=d?d.then((function(t){return t.replaceMisspelling(e)})):Promise.resolve()},t.setAppLocale=function(e){return null!=d?d.then((function(t){return t.setAppLocale(e)})):Promise.resolve()},t.addResultListener=function(e){if(!u())return;(r.default.spellCheck.Spellchecker||r.default.spellCheck).on("spellcheck-result",e)},t.removeResultListener=function(e){if(!u())return;(r.default.spellCheck.Spellchecker||r.default.spellCheck).removeListener("spellcheck-result",e)};var r=l(n(118)),a=n(8870),o=n(8872),i=l(n(16));function l(e){return e&&e.__esModule?e:{default:e}}function u(){var e=null==r.default.spellCheck.setSpellCheckProvider,t=null!=r.default.spellCheck.Spellchecker;return e||t}function s(){return!!i.default.embedded&&(u()?i.default.isDesktop():i.default.isOSX()||i.default.isWindows()&&parseFloat(r.default.os.release)>=6.2)}var d=s()?u()?(0,o.install)():(0,a.installLegacy)():null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(43))&&r.__esModule?r:{default:r};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(e,t){this._shouldProcess=!1,this._processing=!1,this._minimumTimeRemaining=5,this._language=e,this._languageHint=e,this._onChange=t,t(e)}var t,n,r,i=e.prototype;return i.process=function(e){var t=this;this._processing||(this._processing=!0,requestIdleCallback((function(n){n.timeRemaining()<=t._minimumTimeRemaining?t._processEnd():(e.length>256&&(e=e.slice(0,256)),function(e,t){return a.default.ensureModule("discord_spellcheck").then((function(){var n=a.default.requireModule("discord_spellcheck").cld;return new Promise((function(r,a){n.detect(e,{httpHint:t,encodingHint:"UTF8"},(function(e,t){null!=e?a(new Error(e.message)):!t.reliable||t.languages[0].percent<90||t.languages[0].score<500?a(new Error("Not enough reliable text.")):r(t.languages[0].code)}))}))}))}(e,t._languageHint).then((function(e){t.language=e,t._processEnd(n.didTimeout)}),(function(){t._processEnd(n.didTimeout)})))})))},i._processEnd=function(e){void 0===e&&(e=!1),this._processing=!1,e&&this._minimumTimeRemaining++},t=e,(n=[{key:"language",get:function(){return this._language},set:function(e){this._language!==e&&(this._language=e,this._onChange(e))}},{key:"languageHint",set:function(e){this._languageHint=e}}])&&o(t.prototype,n),r&&o(t,r),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={aa:"aa-ET",af:"af-ZA",ak:"ak-GH",am:"am-ET",an:"an-ES",ar:"ar-MA",as:"as-IN",ay:"ay-PE",az:"az-AZ",be:"be-BY",bg:"bg-BG",bi:"bi-TV",bn:"bn-BD",bo:"bo-CN",br:"br-FR",bs:"bs-BA",ca:"ca-ES",ce:"ce-RU",cs:"cs-CZ",cv:"cv-RU",cy:"cy-GB",da:"da-DK",de:"de-DE",dv:"dv-MV",dz:"dz-BT",el:"el-GR",en:"en-US",es:"es-ES",et:"et-EE",eu:"eu-ES",fa:"fa-IR",ff:"ff-SN",fi:"fi-FI",fo:"fo-FO",fr:"fr-FR",fy:"fy-DE",ga:"ga-IE",gd:"gd-GB",gl:"gl-ES",gu:"gu-IN",gv:"gv-GB",ha:"ha-NG",he:"he-IL",hi:"hi-IN",hr:"hr-HR",ht:"ht-HT",hu:"hu-HU",hy:"hy-AM",ia:"ia-FR",id:"id-ID",ig:"ig-NG",ik:"ik-CA",is:"is-IS",it:"it-IT",iu:"iu-CA",ja:"ja-JP",ka:"ka-GE",kk:"kk-KZ",kl:"kl-GL",km:"km-KH",kn:"kn-IN",ko:"ko-KR",ks:"ks-IN",ku:"ku-TR",kw:"kw-GB",ky:"ky-KG",lb:"lb-LU",lg:"lg-UG",li:"li-BE",ln:"ln-CD",lo:"lo-LA",lt:"lt-LT",lv:"lv-LV",mg:"mg-MG",mh:"mh-MH",mi:"mi-NZ",mk:"mk-MK",ml:"ml-IN",mn:"mn-MN",mr:"mr-IN",ms:"ms-MY",mt:"mt-MT",my:"my-MM",nb:"nb-NO",ne:"ne-NP",nl:"nl-NL",nn:"nn-NO",nr:"nr-ZA",oc:"oc-FR",om:"om-KE",or:"or-IN",os:"os-RU",pa:"pa-PK",pl:"pl-PL",ps:"ps-AF",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",rw:"rw-RW",sa:"sa-IN",sc:"sc-IT",sd:"sd-IN",se:"se-NO",si:"si-LK",sk:"sk-SK",sl:"sl-SI",so:"so-SO",sq:"sq-AL",sr:"sr-RS",ss:"ss-ZA",st:"st-ZA",sv:"sv-SE",sw:"sw-KE",ta:"ta-IN",te:"te-IN",tg:"tg-TJ",th:"th-TH",ti:"ti-ER",tk:"tk-TM",tl:"tl-PH",tn:"tn-ZA",tr:"tr-TR",ts:"ts-ZA",tt:"tt-RU",ug:"ug-CN",uk:"uk-UA",ur:"ur-PK",uz:"uz-UZ",ve:"ve-ZA",vi:"vi-VN",wa:"wa-BE",wo:"wo-SN",xh:"xh-ZA",yi:"yi-US",yo:"yo-NG",zh:"zh-CN",zu:"zu-ZA"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=n(122),l=n(252),u=c(n(29)),s=n(1),d=c(n(6)),f=c(n(7536));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _={tension:800,friction:24},h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={hovered:!1,emojiIndex:0},t.handleMouseEnter=function(){if(!t.state.hovered&&!t.props.active){var e=Math.floor(Math.random()*s.EmojiSprites.PickerCount);t.setState({hovered:!0,emojiIndex:e})}},t.handleMouseLeave=function(){t.setState({hovered:!1})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.getSpriteStyle=function(){var e=this.state.emojiIndex;return{backgroundPosition:-e%s.EmojiSprites.PickerPerRow*22+"px "+22*-Math.floor(e/s.EmojiSprites.PickerPerRow)+"px",backgroundSize:22*s.EmojiSprites.PickerPerRow+"px "+22*Math.ceil(s.EmojiSprites.PickerCount/s.EmojiSprites.PickerPerRow)+"px"}},a.render=function(){var e=this.props,t=e.tabIndex,n=e.className,r=e.renderButtonContents,a=e.active,s=e.onClick,c=e["aria-expanded"],p=e["aria-controls"],m=e.focusProps,h=this.state.hovered||a,E=(0,l.getClass)(f.default,"emojiButton",h?"Hovered":"Normal"),g=this.getSpriteStyle();return v(u.default,{look:u.default.Looks.BLANK,size:u.default.Sizes.NONE,tabIndex:t,className:(0,o.default)(E,n),onMouseEnter:this.handleMouseEnter,onMouseOver:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClick:s,"aria-label":d.default.Messages.SELECT_EMOJI,"aria-expanded":c,"aria-controls":p,focusProps:m},void 0,null!=r?r():v(i.Spring,{config:_,to:{value:h?1:0}},void 0,(function(e){var t=e.value;return v(i.animated.div,{className:f.default.sprite,style:y({},g,{transform:t.to([0,1],[1,1.14]).to((function(e){return"scale("+e+")"})),filter:t.to((function(e){return"grayscale("+(100-100*e)+"%)"}))})})})))},r}(a.PureComponent);h.displayName="EmojiButton";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?14:t,r=e.height,a=void 0===r?14:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 14 14"}),s("path",{className:f,fill:d,d:"M12,0 C12.8284271,0 14,1.17157288 14,2 L14,12 C14,12.8284271 12.8284271,14 12,14 L2,14 C1.17157288,14 0,12.8284271 0,12 L0,2 C0,1.17157288 1.17157288,0 2,0 L12,0 Z M8,3 L6,3 L6,8 L8,8 L8,3 Z M8,11 L8,9 L6,9 L6,11 L8,11 Z"}))}d.displayName="WarningBox"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAutoArchiveDurationText=function(e){var t,n=s(null,!0).find((function(t){return t.value===e}));return null!==(t=null==n?void 0:n.label)&&void 0!==t?t:a.default.duration(e,"minutes").humanize()},t.getAutoArchiveDuration=function(e,t,n){var r,a=null!==(r=null!=n?n:null==e?void 0:e.defaultAutoArchiveDuration)&&void 0!==r?r:o.DEFAULT_AUTO_ARCHIVE_DURATION;if(4320===a&&(null==t||!t.hasFeature(i.GuildFeatures.THREE_DAY_THREAD_ARCHIVE)))return o.DEFAULT_AUTO_ARCHIVE_DURATION;if(10080===a&&(null==t||!t.hasFeature(i.GuildFeatures.SEVEN_DAY_THREAD_ARCHIVE)))return o.DEFAULT_AUTO_ARCHIVE_DURATION;return a},t.getAutoArchiveDurations=t.getAutoArchiveOptions=void 0;var r=u(n(9116)),a=u(n(5)),o=n(392),i=n(1),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}var s=(0,r.default)((function(e,t){var n=[{label:l.default.Messages.AUTO_ARCHIVE_DURATION_1_HOUR,value:60},{label:l.default.Messages.AUTO_ARCHIVE_DURATION_24_HOURS,value:1440}];return(null!=e&&e.hasFeature(i.GuildFeatures.THREE_DAY_THREAD_ARCHIVE)||t)&&n.push({label:l.default.Messages.AUTO_ARCHIVE_DURATION_3_DAYS,value:4320}),(null!=e&&e.hasFeature(i.GuildFeatures.SEVEN_DAY_THREAD_ARCHIVE)||t)&&n.push({label:l.default.Messages.AUTO_ARCHIVE_DURATION_1_WEEK,value:10080}),n}));t.getAutoArchiveOptions=s;var d=(0,r.default)((function(e){return s(e).map((function(e){return e.value}))}));t.getAutoArchiveDurations=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StageInviteFooter=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=E(n(162)),l=E(n(89)),u=E(n(29)),s=E(n(371)),d=E(n(1240)),f=E(n(407)),c=E(n(291)),p=E(n(279)),v=E(n(47)),y=E(n(248)),m=E(n(24)),_=E(n(6)),h=E(n(7577));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=function(e){var t,n=e.speaker,r=e.guildId,a=e.isEmbed,o=new l.default(n.user);return S("div",{className:h.default.speaker},void 0,S(p.default,{src:o.getAvatarURL(r),size:a?p.default.Sizes.SIZE_16:p.default.Sizes.SIZE_24,"aria-label":n.nick+"-avatar",className:a?null:h.default.avatar}),S(m.default,{size:a?m.default.Sizes.SIZE_12:m.default.Sizes.SIZE_14,color:m.default.Colors.HEADER_SECONDARY,className:h.default.username},void 0,null!==(t=n.nick)&&void 0!==t?t:o.username))};O.displayName="StageInviteSpeaker";var I=function(e){var t,n,r,l,p,E=e.stageInstance,g=e.guild,I=e.isCard,T=void 0!==I&&I,C=e.isEmbed,b=void 0!==C&&C,M=e.onClick,N=a.useMemo((function(){return null==g?null:g instanceof i.default?g:new i.default(g)}),[g]);if(null==E||null==N)return null;var A=E.topic,P=E.speaker_count,R=E.participant_count,L=null!==(t=E.members)&&void 0!==t?t:[],D=b?L.slice(0,3):L,w=P-D.length;return b&&(w+=L.length-D.length),S("div",{},void 0,S("div",{className:h.default.flex},void 0,S("div",{className:h.default.flex},void 0,S(c.default,{height:24,width:24,className:h.default.live}),S(v.default,{size:v.default.Sizes.SIZE_12,uppercase:!0,className:(0,o.default)(h.default.label,h.default.live)},void 0,_.default.Messages.STAGE_CHANNEL_LIVE_NOW)),S("div",{className:h.default.background},void 0,S(d.default,{height:16,width:16,className:h.default.listeners}),S(v.default,{className:(0,o.default)(h.default.label,h.default.listeners)},void 0,R))),b&&S("div",{className:(0,o.default)(h.default.guild,(n={},n[h.default.embed]=b,n))},void 0,S(y.default,{mask:y.default.Masks.SQUIRCLE,width:20,height:20},void 0,S(s.default,{guild:N,size:s.default.Sizes.MINI,active:!0})),S(m.default,{color:m.default.Colors.HEADER_SECONDARY,className:h.default.label},void 0,N.name)),S(v.default,{size:T||b?v.default.Sizes.SIZE_16:v.default.Sizes.SIZE_20,className:(0,o.default)(h.default.header,(r={},r[h.default.embed]=b,r))},void 0,A),S("div",{className:(0,o.default)(h.default.members,(l={},l[h.default.embed]=b,l))},void 0,S("div",{className:h.default.speakers},void 0,D.map((function(e){return S(O,{speaker:e,guildId:N.id,isEmbed:b},e.user.id)})),w>0?S("div",{className:h.default.speaker},void 0,S("div",{className:(0,o.default)(h.default.icon,(p={},p[h.default.embed]=b,p))},void 0,S(f.default,{height:b?12:14,className:h.default.listeners})),S(m.default,{size:b?m.default.Sizes.SIZE_12:m.default.Sizes.SIZE_14,color:m.default.Colors.HEADER_SECONDARY,className:h.default.label},void 0,"+",_.default.Messages.STAGE_INVITE_SPEAKER_COUNT.format({count:w}))):null),b&&S(u.default,{color:u.default.Colors.GREEN,onClick:M},void 0,_.default.Messages.STAGE_CHANNEL_JOIN_BUTTON)))};I.displayName="StageInviteHeader";var T=function(e){var t=e.guild,n=e.onlineCount;if(null==t)return null;var r=new i.default(t),a=r.name,o=r.description;return S("div",{},void 0,S(v.default,{muted:!0,uppercase:!0,className:h.default.alignStart},void 0,_.default.Messages.STAGE_INVITE_GUILD_HEADER),S("div",{className:h.default.guild},void 0,S(y.default,{mask:y.default.Masks.SQUIRCLE,width:40,height:40},void 0,S(s.default,{guild:r,size:s.default.Sizes.MEDIUM,active:!0})),S("div",{className:h.default.guildInfo},void 0,S(v.default,{},void 0,a),S("div",{className:h.default.speaker},void 0,S("div",{className:h.default.dot}),null!=n&&n>0?S(m.default,{},void 0,_.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:n})):null))),o&&S(m.default,{color:m.default.Colors.HEADER_SECONDARY,className:h.default.alignStart},void 0,o))};t.StageInviteFooter=T,T.displayName="StageInviteFooter";var C=I;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={},s=null,d=[],f=!1,c=null,p=null;function v(){f=!0}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a,o,v,y=r.prototype;return y.getSubscriptionsForGuild=function(e){return null!=u[e]?u[e].subscriptions:null},y.getLastFetchedAtForGuild=function(e){return null!=u[e]?u[e].lastFetchedAt:null},y.getCurrentUserSubscriptions=function(){return d},y.getSubscription=function(e){return d.find((function(t){return t.id===e}))},a=r,(o=[{key:"isModifyingSubscription",get:function(){return f}},{key:"subscribeError",get:function(){return c}},{key:"unsubscribeError",get:function(){return p}},{key:"cooldownEndsAt",get:function(){return s}}])&&i(a.prototype,o),v&&i(a,v),r}(r.default.Store))(a.default,{GUILD_PREMIUM_SUBSCRIPTIONS_FETCH_SUCCESS:function(e){var t=e.guildId,n=e.subscriptions;u[t]={subscriptions:n,lastFetchedAt:Date.now()}},GUILD_USER_PREMIUM_SUBSCRIPTIONS_FETCH_SUCCESS:function(e){var t=e.subscriptions;d=t},GUILD_PREMIUM_SUBSCRIPTIONS_COOLDOWN_FETCH_SUCCESS:function(e){var t=e.endsAt;s=t},GUILD_PREMIUM_UNSUBSCRIBE_START:function(e){return v()},GUILD_PREMIUM_SUBSCRIBE_START:function(e){return v()},GUILD_PREMIUM_SUBSCRIBE_SUCCESS:function(e){var t=e.subscriptions,n=new Set(t.map((function(e){return e.id})));d=[].concat(t,d.filter((function(e){return!n.has(e.id)}))),c=null,f=!1},GUILD_PREMIUM_SUBSCRIBE_FAIL:function(e){var t=e.error;f=!1,c=t},GUILD_PREMIUM_UNSUBSCRIBE_SUCCESS:function(e){var t=e.subscriptionId;d=d.filter((function(e){return e.id!==t})),f=!1},GUILD_PREMIUM_UNSUBSCRIBE_FAIL:function(e){var t=e.error;f=!1,p=t}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}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}).apply(this,arguments)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function a(t){var n;return(n=e.call(this)||this).code=t.code||"",n.temporary=t.temporary||!1,n.revoked=t.revoked||!1,n.uses=t.uses||0,n.maxUses=t.maxUses||0,n.maxAge=t.maxAge||0,n.createdAt=t.createdAt||new Date,n.channel=t.channel,n.guild=t.guild,n.inviter=t.inviter||null,n.targetType=t.targetType||null,n.targetUser=t.targetUser||null,n.targetApplication=t.targetApplication||null,n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),a.createFromServer=function(e){var t;return new a(o({},e,{maxUses:e.max_uses,maxAge:e.max_age,createdAt:(0,r.default)(null!==(t=e.created_at)&&void 0!==t?t:void 0),targetType:e.target_type,targetUser:e.target_user,targetApplication:e.target_application}))};var l=a.prototype;return l.isExpired=function(){var e=this.maxAge;if(e>0&&(0,r.default)(this.createdAt).add(e,"seconds").isBefore(Date.now()))return!0;return!1},l.getExpiresAt=function(){return this.maxAge>0?(0,r.default)(this.createdAt).add(this.maxAge,"seconds").toDate():1/0},l.toString=function(){return this.code},a}(a(n(62)).default);t.default=l},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.NUF_NOTIFICATION_MODAL_KEY=t.NewUserTypes=void 0,t.NewUserTypes=r,function(e){e[e.MARKETING_UNCLAIMED=0]="MARKETING_UNCLAIMED",e[e.INVITE_UNCLAIMED=1]="INVITE_UNCLAIMED",e[e.ORGANIC_REGISTERED=2]="ORGANIC_REGISTERED",e[e.ORGANIC_REGISTERED_GUILD_TEMPLATE=3]="ORGANIC_REGISTERED_GUILD_TEMPLATE"}(r||(t.NewUserTypes=r={}));t.NUF_NOTIFICATION_MODAL_KEY="nuf-notification-modal-key"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useChannelNotificationRadioItems=m,t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(8477)),l=c(n(9160)),u=n(8253),s=c(n(181)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){switch(e.type){case d.ChannelTypes.GUILD_VOICE:return null;case d.ChannelTypes.GUILD_STAGE_VOICE:return function(e){return l.default.getCurrentConfig({guildId:e.guild_id}).showNotificationSurfaces?[{setting:d.UserNotificationSettings.NULL,label:f.default.Messages.FORM_LABEL_DEFAULT},{setting:d.UserNotificationSettings.ONLY_MENTIONS,label:f.default.Messages.FORM_LABEL_LIVE_STAGES_ONLY},{setting:d.UserNotificationSettings.NO_MESSAGES,label:f.default.Messages.FORM_LABEL_NOTHING}]:null}(e);default:return[{setting:d.UserNotificationSettings.NULL,label:f.default.Messages.FORM_LABEL_DEFAULT},{setting:d.UserNotificationSettings.ALL_MESSAGES,label:f.default.Messages.FORM_LABEL_ALL_MESSAGES},{setting:d.UserNotificationSettings.ONLY_MENTIONS,label:f.default.Messages.FORM_LABEL_ONLY_MENTIONS.format()},{setting:d.UserNotificationSettings.NO_MESSAGES,label:f.default.Messages.FORM_LABEL_NOTHING}]}}function m(e){var t=e.getGuildId(),n=e.id,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getChannelOverrides(t)[n]}),[t,n]);var l=null==r?d.UserNotificationSettings.NULL:r.message_notifications,f=y(e);return null==f?null:a.createElement(a.Fragment,null,f.map((function(e){var r=e.setting,a=e.label;return v(u.MenuRadioItem,{group:"channel-notifications",id:""+r,label:a,action:function(){return e=r,void(null!=t&&i.default.updateChannelOverrideSettings(t,n,{message_notifications:e}));var e},checked:r===l},r)})))}function _(e){var t=m(e);return v(u.MenuItem,{id:"channel-notifications",label:f.default.Messages.NOTIFICATION_SETTINGS},void 0,t)}_.displayName="useChannelNotificationItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.useStateFromStores)([a.default],(function(){return null!=e?a.default.getGuildScheduledEventsByIndex(a.StaticGuildEventIndexes.GUILD_STAGE_EVENT_ACTIVE(e)):i}),[e])},t.useGuildChannelStageEvents=function(e,t){return(0,r.useStateFromStores)([a.default],(function(){return null!=e?a.default.getGuildScheduledEventsByIndex(a.StaticGuildEventIndexes.GUILD_CHANNEL_STAGE_EVENT_ACTIVE(e,t)):i}),[e,t])};var r=n(3),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8764));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}var i=[]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var r,a=D(n(0)),o=n(3),i=n(389),l=R(n(8254)),u=R(n(9164)),s=R(n(9165)),d=R(n(8258)),f=R(n(182)),c=D(n(8253)),p=n(8256),v=n(42),y=R(n(11)),m=R(n(86)),_=R(n(1223)),h=R(n(12)),E=R(n(466)),g=n(41),S=R(n(24)),O=R(n(8669)),I=R(n(8405)),T=R(n(9167)),C=R(n(8966)),b=R(n(9741)),M=R(n(9183)),N=R(n(9184)),A=n(1),P=R(n(6));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(e){var t=e.guild,n=e.onSelect,r=t.id,R=m.default.getDefaultChannel(r),L=(0,o.useStateFromStores)([h.default],(function(){return t.isOwner(h.default.getCurrentUser())}),[t]),D=(0,o.useStateFromStores)([_.default],(function(){return _.default.getUnreadGuildsIgnoreMuted(r)}),[r]),k=(0,N.default)(t,R),U=(0,M.default)(r),G=(0,C.default)(t),F=(0,b.default)(t),B=(0,I.default)(t.id,y.default.getId(),{page:A.AnalyticsPages.GUILD_CHANNEL,section:A.AnalyticsSections.CHAT_USERNAME,object:A.AnalyticsObjects.CONTEXT_MENU_ITEM}),H=(0,T.default)(t),x=(0,d.default)(t.id),V=t.hasFeature(A.GuildFeatures.HUB);if(y.default.isGuest())return null;var W=function(){var e=f.default.isLurking(r);l.default.leaveGuild(r),e&&(0,v.transitionTo)(A.Routes.GUILD_DISCOVERY)};function Y(){(0,g.openModal)((function(e){return a.createElement(E.default,w({header:P.default.Messages.LEAVE_SERVER_TITLE.format({name:t.name}),confirmText:t.hasFeature(A.GuildFeatures.HUB)?P.default.Messages.LEAVE_HUB:P.default.Messages.LEAVE_SERVER,cancelText:P.default.Messages.CANCEL,onConfirm:W},e),j(S.default,{size:S.default.Sizes.SIZE_16},void 0,t.hasFeature(A.GuildFeatures.HUB)?P.default.Messages.LEAVE_HUB_BODY.format({name:t.name}):P.default.Messages.LEAVE_SERVER_BODY.format({name:t.name})))}))}return V?j(c.default,{navId:"guild-context",onClose:i.closeContextMenu,"aria-label":P.default.Messages.GUILD_ACTIONS_MENU_LABEL,onSelect:n},void 0,j(c.MenuGroup,{},void 0,k,B),L?null:j(c.MenuGroup,{},void 0,j(c.MenuItem,{id:"leave-guild",label:P.default.Messages.LEAVE_HUB,action:Y,color:p.MenuItemColor.DANGER})),j(c.MenuGroup,{},void 0,x)):j(c.default,{navId:"guild-context",onClose:i.closeContextMenu,"aria-label":P.default.Messages.GUILD_ACTIONS_MENU_LABEL,onSelect:n},void 0,j(c.MenuGroup,{},void 0,j(c.MenuItem,{id:"mark-guild-read",label:P.default.Messages.MARK_AS_READ,action:function(){return(0,O.default)([r])},disabled:!D})),j(c.MenuGroup,{},void 0,k),j(c.MenuGroup,{},void 0,G),j(c.MenuGroup,{},void 0,U,F,__OVERLAY__?null:a.createElement(a.Fragment,null,j(c.MenuItem,{id:"notifications",label:P.default.Messages.NOTIFICATION_SETTINGS,action:function(){return(0,g.openModal)((function(e){return a.createElement(u.default,w({},e,{guildId:r}))}))}}),j(c.MenuItem,{id:"privacy",label:P.default.Messages.PRIVACY_SETTINGS,action:function(){return(0,g.openModal)((function(e){return a.createElement(s.default,w({},e,{guild:t}))}))}})),B),j(c.MenuGroup,{},void 0,H),j(c.MenuGroup,{},void 0,!L&&j(c.MenuItem,{id:"leave-guild",label:P.default.Messages.LEAVE_SERVER,action:Y,color:p.MenuItemColor.DANGER})),j(c.MenuGroup,{},void 0,x))}k.displayName="GuildContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNoRolesRow=S,t.getRolesRows=function(e,t,n,r){void 0===r&&(r=function(){return!0});if(null==e.roles)return[];return Object.values(e.roles).filter((function(a){return!h(a)&&O(t,a.id,n)&&I(e,a)&&r(a.name)})).sort(g).map((function(e){return E(e)}))},t.getRolesRowsWithPermissionDisabled=function(e,t,n,a){void 0===a&&(a=function(){return!0});if(null==e.roles)return[];return Object.values(e.roles).filter((function(r){return!h(r)&&O(t,r.id,n)&&I(e,r)&&a(r.name)})).sort(g).map((function(e){return E(e,r.default.has(e.permissions,n))}))},t.getExistingRoles=T,t.getAllExistingRolesWithPermission=C,t.getExistingRolesRows=function(e,t,n,r){var a=[];if(null==e.roles)return a;if(0===(a=T(e,t,n,r).sort(g).map((function(e){return E(e)}))).length)return S(y.default.Messages.CHANNEL_PERMISSIONS_NO_ROLES);return a},t.getExistingRolesRowWithPermissionDisabled=function(e,t,n,a){var o=[];if(null==e.roles)return o;if(0===(o=C(e,t,n,a).sort(g).map((function(e){return E(e,r.default.has(e.permissions,n))}))).length)return S(y.default.Messages.CHANNEL_PERMISSIONS_NO_ROLES);return o},t.getMembersRows=function(e,t,n,r,a){void 0===a&&(a=function(){return!0});return e.map(s.default.getUser).filter(f.isNotNullish).filter((function(e){return!n.isOwner(e)&&O(t,e.id,r)&&(a(b(e,n))||a(e.username)||a(e.discriminator))})).map((function(e){return N(e,n)})).sort(A)},t.getExistingMembers=P,t.getExistingMembersRows=function(e,t,n,r,a){return P(e,t,n,r,a).map((function(e){return N(e,n)})).sort(A)},t.getRowTypeLabel=function(e,t){switch(e){case p.RowType.ROLE:return y.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_ROW_ROLE;case p.RowType.OWNER:return y.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_ROW_OWNER;case p.RowType.ADMINISTRATOR:return y.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_ROW_ADMINISTRATOR;case p.RowType.MEMBER:return t?y.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_ROW_MEMBER:null;case p.RowType.EMPTY_STATE:return null}},t.getRemoveTooltipHint=function(e){switch(e){case p.RowType.ROLE:return y.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TOOLTIP;case p.RowType.OWNER:return y.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TOOLTIP_OWNER;case p.RowType.ADMINISTRATOR:return y.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TOOLTIP_ADMINISTRATOR;case p.RowType.MEMBER:return y.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TOOLTIP;case p.RowType.EMPTY_STATE:default:return null}},t.flipEveryonePermission=R,t.toggleChannelEveryonePermission=function(e,t,n){var r=R(e,t,n);(0,o.updatePermission)(r.id,r.allow,r.deny)},t.grantUserChannelAccess=function(e,t){var n=s.default.getCurrentUser(),a=e.permissionOverwrites[n.id];if(null==a){var l={id:n.id,type:i.PermissionOverwriteType.MEMBER,allow:r.default.add(c.default.NONE,t),deny:c.default.NONE};(0,o.savePermissionUpdates)(e.id,[l],!0)}else{var u=a.allow,d=a.deny;u=r.default.add(u,t),(0,o.updatePermission)(a.id,u,d)}},t.isPrivateGuildChannel=function(e,t){if(null==e)return!1;var n=e.permissionOverwrites[e.guild_id];t&&null!=t[e.guild_id]&&(n=t[e.guild_id]);if(null!=n)return r.default.has(n.deny,e.viewPermission);return!1},t.hasCustomRoles=function(e){var t=Object.keys(e.roles);return 0!==t.length&&(1!==t.length||t[0]!==e.id)},t.isPrivateTextChannel=function(e){var t=e.permissionOverwrites[e.guild_id];return null!=t&&e.type===v.ChannelTypes.GUILD_TEXT&&r.default.has(t.deny,v.Permissions.VIEW_CHANNEL)},t.canCreatePrivateChannel=function(e,t,n){if(e===v.ChannelTypes.GUILD_TEXT||e===v.ChannelTypes.GUILD_ANNOUNCEMENT)return t;if((0,l.isGuildVocalChannelType)(e)||e===v.ChannelTypes.GUILD_CATEGORY)return t&&n;return!0},t.getPrivateChannelHintText=function(e){switch(e){case v.ChannelTypes.GUILD_TEXT:case v.ChannelTypes.GUILD_ANNOUNCEMENT:return y.default.Messages.PRIVATE_TEXT_CHANNEL_CREATION_PERMISSION_MISSING_HINT.format();case v.ChannelTypes.GUILD_VOICE:return y.default.Messages.PRIVATE_VOICE_CHANNEL_CREATION_PERMISSION_MISSING_HINT.format();case v.ChannelTypes.GUILD_CATEGORY:return y.default.Messages.PRIVATE_CATEGORY_CREATION_PERMISSION_MISSING_HINT.format();default:return null}},t.extractPermissionOverwrites=function(e,t){var n=[];return Object.values(e).forEach((function(e){var r=e.row;r.id&&(r.rowType===p.RowType.ROLE?n.push((0,d.permissionOverwriteForRole)(r.id,t)):r.rowType===p.RowType.MEMBER&&n.push((0,d.permissionOverwriteForUser)(r.id,t)))})),n};var r=m(n(63)),a=n(202),o=n(8481),i=n(286),l=n(31),u=m(n(56)),s=m(n(12)),d=n(292),f=n(48),c=m(n(78)),p=n(1229),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){return(_=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}).apply(this,arguments)}function h(e){return r.default.has(e.permissions,v.Permissions.ADMINISTRATOR)}function E(e,t){var n;void 0===t&&(t=!1);var o=function(e){return r.default.has(e.permissions,v.Permissions.ADMINISTRATOR)?p.RowType.ADMINISTRATOR:p.RowType.ROLE}(e);return{rowType:o,colorString:null!==(n=e.colorString)&&void 0!==n?n:(0,a.int2hex)(v.DEFAULT_ROLE_COLOR),name:e.name,id:e.id,disabled:h(e)||t,key:o+":"+e.id}}function g(e,t){var n=h(e)?0:1,r=h(t)?0:1;return n!==r?n-r:t.position-e.position}function S(e){return void 0===e&&(e=y.default.Messages.PRIVATE_CHANNEL_ADD_MEMBERS_MODAL_NO_ROLES),[{rowType:p.RowType.EMPTY_STATE,colorString:(0,a.int2hex)(v.DEFAULT_ROLE_COLOR),name:e,disabled:!0,id:"EMPTY_STATE"}]}function O(e,t,n,a){var o=s.default.getCurrentUser();if(null==e)return o.id!==t;var i=e.permissionOverwrites[t];return a&&null!=a[t]&&(i=a[t]),!i||!r.default.has(i.allow,n)}function I(e,t){return e.id!==t.id}function T(e,t,n,r){return Object.values(e.roles).filter((function(a){return h(a)||!O(t,a.id,n,r)&&I(e,a)}))}function C(e,t,n,a){return Object.values(e.roles).filter((function(o){var i;return h(o)||!O(t,o.id,n,a)&&I(e,o)||r.default.has(r.default.combine(o.permissions,null===(i=t.permissionOverwrites[o.id])||void 0===i?void 0:i.allow),n)}))}function b(e,t){var n;return null!==(n=u.default.getNick(t.id,e.id))&&void 0!==n?n:e.username}function M(e,t){return t.isOwner(e)}function N(e,t){var n=function(e,t){return t.isOwner(e)?p.RowType.OWNER:p.RowType.MEMBER}(e,t);return{rowType:n,name:b(e,t),userTag:e.tag,id:e.id,avatarURL:e.getAvatarURL(t.id),bot:e.bot,verifiedBot:e.isVerifiedBot(),disabled:M(e,t),key:n+":"+e.id}}function A(e,t){return e.rowType!==t.rowType?e.rowType-t.rowType:e.name.toLocaleLowerCase().localeCompare(t.name.toLocaleLowerCase())}function P(e,t,n,r,a){return e.map(s.default.getUser).filter(f.isNotNullish).filter((function(e){return!O(t,e.id,r,a)||M(e,n)}))}function R(e,t,n){var a=e.permissionOverwrites[e.guild_id];null==a&&(a=c.default.makeEveryoneOverwrite(e.guild_id));var o=_({},a);return o.deny=r.default.remove(o.deny,t),o.allow=r.default.remove(o.allow,t),n||(o.deny=r.default.add(o.deny,t)),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SHAKE_INTENSITY_INCREMENT=t.SHAKE_INTENSITY_MAX=t.SHAKE_INTENSITY_DEFAULT=void 0;var r,a=_(n(0)),o=n(95),i=y(n(416)),l=y(n(55)),u=y(n(8293)),s=n(8263),d=n(121),f=y(n(8257)),c=_(n(8305)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}var S=Object.freeze({shouldPreventNavigation:!1,onPreventNavigation:null});t.SHAKE_INTENSITY_DEFAULT=1.4;t.SHAKE_INTENSITY_MAX=15;function O(e){var t,n,r=e.section,l=e.setPreventNavigation,u=e.scrollerRef;(0,i.default)({type:o.ImpressionTypes.PANE,name:null==r?void 0:r.impressionName,metadata:null==r?void 0:r.impressionMetadata});var s=null!==(t=null==r?void 0:r.element)&&void 0!==t?t:p.NOOP_NULL,d=null!==(n=null==r?void 0:r.elementProps)&&void 0!==n?n:{};return E(f.default,{section:r.section},void 0,a.createElement(s,g({},d,{setPreventNavigation:l,refToScroller:u})))}t.SHAKE_INTENSITY_INCREMENT=2,O.displayName="SettingsContent";var I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._unmounted=!1,t._intensity=1.4,t._subscribedStores=[],t.scrollerRef=a.createRef(),t.state=S,t.setPreventNavigation=function(e,n){t.setState({shouldPreventNavigation:e,onPreventNavigation:n})},t.handleSetSection=function(e){var n=t.props,r=n.onSetSection,a=n.sections,o=t.state,i=o.shouldPreventNavigation,l=o.onPreventNavigation,u=function(){r(e);var n=(a.find((function(t){return e===t.section}))||{}).notice,o=null!=n?n.store:null;null==o||t._subscribedStores.includes(o)||(o.addChangeListener(t.handleNoticeStoreUpdate),t._subscribedStores.push(o)),t.setState(S)};t.validNavigation()&&!i&&u(),i&&null!=l&&l(u)},t.handleClose=function(){if(t.validNavigation()){var e=t.props.onClose;e&&e()}},t.handleNoticeStoreUpdate=function(){t._unmounted||(t._intensity=1.4,t.forceUpdate())},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var o=r.prototype;return o.componentDidMount=function(){var e=this;this.getPredicateSections().forEach((function(t){var n=t.notice;if(null!=n){var r=n.store;null!=r&&(r.addChangeListener(e.handleNoticeStoreUpdate),e._subscribedStores.push(r))}}))},o.componentDidUpdate=function(e){e.section!==this.props.section&&(this._intensity=1.4)},o.componentWillUnmount=function(){var e=this;this._unmounted=!0,this._subscribedStores.forEach((function(t){return t.removeChangeListener(e.handleNoticeStoreUpdate)}))},o.getPredicateSections=function(){return this.props.sections.filter((function(e){return null==e.predicate||e.predicate()}))},o.validNavigation=function(){var e=this.props.section,t=(this.getPredicateSections().find((function(t){return e===t.section}))||{}).notice;return t&&t.store.showNotice()?(d.ComponentDispatch.dispatch(p.ComponentActions.SHAKE_APP,{duration:300,intensity:this._intensity}),this._intensity=Math.min(this._intensity+2,15),d.ComponentDispatch.dispatch(p.ComponentActions.EMPHASIZE_NOTICE),!1):(this._intensity=1.4,!0)},o.renderSidebar=function(e){var t=this.props.section||e[0].section;return E(u.default,{selectedItem:t,onItemSelect:this.handleSetSection,orientation:"vertical"},void 0,e.map((function(e,t){var n=e.section,r=e.element,a=e.label,o=void 0===a?null:a,i=e.ariaLabel,d=e.onClick,f=e.color,y=e.icon,m=e.className,_=e.newIndicator,h=e.badgeCount;switch(n){case c.SectionTypes.HEADER:return E(u.default.Header,{},t,o);case c.SectionTypes.DIVIDER:return E(u.default.Separator,{},t);case c.SectionTypes.CUSTOM:return E(r||p.NOOP_NULL,{},t);default:return E(u.default.Item,{color:f,id:n,onClick:d,className:m,"aria-label":i},n,_?E(l.default,{justify:l.default.Justify.BETWEEN,align:l.default.Align.CENTER},void 0,o,E(s.TextBadge,{text:v.default.Messages.NEW.toUpperCase()})):y?E(l.default,{justify:l.default.Justify.BETWEEN,align:l.default.Align.CENTER},void 0,o,y):h?E(l.default,{justify:l.default.Justify.BETWEEN,align:l.default.Align.CENTER},void 0,o,E(s.NumberBadge,{count:h})):o)}})))},o.renderNotice=function(e){var t=this.props.theme;if(null==e||null==e.notice)return null;var n=e.notice,r=n.store,a=n.element;return null==r||r.showNotice()?E(a,{theme:t}):null},o.render=function(){var e=this.props,t=e.theme,n=e.sidebarTheme,r=e.section,a=this.getPredicateSections(),o=a.find((function(e){return e.section===r}));return null==o||null==r?null:E(c.default,{theme:t,sidebarTheme:n,scrollerRef:this.scrollerRef,section:r,sidebar:this.renderSidebar(a),content:E(O,{section:o,setPreventNavigation:this.setPreventNavigation,scrollerRef:this.scrollerRef}),contentType:o.type,notice:this.renderNotice(o),closeAction:this.handleClose})},r}(a.PureComponent);I.displayName="SettingsView";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useHasGuildRoleItems=function(e,t){return(0,i.default)(e,t).length>0},t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(389),o=u(n(8253)),i=u(n(9772)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.role,n=e.guild,r=e.onSelect,u=(0,i.default)(n,t);return 0===u.length?null:d(o.default,{navId:"guild-settings-role-context","aria-label":l.default.Messages.GUILD_ROLE_ACTIONS_MENU_LABEL,onClose:a.closeContextMenu,onSelect:r},void 0,u)}f.displayName="GuildSettingsRoleContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",className:f,d:"M16.002 8.00598C16.002 10.211 14.208 12.006 12.002 12.006C9.79695 12.006 8.00195 10.211 8.00195 8.00598C8.00195 5.80098 9.79595 4.00598 12.002 4.00598C14.208 4.00598 16.002 5.80098 16.002 8.00598ZM4.00195 19.006C4.00195 15.473 7.29195 13.006 12.002 13.006C16.713 13.006 20.002 15.473 20.002 19.006V20.006H4.00195V19.006Z",fill:d}))}d.displayName="Person"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maybeFetchGuildDiscoveryCategories=function(e){return f.apply(this,arguments)},t.fetchMetadataForGuild=function(e){return c.apply(this,arguments)},t.updateGuildPrimaryCategory=function(e,t){a.default.dispatch({type:l.ActionTypes.GUILD_UPDATE_DISCOVERY_METADATA,guildId:e,primaryCategoryId:t})},t.updateGuildKeywords=function(e,t){a.default.dispatch({type:l.ActionTypes.GUILD_UPDATE_DISCOVERY_METADATA,guildId:e,keywords:t})},t.updateGuildEmojiDiscoverabilityEnabled=function(e,t){a.default.dispatch({type:l.ActionTypes.GUILD_UPDATE_DISCOVERY_METADATA,guildId:e,emojiDiscoverabilityEnabled:t})},t.saveGuildMetadata=function(e,t,n,r,a,o){return p.apply(this,arguments)},t.addGuildCategory=function(e,t){r.default.post({url:l.Endpoints.GUILD_DISCOVERY_UPDATE_CATEGORY(e,t),oldFormErrors:!0}).then((function(){a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_CATEGORY_ADD,guildId:e,categoryId:t})})).catch((function(t){a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL,guildId:e,errors:t.body})}))},t.deleteGuildCategory=function(e,t){r.default.delete({url:l.Endpoints.GUILD_DISCOVERY_UPDATE_CATEGORY(e,t),oldFormErrors:!0}).then((function(){a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_CATEGORY_DELETE,guildId:e,categoryId:t})})).catch((function(t){a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL,guildId:e,errors:t.body})}))};var r=u(n(14)),a=u(n(2)),o=u(n(39)),i=u(n(8483)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(t){var n,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t=!1),(n=o.default.locale)!==i.default.getFetchedLocale()){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,r.default.get({url:l.Endpoints.GUILD_DISCOVERY_CATEGORIES,query:{locale:n,primary_only:t},oldFormErrors:!0});case 6:u=e.sent,a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_CATEGORY_FETCH_SUCCESS,categories:u.body,locale:n});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(){return(c=d(regeneratorRuntime.mark((function e(t){var n,o,i,u,s,d,f,c,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.get({url:l.Endpoints.GUILD_DISCOVERY_METADATA(t),oldFormErrors:!0});case 3:return n=e.sent,o=n.body,i=o.primary_category_id,u=o.category_ids,s=o.keywords,d=o.emoji_discoverability_enabled,f=o.partner_actioned_timestamp,c=o.partner_application_timestamp,p={primaryCategoryId:i,secondaryCategoryIds:u,keywords:s,emojiDiscoverabilityEnabled:d,partnerActionedTimestamp:f,partnerApplicationTimestamp:c},a.default.dispatch({type:l.ActionTypes.GUILD_UPDATE_DISCOVERY_METADATA_FROM_SERVER,guildId:t,metadata:p}),e.abrupt("return",p);case 10:e.prev=10,e.t0=e.catch(0),a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_METADATA_FETCH_FAIL});case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function p(){return(p=d(regeneratorRuntime.mark((function e(t,n,o,i,u,s){var d,f,c,p,v,y,m,_;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.patch({url:l.Endpoints.GUILD_DISCOVERY_METADATA(t),body:{primary_category_id:n,emoji_discoverability_enabled:i,partner_actioned_timestamp:u,partner_application_timestamp:s,keywords:o},oldFormErrors:!0});case 3:d=e.sent,f=d.body,c=f.primary_category_id,p=f.category_ids,v=f.keywords,y=f.emoji_discoverability_enabled,m=f.partner_actioned_timestamp,_=f.partner_application_timestamp,a.default.dispatch({type:l.ActionTypes.GUILD_UPDATE_DISCOVERY_METADATA_FROM_SERVER,guildId:t,metadata:{primaryCategoryId:c,secondaryCategoryIds:p,keywords:v,emojiDiscoverabilityEnabled:y,partnerActionedTimestamp:m,partnerApplicationTimestamp:_}}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),a.default.dispatch({type:l.ActionTypes.GUILD_DISCOVERY_CATEGORY_UPDATE_FAIL,guildId:t,errors:e.t0.body});case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(8458)),l=n(8253),u=c(n(40)),s=n(41),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e,t){var n=(0,o.useStateFromStores)([u.default],(function(){return u.default.can(d.Permissions.MANAGE_CHANNELS,e)}),[e]);return __OVERLAY__||!n?null:v(l.MenuItem,{id:"clone-channel",label:f.default.Messages.CLONE_CHANNEL,action:function(){return(0,s.openModal)((function(n){return a.createElement(i.default,y({},n,{channelType:e.type,guildId:t.id,categoryId:e.parent_id,cloneChannelId:e.id}))}))}})}m.displayName="useChannelCloneItem"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(14)),a=s(n(2)),o=s(n(9221)),i=s(n(154)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}var d={pinMessage:function(e,t){var n=e.id,a=e.name;r.default.put({url:l.Endpoints.PIN(n,t),oldFormErrors:!0}).catch((function(){var t;t=e.isPrivate()?u.default.Messages.PIN_MESSAGE_TOO_MANY_BODY_PRIVATE_CHANNEL.format({maxPins:l.MAX_PINS_PER_CHANNEL}):u.default.Messages.PIN_MESSAGE_TOO_MANY_BODY.format({maxPins:l.MAX_PINS_PER_CHANNEL,channelName:a}),i.default.show({title:u.default.Messages.PIN_MESSAGE_TOO_MANY_TITLE,body:t,confirmText:u.default.Messages.OKAY})}))},unpinMessage:function(e,t){r.default.delete({url:l.Endpoints.PIN(e.id,t),oldFormErrors:!0}).catch((function(){return i.default.show({title:u.default.Messages.UNPIN_MESSAGE_FAILED_TITLE,body:u.default.Messages.UNPIN_MESSAGE_FAILED_BODY,confirmText:u.default.Messages.TRY_AGAIN,cancelText:u.default.Messages.CANCEL,onConfirm:d.unpinMessage.bind(d,e,t)})}))},ackPins:function(e){a.default.dirtyDispatch({type:l.ActionTypes.CHANNEL_PINS_ACK,channelId:e})},fetchPins:function(e){var t=o.default.getPinnedMessages(e);t&&(t.loaded||t.loading)||(a.default.dirtyDispatch({type:l.ActionTypes.LOAD_PINNED_MESSAGES,channelId:e}),r.default.get({url:l.Endpoints.PINS(e),retries:2,oldFormErrors:!0}).then((function(t){a.default.dispatch({type:l.ActionTypes.LOAD_PINNED_MESSAGES_SUCCESS,messages:t.body,channelId:e})}),(function(){a.default.dispatch({type:l.ActionTypes.LOAD_PINNED_MESSAGES_FAILURE,channelId:e})})))}},f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(3)),a=s(n(14)),o=s(n(2)),i=s(n(11)),l=n(1242),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){return(f=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}).apply(this,arguments)}var c,p={},v=Object.freeze({});function y(e){return p[e]||v}function m(e){var t=e.channelId,n=e.userId,r=f({},y(t));clearTimeout(r[n]),r[n]=function(e,t){return setTimeout((function(){o.default.dispatch({type:u.ActionTypes.TYPING_STOP,channelId:e,userId:t})}),u.TYPING_TIMEOUT)}(t,n),p[t]=r}function _(e){var t=e.channelId,n=e.userId,r=p[t];if(null==r||null==r[n])return!1;var a=f({},r);clearTimeout(a[n]),delete a[n],p[t]=a}function h(){p={}}var E=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.getTypingUsers=function(e){return y(e)},a.isTyping=function(e,t){return null!=y(e)[t]},r}(r.default.Store))(o.default,{TYPING_START:m,TYPING_STOP:_,TYPING_START_LOCAL:function(e){var t=e.channelId,n=i.default.getId();if(null==n)return!1;null!=c&&c.channelId!==t&&(null!=c.timeout&&clearTimeout(c.timeout),c=null);var r=Date.now(),s=.8*u.TYPING_TIMEOUT;if(null!=c&&(null!=c.timeout||c.prevSend+s>r))return!1;var d=null==c||c.prevSend>r-2*s?u.TYPING_DELAY_LOCAL:0,f=setTimeout((function(){null!=c&&c.channelId===t&&n===i.default.getId()&&null!=c.timeout&&(c.timeout=null,function(e){var t=y(e);return t===v?0:Object.keys(t).length}(t)>u.MAX_TYPING_USERS||a.default.post({url:u.Endpoints.TYPING(t),oldFormErrors:!0}).then((function(e){if(200===e.status){var n,r,a=null!==(n=e.body.message_send_cooldown_ms)&&void 0!==n?n:0,i=null!==(r=e.body.thread_create_cooldown_ms)&&void 0!==r?r:0;a>0&&o.default.dispatch({type:u.ActionTypes.SLOWMODE_SET_COOLDOWN,channelId:t,slowmodeType:l.SlowmodeType.SendMessage,cooldownMs:a}),i>0&&o.default.dispatch({type:u.ActionTypes.SLOWMODE_SET_COOLDOWN,channelId:t,slowmodeType:l.SlowmodeType.CreateThread,cooldownMs:i})}})))}),d);return c={channelId:t,timeout:f,prevSend:r},m({channelId:t,userId:n})},TYPING_STOP_LOCAL:function(e){var t=e.channelId,n=i.default.getId();return null!=n&&(null!=c&&c.channelId===t&&null!=c.timeout&&(clearTimeout(c.timeout),c=null,_({channelId:t,userId:n})))},CONNECTION_OPEN:function(e){return h()},OVERLAY_INITIALIZE:function(e){return h()},MESSAGE_CREATE:function(e){var t=e.channelId,n=e.message.author;return e.optimistic&&function(e){if(null==c||c.channelId!==e)return!1;null!=c.timeout&&clearTimeout(c.timeout),c=null}(t),_({channelId:t,userId:n.id})}});t.default=E},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I,t.CreateGuildSlideTypes=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(95),l=g(n(1259)),u=n(703),s=n(85),d=n(35),f=g(n(13)),c=n(259),p=g(n(9086)),v=g(n(9087)),y=g(n(8791)),m=g(n(9089)),_=g(n(9268)),h=n(1),E=g(n(7422));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.transitionState,n=e.initialSlide,r=void 0===n?a.GUILD_TEMPLATES:n,g=e.onSuccess,S=e.onClose,I=e.onSlideChange,T=e.hasJoinButton,C=(0,s.useUID)(),b=o.useState(r),M=b[0],N=b[1],A=(0,l.default)(M),P=o.useState(null),R=P[0],L=P[1],D=o.useState(null),w=D[0],j=D[1],k=o.useState(null),U=k[0],G=k[1],F=o.useState(!1),B=F[0],H=F[1];o.useEffect((function(){N(r)}),[N,r]),o.useEffect((function(){M!==A&&I(M)}),[I,M,A]);var x=o.useCallback((function(e){N(a.CREATION_INTENT),j(e),f.default.track(h.AnalyticEvents.GUILD_TEMPLATE_SELECTED,{template_name:e.id,template_code:e.code})}),[]),V=o.useCallback((function(e){H(e),N(a.CUSTOMIZE_GUILD)}),[]),W=o.useCallback((function(){return N(a.JOIN_GUILD)}),[N]),Y=o.useCallback((function(){M!==a.CUSTOMIZE_GUILD?(N(a.GUILD_TEMPLATES),j(null)):N(a.CREATION_INTENT)}),[M]),z=o.useCallback((function(e){G(e),g()}),[g,G]),K={impression_group:i.ImpressionGroups.GUILD_ADD_FLOW};return O("div",{className:(0,c.getThemeClass)(h.ThemeTypes.LIGHT)},void 0,O(d.ModalRoot,{transitionState:t,"aria-labelledby":C,disableTrack:!0},void 0,O("div",{className:E.default.container},void 0,O(u.Slides,{activeSlide:M,width:440,onSlideReady:function(e){return L(e)}},void 0,O(u.Slide,{id:a.GUILD_TEMPLATES,impressionName:i.ImpressionNames.GUILD_ADD_LANDING,impressionMetadata:K},void 0,O(m.default,{isNewUser:!1,onJoin:T?W:void 0,onChooseTemplate:x,onClose:S})),O(u.Slide,{id:a.CREATION_INTENT,impressionName:i.ImpressionNames.GUILD_ADD_INTENT_SELECTION,impressionMetadata:K},void 0,O(v.default,{onClose:S,onBack:Y,onCreationIntentChosen:V})),O(u.Slide,{id:a.CUSTOMIZE_GUILD,impressionName:i.ImpressionNames.GUILD_ADD_CUSTOMIZE,impressionMetadata:K},void 0,O(y.default,{guildTemplate:w,onGuildCreated:z,onClose:S,onBack:Y,isSlideReady:R===a.CUSTOMIZE_GUILD,isCommunity:B})),O(u.Slide,{id:a.CHANNEL_PROMPT,impressionName:i.ImpressionNames.GUILD_ADD_CHANNEL_PROMPT,impressionMetadata:K},void 0,O(p.default,{createdGuildId:U,onClose:S,onChannelPromptCompleted:g,isSlideReady:R===a.CHANNEL_PROMPT})),O(u.Slide,{id:a.JOIN_GUILD,impressionName:i.ImpressionNames.GUILD_ADD_JOIN,impressionMetadata:K},void 0,O(_.default,{onBack:Y,onClose:S,isSlideReady:R===a.JOIN_GUILD}))))))}t.CreateGuildSlideTypes=a,function(e){e.GUILD_TEMPLATES="guild-templates",e.CUSTOMIZE_GUILD="customize-guild",e.CHANNEL_PROMPT="channel-prompt",e.JOIN_GUILD="join-guild",e.CREATION_INTENT="creation-intent"}(a||(t.CreateGuildSlideTypes=a={})),I.displayName="CreateGuildModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(0)),a=f(n(10307)),o=f(n(397)),i=f(n(8422)),l=f(n(118)),u=p(n(8289)),s=f(n(16)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(){return(v=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}).apply(this,arguments)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=["openFile"];e.multiple&&t.push("multiSelections");var n=e.filters;l.default.fileManager.openFiles({properties:t,filters:n},e.maxSize,u.makeFile).then((function(t){null!=(t=t.map((function(e){return u.transformNativeFile(e)})))&&e.onChange({stopPropagation:function(){return null},preventDefault:function(){return null},currentTarget:{files:t}})}),(function(t){if("ETOOLARGE"!==t.code)throw t;o.default.push(i.default,{title:d.default.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:d.default.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:u.sizeString(e.maxSize)})})}))}var _=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this)._ref=r.createRef(),n.setRef=n.setRef.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var i=o.prototype;return i.activateUploadDialogue=function(){if(this._ref)return this._ref.activateUploadDialogue()},i.setRef=function(e){this._ref=e},i.render=function(){return r.createElement(a.default,v({ref:this.setRef,handleNativeClick:m,embedded:s.default.isDesktop()},this.props))},o}(r.Component);_.displayName="FileInput";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.type===r.MessageTypes.GUILD_INVITE_REMINDER&&!t};var r=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomGuildEmojiPopout=t.MessageCustomEmojiPopout=t.GuildDetails=t.MessageStandardEmojiPopout=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=V();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=x(n(9)),i=n(3),l=x(n(199)),u=x(n(473)),s=x(n(5938)),d=n(106),f=n(9277),c=x(n(5948)),p=n(42),v=x(n(162)),y=x(n(10)),m=x(n(249)),_=x(n(15)),h=x(n(36)),E=x(n(107)),g=x(n(12)),S=x(n(29)),O=x(n(61)),I=x(n(55)),T=x(n(375)),C=x(n(371)),b=x(n(8319)),M=x(n(149)),N=x(n(159)),A=x(n(8320)),P=x(n(47)),R=x(n(248)),L=x(n(24)),D=x(n(13)),w=x(n(150)),j=n(701),k=x(n(96)),U=x(n(9278)),G=n(8308),F=n(1),B=x(n(6)),H=x(n(7363));function x(e){return e&&e.__esModule?e:{default:e}}function V(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return V=function(){return e},e}function W(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function Y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){W(o,r,a,i,l,"next",e)}function l(e){W(o,r,a,i,l,"throw",e)}i(void 0)}))}}function z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function K(){return(K=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}).apply(this,arguments)}var $=function(e){var t=e.node;return a.useEffect((function(){var e=E.default.getGuildId();D.default.track(F.AnalyticEvents.OPEN_POPOUT,K({type:"Standard Emoji Popout",guild_id:e},(0,d.collectChannelAnalyticsMetadata)(y.default.getChannel(h.default.getChannelId(e)))))}),[]),z(G.MessagePopoutContent,{},void 0,z(I.default,{className:H.default.emojiSection},void 0,z(s.default,{emojiName:t.name,className:H.default.primaryEmoji,src:t.src,animated:!1,jumboable:!0}),z(I.default,{direction:I.default.Direction.VERTICAL,justify:I.default.Justify.CENTER,className:H.default.truncatingText},void 0,z(L.default,{className:H.default.emojiName,size:L.default.Sizes.SIZE_16},void 0,z(b.default,{},void 0,t.name)),z(L.default,{},void 0,B.default.Messages.EMOJI_POPOUT_STANDARD_EMOJI_DESCRIPTION))))};t.MessageStandardEmojiPopout=$,$.displayName="MessageStandardEmojiPopout";var Z=function(e){var t=e.guild,n=e.disableLurking,r=void 0!==n&&n,i=t.id,l=t.icon,u=t.name,s=w.default.getGuildIconURL({id:i,icon:l,size:32,canAnimate:!0}),d=function(){r||((0,f.isDiscoverableGuildType)(t)?(0,j.startLurking)(i,{}):(0,p.transitionTo)(F.Routes.CHANNEL(i,h.default.getChannelId(i))))};return z(I.default,{align:I.default.Align.CENTER},void 0,z(R.default,{mask:R.default.Masks.SQUIRCLE,width:32,height:32,className:H.default.guildIconContainer},void 0,null!=s?z(O.default,{onClick:d},void 0,z("img",{src:s,alt:"",className:H.default.guildIcon})," :"):z(C.default,{size:C.default.Sizes.SMALL,className:H.default.guildIcon,guild:(0,f.isDiscoverableGuildType)(t)?new v.default(t):t,onClick:d})),z(I.default,{direction:I.default.Direction.VERTICAL,className:(0,o.default)(H.default.guildInformation,H.default.truncatingText)},void 0,z(I.default,{align:I.default.Align.CENTER},void 0,z(T.default,{guild:t,className:H.default.guildBadge}),z(O.default,{onClick:d,className:H.default.truncatingText},void 0,z(P.default,{className:H.default.guildName,size:P.default.Sizes.SIZE_16},void 0,z(b.default,{},void 0,u)))),z(I.default,{align:I.default.Align.CENTER},void 0,(0,f.isDiscoverableGuildType)(t)?a.createElement(a.Fragment,null,z(L.default,{size:L.default.Sizes.SIZE_12,color:L.default.Colors.HEADER_SECONDARY},void 0,B.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:t.presenceCount})),z("div",{className:H.default.dotSeparator}),z(L.default,{size:L.default.Sizes.SIZE_12,color:L.default.Colors.HEADER_SECONDARY},void 0,B.default.Messages.EMOJI_POPOUT_PUBLIC_SERVER)):z(L.default,{size:L.default.Sizes.SIZE_12,color:L.default.Colors.HEADER_SECONDARY},void 0,B.default.Messages.EMOJI_POPOUT_PRIVATE_SERVER))))};t.GuildDetails=Z,Z.displayName="GuildDetails";var q=z(G.PopoutLoadingAnimation,{});t.MessageCustomEmojiPopout=function(e){var t,n=e.node,r=e.closePopout,o=e.refreshPositionKey,l=(0,i.useStateFromStores)([m.default,_.default],(function(){var e=m.default.getCustomEmojiById(n.emojiId);return null==e?null:_.default.getGuild(e.guildId)})),u=null===(t=a.useRef(null==l||l.hasFeature(F.GuildFeatures.DISCOVERABLE)).current)||void 0===t||t,s=a.useState(null),d=s[0],f=s[1],c=a.useState(u),p=c[0],v=c[1];return a.useEffect((function(){u&&function(){var e=Y(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,U.default)(n.emojiId);case 3:t=e.sent,f(t),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:v(!1);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}()()}),[]),a.useEffect((function(){o()}),[p]),p?q:z(X,{node:n,emojiSourceDiscoverableGuild:d,emojiSourceGuildRecord:l,closePopout:r,onToggleShowMoreEmojis:o,demoMode:!1})};var X=function(e){var t=e.node,n=e.emojiSourceDiscoverableGuild,r=e.emojiSourceGuildRecord,f=e.closePopout,p=e.onToggleShowMoreEmojis,v=e.demoMode,m=void 0!==v&&v,_=(0,i.useStateFromStores)([g.default],(function(){return g.default.getNullableCurrentUser()})),T=k.default.isPremium(_),C=(0,i.useStateFromStores)([E.default],(function(){var e=E.default.getGuildId();return null!=e&&(e===(null==n?void 0:n.id)||e===(null==r?void 0:r.id))})),P=null!=r,R=null!=n,w=a.useState(!1),j=w[0],U=w[1],x={page:null!=(0,i.useStateFromStores)([E.default],(function(){return E.default.getGuildId()}))?F.AnalyticsPages.GUILD_CHANNEL:F.AnalyticsPages.DM_CHANNEL,section:F.AnalyticsSections.EMOJI_UPSELL_POPOUT};m&&(T=!0,P=!1,C=!1);var V=E.default.getGuildId(),W=a.useRef(K({guild_id:V,emoji_id:t.emojiId},(0,d.collectChannelAnalyticsMetadata)(y.default.getChannel(h.default.getChannelId(V))))).current,$=null,q=!1,X="Custom Emoji Popout";T?$=P?C?B.default.Messages.EMOJI_POPOUT_PREMIUM_CURRENT_GUILD_DESCRIPTION:B.default.Messages.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION:R?B.default.Messages.EMOJI_POPOUT_PREMIUM_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION:B.default.Messages.EMOJI_POPOUT_PREMIUM_UNJOINED_PRIVATE_GUILD_DESCRIPTION:P?C?($=B.default.Messages.EMOJI_POPOUT_CURRENT_GUILD_DESCRIPTION,q=!0,X="Custom Emoji Popout (Upsell)"):($=B.default.Messages.EMOJI_POPOUT_JOINED_GUILD_DESCRIPTION,q=!0,X="Custom Emoji Popout (Upsell)"):R?($=B.default.Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION,q=!0,X="Custom Emoji Popout (Upsell)"):($=B.default.Messages.EMOJI_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format({openPremiumSettings:function(){f(),D.default.track(F.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:x.page,location_section:x.section}),u.default.open(F.UserSettingsSections.PREMIUM)}}),X="Custom Emoji Popout (Soft Upsell)"),a.useEffect((function(){m||D.default.track(F.AnalyticEvents.OPEN_POPOUT,K({type:X},W))}),[]);var J,Q=R||P&&!C;return z(G.MessagePopoutContent,{className:H.default.popoutContent},void 0,(J=function(){var e=Y(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!m&&null!=n&&!P){e.next=2;break}return e.abrupt("return");case 2:return f(),t=n.id,e.prev=4,e.next=7,l.default.joinGuild(t);case 7:l.default.transitionToGuildSync(t),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(4);case 12:case"end":return e.stop()}}),e,null,[[4,10]])})));return function(){return e.apply(this,arguments)}}(),z("div",{className:H.default.emojiSection},void 0,z(I.default,{},void 0,z(s.default,{className:H.default.primaryEmoji,emojiId:t.emojiId,animated:t.animated,jumboable:!0}),z(I.default,{direction:I.default.Direction.VERTICAL,justify:I.default.Justify.CENTER,className:H.default.truncatingText},void 0,z(L.default,{className:H.default.emojiName,size:L.default.Sizes.SIZE_16},void 0,z(b.default,{},void 0,t.name)),null!=$&&z(L.default,{},void 0,$))),q&&z(c.default,{className:H.default.ctaButton,subscriptionTier:F.PremiumSubscriptionSKUs.TIER_2,size:S.default.Sizes.SMALL,fullWidth:!0,buttonText:B.default.Messages.EMOJI_POPOUT_PREMIUM_CTA,onSubscribeModalClose:function(e){return e?J():f()},postSuccessGuild:P||null==n?void 0:n,premiumModalAnalyticsLocation:x}),T&&!P&&R&&z(S.default,{size:S.default.Sizes.SMALL,className:H.default.ctaButton,fullWidth:!0,onClick:J},void 0,B.default.Messages.GUILD_PROFILE_JOIN_SERVER_BUTTON))),Q&&function(){var e,i;if(R||P){var l=(null!==(e=null==n?void 0:n.emojis)&&void 0!==e?e:[]).slice(0,13).filter((function(e){return e.id!==t.emojiId})).slice(0,12);return z("div",{className:H.default.guildSection},void 0,z(N.default,{className:H.default.guildTitle},void 0,P?B.default.Messages.EMOJI_POPOUT_JOINED_GUILD_EMOJI_DESCRIPTION:B.default.Messages.EMOJI_POPOUT_UNJOINED_GUILD_EMOJI_DESCRIPTION),z(Z,{guild:null!=n?n:r}),!P&&a.createElement(a.Fragment,null,z(O.default,{onClick:function(){null==p||p(),j||m||D.default.track(F.AnalyticEvents.EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,W),U(!j)},className:H.default.showMoreEmojis},void 0,z(I.default,{},void 0,z(L.default,{className:H.default.showMoreEmojisLabel,size:L.default.Sizes.SIZE_12,color:L.default.Colors.CUSTOM},void 0,B.default.Messages.EMOJI_POPOUT_SHOW_MORE_EMOJIS),z(A.default,{className:(0,o.default)(H.default.showMoreEmojisArrow,(i={},i[H.default.showMoreEmojisArrowCollapsed]=!j,i))}))),j&&z(I.default,{wrap:I.default.Wrap.WRAP,align:I.default.Align.START,justify:I.default.Justify.START,className:H.default.otherEmojisContainer},void 0,l.map((function(e){return a.createElement(M.default,K({key:e.id,text:e.require_colons?":"+e.name+":":e.name},G.EXPRESSION_TOOLTIP_PROPS),(function(t){return a.createElement(s.default,K({className:H.default.otherEmoji,emojiId:e.id,animated:e.animated},t))}))})))))}}())};t.CustomGuildEmojiPopout=X,X.displayName="CustomGuildEmojiPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(61)),i=n(5973),l=f(n(9283)),u=f(n(8723)),s=f(n(6)),d=f(n(7434));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t=e.onPlay,n=e.externalURL,r=e.className,f=e.renderLinkComponent,c=e.inactive,v=e.playText,y=null!=v;return p(i.MessagesInteractionContext.Consumer,{},void 0,(function(e){var i,m;return p("div",{className:(0,a.default)(r,d.default.wrapper,(i={},i[d.default.disableInteractions]=e.disableInteractions,i[d.default.wrapperHasPlayText]=y,i))},void 0,c&&null==t?p("div",{className:d.default.iconWrapper},void 0,p(u.default,{className:d.default.iconPlay})):null,null!=t?p(o.default,{onClick:t,className:(0,a.default)(d.default.iconWrapperActive,(m={},m[d.default.iconWrapperHasPlayText]=y,m)),tabIndex:c?-1:0,"aria-label":s.default.Messages.PLAY},void 0,p(u.default,{className:d.default.iconPlay}),y?p("span",{className:d.default.text},void 0,v):null):null,y||null==n?null:f({href:n,target:"_blank",rel:"noreferrer noopener",className:d.default.iconWrapperActive,children:p(l.default,{className:null!=t?d.default.iconExternalMargins:d.default.iconExternal})}))}))};v.displayName="VideoPlayPill";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlaintextFilePreviewComponent=x,t.default=t.PlaintextFilePreviewExperiment=void 0;var r,a=P(n(0)),o=N(n(9)),i=n(1303),l=n(50),u=n(8594),s=n(380),d=N(n(271)),f=N(n(61)),c=P(n(8595)),p=N(n(282)),v=N(n(278)),y=N(n(151)),m=N(n(149)),_=N(n(683)),h=N(n(8376)),E=N(n(9286)),g=N(n(8802)),S=n(35),O=n(41),I=N(n(24)),T=N(n(272)),C=N(n(6)),b=N(n(7438)),M=N(n(5701));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){D(o,r,a,i,l,"next",e)}function l(e){D(o,r,a,i,l,"throw",e)}i(void 0)}))}}var j=(0,l.createExperiment)({kind:"user",id:"2021-01_plaintext_file_previews_flag",label:"Plaintext File Previews flag",defaultConfig:{enabled:!1,beer:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0,beer:!1}},{id:2,label:"Enabled with beer",config:{enabled:!0,beer:!0}}]});function k(e){var t=e.text,r=e.language,a=function(){return L("pre",{},void 0,L("code",{className:(0,o.default)(M.default.scrollbarGhostHairline,b.default.codeView,"hljs")},void 0,t))};return L(i.LazyLibrary,{createPromise:function(){return Promise.resolve().then(n.t.bind(null,1231,7))},webpackId:1231,render:function(e){if(!e.hasLanguage(r))return a();var n=e.highlight(r,t,!0);return null==n?a():L("pre",{},void 0,L("code",{className:(0,o.default)(M.default.scrollbarGhostHairline,b.default.codeView,"hljs",n.language),dangerouslySetInnerHTML:{__html:n.value}}))},renderFallback:function(){return a()}})}function U(e){var t=e.expanded,n=e.setExpanded,r=e.isWholeFile,o=e.numLines,i=(r?C.default.Messages.PREVIEW_NUM_LINES:C.default.Messages.PREVIEW_NUM_LINES_AT_LEAST).format({lines:o});return L(m.default,{text:(t?C.default.Messages.COLLAPSE:C.default.Messages.EXPAND)+" ("+i+")"},void 0,(function(e){return a.createElement(f.default,R({},e,{className:b.default.toggleExpandSection,onClick:function(){n(!t)}}),L(_.default,{direction:t?_.default.Directions.UP:_.default.Directions.DOWN}),t?C.default.Messages.COLLAPSE:C.default.Messages.EXPAND)}))}function G(e){var t=e.attachment,n=t.filename+" ("+(0,s.formatKbSize)(t.size)+")";return a.createElement(a.Fragment,null,L(m.default,{text:n},void 0,(function(e){return a.createElement("span",R({},e,{className:(0,o.default)(b.default.downloadSection,b.default.attachmentName)}),t.filename)})),L(m.default,{text:n},void 0,(function(e){return a.createElement("span",R({},e,{className:(0,o.default)(b.default.downloadSection,b.default.formattedSize)}),(0,s.formatKbSize)(t.size))})),L(m.default,{text:C.default.Messages.DOWNLOAD+" "+n},void 0,(function(e){return a.createElement(d.default,R({},e,{className:b.default.downloadSection,href:t.url,target:"_blank",rel:"noreferrer noopener"}),L(h.default,{className:b.default.downloadButton,width:24,height:24}))})))}function F(e){var t=e.language,n=e.setLanguage;return L(v.default,{position:v.default.Positions.LEFT,renderPopout:function(e){var r=e.closePopout;return L(p.default,{"aria-label":C.default.Messages.PREVIEW_CHANGE_LANGUAGE},void 0,L(c.default,{className:b.default.languageSelector,multiSelect:!1,placeholder:C.default.Messages.PREVIEW_SEARCH_LANGUAGE_PLACEHOLDER,value:new Set([t]),autoFocus:!0,onChange:function(e){n(e),r()}},void 0,(function(e){return Array.from(u.PLAINTEXT_FILE_EXTENSIONS).filter((function(t){return t.toLowerCase().includes(e.toLowerCase())})).map((function(e){return L(c.ComboboxItem,{value:e},e,L(c.ComboboxItem.Label,{},void 0,e))}))})))}},void 0,(function(e){return L(m.default,{text:C.default.Messages.PREVIEW_CHANGE_LANGUAGE},void 0,(function(t){return a.createElement(g.default,R({width:24,height:24},t,e,{className:b.default.codeIcon}))}))}))}t.PlaintextFilePreviewExperiment=j,k.displayName="PreviewText",U.displayName="ToggleExpandedSection",F.displayName="LanguageSelect";var B=L(E.default,{});function H(e){var t=j.useExperiment({})[0].beer;return L(m.default,{text:C.default.Messages.PREVIEW_WHOLE_FILE},void 0,(function(n){return a.createElement(f.default,R({},n,{className:b.default.openFullPreviewSection,onClick:function(){(0,O.openModal)((function(t){return a.createElement(V,R({},e,t))}))}}),t?"🍺":B)}))}function x(e){var t,n,r=e.attachment,i=e.fileContents,l=e.expanded,u=e.setExpanded,d=e.language,f=e.setLanguage,c=e.bytesLeft,p=e.hadError,v=e.className,m=null==i?void 0:i.split("\n"),_=null!==(t=null==m?void 0:m.length)&&void 0!==t?t:0,h=l?100:6,E=0===c,g="";p||(E&&l&&_>h?g="\n...":E||(g="..."),""!==g&&(g+=E?" "+C.default.Messages.PREVIEW_LINES_LEFT.format({lines:_-h}):" "+C.default.Messages.PREVIEW_BYTES_LEFT.format({formattedBytes:(0,s.formatKbSize)(c)})));var S=(null==m?void 0:m.slice(0,h).join("\n"))+g,O=l||h<_;return L("div",{className:(0,o.default)(v,b.default.container)},void 0,L("div",{className:(0,o.default)(b.default.textContainer,(n={},n[b.default.expanded]=l,n))},void 0,null==i?L(y.default,{className:b.default.spinner}):L(k,{text:S,language:d})),L(I.default,{color:I.default.Colors.HEADER_SECONDARY,className:b.default.footer},void 0,O?a.createElement(a.Fragment,null,L(U,{expanded:l,setExpanded:u,isWholeFile:E,numLines:_}),L(H,{language:d,fileContents:i,bytesLeft:c,attachment:r})):null,L("div",{className:b.default.footerGap}),L(G,{attachment:r}),L(F,{language:d,setLanguage:f})))}function V(e){var t=e.transitionState,n=e.language,r=e.fileContents,o=e.bytesLeft,i=e.attachment,l=a.useState(n),u=l[0],d=l[1],f=null!=r?r:"";return 0!==o&&(f+="... "+C.default.Messages.PREVIEW_BYTES_LEFT.format({formattedBytes:(0,s.formatKbSize)(o)})),L(S.ModalRoot,{transitionState:t,"aria-label":C.default.Messages.PREVIEW_MODAL_LABEL,size:S.ModalSize.LARGE,className:b.default.modalRoot},void 0,L("div",{className:b.default.modalContent},void 0,L(T.default,{className:b.default.modalTextContainer},void 0,null==r?L(y.default,{className:b.default.spinner}):L(k,{text:f,language:u})),L(I.default,{color:I.default.Colors.HEADER_SECONDARY,className:b.default.footer},void 0,L("div",{className:b.default.footerGap}),L(G,{attachment:i}),L(F,{language:u,setLanguage:d}))))}H.displayName="OpenFullPreviewSection",x.displayName="PlaintextFilePreviewComponent",V.displayName="PlaintextFilePreviewModal";var W=a.memo((function(e){var t=e.attachment,n=e.className,r=a.useState(!1),o=r[0],i=r[1],l=a.useState(t.filename.split(".").slice(-1)[0]),u=l[0],s=l[1],d=function(e,t){var n=a.useState(!1),r=n[0],o=n[1],i=a.useState(null),l=i[0],u=i[1],s=a.useState(1),d=s[0],f=s[1];return a.useEffect((function(){function n(){return(n=w(regeneratorRuntime.mark((function n(){var r,a,i,l,s,d,c,p;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,fetch(e,{headers:{Range:"bytes=0-50000",Accept:"text/plain"}});case 3:return a=n.sent,i=new TextDecoder(null!==(r=null==t?void 0:t.split("charset=").slice(-1)[0])&&void 0!==r?r:"utf-8"),n.t0=i,n.next=8,a.arrayBuffer();case 8:n.t1=n.sent,l=n.t0.decode.call(n.t0,n.t1),s=a.headers.get("content-range")||"0",d=a.headers.get("content-length")||"1",c=parseInt(s.split("/")[1]),p=c-parseInt(d),u(0===p?l:l.slice(0,-1)),f(p),o(!1),n.next=24;break;case 19:n.prev=19,n.t2=n.catch(0),u("Could not render this file preview."),f(0),o(!0);case 24:case"end":return n.stop()}}),n,null,[[0,19]])})))).apply(this,arguments)}!function(){n.apply(this,arguments)}()}),[e,t]),{fileContents:l,bytesLeft:d,hadError:r}}(t.url,t.content_type);return L(x,{attachment:t,fileContents:d.fileContents,bytesLeft:d.bytesLeft,expanded:o,setExpanded:i,language:u,setLanguage:s,hadError:d.hadError,className:n})}),(function(e,t){return e.attachment.id===t.attachment.id&&e.className===t.className}));t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPlaintextPreviewableFile=function(e){return r.has(e.split(".").slice(-1)[0])},t.PLAINTEXT_FILE_EXTENSIONS=void 0;var r=new Set(["1c","4d","abnf","accesslog","ada","arduino","ino","armasm","arm","avrasm","actionscript","as","alan","i","log","ln","angelscript","asc","apache","apacheconf","applescript","osascript","arcade","asciidoc","adoc","aspectj","autohotkey","autoit","awk","mawk","nawk","gawk","bash","sh","zsh","basic","bbcode","blade","bnf","brainfuck","bf","csharp","cs","c","h","cpp","hpp","cc","hh","c++","h++","cxx","hxx","cal","cos","cls","cmake","cmake.in","coq","csp","css","csv","capnproto","capnp","chaos","kaos","chapel","chpl","cisco","clojure","clj","coffeescript","coffee","cson","iced","cpc","crmsh","crm","pcmk","crystal","cr","cypher","d","dns","zone","bind","dos","bat","cmd","dart","delphi","dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm","diff","patch","django","jinja","dockerfile","docker","dsconfig","dts","dust","dst","dylan","ebnf","elixir","ex","elm","erlang","erl","extempore","xtlang","xtm","fsharp","fs","fix","fortran","f90","f95","gcode","nc","gams","gms","gauss","gss","godot","gdscript","gherkin","gn","gni","go","golang","gf","golo","gololang","gradle","groovy","xml","html","xhtml","rss","atom","xjb","xsd","xsl","plist","svg","http","https","haml","handlebars","hbs","html.hbs","html.handlebars","haskell","hs","haxe","hx","hy","hylang","ini","toml","inform7","i7","irpf90","json","java","jsp","javascript","js","jsx","jolie","iol","ol","julia","julia-repl","kotlin","kt","tex","leaf","lean","lasso","ls","lassoscript","less","ldif","lisp","livecodeserver","livescript","lock","ls","lua","makefile","mk","mak","make","markdown","md","mkdown","mkd","mathematica","mma","wl","matlab","maxima","mel","mercury","mirc","mrc","mizar","mojolicious","monkey","moonscript","moon","n1ql","nsis","never","nginx","nginxconf","nim","nimrod","nix","ocl","ocaml","ml","objectivec","mm","objc","obj-c","obj-c++","objective-c++","glsl","openscad","scad","ruleslanguage","oxygene","pf","pf.conf","php","php3","php4","php5","php6","php7","parser3","perl","pl","pm","plaintext","txt","text","pony","pgsql","postgres","postgresql","powershell","ps","ps1","processing","prolog","properties","protobuf","puppet","pp","python","py","gyp","profile","python-repl","pycon","k","kdb","qml","r","cshtml","razor","razor-cshtml","reasonml","re","redbol","rebol","red","red-system","rib","rsl","graph","instances","robot","rf","rpm-specfile","rpm","spec","rpm-spec","specfile","ruby","rb","gemspec","podspec","thor","irb","rust","rs","SAS","sas","scss","sql","p21","step","stp","scala","scheme","scilab","sci","shexc","shell","console","smali","smalltalk","st","sml","ml","solidity","sol","stan","stanfuncs","stata","iecst","scl","stl","structured-text","stylus","styl","subunit","supercollider","sc","svelte","swift","tcl","tk","terraform","tf","hcl","tap","thrift","tp","tsql","twig","craftcms","typescript","ts","tsx","unicorn-rails-log","vbnet","vb","vba","vbscript","vbs","vhdl","vala","verilog","v","vim","axapta","x++","x86asm","xl","tao","xquery","xpath","xq","yml","yaml","zephir","zep"]);t.PLAINTEXT_FILE_EXTENSIONS=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useMultiSelect=function(e){var t=a.useState(new Set(e)),n=t[0],r=t[1],o=a.useCallback((function(e){r((function(t){var n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))}),[]);return[n,o]},t.useSingleSelect=function(e){var t=a.useState(new Set(e?[e]:void 0)),n=t[0],r=t[1],o=a.useCallback((function(e){r(new Set([e]))}),[]);return[n,o]},t.default=M,t.ComboboxItem=A;var r,a=g(n(0)),o=h(n(9)),i=g(n(680)),l=n(92),u=h(n(1160)),s=h(n(61)),d=h(n(5942)),f=n(85),c=h(n(729)),p=h(n(47)),v=h(n(24)),y=n(1210),m=h(n(6)),_=h(n(7437));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var T=Object.freeze({STANDARD:_.default.selected,BRAND:_.default.selectedBrand});function C(e){return String(e)}var b=a.createContext({activeDescendant:null,selected:new Set,setSelected:l.NOOP,itemToString:C});function M(e){var t=e.placeholder,n=e.children,r=e.value,l=e.onChange,u=e.className,s=e.listClassName,c=e["aria-label"],h=e.multiSelect,E=void 0!==h&&h,g=e.autoFocus,T=void 0!==g&&g,M=e.maxVisibleItems,N=void 0===M?5:M,A=e.itemToString,P=void 0===A?C:A,R=a.useState(""),L=R[0],D=R[1],w=a.useState(!0)[0],j=a.useState(null),k=j[0],U=j[1],G=(0,f.useUID)(),F=a.useRef(null);a.useLayoutEffect((function(){var e=document.querySelector('[data-listbox-item-id="'+k+'"]'),t=F.current;null!=t&&null!=e&&t.scrollIntoViewNode({node:e,padding:12})}),[k]);var B=n(L),H=0===B.length,x=(0,f.useUID)(),V=a.useCallback((function(){return new Promise((function(e){var t=F.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),W=a.useCallback((function(){return new Promise((function(e){var t=F.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),Y=a.useCallback((function(e,t){U(t);var n=document.querySelector(e),r=F.current;null!=r&&null!=n&&r.scrollIntoViewNode({node:n})}),[]),z=(0,i.default)({id:x,isEnabled:!0,useVirtualFocus:!0,scrollToStart:V,scrollToEnd:W,setFocus:Y});return O(i.ListNavigatorProvider,{navigator:z},void 0,O(i.ListNavigatorContainer,{},void 0,(function(e){var n=e.ref,i=e.onKeyDown,f=I(e,["ref","onKeyDown"]);return a.createElement("div",{ref:n,role:"combobox","aria-label":c,"aria-expanded":w,"aria-controls":w?G:void 0,"aria-owns":G,"aria-haspopup":"listbox",className:(0,o.default)(_.default.combobox,u)},O(d.default,{autoFocus:T,size:d.default.Sizes.MEDIUM,placeholder:t,query:L,onChange:D,onKeyDown:i,onBlur:function(){return U(null)},onClear:function(){return D("")},inputProps:{"aria-multiline":!1,"aria-activedescendant":null!=k?k:void 0}}),O("div",{},void 0,w&&(H?O("div",{className:_.default.empty},void 0,O(p.default,{size:p.default.Sizes.SIZE_16,tag:p.default.Tags.H4},void 0,m.default.Messages.AUTOCOMPLETE_NO_RESULTS_HEADER),O(v.default,{color:v.default.Colors.MUTED,size:v.default.Sizes.SIZE_16},void 0,m.default.Messages.AUTOCOMPLETE_NO_RESULTS_BODY)):O(b.Provider,{value:{activeDescendant:k,selected:r,setSelected:l,itemToString:P}},void 0,a.createElement(y.ListNone,S({},f,{style:{maxHeight:46*N},"aria-multiselectable":E,id:G,ref:F,className:(0,o.default)(_.default.list,s),sections:[B.length],sectionHeight:0,rowHeight:40,renderRow:function(e){var t=e.row;return B[t]},renderSection:function(){return null}}))))))})))}M.displayName="Combobox";var N=a.createContext(null);function A(e){var t,n,r,l=e.value,u=e.children,d=e.disabled,f=void 0!==d&&d,c=e.selectedColor,p=void 0===c?T.STANDARD:c,v=I(e,["value","children","disabled","selectedColor"]),y=a.useContext(b),m=y.activeDescendant,h=y.selected,E=y.setSelected,g=(0,y.itemToString)(l),C=m===g,M=null!==(t=null==v?void 0:v.selected)&&void 0!==t?t:h.has(l),A=(0,i.useListItem)(g);return a.createElement(s.default,S({tag:"li",id:g,onClick:function(){return E(l)}},((n={})["data-listbox-item-id"]=l,n),{className:(0,o.default)(_.default.item,(r={},r[_.default.focused]=C,r[p]=M,r))},A,{role:"option","aria-selected":M,"aria-disabled":f}),O(N.Provider,{value:l},void 0,u))}A.displayName="ComboboxItem",A.Colors=T,A.Label=function(e){var t=e.children;return O("span",{className:_.default.itemLabel},void 0,t)},A.Icon=function(e){var t=e.children;return O("span",{className:_.default.itemCheckbox},void 0,t)},A.Checkbox=function(e){var t=e.checked,n=a.useContext(b).selected,r=a.useContext(N);return O("span",{className:_.default.itemCheckbox},void 0,O(u.default,{displayOnly:!0,value:null!=t?t:null!=r&&n.has(r),type:u.default.Types.INVERTED,size:20}))};var P=O(c.default,{width:20,height:20});A.Checkmark=function(){var e=a.useContext(b).selected,t=a.useContext(N);return e.has(t)?O("span",{className:_.default.itemCheckbox},void 0,P):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openPremiumSite=function(){window.open(o.SpotifyEndpoints.PREMIUM_SITE)},t.openTrack=function(e){var t=e.sync_id;if(null==t)return;var n=o.SpotifyResourceTypes.TRACK,r=i.default.isProtocolRegistered()?o.SpotifyEndpoints.PLAYER_OPEN(n,t):o.SpotifyEndpoints.WEB_OPEN(n,t);window.open(r)},t.openAlbum=function(e,t){u(e,t,(function(e){var t=e.album_id;if(null==t)throw new Error("no album id in metadata");return{resourceType:o.SpotifyResourceTypes.ALBUM,resourceId:t}}))},t.openArtist=function(e,t,n){u(e,t,(function(e){var t=e.artist_ids;if(null==t)throw new Error("no artist ids in metadata");var r=t[n];if(null==r)throw new Error("invalid artist index");return{resourceType:o.SpotifyResourceTypes.ARTIST,resourceId:r}}))};var r=n(8428),a=l(n(16)),o=n(293),i=l(n(1310));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){var l;a.default.isDesktop()||(l=window.open("","_blank")),(0,r.getMetadata)(e,t).then((function(e){return n(e)})).then((function(e){var t=e.resourceType,n=e.resourceId,r=i.default.isProtocolRegistered()?o.SpotifyEndpoints.PLAYER_OPEN(t,n):o.SpotifyEndpoints.WEB_OPEN(t,n);null!=l?l.location.href=r:window.open(r)})).catch((function(){null!=l&&l.close()}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,u,s,d,f,c,p){if((0,i.default)(t))return(0,a.default)(e,t,n,c,p,u);if(!r.default.isDesktop())return!1;if((0,o.default)(t,l.ActivityFlags.PARTY_PRIVACY_FRIENDS)&&d.isFriend(e.id))return!0;if((0,o.default)(t,l.ActivityFlags.PARTY_PRIVACY_VOICE_CHANNEL)){var v=n.getChannel(f.getVoiceChannelId());if(null==v||!c.isInChannel(v.id,e.id))return!1;switch(v.type){case l.ChannelTypes.DM:case l.ChannelTypes.GROUP_DM:return!0}var y=u.getGuild(v.getGuildId());if(null==y||y.hasFeature(l.GuildFeatures.COMMUNITY))return!1;var m=s.getMemberCount(y.id);return null!=m&&m<100}return!1};var r=u(n(16)),a=u(n(9295)),o=u(n(399)),i=u(n(8598)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e,o.ActivityFlags.EMBEDDED)};var r,a=(r=n(399))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.useStateFromStores)([o.default,a.default],(function(){var e=o.default.getVoiceChannelId();if(e){var t=a.default.getChannel(e);if(null==t?void 0:t.isGuildStageVoice())return t}return null}))};var r=n(3),a=i(n(10)),o=i(n(36));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=T(n(9)),o=n(3),i=T(n(8273)),l=n(1278),u=T(n(12)),s=T(n(29)),d=T(n(55)),f=n(8823),c=n(1214),p=T(n(9308)),v=T(n(9309)),y=T(n(9310)),m=T(n(9311)),_=T(n(9312)),h=T(n(9313)),E=T(n(9315)),g=T(n(9317)),S=T(n(9318)),O=T(n(9319)),I=T(n(7462));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M=(0,i.default)((function(e){var t,n=e.activity,r=e.user,i=e.applicationStream,T=e.className,C=e.guildId,M=e.channelId,N=e.source,A=e.color,P=void 0===A?s.default.Colors.WHITE:A,R=e.look,L=void 0===R?s.default.Looks.OUTLINED:R,D=e.type,w=e.onAction,j=e.onOpenConnections,k=(0,o.useStateFromStores)([u.default],(function(){return u.default.getCurrentUser()})),U=D===f.Types.PROFILE,G=D===f.Types.STREAM_PREVIEW||null!=i,F=(0,c.isListeningOnSpotify)(n),B=(0,l.isStageActivity)(n),H=U?d.default.Align.END:d.default.Align.STRETCH,x=F||G?d.default.Direction.HORIZONTAL:d.default.Direction.VERTICAL;if((0,c.isOnXbox)(n))return b(O.default,{onOpenConnections:j,look:L,color:P});if(F){var V=b(E.default,{activity:n,user:r,color:P,look:L,guildId:C,channelId:M,source:N},"spotify-activity-sync-button");t=[b(h.default,{activity:n,user:r,color:P,look:L,guildId:C,channelId:M,source:N},"spotify-activity-play-button"),V]}else if(B){var W=(0,l.unpackStageChannelParty)(n);if(null!=W)return b(y.default,{guildId:W.guildId,channelId:W.channelId,color:P,look:L,isProfile:U})}else if(G){t=[b(S.default,{isCurrentUser:k.id===r.id,color:P,look:L,applicationStream:i},"watch-button")]}else{var Y=b(g.default,{activity:n,color:P,look:L},"watch-button"),z=b(v.default,{activity:n,user:r,isCurrentUser:k.id===r.id,color:P,look:L},"join-activity-button"),K=b(_.default,{activity:n,user:r,isCurrentUser:k.id===r.id,color:P,look:L},"spectate-activity-button"),$=b(m.default,{activity:n,user:r,color:P,look:L},"notify-button"),Z=b(p.default,{user:r,color:P,look:L,activity:n},"custom-activity-button");if(null==z&&null==$&&null==Y&&null==Z)return null;t=[z,K,$,Y,Z]}var q=x===d.default.Direction.VERTICAL;return b(d.default,{grow:0,align:H,direction:x,wrap:q?d.default.Wrap.WRAP:d.default.Wrap.NO_WRAP,className:(0,a.default)(T,I.default.buttonsWrapper,q?I.default.vertical:I.default.horizontal),onClick:function(e){if(e.target instanceof Element){if("BUTTON"!==e.target.nodeName)return;null==w||w()}}},void 0,t)}));t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSpotifyPlayAction=function(e,t,n){var a=h(e,t),o=a.notPlayable,i=a.isCurrentUser,l=a.playingSameTrack,s=_(a),c=s.loading,p=s.startLoading,y=s.clearLoading,m=r.useCallback((function(){p(),(0,v.default)(a,u.SpotifyActionTypes.USER_ACTIVITY_PLAY,n).catch(y)}),[a,n,p,y]);return{label:(0,d.default)(a,u.SpotifyActionTypes.USER_ACTIVITY_PLAY),tooltip:(0,f.default)(a,u.SpotifyActionTypes.USER_ACTIVITY_PLAY),disabled:!c&&(i||o||l),loading:c,onClick:m,spotifyData:a}},t.useSpotifySyncAction=function(e,t,n,a){var o=null!=a?a:t.toString(),i=h(e,t),l=i.syncingWithUser,s=i.syncingWithParty,c=i.isCurrentUser,v=_(i),y=v.loading,m=v.startLoading,E=v.clearLoading,g=r.useCallback((function(){m(),(0,p.default)(i,u.SpotifyActionTypes.USER_ACTIVITY_SYNC,n).catch(E)}),[i,n,m,E]);return{label:(0,d.default)(i,u.SpotifyActionTypes.USER_ACTIVITY_SYNC),tooltip:(0,f.default)(i,u.SpotifyActionTypes.USER_ACTIVITY_SYNC,o),disabled:!y&&(c||l||s),loading:y,onClick:g,spotifyData:i}},t.useSpotifyJoinAction=function(e,t,n){var a=h(e,t),o=a.notPlayable,i=a.syncingWithUser,l=a.syncingWithParty,s=a.isCurrentUser,c=_(a),v=c.loading,y=c.startLoading,m=c.clearLoading,E=r.useCallback((function(){y(),(0,p.default)(a,u.SpotifyActionTypes.EMBED_SYNC,n).catch(m)}),[a,n,y,m]);return{label:(0,d.default)(a,u.SpotifyActionTypes.EMBED_SYNC),tooltip:(0,f.default)(a,u.SpotifyActionTypes.EMBED_SYNC),disabled:!v&&(s||i||l||o),loading:v,onClick:E,spotifyData:a}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=n(57),i=y(n(1259)),l=y(n(11)),u=n(293),s=y(n(708)),d=y(n(8817)),f=y(n(8727)),c=y(n(8728)),p=y(n(8729)),v=y(n(8730));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){var t=e.currentUserTrackId,n=e.syncingWithUser,a=e.syncingWithParty,l=r.useState(!1),u=l[0],s=l[1],d=r.useState((function(){return new o.Timeout}))[0],f=(0,i.default)(t);r.useEffect((function(){u&&(t!==f||n||a)&&(s(!1),d.stop())}),[t,f,n,a,u,d]);var c=r.useCallback((function(){s(!0),d.start(3e4,(function(){return s(!1)}))}),[d]),p=r.useCallback((function(){s(!1),d.stop()}),[d]);return{loading:u,startLoading:c,clearLoading:p}}function h(e,t){return(0,a.useStateFromStoresObject)([s.default,l.default],(function(){return(0,c.default)(s.default,l.default,t,e)}),[e,t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,d,s("path",{fill:f,className:c,d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z",transform:"translate(2 2)"})))}f.displayName="Info"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=a.useMemo((function(){var n;return(n={})[t]=[e.id],n}),[t,e.id]);(0,s.useSubscribeGuildMembers)(r),(0,o.useStateFromStores)([v.default],(function(){return v.default.getGuildVersion(t)}),[t]);var g=(0,o.useStateFromStores)([p.default],(function(){return p.default.getGuild(t)}),[t]),S=(0,o.useStateFromStores)([y.default],(function(){return y.default.getCurrentUser().id===e.id}),[e.id]),T=(0,o.useStateFromStores)([c.default],(function(){return c.default.getChannel(n)}),[n]),C=null==T?void 0:T.isGuildStageVoice(),b=(0,o.useStateFromStoresObject)([m.default],(function(){var n,r,a,o=m.default.getVoiceState(t,e.id);return{muted:null!==(n=null==o?void 0:o.mute)&&void 0!==n&&n,deafened:null!==(r=null==o?void 0:o.deaf)&&void 0!==r&&r,suppressed:null!==(a=null==o?void 0:o.suppress)&&void 0!==a&&a,voiceConnected:null!=(null==o?void 0:o.channelId)}})),M=b.muted,N=b.deafened,A=b.suppressed,P=b.voiceConnected&&null!=n?[!C&&v.default.canWithPartialContext(h.Permissions.MUTE_MEMBERS,{channelId:n})?I(d.MenuCheckboxItem,{id:"voice-mute",label:E.default.Messages.SERVER_VOICE_MUTE,checked:M||A,color:f.MenuItemColor.DANGER,action:function(){return i.default.setServerMute(t,e.id,!(M||A))}},"voice-mute"):null,!C&&v.default.canWithPartialContext(h.Permissions.DEAFEN_MEMBERS,{channelId:n})?I(d.MenuCheckboxItem,{id:"voice-deafen",label:E.default.Messages.SERVER_DEAFEN,checked:N,color:f.MenuItemColor.DANGER,action:function(){return i.default.setServerDeaf(t,e.id,!N)}},"voice-deafen"):null,!S&&null!=g&&v.default.canWithPartialContext(h.Permissions.MOVE_MEMBERS,{channelId:n})?I(d.MenuItem,{id:"voice-disconnect",label:S?E.default.Messages.DISCONNECT_SELF:E.default.Messages.DISCONNECT_OTHER,color:f.MenuItemColor.DANGER,action:function(){return i.default.setChannel(t,e.id,null)}},"voice-disconnect"):null]:[],R=S||null==g?[]:[v.default.canManageUser(h.Permissions.KICK_MEMBERS,e,g)?I(d.MenuItem,{id:"kick",label:E.default.Messages.KICK_USER.format({user:e.username}),color:f.MenuItemColor.DANGER,action:function(){return(0,_.openModal)((function(n){return a.createElement(u.default,O({},n,{guildId:t,user:e}))}))}},"kick"):null,v.default.canManageUser(h.Permissions.BAN_MEMBERS,e,g)?I(d.MenuItem,{id:"ban",label:E.default.Messages.BAN_USER.format({user:e.username}),color:f.MenuItemColor.DANGER,action:function(){return(0,_.openModal)((function(n){return a.createElement(l.default,O({},n,{guildId:t,user:e}))}))}},"ban"):null];return[].concat(P,R)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(199)),l=g(n(8604)),u=g(n(8828)),s=n(8298),d=n(8253),f=n(8256),c=g(n(10)),p=g(n(15)),v=g(n(40)),y=g(n(12)),m=g(n(80)),_=n(41),h=n(1),E=g(n(6));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(199)),i=v(n(1159)),l=v(n(8272)),u=v(n(476)),s=v(n(466)),d=v(n(5945)),f=n(1),c=v(n(6)),p=v(n(7474));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=[{value:"0",label:c.default.Messages.DELETE_MESSAGE_HISTORY_OPTION_NONE},{value:"1",label:c.default.Messages.DELETE_MESSAGE_HISTORY_OPTION_24HR},{value:"7",label:c.default.Messages.DELETE_MESSAGE_HISTORY_OPTION_7D}],g=function(e){var t,r;function v(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={duration:E[1].value,reason:""},t.handleSubmit=function(){var e=t.props,n=e.guildId,r=e.user,a=t.state,i=a.duration,l=a.reason;o.default.banUser(n,r.id,i,l)},t.handleChangeDeleteDuration=function(e){var n=e.value;t.setState({duration:n})},t.handleChangeReason=function(e){t.setState({reason:e})},t}return r=e,(t=v).prototype=Object.create(r.prototype),t.prototype.constructor=t,h(t,r),v.prototype.render=function(){var e=this.state,t=e.duration,r=e.reason,o=this.props,v=o.user,y=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(o,["user"]);return a.createElement(s.default,m({header:c.default.Messages.BAN_CONFIRM_TITLE.format({username:"@"+v.toString()}),confirmText:c.default.Messages.BAN,cancelText:c.default.Messages.CANCEL,onConfirm:this.handleSubmit},y),_(d.default,{autoPlay:!0,loop:!0,className:p.default.spacing,width:400},void 0,_("source",{src:n(9357),type:"video/webm"}),_("source",{src:n(9358),type:"video/mp4"}),_("img",{alt:"",src:n(9359)})),_(u.default,{title:c.default.Messages.FORM_LABEL_DELETE_MESSAGE_HISTORY,className:p.default.spacing},void 0,_(i.default,{clearable:!1,searchable:!1,options:E,value:t,onChange:this.handleChangeDeleteDuration})),_(u.default,{title:c.default.Messages.FORM_LABEL_REASON_BAN,className:p.default.spacing},void 0,_(l.default,{maxLength:f.MAX_REASON_LENGTH,onChange:this.handleChangeReason,value:r,rows:2})))},v}(a.PureComponent);g.displayName="BanConfirm";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBuiltInCommands=t.BUILT_IN_COMMANDS_ORIGINAL=t.BUILT_IN_COMMANDS=t.BUILT_IN_SECTIONS=void 0;var r=p(n(1387)),a=n(286),o=p(n(40)),i=p(n(39)),l=n(8290),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8434)),s=n(8260),d=n(1),f=p(n(6));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}var v=n(9361).default;t.BUILT_IN_SECTIONS=v;var y=n(9362).default,m=[].concat(y,[{id:"-1",name:"shrug",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN_TEXT,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_SHRUG_DESCRIPTION,options:[{name:"message",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_SHRUG_MESSAGE_DESCRIPTION}],execute:function(e){return{content:((u.getOptionalString(e,"message")||"")+" ¯\\_(ツ)_/¯").trim()}}},{id:"-2",name:"tableflip",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN_TEXT,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_TABLEFLIP_DESCRIPTION,options:[{name:"message",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_TABLEFLIP_MESSAGE_DESCRIPTION}],execute:function(e){return{content:((u.getOptionalString(e,"message")||"")+" (╯°□°)╯︵ ┻━┻").trim()}}},{id:"-3",name:"unflip",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN_TEXT,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_TABLEUNFLIP_DESCRIPTION,options:[{name:"message",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_TABLEUNFLIP_MESSAGE_DESCRIPTION}],execute:function(e){return{content:((u.getOptionalString(e,"message")||"")+" ┬─┬ ノ( ゜-゜ノ)").trim()}}},{id:"-4",name:"tts",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN_TEXT,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_TTS_DESCRIPTION,options:[{name:"message",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_TTS_MESSAGE_DESCRIPTION,required:!0}],predicate:function(e){var t=e.channel;return!t.isPrivate()&&i.default.enableTTSCommand&&o.default.can(d.Permissions.SEND_TTS_MESSAGES,t)},execute:function(e){return{content:u.getOptionalString(e,"message")||"",tts:!0}}},{id:"-5",name:"me",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN_TEXT,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_ME_DESCRIPTION,options:[{name:"message",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_ME_MESSAGE_DESCRIPTION,required:!0}],execute:function(e){return{content:"_"+(u.getOptionalString(e,"message")||"")+"_"}}},{id:"-6",name:"spoiler",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN_TEXT,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_SPOILER_DESCRIPTION,options:[{name:"message",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_SPOILER_MESSAGE_DESCRIPTION,required:!0}],execute:function(e){var t=u.getOptionalString(e,"message")||"";return{content:(0,d.MARKDOWN_SPOILER_WRAPPER)(t).trim()}}},{id:"-7",name:"nick",target:a.ApplicationCommandTarget.CHAT,type:s.ApplicationCommandType.BUILT_IN,applicationId:l.SECTION_BUILT_IN,description:f.default.Messages.COMMAND_NICK_DESCRIPTION,options:[{name:"new_nick",type:s.ApplicationCommandOptionType.STRING,description:f.default.Messages.COMMAND_NICK_NEWNICK_DESCRIPTION}],predicate:function(e){var t=e.channel;return!t.isPrivate()&&(o.default.can(d.Permissions.CHANGE_NICKNAME,t)||o.default.can(d.Permissions.MANAGE_NICKNAMES,t))},execute:function(e,t){var n=t.guild,a=t.channel;if(n){var o=u.getOptionalString(e,"new_nick");r.default.changeNickname(n.id,a.id,d.ME,o||"")}}}]);t.BUILT_IN_COMMANDS=m;var _=m.filter((function(e){return["giphy","tenor","tts","me","tableflip","unflip","shrug","spoiler","nick"].includes(e.name)}));t.BUILT_IN_COMMANDS_ORIGINAL=_;t.getBuiltInCommands=function(e,t,n){var r=t?m:_;return r=r.filter((function(t){return t.target===e&&(!n||t.type===s.ApplicationCommandType.BUILT_IN_TEXT||t.type===s.ApplicationCommandType.BUILT_IN_INTEGRATION)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,fillRule:"evenodd",clipRule:"evenodd",className:f,d:"M5 3C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3H5ZM16.8995 8.41419L15.4853 6.99998L7 15.4853L8.41421 16.8995L16.8995 8.41419Z"}))}d.displayName="ApplicationCommand"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(705)),i=f(n(688)),l=n(8253),u=f(n(80)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){var n=(0,a.useStateFromStores)([i.default],(function(){return e===i.default.getSelectedParticipantId(t)}),[t,e]);return(0,a.useStateFromStores)([i.default,u.default],(function(){var n=u.default.isInChannel(t,e)&&u.default.hasVideo(t),r=i.default.getLayout(t),a=r===s.ChannelLayouts.MINIMUM||r===s.ChannelLayouts.NORMAL;return!n||a}),[t,e])?null:p(l.MenuItem,{id:"focus-video",label:n?d.default.Messages.UNFOCUS_PARTICIPANT:d.default.Messages.FOCUS_PARTICIPANT,action:function(){return o.default.selectParticipant(t,n?null:e)}})}v.displayName="useFocusVideoItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;I(n(0));var r,a=n(3),o=S(n(199)),i=S(n(132)),l=n(180),u=n(8253),s=S(n(11)),d=S(n(10)),f=I(n(86)),c=S(n(15)),p=S(n(40)),v=S(n(70)),y=S(n(12)),m=S(n(80)),_=n(292),h=S(n(78)),E=n(1),g=S(n(6));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t){var n=(0,a.useStateFromStores)([f.default],(function(){return f.default.getChannels(t)[f.GUILD_VOCAL_CHANNELS_KEY]}),[t]),r=(0,a.useStateFromStores)([m.default,d.default],(function(){var n=m.default.getUserVoiceChannelId(t,e.id);return d.default.getChannel(n)}),[t,e.id]);if(null==r)return null;var S=e.id===s.default.getId();if(!S&&!p.default.can(E.Permissions.MOVE_MEMBERS,r))return null;var O=n.filter((function(t){var n=t.channel;return n.id!==r.id&&(S?p.default.can(E.Permissions.CONNECT,n)&&!(0,_.isChannelFull)(n,m.default,c.default):p.default.can(E.Permissions.MOVE_MEMBERS,n)&&(p.default.can(E.Permissions.CONNECT,n)||h.default.can(E.Permissions.CONNECT,e,n))&&!(0,_.isChannelFull)(n,m.default,c.default))}));if(0===O.length)return null;return T(u.MenuItem,{id:"voice-move",label:g.default.Messages.MOVE_TO},void 0,O.map((function(n){var r=n.channel;return T(u.MenuItem,{id:r.id,action:function(){return function(n){e.id===s.default.getId()?i.default.selectVoiceChannel(n.id):o.default.setChannel(t,e.id,n.id)}(r)},label:(0,l.computeChannelName)(r,y.default,v.default)},r.id)})))}C.displayName="useMoveUserVoiceItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFailedContent=S,t.InteractionStatusMessage=O,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=n(276),l=n(3),u=n(206),s=_(n(8610)),d=n(8506),f=_(n(5827)),c=_(n(1251)),p=_(n(24)),v=n(1),y=_(n(6)),m=_(n(7483));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){return{text:e,icon:E(c.default,{className:m.default.icon,dotRadius:3.5,themed:!0})}}function S(e){return{text:null!=e?e:y.default.Messages.APPLICATION_COMMAND_FAILED,color:p.default.Colors.ERROR,icon:E(f.default,{width:16,height:16,className:(0,o.default)(m.default.icon,m.default.errorIcon)})}}function O(e){var t=e.className,n=e.icon,r=e.text,a=e.color;return E("div",{className:(0,o.default)(m.default.wrapper,t)},void 0,n,E(p.default,{size:p.default.Sizes.SIZE_14,color:a},void 0,r))}function I(e){var t=e.message,n=e.className,r=e.component,o=(0,i.useForceUpdate)(),f=(0,l.useStateFromStores)([s.default],(function(){return s.default.getInteraction(t)}),[t]);a.useEffect((function(){var e=null;if(t.hasFlag(v.MessageFlags.LOADING)&&null!=f){var n=(0,d.getInteractionTimeoutTimestamp)(t.id)-(0,u.now)();n>0&&(e=setTimeout((function(){return o()}),1e3+n))}return function(){clearTimeout(e)}}),[o,f,t]);var c=null;if(null==r?c=function(e,t){switch((0,d.getInteractionStatusViewState)(t,e)){case d.InteractionStatusViewState.SENDING:return g(y.default.Messages.APPLICATION_COMMAND_SENDING);case d.InteractionStatusViewState.CREATED:return g(y.default.Messages.APPLICATION_COMMAND_WAITING.format({applicationName:t.author.username}));case d.InteractionStatusViewState.FAILED:return S(t.interactionError)}}(f,t):null!=r.errorText&&(c=S(r.errorText)),null==c)return null;var p=c,m=p.text;return E(O,{icon:p.icon,text:m,className:n,color:p.color})}O.displayName="InteractionStatusMessage",I.displayName="InteractionStatus";var T=a.memo(I);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=n(286),i=u(n(10)),l=n(8611);n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){return(d=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}).apply(this,arguments)}var f={},c={},p={};function v(e){delete f[e];var t=p[e];null!=t&&delete c[t],delete p[e]}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.getInteraction=function(e){var t=c[e.id];return null!=t?f[t]:null},a.getMessageInteractionStates=function(){for(var e={},t=0,n=Object.entries(f);t<n.length;t++){var r=n[t],a=r[0],o=r[1],i=p[a];null!=i&&(e[i]=o.state)}return e},a.canQueueInteraction=function(e,t){var n=c[e];return!(null!=n&&null!=f[n]&&f[n].state!==l.InteractionState.FAILED||null!=f[t]&&f[t].state!==l.InteractionState.FAILED)},r}(r.default.Store))(a.default,{LOGOUT:function(e){return f={},c={},void(p={})},INTERACTION_QUEUE:function(e){var t=e.nonce,n=e.messageId,r=e.data,a=e.onCreate,o=e.onCancel,i=e.onSuccess,u=e.onFailure;c[n]=t,p[t]=n,f[t]={state:l.InteractionState.QUEUED,data:r,onCreate:a,onCancel:o,onSuccess:i,onFailure:u}},INTERACTION_CREATE:function(e){var t,n=e.nonce,r=e.interactionId;if(null==n)return!1;var a=f[n];if(null==a||a.state!==l.InteractionState.QUEUED)return!1;a.state=l.InteractionState.CREATED,null===(t=a.onCreate)||void 0===t||t.call(a,r)},INTERACTION_SUCCESS:function(e){var t,n=e.nonce;if(null==n)return!1;var r=f[n];if(null==r)return!1;null===(t=r.onSuccess)||void 0===t||t.call(r),v(n)},INTERACTION_FAILURE:function(e){var t,n=e.nonce,r=e.errorCode,a=e.errorMessage;if(null==n)return!1;var i=f[n];if(null==i)return!1;null===(t=i.onFailure)||void 0===t||t.call(i,r,a),i.data.interactionType===o.InteractionTypes.APPLICATION_COMMAND?v(n):f[n]=d({},i,{state:l.InteractionState.FAILED,errorCode:r,errorMessage:a})},MESSAGE_CREATE:function(e){var t=e.message;if(null==t.nonce)return!1;var n,r=f[t.nonce];if(null==r)return!1;null===(n=r.onSuccess)||void 0===n||n.call(r),v(t.nonce)},CHANNEL_SELECT:function(e){var t=e.channelId;if(null==i.default.getChannel(t))return!1;for(var n=0,r=Object.entries(f);n<r.length;n++){var a=r[n],o=a[0];a[1].state===l.InteractionState.FAILED&&v(o)}}});t.default=y},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionState=void 0,t.InteractionState=r,function(e){e[e.QUEUED=0]="QUEUED",e[e.CREATED=1]="CREATED",e[e.FAILED=2]="FAILED"}(r||(t.InteractionState=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queueInteractionComponentState=function(e,t,n,r){a.default.dirtyDispatch({type:o.ActionTypes.QUEUE_INTERACTION_COMPONENT_STATE,messageId:e,nonce:t,state:n,indices:r})},t.addQueued=function(e,t,n){var r=n.data,i=n.onCreate,l=n.onSuccess,u=n.onFailure;a.default.dirtyDispatch({type:o.ActionTypes.INTERACTION_QUEUE,data:r,nonce:e,messageId:t,onCreate:i,onSuccess:l,onFailure:u})},t.setFailed=function(e,t,n){a.default.dirtyDispatch({type:o.ActionTypes.INTERACTION_FAILURE,nonce:e,errorMessage:n,errorCode:t})},t.fetchMessageInteractionData=function(e,t){return s.apply(this,arguments)};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}function s(){return(s=u(regeneratorRuntime.mark((function e(t,n){var i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get({url:o.Endpoints.MESSAGE_INTERACTION_DATA(t,n),oldFormErrors:!0});case 2:(i=e.sent).ok&&(l=i.body,a.default.dirtyDispatch({type:o.ActionTypes.LOAD_MESSAGE_INTERACTION_DATA_SUCCESS,channelId:t,messageId:n,interactionData:l}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(3)),a=s(n(2)),o=s(n(8832)),i=s(n(16)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(){return(f=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}).apply(this,arguments)}var c=i.default.isIOS()?l.TenorFormats.TINYGIF:l.TenorFormats.MP4,p=null,v="",y="",m=[],_=[],h=c,E=[],g=[];function S(e){switch(e){case l.GIPHYFormats.FIXED_HEIGHT_MP4:case l.GIPHYFormats.FIXED_HEIGHT_SMALL_MP4:case l.GIPHYFormats.FIXED_WIDTH_MP4:case l.GIPHYFormats.FIXED_WIDTH_SMALL_MP4:case l.GIPHYFormats.DOWNSIZED_SMALL_MP4:case l.GIPHYFormats.ORIGINAL_MP4:case l.TenorFormats.MP4:case l.TenorFormats.TINYMP4:case l.TenorFormats.NANOMP4:case l.TenorFormats.WEBM:case l.TenorFormats.TINYWEBM:case l.TenorFormats.NANOWEBM:return!0;default:return!1}}function O(e){return i.default.isIOS()?e:e.replace(/^https?:/,"")}var I=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.getAnalyticsID=function(){return p},a.getQuery=function(){return v},a.getResultQuery=function(){return y},a.getResultItems=function(){return m},a.getTrendingCategories=function(){return _},a.getSelectedFormat=function(){return h},a.getSuggestions=function(){return E},a.getTrendingSearchTerms=function(){return g},r}(r.default.Store))(a.default,{GIF_PICKER_INITIALIZE:function(e){p=e.analyticsID},GIF_PICKER_QUERY:function(e){""===(v=e.query)&&(y="",m=[],E=[])},GIF_PICKER_QUERY_SUCCESS:function(e){if(null!=e.query&&v===y)return!1;null!=e.query&&(y=e.query),m=e.items.map((function(e){var t=e.width,n=e.height,r=e.src,a=e.url,o=e.id;return{width:t,height:n,src:O(r),url:a,id:o,format:S(h)?l.GIFResultFormat.VIDEO:l.GIFResultFormat.IMAGE}}))},GIF_PICKER_QUERY_FAILURE:function(e){var t=e.query;if(null==t)return!1;y=t,m=[]},GIF_PICKER_TRENDING_FETCH_SUCCESS:function(e){var t=e.trendingCategories;_=[{type:l.GIFPickerResultTypes.TRENDING_GIFS,icon:o.default,name:u.default.Messages.GIF_PICKER_RESULT_TYPE_TRENDING_GIFS,src:O(e.trendingGIFPreview.src),format:l.GIFResultFormat.IMAGE}].concat(t.map((function(e){return f({},e,{src:O(e.src),type:l.GIFPickerResultTypes.TRENDING_CATEGORY,format:l.GIFResultFormat.VIDEO})})))},GIF_PICKER_SUGGESTIONS_SUCCESS:function(e){var t=e.items;E=t},GIF_PICKER_TRENDING_SEARCH_TERMS_SUCCESS:function(e){var t=e.items;g=t}});t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponsiveLoadingEmbedTile=t.ResponsiveEmbedTile=t.HORIZONTAL_EMBED_BREAKPOINT=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(8833)),l=u(n(7485));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(){return(f=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}).apply(this,arguments)}t.HORIZONTAL_EMBED_BREAKPOINT=660;var c=function(e){var t;return a.createElement(i.default,f({},e,{className:(0,o.default)(e.className,(t={},t[l.default.embedVertical]=!e.isHorizontal,t[l.default.embedHorizontal]=e.isHorizontal,t))}))};t.ResponsiveEmbedTile=c,c.displayName="ResponsiveEmbedTile";var p=function(e){var t=e.isHorizontal;return a.createElement(c,f({},e,{media:function(){var e;return d("div",{className:(0,o.default)(l.default.loadingDescription)},void 0,d("div",{className:(0,o.default)(l.default.loadingBackgroundWrapper,(e={},e[l.default.loadingBackgroundWrapperHorizontal]=t,e))},void 0,d("div",{className:l.default.loadingBackground})))},title:function(){var e;return d("div",{className:(0,o.default)(l.default.loadingImage,(e={},e[l.default.loadingImageHorizontal]=t,e))})}}))};t.ResponsiveLoadingEmbedTile=p,p.displayName="ResponsiveLoadingEmbedTile"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openPurchaseConfirmationModal=function(e,t,n,r){void 0===r&&(r={});return new Promise((function(i,l){a.default.dispatch({type:o.ActionTypes.PURCHASE_CONFIRMATION_MODAL_OPEN,applicationId:e,skuId:t,entitlements:n,context:null!=r.context?r.context:o.AppContext.APP,analyticsSource:r.analyticsSource,resolve:i,reject:l})}))},t.closePurchaseConfirmationModal=function(e){void 0===e&&(e=null);a.default.dispatch({type:o.ActionTypes.PURCHASE_CONFIRMATION_MODAL_CLOSE,error:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2020-09_desktop_slash_commands",label:"Slash Commands",defaultConfig:{allowSlashCommands:!1},treatments:[{id:1,label:"Enables the new Slash Commands UI",config:{allowSlashCommands:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(5965),l=d(n(61)),u=d(n(8320)),s=d(n(7487));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=a.memo((function(e){var t,n,r=e.children,d=e.className,f=e.icon,p=e.isCollapsed,v=e.onClick,y=e["aria-label"],m=e.onVisible,_=a.useRef(null);return a.createElement(i.VisibilitySensor,{ref:_,onChange:function(e){e&&m&&m()},threshold:1},c("div",{className:(0,o.default)(s.default.wrapper,d)},void 0,c(l.default,{onClick:v,className:(0,o.default)(s.default.header,(t={},t[s.default.interactive]=null!=p,t)),"aria-expanded":null!=p?!p:void 0,"aria-label":y},void 0,null!=f&&c("div",{"aria-hidden":!0,className:s.default.headerIcon},void 0,f),c("span",{className:s.default.headerLabel},void 0,r),null!=p?c(u.default,{className:(0,o.default)(s.default.headerCollapseIcon,(n={},n[s.default.headerCollapseIconCollapsed]=p,n)),height:16,width:16}):null)))}));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutocompleteRowContentSecondary=t.AutocompleteRowSubheading=t.AutocompleteRowHeading=t.AutocompleteRowIcon=t.AutocompleteRowContentPrimary=t.AutocompleteRowContent=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(24)),i=l(n(7366));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.children,n=e.className;return s("div",{className:(0,a.default)(i.default.autocompleteRowContent,n)},void 0,t)};t.AutocompleteRowContent=d,d.displayName="AutocompleteRowContent";var f=function(e){var t=e.children,n=e.className;return s("div",{className:(0,a.default)(i.default.autocompleteRowContentPrimary,n)},void 0,t)};t.AutocompleteRowContentPrimary=f,f.displayName="AutocompleteRowContentPrimary";var c=function(e){var t=e.children,n=e.className;return s("div",{className:(0,a.default)(i.default.autocompleteRowIcon,n)},void 0,t)};t.AutocompleteRowIcon=c,c.displayName="AutocompleteRowIcon";var p=function(e){var t=e.children,n=e.className;return s(o.default,{className:n,color:o.default.Colors.INTERACTIVE_ACTIVE,size:o.default.Sizes.SIZE_16},void 0,t)};t.AutocompleteRowHeading=p,p.displayName="AutocompleteRowHeading";var v=function(e){var t=e.children,n=e.className;return s(o.default,{className:(0,a.default)(n,i.default.autocompleteRowSubheading),color:o.default.Colors.INTERACTIVE_NORMAL,size:o.default.Sizes.SIZE_12},void 0,t)};t.AutocompleteRowSubheading=v,v.displayName="AutocompleteRowSubheading";var y=function(e){var t=e.children,n=e.className;return s(o.default,{className:(0,a.default)(n,i.default.autocompleteRowContentSecondary),color:o.default.Colors.INTERACTIVE_NORMAL,size:o.default.Sizes.SIZE_12},void 0,t)};t.AutocompleteRowContentSecondary=y,y.displayName="AutocompleteRowContentSecondary"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M21.707 13.293l-11-11C10.519 2.105 10.266 2 10 2H3c-.553 0-1 .447-1 1v7c0 .266.105.519.293.707l11 11c.195.195.451.293.707.293s.512-.098.707-.293l7-7c.391-.391.391-1.023 0-1.414zM7 9c-1.106 0-2-.896-2-2 0-1.106.894-2 2-2 1.104 0 2 .894 2 2 0 1.104-.896 2-2 2z"}))}d.displayName="StoreTag"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(8362)),l=n(1),u=s(n(7491));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=a.forwardRef((function(e,t){var n=e.activeIndex,r=e.children,s=e.className,d=e.listPadding,c=e.rowCount,p=e.getScrollOffsetForIndex,v=e.rowHeight,y=e.onScroll,m=e.renderCategoryListItem,_=a.useRef(null);return a.useImperativeHandle(t,(function(){return _.current})),function(e){var t=e.activeIndex,n=e.categoryListRef,r=e.getScrollOffsetForIndex,o=a.useRef(l.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID),i=a.useRef(t);a.useEffect((function(){null!=t&&t!==i.current&&(o.current!==l.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID&&window.cancelAnimationFrame(o.current),o.current=window.requestAnimationFrame((function(){var e;if(null!=n.current){var a=t>(null!==(e=i.current)&&void 0!==e?e:-1),u=null!=r?r(t,a):0;n.current.scrollRowIntoView(t,{animate:!0,offset:u}),o.current=l.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID,i.current=t}})))}),[t,n,r])}({activeIndex:n,categoryListRef:_,getScrollOffsetForIndex:p}),f("div",{className:(0,o.default)(u.default.wrapper,s)},void 0,a.createElement(i.default,{listPadding:d,onScroll:y,ref:_,renderRow:m,rowCount:c,rowHeight:v,className:u.default.list,hideScrollbar:!0}),r)}));t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EventEmitterConsumer=t.EventEmitterProvider=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.on=function(){return this},a.once=function(){return this},a.addListener=function(){return this},a.removeListener=function(){return this},a.emit=function(){return!1},r}(((r=n(64))&&r.__esModule?r:{default:r}).default),u=a.createContext(new l),s=u.Provider,d=u.Consumer;t.EventEmitterConsumer=d,t.EventEmitterProvider=s;var f=u;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M0,0H24V24H0Z",fill:"none"});function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{viewBox:"0 0 24 24",width:n,height:a}),d,s("path",{fill:f,className:c,d:"M12.5,17.6l3.6,2.2a1,1,0,0,0,1.5-1.1l-1-4.1a1,1,0,0,1,.3-1l3.2-2.8A1,1,0,0,0,19.5,9l-4.2-.4a.87.87,0,0,1-.8-.6L12.9,4.1a1.05,1.05,0,0,0-1.9,0l-1.6,4a1,1,0,0,1-.8.6L4.4,9a1.06,1.06,0,0,0-.6,1.8L7,13.6a.91.91,0,0,1,.3,1l-1,4.1a1,1,0,0,0,1.5,1.1l3.6-2.2A1.08,1.08,0,0,1,12.5,17.6Z"}))}f.displayName="FavoriteFilled"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7499));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(e){var t,n=e.message,r=e.className,i=e.noResultsImageURL,l=e.forceLightTheme,s=e.suggestions,d=null!=i?{backgroundImage:"url("+i+")"}:{};return u("div",{className:(0,a.default)((t={},t[o.default.forceLightTheme]=l,t),r)},void 0,u("div",{className:o.default.wrapper},void 0,u("div",{className:o.default.sadImage,style:d}),u("div",{},void 0,n),s))};s.displayName="NoSearchResults";var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M21.924 8.61789C21.77 8.24489 21.404 8.00089 21 8.00089H15.618L12.894 2.55389C12.555 1.87689 11.444 1.87689 11.105 2.55389L8.38199 8.00089H2.99999C2.59599 8.00089 2.22999 8.24489 2.07599 8.61789C1.92199 8.99089 2.00699 9.42289 2.29299 9.70789L6.87699 14.2919L5.03899 20.7269C4.92399 21.1299 5.07199 21.5619 5.40999 21.8089C5.74999 22.0569 6.20699 22.0659 6.55399 21.8329L12 18.2029L17.445 21.8329C17.613 21.9449 17.806 22.0009 18 22.0009C18.207 22.0009 18.414 21.9369 18.59 21.8089C18.928 21.5619 19.076 21.1299 18.961 20.7269L17.123 14.2919L21.707 9.70789C21.993 9.42289 22.078 8.99089 21.924 8.61789Z"}))}d.displayName="Star"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openStickerPackPremiumUpsellModal=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(692),l=n(280),u=b(n(5948)),s=b(n(5695)),d=b(n(5696)),f=b(n(6003)),c=b(n(39)),p=b(n(29)),v=b(n(5954)),y=b(n(8865)),m=b(n(8627)),_=n(35),h=n(41),E=b(n(24)),g=b(n(13)),S=b(n(96)),O=n(281),I=n(1),T=b(n(6)),C=b(n(7519));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P=function(e){var t=e.locale;return a.createElement(a.Fragment,null,A(f.default,{icon:m.default,iconClassName:C.default.iconColorLightBlue,description:T.default.Messages.STICKER_PREMIUM_TIER_2_UPSELL_PERK_QUANTITY}),A(f.default,{icon:m.default,iconClassName:C.default.iconColorPurple,description:T.default.Messages.STICKER_PREMIUM_TIER_2_UPSELL_PERK_CUSTOM}),A(f.default,{icon:y.default,iconClassName:C.default.iconColorPink,description:T.default.Messages.STICKER_PREMIUM_TIER_2_UPSELL_PERK_GUILD_SUBSCRIPTION.format({numGuildSubscriptions:l.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM,discountPercent:(0,O.formatPercent)(t,l.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100)})}),A(f.default,{icon:v.default,iconClassName:C.default.iconColorYellow,description:T.default.Messages.STICKER_PREMIUM_TIER_2_UPSELL_PERK_PREMIUM_SUBSCRIPTION}))},R=function(e){var t=e.onClose,r=(0,o.useStateFromStores)([c.default],(function(){return c.default.locale})),a=S.default.getPrice(I.SubscriptionPlans.PREMIUM_MONTH_TIER_2);return A("div",{className:C.default.wrapper},void 0,A(_.ModalCloseButton,{onClick:t,className:C.default.closeButton}),A("img",{className:C.default.heroImage,src:n(9465),alt:""}),A(E.default,{size:E.default.Sizes.SIZE_16,className:C.default.heading},void 0,T.default.Messages.STICKER_PREMIUM_TIER_2_UPSELL_ALERT_TITLE.format({monthlyPrice:(0,O.formatPrice)(a.amount,a.currency)})),A("div",{className:C.default.perks},void 0,A(P,{locale:r})))};R.displayName="StickerPackPremiumUpsellBody";var L=function(e){var t=e.onClose,n={section:I.AnalyticsSections.STICKER_PREMIUM_TIER_2_UPSELL_MODAL};return A(_.ModalFooter,{className:C.default.footer},void 0,A(s.default,{onClick:t}),A(u.default,{premiumModalAnalyticsLocation:n,subscriptionTier:I.PremiumSubscriptionSKUs.TIER_2,size:p.default.Sizes.SMALL,color:p.default.Colors.GREEN,onClick:function(){t()}}))};L.displayName="StickerPackPremiumUpsellFooter";t.openStickerPackPremiumUpsellModal=function(e){g.default.track(I.AnalyticEvents.OPEN_MODAL,{type:I.AnalyticsSections.STICKER_PREMIUM_TIER_2_UPSELL_MODAL,location:e}),(0,h.openModal)((function(e){var t=e.onClose,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClose"]);return a.createElement(_.ModalRoot,N({},n,{"aria-labelledby":"sticker-pack-premium-upsell-modal-header"}),A(d.default,{hideBreadcrumbs:!0,body:A(R,{onClose:t}),footer:A(L,{onClose:t}),steps:[i.Step.PREMIUM_UPSELL],currentStep:i.Step.PREMIUM_UPSELL}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(22)),l=u(n(7518));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t,n,r=e.width,u=void 0===r?24:r,s=e.height,c=void 0===s?24:s,p=e.color,v=void 0===p?"currentColor":p,y=e.winking,m=void 0!==y&&y,_=e.foreground,h=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","winking","foreground"]);return a.createElement("svg",d({width:u,height:c},(0,i.default)(h),{viewBox:"0 0 20 20"}),f("path",{fill:v,className:(0,o.default)(_,(t={},t[l.default.hidden]=m,t)),fillRule:"evenodd",clipRule:"evenodd",d:"M12.0002 0.662583V5.40204C12.0002 6.83974 13.1605 7.99981 14.5986 7.99981H19.3393C19.9245 7.99981 20.222 7.29584 19.8055 6.8794L13.1209 0.196569C12.7043 -0.219868 12.0002 0.0676718 12.0002 0.662583ZM14.5759 10.0282C12.0336 10.0282 9.96986 7.96441 9.96986 5.42209V0.0583083H1.99397C0.897287 0.0583083 0 0.955595 0 2.05228V18.0041C0 19.1007 0.897287 19.998 1.99397 19.998H17.9457C19.0424 19.998 19.9397 19.1007 19.9397 18.0041V10.0282H14.5759ZM11.9998 12.2201C11.9998 13.3245 11.1046 14.2198 10.0002 14.2198C8.8958 14.2198 8.00052 13.3245 8.00052 12.2201H6.66742C6.66742 14.0607 8.15955 15.5529 10.0002 15.5529C11.8408 15.5529 13.3329 14.0607 13.3329 12.2201H11.9998ZM4.44559 13.331C4.44559 13.9446 3.94821 14.442 3.33467 14.442C2.72112 14.442 2.22375 13.9446 2.22375 13.331C2.22375 12.7175 2.72112 12.2201 3.33467 12.2201C3.94821 12.2201 4.44559 12.7175 4.44559 13.331ZM16.6657 14.442C17.2793 14.442 17.7766 13.9446 17.7766 13.331C17.7766 12.7175 17.2793 12.2201 16.6657 12.2201C16.0522 12.2201 15.5548 12.7175 15.5548 13.331C15.5548 13.9446 16.0522 14.442 16.6657 14.442Z"}),f("path",{fill:v,className:(0,o.default)(_,(n={},n[l.default.hidden]=!m,n)),fillRule:"evenodd",clipRule:"evenodd",d:"M12.0002 0.662583V5.40204C12.0002 6.83974 13.1605 7.99981 14.5986 7.99981H19.3393C19.9245 7.99981 20.222 7.29584 19.8055 6.8794L13.1209 0.196569C12.7043 -0.219868 12.0002 0.0676718 12.0002 0.662583ZM14.5759 10.0282C12.0336 10.0282 9.96986 7.96441 9.96986 5.42209V0.0583083H1.99397C0.897287 0.0583083 0 0.955595 0 2.05228V18.0041C0 19.1007 0.897287 19.998 1.99397 19.998H17.9457C19.0424 19.998 19.9397 19.1007 19.9397 18.0041V10.0282H14.5759ZM12 13H11.2H8.8H8C8 14.1046 8.89543 15 10 15C11.1046 15 12 14.1046 12 13ZM17.7766 13.331C17.7766 13.9446 17.2793 14.442 16.6657 14.442C16.0522 14.442 15.5548 13.9446 15.5548 13.331C15.5548 12.7175 16.0522 12.2201 16.6657 12.2201C17.2793 12.2201 17.7766 12.7175 17.7766 13.331ZM2 12.2361L2.53532 11L5.62492 12.7835C5.79161 12.8797 5.79161 13.1203 5.62492 13.2165L2.53532 15L2 13.7639L3.32339 13L2 12.2361Z"}))}c.displayName="Sticker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(28)),o=l(n(2)),i=n(8561);n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=!0,d=new Set;function f(){a.default.set("SpellcheckStore",{enabled:s,learnedWords:d})}var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var o=r.prototype;return o.initialize=function(){var e=a.default.get("SpellcheckStore");null!=e&&(s=e.enabled,d=new Set(e.learnedWords),(0,i.setEnabled)(s),(0,i.setLearnedWords)(d))},o.isEnabled=function(){return s},r}(r.default.Store))(o.default,{SPELLCHECK_TOGGLE:function(e){return s=!s,(0,i.setEnabled)(s),void f()},SPELLCHECK_LEARN_WORD:function(e){var t=e.word;d.add(t.toLocaleLowerCase()),(0,i.setLearnedWords)(d),f()},I18N_LOAD_SUCCESS:function(e){var t=e.locale;(0,i.setAppLocale)(t)}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=v(n(0)),o=n(389),i=v(n(8253)),l=c(n(8630)),u=c(n(8631)),s=c(n(16)),d=c(n(43)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.text,n=e.target,r=e.onHeightUpdate,c=e.onSelect,p=a.useCallback((function(){(0,o.closeContextMenu)(),n instanceof HTMLElement&&n.focus()}),[n]),v=(0,u.default)({text:t,target:n,onHeightUpdate:r}),m=v[0],_=v[1],h=(0,l.default)();if(!s.default.embedded)return null;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return null;var E=""!==t?[y(i.MenuItem,{id:"copy",label:f.default.Messages.COPY,hint:s.default.isOSX()?"⌘C":"Ctrl+C",action:function(){return d.default.copy(t)}}),y(i.MenuItem,{id:"cut",label:f.default.Messages.CUT,hint:s.default.isOSX()?"⌘X":"Ctrl+X",action:function(){return setTimeout((function(){return d.default.cut()}),0)}})]:null;return y(i.default,{navId:"textarea-context",onClose:p,"aria-label":f.default.Messages.TEXTAREA_ACTIONS_MENU_LABEL,onSelect:c},void 0,y(i.MenuGroup,{},void 0,h),y(i.MenuGroup,{},void 0,m),y(i.MenuGroup,{},void 0,_),y(i.MenuGroup,{},void 0,E,y(i.MenuItem,{id:"paste",label:f.default.Messages.PASTE,hint:s.default.isOSX()?"⌘V":"Ctrl+V",action:function(){return setTimeout((function(){return d.default.paste()}),0)}})))}m.displayName="NativeTextAreaContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8742),i=f(n(8560)),l=n(8253),u=f(n(13)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){var e=(0,a.useStateFromStores)([i.default],(function(){return i.default.expressionSuggestionsEnabled}));return p(l.MenuCheckboxItem,{id:"sticker-suggestions",label:d.default.Messages.AUTO_SUGGEST_STICKERS,checked:e,action:function(){u.default.track(s.AnalyticEvents.STICKER_SUGGESTIONS_ENABLED_TOGGLED,{enabled:!e,location:{object:s.AnalyticsObjects.CONTEXT_MENU}}),(0,o.toggleExpressionSuggestionsEnabled)()}})}v.displayName="useExpressionSuggestionItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.text,n=void 0===t?"":t,r=e.target,p=(0,o.useStateFromStores)([u.default],(function(){return u.default.isEnabled()})),v=a.useRef(m({},e,{spellcheckEnabled:p}));v.current=m({},e,{spellcheckEnabled:p});var _=a.useRef(!1),h=a.useState(!1),E=h[0],g=h[1],S=a.useState([]),O=S[0],I=S[1],T=a.useCallback((function(){var e=v.current,t=e.spellcheckEnabled,n=e.text,r=e.onHeightUpdate;t&&(0,d.isSupported)()&&Promise.all([(0,d.isMisspelled)(n,!0),(0,d.getCorrections)(n,!0)]).then((function(e){var t=e[0],n=e[1];_.current&&(g(t),I(n),r())}))}),[]),C=a.useCallback((function(){if(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement){var e=r.selectionStart,t=r.selectionEnd,n=r.value;r.value="",r.value=n,"email"!==r.type&&(r.selectionStart=e,r.selectionEnd=t)}}),[r]);if(a.useEffect((function(){return(0,d.addResultListener)(T),_.current=!0,function(){_.current=!1,(0,d.removeResultListener)(T)}}),[T]),a.useEffect((function(){T()}),[n,p,T]),!(0,d.isSupported)())return[null,null];var b=O.map((function(e,t){return y(l.MenuItem,{id:"correction-"+t,label:e,action:function(){(0,d.replaceWithCorrection)(e),r.focus()}})})),M=a.createElement(a.Fragment,null,E?y(l.MenuItem,{id:"add-to-dictionary",label:c.default.Messages.ADD_TO_DICTIONARY,action:function(){(0,i.learnWord)(n),C()}}):null,y(l.MenuCheckboxItem,{id:"spellcheck",label:c.default.Messages.SPELLCHECK,checked:p,action:function(){(0,i.toggleSpellcheck)(),C()}}),p?y(l.MenuItem,{id:"languages",label:c.default.Messages.LANGUAGES,action:function(){return window.open(s.default.getArticleURL(f.HelpdeskArticles.SPELLCHECK))}}):null);return[b,M]};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(8873),l=n(8253),u=p(n(8628)),s=p(n(93)),d=n(8561),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!l.default.embedded||null==e||(t=e,n=new URL(t),r=h(t),"https://media.discordapp.net"!==n.origin&&"https://cdn.discordapp.com"!==n.origin||t.startsWith("https://media.discordapp.net/stickers")||null==r||!m.has(r)))return null;var t,n,r;var a=function(e){var t=new URL(e);return"https://cdn.discordapp.com"===t.origin?e:"https://cdn.discordapp.com"+t.pathname}(e),u=function(){var e=y(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.default.saveImage(a);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),g(d.default.Messages.ERROR_SAVING_IMAGE,e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),f=function(){var e=y(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.default.copyImage(a);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),g(d.default.Messages.ERROR_COPYING_IMAGE,e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}();return l.default.isLinux()&&(0,i.getElectronVersion)()<7?null:[s.default.canCopyImage()&&E(e)?p(o.MenuItem,{id:"copy-image",label:d.default.Messages.COPY_IMAGE_MENU_ITEM,action:f},"copy-image"):null,p(o.MenuItem,{id:"save-image",label:d.default.Messages.SAVE_IMAGE_MENU_ITEM,action:u},"save-image")]};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(154)),o=n(8253),i=n(1179),l=f(n(16)),u=f(n(164)),s=f(n(43)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))}}var m=new Set(["jpg","jpeg","png","webp","gif","tiff","bmp"]),_=new Set(["jpg","jpeg","png"]),h=function(e){var t;return null===(t=new URL(e).pathname.split(".").pop())||void 0===t?void 0:t.toLowerCase()};function E(e){var t=h(e);return null!=t&&_.has(t)}function g(e,t){a.default.show({title:d.default.Messages.ERROR,body:e}),u.default.captureException(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NotificationTypes=void 0;var r,a,o=y(n(0)),i=p(n(9)),l=n(122),u=p(n(29)),s=p(n(8883)),d=p(n(8884)),f=y(n(248)),c=p(n(7537));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}t.NotificationTypes=a,function(e){e[e.UPDATE=0]="UPDATE",e[e.NEW=1]="NEW"}(a||(t.NotificationTypes=a={}));var h={config:{friction:26,tension:700,mass:1},initial:{scale:1,opacity:1},from:{scale:.6,opacity:0},enter:{scale:1,opacity:1},leave:{scale:.6,opacity:0}};function E(e){var t,n,r=e.tabIndex,a=e.className,o=e.iconClassName,p=e.icon,v=e.children,y=e.onClick,E=e.isActive,g=e.onMouseEnter,S=e.onMouseLeave,O=e.onFocus,I=e.onBlur,T=e.pulse,C=e.sparkle,b=e.notification,M=e.label,N=(0,l.useTransition)(null!=v,_({},h,{keys:function(e){return e?"children":"icon"}})),A=function(e){var t=e.component;return null!=b?m("div",{className:c.default.buttonContent},void 0,m(f.default,{className:c.default.iconMask,mask:f.MaskIDs.CHAT_INPUT_BUTTON_NOTIFICATION,width:24,height:24},void 0,t),m("span",{className:c.default.notificationDot})):t};return m(u.default,{look:u.default.Looks.BLANK,size:u.default.Sizes.NONE,"aria-label":M,tabIndex:r,className:(0,i.default)((t={},t[c.default.active]=E,t)),innerClassName:(0,i.default)(c.default.button,a,(n={},n[c.default.pulseButton]=T,n)),onClick:y,onMouseEnter:g,onMouseLeave:S,onFocus:O,onBlur:I,focusProps:{offset:{top:4,bottom:4}}},void 0,N((function(e,t,n){var r,a=n.key;return t?m(l.animated.div,{style:e,className:c.default.buttonWrapper,id:a},a,A({component:v})):null!=p?m(l.animated.div,{style:e,className:c.default.buttonWrapper,id:a},a,A({component:m(p,{className:(0,i.default)(c.default.icon,o,(r={},r[c.default.pulseIcon]=T,r))})})):void 0})),C&&m("div",{className:c.default.sparkleContainer},void 0,m(d.default,{className:c.default.sparkleStar}),m(s.default,{className:c.default.sparklePlus})))}E.displayName="ChannelTextAreaButton";var g=o.memo(E);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NO_PAYMENT_SOURCE=void 0;var r=i(n(3)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}t.NO_PAYMENT_SOURCE="no_payment_source";var d,f,c=null,p=null,v=null,y=null,m=null,_={},h=null,E=!1,g=null,S=!1,O=!1,I=!1,T=!1,C=null;function b(e){null!=d&&null!=h?d(h):null!=f&&f(e),d=null,f=null}var M=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a,i,s,d=r.prototype;return d.getPricesForSku=function(e){return _[e]},d.isOpen=function(){var e=__OVERLAY__?o.AppContext.OVERLAY:o.AppContext.APP;return C===e&&I},a=r,(i=[{key:"isPurchasingSKU",get:function(){return E}},{key:"forceConfirmationStepOnMount",get:function(){return S}},{key:"error",get:function(){return g}},{key:"skuId",get:function(){return c}},{key:"applicationId",get:function(){return v}},{key:"analyticsLocation",get:function(){return y}},{key:"promotionId",get:function(){return m}},{key:"isIAP",get:function(){return O}},{key:"giftCode",get:function(){return p}},{key:"isGift",get:function(){return T}}])&&l(a.prototype,i),s&&l(a,s),r}(r.default.Store))(a.default,{SKU_PURCHASE_MODAL_OPEN:function(e){b(),c=e.skuId,v=e.applicationId,O=e.isIAP,y=e.analyticsLocation,C=e.context,T=e.isGift,I=!0,S=!1,d=e.resolve,f=e.reject,g=null,h=null,m=e.promotionId},SKU_PURCHASE_MODAL_CLOSE:function(e){var t=e.error;I=!1,C=null,b(t)},SKU_PURCHASE_PREVIEW_FETCH_SUCCESS:function(e){var t,n,r=e.skuId,a=e.paymentSourceId,o=e.price;_=s({},_,((n={})[r]=s({},_[r],((t={})[null!=a?a:"no_payment_source"]=o,t)),n))},SKU_PURCHASE_START:function(e){E=!0},SKU_PURCHASE_SUCCESS:function(e){var t=e.entitlements,n=e.giftCode;E=!1,h=t,p=n},SKU_PURCHASE_FAIL:function(e){var t=e.error;E=!1,g=t},SKU_PURCHASE_SHOW_CONFIRMATION_STEP:function(e){S=!0},SKU_PURCHASE_CLEAR_ERROR:function(e){g=null},SKU_PURCHASE_UPDATE_IS_GIFT:function(e){T=e.isGift},OVERLAY_SET_INPUT_LOCKED:function(e){if(!e.locked||null==C)return!1;I=!1,C=null,b()},GIFT_CODE_CREATE:function(e){var t=e.giftCode;if(0!==t.uses||t.sku_id!==c)return!1;p=t.code}});t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=s(n(9)),l=n(1),u=s(n(7548));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.LARGE="large"}(a||(a={}));var p=function(e){var t,n,r,s,d=e.className,p=e.percent,v=e.size,y=void 0===v?a.SMALL:v,m=e.foregroundColor,_=void 0===m?l.Colors.BRAND:m,h=e.backgroundColor,E=void 0===h?"var(--background-modifier-active)":h,g=e.foregroundGradientColor,S=e.animate,O=void 0===S||S,I=null!=p?p:0;return s=null!=g?{background:"linear-gradient(to right, "+g[0]+", "+g[1]+")"}:{backgroundColor:_},f("div",{className:(0,i.default)(d,u.default.progress,u.default[y]),style:{backgroundColor:E}},void 0,"indeterminate"!==I&&"number"==typeof I?f("div",{className:(0,i.default)(u.default.progressBar,u.default[y],(t={},t[u.default.animating]=O,t)),style:c({transform:"translate3d("+(Math.min(Math.max(0,I),100)-100)+"%, 0, 0)"},s)}):f(o.Fragment,{},void 0,f("div",{className:(0,i.default)(u.default.indeterminateBar1,u.default[y],(n={},n[u.default.animating]=O,n)),style:s}),f("div",{className:(0,i.default)(u.default.indeterminateBar2,u.default[y],(r={},r[u.default.animating]=O,r)),style:s})))};p.displayName="Progress",p.Sizes=a,p.INDETERMINATE="indeterminate";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InLibraryPrice=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=p(n(9)),u=p(n(8440)),s=p(n(8508)),d=p(n(5686)),f=p(n(6)),c=p(n(7371));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e[e.DIRECTORY_HERO=1]="DIRECTORY_HERO",e[e.DIRECTORY_TILE=2]="DIRECTORY_TILE",e[e.DIRECTORY_SEARCH=3]="DIRECTORY_SEARCH",e[e.LISTING=4]="LISTING",e[e.EMBED=5]="EMBED"}(a||(a={})),function(e){e[e.IN_LIBRARY=1]="IN_LIBRARY",e[e.ON_SALE=2]="ON_SALE",e[e.PREMIUM=3]="PREMIUM",e[e.DEFAULT=4]="DEFAULT",e[e.ENTITLEMENT_BRANCH=5]="ENTITLEMENT_BRANCH"}(o||(o={}));var _=function(e){var t=e.className;return m("div",{className:(0,l.default)(c.default.row,t)},void 0,m(s.default,{className:c.default.icon}),f.default.Messages.APPLICATION_STORE_IN_LIBRARY)};t.InLibraryPrice=_,_.displayName="InLibraryPrice";var h=function(e){var t=e.sku,n=e.className;return m("div",{className:(0,l.default)(c.default.row,n)},void 0,m(d.default,{className:c.default.icon}),(0,u.default)(t))};h.displayName="PremiumPrice";var E=function(e){var t=e.sku,n=e.className;return m("div",{className:(0,l.default)(c.default.salePercentage,n)},void 0,t.getDisplaySalePercentage())};E.displayName="SalePercent";var g=function(e){var t=e.sku,n=e.className;return m("div",{className:(0,l.default)(c.default.originalAmount,n)},void 0,(0,u.default)(t,!1))};g.displayName="OriginalAmount";var S=function(e){var t=e.sku;return m("div",{className:e.className},void 0,(0,u.default)(t))};S.displayName="Price";var O=function(e){var t=e.sku,n=e.className;return m("div",{className:(0,l.default)(c.default.row,n)},void 0,m(E,{sku:t}),m(g,{sku:t}),m(S,{sku:t}))};O.displayName="InlineSale";var I=function(e){return m("div",{className:e.className},void 0,f.default.Messages.APPLICATION_STORE_FREE)};I.displayName="EntitlementBranchPrice";var T=m(I,{}),C=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var u=r.prototype;return u.getState=function(){var e=this.props,t=e.inLibrary,n=e.sku;return e.hasEntitlementBranch?o.ENTITLEMENT_BRANCH:t?o.IN_LIBRARY:n.available?n.premium?o.PREMIUM:n.isOnSale?o.ON_SALE:null!=n.getPrice()?o.DEFAULT:null:o.DEFAULT},u.renderGeneric=function(e,t){var n=this.props,r=n.className,a=n.sku;switch(e){case o.ENTITLEMENT_BRANCH:return m(I,{className:(0,l.default)(t,r)});case o.IN_LIBRARY:return m(_,{className:(0,l.default)(t,r)});case o.PREMIUM:return m(h,{sku:a,className:(0,l.default)(t,r)});case o.ON_SALE:return m(O,{sku:a,className:(0,l.default)(t,r)});default:return m(S,{className:(0,l.default)(t,r),sku:a})}},u.renderDirectoryHero=function(e){var t=this.props,n=t.className,r=t.sku;switch(e){case o.ENTITLEMENT_BRANCH:return m(I,{className:(0,l.default)(n)});case o.PREMIUM:return m(h,{sku:r,className:(0,l.default)(c.default.directoryHeroPricePremium,n)});case o.ON_SALE:return m(O,{sku:r,className:(0,l.default)(c.default.directoryHeroPrice,n)});default:return m(S,{className:(0,l.default)(c.default.directoryHeroPrice,n),sku:r})}},u.renderListing=function(e){var t,n=this.props,r=n.className,a=n.sku;switch(e){case o.ENTITLEMENT_BRANCH:t=T;break;case o.ON_SALE:t=m(i.Fragment,{},void 0,m("div",{className:c.default.row},void 0,m(S,{sku:a}),m(E,{sku:a})),m(g,{sku:a}));break;default:t=m(S,{sku:a})}return m("div",{className:(0,l.default)(c.default.listingPrice,r)},void 0,t)},u.render=function(){var e=this.getState();if(null==e)return null;switch(this.props.type){case a.DIRECTORY_HERO:return this.renderDirectoryHero(e);case a.DIRECTORY_TILE:return this.renderGeneric(e,c.default.directoryTilePrice);case a.DIRECTORY_SEARCH:return this.renderGeneric(e,c.default.directorySearchPrice);case a.LISTING:return this.renderListing(e);case a.EMBED:return this.renderGeneric(e,c.default.embedPrice);default:throw new Error("Invalid Price Unit Type")}},r}(i.PureComponent);C.displayName="PriceUnit",C.Types=a;var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIsComponentDisabled=t.createComponents=void 0;var r=_(n(8)),a=_(n(1288)),o=n(286),i=n(8611),l=_(n(182)),u=_(n(10)),s=_(n(56)),d=_(n(1219)),f=_(n(12)),c=_(n(150)),p=n(8638),v=_(n(8898)),y=n(9538),m=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function h(){return(h=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}).apply(this,arguments)}var E=function(e,t){return{id:e.id,name:e.name,animated:e.animated,src:t&&null!=e.id?c.default.getEmojiURL({id:e.id,animated:e.animated||!1}):void 0}},g=function(e,t,n){var a=p.ActionComponentState.NORMAL;return null!=e&&e.state!==i.InteractionState.FAILED&&(e.data.interactionType===o.InteractionTypes.MESSAGE_COMPONENT&&r.default.isEqual(e.data.indices,n)?a=p.ActionComponentState.LOADING:S(t)&&(a=p.ActionComponentState.DISABLED)),a};t.createComponents=function e(t,n,a,l,u){void 0===l&&(l=[]);var s=(null==a?void 0:a.data.interactionType)===o.InteractionTypes.MESSAGE_COMPONENT&&(null==a?void 0:a.state)===i.InteractionState.FAILED?a.data.indices:null,d=t.applicationId||t.author.id;return n.map((function(n,i){var f,c;if(!function(e){switch(e){case o.ComponentType.ACTION_ROW:case o.ComponentType.BUTTON:return!0;case o.ComponentType.SELECT:return y.SelectComponentExperiment.getCurrentConfig({}).enabled}}(n.type))return null;var p=l.concat([i]);switch(n.type){case o.ComponentType.BUTTON:var _=null!=n.emoji?E(n.emoji,u):void 0;return{type:o.ComponentType.BUTTON,customId:n.custom_id,hash:n.hash,style:n.style,disabled:n.disabled,url:n.url,label:n.label,emoji:_,indices:p,state:g(a,n,p),applicationId:d};case o.ComponentType.ACTION_ROW:var S,I,T=null!=n.components?e(t,n.components,a,l.concat(i),u):void 0;if(null!=s&&r.default.isEqual(s.slice(0,s.length-1),p))S=null!==(I=t.interactionError)&&void 0!==I?I:function(e){return 429===(null==e?void 0:e.errorCode)?m.default.Messages.INTERACTION_RATE_LIMITED:m.default.Messages.APPLICATION_COMMAND_FAILED}(a);return{type:o.ComponentType.ACTION_ROW,components:T,errorText:S};case o.ComponentType.SELECT:var C=null===(f=v.default.getInteractionComponentState(t.id,p))||void 0===f?void 0:f.selectedOptions,b={type:o.ComponentType.SELECT,customId:n.custom_id,disabled:n.disabled,hash:n.hash,options:n.options.map((function(e){return{label:e.label,value:e.value,default:e.default,description:e.description,emoji:null!=e.emoji?E(e.emoji,u):void 0}})),placeholder:null!==(c=n.placeholder)&&void 0!==c?c:m.default.Messages.MESSAGE_SELECT_COMPONENT_DEFAULT_PLACEHOLDER,minValues:n.min_values,maxValues:n.max_values,indices:p,selectedOptions:C,state:g(a,n,p),applicationId:d};return h({},b,{accessibilityLabel:O(b,C)})}})).filter((function(e){return null!=e}))};var S=function(e){switch(e.type){case o.ComponentType.BUTTON:return e.style!==o.ButtonStyle.LINK;case o.ComponentType.SELECT:return!0;case o.ComponentType.ACTION_ROW:return!1}},O=function(e,t){if(t&&t.length>0){var n=t.map((function(t){return e.options[t].label}));return m.default.Messages.SELECT_ACCESSIBILITY_DESC_WITH_SELECTION.format({selections:n.join(",")})}return m.default.Messages.SELECT_ACCESSIBILITY_DESC.format({placeholder:e.placeholder})};t.useIsComponentDisabled=function(e){var t=u.default.getChannel(e),n=(0,a.default)([d.default],(function(){return null==(null==t?void 0:t.guild_id)||d.default.canChatInGuild(t.guild_id)}),[t]),r=(0,a.default)([l.default],(function(){return null!=(null==t?void 0:t.guild_id)&&l.default.isLurking(t.guild_id)}),[t]),o=(0,a.default)([s.default,f.default],(function(){var e,n,r=f.default.getCurrentUser();return null!==(e=null!=(null==t?void 0:t.guild_id)&&null!=r?null===(n=s.default.getMember(null==t?void 0:t.guild_id,r.id))||void 0===n?void 0:n.isPending:null)&&void 0!==e&&e}));return!(n&&!r&&!o)}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionComponentState=void 0,t.ActionComponentState=r,function(e){e[e.NORMAL=0]="NORMAL",e[e.LOADING=1]="LOADING",e[e.DISABLED=2]="DISABLED"}(r||(t.ActionComponentState=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n;return(0,a.useStateFromStores)([i.default],(function(){return i.default.hasJoined(e.id)}))?f(o.MenuItem,{id:"leave-thread",label:u.default.Messages.LEAVE_THREAD,action:function(){return l.default.leaveThread(e,t)}}):(null===(n=e.threadMetadata)||void 0===n?void 0:n.archived)?null:f(o.MenuItem,{id:"join-thread",label:u.default.Messages.JOIN_THREAD,action:function(){return l.default.joinThread(e,t)}})};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=s(n(204)),l=s(n(8265)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(8641)),o=i(n(682));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e){var t=(0,o.default)(e.message);return r.createElement(a.default,u({},e,{author:t}))}s.displayName="Username"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.author,r=e.message,l=e.userOverride,u=e.compact,d=void 0!==u&&u,y=e.withMentionPrefix,m=void 0!==y&&y,g=e.showPopout,S=void 0!==g&&g,O=e.className,I=e.hideTag,T=e.onClick,C=e.onContextMenu,b=e.onPopoutRequestClose,M=e.renderPopout,N=a.useContext(i.GuildIDContext),A=m?"@":"",P=n.nick,R=n.colorString,L={className:v.default.username,style:R?{color:R}:void 0,onClick:T,onContextMenu:C,children:A+P};t=null!=M&&null!=S?h(c.default,{preload:function(){var e=null!=l?l:r.author;return e.bot?Promise.resolve():(0,s.default)(e.id,null!=n.guildMemberAvatar&&null!=N?(0,p.getGuildMemberAvatarURLSimple)({guildId:N,userId:e.id,avatar:n.guildMemberAvatar}):e.getAvatarURL(N))},renderPopout:M,shouldShow:S,position:c.default.Positions.RIGHT,onRequestClose:b},void 0,(function(e){e.onClick;var t=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick"]);return a.createElement(f.default,_({tag:"span"},t,L,{className:(0,o.default)(L.className,v.default.clickable,O)}))})):a.createElement(f.default,_({},L,{className:(0,o.default)(L.className,O)}));return a.createElement(a.Fragment,null,!I&&d?a.createElement(a.Fragment,null," ",E(r,d,l)," "):null,t,I||d?null:E(r,d,l))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(5943),l=y(n(8642)),u=n(8643),s=y(n(8264)),d=y(n(1222)),f=y(n(61)),c=y(n(278)),p=n(150),v=y(n(7341));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t,n){var r,a=null!=n?n:null==e?void 0:e.author;return(null==e?void 0:e.isSystemDM())?r=d.default.Types.SYSTEM_DM:null!=e&&(0,l.default)(e)?r=(0,u.isPublicSystemMessage)(e)?d.default.Types.OFFICIAL:d.default.Types.SERVER:(null==a?void 0:a.bot)&&(r=d.default.Types.BOT),null!=r?h(d.default,{className:t?v.default.botTagCompact:v.default.botTagCozy,type:r,verified:null==a?void 0:a.isVerifiedBot(),useRemSizes:!0}):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.type===r.MessageTypes.DEFAULT&&null!=e.messageReference};var r=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPublicSystemMessage=function(e){return(0,r.default)(e)&&e.messageReference.guild_id===a.PUBLIC_GUILD_ANNOUNCEMENTS_GUILD_ID||null!=e.author&&e.author.id===a.PUBLIC_GUILD_UPDATES_WEBHOOK_USER_ID},t.getPublicSystemMessageAvatar=function(){return o.default};var r=i(n(8642)),a=n(8474),o=i(n(9549));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e.match(i))return o.LATIN24;if(e.length<=5)return o.LATIN12;return o.ASIAN};var r,a=(r=n(7341))&&r.__esModule?r:{default:r};var o={LATIN12:a.default.latin12CompactTimeStamp,LATIN24:a.default.latin24CompactTimeStamp,ASIAN:a.default.asianCompactTimeStamp},i=/(AM|PM)$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){var t=e.channel,n=e.canChat,r=e.renderReactions,a=e.canAddNewReactions,o=e.isLurking,i=t.isPrivate(),l=t.isSystemDM(),u=t.isArchivedThread(),s=(n||i)&&!u;return{disableReactionReads:!r,disableReactionCreates:o||!s||!((!0===a||i)&&!l&&!u),disableReactionUpdates:o||!s}};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.useStateFromStoresArray)([o.default,a.default],(function(){var t=Object.entries(a.default.getVoiceStatesForChannel(e)).map((function(e){return{userId:e[0],sessionId:e[1].sessionId}})),n=[],r=o.default.getSelfEmbeddedActivityForChannel(e);return null!=r&&n.push(r),t.forEach((function(e){var t=e.userId,r=e.sessionId,a=o.default.getEmbeddedActivitiesForUser(t,r);n.push.apply(n,a)})),n}),[e])};var r=n(3),a=i(n(80)),o=i(n(294));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(8)),a=d(n(3)),o=d(n(2)),i=d(n(11)),l=d(n(70)),u=d(n(479)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){return(c=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}).apply(this,arguments)}function p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y={},m={};function _(e,t){return(y[e]||{})[t]||null}function h(e,t){var n=_(e,t);if(null!=n){var a=y[e];delete a[t],r.default.isEmpty(a)&&delete y[e];var o=m[n];null!=o&&(o.delete(e),0===o.size&&delete m[n])}}function E(e,t,n,r){var a=n.find((function(e){return null!=e.party&&e.party.id})),o=null!=a&&null!=a.party?a.party.id:null,i=_(t,e);if(null==o||r===s.StatusTypes.OFFLINE)return null!=i&&void h(t,e);if(null!=i){if(i===o)return!1;h(t,e)}!function(e,t,n){var r=y[e];if(null==r&&(r=y[e]={}),r[t]=n,!l.default.isBlocked(e)){var a=m[n]||new Set;m[n]=a,a.add(e)}}(t,e,o)}function g(e){for(var t,n=e.guild,r=!1,a=p(n.presences);!(t=a()).done;){var o=t.value,i=o.user,l=o.status,u=o.activities;!1!==E(n.id,i.id,u,l)&&(r=!0)}return r}function S(e,t){var n=!1;return t.forEach((function(t){null!=t&&E(e,t.user.id,t.activities,t.status)&&(n=!0)})),n}function O(){var e=i.default.getId(),t=u.default.getActivities();return E(s.ME,e,t)}var I=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.initialize=function(){this.syncWith([u.default],O),this.waitFor(u.default,l.default)},a.getParty=function(e){return null!=e&&null!=m[e]?m[e]:null},a.getUserParties=function(){return y},a.getParties=function(){return m},r}(a.default.Store))(o.default,{CONNECTION_OPEN_SUPPLEMENTAL:function(e){for(var t,n=e.guilds,r=!1,a=p(e.presences);!(t=a()).done;){var o=t.value,i=o.user,l=o.status,u=o.activities;null!=i&&!1!==E(s.ME,i.id,u,l)&&(r=!0)}for(var d,f=p(n);!(d=f()).done;){!1!==g({guild:d.value})&&(r=!0)}return r},OVERLAY_INITIALIZE:function(e){var t=e.parties,n=e.userParties;m={},y=c({},n),Object.keys(t).forEach((function(e){return m[e]=new Set(t[e])}))},GUILD_CREATE:g,PRESENCES_REPLACE:function(e){for(var t,n=!1,r=p(e.presences);!(t=r()).done;){var a=t.value,o=a.user,i=a.activities;null!=o&&!1!==E(s.ME,o.id,i)&&(n=!0)}return n},PRESENCE_UPDATE:function(e){var t=e.guildId,n=e.user,r=e.status,a=e.activities;return E(t||s.ME,n.id,a,r)},THREAD_MEMBER_LIST_UPDATE:function(e){return S(e.guildId,e.members.map((function(e){return e.presence})))},THREAD_MEMBERS_UPDATE:function(e){var t=e.guildId,n=e.addedMembers;return null!=n&&S(t,n.map((function(e){return e.presence})))},RELATIONSHIP_ADD:function(e){var t=e.relationship;if(!l.default.isBlocked(t.id))return!1;var n=y[t.id];if(null==n)return!1;for(var a,o=p(r.default.values(n));!(a=o()).done;){var i=a.value,u=m[i];null!=u&&u.delete(t.id)}},RELATIONSHIP_REMOVE:function(e){var t=e.relationship,n=y[t.id];if(null==n)return!1;for(var a,o=p(r.default.values(n));!(a=o()).done;){var i=a.value,l=m[i];null!=l&&l.add(t.id)}}});t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setShowWarning=t.setHasUnsubmittedChanges=t.useMemberVerificationFormNoticeStore=void 0;var r,a=(r=n(251))&&r.__esModule?r:{default:r},o=n(121),i=n(1);var l=Object.freeze({hasUnsubmittedChanges:!1,shouldShowWarning:!1}),u=(0,a.default)((function(e){return l}));t.useMemberVerificationFormNoticeStore=u;t.setHasUnsubmittedChanges=function(e){u.setState({hasUnsubmittedChanges:e})};t.setShowWarning=function(e){u.setState({shouldShowWarning:e}),e&&o.ComponentDispatch.dispatch(i.ComponentActions.EMPHASIZE_NOTICE)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(5962))&&r.__esModule?r:{default:r},l=n(57);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.SVG="svg",e.CANVAS="canvas",e.HYBRID="hybrid"}(a||(a={}));var d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).animationRef=o.createRef(),t.delayTimeout=new l.Timeout,t.handleComplete=function(){var e=t.props.onComplete;null!=e&&e()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this,t=this.props,n=t.importData,r=t.loop,a=t.autoplay,o=t.delay,l=t.renderer,u=t.shouldAnimate;n().then((function(t){null!=e.animationRef.current&&(e.animation=i.default.loadAnimation({container:e.animationRef.current,renderer:l,loop:r,autoplay:a&&null==o&&u,animationData:t}),null!=o&&e.delayTimeout.start(o,(function(){return e.animation.play()})),e.playOrPauseAnimation(),e.animation.addEventListener("complete",e.handleComplete))}))},a.componentDidUpdate=function(){this.playOrPauseAnimation()},a.componentWillUnmount=function(){null!=this.animation&&this.animation.destroy(),this.delayTimeout.stop()},a.playOrPauseAnimation=function(){this.animation&&(this.props.shouldAnimate?this.animation.play():this.props.shouldAnimate||this.animation.pause())},a.render=function(){return o.createElement("div",{className:this.props.className,ref:this.animationRef})},r}(o.Component);d.displayName="LottieAnimation",d.defaultProps={loop:!0,autoplay:!0,renderer:"svg",shouldAnimate:!0},d.Renderers=a;var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(29)),i=y(n(467)),l=y(n(153)),u=n(85),s=y(n(476)),d=n(35),f=y(n(47)),c=y(n(24)),p=y(n(6)),v=y(n(7583));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).headerId=(0,u.uid)(),t.state={value:"",error:null,isLoading:!1},t.handleSubmit=function(e){e.preventDefault();var n=t.state.value,r=t.props,a=r.handleSubmit,o=r.onClose,i=r.onError;t.setState({isLoading:!0}),a(n).then((function(){return o()}),(function(e){null!=e.body&&(i&&i(e.body),e.body.password?t.setState({error:e.body.password,isLoading:!1}):e.body.message&&t.setState({error:e.body.message,isLoading:!1}))}))},t.handleCancel=function(){(0,t.props.onClose)()},t.handlePasswordChange=function(e){var n=t.props.onPasswordChange;n&&n(e),t.setState({value:e})},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n),r.prototype.render=function(){var e=this.props,t=e.title,n=e.actionText,r=e.children,u=e.transitionState,y=this.state,m=y.error,h=y.isLoading,E=y.value,g=a.Children.count(r)?_(i.default,{type:i.default.Types.WARNING,className:v.default.card},void 0,_(c.default,{className:v.default.warning,size:c.default.Sizes.SIZE_16},void 0,r)):null;return _(d.ModalRoot,{transitionState:u,"aria-labelledby":this.headerId},void 0,_("form",{onSubmit:this.handleSubmit},void 0,_(d.ModalHeader,{separator:!1,id:this.headerId},void 0,_(f.default,{tag:f.default.Tags.H2,size:f.default.Sizes.SIZE_20},void 0,t)),_(d.ModalContent,{},void 0,g,_(s.default,{title:p.default.Messages.FORM_LABEL_PASSWORD,className:v.default.spacing},void 0,_(l.default,{type:"password",autoComplete:"off",autoFocus:!0,value:E,onChange:this.handlePasswordChange}),m?_(c.default,{size:c.default.Sizes.SIZE_12,color:c.default.Colors.STATUS_RED,className:v.default.error},void 0," ",m," "):null)),_(d.ModalFooter,{},void 0,_(o.default,{type:"submit",disabled:h},void 0,n||p.default.Messages.CONFIRM),_(o.default,{onClick:this.handleCancel,look:o.default.Looks.LINK,color:o.default.Colors.PRIMARY},void 0,p.default.Messages.CANCEL))))},r}(a.PureComponent);E.displayName="PasswordConfirm",E.key=function(){return"password-confirm-modal"};var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M12.2512 2.00309C12.1677 2.00104 12.084 2 12 2C6.477 2 2 6.477 2 12C2 17.522 6.477 22 12 22C17.523 22 22 17.522 22 12C22 11.916 21.999 11.8323 21.9969 11.7488C21.3586 11.9128 20.6895 12 20 12C15.5817 12 12 8.41828 12 4C12 3.31052 12.0872 2.6414 12.2512 2.00309ZM10 8C10 6.896 9.104 6 8 6C6.896 6 6 6.896 6 8C6 9.105 6.896 10 8 10C9.104 10 10 9.105 10 8ZM12 19C15.14 19 18 16.617 18 14V13H6V14C6 16.617 8.86 19 12 19Z"}),s("path",{d:"M21 3V0H19V3H16V5H19V8H21V5H24V3H21Z",fill:d}))}d.displayName="AddReaction"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(8515))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e,t){var n=e.message;return l(o.default,{message:n,content:t})}u.displayName="renderMessageContent"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.message,n=e.author,r=e.compact,a=e.animateAvatar,o=e.guildId,l=e.isGroupStart,u=void 0===l||l;return(0,i.default)(t)||!u&&!r?void 0:s(d,{message:t,author:n,guildId:o,compact:r,animate:a})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(8918)),i=l(n(685));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=a.memo(o.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.message,n=e.channel,r=e.compact;return(0,a.default)(t)?u(o.default,{message:t,channel:n,compact:r}):null};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(685)),o=i(n(9590));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeIndex=m,t.default=t.CarouselWithPreview=t.Alignment=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(273)),l=s(n(8299)),u=s(n(7591));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v={tension:7,friction:5,overshootClamping:!0},y={LEFT:"left",CENTER:"center",RIGHT:"right"};function m(e,t){return(e%t+t)%t}t.Alignment=y;var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).animatedIndex=new i.default.Value(t.props.currentIndex),t.animatedAlignmentOffset=new i.default.Value(t.getAlignmentOffset(t.props.align)),t.animatedOpacity=new i.default.Value(1),t.getItemStyle=function(){var e=t.props.itemSize,n=e.width;return{flexBasis:n,marginRight:e.margin,height:e.height,width:n,maxWidth:n}},t.interpolateValueForItem=function(e){return t.animatedIndex.interpolate({inputRange:[e-1,e,e+1],outputRange:[0,1,0],extrapolate:"clamp"})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.componentDidMount=function(){this.animatedIndex.setValue(this.props.currentIndex)},a.componentDidUpdate=function(e){var t=this.props,n=t.align,r=t.animate,a=t.currentIndex,o=t.items,l=t.width,u=m(a,o.length),s=m(e.currentIndex,o.length);u===s&&o.length===e.items.length||this.updateAnimatedIndex(u,s),l!==e.width?this.animatedAlignmentOffset.setValue(this.getAlignmentOffset(n)):!r||n===e.align&&u===s||i.default.spring(this.animatedAlignmentOffset,c({},v,{toValue:this.getAlignmentOffset(n)})).start()},a.getAlignmentOffset=function(e){var t=this.props,n=t.width,r=t.itemSize,a=t.currentIndex,o=t.gutter,i=o*m(a,t.items.length)*2;return e===y.CENTER?(n-r.width)/2+i:e===y.RIGHT?n-r.width-o+i:o+i},a.getCarouselTranslate=function(){var e=this.props,t=e.itemSize;return e.edgeItems*(t.width+t.margin)},a.animateToIndex=function(e,t){var n=this.animatedIndex,r=this.props,a=r.items;r.edgeItems>0&&(0===e&&t===a.length-1?n.setValue(-1):0===t&&e===a.length-1&&a.length>2&&n.setValue(a.length)),i.default.spring(n,c({},v,{toValue:e})).start()},a.updateAnimatedIndex=function(e,t){var n=this.animatedIndex,r=this.animatedOpacity;this.props.animate?this.animateToIndex(e,t):i.default.timing(r,{fromValue:1,toValue:0,duration:100}).start((function(){n.setValue(e),i.default.timing(r,{fromValue:0,toValue:1,duration:100}).start()}))},a.renderSingleItem=function(){var e=this.props,t=e.renderItem,n=e.items,r=e.itemSize,a=e.className;return f("div",{className:(0,o.default)(u.default.singleItemWrapper,u.default.viewport,a)},void 0,f("div",{className:u.default.singleItem,style:{width:r.width,height:r.height}},void 0,t(n[0],0)))},a.renderCarouselItems=function(){var e=this,t=this.animatedIndex,n=this.animatedAlignmentOffset,r=this.animatedOpacity,a=this.props,o=a.renderItem,l=a.items,s=a.itemSize,d=a.edgeItems,c=a.gutter,p=s.margin,v=s.width,y=this.getCarouselTranslate(),m=this.getItemStyle(),_=(d>0?[].concat(l.slice(-d),l,l.slice(0,d)):l).map((function(t,n){return f("div",{style:m,className:u.default.item},n,o(t,n-d,e.interpolateValueForItem(n-d)))}));return f(i.default.div,{className:u.default.carousel,style:{opacity:r,left:i.default.add(t.interpolate({inputRange:[0,1],outputRange:[-y,-p-v-y-c*(l.length-1)]}),n)}},void 0,_)},a.render=function(){var e,t=this.props,n=t.items,r=t.className,a=t.hideOverflow;if(n.length<=0)throw new Error("Carousel has no items");return 1===n.length?this.renderSingleItem():f("div",{className:(0,o.default)((e={},e[u.default.viewport]=a,e),r)},void 0,this.renderCarouselItems())},r}(a.Component);t.CarouselWithPreview=_,_.displayName="CarouselWithPreview",_.defaultProps={animate:!0,edgeItems:2,align:y.CENTER,gutter:0,hideOverflow:!0};var h=(0,l.default)(_);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.tier,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["tier"]);switch(t){case l.PremiumGuildTiers.NONE:case l.PremiumGuildTiers.TIER_1:return r.createElement(a.default,n);case l.PremiumGuildTiers.TIER_2:return r.createElement(o.default,n);case l.PremiumGuildTiers.TIER_3:return r.createElement(i.default,n);default:throw new Error("Not a valid tier type")}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9600)),o=u(n(8865)),i=u(n(9601)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTrackThreadBrowserTab=function(e,t){var n=e?"Active Threads":(null==t?void 0:t.tab)===a.Public?"Public Archived Threads":(null==t?void 0:t.moderatorView)?"All Private Archived Threads":"My Private Archived Threads";o.useEffect((function(){(0,E.trackThreadBrowserTab)(n)}),[n])},t.useActiveThreads=function(e){var t=(0,u.useStateFromStoresArray)([d.default,v.default,s.default],(function(){return(0,i.default)(v.default.getThreadsForGuild(e.guild_id)).values().map((function(e){var t=e.id;return s.default.getChannel(t)})).filter(c.isNotNullish).filter((function(t){return!0===window._THREAD_BROWSER_ALL_CHANNELS||t.parent_id===e.id})).filter((function(e){return d.default.can(l.Permissions.VIEW_CHANNEL,e)})).map((function(e){return e.id})).value()}),[]),n=o.useMemo((function(){return(0,i.default)(t).sort((function(e,t){return p.default.compare(f.default.lastMessageId(e),f.default.lastMessageId(t))})).reverse().value()}),[t]),r=(0,u.useStateFromStores)([m.default],(function(){return i.default.partition(n,(function(e){return m.default.hasJoined(e)}))}),[n],u.statesWillNeverBeEqual),a=r[0],y=r[1];return{joinedThreadIds:a,unjoinedThreadIds:y}},t.useArchivedThreads=function(e,t,n){var r=t===a.Public?h.ArchivedThreadListType.ALL_PUBLIC_THREADS:n?h.ArchivedThreadListType.ALL_PRIVATE_THREADS:h.ArchivedThreadListType.MY_PRIVATE_THREADS,f=o.useCallback((function(t){_.default.loadArchivedThreads(e.guild_id,e.id,r,t)}),[e.id,r,e.guild_id]);o.useEffect((function(){return f()}),[f]);var c=(0,u.useStateFromStoresObject)([y.default],(function(){return{canLoadMore:y.default.canLoadMore,loading:y.default.loading}})),p=c.canLoadMore,v=c.loading;return{threadIds:(0,u.useStateFromStoresArray)([y.default,s.default,d.default],(function(){return(0,i.default)(y.default.getThreads(e.id,r)).filter((function(e){var t=s.default.getChannel(e);return null!=t&&d.default.can(l.Permissions.VIEW_CHANNEL,t)})).value()})),canLoadMore:p,loading:v,loadMore:f}},t.PrivacyTab=t.StatusTab=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=g(n(8)),l=n(92),u=n(3),s=g(n(10)),d=g(n(40)),f=g(n(200)),c=n(48),p=g(n(97)),v=g(n(410)),y=g(n(8886)),m=g(n(204)),_=g(n(8265)),h=n(392),E=n(698);function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}t.StatusTab=r,function(e){e[e.Active=0]="Active",e[e.Archived=1]="Archived"}(r||(t.StatusTab=r={})),t.PrivacyTab=a,function(e){e[e.Public=0]="Public",e[e.Private=1]="Private"}(a||(t.PrivacyTab=a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t===a.Active?A(P,{channel:e}):t===a.AllArchived?A(D,{channel:e}):A(w,{channel:e})},t.RowType=void 0;var r,a,o=N(n(0)),i=b(n(5)),l=n(3),u=N(n(5957)),s=n(8298),d=b(n(8449)),f=b(n(8361)),c=b(n(682)),p=b(n(56)),v=b(n(200)),y=b(n(70)),m=b(n(12)),_=b(n(8287)),h=n(8442),E=b(n(24)),g=N(n(1161)),S=b(n(97)),O=b(n(746)),I=n(698),T=b(n(6)),C=b(n(7375));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e){var t=e.channel,n=(0,l.useStateFromStores)([O.default],(function(){return O.default.getMostRecentMessage(t.id)}));return null==n?A(R,{channel:t}):A(L,{channel:t,message:n})}function R(e){var t=e.channel,n=(0,l.useStateFromStores)([v.default],(function(){return v.default.lastMessageId(t.id)}));return A(E.default,{className:C.default.subtext,size:E.default.Sizes.SIZE_14,color:E.default.Colors.HEADER_SECONDARY},void 0,T.default.Messages.THREAD_BROWSER_NO_RECENT_MESSAGES,"  •  ",(0,I.getTimestampString)(S.default.extractTimestamp(n)))}function L(e){var t,n=e.channel,r=e.message;(0,s.useSubscribeGuildMembers)(((t={})[n.guild_id]=[r.author.id],t));var a=(0,l.useStateFromStores)([m.default],(function(){var e;return null!==(e=m.default.getUser(r.author.id))&&void 0!==e?e:r.author})),i=(0,c.default)(r),d=i.nick,p=i.colorString,v=(0,l.useStateFromStores)([y.default],(function(){return y.default.isBlocked(r.author.id)})),_=o.useMemo((function(){var e=r.content?(0,f.default)(r,{formatInline:!0}).content:null,t=(0,h.renderSingleLineMessage)(r,e,v,C.default.messageContent,C.default.messageContentIcon),n=t.contentPlaceholder,a=t.renderedContent,i=t.icon;return o.createElement(o.Fragment,null,null!=a?a:A("span",{},void 0,n),i)}),[r,v]);return A(E.default,{className:C.default.subtext,size:E.default.Sizes.SIZE_14,color:E.default.Colors.HEADER_SECONDARY},void 0,A(u.default,{className:C.default.avatar,user:a,size:u.Sizes.SIZE_16}),A("span",{className:C.default.authorName,style:{color:p}},void 0,d,":")," ",_,"  •  ",(0,I.getTimestampString)(S.default.extractTimestamp(r.id)))}function D(e){var t=e.channel;return A(j,{channel:t,timestamp:T.default.Messages.THREAD_BROWSER_ARCHIVE_TIME.format({time:g.calendarFormat((0,i.default)(t.threadMetadata.archiveTimestamp))})})}function w(e){var t=e.channel;return A(j,{channel:t,timestamp:T.default.Messages.THREAD_BROWSER_CREATION_TIME.format({time:g.calendarFormat((0,i.default)(new Date(S.default.extractTimestamp(t.id))))})})}function j(e){var t,n,r=e.channel,a=e.timestamp;(0,s.useSubscribeGuildMembers)(((t={})[r.guild_id]=[r.ownerId],t));var i=(0,l.useStateFromStores)([m.default],(function(){return m.default.getUser(r.ownerId)})),f=(0,l.useStateFromStores)([p.default],(function(){return p.default.getMember(r.guild_id,r.ownerId)})),c=null!==(n=(0,d.default)(r))&&void 0!==n?n:_.default;return A(E.default,{className:C.default.subtext,size:E.default.Sizes.SIZE_14,color:E.default.Colors.HEADER_SECONDARY},void 0,null==i?o.createElement(o.Fragment,null,A("div",{className:C.default.noAvatarIcon},void 0,A(c,{width:10,height:10})),a):o.createElement(o.Fragment,null,A(u.default,{className:C.default.avatar,user:i,size:u.Sizes.SIZE_16}),T.default.Messages.THREAD_BROWSER_STARTED_BY.format({authorHook:function(e,t){var n,r;return A("span",{className:C.default.authorName,style:{color:null!==(n=null==f?void 0:f.colorString)&&void 0!==n?n:void 0}},t," ",null!==(r=null==f?void 0:f.nick)&&void 0!==r?r:i.username)}}),A("span",{className:C.default.bullet},void 0,"•"),a))}t.RowType=a,function(e){e[e.Active=0]="Active",e[e.AllArchived=1]="AllArchived",e[e.MyArchived=2]="MyArchived"}(a||(t.RowType=a={})),R.displayName="NoRecentMessageSubtext",L.displayName="RecentMessageSubtext",D.displayName="ArchiveTimeSubtext",w.displayName="CreatedTimeSubtext",j.displayName="StartedBySubtext"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(718),a=c(n(11)),o=c(n(10)),i=c(n(15)),l=c(n(12)),u=c(n(258)),s=c(n(97)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}var p={"234395307759108106":"https://groovy.bot/commands","365975655608745985":"https://www.pokecord.com/getting-started",512412940897484800:"http://jameslantz.net/smilebot"};function v(e){var t=[f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_001,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_002,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_003,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_004,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_005,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_006,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_007,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_008,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_009,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_010,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_011,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_012,f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_013];return t[s.default.extractTimestamp(e)%t.length]}function y(e){return(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_SUBSCRIBED.astFormat({username:e,usernameOnClick:d.NOOP}))}function m(e,t){var n=o.default.getChannel(t);return null==n||null==i.default.getGuild(n.getGuildId())?y(e):(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_SUBSCRIBED.astFormat({username:e,usernameOnClick:d.NOOP}))}var _={stringify:function(e){var t=e.mentions[0]&&l.default.getUser(e.mentions[0].id),n=e.channel_id,o=u.default.getName(null,n,e.author);switch(e.type){case d.MessageTypes.RECIPIENT_ADD:if(!t)return;return(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_RECIPIENT_ADD.astFormat({username:o,usernameOnClick:d.NOOP,otherUsername:u.default.getName(null,n,t),otherUsernameOnClick:d.NOOP}));case d.MessageTypes.RECIPIENT_REMOVE:if(!t)return;return e.author.id===t.id?(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_RECIPIENT_REMOVE_SELF.astFormat({username:o,usernameOnClick:d.NOOP})):(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_RECIPIENT_REMOVE.astFormat({username:o,usernameOnClick:d.NOOP,otherUsername:u.default.getName(null,n,t),otherUsernameOnClick:d.NOOP}));case d.MessageTypes.CALL:var i=e.call;return i&&-1===i.participants.indexOf(a.default.getId())?(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_CALL_STARTED.astFormat({username:o,usernameOnClick:d.NOOP})):void 0;case d.MessageTypes.CHANNEL_NAME_CHANGE:return(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_CHANNEL_NAME_CHANGE.astFormat({username:o,usernameOnClick:d.NOOP,channelName:e.content}));case d.MessageTypes.CHANNEL_ICON_CHANGE:return(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_CHANNEL_ICON_CHANGE.astFormat({username:o,usernameOnClick:d.NOOP}));case d.MessageTypes.CHANNEL_PINNED_MESSAGE:return(0,r.astToString)(f.default.Messages.SYSTEM_MESSAGE_PINNED_MESSAGE_NO_CTA.astFormat({username:o,usernameOnClick:d.NOOP}));case d.MessageTypes.USER_JOIN:return(0,r.astToString)(v(e.id).astFormat({username:o,usernameOnClick:d.NOOP}));case d.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION:return y(o);case d.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1:case d.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2:case d.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3:return m(o,n);case d.MessageTypes.GUILD_INVITE_REMINDER:return f.default.Messages.SYSTEM_MESSAGE_INVITE_NOTIFICATION;default:return e.content}},getSystemMessageUserJoin:v,getSystemMessageBotJoin:function(e){return null==p[e]?null:f.default.Messages.SYSTEM_MESSAGE_GUILD_BOT_JOIN.format({learnOnClick:{onClick:function(){return window.open(p[e])}}})}};t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNewUser=function(e){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.NUF_NEW_USER,newUserType:e})}))},t.setNewUserFlowCompleted=function(){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.NUF_COMPLETE})}))};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f,t.IdleStateContext=t.IdleHandlerContext=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(57);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(){return(u=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}).apply(this,arguments)}var s=a.createContext({onPreventIdle:function(){return null},onAllowIdle:function(){return null},onForceIdle:function(){return null},onActive:function(){return null}});t.IdleHandlerContext=s;var d=a.createContext(!1);function f(e){var t=e.children,n=e.timeout,r=a.useState(!1),i=r[0],f=r[1],c=a.useRef(new Set),p=a.useRef(null);a.useEffect((function(){return p.current=new o.DelayedCall(n,(function(){return f(!0)})),p.current.delay(),function(){var e;null===(e=p.current)||void 0===e||e.cancel(),p.current=null}}),[n]);var v=a.useCallback((function(e){var t;c.current.add(e),null===(t=p.current)||void 0===t||t.cancel()}),[c,p]),y=a.useCallback((function(e){var t;(c.current.delete(e),0===c.current.size)&&(null===(t=p.current)||void 0===t||t.delay())}),[c,p]),m=a.useCallback((function(){var e;(f(!1),0===c.current.size)&&(null===(e=p.current)||void 0===e||e.delay())}),[c,p,f]),_=a.useCallback((function(){var e;c.current.size>0||(null===(e=p.current)||void 0===e||e.cancel(),f(!0))}),[p,f]),h=a.useMemo((function(){return{onAllowIdle:y,onPreventIdle:v,onActive:m,onForceIdle:_}}),[y,v,m,_]);return l(d.Provider,{value:i},void 0,l(s.Provider,{value:h},void 0,t(u({idle:i},h))))}t.IdleStateContext=d,f.displayName="IdleProvider"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M4 2.5C2.897 2.5 2 3.397 2 4.5V15.5C2 16.604 2.897 17.5 4 17.5H11V19.5H7V21.5H17V19.5H13V17.5H20C21.103 17.5 22 16.604 22 15.5V4.5C22 3.397 21.103 2.5 20 2.5H4ZM20 4.5V13.5H4V4.5H20Z"}))}d.displayName="Monitor"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M24 0v24H0V0z"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,d,s("path",{className:c,fill:f,d:"M12 16c1.1045695 0 2 .8954305 2 2s-.8954305 2-2 2-2-.8954305-2-2 .8954305-2 2-2zm0-6c1.1045695 0 2 .8954305 2 2s-.8954305 2-2 2-2-.8954305-2-2 .8954305-2 2-2zm0-6c1.1045695 0 2 .8954305 2 2s-.8954305 2-2 2-2-.8954305-2-2 .8954305-2 2-2z"})))}f.displayName="OverflowMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={fetchRegions:function(e){r.default.get({url:o.Endpoints.REGIONS(e),retries:1,oldFormErrors:!0}).then((function(t){return a.default.dispatch({type:o.ActionTypes.LOAD_REGIONS,regions:t.body,guildId:e})}),(function(){return a.default.dispatch({type:o.ActionTypes.LOAD_REGIONS,regions:[],guildId:e})}))},changeCallRegion:function(e,t){r.default.patch({url:o.Endpoints.CALL(e),body:{region:t},oldFormErrors:!0})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(8)),a=l(n(3)),o=l(n(2)),i=l(n(15));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=null,d={};var f=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var o=a.prototype;return o.initialize=function(){this.waitFor(i.default)},o.getOptimalRegion=function(e){void 0===e&&(e=null);var t=this.getRegions(e);return null!=t?t.find((function(e){return e.optimal}))||r.default.sample(t):null},o.getOptimalRegionId=function(e){void 0===e&&(e=null);var t=this.getOptimalRegion(e);return null!=t?t.id:null},o.getRandomRegion=function(e){void 0===e&&(e=null);var t=this.getRegions(e);return null!=t?r.default.sample(t):null},o.getRandomRegionId=function(e){void 0===e&&(e=null);var t=this.getRandomRegion(e);return null!=t?t.id:null},o.getRegions=function(e){return null!=e?d[e]:s},a}(a.default.Store))(o.default,{LOAD_REGIONS:function(e){var t=r.default.sortBy(e.regions,(function(e){return e.name}));e.guildId?d[e.guildId]=t:s=t},GUILD_DELETE:function(e){delete d[e.guild.id]}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{foreground:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M18 9V14C18 15.657 19.344 17 21 17V18H3V17C4.656 17 6 15.657 6 14V9C6 5.686 8.686 3 12 3C15.314 3 18 5.686 18 9ZM11.9999 21C10.5239 21 9.24793 20.19 8.55493 19H15.4449C14.7519 20.19 13.4759 21 11.9999 21Z"}))}d.displayName="Bell"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNewGroupItem=function(e,t){if(null==e||e.type!==i.ChannelStreamTypes.MESSAGE&&e.type!==i.ChannelStreamTypes.THREAD_STARTER_MESSAGE)return!0;return l(e.content,t)},t.default=l;var r,a=n(1161),o=(r=n(685))&&r.__esModule?r:{default:r},i=n(1);function l(e,t){return!(!t.hasFlag(i.MessageFlags.HAS_THREAD)&&t.type!==i.MessageTypes.APPLICATION_COMMAND)||(t.type>i.MessageTypes.DEFAULT?!(0,o.default)(e):!(!((0,o.default)(e)||e.author.id!==t.author.id||t.webhookId&&e.author.username!==t.author.username)&&(0,a.isWithinInterval)(e.timestamp,t.timestamp,i.MESSAGE_GROUP_INTERVAL)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=o.useState((function(){return new D(j(),e)})),n=t[0],r=t[1],a=o.useState(!1),i=a[0],l=a[1],u=o.useState((function(){return j()})),s=u[0],d=u[1];return o.useEffect((function(){var e=function(e){return d(e)};return n.on("change",e),d(n.state),function(){n.off("change",e)}}),[n]),o.useEffect((function(){if(s&&!(s.channels.length>0)&&!i){var t=j();0===t.channels.length?l(!0):r(new D(t,e))}}),[s,i,e]),o.useLayoutEffect(n.maybeLoadMore,[null==s?void 0:s.channels,null==s?void 0:s.loadState]),o.useEffect((function(){return S.default.addChangeListener(n.reloadMessages),function(){return S.default.removeChangeListener(n.reloadMessages)}}),[n.reloadMessages]),o.useEffect((function(){return C.default.addChangeListener(n.handleUserGuildSettingsStoreChange),function(){return C.default.removeChangeListener(n.handleUserGuildSettingsStoreChange)}}),[n]),[s,n]},t.UnreadMessagesLoader=t.MAX_SHOWN_MESSAGES=t.LoadState=t.SortOrder=void 0;var r,a,o=P(n(0)),i=N(n(64)),l=N(n(8)),u=N(n(28)),s=N(n(2)),d=N(n(390)),f=P(n(8321)),c=N(n(105)),p=N(n(8669)),v=N(n(300)),y=n(392),m=n(8473),_=n(31),h=N(n(10)),E=N(n(86)),g=N(n(15)),S=N(n(201)),O=N(n(40)),I=N(n(200)),T=N(n(361)),C=N(n(181)),b=N(n(97)),M=n(1);function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.SortOrder=r,function(e){e[e.PrivateChannel=0]="PrivateChannel",e[e.Mentioned=1]="Mentioned",e[e.AllMessagesNotifications=2]="AllMessagesNotifications",e[e.GuildChannel=3]="GuildChannel",e[e.OldChannel=4]="OldChannel",e[e.NoNotifications=5]="NoNotifications",e[e.ReallyOldChannel=6]="ReallyOldChannel"}(r||(t.SortOrder=r={})),t.LoadState=a,function(e){e.Loading="loading",e.Loaded="loaded",e.Done="done"}(a||(t.LoadState=a={}));t.MAX_SHOWN_MESSAGES=25;var D=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).state=t,r.scrollerRef=n,r.maybeLoadMore=function(){var e,t=null===(e=r.scrollerRef.current)||void 0===e?void 0:e.getScrollerState();null!=t&&(t.scrollHeight-t.scrollTop-t.offsetHeight<2e3&&r.loadMore())},r.reloadMessages=function(){r.setState({channels:r.state.channels.map((function(e){return e.hasLoadedAnything?w(e,!1,!0):e}))})},r.getNumUnreadChannels=function(){return r.state.channels.length},r.markChannelRead=function(e){var t=e.channelId,n=e.newestUnreadMessageId;s.default.wait((function(){return f.ack(t,!0,void 0,n,{section:M.AnalyticsSections.INBOX})})),1!==r.state.channels.length?(r.setState({channels:r.updateChannel(t,(function(e){return R({},e,{deleted:!0})}))}),c.default.useReducedMotion&&r.deleteChannel(t),r.maybeLoadMore()):r.deleteChannel(t)},r.markGuildRead=function(e){s.default.wait((function(){return(0,p.default)([e])})),r.setState({channels:r.state.channels.filter((function(t){return t.guildId!==e}))}),r.maybeLoadMore()},r.deleteChannel=function(e){r.setState({scrollToChannelIndex:l.default.findIndex(r.state.channels,(function(t){return t.channelId===e})),channels:r.state.channels.filter((function(t){return t.channelId!==e}))}),r.maybeLoadMore()},r.markAllRead=function(){f.bulkAck(r.state.channels.map((function(e){return{channelId:e.channelId,messageId:e.newestUnreadMessageId}}))),r.setState({channels:[]})},r.toggle=function(e){var t,n=e.channelId,o=r.state,i=o.channels,s=o.collapsedChannels,d=o.loadState,f=l.default.findIndex(i,(function(e){return e.channelId===n})),c=i[f],p=!c.collapsed;s=R({},s,((t={})[n]=p,t)),u.default.set("unread-messages-collapsed-channels",s),r.setState({scrollToChannelIndex:f,collapsedChannels:s,loadState:d!==a.Done||p||c.isFullyLoaded?d:a.Loaded,channels:r.updateChannel(n,(function(e){return R({},e,{collapsed:p})}))}),c.collapsed?c.isFullyLoaded||r.loadMore():r.maybeLoadMore()},r.handleUserGuildSettingsStoreChange=function(){var e=r.state.channels.filter((function(e){return!C.default.isGuildOrCategoryOrChannelMuted(e.guildId,e.channelId)}));e.length!==r.state.channels.length&&r.setState({channels:e})},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,L(t,n);var o=r.prototype;return o.loadMore=function(){var e=this,t=this.state,n=t.loadState,r=t.channels;if(n===a.Loaded){var o=!1,i=r.map((function(t){return t.isFullyLoaded||t.deleted||o?t:t.collapsed?t.hasLoadedAnything?t:R({},t,{hasLoadedAnything:!0}):((t=w(t,!1)).isFullyLoaded||e.loadChannel(t)&&(o=!0),t)}));o&&!i.some((function(e,t){return e!==r[t]}))||this.setState({channels:i,loadState:o?this.state.loadState:a.Done})}},o.clearScrollToChannelIndex=function(){this.setState({scrollToChannelIndex:null})},o.loadChannel=function(e){var t=this;d.default.clearChannel(e.channelId);var n=d.default.fetchMessages({channelId:e.channelId,limit:M.MAX_MESSAGES_PER_CHANNEL,jump:{messageId:e.oldestReadMessageId,flash:!0}});return null!=n&&!1!==n&&(this.setState({loadState:a.Loading}),n.then((function(n){t.setState({loadState:a.Loaded,channels:t.updateChannel(e.channelId,(function(e){var t=w(e,!0);return 0!==t.messages.length&&t.messages.length!==e.messages.length||(t=R({},t,{hasLoadedAnything:!0,isFullyLoaded:!0,hasError:!n})),t}))})}),(function(){t.setState({loadState:a.Loaded,channels:t.updateChannel(e.channelId,(function(e){var t;return R({},w(e,!0),{isFullyLoaded:!0,hasError:!0,hasLoadedAnything:!0,newestUnreadMessageId:null===(t=e.messages[e.messages.length-1])||void 0===t?void 0:t.id})}))})})),!0)},o.updateChannel=function(e,t){return this.state.channels.map((function(n){return n.channelId===e?t(n):n}))},o.setState=function(e){for(var t in e)if(e[t]!==this.state[t])return this.state=R({},this.state,{},e),void this.emit("change",this.state)},r}(i.default);function w(e,t,n){var r;void 0===n&&(n=!1);var a=S.default.getMessages(e.channelId),o=a.toArray().filter((function(t){return t.id>e.oldestReadMessageId&&t.id<=e.newestUnreadMessageId}));if(o.length===e.messages.length&&o.every((function(t,n){return e.messages[n]===t}))&&n)return e;var i=null!=a.getAfter(e.oldestReadMessageId)||(null===(r=o[0])||void 0===r?void 0:r.id)===e.oldestUnreadMessageId,l=o[o.length-1],u=(null==l?void 0:l.id)>=e.newestUnreadMessageId||o.length>=25;return R({},e,{messages:o,hasLoadedAnything:e.hasLoadedAnything||i||t,hasLoadedFirst:e.hasLoadedFirst||i||t,isFullyLoaded:e.isFullyLoaded||i&&u||t&&!a.hasMoreAfter})}function j(){var e=u.default.get("unread-messages-collapsed-channels")||{},t=function(e){var t=[];return h.default.getSortedPrivateChannels().forEach((function(n){return k(e,t,null,n.id)})),T.default.getFlattenedGuildIds().forEach((function(n){if(null!=n){var r=E.default.getSelectableChannelIds(n),a=v.default.getActiveJoinedUnreadThreadsForGuild(n);r.forEach((function(r){k(e,t,n,r);var o=a[r]||{};for(var i in o)k(e,t,n,i)}))}})),l.default.sortBy(t,(function(e){return e.sortOrder}))}(e),n=l.default.uniq(t.map((function(e){return e.guildId})));return s.default.dirtyDispatch({type:"INBOX_OPEN",guildIds:n}),{collapsedChannels:e,loadState:a.Loaded,channels:t,scrollToChannelIndex:null}}function k(e,t,n,r){if(null!=r){var a=h.default.getChannel(r);if(null!=a)if(!a.isNSFW())if(_.THREAD_CHANNEL_TYPES.has(a.type)||!C.default.isGuildOrCategoryOrChannelMuted(n,a.id)){if(a.isPrivate()){if(!I.default.getMentionCount(r))return}else if(!I.default.hasUnread(a.id))return;if(a.isPrivate()||O.default.can(M.Permissions.READ_MESSAGE_HISTORY,a)){var o=I.default.ackMessageId(r);if(null==o){var i=g.default.getGuild(a.guild_id);if(null==i||null==i.joinedAt)return;o=b.default.fromTimestamp(i.joinedAt.getTime())}var l=I.default.getOldestUnreadMessageId(r),u=I.default.lastMessageId(r),s=I.default.getMentionCount(r),d=s>0||a.isPrivate();null!=u&&(o>=u||t.push({guildId:n,channelId:r,oldestReadMessageId:o,oldestUnreadMessageId:l,newestUnreadMessageId:u,collapsed:!0===e[r],hasLoadedAnything:!1,hasLoadedFirst:!1,isFullyLoaded:!1,hasError:!1,hasMentionsOrUnreads:d,mentionCount:s,messages:[],sortOrder:U(n,r,l)}))}}}}t.UnreadMessagesLoader=D;function U(e,t,n){var a=h.default.getChannel(t);if(a.isPrivate())return r.PrivateChannel;if(I.default.getMentionCount(t)>0)return r.Mentioned;if(null!=n){var o=b.default.extractTimestamp(n);if(Date.now()-o>864e6)return r.ReallyOldChannel;if(Date.now()-o>1728e5)return r.OldChannel}if(a.isThread()){var i=(0,m.computeThreadNotificationSetting)(a);return i===y.ThreadMemberFlags.ALL_MESSAGES?r.AllMessagesNotifications:i===y.ThreadMemberFlags.NO_MESSAGES?r.NoNotifications:r.GuildChannel}var l=C.default.getChannelMessageNotifications(e,t),u=l===M.UserNotificationSettings.NULL?C.default.getMessageNotifications(e):l;return u===M.UserNotificationSettings.ALL_MESSAGES?r.AllMessagesNotifications:u===M.UserNotificationSettings.NO_MESSAGES?r.NoNotifications:r.GuildChannel}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=r.default.flatMap(e,(function(e){for(var t,n=i.default.getSelectableChannelIds(e),r=[].concat(n),a=o.default.getActiveJoinedThreadsForGuild(e),l=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(n);!(t=l()).done;){var u=a[t.value]||{};for(var d in u)r.push(d)}return r})).map((function(e){return{channelId:e,messageId:l.default.lastMessageId(e)}}));return(0,a.bulkAck)(t)};var r=u(n(8)),a=n(8321),o=u(n(300)),i=u(n(86)),l=u(n(200));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VoiceUserList=void 0;var r,a=S(n(0)),o=E(n(9)),i=E(n(8967)),l=E(n(9722)),u=E(n(61)),s=S(n(149)),d=E(n(8313)),f=E(n(9140)),c=E(n(8475)),p=E(n(1281)),v=E(n(1261)),y=E(n(8414)),m=n(1),_=E(n(6)),h=E(n(7653));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=function(e){var t=e.children,n=e.collapsed,r=void 0!==n&&n,a=e.className;return T("div",{className:(0,o.default)(a,h.default.list,r?h.default.listCollapse:h.default.listDefault),role:"group"},void 0,t)};t.VoiceUserList=C,C.displayName="VoiceUserList";var b=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(e){var n=t.props,r=n.onClick,a=n.user;null==r||r(e,a)},t.handleDoubleClick=function(e){var n=t.props,r=n.onDoubleClick,a=n.user;null==r||r(e,a)},t.handleContextMenu=function(e){var n=t.props,r=n.onContextMenu,a=n.user;null==r||r(e,a)},t.handleMouseLeave=function(e){var n=t.props,r=n.onMouseLeave,a=n.user;null==r||r(e,a)},t.handleMouseEnter=function(e){var n=t.props,r=n.onMouseEnter,a=n.user;null==r||r(e,a)},t.handleMouseDown=function(e){var n=t.props,r=n.onMouseDown,a=n.user;null==r||r(e,a)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var E=r.prototype;return E.renderPrioritySpeaker=function(){var e=this.props,t=e.speaking,n=e.priority,r=e.collapsed,i=e.mute,l=e.serverMute;return n&&!r?T(s.default,{text:_.default.Messages.PRIORITY_SPEAKER},void 0,(function(e){var n;return a.createElement("div",O({className:(0,o.default)(h.default.iconPriortySpeaker,(n={},n[h.default.iconPriortySpeakerSpeaking]=!i&&!l&&t,n))},e))})):null},E.renderAvatar=function(){var e,t=this.props,n=t.speaking,r=t.user,a=t.size,i=t.avatarContainerClass,l=t.guildId;return T("div",{className:(0,o.default)(i,h.default.avatar,(e={},e[h.default.avatarLarge]=a===m.OverlayAvatarSizes.LARGE,e[h.default.avatarSmall]=a===m.OverlayAvatarSizes.SMALL,e[h.default.avatarSpeaking]=n,e)),style:{backgroundImage:"url("+r.getAvatarURL(l)+")"}})},E.renderName=function(){var e,t=this.props,n=t.nick,r=t.user,a=t.collapsed,i=t.speaking,l=t.userNameClassName,u=t.mute,s=t.serverMute;return a?null:T("div",{className:(0,o.default)(l,(e={},e[h.default.username]=!0,e[h.default.usernameSpeaking]=!u&&!s&&i,e))},void 0,n||r.username)},E.renderIcons=function(){var e=this.props,t=e.mute,n=e.localMute,r=e.localVideoDisabled,a=e.serverMute,u=e.disabled,m=e.deaf,E=e.serverDeaf,g=e.collapsed,S=e.video,O=e.isStreaming,I=e.isWatching,C=e.iconClassName,b=e.embeddedActivityType,M=e.embeddedApplication;if(g||u)return null;var N,A=[];if(t){var P;A.push(T(s.TooltipContainer,{text:n?_.default.Messages.LOCAL_MUTED:a?_.default.Messages.SERVER_MUTED:_.default.Messages.VOICE_CHANNEL_MUTED,className:h.default.iconSpacing},"mute",T(v.default,{className:(0,o.default)(h.default.icon,C,(P={},P[h.default.iconServer]=a,P)),foreground:n?h.default.strikethrough:void 0})))}(E||m)&&A.push(T(s.TooltipContainer,{className:h.default.iconSpacing,text:E?_.default.Messages.SERVER_DEAFENED:_.default.Messages.VOICE_CHANNEL_DEAFENED},"deaf",T(p.default,{className:(0,o.default)(h.default.icon,C,(N={},N[h.default.iconServer]=E,N))})));if(S&&(r?A.push(T(s.TooltipContainer,{className:h.default.iconSpacing,text:_.default.Messages.LOCAL_VIDEO_DISABLED},"video",T(f.default,{className:(0,o.default)(h.default.icon,C),foreground:h.default.strikethrough}))):A.push(T(s.TooltipContainer,{className:h.default.iconSpacing,text:_.default.Messages.VIDEO},"video",T(d.default,{className:(0,o.default)(h.default.icon,C)})))),O?A.push(T("div",{className:(0,o.default)(h.default.iconSpacing,h.default.liveIconSpacing)},"stream",T(y.default,{size:y.default.Sizes.SMALL}))):I&&A.push(T(s.TooltipContainer,{className:h.default.iconSpacing,text:_.default.Messages.WATCH_STREAM_WATCHING},"watch",T(c.default,{className:(0,o.default)(h.default.icon,C)}))),null!=b){var R=(0,l.default)(b);A.push(T(s.TooltipContainer,{text:(0,i.default)(null==M?void 0:M.name,b),className:h.default.iconSpacing},"activity",T(R,{className:(0,o.default)(h.default.icon,C)})))}return 0===A.length?null:T("div",{className:h.default.icons},void 0,A)},E.render=function(){var e,t,n=this.props,r=n.onClick,a=n.onMouseEnter,i=n.onMouseLeave,l=n.onMouseDown,s=n.onKeyDown,d=n.onDoubleClick,f=n.onContextMenu,c=n.flipped,p=n.size,v=n.className,y=n.selected,_=n.disabled,E=n["aria-label"],g=n.tabIndex;return T(u.default,{className:(0,o.default)(v,(e={},e[h.default.voiceUser]=!0,e[h.default.selected]=y,e[h.default.clickable]=null!=r,e[h.default.userSmall]=p===m.OverlayAvatarSizes.SMALL,e[h.default.userLarge]=p===m.OverlayAvatarSizes.LARGE,e[h.default.disabled]=!y&&_,e)),onClick:r&&this.handleClick,onDoubleClick:d&&this.handleDoubleClick,onContextMenu:f&&this.handleContextMenu,onMouseEnter:a&&this.handleMouseEnter,onMouseLeave:i&&this.handleMouseLeave,onMouseDown:l&&this.handleMouseDown,onKeyDown:s,"aria-label":E,tabIndex:g},void 0,T("div",{className:(0,o.default)(h.default.content,(t={},t[h.default.flipped]=c,t))},void 0,this.renderPrioritySpeaker(),this.renderAvatar(),this.renderName(),this.renderIcons()))},r}(a.Component);b.displayName="VoiceUser",b.defaultProps={avatarContainerClass:h.default.avatarContainer,userNameClassName:h.default.usernameFont,size:m.OverlayAvatarSizes.SMALL,selected:!1,disabled:!1};var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeVoiceUserDroppable=function(e){return(0,r.DropTarget)("DRAGGABLE_USER",{canDrop:function(e){var t,n,r=e.channel,a=r.getGuildId(),d=null!==(t=null===(n=o.default.getGuild(a))||void 0===n?void 0:n.maxVideoChannelUsers)&&void 0!==t?t:-1,f=u.default.countVoiceStatesForChannel(r.id),c=null!=a&&l.default.hasVideo(r.id)&&d>0&&f>=d+1;return i.default.can(s.Permissions.MOVE_MEMBERS,r)&&i.default.can(s.Permissions.CONNECT,r)&&!c},drop:function(e,t){var n=e.channel;a.default.setChannel(n.getGuildId(),t.getItem().user.id,n.id)}},(function(e,t){return{connectUserDropTarget:e.dropTarget(),isUserOver:t.isOver()&&t.canDrop()}}))(e)},t.makeVoiceUserDraggable=function(e){return(0,r.DragSource)("DRAGGABLE_USER",{canDrag:function(e){var t=e.canDrag;return t},beginDrag:function(e){return{user:e.user}}},(function(e){return{connectUserDragSource:e.dragSource()}}))(e)};var r=n(5941),a=d(n(199)),o=d(n(15)),i=d(n(40)),l=d(n(80)),u=d(n(365)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(55)),o=u(n(47)),i=u(n(24)),l=u(n(7661));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=function(e){var t=e.title,n=e.subtitle,r=e.icon;return d(a.default,{className:l.default.wrapper,align:a.default.Align.BASELINE},void 0,null!=r&&d(r,{width:16,height:16,className:l.default.icon}),d(i.default,{size:i.default.Sizes.SIZE_16,className:l.default.title},void 0,t),n&&d(o.default,{size:o.default.Sizes.SIZE_12,className:l.default.subtitle},void 0,n))};f.displayName="IconSelectOption";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(12)),i=n(8262),l=n(1233);n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){return(d=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}).apply(this,arguments)}var f={},c=!1;function p(){var e;return(e={})[i.GuildJoinRequestApplicationStatuses.STARTED]={requests:[],total:0},e[i.GuildJoinRequestApplicationStatuses.PENDING]={requests:[],total:0},e[i.GuildJoinRequestApplicationStatuses.REJECTED]={requests:[],total:0},e[i.GuildJoinRequestApplicationStatuses.APPROVED]={requests:[],total:0},e}var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.getRequests=function(e){var t;return null!==(t=f[e])&&void 0!==t?t:p()},a.isFetching=function(){return c},r}(r.default.Store))(a.default,{GUILD_JOIN_REQUESTS_FETCH_SUCCESS:function(e){var t=e.status,n=e.requests,r=e.total,a=e.guildId;c=!1,f[a]=p(),f[a][t]={requests:n,total:r}},GUILD_JOIN_REQUESTS_FETCH_START:function(e){c=!0},GUILD_JOIN_REQUESTS_FETCH_FAILURE:function(e){c=!1},GUILD_JOIN_REQUESTS_BULK_ACTION:function(e){var t,n=e.guildId,r=e.action,a=f[n][i.GuildJoinRequestApplicationStatuses.PENDING],o=a.requests,l=a.total;f[n]=d({},f[n],((t={})[i.GuildJoinRequestApplicationStatuses.PENDING]={requests:[],total:0},t[r]={requests:[].concat(f[n][r].requests,o),total:f[n][r].total+l},t))},GUILD_JOIN_REQUEST_UPDATE:function(e){var t=e.guildId,n=e.request,r=e.status,a=(0,l.joinRequestFromServer)(n),u=o.default.getCurrentUser();if(a.userId===u.id)return!1;null==f[t]&&(f[t]=p());for(var s=0,d=Object.values(i.GuildJoinRequestApplicationStatuses);s<d.length;s++){var c=d[s],v=f[t][c],y=v.requests.findIndex((function(e){return e.userId===a.userId}));y>=0?v.requests[y]=a:r===c&&y<0&&(v.requests.push(a),++v.total)}return!0},GUILD_JOIN_REQUEST_DELETE:function(e){var t=e.guildId,n=e.userId;if(null!=f[t])for(var r=0,a=Object.values(i.GuildJoinRequestApplicationStatuses);r<a.length;r++){var o=a[r],l=f[t][o].requests,u=l.findIndex((function(e){return e.userId===n}));if(u>=0)return l.splice(u,1),!0}}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchMemberCounts=function(e){return v.apply(this,arguments)},t.requestMembersForRole=function(e,t,n){void 0===n&&(n=!0);var r=e+"-"+t;if(!n||null==y.get(r))return y.set(r,!0),function(e,t){return a.default.get({url:u.Endpoints.GUILD_ROLE_MEMBER_IDS(e,t)}).then((function(t){i.default.requestMembersById(e,t.body,!1)}))}(e,t);return Promise.resolve()};var r=s(n(404)),a=s(n(14)),o=s(n(2)),i=s(n(199)),l=s(n(8460)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){d(o,r,a,i,l,"next",e)}function l(e){d(o,r,a,i,l,"throw",e)}i(void 0)}))}}function c(e){return p.apply(this,arguments)}function p(){return(p=f(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o.default.dirtyDispatch({type:u.ActionTypes.GUILD_ROLE_MEMBER_COUNT_FETCH_START,guildId:t}),e.next=4,a.default.get({url:u.Endpoints.GUILD_ROLE_MEMBER_COUNTS(t)});case 4:n=e.sent,r=n.body,o.default.dirtyDispatch({type:u.ActionTypes.GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS,guildId:t,roleMemberCount:r}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),o.default.dirtyDispatch({type:u.ActionTypes.GUILD_ROLE_MEMBER_COUNT_FETCH_FAILURE,guildId:t});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function v(){return(v=f(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.default.shouldFetch(t)){e.next=3;break}return e.next=3,c(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y=new r.default({maxAge:1e4})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=r.useState(e),n=t[0],a=t[1],o=r.useRef(null);return r.useEffect((function(){var t,n;a(null!==(t=null===(n=o.current)||void 0===n?void 0:n.offsetHeight)&&void 0!==t?t:e)})),{headerHeight:n,headerRef:o}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),s("path",{fill:d,className:f,d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}d.displayName="Trash"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var l=a.default.getCurrentConfig({guildId:t.id}).showNewRolesCreationFlow;if(a.default.trackExposure({guildId:t.id}),l&&!e.shiftKey)return void(0,o.openModal)((function(e){return r.createElement(i.default,s({},e,{guild:t}))}));n()};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(8527)),o=n(41),i=l(n(9784));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoticeButton=_,t.NoticeButtonAnchor=h,t.NoticeCloseButton=E,t.default=g,t.NoticeColors=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(88)),l=f(n(271)),u=f(n(61)),s=f(n(6)),d=f(n(7384));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var m=Object.freeze({DEFAULT:d.default.colorDefault,NEUTRAL:d.default.colorNeutral,BRAND:d.default.colorBrand,DANGER:d.default.colorDanger,INFO:d.default.colorInfo,DARK:d.default.colorDark,NOTIFICATION:d.default.colorNotification,DOWNLOAD:d.default.colorDownload,STREAMER_MODE:d.default.colorStreamerMode,CUSTOM:d.default.colorCustom,SPOTIFY:d.default.colorSpotify,PREMIUM_TIER_1:d.default.colorPremiumTier1,PREMIUM_TIER_2:d.default.colorPremiumTier2});function _(e){var t,n=e.children,r=e.className,l=e.minor,u=void 0!==l&&l,s=y(e,["children","className","minor"]);return p(i.default,{},void 0,a.createElement("button",v({className:(0,o.default)(d.default.button,r,(t={},t[d.default.buttonMinor]=u,t))},s),n))}function h(e){var t=e.children,n=e.href,r=y(e,["children","href"]);return a.createElement(l.default,v({},r,{className:d.default.button,href:n}),t)}function E(e){var t=e.onClick;return p(u.default,{focusProps:{offset:6},className:d.default.closeButton,onClick:t,"aria-label":s.default.Messages.DISMISS})}function g(e){var t=e.color,n=void 0===t?m.DEFAULT:t,r=e.className,a=e.style,i=e.children;return p("div",{className:(0,o.default)(d.default.notice,r,n),style:null!=a?a:void 0},void 0,i)}t.NoticeColors=m,_.displayName="NoticeButton",h.displayName="NoticeButtonAnchor",E.displayName="NoticeCloseButton",g.displayName="Notice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=l(n(15)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}var d={description:"",channels:[],enabled:!1},f=d,c=!1,p=!1,v=d;function y(e){var t,n,r=e.welcomeScreen,a=e.guildId,l=o.default.getGuild(a);null!=r?(f={description:null!==(t=r.description)&&void 0!==t?t:"",channels:null!==(n=r.welcome_channels)&&void 0!==n?n:[],enabled:null==l?void 0:l.hasFeature(i.GuildFeatures.WELCOME_SCREEN_ENABLED)},v=f):v=f=d;p=!1}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(o.default)},a.get=function(){return v},a.showNotice=function(){return p},a.getSettingsProps=function(){return{submitting:c,hasErrors:p,welcomeSettings:v,originalWelcomeSettings:f}},r}(r.default.Store))(a.default,{WELCOME_SCREEN_FETCH_SUCCESS:y,WELCOME_SCREEN_UPDATE:y,WELCOME_SCREEN_SETTINGS_RESET:function(e){return v=f,void(p=!1)},WELCOME_SCREEN_SETTINGS_UPDATE:function(e){var t=e.settings;v=s({},v,{},t)},WELCOME_SCREEN_SUBMIT:function(e){c=!0},WELCOME_SCREEN_SUBMIT_SUCCESS:function(e){y(e),c=!1},WELCOME_SCREEN_SUBMIT_FAILURE:function(e){return p=!0,void(c=!1)}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(8)),a=p(n(63)),o=p(n(3)),i=p(n(2)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8681)),u=n(31),s=p(n(56)),d=p(n(15)),f=n(1);function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=[f.Permissions.KICK_MEMBERS,f.Permissions.BAN_MEMBERS,f.Permissions.ADMINISTRATOR,f.Permissions.MANAGE_CHANNELS,f.Permissions.MANAGE_GUILD,f.Permissions.MANAGE_MESSAGES,f.Permissions.MANAGE_NICKNAMES,f.Permissions.MANAGE_ROLES,f.Permissions.MANAGE_WEBHOOKS,f.Permissions.MANAGE_EMOJIS,f.Permissions.MOVE_MEMBERS,f.Permissions.MUTE_MEMBERS,f.Permissions.DEAFEN_MEMBERS],E=null,g=[],S=[],O=[],I=[],T=[],C=[],b=!0,M=!1,N=!1,A=!0,P=!1,R=null,L=f.AuditLogActions.ALL,D={},w=0;function j(e){var t=[],n=0;return e.reverse().forEach((function(e){var a=[],o=null,i=null;if(null!=e.reason&&a.push(new l.AuditLogChange(f.AuditLogChangeKeys.REASON,null,e.reason)),e.changes)for(var s,d=m(e.changes);!(s=d()).done;){var c=s.value,p=new l.AuditLogChange(c.key,c.old_value,c.new_value);a.push(p),p.key===f.AuditLogChangeKeys.NAME?o=p:p.key===f.AuditLogChangeKeys.TYPE&&(i=p)}if(e.action_type===f.AuditLogActions.MEMBER_PRUNE){var v=null!=e&&null!=e.options&&null!=e.options.delete_member_days?e.options.delete_member_days:1,y=new l.AuditLogChange(f.AuditLogChangeKeys.PRUNE_DELETE_DAYS,null,v);a.push(y)}var _=new l.default({id:e.id,action:e.action_type,targetId:e.target_id,userId:e.user_id,changes:a,options:e.options}),h=t[0];if(function(e,t,n,a,o){return void 0===a&&(a=30),void 0===o&&(o=50),null!=e&&e.action===t.action&&e.targetId===t.targetId&&e.userId===t.userId&&r.default.isEqual(e.options,t.options)&&t.timestampStart.diff(e.timestampStart,"minutes")<a&&n<o&&t.targetType!==f.AuditLogTargetTypes.INVITE&&t.action!==f.AuditLogActions.MESSAGE_DELETE&&t.action!==f.AuditLogActions.MESSAGE_BULK_DELETE&&t.action!==f.AuditLogActions.MESSAGE_PIN&&t.action!==f.AuditLogActions.MESSAGE_UNPIN&&t.action!==f.AuditLogActions.MEMBER_MOVE&&t.action!==f.AuditLogActions.MEMBER_DISCONNECT&&t.action!==f.AuditLogActions.BOT_ADD}(h,_,n))return t[0]=h.merge({changes:[].concat(h.changes,_.changes),timestampEnd:_.timestampStart}),void n++;if(_.actionType===f.AuditLogActionTypes.DELETE&&null!=o){var E,g=o.oldValue;if(_.targetType!==f.AuditLogTargetTypes.CHANNEL&&_.targetType!==f.AuditLogTargetTypes.CHANNEL_OVERWRITE||null===i||!(0,u.isGuildSelectableChannelType)(i.oldValue)||(g="#"+g),null==D[_.targetType])D[_.targetType]=((E={})[_.targetId]=g,E);else D[_.targetType][_.targetId]=g}n=0,t.unshift(_)})),t}function k(e){if(e.section!==f.GuildSettingsSections.AUDIT_LOG)return!1;var t=s.default.getMembers(E),n=d.default.getGuild(E);O=(0,r.default)(t).filter((function(e){return e.roles.some((function(t){if(null!=n){if(e.userId===n.ownerId)return!0;var r=n.roles[t];return null!=r&&h.some((function(e){return a.default.has(r.permissions,e)}))}}))})).map((function(e){return e.userId})).value()}var U=new(function(e){var t,n,r,a,o;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r=i,(a=[{key:"logs",get:function(){return g}},{key:"integrations",get:function(){return S}},{key:"webhooks",get:function(){return I}},{key:"guildScheduledEvents",get:function(){return T}},{key:"threads",get:function(){return C}},{key:"isInitialLoading",get:function(){return b}},{key:"isLoading",get:function(){return M}},{key:"isLoadingNextPage",get:function(){return N}},{key:"hasOlderLogs",get:function(){return A}},{key:"hasError",get:function(){return P}},{key:"userIds",get:function(){return O}},{key:"userIdFilter",get:function(){return R}},{key:"actionFilter",get:function(){return L}},{key:"deletedTargets",get:function(){return D}},{key:"groupedFetchCount",get:function(){return w}}])&&v(r.prototype,a),o&&v(r,o),i}(o.default.Store))(i.default,{AUDIT_LOG_FETCH_START:function(e){M=!0},AUDIT_LOG_FETCH_SUCCESS:function(e){w=0,b=!1,M=!1,A=!0,P=!1,g=j(e.logs),S=e.integrations,I=e.webhooks,T=e.guildScheduledEvents,C=e.threads,e.logs.length<f.AUDIT_LOG_PAGE_LIMIT&&(A=!1)},AUDIT_LOG_FETCH_FAIL:function(e){return M=!1,P=!0,void(g=[])},AUDIT_LOG_FETCH_NEXT_PAGE_START:function(e){var t=e.isGroupedFetch;N=!0,t&&w++},AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS:function(e){var t=e.logs,n=e.integrations,r=e.webhooks,a=e.guildScheduledEvents,o=e.threads;if(N=!1,S=n,I=r,T=a,C=o,(0===t.length||t.length<f.AUDIT_LOG_PAGE_LIMIT)&&(A=!1),t.length>0){var i=j(t);g=[].concat(g,i)}},AUDIT_LOG_FETCH_NEXT_PAGE_FAIL:function(e){N=!1},AUDIT_LOG_FILTER_BY_ACTION:function(e){var t=e.action;L=t},AUDIT_LOG_FILTER_BY_USER:function(e){var t=e.userId;R=t},GUILD_SETTINGS_SET_SECTION:k,GUILD_SETTINGS_INIT:function(e){var t=e.guildId,n=e.section;return E=t,k({section:n})},GUILD_SETTINGS_CLOSE:function(e){return g=[],O=[],L=f.AuditLogActions.ALL,R=null,D={},w=0,b=!0,S=[],I=[],T=[],void(C=[])}});t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTargetType=d,t.getActionType=f,t.default=t.AuditLogChange=void 0;var r=u(n(5)),a=u(n(62)),o=u(n(164)),i=u(n(97)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return e===l.AuditLogActions.ALL?l.AuditLogTargetTypes.ALL:e<=l.AuditLogActions.GUILD_UPDATE?l.AuditLogTargetTypes.GUILD:e<=l.AuditLogActions.CHANNEL_DELETE||e===l.AuditLogActions.MESSAGE_BULK_DELETE?l.AuditLogTargetTypes.CHANNEL:e<=l.AuditLogActions.CHANNEL_OVERWRITE_DELETE?l.AuditLogTargetTypes.CHANNEL_OVERWRITE:e<=l.AuditLogActions.BOT_ADD||e===l.AuditLogActions.MESSAGE_DELETE||e===l.AuditLogActions.MESSAGE_PIN||e===l.AuditLogActions.MESSAGE_UNPIN?l.AuditLogTargetTypes.USER:e<=l.AuditLogActions.ROLE_DELETE?l.AuditLogTargetTypes.ROLE:e<=l.AuditLogActions.INVITE_DELETE?l.AuditLogTargetTypes.INVITE:e<=l.AuditLogActions.WEBHOOK_DELETE?l.AuditLogTargetTypes.WEBHOOK:e<=l.AuditLogActions.EMOJI_DELETE?l.AuditLogTargetTypes.EMOJI:e<=l.AuditLogActions.INTEGRATION_DELETE?l.AuditLogTargetTypes.INTEGRATION:e<=l.AuditLogActions.STAGE_INSTANCE_DELETE?l.AuditLogTargetTypes.STAGE_INSTANCE:e<=l.AuditLogActions.STICKER_DELETE?l.AuditLogTargetTypes.STICKER:e<=l.AuditLogActions.GUILD_SCHEDULED_EVENT_DELETE?l.AuditLogTargetTypes.GUILD_SCHEDULED_EVENT:e<=l.AuditLogActions.THREAD_DELETE?l.AuditLogTargetTypes.THREAD:(o.default.captureMessage("Unknown target type for: "+e),l.AuditLogTargetTypes.UNKNOWN)}function f(e){switch(e){case l.AuditLogActions.CHANNEL_CREATE:case l.AuditLogActions.CHANNEL_OVERWRITE_CREATE:case l.AuditLogActions.MEMBER_BAN_REMOVE:case l.AuditLogActions.ROLE_CREATE:case l.AuditLogActions.INVITE_CREATE:case l.AuditLogActions.WEBHOOK_CREATE:case l.AuditLogActions.EMOJI_CREATE:case l.AuditLogActions.STICKER_CREATE:case l.AuditLogActions.MESSAGE_PIN:case l.AuditLogActions.BOT_ADD:case l.AuditLogActions.INTEGRATION_CREATE:case l.AuditLogActions.STAGE_INSTANCE_CREATE:case l.AuditLogActions.GUILD_SCHEDULED_EVENT_CREATE:case l.AuditLogActions.THREAD_CREATE:return l.AuditLogActionTypes.CREATE;case l.AuditLogActions.CHANNEL_DELETE:case l.AuditLogActions.CHANNEL_OVERWRITE_DELETE:case l.AuditLogActions.MEMBER_KICK:case l.AuditLogActions.MEMBER_PRUNE:case l.AuditLogActions.MEMBER_BAN_ADD:case l.AuditLogActions.ROLE_DELETE:case l.AuditLogActions.INVITE_DELETE:case l.AuditLogActions.WEBHOOK_DELETE:case l.AuditLogActions.EMOJI_DELETE:case l.AuditLogActions.STICKER_DELETE:case l.AuditLogActions.MESSAGE_DELETE:case l.AuditLogActions.MESSAGE_BULK_DELETE:case l.AuditLogActions.MESSAGE_UNPIN:case l.AuditLogActions.INTEGRATION_DELETE:case l.AuditLogActions.MEMBER_DISCONNECT:case l.AuditLogActions.STAGE_INSTANCE_DELETE:case l.AuditLogActions.GUILD_SCHEDULED_EVENT_DELETE:case l.AuditLogActions.THREAD_DELETE:return l.AuditLogActionTypes.DELETE;case l.AuditLogActions.GUILD_UPDATE:case l.AuditLogActions.CHANNEL_UPDATE:case l.AuditLogActions.CHANNEL_OVERWRITE_UPDATE:case l.AuditLogActions.MEMBER_UPDATE:case l.AuditLogActions.MEMBER_ROLE_UPDATE:case l.AuditLogActions.ROLE_UPDATE:case l.AuditLogActions.INVITE_UPDATE:case l.AuditLogActions.WEBHOOK_UPDATE:case l.AuditLogActions.EMOJI_UPDATE:case l.AuditLogActions.STICKER_UPDATE:case l.AuditLogActions.INTEGRATION_UPDATE:case l.AuditLogActions.MEMBER_MOVE:case l.AuditLogActions.STAGE_INSTANCE_UPDATE:case l.AuditLogActions.GUILD_SCHEDULED_EVENT_UPDATE:case l.AuditLogActions.THREAD_UPDATE:return l.AuditLogActionTypes.UPDATE}return l.AuditLogActionTypes.ALL}t.AuditLogChange=function(e,t,n){this.key=e,this.oldValue=t,this.newValue=n};var c=function(e){var t,n;function a(t){var n;return(n=e.call(this)||this).id=t.id,n.action=t.action,n.actionType=f(n.action),n.targetId=t.targetId,n.timestampStart=t.timestampStart||(0,r.default)(i.default.extractTimestamp(n.id)),n.timestampEnd=t.timestampEnd||n.timestampStart,n.userId=t.userId,n.changes=t.changes||[],n.targetType=d(n.action),n.options=t.options||{},n.target=t.target||t.id,n.user=t.user||null,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),a}(a.default);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChecklistItem=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=C(n(5)),l=n(3),u=C(n(8254)),s=C(n(8533)),d=C(n(9839)),f=C(n(15)),c=C(n(29)),p=C(n(1160)),v=C(n(151)),y=C(n(686)),m=C(n(5827)),_=n(41),h=C(n(47)),E=C(n(24)),g=C(n(93)),S=C(n(97)),O=n(1),I=C(n(6)),T=C(n(7717));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A=function(e){var t=e.name,n=e.failingName,r=e.description,a=e.checked,o=e.pending,i=e.pendingDescription,l=e.failingDescription,u=t,s=null,d=null;return o?(s=N(m.default,{color:O.Colors.STATUS_YELLOW,width:20,height:20}),d=null!=i?i:r):a?(s=N(p.default,{readOnly:!0,shape:p.default.Shapes.ROUND,size:20,type:p.default.Types.INVERTED,value:!0}),d=r):(s=N(y.default,{color:O.Colors.STATUS_RED,width:20,height:20}),u=null!=n?n:t,d=null!=l?l:r),N("div",{className:T.default.checklistItem},void 0,N("div",{className:T.default.checklistIcon},void 0,s),N("div",{className:T.default.checklistText},void 0,N(h.default,{size:h.default.Sizes.SIZE_16},void 0,u),N(E.default,{color:E.default.Colors.MUTED},void 0,d)))};t.ChecklistItem=A,A.displayName="ChecklistItem";var P=function(e){var t=e.guildId,r=e.className,p=e.noHeader,y=void 0!==p&&p,m=e.failedItemsOnly,C=void 0!==m&&m,b=(0,l.useStateFromStoresArray)([s.default],(function(){return[s.default.getDiscoveryChecklist(t),s.default.isLoading()]}),[t]),P=b[0],R=b[1],L=(null!=P?P:{}).nsfwProperties,D=(0,l.useStateFromStores)([f.default],(function(){return f.default.getGuild(t)}),[t]),w=null==D?void 0:D.hasFeature(O.GuildFeatures.PARTNERED);if(R||null==P)return N("div",{className:(0,o.default)(T.default.container,T.default.loaderContainer,r)},void 0,N(h.default,{className:T.default.loadingText,tag:h.default.Tags.H2,size:E.default.Sizes.SIZE_16,muted:!0},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_LOADING),N(v.default,{className:T.default.spinner}));var j,k=w?I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SIZE_DESCRIPTION_FAILING_PARTNERS:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SIZE_DESCRIPTION_FAILING,U=[{name:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE,failingName:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE_FAILING,description:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE_DESCRIPTION,failingDescription:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE_DESCRIPTION_FAILING_GUIDELINES.format({termsURL:O.MarketingURLs.TERMS,guidelinesURL:g.default.getArticleURL(O.HelpdeskArticles.PUBLIC_GUILD_GUILDLINES)}),checked:null==P?void 0:P.safeEnvironment},{name:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SIZE.format({minMembers:P.minimumGuildSize}),failingName:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SIZE_FAILING.format({minMembers:P.minimumGuildSize.toLocaleString()}),description:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SIZE_DESCRIPTION.format({minMembers:P.minimumGuildSize.toLocaleString()}),failingDescription:k.format({minMembers:P.minimumGuildSize.toLocaleString()}),checked:null==P?void 0:P.size},{name:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_AGE,failingName:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_AGE_FAILING,description:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_AGE_DESCRIPTION.format({minimumGuildAge:Math.ceil(P.minimumGuildAge/7)}),failingDescription:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_AGE_DESCRIPTION_FAILING.format({minimumGuildAge:Math.ceil(P.minimumGuildAge/7),passDate:(0,i.default)(S.default.extractTimestamp(t)).add(P.minimumGuildAge,"days").format("LL")}),checked:null==P?void 0:P.age},{name:(null==P?void 0:P.healthScorePending)?I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_PENDING:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY,failingName:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_FAILING,description:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_DESCRIPTION,failingDescription:a.createElement(a.Fragment,null,N(E.default,{color:E.default.Colors.MUTED,className:T.default.healthFailingDescription},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_DESCRIPTION_FAILING),(null==P?void 0:P.engagementHealthy)?null:N(E.default,{color:E.default.Colors.ERROR},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_ENGAGEMENT_FAILING),(null==P?void 0:P.retentionHealthy)?null:N(E.default,{color:E.default.Colors.ERROR},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_RETENTION_FAILING),function(){if(null==P||null==P.healthScore)return!1;var e=P.retentionHealthy,t=P.engagementHealthy,n=P.healthScore,r=n.avg_nonnew_participators,a=n.avg_nonnew_communicators,o=n.perc_ret_w1_intentful;return!e&&null!=o||!t&&null!=r&&null!=a}()&&N(c.default,{className:T.default.detailsButton,look:c.default.Looks.LINK,size:c.default.Sizes.NONE,color:c.default.Colors.LINK,onClick:function(){return(0,_.openModal)((function(e){return a.createElement(d.default,M({},e,{guildChecklist:P}))}))}},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTH_VIEW_DETAILS)),pendingDescription:(null==P?void 0:P.size)?I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_DESCRIPTION_PENDING.format({checkBackHook:function(e,t){return N("strong",{className:T.default.healthPending},t,e)}}):I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_DESCRIPTION_PENDING_SIZE.format({minMembers:500}),checked:null==P?void 0:P.healthy,pending:null==P?void 0:P.healthScorePending},{name:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_NSFW,failingName:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_NSFW_FAILING,description:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_NSFW_DESCRIPTION,failingDescription:a.createElement(a.Fragment,null,(null==L?void 0:L.channels)?N(E.default,{color:E.default.Colors.MUTED},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_CHANGE_CHANNEL_NAMES_2.format({channelHook:function(e,t){return N("span",{className:T.default.doesNot},t,e)}})):null,null!=(null==L?void 0:L.name)?N(E.default,{color:E.default.Colors.MUTED},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_CHANGE_NAME.format({nameHook:function(e,t){return N("span",{className:T.default.doesNot},t,e)}})):null,null!=(null==L?void 0:L.description)?N(E.default,{color:E.default.Colors.MUTED},void 0,I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_CHANGE_DESCRIPTION.format({descriptionHook:function(e,t){return N("span",{className:T.default.doesNot},t,e)}})):null),checked:null==L||0===Object.keys(L).length},{name:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA,failingName:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA_FAILING,description:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA_DESCRIPTION,failingDescription:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA_DESCRIPTION_FAILING.format({onClick:function(){return u.default.setSection(O.GuildSettingsSections.MODERATION)}}),checked:null==P?void 0:P.protected}];return N("div",{className:(0,o.default)(T.default.container,r)},void 0,(j=(null==P?void 0:P.sufficient)?n(9840):n(9841),y?null:N("div",{className:T.default.header},void 0,N("img",{alt:"",src:j,className:T.default.headerIcon,width:40}),N(h.default,{tag:h.default.Tags.H2,size:h.default.Sizes.SIZE_16},void 0,(null==P?void 0:P.sufficient)?I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_GOOD_STANDING:I.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_BAD_STANDING.format({doesNotHook:function(e,t){return N("strong",{className:T.default.doesNot},t,e)}})))),U.filter((function(e){return!C||null==e.checked||!e.checked})).map((function(e,t){return N(a.Fragment,{},e.name,a.createElement(A,e),t<U.length-1?N("hr",{className:T.default.separator}):null)})))};P.displayName="GuildSettingsDiscoveryChecklist";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{fill:l,className:s,d:"M11 10.9C11 10.9 11 10.9 11 10.9V8.82929C9.83481 8.41746 9 7.30622 9 6C9 4.34315 10.3431 3 12 3C13.6569 3 15 4.34315 15 6H17C17 3.23858 14.7614 1 12 1C9.23858 1 7 3.23858 7 6C7 7.79499 7.94587 9.36906 9.36637 10.251L6.29491 16.0216C6.19867 16.0074 6.1002 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20C6.82012 20 7.52495 19.5064 7.83358 18.8H16.1664C16.475 19.5064 17.1799 20 18 20C19.1046 20 20 19.1046 20 18C20 16.8954 19.1046 16 18 16C17.1799 16 16.475 16.4936 16.1664 17.2H7.83359C7.82844 17.1882 7.82318 17.1765 7.81781 17.1648L11 10.9Z"}),o("path",{fill:l,className:s,d:"M12 8C10.8954 8 10 7.10457 10 6C10 4.89543 10.8954 4 12 4C13.1046 4 14 4.89543 14 6C14 6.43529 13.8609 6.8381 13.6248 7.16643L18 13C20.7614 13 23 15.2386 23 18C23 20.7614 20.7614 23 18 23C15.9497 23 14.1876 21.7659 13.416 20H15.7639C16.3132 20.6138 17.1115 21 18 21C19.6568 21 21 19.6569 21 18C21 16.3431 19.6568 15 18 15H17L12 8Z"}),o("path",{fill:l,className:s,d:"M10.584 20C9.8124 21.7659 8.05032 23 6 23C3.23858 23 1 20.7614 1 18C1 15.2386 3.23858 13 6 13V15C4.34315 15 3 16.3431 3 18C3 19.6569 4.34315 21 6 21C6.8885 21 7.68679 20.6138 8.23611 20H10.584Z"}))}i.displayName="Webhook"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeId=g,t.default=S;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(8317)),i=n(180),l=y(n(70)),u=y(n(12)),s=n(131),d=y(n(9855)),f=y(n(9856)),c=n(1),p=y(n(6)),v=y(n(7726));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){return"settings-integrations-webhook-"+e}function S(e){var t=e.webhooks,n=e.selectableWebhookChannels,r=e.lastCreatedWebhookId,s=e.editedWebhook,d=e.errors,f=e.canNavigate,c=a.useMemo((function(){return Object.values(n).map((function(e){return{value:e.id,label:(0,i.computeChannelName)(e,u.default,l.default,!0)}}))}),[n]),p=a.useMemo((function(){for(var e,r={},a=h(t);!(e=a()).done;){var o=e.value;if(o.channel_id in r)r[o.channel_id].webhooks.push(o);else{var i=n[o.channel_id];null!=i&&(r[o.channel_id]={channel:i,webhooks:[o]})}}return Object.values(r).sort((function(e,t){return e.channel.name.localeCompare(t.channel.name)}))}),[n,t]),y=a.useCallback((function(e){f()&&(e===(null==s?void 0:s.id)?o.default.stopEditingWebhook():o.default.startEditingWebhook(e))}),[f,s]);return _("div",{className:v.default.list},void 0,p.map((function(e){return O(e.channel,e.webhooks,c,r,s,d,y)})))}function O(e,t,n,r,a,o,y){return _("div",{},e.id,_(s.FormTitle,{className:v.default.groupHeader},void 0,p.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_SECTION.format({channelHook:function(){return _("span",{className:v.default.channelName},e.id,(0,i.computeChannelName)(e,u.default,l.default,!0))}})),t.map((function(e){return e.type===c.WebhookTypes.CHANNEL_FOLLOWER?_(d.default,{webhook:e,editedWebhook:a,channelOptions:n,isExpanded:(null==a?void 0:a.id)===e.id,onToggleExpand:function(){return y(e.id)},errors:o},e.id):_(f.default,{id:g(e.id),webhook:e,editedWebhook:a,channelOptions:n,isExpanded:(null==a?void 0:a.id)===e.id,isNew:r===e.id,onToggleExpand:function(){return y(e.id)},errors:o},e.id)})))}S.displayName="WebhookCardList",O.displayName="renderGroup"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(8)),i=n(1161),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this,t=this.props,n=t.intervalDuration,r=t.onInterval;this._interval=setInterval((function(){e.forceUpdate(),r&&r()}),n)},a.componentWillUnmount=function(){null!=this._interval&&clearInterval(this._interval)},a.defaultRender=function(e){var t=this.props,n=t.showDays,r=t.showUnits,a=t.className,i=[e.days,e.hours,e.minutes,e.seconds],u=[l.default.Messages.COUNTDOWN_UNITS_SECONDS,l.default.Messages.COUNTDOWN_UNITS_MINUTES,l.default.Messages.COUNTDOWN_UNITS_HOURS,l.default.Messages.COUNTDOWN_UNITS_DAYS];if(0===e.days)i.shift();else if(!n){var s=i.shift();i[0]+=24*s}return d("span",{className:a},void 0,(0,o.default)(i).map((function(e){return e<10?"0"+e:e})).map((function(e,t){return[t>0&&!r?":":" ",d("span",{},t,e,r?u[i.length-t-1]:null)]})).flatten().value())},a.render=function(){var e=this.props,t=e.deadline,n=e.children,r=e.className;if(t===1/0)return d("span",{className:r,"aria-label":l.default.Messages.MAX_AGE_NEVER},void 0,"∞");var a=(0,i.diffAsUnits)(Date.now(),t);return null!=n?n(a,this.defaultRender.bind(this,a)):this.defaultRender(a)},r}(a.PureComponent);c.displayName="Countdown",c.defaultProps={showDays:!0,showUnits:!1,intervalDuration:1e3};var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackApplicationFunnel=function(e,t){a.default.trackWithMetadata(o.AnalyticEvents.MKTG_APPLICATION_STEP,{application_type:e,step:t})};var r,a=(r=n(106))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){void 0===t&&(t=1e3);var r=(0,a.useForceUpdate)();return(0,i.default)((function(){r(),null!=n&&n()}),t),(0,o.diffAsUnits)(Date.now(),e)};var r,a=n(276),o=n(1161),i=(r=n(9898))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=n(57),l=p(n(29)),u=p(n(5969)),s=p(n(153)),d=n(1163),f=p(n(6)),c=p(n(7754));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).state={mode:u.default.Modes.DEFAULT},n._timeout=new i.Timeout,n.handleCopy=n.handleCopy.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var p=r.prototype;return p.componentWillUnmount=function(){this._timeout.stop()},p.render=function(){var e=this.props,t=e.isVertical,n=e.value,r=e.text,i=e.className,d=e.inputClassName,p=this.state.mode,v=p===u.default.Modes.SUCCESS?f.default.Messages.COPIED:r;return t?m("div",{className:(0,o.default)(i,p)},void 0,m(s.default,{value:n,inputClassName:d}),m(l.default,{className:c.default.button,onClick:this.handleCopy,size:l.default.Sizes.MIN,color:this.getVerticalButtonColor(p),look:l.default.Looks.FILLED},void 0,v)):a.createElement(u.default,y({},this.props,{onCopy:this.handleCopy,mode:p,text:v}))},p.handleCopy=function(){var e=this,t=this.props,n=t.onCopy,r=t.value,a=t.delay,o=(0,d.copy)(r);this.setState({mode:o?u.default.Modes.SUCCESS:u.default.Modes.ERROR}),this._timeout.start(a,(function(){return e.setState({mode:u.default.Modes.DEFAULT})})),n&&n()},p.getVerticalButtonColor=function(e){switch(e){case u.default.Modes.SUCCESS:return l.default.Colors.GREEN;case u.default.Modes.ERROR:return l.default.Colors.RED;default:return l.default.Colors.BRAND}},r}(a.PureComponent);h.displayName="CopyInput",h.defaultProps={isVertical:!1,delay:300};var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=c.default.getCategories(e),n=l.default.getActiveJoinedThreadsForGuild(e),r=l.default.getActiveJoinedUnreadThreadsForGuild(e),a=i.default.getState().channelId,o=f.default.getChannel(a);return h(t,n,r,o)},t.useFlattenedChannelIdListWithThreads=function(e){var t=(0,o.useStateFromStores)([c.default],(function(){return c.default.getCategories(e)})),n=(0,o.useStateFromStores)([l.default],(function(){return l.default.getActiveJoinedThreadsForGuild(e)})),a=(0,o.useStateFromStores)([l.default],(function(){return l.default.getActiveJoinedUnreadThreadsForGuild(e)})),u=i.default.getState().channelId,s=(0,o.useStateFromStores)([f.default],(function(){return f.default.getChannel(u)})),v=(0,o.useStateFromStores)([p.default],(function(){return p.default.getGuildChangeSentinel(e)})),y=(0,o.useStateFromStores)([d.default],(function(){return d.default.version}));return(0,r.useMemo)((function(){return h(t,n,a,s).map((function(e){return e.channel.id}))}),[t,n,a,s,v,y])};var r=n(0),a=y(n(8)),o=n(3),i=y(n(5939)),l=y(n(300)),u=n(9004),s=n(31),d=y(n(1212)),f=y(n(10)),c=y(n(1252)),p=y(n(1223)),v=y(n(9005));function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r){for(var o,i=[],l=m(e._categories);!(o=l()).done;)for(var d,f=function(){var e=d.value,o=e.channel;if(!(0,s.isGuildSelectableChannelType)(o.type))return"continue";var l=[],f=(0,u.shouldShowAllActiveJoinedThreads)(o,r)?t[o.id]:n[o.id];null==r||!s.THREAD_CHANNEL_TYPES.has(r.type)||r.parent_id!==o.id||null!=f&&r.id in f||l.push({channel:r,index:0}),null!=f&&(0,a.default)(f).values().sortBy("joinTimestamp").reverse().forEach((function(e,t){var n=e.channel;return l.push({channel:n,index:t})})),(!(0,v.default)(o,null==r?void 0:r.id)||l.length>0)&&i.push.apply(i,[e].concat(l))},c=m(e[o.value.channel.id]);!(d=c()).done;)f();return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(3)),a=f(n(2)),o=f(n(10)),i=f(n(5947)),l=f(n(15)),u=f(n(36)),s=f(n(699)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=null;function v(e){var t=e.link;p=t}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(i.default,s.default,u.default,l.default,o.default)},a.getHomeLink=function(){return p||i.default.fallbackRoute},r}(r.default.Store))(a.default,{OVERLAY_INITIALIZE:function(e){return t=s.default.getPrivateChannelIds(),void(((n=u.default.getChannelId(d.ME))||t[0])&&(p=d.Routes.CHANNEL(d.ME,n||t[0])));var t,n},APP_VIEW_SET_HOME_LINK:v,APPLICATION_STORE_LOCATION_CHANGE:function(e){v({link:e.location.pathname,type:d.ActionTypes.APP_VIEW_SET_HOME_LINK})},APPLICATION_STORE_RESET_NAVIGATION:function(e){return function(){if(null==p||!p.startsWith(d.Routes.APPLICATION_STORE))return!1;p=d.Routes.APPLICATION_STORE}()},CHANNEL_SELECT:function(e){var t=e.guildId,n=e.channelId;if(null==t&&null!=n){var r=d.Routes.CHANNEL(d.ME,n);if(r!==p)return p=r,!0}return!1},CHANNEL_DELETE:function(e){var t=e.channel;null==t.guild_id&&null!=t.id&&null!=p&&p===d.Routes.CHANNEL(d.ME,t.id)&&(p=null)}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={show:function(e,t){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.TUTORIAL_INDICATOR_SHOW,tutorialId:e,renderData:t})}))},hide:function(e){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.TUTORIAL_INDICATOR_HIDE,tutorialId:e})}))},dismiss:function(e){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.TUTORIAL_INDICATOR_DISMISS,tutorialId:e})})),r.default.put({url:o.Endpoints.TUTORIAL_INDICATOR(e),oldFormErrors:!0})},suppressAll:function(){a.default.dispatch({type:o.ActionTypes.TUTORIAL_INDICATOR_SUPPRESS_ALL}),r.default.post({url:o.Endpoints.TUTORIAL_INDICATORS_SUPPRESS,oldFormErrors:!0})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(9946)),i=u(n(709)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){return(d=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}).apply(this,arguments)}function f(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p={},v={},y=!0,m={},_=!1;function h(){return o.default}function E(){if(m={},!y)for(var e=h(),t=0,n=Object.entries(e);t<n.length;t++){var r=n[t],a=r[0],o=r[1],i=!1!==p[a];if(m[a]=i,i&&null!=o.prerequisites)for(var l,u=f(o.prerequisites);!(l=u()).done;){var s=l.value;!1===p[s]||(m[a]=!1)}}}var g=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.initialize=function(){E(),this.mustEmitChanges((function(e){return e.type!==l.ActionTypes.CONNECTION_OPEN})),this.waitFor(i.default)},a.shouldShow=function(e){return!(!_||y)&&(m[e]||!1)},a.shouldShowAnyIndicators=function(){return!y},a.getIndicators=function(){return v},a.getData=function(){return h()},a.getDefinition=function(e){var t=this.getData();return null!=t?t[e]:null},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){var t=e.tutorial;_=!0,y=!0,p={},null!=t&&(y=t.indicators_suppressed,t.indicators_confirmed.forEach((function(e){return p[e]=!1}))),E()},CONNECTION_CLOSED:function(e){_=!1},TUTORIAL_INDICATOR_DISMISS:function(e){var t;p=d({},p,((t={})[e.tutorialId]=!1,t)),delete(v=d({},v))[e.tutorialId],E()},TUTORIAL_INDICATOR_SHOW:function(e){var t;v=d({},v,((t={})[e.tutorialId]=e.renderData,t))},TUTORIAL_INDICATOR_HIDE:function(e){delete(v=d({},v))[e.tutorialId]},TUTORIAL_INDICATOR_SUPPRESS_ALL:function(e){y=!0}});t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;O(n(0));var r,a=n(3),o=n(389),i=g(n(8258)),l=O(n(8253)),u=g(n(81)),s=g(n(11)),d=g(n(8579)),f=g(n(8484)),c=g(n(8329)),p=g(n(8370)),v=g(n(9963)),y=g(n(8485)),m=g(n(8571)),_=g(n(9964)),h=g(n(9981)),E=g(n(6));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t=e.channel,n=e.guild,r=e.onSelect,g=t.isGuildStageVoice(),S=(0,a.useStateFromStores)([u.default],(function(){return g?u.default.getStageInstanceByChannel(t.id):void 0}),[g,t.id]),O=(0,h.default)(t,S),T=(0,v.default)(t),C=(0,m.default)(t),b=(0,p.default)(t),M=(0,y.default)(t,n,S),N=(0,d.default)(t,n),A=(0,f.default)(t,n),P=(0,c.default)(t),R=(0,i.default)(t.id),L=(0,_.default)(t);return s.default.isGuest()?null:I(l.default,{navId:"channel-context",onClose:o.closeContextMenu,"aria-label":E.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:r},void 0,I(l.MenuGroup,{},void 0,O),I(l.MenuGroup,{},void 0,T,C,b),I(l.MenuGroup,{},void 0,M,N,A),I(l.MenuGroup,{},void 0,P),I(l.MenuGroup,{},void 0,L),I(l.MenuGroup,{},void 0,R))}T.displayName="ChannelListVoiceChannelContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=0);var u,s=(0,o.computeChannelName)(e,a.default,r.default);switch(e.type){case i.ChannelTypes.DM:u=t?l.default.Messages.DIRECT_MESSAGE_A11Y_LABEL_WITH_UNREADS:l.default.Messages.DIRECT_MESSAGE_A11Y_LABEL;break;case i.ChannelTypes.GROUP_DM:u=t?l.default.Messages.GROUP_MESSAGE_A11Y_LABEL_WITH_UNREADS:l.default.Messages.GROUP_MESSAGE_A11Y_LABEL;break;case i.ChannelTypes.GUILD_STORE:u=l.default.Messages.GUILD_SIDEBAR_STORE_CHANNEL_A11Y_LABEL;break;case i.ChannelTypes.GUILD_ANNOUNCEMENT:u=n>0?l.default.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:t?l.default.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL_WITH_UNREADS:l.default.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL;break;default:u=n>0?l.default.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:t?l.default.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_UNREADS:l.default.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL}return u.format({channelName:s,mentionCount:n})};var r=u(n(70)),a=u(n(12)),o=n(180),i=n(1),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.search=f,t.searchByMode=function(e,t){var n=i.default.getQuery(e),r=function(e){switch(e){case u.SearchModes.MOST_RELEVANT:return{sort_by:"relevance",sort_order:"desc"};case u.SearchModes.OLDEST:return{sort_by:"timestamp",sort_order:"asc"};case u.SearchModes.NEWEST:default:return{sort_by:"timestamp",sort_order:"desc"}}}(t);return f(e,d({},n,{},r,{offset:0}))},t.searchNextPage=function(e,t){void 0===t&&(t=u.SEARCH_PAGE_SIZE);return c(e,t)},t.searchPreviousPage=function(e,t){void 0===t&&(t=u.SEARCH_PAGE_SIZE);return c(e,-t)},t.changePage=function(e,t){return p(e,t*u.SEARCH_PAGE_SIZE)},t.clearHistory=function(e){r.default.dispatch({type:u.ActionTypes.SEARCH_CLEAR_HISTORY,searchId:e})},t.ensureSearchState=function(e){r.default.wait((function(){r.default.dispatch({type:u.ActionTypes.SEARCH_ENSURE_SEARCH_STATE,searchId:e})}))},t.setSearchState=function(e,t){null!=e&&r.default.dirtyDispatch({type:u.ActionTypes.SEARCH_EDITOR_STATE_CHANGE,searchId:e,editorState:t})},t.clearSearchState=function(e){a.default.trackWithMetadata(u.AnalyticEvents.SEARCH_CLOSED,{search_id:i.default.getAnalyticsId(e)}),r.default.wait((function(){return r.default.dispatch({type:u.ActionTypes.SEARCH_EDITOR_STATE_CLEAR,searchId:e})}))},t.updateAutocompleteQuery=function(e,t,n){null!=e&&r.default.dirtyDispatch({type:u.ActionTypes.SEARCH_AUTOCOMPLETE_QUERY_UPDATE,searchId:e,tokens:t,cursorScope:n})},t.setShowBlockedResults=function(e,t){r.default.dispatch({type:u.ActionTypes.SEARCH_SET_SHOW_BLOCKED_RESULTS,searchId:e,showBlocked:t})};var r=s(n(2)),a=s(n(106)),o=s(n(8770)),i=s(n(1241)),l=s(n(12)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n){if(o.default.didAgree(e)){var s=l.default.getCurrentUser();t.include_nsfw=null==s.nsfwAllowed||s.nsfwAllowed}var d=Object.keys(t);a.default.trackWithMetadata(u.AnalyticEvents.SEARCH_STARTED,{search_type:i.default.getSearchType(),prev_search_id:i.default.getAnalyticsId(e),num_modifiers:d.length,modifiers:d.reduce((function(e,n){var r=t[n];return e[n]=Array.isArray(r)?r.length:1,e}),{})}),r.default.dispatch({type:u.ActionTypes.SEARCH_START,query:t,searchId:e,queryString:n})}function c(e,t){return p(e,i.default.getOffset(e)+t)}function p(e,t){var n=i.default.getQuery(e),r=i.default.getTotalResults(e);if(!(t<0||t>r))return f(e,d({},n,{offset:t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAlgoliaIndex=function(){if(null==_)return;var e=(0,a.default)("NKTZZ4AIZU",_,{responsesCache:(0,r.createNullCache)()}).initIndex(h);l.default.wait((function(){return l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_INIT,index:e})}))},t.doAlgoliaSearch=function(e,t,n){void 0===n&&(n=!0);var r=t.categoryId,a=void 0===r?u.DISCOVERY_ALL_CATEGORIES_ID:r,f=t.preferredLocale,p=t.offset,v=t.length,y=d.default.getSearchIndex();if(null==y)return;n&&function(e,t,n,r,a){var i=(0,s.getHistory)(),l=o.default.stringify({query:e,offset:n,limit:r,preferredLocale:t,categoryId:a}),u=i.location.search;if(!(null!=u&&u.length>0&&u.startsWith("?"))||u.startsWith("?")&&u.split("?")[1]!==l){var d={search:l};(0,s.transitionTo)(c.Routes.GUILD_DISCOVERY,d)}}(e,f,p,v,a);l.default.dirtyDispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_START,section:c.GuildDiscoverySections.SEARCH,query:e,categoryId:a});var _=[].concat(E);a!==u.DISCOVERY_ALL_CATEGORIES_ID&&_.push("(primary_category_id="+a+" OR categories.id="+a+")");var h=_.join(" AND "),g=["preferred_locale: "+f],S=["name","description","keywords","categories.name.default","categories.name."+f,"primary_category.name.default","primary_category.name."+f,"vanity_url_code"];try{var O=y.search(e,{filters:h,optionalFilters:g,length:v,offset:p,restrictSearchableAttributes:S}),I=i.default.get({url:c.Endpoints.GUILD_DISCOVERY_VALID_TERM,query:{term:e},oldFormErrors:!0});Promise.all([O,I]).then((function(t){var n=t[0],r=n.hits,o=n.nbHits,i=t[1].body.valid;l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_SUCCESS,section:c.GuildDiscoverySections.SEARCH,query:e,categoryId:a,guilds:i?[].concat(r.map((function(e){return m({},e,{id:e.objectID})}))):[],offset:p,limit:v,total:i?Math.min(o,u.MAX_ALGOLIA_PAGINATOR_RESULTS):0})})).catch((function(){l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_FAILURE,section:c.GuildDiscoverySections.SEARCH,categoryId:a,query:e})}))}catch(t){l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_FAILURE,section:c.GuildDiscoverySections.SEARCH,categoryId:a,query:e})}},t.getSearchResultsCount=function(e){var t=d.default.getSearchIndex();if(null==t)return;try{var n=t.search(e,{filters:E.join(" AND "),facets:["categories.id"]}),r=i.default.get({url:c.Endpoints.GUILD_DISCOVERY_VALID_TERM,query:{term:e},oldFormErrors:!0});Promise.all([n,r]).then((function(t){var n=t[0],r=n.nbHits,a=n.facets,o=t[1].body.valid;l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_UPDATE_COUNTS,query:e,nbHits:o?r:0,facets:o?a:void 0})}))}catch(t){l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_COUNTS_FAIL,query:e})}},t.fetchPopularGuildsForCategory=function(e){return g.apply(this,arguments)},t.fetchFeaturedOrPopularGuilds=function(e,t){return S.apply(this,arguments)},t.fetchGamesYouPlayGuilds=function(){return O.apply(this,arguments)},t.searchGuildDiscovery=function(e,t,n,r,a){return I.apply(this,arguments)},t.clearSearch=function(e){void 0===e&&(e=!0);e&&(0,s.transitionTo)(c.Routes.GUILD_DISCOVERY);l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_CLEAR_SEARCH})},t.selectCategory=function(e,t){void 0===t&&(t=!1);l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SELECT_CATEGORY,categoryId:e,isHomepage:t})};var r=n(10433),a=p(n(10434)),o=p(n(137)),i=p(n(14)),l=p(n(2)),u=n(1213),s=n(42),d=p(n(1275)),f=p(n(470)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))}}function m(){return(m=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}).apply(this,arguments)}var _=window.GLOBAL_ENV.ALGOLIA_KEY,h="production"===window.GLOBAL_ENV.PROJECT_ENV?"prod_discoverable_guilds":"staging"===window.GLOBAL_ENV.PROJECT_ENV?"stg_discoverable_guilds":"dev_discoverable_guilds",E=["auto_removed: false","approximate_presence_count > 0","approximate_member_count > 0"];function g(){return(g=y(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_POPULAR_FETCH_START,categoryId:t}),e.prev=1,e.next=4,i.default.get({url:c.Endpoints.GUILD_DISCOVERY,query:o.default.stringify({categories:[t]}),oldFormErrors:!0});case 4:n=e.sent,r=n.body.guilds,l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_POPULAR_FETCH_SUCCESS,categoryId:t,guilds:r}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_POPULAR_FETCH_FAILURE,categoryId:t});case 12:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}function S(){return(S=y(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.default.dirtyDispatch({type:c.ActionTypes.GUILD_DISCOVERY_FETCH_START,section:c.GuildDiscoverySections.FEATURED}),e.prev=1,e.next=4,i.default.get({url:c.Endpoints.GUILD_DISCOVERY,query:o.default.stringify({offset:t,limit:n}),oldFormErrors:!0});case 4:T(e.sent.body,c.GuildDiscoverySections.FEATURED),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_FETCH_FAILURE,section:c.GuildDiscoverySections.FEATURED});case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function O(){return(O=y(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.default.applicationStatistics,n=Object.keys(t),l.default.dirtyDispatch({type:c.ActionTypes.GUILD_DISCOVERY_FETCH_START,section:c.GuildDiscoverySections.GAMES_YOU_PLAY}),e.prev=3,e.next=6,i.default.get({url:c.Endpoints.GUILD_DISCOVERY,query:o.default.stringify({application_ids:n}),oldFormErrors:!0});case 6:T(e.sent.body,c.GuildDiscoverySections.GAMES_YOU_PLAY),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_FETCH_FAILURE,section:c.GuildDiscoverySections.GAMES_YOU_PLAY});case 13:case"end":return e.stop()}}),e,null,[[3,10]])})))).apply(this,arguments)}function I(){return(I=y(regeneratorRuntime.mark((function e(t,n,r,a,s){var d,f,p,v,y,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===s&&(s=u.DISCOVERY_ALL_CATEGORIES_ID),l.default.dirtyDispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_START,section:c.GuildDiscoverySections.SEARCH,query:t,categoryId:s}),e.prev=2,e.next=5,i.default.get({url:c.Endpoints.GUILD_DISCOVERY,query:o.default.stringify({query:t,offset:r,limit:a,preferred_locale:n}),oldFormErrors:!0});case 5:d=e.sent,f=d.body,p=f.offset,v=f.limit,y=f.guilds,m=f.total,l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_SUCCESS,section:c.GuildDiscoverySections.SEARCH,query:t,categoryId:s,guilds:y,offset:p,limit:v,total:m}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_SEARCH_FETCH_FAILURE,section:c.GuildDiscoverySections.SEARCH,categoryId:s,query:t});case 13:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}function T(e,t){var n=e.offset,r=e.limit,a=e.guilds,o=e.total;l.default.dispatch({type:c.ActionTypes.GUILD_DISCOVERY_FETCH_SUCCESS,section:t,guilds:a,offset:n,limit:r,total:o})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(5941),l=f(n(184)),u=f(n(199)),s=n(1),d=f(n(7801));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t,n=e.folderIndex,r=e.index,f=e.isExpandedFolder,c=e.offset,p=a.useMemo((function(){return{accept:[s.GuildsBarDragTypes.GUILD,s.GuildsBarDragTypes.FOLDER],options:{arePropsEqual:l.default},canDrop:function(e,t){if(e.folderIndex===n&&e.index===r)return!1;if(t.getItemType()===s.GuildsBarDragTypes.FOLDER){if(null!=r)return!1;if(f&&1===c)return!1}return!0},hover:function(e){var t=n,a=r;if(0!==c)if(f){if(null!=r)return;a=0}else null==r?t+=c:null!=a&&(a+=c);e.folderIndex<t&&null==e.index?t-=1:e.folderIndex===t&&null!=a&&null!=e.index&&e.index<a&&(a-=1),t===e.folderIndex&&a===e.index||(u.default.move(e.index,a,e.folderIndex,t),e.folderIndex=t,e.index=a)},collect:function(e){return{canDrop:e.canDrop(),isDraggingFolder:e.getItemType()===s.GuildsBarDragTypes.FOLDER}}}}),[n,r,f,c]),v=(0,i.useDrop)(p),y=v[0],m=y.canDrop,_=y.isDraggingFolder,h=v[1],E=_||null!=r||e.isExpandedFolder||e.isLastItem?d.default.half:d.default.edge;return a.createElement("span",{ref:h,className:(0,o.default)(E,(t={},t[d.default.higher]=e.isLastItem,t[d.default.autoPointerEvents]=m,t))})}function y(e){var t,n=e.onDragOverChanged,r=e.folderIndex,f=e.index,c=a.useMemo((function(){return{accept:s.GuildsBarDragTypes.GUILD,options:{arePropsEqual:l.default},canDrop:function(e){return e.folderIndex!==r||e.index!==f},drop:function(e){var t=r;null==e.index&&e.folderIndex<t&&(t-=1),u.default.move(e.index,-1,e.folderIndex,t)},collect:function(e){return{canDrop:e.canDrop(),isOver:e.isOver()}}}}),[r,f]),p=(0,i.useDrop)(c),v=p[0],y=v.canDrop,m=v.isOver,_=p[1];return a.useLayoutEffect((function(){null!=n&&n(m)}),[n,m]),a.createElement("span",{ref:_,className:(0,o.default)(d.default.middle,(t={},t[d.default.autoPointerEvents]=y,t))})}v.displayName="EdgeDropTarget",y.displayName="CenterDropTarget";var m=a.memo((function(e){var t=e.folderIndex,n=e.index,r=e.isExpandedFolder,a=e.isLastItem,o=e.onDragOverChanged;return p("div",{className:d.default.wrapper,"aria-hidden":!0},void 0,p(v,{folderIndex:t,index:n,offset:0,isLastItem:a}),null==n&&!r&&!a&&p(y,{folderIndex:t,index:n,onDragOverChanged:o}),!a&&p(v,{folderIndex:t,index:n,offset:1,isExpandedFolder:r}))}));t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(192),l=d(n(61)),u=n(139),s=d(n(7802));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}var v=[18,18,16,16,14,12,10];var y=function(e){var t,n,r,d,f=e.children,y=e.icon,m=e.name,_=e.ariaLabel,h=e.className,E=e.style,g=e.to,S=e.onClick,O=e.selected,I=void 0!==O&&O,T=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","icon","name","ariaLabel","className","style","to","onClick","selected"]),C=(0,i.useHistory)();null==y&&null!=m&&(d=function(e){return v[e.length-1]||v[v.length-1]}(r=(0,u.getAcronym)(m)));var b="string"==typeof g?g:g.pathname,M=a.useCallback((function(e){if("string"==typeof g)C.push(g);else{var t=g.pathname,n=g.state;C.push(t,n)}null!=S&&S(e)}),[C,g,S]);return a.createElement(l.default,p({},T,{href:b,onClick:M,className:(0,o.default)(h,s.default.wrapper,(t={},t[s.default.selected]=I,t)),"aria-label":null!==(n=_||m)&&void 0!==n?n:"",style:p({},E,{fontSize:d}),focusProps:{enabled:!1}}),null!=r?c("div",{className:(0,o.default)(s.default.childWrapper,s.default.acronym),"aria-hidden":!0},void 0,r):null,null!=y?c("img",{className:s.default.icon,src:y,alt:"",width:48,height:48,"aria-hidden":!0}):null,null!=f?c("div",{className:s.default.childWrapper},void 0,f):null)};y.displayName="NavItem";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=g(n(0)),o=h(n(391)),i=n(389),l=h(n(10037)),u=h(n(8323)),s=h(n(8258)),d=g(n(8253)),f=h(n(10038)),c=h(n(11)),p=n(41),v=h(n(10039)),y=h(n(8441)),m=h(n(8399)),_=h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.channel,n=e.selected,r=e.onSelect,h=t.isOwner(c.default.getId()),E=(0,y.default)(t),g=(0,m.default)(t),I=(0,v.default)(t,n),T=(0,s.default)(t.id),C=(0,u.default)(t);return null==t||t.isManaged()?null:O(d.default,{navId:"gdm-context","aria-label":_.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onClose:i.closeContextMenu,onSelect:r},void 0,O(d.MenuGroup,{},void 0,E),O(d.MenuGroup,{},void 0,h?O(d.MenuItem,{id:"instant-invites",label:_.default.Messages.INSTANT_INVITES,action:function(){return(0,p.openModal)((function(e){return a.createElement(l.default,S({channelId:t.id},e))}))}}):null,O(d.MenuControlItem,{id:"change-icon",showDefaultFocus:!0,control:function(e,n){return a.createElement(f.default,S({onChange:function(n){var r;o.default.setIcon(t.id,n),null===(r=e.onClose)||void 0===r||r.call(e)},multiple:!1,showEditingModal:!0,"aria-label":_.default.Messages.CHANGE_ICON},e,{ref:n}))},label:_.default.Messages.CHANGE_ICON}),null!=t.icon?O(d.MenuItem,{id:"remove-icon",label:_.default.Messages.REMOVE_ICON,action:function(){return o.default.setIcon(t.id,null)}}):null),O(d.MenuGroup,{},void 0,C),O(d.MenuGroup,{},void 0,g),O(d.MenuGroup,{},void 0,I),O(d.MenuGroup,{},void 0,T))}I.displayName="GroupDMContextMenu"},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=ue;var r,a=Z(n(0)),o=K(n(9)),i=n(394),l=n(95),u=Z(n(3)),s=n(57),d=K(n(363)),f=Z(n(10043)),c=K(n(9211)),p=K(n(10044)),v=K(n(1315)),y=K(n(416)),m=n(10045),_=Z(n(10046)),h=Z(n(8567)),E=K(n(1177)),g=K(n(5963)),S=n(8660),O=n(8570),I=K(n(5834)),T=n(5964),C=K(n(5975)),b=K(n(5976)),M=n(5687),N=K(n(11)),A=K(n(1265)),P=K(n(5947)),R=K(n(1160)),L=K(n(55)),D=K(n(8950)),w=K(n(149)),j=Z(n(475)),k=K(n(159)),U=K(n(13)),G=n(121),F=K(n(5992)),B=K(n(5977)),H=Z(n(5961)),x=K(n(5978)),V=n(1),W=K(n(6)),Y=K(n(7806)),z=K(n(370));function K(e){return e&&e.__esModule?e:{default:e}}function $(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return $=function(){return e},e}function Z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=$();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function q(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function X(){return(X=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}).apply(this,arguments)}function J(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){J(o,r,a,i,l,"next",e)}function l(e){J(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}u.default.initialize();var ne,re=/\.$/,ae=function(e){return Array.isArray(e)?e.map((function(e){return e.replace(re,"")})).join(". ").trim():e};!function(e){e[e.REGISTER_FORM=0]="REGISTER_FORM",e[e.SMS_VERIFY_CODE=1]="SMS_VERIFY_CODE"}(ne||(ne={}));var oe=q(H.InviteResolvingHeader,{}),ie=q(p.default,{fromRegister:!0}),le=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).dateOfBirthRef=a.createRef(),n._retryTimer=new s.Timeout,n.handleCaptchaVerify=function(e){return n.setState({captchaKey:e},(function(){n.isPhoneRegistration()?n.finishPhoneRegistration():n.handleRegister()}))},n.handleGotoLogin=function(){var e=n.state.login,t=n.props,r=t.onLoginStart,a=t.giftCode,o=t.transitionTo,l=t.invite,u=t.guildTemplate,s=t.redirectTo,f=t.isGuest,c=t.location,p=t.closeRegister,v=t.openLogin;if(f)return void 0!==p&&p(),void(void 0!==v&&v());var y,m=null!=c?(0,i.parse)(c.search):{};null!=l?y=V.Routes.INVITE_LOGIN(l.code):null!=a?y=V.Routes.GIFT_CODE_LOGIN(a.code):null!=u?y=V.Routes.GUILD_TEMPLATE_LOGIN(u.code):null!=s?(y=V.Routes.LOGIN,m.redirect_to=s):(y=V.Routes.LOGIN,""!==e&&(m={email:e})),d.default.loginReset(),o(y,{search:(0,i.stringify)(m)}),null!=r&&r(),G.ComponentDispatch.dispatch(V.ComponentActions.WAVE_EMPHASIZE)},n.isPhoneRegistration=function(){var e=n.state.loginMode,t=n.props,r=t.invite,a=t.desktopPhoneRegistrationConfig.variant,o=n.getFullLogin();if(null!=r)return!1;switch(a){case f.PhoneRegistrationVariant.CombinedInput:return(0,T.getPhoneOrEmail)(o)===T.PhoneOrEmailSelectorForceMode.PHONE;case f.PhoneRegistrationVariant.SplitTabInputs:case f.PhoneRegistrationVariant.SubtleInputSwitcher:return e===T.PhoneOrEmailSelectorForceMode.PHONE;default:return!1}},n.handleSubmit=function(){var e=Q(regeneratorRuntime.mark((function e(t){var r,a,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.preventDefault(),r=n.state.parsedDateOfBirth,a=n.props,o=a.invite,null!==a.consentRequired){e.next=5;break}return e.abrupt("return");case 5:if(null!=o||null!=r){e.next=7;break}return e.abrupt("return");case 7:if(!n.isPhoneRegistration()){e.next=20;break}return i=n.getFullLogin(),n.setState({phoneRegistering:!0}),e.prev=10,e.next=13,(0,_.registerPhone)({phone:i});case 13:n.setState({phoneRegistering:!1,registerPage:ne.SMS_VERIFY_CODE}),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(10),n.setState({phoneRegistering:!1});case 19:return e.abrupt("return");case 20:n.handleRegister();case 21:case"end":return e.stop()}}),e,null,[[10,16]])})));return function(t){return e.apply(this,arguments)}}(),n.handleBirthdayChange=function(e){n.setState({parsedDateOfBirth:e})},n.handleClickSMSVerifyBack=function(){n.setState({smsVerifyCode:"",smsVerifyCodeError:null,registerPage:ne.REGISTER_FORM})},n.handleSubmitSMSVerifyCode=function(e){null==e||e.preventDefault(),n.handleVerifySMSCode()},n.handleVerifySMSCode=Q(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.state.smsVerifyCode,r=n.getFullLogin(),n.setState({verifyingSMSCode:!0}),G.ComponentDispatch.dispatch(V.ComponentActions.WAVE_EMPHASIZE),e.prev=4,e.next=7,I.default.verifyPhone(r,t,!1);case 7:a=e.sent,n.setState({phoneToken:a.token},n.finishPhoneRegistration),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),n.setState({smsVerifyCodeError:e.t0.body.message,verifyingSMSCode:!1});case 14:case"end":return e.stop()}}),e,null,[[4,11]])}))),n.finishPhoneRegistration=Q(regeneratorRuntime.mark((function e(){var t,r,a,o,i,l,u,s,d,f,c,p,v,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.state,r=t.username,a=t.password,o=t.captchaKey,i=t.consent,l=t.parsedDateOfBirth,u=t.phoneToken,s=n.props,d=s.invite,f=s.guildTemplate,c=s.giftCode,p=s.onRegister,v=null!=d?d.code:null,y=null!=c?c.skuId:null,u){e.next=6;break}return e.abrupt("return");case 6:return n.setState({verifyingSMSCode:!0}),G.ComponentDispatch.dispatch(V.ComponentActions.WAVE_EMPHASIZE),e.prev=8,e.next=11,(0,_.registerFull)({phoneToken:u,username:r,consent:i,password:a,invite:v,guildTemplateCode:null==f?void 0:f.code,giftCodeSKUId:y,captchaKey:o,birthday:l});case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(8);case 15:return e.prev=15,n.setState({verifyingSMSCode:!1}),e.finish(15);case 18:p&&p();case 19:case"end":return e.stop()}}),e,null,[[8,13,15,18]])})));var r=null!=t.location?(0,i.parse)(t.location.search):{};return n.state={login:r.email||"",loginPrefix:"",username:"",password:"",parsedDateOfBirth:null,captchaKey:null,consent:!t.consentRequired,consentRequiredProp:t.consentRequired,isRateLimited:!1,phoneRegistering:!1,registerPage:ne.REGISTER_FORM,smsVerifyCode:"",smsVerifyCodeError:null,verifyingSMSCode:!1,loginMode:t.desktopPhoneRegistrationConfig.defaultInputMode,phoneToken:null},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,te(t,n);var l,u,c,p=r.prototype;return p.hasConsent=function(){var e=this.props.consentRequired,t=this.state.consent;return null!=e&&t},p.getFullLogin=function(){var e=this.state;return e.loginPrefix+e.login},p.componentDidMount=function(){this.redirectIfAuthenticated();var e=this.props,t=e.giftCodeSKU,n=e.invite;U.default.track(V.AnalyticEvents.REGISTER_VIEWED,X({location:null!=n?"Invite Register Page":"Non-Invite Register Page",registration_source:this.registrationSource},null!=t?(0,E.default)(t,!1,!1):{}),{flush:!0}),null==this.props.consentRequired&&d.default.getLocationMetadata(),(0,M.trackAppUIViewed)("register")},p.componentWillUnmount=function(){this._retryTimer.stop()},r.getDerivedStateFromProps=function(e,t){var n=e.consentRequired;return null==t.consentRequiredProp&&null!=n?{consent:!n,consentRequiredProp:n}:{consentRequiredProp:n}},p.componentDidUpdate=function(e,t){var n=this,r=this.props,a=r.apiErrors,o=r.authenticated,i=r.desktopPhoneRegistrationConfig,l=i.variant,u=i.defaultInputMode,s=r.isUnderage,d=r.invite,f=r.onChangeStep,c=this.state,p=c.parsedDateOfBirth,v=c.registerPage;if(l!==e.desktopPhoneRegistrationConfig.variant&&this.setState({loginMode:u}),e.apiErrors!==a||t.parsedDateOfBirth!==p){this.hasError("email")||this.hasError("phone")?null!=this.emailRef&&this.emailRef.focus():this.hasError("username")?null!=this.usernameRef&&this.usernameRef.focus():this.hasError("password")?null!=this.passwordRef&&this.passwordRef.focus():null==this.state.parsedDateOfBirth?null!=this.dateOfBirthRef.current&&this.dateOfBirthRef.current.focus():this.hasError("retry_after")&&(this.setState({isRateLimited:!0}),this._retryTimer.start(1e3*this.props.apiErrors.retry_after,(function(){n.setState({isRateLimited:!1})})));var y=["email","phone","username","password","phoneToken"].some((function(e){return n.hasError(e)}));v===ne.SMS_VERIFY_CODE&&y&&this.setState({registerPage:ne.REGISTER_FORM,smsVerifyCode:"",smsVerifyCodeError:null})}o&&!e.authenticated&&this.redirectIfAuthenticated();var _=m.RegistrationSteps.FULL;s||this.hasError("date_of_birth")?_=m.RegistrationSteps.AGE_GATE:this.hasError("captcha_key")?_=m.RegistrationSteps.CAPTCHA:null!=d?_=m.RegistrationSteps.INVITE:v===ne.SMS_VERIFY_CODE&&(_=m.RegistrationSteps.SMS_VERIFY),f(_)},p.redirectIfAuthenticated=function(){var e=this.props,t=e.authenticated,n=e.transitionTo,r=e.redirectTo;t&&((0,S.setNewUser)(O.NewUserTypes.ORGANIC_REGISTERED),n(null!=r?r:P.default.defaultRoute))},p.handleRegister=function(){var e=Q(regeneratorRuntime.mark((function e(){var t,n,r,a,o,i,l,u,s,d,f,c,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state,n=t.username,r=t.password,a=t.captchaKey,o=t.consent,i=t.parsedDateOfBirth,l=this.props,u=l.invite,s=l.guildTemplate,d=l.giftCode,f=l.onRegister,c=null!=u?u.code:null,p=null!=d?d.skuId:null,v=this.getFullLogin(),G.ComponentDispatch.dispatch(V.ComponentActions.WAVE_EMPHASIZE),e.prev=6,null==u){e.next=12;break}return e.next=10,(0,_.default)({username:n,consent:o,invite:c,giftCodeSKUId:p,captchaKey:a});case 10:e.next=14;break;case 12:return e.next=14,(0,_.registerFull)({email:v,username:n,consent:o,password:r,invite:c,guildTemplateCode:null==s?void 0:s.code,giftCodeSKUId:p,captchaKey:a,birthday:i});case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(6);case 18:f&&f();case 19:case"end":return e.stop()}}),e,this,[[6,16]])})));return function(){return e.apply(this,arguments)}}(),p.hasError=function(e){return null!=this.props.apiErrors[e]},p.renderConsentComponents=function(){var e=this,t=this.state.consent,n=null,r=null;return this.props.consentRequired?r=q(L.default,{className:z.default.marginTop20,align:L.default.Align.CENTER},void 0,q(R.default,{value:t,type:R.default.Types.INVERTED,onChange:function(t,n){return e.setState({consent:n})},className:Y.default.checkbox},void 0,q(j.SubText,{},void 0,W.default.Messages.TERMS_PRIVACY_OPT_IN.format({termsURL:V.MarketingURLs.TERMS,privacyURL:V.MarketingURLs.PRIVACY})))):n=q(j.SubText,{className:z.default.marginTop20},void 0,W.default.Messages.TERMS_PRIVACY.format({termsURL:V.MarketingURLs.TERMS,privacyURL:V.MarketingURLs.PRIVACY})),{subText:n,consentText:r}},p.renderInviteResolving=function(){var e=this,t=this.props.authBoxClassName;return q(j.default,{className:t},void 0,oe,q(j.Block,{className:z.default.marginTop40},void 0,q(k.default,{},void 0,W.default.Messages.FORM_LABEL_USERNAME),q(w.default,{text:W.default.Messages.AUTH_USERNAME_TOOLTIP,position:w.default.Positions.RIGHT,color:w.default.Colors.BRAND},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return q(j.Input,{autoFocus:!0,className:z.default.marginBottom8,name:"username",value:e.state.username,placeholder:W.default.Messages.FORM_PLACEHOLDER_USERNAME,onChange:function(t){return e.setState({username:t})},onMouseEnter:n,onMouseLeave:r})})),q(j.Button,{className:z.default.marginTop20,disabled:!0},void 0,W.default.Messages.CONTINUE),q(j.Button,{look:j.Button.Looks.LINK,color:j.Button.Colors.LINK,disabled:!0,className:z.default.marginTop8},void 0,W.default.Messages.ALREADY_HAVE_ACCOUNT),q(j.SubText,{disabled:!0,className:z.default.marginTop20},void 0,W.default.Messages.TERMS_PRIVACY.format({termsURL:V.MarketingURLs.TERMS,privacyURL:V.MarketingURLs.PRIVACY}))))},p.renderInvite=function(){var e=this,t=this.props,n=t.invite,r=t.registering,o=t.consentRequired,i=t.authBoxClassName,l=t.apiErrors.username,u=this.state.consent,s=this.renderConsentComponents(),d=s.subText,f=s.consentText,c=null!=(null==n?void 0:n.stage_instance),p=q(w.default,{text:!u&&o?W.default.Messages.TERMS_PRIVACY_OPT_IN_TOOLTIP:null},void 0,(function(t){return a.createElement("div",X({className:z.default.marginTop20},t),q(j.Button,{type:"submit",submitting:r,disabled:!e.hasConsent(),color:c?j.Button.Colors.GREEN:j.Button.Colors.BRAND},void 0,c?W.default.Messages.INSTANT_INVITE_ACCEPT_STAGE:W.default.Messages.CONTINUE))}));return q("div",{},void 0,q(j.default,{onSubmit:this.handleSubmit,tag:"form",className:i},void 0,c&&null!=(null==n?void 0:n.guild)?q(h.default,{stageInstance:null==n?void 0:n.stage_instance,guild:n.guild}):q(H.default,{invite:n}),q(j.Block,{className:z.default.marginTop40},void 0,q(k.default,{error:ae(l)},void 0,W.default.Messages.FORM_LABEL_USERNAME),q(w.default,{text:W.default.Messages.AUTH_USERNAME_TOOLTIP,position:w.default.Positions.RIGHT,color:w.default.Colors.BRAND},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return q(j.Input,{autoFocus:!0,className:z.default.marginBottom8,name:"username",value:e.state.username,placeholder:W.default.Messages.FORM_PLACEHOLDER_USERNAME,onChange:function(t){return e.setState({username:t})},error:null!=l?"":null,onMouseEnter:n,onMouseLeave:r})})),f,p,q(j.Button,{look:j.Button.Looks.LINK,color:j.Button.Colors.LINK,onClick:this.handleGotoLogin,className:z.default.marginTop8},void 0,W.default.Messages.ALREADY_HAVE_ACCOUNT),d)),null!=n&&c?q(j.default,{className:z.default.marginTop20},void 0,q(h.StageInviteFooter,{guild:n.guild,onlineCount:n.approximate_presence_count})):null)},p.renderErrorMessage=function(){var e=this.props.apiErrors.message;return null!=e?q(j.SubText,{className:(0,o.default)(z.default.marginTop20,Y.default.errorMessage)},void 0,e):null},p.renderEmailInput=function(){var e=this,t=this.state.login,n=this.props.apiErrors.email;return q(j.Input,{autoFocus:!0,label:W.default.Messages.FORM_LABEL_EMAIL,className:z.default.marginBottom20,name:"email",value:t,onChange:function(t){return e.setState({login:t})},error:ae(n),type:"email",setRef:function(t){e.emailRef=t}})},p.renderPhoneOrEmailInput=function(e){var t,n=this,r=this.state.login,o=this.props,i=o.country,l=o.apiErrors,u=l.phone,s=l.email;return a.createElement(b.default,X({autoFocus:!0,alpha2:i.alpha2,countryCode:i.code,label:W.default.Messages.FORM_LABEL_EMAIL_OR_PHONE_NUMBER,value:r,onChange:function(e,t){return n.setState({login:e,loginPrefix:t})},error:null!==(t=ae(u))&&void 0!==t?t:ae(s),setRef:function(e){n.emailRef=e}},e))},p.renderLoginInput=function(e){var t=this,n=e.variant,r=e.defaultInputMode,a=this.state.loginMode;switch(n){case f.PhoneRegistrationVariant.CombinedInput:return q(j.Block,{className:z.default.marginBottom20},void 0,this.renderPhoneOrEmailInput());case f.PhoneRegistrationVariant.SplitTabInputs:var o={name:"Phone",value:T.PhoneOrEmailSelectorForceMode.PHONE},i={name:"Email",value:T.PhoneOrEmailSelectorForceMode.EMAIL};return q(j.Block,{className:z.default.marginBottom20},void 0,q(D.default,{options:r===T.PhoneOrEmailSelectorForceMode.PHONE?[o,i]:[i,o],value:a,onChange:function(e){var n=e.value;return t.setState({loginMode:n})},className:Y.default.segmentControl,optionClassName:Y.default.segmentControlOption,selectedOptionClassName:Y.default.segmentControlOptionSelected}),this.renderPhoneOrEmailInput({forceMode:a,label:a===T.PhoneOrEmailSelectorForceMode.PHONE?W.default.Messages.FORM_LABEL_PHONE_NUMBER:W.default.Messages.FORM_LABEL_EMAIL}));case f.PhoneRegistrationVariant.SubtleInputSwitcher:return a===T.PhoneOrEmailSelectorForceMode.PHONE?q(j.Block,{className:z.default.marginBottom20},void 0,this.renderPhoneOrEmailInput({forceMode:T.PhoneOrEmailSelectorForceMode.PHONE,label:W.default.Messages.FORM_LABEL_PHONE_NUMBER}),q(j.Button,{onClick:function(){return t.setState({loginMode:T.PhoneOrEmailSelectorForceMode.EMAIL})},className:Y.default.subtleLoginSwitcher,look:j.Button.Looks.LINK,color:j.Button.Colors.LINK},void 0,W.default.Messages.USE_EMAIL)):q(j.Block,{className:z.default.marginBottom20},void 0,this.renderPhoneOrEmailInput({forceMode:T.PhoneOrEmailSelectorForceMode.EMAIL,label:W.default.Messages.FORM_LABEL_EMAIL}),q(j.Button,{onClick:function(){return t.setState({loginMode:T.PhoneOrEmailSelectorForceMode.PHONE})},className:Y.default.subtleLoginSwitcher,look:j.Button.Looks.LINK,color:j.Button.Colors.LINK},void 0,W.default.Messages.USE_PHONE));default:return this.renderEmailInput()}},p.renderSMSVerifyCodePage=function(){var e=this,t=this.props,n=t.authBoxClassName,r=t.apiErrors.message,a=this.state,i=a.smsVerifyCode,l=a.verifyingSMSCode,u=a.smsVerifyCodeError,s=this.getFullLogin();return q(j.default,{tag:"form",className:(0,o.default)(Y.default.smsVerifyCodeBox,n),onSubmit:this.handleSubmitSMSVerifyCode},void 0,q(j.Title,{className:z.default.marginBottom8},void 0,W.default.Messages.SMS_CONFIRMATION_TITLE),q(j.SubTitle,{},void 0,W.default.Messages.SMS_CONFIRMATION_DESCRIPTION.format({phone:s})),q(j.Block,{className:z.default.marginTop40},void 0,q(j.Input,{name:"sms_verify_code",className:z.default.marginBottom20,autoComplete:"off",spellCheck:"false",maxLength:10,autoFocus:!0,label:W.default.Messages.CONFIRMATION_CODE,error:u,disabled:l,value:i,onChange:function(t){return e.setState({smsVerifyCode:t})}}),r&&q(j.SubText,{className:(0,o.default)(Y.default.errorMessage,Y.default.smsVerifyErrorMessage)},void 0,r)),q(j.AuthBoxFooter,{justify:L.default.Justify.BETWEEN},void 0,q(j.Button,{type:"submit",color:j.Button.Colors.BRAND,size:j.Button.Sizes.LARGE,fullWidth:!1,disabled:i.length<6,submitting:l},void 0,W.default.Messages.CONTINUE),q(j.Button,{look:j.Button.Looks.BLANK,size:j.Button.Sizes.MIN,fullWidth:!1,onClick:this.handleClickSMSVerifyBack},void 0,W.default.Messages.BACK)))},p.renderFull=function(e,t){var n=this,r=this.state,i=r.username,l=r.password,u=r.consent,s=r.parsedDateOfBirth,d=r.phoneRegistering,c=this.props,p=c.registering,y=c.consentRequired,m=c.isGuest,_=c.authBoxClassName,h=c.desktopPhoneRegistrationConfig,E=c.apiErrors,g=(E=void 0===E?{}:E).username,S=E.password,O=E.date_of_birth;f.default.trackExposure({});var I=this.renderLoginInput(h),T=this.renderConsentComponents(),C=T.subText,b=T.consentText,M=this.renderErrorMessage(),N=q(w.default,{text:!u&&y?W.default.Messages.TERMS_PRIVACY_OPT_IN_TOOLTIP:null},void 0,(function(e){return a.createElement("div",X({className:z.default.marginTop20},e),q(j.Button,{type:"submit",submitting:p||d,disabled:!n.hasConsent()||n.state.isRateLimited},void 0,W.default.Messages.CONTINUE))})),A=m?null:null!=e?e():q(j.Title,{},void 0,W.default.Messages.REGISTER_TITLE),P=q(j.Block,{className:z.default.marginTop20},void 0,I,q(j.Input,{label:W.default.Messages.FORM_LABEL_USERNAME,className:z.default.marginBottom20,name:"username",value:i,onChange:function(e){return n.setState({username:e})},error:ae(g),setRef:function(e){n.usernameRef=e}}),q(j.Input,{label:W.default.Messages.FORM_LABEL_PASSWORD,name:"password",value:l,onChange:function(e){return n.setState({password:e})},error:ae(S),type:"password",setRef:function(e){n.passwordRef=e}}),a.createElement(v.default,{label:W.default.Messages.AGE_GATE_YOUR_BIRTHDAY,wrapperClassName:z.default.marginTop20,name:"date_of_birth",onChange:this.handleBirthdayChange,ref:this.dateOfBirthRef,error:ae(O),value:s}),b,N,M,q(j.Button,{look:j.Button.Looks.LINK,color:j.Button.Colors.LINK,onClick:this.handleGotoLogin,className:z.default.marginTop8},void 0,W.default.Messages.ALREADY_HAVE_ACCOUNT),C);return t?q(x.default,{onSubmit:this.handleSubmit,tag:"form",className:(0,o.default)(_,Y.default.horizontalAuthBox)},void 0,(function(){return[A,q("div",{className:Y.default.flex},void 0,q(j.Title,{className:Y.default.createAccountTemplateHeader},void 0,W.default.Messages.REGISTER_TITLE),P)]})):q(j.default,{onSubmit:this.handleSubmit,tag:"form",className:_},void 0,A,P)},p.render=function(){var e=this.props,t=e.isGuest,n=e.authBoxClassName,r=e.isUnderage,a=e.apiErrors,o=a.captcha_service,i=a.captcha_sitekey,l=this.state.registerPage;if(r||this.hasError("date_of_birth"))return ie;if(this.hasError("captcha_key"))return q(F.default,{authBoxClassName:n,onVerify:this.handleCaptchaVerify,title:t?null:W.default.Messages.REGISTER_TITLE,captchaService:o,sitekey:i});var u=this.props,s=u.invite,d=u.giftCode,f=u.guildTemplate;if(null!=s)return s.state===V.InviteStates.RESOLVING?this.renderInviteResolving():this.renderInvite();var c=q(g.default,{guildTemplate:f}),p=q(B.default,{giftCode:d});switch(l){case ne.SMS_VERIFY_CODE:return this.renderSMSVerifyCodePage();default:return null!=f?this.renderFull((function(){return c}),!0):null!=d?this.renderFull((function(){return p})):this.renderFull()}},l=r,(u=[{key:"registrationSource",get:function(){var e=this.props,t=e.giftCode,n=e.guildTemplate,r=e.invite;return null!=t?"gift":null!=n?"guild_template":null!=r?null!=r.guild?"guild_invite":"dm_invite":null}}])&&ee(l.prototype,u),c&&ee(l,c),r}(a.PureComponent);function ue(e){var t={consentRequired:(0,u.useStateFromStores)([A.default],(function(){return A.default.getAuthenticationConsentRequired()})),registering:(0,u.useStateFromStores)([N.default],(function(){return N.default.getRegisterStatus()===V.RegistrationStates.REGISTERING})),apiErrors:(0,u.useStateFromStores)([N.default],(function(){return N.default.getErrors()})),authenticated:(0,u.useStateFromStores)([N.default],(function(){return N.default.isAuthenticated()})),isUnderage:(0,u.useStateFromStores)([c.default],(function(){return c.default.isUnderageAnonymous()})),country:(0,u.useStateFromStores)([C.default],(function(){return C.default.getCountryCode()})),desktopPhoneRegistrationConfig:f.default.useExperiment({})[0]},n=a.useState(m.RegistrationSteps.FULL),r=n[0],o=n[1];return(0,y.default)({type:l.ImpressionTypes.VIEW,name:l.ImpressionNames.USER_REGISTRATION,metadata:{impression_group:l.ImpressionGroups.USER_REGISTRATION_FLOW,step:r}},{},[r]),a.createElement(le,X({onChangeStep:function(e){return o(e)}},e,t))}le.displayName="Register",le.defaultProps={giftCodeResolved:!1,transitionTo:function(t){return e.location.assign(t)}},ue.displayName="ConnectedRegister"}).call(this,n(44))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canReportInChannel=s,t.canReportUser=d,t.canReportMessage=function(e){return null!=e&&d(e.author)&&s(e.getChannelId())};var r=u(n(10)),a=u(n(684)),o=u(n(40)),i=u(n(12)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=r.default.getChannel(e);if(null==t)return!1;if(t.type===l.ChannelTypes.DM||t.type===l.ChannelTypes.GROUP_DM)return!0;if(o.default.canWithPartialContext(l.Permissions.MANAGE_MESSAGES,{channelId:e})){var n=a.default.getMemberCount(t.getGuildId());return null!=n&&n>=50}return!1}function d(e){if(null==e)return!1;var t=e.id,n=i.default.getNullableCurrentUser();return!(null==n||!n.verified)&&n.id!==t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=l.default.getMessages(e),c=r.default.maxBy(n.toArray().filter((function(e){return e.id<t})),"id"),p=null==c?d.default.atPreviousMillisecond(t):c.id,v=s.default.getCurrentUser(),y=0;if(n.forAll((function(e){e.id>p&&(0,u.shouldBadgeMessage)(e,v)&&y++})),(0,o.isArchivedOrUnjoinedThread)(i.default.getChannel(e)))throw Error("markUnread cannot be used with archived/unjoined threads");a.default.post({url:f.Endpoints.MESSAGE_ACK(e,p),body:{manual:!0,mention_count:y},oldFormErrors:!0})};var r=c(n(8)),a=c(n(14)),o=n(698),i=c(n(10)),l=c(n(201)),u=n(200),s=c(n(12)),d=c(n(97)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementFromMessageId=function(e){return document.getElementById((0,b.getMessageDOMId)(e))},t.ThreadStarterChatMessage=function(e){var t,n=e.id,r=e.message,s=e.message.messageReference,d=e.compact,c=void 0!==d&&d,p=e.className;(0,i.default)(r.type===F.MessageTypes.THREAD_STARTER_MESSAGE,"Message must be a thread starter message");var v,y=K({},(0,l.useListItem)(null!==(t=e.id)&&void 0!==t?t:"")),m=(0,u.useStateFromStores)([f.default],(function(){return f.default.getMessageByReference(s)})),_=q(r.id,T.DEFAULT_POPOUTS),h=_.popouts,E=_.setPopout,S=Z(r,!1);return r.type===F.MessageTypes.THREAD_STARTER_MESSAGE&&null!=m&&m.state===f.ReferencedMessageState.LOADED?a.createElement(X,K({},e,{message:m.message,groupId:m.message.id})):a.createElement(g.default,K({},y,{id:n,compact:c,className:(0,o.default)(p,(v={},v[H.default.message]=!0,v[H.default.cozyMessage]=!c,v[H.default.systemMessage]=!0,v[H.default.groupStart]=!0,v)),childrenHeader:(0,w.default)(e,E,h,s),childrenSystemMessage:(0,G.default)(e),childrenMessageContent:null,"aria-label":S,hasThread:!1}))},t.default=void 0;var r,a=W(n(0)),o=x(n(9)),i=x(n(23)),l=n(680),u=n(3),s=x(n(105)),d=x(n(8437)),f=W(n(706)),c=n(42),p=n(1209),v=x(n(10)),y=x(n(8333)),m=x(n(70)),_=x(n(39)),h=x(n(10092)),E=x(n(61)),g=x(n(8424)),S=n(121),O=n(1161),I=n(99),T=n(1254),C=x(n(1216)),b=n(8541),M=x(n(685)),N=x(n(682)),A=n(8542),P=x(n(10105)),R=x(n(8497)),L=x(n(8830)),D=x(n(10106)),w=x(n(10113)),j=x(n(10115)),k=x(n(10117)),U=x(n(10120)),G=x(n(8654)),F=n(1),B=x(n(6)),H=x(n(7343));function x(e){return e&&e.__esModule?e:{default:e}}function V(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return V=function(){return e},e}function W(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=V();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function z(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function K(){return(K=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}).apply(this,arguments)}function $(e){return Object.keys(e).some((function(t){return e[t]}))}function Z(e,t){var n=(0,N.default)(e).nick;if(t)return B.default.Messages.CHANNEL_MESSAGE_A11Y_LABEL.format({author:n,timestamp:(0,O.dateFormat)(e.timestamp,"LT"),content:C.default.unparse(e.content,e.channel_id,!0)})}function q(e,t){var n=a.useState(t),r=n[0],o=n[1],i=a.useState($(r)),l=i[0],u=i[1],s=a.useRef(l),d=a.useRef(null),f=a.useCallback((function(e){o((function(t){var n=K({},t,{},e),r=$(n);return r!==s.current&&(s.current=r,null!=d.current&&(cancelAnimationFrame(d.current),d.current=null),r?u(!0):d.current=requestAnimationFrame((function(){return u(!1)}))),n}))}),[]),c=F.ComponentActions.TOGGLE_REACTION_POPOUT(e);return a.useEffect((function(){var e=function(e){return f({emojiPicker:e})};return S.ComponentDispatch.subscribe(c,e),function(){S.ComponentDispatch.unsubscribe(c,e)}}),[c,f]),{popouts:r,setPopout:f,selected:l}}function X(e){var t,n,r=e.id,i=e.message,d=e.message,p=d.id,v=d.channel_id,y=e.channel.guild_id,h=e.compact,S=void 0!==h&&h,O=e.className,C=e.groupId,b=i.type===F.MessageTypes.REPLY?i.messageReference:void 0,N=(0,l.useListItem)(null!==(t=e.id)&&void 0!==t?t:""),D=N.onFocus,k=z(N,["onFocus"]),x=(0,A.useFocusInside)(D),V=x.isFocused,W=x.handleFocus,$=x.handleBlur,X=q(i.id,T.DEFAULT_POPOUTS),J=X.popouts,Q=X.selected,ee=X.setPopout,te=(0,u.useStateFromStores)([_.default],(function(){var e=_.default.inlineEmbedMedia,t=_.default.renderEmbeds;return e&&t})),ne=(0,u.useStateFromStores)([f.default],(function(){return f.default.getMessageByReference(b)})),re=(0,A.useHoveredMessage)(C,i.author.id,Q),ae=re.handleMouseEnter,oe=re.handleMouseLeave,ie=re.isHovered,le=(0,u.useStateFromStores)([s.default],(function(){return s.default.keyboardModeEnabled})),ue=Q||le&&V,se=ue||ie,de=(0,R.default)(i,te,se,!1),fe=de.content,ce=de.hasSpoilerEmbeds,pe=(0,P.default)(p,v,le),ve=Z(i,!1),ye=(0,j.default)(e,fe,!1),me=a.useCallback((function(){return(0,c.transitionToGuild)(y,v,p)}),[y,v,p]);return(0,u.useStateFromStores)([m.default],(function(){var e;return m.default.isBlocked(null===(e=i.author)||void 0===e?void 0:e.id)}))?null:Y("div",{className:H.default.quotedChatMessage},void 0,Y(E.default,{className:H.default.jump,onClick:me,"aria-label":B.default.Messages.JUMP},void 0,B.default.Messages.JUMP),a.createElement(g.default,K({},k,{id:r,compact:S,className:(0,o.default)(O,(n={},n[H.default.message]=!0,n[H.default.cozyMessage]=!S,n[H.default.mentioned]=i.mentioned&&!(0,M.default)(i),n[H.default.ephemeral]=(0,I.hasFlag)(i.flags,F.MessageFlags.EPHEMERAL),n[H.default.systemMessage]=(0,M.default)(i),n[H.default.groupStart]=i.id===C||i.type===F.MessageTypes.REPLY,n[H.default.selected]=ue,n)),zalgo:!0,onKeyDown:pe,onFocus:W,onBlur:$,childrenRepliedMessage:(0,U.default)(e,ee,J,b,ne),childrenHeader:(0,w.default)(e,ee,J,b,ne),childrenAccessories:(0,L.default)(e,ce,(function(){}),se,!1,!1),childrenSystemMessage:(0,G.default)(e),childrenMessageContent:ye,onMouseMove:ae,onMouseLeave:oe,"aria-label":ve,hasThread:!1})))}X.displayName="QuotedChatMessage";var J=a.memo((function(e){var t,n,r,c=e.id,m=e.message,E=e.message.id,S=e.channel,O=e.channel.id,C=e.compact,b=void 0!==C&&C,N=e.className,B=e.flashKey,x=e.groupId;(0,i.default)(m.type!==F.MessageTypes.THREAD_STARTER_MESSAGE,"Message must not be a thread starter message");var V=F.MessageTypesWithLazyLoadedReferences.has(m.type)?m.messageReference:void 0,W=(0,l.useListItem)(null!==(t=e.id)&&void 0!==t?t:""),$=W.onFocus,X=z(W,["onFocus"]),J=(0,u.useStateFromStores)([_.default],(function(){var e=_.default.inlineEmbedMedia,t=_.default.renderEmbeds;return e&&t})),Q=(0,u.useStateFromStores)([f.default],(function(){return f.default.getMessageByReference(V)})),ee=q(m.id,T.DEFAULT_POPOUTS),te=ee.popouts,ne=ee.selected,re=ee.setPopout,ae=(0,A.useContextMenuMessage)(m,S,re),oe=(0,A.useClickMessage)(m,S),ie=(0,A.useHoveredMessage)(x,m.author.id,ne),le=ie.handleMouseEnter,ue=ie.handleMouseLeave,se=ie.hasHovered,de=ie.isHovered,fe=(0,A.useFocusInside)($),ce=fe.isFocused,pe=fe.hasFocused,ve=fe.handleFocus,ye=fe.handleBlur,me=(0,u.useStateFromStores)([y.default],(function(){return y.default.isEditing(O,E)}),[O,E]),_e=(0,u.useStateFromStores)([s.default],(function(){return s.default.keyboardModeEnabled})),he=ne||me||_e&&ce,Ee=he||de,ge=(0,R.default)(m,J,Ee,!1),Se=ge.content,Oe=ge.hasSpoilerEmbeds,Ie=(0,P.default)(E,O,_e),Te=Z(m,!1),Ce=(0,u.useStateFromStores)([d.default],(function(){return d.default.getPendingReply(O)})),be=(0,j.default)(e,Se,me),Me=function(e){var t=a.useRef(e);return a.useEffect((function(){t.current=e||t.current})),e||t.current}(B),Ne=(0,p.useCanSeeThreads)(),Ae=(0,u.useStateFromStores)([v.default],(function(){return m.hasFlag(F.MessageFlags.HAS_THREAD)&&v.default.getChannel(m.id)})),Pe=a.createElement(g.default,K({},X,{id:c,compact:b,className:(0,o.default)(N,(n={},n[H.default.message]=!0,n[H.default.cozyMessage]=!b,n[H.default.mentioned]=m.mentioned&&!(0,M.default)(m),n[H.default.ephemeral]=(0,I.hasFlag)(m.flags,F.MessageFlags.EPHEMERAL),n[H.default.systemMessage]=(0,M.default)(m),n[H.default.groupStart]=m.id===x||m.type===F.MessageTypes.REPLY,n[H.default.selected]=he,n[H.default.replying]=(null==Ce?void 0:Ce.message.id)===m.id,n[H.default.interactionSending]=m.type===F.MessageTypes.APPLICATION_COMMAND&&m.state===F.MessageStates.SENDING,n)),zalgo:!me,onContextMenu:ae,onKeyDown:Ie,onClick:oe,onFocus:ve,onBlur:ye,childrenRepliedMessage:(0,U.default)(e,re,te,V,Q),childrenExecutedCommand:(0,k.default)(e,re,te),childrenHeader:(0,w.default)(e,re,te,V,Q),childrenAccessories:(0,L.default)(e,Oe,ae,Ee),childrenButtons:se||pe?(0,D.default)(e,re,te):void 0,childrenSystemMessage:(0,G.default)(e),childrenMessageContent:be,onMouseMove:le,onMouseLeave:ue,"aria-label":Te,hasThread:Ne&&m.hasFlag(F.MessageFlags.HAS_THREAD)&&null!=Ae,isSystemMessage:(0,M.default)(m),hasReply:m.type===F.MessageTypes.REPLY}));return null!=Me?Y(h.default,{flashKey:Me,className:(0,o.default)((r={},r[H.default.backgroundFlash]=!0,r[H.default.groupStart]=!b&&m.id===x,r))},void 0,Pe):Pe}));t.default=J},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canReplyToMessage=u,t.useCanReplyToMessage=function(e,t){return(0,a.useStateFromStores)([i.default],(function(){return u(e,t,i.default)}))};var r=n(92),a=n(3),o=l(n(685)),i=l(n(40));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return(e.isPrivate()?!e.isSystemDM():n.can(r.Permissions.SEND_MESSAGES,e)&&n.can(r.Permissions.READ_MESSAGE_HISTORY,e))&&!(0,o.default)(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=T(n(3)),a=T(n(2)),o=I(n(1301)),i=n(180),l=I(n(706)),u=T(n(11)),s=T(n(10)),d=T(n(56)),f=T(n(15)),c=T(n(51)),p=T(n(201)),v=T(n(8359)),y=T(n(70)),m=T(n(36)),_=T(n(181)),h=T(n(39)),E=T(n(12)),g=n(1),S=T(n(6));function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e){return e&&e.__esModule?e:{default:e}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=[],M=null,N=null,A=null;function P(){if(!o.supported)return!1;var e=h.default.locale;N||(N=window.speechSynthesis&&window.speechSynthesis.getVoices());var t=N.filter((function(t){return t.lang===e||t.lang.slice(0,e.length)===e}));M=t.length>0?t[0]:null}function R(e,t,n,r){var a=f.default.getGuild(n),o=e.replace(g.MARKDOWN_SPOILER_REGEXP_GLOBAL,S.default.Messages.SPOILER).replace(/<@!?(\d+)>/g,(function(e,t){var r=E.default.getUser(t);return null==r?e:d.default.getNick(n,r.id)||r.username})).replace(/<@&?(\d+)>/g,(function(e,t){var n=null!=a?a.roles[t]:null;return null!=n&&null!=n.name?n.name:S.default.Messages.MESSAGE_TTS_DELETED_ROLE})).replace(/<#(\d+)>/g,(function(e,t){var n=s.default.getChannel(t);return null==n?e:(0,i.computeChannelName)(n,E.default,y.default)})).replace(/<a?:(\w+):(\d+)>/g,(function(e,t){return S.default.Messages.EMOJI+" "+t})).replace(/<\/([^\s]+?):(\d+)>/g,(function(e,t){return"/"+t}));return null==r?S.default.Messages.MESSAGE_TTS.format({username:t,body:o}):S.default.Messages.MESSAGE_TTS_REPLY.format({username:t,body:o,replyUsername:r})}function L(){a.default.dispatch({type:g.ActionTypes.STOP_SPEAKING_MESSAGE})}function D(){return null!==A&&A.utterance.removeEventListener("end",L),o.cancelAll(),A=null,!0}var w=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(u.default,m.default,v.default,c.default,E.default,h.default,f.default,l.default)},a.isSpeakingMessage=function(e,t){return null!==A&&A.channelId===e&&A.messageId===t},r}(r.default.Store))(a.default,__OVERLAY__?{}:{SPEAK_MESSAGE:function(e){var t,n,r=e.messageId,a=e.channelId,i=s.default.getChannel(a);if(null==i)return!1;var u=p.default.getMessage(a,r);if(null==u)return!1;var f=u.type===g.MessageTypes.REPLY?l.default.getMessageByReference(u.messageReference):null,c=(null==f?void 0:f.state)===l.ReferencedMessageState.LOADED?null==f||null===(t=f.message)||void 0===t?void 0:t.author:null,v=c?null!==(n=d.default.getNick(i.guild_id,null==c?void 0:c.id))&&void 0!==n?n:c.username:null,y=i.getGuildId(),m=d.default.getNick(y,u.author.id)||u.author.username,_=R(u.content,m,y,v);M||P(),null!==A&&D();var h=o.createUtterance(_);return h.addEventListener("end",L),o.speakUtterance(h,M),A={utterance:h,messageId:u.id,channelId:i.id},!0},STOP_SPEAKING_MESSAGE:function(e){return D()},MESSAGE_CREATE:function(e){var t=e.channelId,n=e.message;if(e.optimistic||c.default.isSelfDeaf())return!1;var r=s.default.getChannel(t);if(null==r)return!1;var a=t===m.default.getChannelId(),i=h.default.enableTTSCommand&&n.tts&&a,l=v.default.getTTSType(),f=n.author.id!==u.default.getId()&&(l===g.TTSNotificationTypes.ALL_CHANNELS||l===g.TTSNotificationTypes.SELECTED_CHANNEL&&a);if((i||f)&&!y.default.isBlocked(n.author.id)){var p,E;if(b.indexOf(n.id)>=0)return!1;b.unshift(n.id)>10&&b.pop();var S=r.getGuildId();if(S&&_.default.getMutedChannels(S).has(t))return!1;var O=d.default.getNick(S,n.author.id)||n.author.username,I=n.type===g.MessageTypes.REPLY?null===(p=n.referenced_message)||void 0===p?void 0:p.author:null,T=I?null!==(E=d.default.getNick(S,null==I?void 0:I.id))&&void 0!==E?E:I.username:null,C=R(n.content,O,S,T);M||P();var N=o.speak(C,M,g.MAX_TTS_LENGTH);null!=N&&(A={utterance:N,messageId:n.id,channelId:n.channel_id})}return!1},MESSAGE_DELETE:function(e){var t,n,r=e.id,a=e.channelId;return(r===(null===(t=A)||void 0===t?void 0:t.messageId)||a===(null===(n=A)||void 0===n?void 0:n.channelId))&&(o.cancelAll(),A=null,!0)},AUDIO_TOGGLE_SELF_DEAF:function(e){c.default.isSelfDeaf()&&o.cancelAll()},USER_SETTINGS_UPDATE:function(e){return P()},I18N_LOAD_SUCCESS:function(e){return P()}});t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(29)),l=d(n(149)),u=d(n(248)),s=d(n(7904));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.tooltipText,n=e.children,r=e.onContextMenu,d=e.onClick,f=e.disabled,v=e.icon,y=e.iconForeground,m=e.innerClassName,_=e.tooltipClassName,h=e.onMouseEnter,E=e.onMouseLeave,g=e["aria-label"],S=e["aria-checked"],O=e.role,I=e.tooltipColor,T=e.tooltipForceOpen,C=p(v,{width:20,height:20,foreground:y});return p(l.default,{tooltipClassName:_,text:t,"aria-label":g,color:I,forceOpen:T},void 0,(function(e){var t,l=e.onClick,v=e.onMouseEnter,y=e.onMouseLeave,_=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick","onMouseEnter","onMouseLeave"]);return a.createElement(i.default,c({},_,{look:i.default.Looks.BLANK,size:i.default.Sizes.NONE,disabled:f,innerClassName:m,className:(0,o.default)(s.default.button,(t={},t[s.default.disabled]=f,t[s.default.enabled]=!f,t)),onClick:function(e){null!=l&&l(),null!=d&&d(e)},onMouseEnter:function(){null==v||v(),null==h||h()},onMouseLeave:function(){null==y||y(),null==E||E()},onContextMenu:r,role:O,"aria-checked":S}),null!=n?p(u.default,{width:20,height:20,mask:u.default.Masks.PANEL_BUTTON},void 0,C):C,n)}))}v.displayName="PanelButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(8)),a=v(n(5)),o=v(n(3)),i=v(n(14)),l=v(n(2)),u=v(n(31)),s=v(n(162)),d=v(n(8569)),f=v(n(89)),c=v(n(10)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(){return(h=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}).apply(this,arguments)}var E,g,S,O,I,T=p.FormStates.CLOSED,C={},b={},M=!1,N=!1,A=["name","type","topic","bitrate","userLimit","nsfw","rateLimitPerUser","defaultAutoArchiveDuration","rtcRegion","videoQualityMode","threadMetadata"];function P(e){if(null==g||g.id!==e)return!1;if(g===S){var t=c.default.getChannel(e);if(null==t)return!1;S=g=t,O=c.default.getChannel(S.parent_id)}else{var n=c.default.getChannel(e);if(null==n)return!1;g=n,null!=S&&(S=S.set("permissionOverwrites",g.permissionOverwrites),O=c.default.getChannel(S.parent_id))}return!0}function R(e){var t=c.default.getChannel(e.channelId);if(null==t)return D();T=p.FormStates.OPEN,null!=(S=g=t)&&(S=S.set("nsfw",S.isNSFW())),O=c.default.getChannel(S.parent_id),I=S.getGuildId(),C={},L({section:E||p.ChannelSettingsSections.OVERVIEW})}function L(e){E=e.section,null!=S&&E===p.ChannelSettingsSections.INSTANT_INVITES&&(M=!0,i.default.get({url:p.Endpoints.INSTANT_INVITES(S.id),oldFormErrors:!0}).then((function(e){M=!1,l.default.dispatch({type:p.ActionTypes.CHANNEL_SETTINGS_LOADED_INVITES,invites:e.body})}),(function(){return M=!1})))}function D(){N=!1,T=p.FormStates.CLOSED,E=null,S=g=null,O=null,b={}}var w=r.default.debounce((function(){if(null==S||null==g)return!1;var e=S.toJS(),t=g.toJS();A.every((function(n){return e[n]===t[n]}))&&S!==g&&(S=g,k.emitChange())}),500);function j(e){return new d.default({code:e.code,temporary:e.temporary,revoked:e.revoked,inviter:null!=e.inviter?new f.default(e.inviter):null,channel:new u.default(e.channel),guild:null!=e.guild?new s.default(e.guild):null,uses:e.uses,maxUses:e.max_uses,maxAge:e.max_age,createdAt:(0,a.default)(e.created_at)})}var k=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(c.default)},a.hasChanges=function(){return S!==g},a.isOpen=function(){return N},a.getSection=function(){return E},a.getInvites=function(){return{invites:b,loading:M}},a.showNotice=function(){return this.hasChanges()},a.getChannel=function(){return S},a.getFormState=function(){return T},a.getCategory=function(){return O},a.getProps=function(){return{submitting:T===p.FormStates.SUBMITTING,errors:C,channel:S,section:E,invites:b,selectedOverwriteId:I,hasChanges:this.hasChanges()}},r}(o.default.Store))(l.default,{CHANNEL_SETTINGS_INIT:R,CHANNEL_SETTINGS_OPEN:function(e){N=!0,R(e)},CHANNEL_SETTINGS_SUBMIT:function(e){T=p.FormStates.SUBMITTING},CHANNEL_SETTINGS_SUBMIT_SUCCESS:function(e){return g=S,void(T=p.FormStates.OPEN)},CHANNEL_SETTINGS_SUBMIT_FAILURE:function(e){T=p.FormStates.OPEN,C=e.errors||{}},CHANNEL_SETTINGS_CLOSE:function(e){return D()},CHANNEL_SETTINGS_OVERWRITE_SELECT:function(e){var t=e.overwriteId;I=t},CHANNEL_SETTINGS_UPDATE:function(e){var t=e.name,n=e.channelType,r=e.topic,a=e.bitrate,o=e.userLimit,i=e.nsfw,l=e.rateLimitPerUser,u=e.autoArchiveDuration,s=e.defaultAutoArchiveDuration,d=e.rtcRegion,f=e.videoQualityMode;if(null==S)return!1;null!=t&&(S=S.set("name",t)),null!=r&&(S=S.set("topic",r)),null!=a&&(S=S.set("bitrate",a)),null!=o&&(S=S.set("userLimit",o)),null!=i&&(S=S.set("nsfw",i)),null!=l&&(S=S.set("rateLimitPerUser",l)),null!=u&&(S=S.update("threadMetadata",{},(function(e){return e.autoArchiveDuration=u,e}))),null!=s&&(S=S.set("defaultAutoArchiveDuration",s)),null!=n&&(S=S.set("type",n)),void 0!==d&&(S=S.set("rtcRegion",d)),null!=f&&(S=S.set("videoQualityMode",f)),w()},CHANNEL_SETTINGS_SET_SECTION:L,CHANNEL_SETTINGS_LOADED_INVITES:function(e){b={},e.invites.forEach((function(e){b[e.code]=j(e)}))},CHANNEL_UPDATES:function(e){var t=e.updates;if(null==S)return!1;for(var n,r=!1,a=m(t);!(n=a()).done;){P(n.value.channel.id)&&null!=S&&(null!=I&&null==S.permissionOverwrites[I]&&(I=S.getGuildId()),r=!0)}return r},CHANNEL_DELETE:function(e){var t=e.channel.id;return null!=S&&(S.id===t&&void(T=p.FormStates.CLOSED))},INSTANT_INVITE_REVOKE_SUCCESS:function(e){delete(b=h({},b))[e.code]},INSTANT_INVITE_CREATE_SUCCESS:function(e){var t;b=h({},b,((t={})[e.invite.code]=j(e.invite),t))}}),U=k;t.default=U},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={showChangeLog:function(e){a.default.dispatch({type:o.ActionTypes.CHANGE_LOG_OPEN,query:e})},hideChangeLog:function(){a.default.dispatch({type:o.ActionTypes.CHANGE_LOG_CLOSE})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchLibrary=function(){return f.apply(this,arguments)},t.createTestModeLibraryApplications=function(e){return c.apply(this,arguments)},t.setActiveLaunchOptionId=function(e,t,n){a.default.dispatch({type:l.ActionTypes.LIBRARY_APPLICATION_ACTIVE_LAUNCH_OPTION_UPDATE,applicationId:e,branchId:t,launchOptionId:n})};var r=u(n(14)),a=u(n(2)),o=u(n(1352)),i=n(289),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,i.httpGetWithCountryCodeQuery)({url:l.Endpoints.LIBRARY,oldFormErrors:!0});case 3:t=e.sent,a.default.dispatch({type:l.ActionTypes.LIBRARY_FETCH_SUCCESS,libraryApplications:t.body}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a.default.dispatch({type:l.ActionTypes.LIBRARY_FETCH_FAIL,error:e.t0});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function c(){return(c=d(regeneratorRuntime.mark((function e(t){var n,i,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(n=t.primarySkuId)){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,r.default.get({url:l.Endpoints.APPLICATION_BRANCH_LIST(t.id),oldFormErrors:!0}).then((function(e){return e.body}));case 5:i=e.sent,u=i.map((function(e){return o.default.createForTestMode({id:t.id,skuId:n,branch:e})})),a.default.dispatch({type:l.ActionTypes.LIBRARY_APPLICATIONS_TEST_MODE_ENABLED,libraryApplications:u});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(24)),o=l(n(7414)),i=l(n(9088));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.icon,n=e.message,r=e.onClick,l=e.autoFocus;return s("button",{className:o.default.container,onClick:r,autoFocus:l},void 0,s("img",{className:o.default.icon,alt:"",src:t}),s(a.default,{className:o.default.text,size:a.default.Sizes.SIZE_16},void 0,n),s("img",{className:o.default.arrow,alt:"",src:i.default}))}d.displayName="ListSelectionItem"},function(e,t,n){e.exports=n.p+"5e8985b40ca5104dadceeccaa81c23ca.svg"},function(e,t,n){e.exports=n.p+"a01602a0c0bd856ebed967db1785d5a7.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_,t.HubEmailConnectionModalView=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(95),i=n(395),l=n(1220),u=n(35),s=p(n(9100)),d=p(n(9101)),f=p(n(6)),c=p(n(7427));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y(d.default,{});function _(e){var t=e.transitionState,n=e.onClose;a.useEffect((function(){(0,l.hideHotspot)(i.HotspotLocations.HUB_SECOND_EMAIL_CONNECTION_UPSELL)}),[]);return y(u.ModalRoot,{className:c.default.modalRoot,transitionState:t,"aria-label":f.default.Messages.HUB_WAITLIST_MODAL_JOIN_HEADER,impressionName:o.ImpressionNames.HUB_EMAIL_SIGNUP},void 0,y(u.ModalContent,{className:c.default.modalContent},void 0,y("div",{className:c.default.container},void 0,y("div",{className:c.default.sidebarContainer},void 0,m),y("div",{className:c.default.contentContainer},void 0,y(u.ModalCloseButton,{onClick:function(){n&&n()},className:c.default.closeButton}),y(s.default,{onClose:n})))))}_.displayName="HubEmailConnectionModal";var h=y(d.default,{}),E=function(e){var t=e.invite;return y("div",{className:c.default.container},void 0,y("div",{className:c.default.sidebarContainer},void 0,h),y("div",{className:c.default.contentContainer},void 0,y(s.default,{invite:t})))};t.HubEmailConnectionModalView=E,E.displayName="HubEmailConnectionModalView"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(95),a=u(n(2)),o=u(n(482)),i=n(1274),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}var f={signup:function(e){return o.default.post({url:l.Endpoints.HUB_WAITLIST_SIGNUP,body:{email:e},trackedActionData:{event:r.NetworkActionNames.HUB_WAITLIST_SIGNUP,metadata:function(e){var t,n=!1,r=null==e||null===(t=e.body)||void 0===t?void 0:t.email_domain;null!=r&&(n=-1!==r.split(".").indexOf("edu"));return(0,i.exact)({is_edu_email:n})}}})},sendVerificationEmail:function(e){return d(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.default.post({url:l.Endpoints.HUB_EMAIL_VERIFY_SEND,body:{email:e},trackedActionData:{event:r.NetworkActionNames.HUB_EMAIL_VERIFY_SEND,metadata:function(e){var t,n=null==e||null===(t=e.body)||void 0===t?void 0:t.has_matching_guild;return(0,i.exact)({has_matching_guild:n})}}});case 2:return n=t.sent,t.abrupt("return",n.body);case 4:case"end":return t.stop()}}),t)})))()},verify:function(e){return d(regeneratorRuntime.mark((function t(){var n,i,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e){t.next=12;break}return t.prev=1,t.next=4,o.default.post({url:l.Endpoints.HUB_EMAIL_VERIFY,body:{token:e},trackedActionData:{event:r.NetworkActionNames.HUB_EMAIL_VERIFY}});case 4:i=t.sent,u=null===(n=i.body.guild)||void 0===n?void 0:n.id,a.default.dispatch({type:l.ActionTypes.HUB_VERIFY_EMAIL_SUCCESS,guildId:u}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),a.default.dispatch({type:l.ActionTypes.HUB_VERIFY_EMAIL_FAILURE,errors:t.t0.body});case 12:case"end":return t.stop()}}),t,null,[[1,9]])})))()}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(9)),o=i(n(7429));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className"]);return r.createElement("div",u({className:(0,a.default)(o.default.gifTag,t)},n))}s.displayName="GIFTag"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("polygon",{className:f,fill:d,points:"0 0 0 14 11 7",transform:"translate(7 5)"}))}d.displayName="Play"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M19.73 9L21 10.27l-2.23 2.23L21 14.73 19.73 16l-2.23-2.23L15.27 16 14 14.73l2.23-2.23L14 10.27 15.27 9l2.23 2.23z",fillRule:"evenodd"}),s("path",{fill:d,className:f,d:"M11.38 3.08a1 1 0 0 0-1.09.22L6 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3l4.29 4.71A1 1 0 0 0 12 20V4a1 1 0 0 0-.62-.92z"}))}d.displayName="SpeakerMuted"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=O(n(0)),o=g(n(9)),i=g(n(707)),l=g(n(9292)),u=g(n(1222)),s=g(n(61)),d=g(n(9293)),f=g(n(149)),c=g(n(8803)),p=g(n(5830)),v=O(n(279)),y=g(n(8553)),m=g(n(8468)),_=n(1),h=g(n(6)),E=g(n(7446));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={hovered:!1},t.handleMouseEnter=function(){t.setState({hovered:!0})},t.handleMouseLeave=function(){t.setState({hovered:!1})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var g=r.prototype;return g.renderActivity=function(){var e=this.props,t=e.activities,n=e.applicationStream,r=e.user,a=e.channel,o=this.state.hovered,i=null!=t?t.find((function(e){return e.type===_.ActivityTypes.CUSTOM_STATUS})):null,u=null!=i&&null!=r&&(0,l.default)(i,r,a);return T(m.default,{className:E.default.activity,textClassName:E.default.activityText,emojiClassName:E.default.activityEmoji,activities:t,applicationStream:n,animate:o,hideEmoji:!u,hideTooltip:!0})},g.renderOwner=function(){var e=this.props,t=e.ownerTooltipText,n=e.lostPermissionTooltipText,r=e.isOwner;return null!=r&&r?null!=n?null:T(f.default,{text:t},void 0,(function(e){return a.createElement(c.default,I({},e,{className:E.default.ownerIcon}))})):null},g.renderPremium=function(){var e=this.props,t=e.premiumSince,n=e.onClickPremiumGuildIcon;return null==t?null:T(f.default,{text:h.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP.format({date:t})},void 0,(function(e){return T(s.default,{onClick:n,tabIndex:-1},void 0,a.createElement(p.default,I({},e,{className:E.default.premiumIcon})))}))},g.renderBot=function(){var e=this.props.user;return null!=e&&e.bot?T(u.default,{className:E.default.botTag,verified:e.isVerifiedBot()}):null},g.renderDecorators=function(){return a.createElement(a.Fragment,null,this.renderBot(),this.renderOwner(),this.renderPremium())},g.renderAvatar=function(e,t){var n=this.props,r=n.status,a=n.isMobile,o=n.shouldAnimateStatus,l=n.isTyping,u=n.activities,s=n.guildId,d=o?v.AnimatedAvatar:v.default,f=(0,i.default)(u)?_.StatusTypes.STREAMING:r;return f=t?void 0:f,T(d,{size:v.Sizes.SIZE_32,src:e.getAvatarURL(s)||"",isMobile:a,isTyping:l,status:f,"aria-label":e.username,statusTooltip:!0})},g.render=function(){var e,t=this.props,n=t.colorString,r=t.nick,i=t.user,l=t.status,u=t.onMouseDown,s=t.onKeyDown,c=t.onClick,p=t.onContextMenu,m=t.onFocus,h=t.selected,g=t.tabIndex,S=t.itemProps,O=t.lostPermissionTooltipText,C=l===_.StatusTypes.OFFLINE;return null!=i?a.createElement(y.default,I({selected:h,className:(0,o.default)(E.default.member,(e={},e[E.default.offline]=C&&!h,e)),onClick:c,onKeyDown:s,onMouseDown:u,onContextMenu:p,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,name:null==O?T("span",{className:E.default.roleColor,style:{color:null!=n?n:void 0}},void 0,r||i.username):T(f.default,{text:O},void 0,(function(e){return a.createElement("span",I({},e,{className:(0,o.default)(E.default.roleColor,E.default.lostPermission),style:{color:null!=n?n:void 0}}),r||i.username)})),avatar:this.renderAvatar(i,C),subText:this.renderActivity(),decorators:this.renderDecorators(),"aria-controls":this.props["aria-controls"],"aria-expanded":this.props["aria-expanded"],"aria-setsize":this.props["aria-setsize"],"aria-posinset":this.props["aria-posinset"],id:this.props.id,tabIndex:g,onFocus:m,focusProps:{offset:{top:4,bottom:4,left:4,right:4}}},S)):T(d.default,{avatarSize:v.Sizes.SIZE_32,className:E.default.placeholder})},r}(a.PureComponent);b.displayName="MemberListItem",b.defaultProps={selected:!1,shouldAnimateStatus:!1,isTyping:!1,ownerTooltipText:h.default.Messages.GUILD_OWNER};var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuSeparator=function(){return null},t.MenuGroup=function(e){return null},t.MenuItem=function(e){return null},t.MenuCheckboxItem=function(e){return null},t.MenuRadioItem=function(e){return null},t.MenuControlItem=function(e){return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){switch(t){case a.SpotifyActionTypes.USER_ACTIVITY_PLAY:return e.isCurrentUser?o.default.Messages.USER_ACTIVITY_CANNOT_PLAY_SELF:e.playingSameTrack?o.default.Messages.USER_ACTIVITY_ALREADY_PLAYING:e.notPlayable?o.default.Messages.USER_ACTIVITY_NOT_DETECTED.format({name:a.SPOTIFY_PLATFORM_NAME}):void 0;case a.SpotifyActionTypes.USER_ACTIVITY_SYNC:return e.isCurrentUser?o.default.Messages.USER_ACTIVITY_CANNOT_SYNC_SELF:e.syncingWithUser||e.syncingWithParty?o.default.Messages.USER_ACTIVITY_ALREADY_SYNCING:o.default.Messages.USER_ACTIVITY_LISTEN_ALONG_DESCRIPTION.format({name:n||e.user.toString()});case a.SpotifyActionTypes.EMBED_SYNC:return e.isCurrentUser?o.default.Messages.USER_ACTIVITY_CANNOT_SYNC_SELF:e.syncingWithUser||e.syncingWithParty?o.default.Messages.USER_ACTIVITY_ALREADY_SYNCING:e.notPlayable?o.default.Messages.USER_ACTIVITY_NOT_DETECTED.format({name:a.SPOTIFY_PLATFORM_NAME}):void 0;default:return}};var r,a=n(293),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){var o,i,l,u=e.hasConnectedAccount(),s=(0,r.isSpotifyPlayable)(e),d=e.getTrack(),f=e.getSyncingWith(),c=e.getActivity(),p=null!==(o=null!==(i=null==d?void 0:d.id)&&void 0!==i?i:null==c?void 0:c.sync_id)&&void 0!==o?o:e.getLastPlayedTrackId();return{user:n,activity:a,hasSpotifyAccount:u,canPlaySpotify:s,notPlayable:u&&!s,syncingWithParty:null!=(null==c?void 0:c.party)&&(null==a||null===(l=a.party)||void 0===l?void 0:l.id)===c.party.id,syncingWithUser:null!=(null==f?void 0:f.userId)&&(null==f?void 0:f.userId)===n.id,isCurrentUser:n.id===t.getId(),currentUserTrackId:p,playingSameTrack:null!=p&&p===(null==a?void 0:a.sync_id)}};var r=n(8498)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return y.apply(this,arguments)};var r=c(n(0)),a=c(n(8428)),o=n(41),i=n(8498),l=d(n(8818)),u=d(n(9294)),s=d(n(8819));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){p(o,r,a,i,l,"next",e)}function l(e){p(o,r,a,i,l,"throw",e)}i(void 0)}))}}function y(){return(y=v(regeneratorRuntime.mark((function e(t,n,d){var f,c,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=t.hasSpotifyAccount,c=t.activity,p=t.user,(0,s.default)(f)&&null!=c&&null!=c.sync_id){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,i.ensureSpotifyPlayable)();case 5:return e.next=7,(0,i.ensureSpotifyPremium)().catch((function(e){return(0,o.openModal)((function(e){return r.createElement(u.default,e)})),Promise.reject(e)}));case 7:a.sync(c,p.id),(0,l.default)(n,p,c,d);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return f.apply(this,arguments)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8428)),a=n(8498),o=l(n(8818)),i=l(n(8819));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(t,n,l){var u,s,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t.hasSpotifyAccount,s=t.activity,d=t.user,(0,i.default)(u)&&null!=s&&null!=s.sync_id){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,a.ensureSpotifyPlayable)();case 5:r.play(s,d.id),(0,o.default)(n,d,s,l);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MemberListRowTypes=void 0;var r=S(n(133)),a=S(n(8)),o=S(n(743)),i=S(n(63)),l=S(n(3)),u=S(n(2)),s=S(n(78)),d=S(n(163)),f=S(n(11)),c=S(n(10)),p=S(n(684)),v=S(n(56)),y=S(n(15)),m=S(n(256)),_=S(n(479)),h=S(n(12)),E=n(1),g=S(n(6));function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){return(I=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}).apply(this,arguments)}var T=(0,r.default)({GROUP:null,MEMBER:null});function C(e,t,n,r){switch(t){case E.StatusTypes.ONLINE:case E.StatusTypes.OFFLINE:case E.StatusTypes.UNKNOWN:return{type:T.GROUP,key:t,id:t,get title(){switch(t){case E.StatusTypes.ONLINE:return g.default.Messages.STATUS_ONLINE;case E.StatusTypes.OFFLINE:return g.default.Messages.STATUS_OFFLINE;default:return g.default.Messages.STATUS_UNKNOWN}},count:n,index:r};default:var a=y.default.getGuild(e),o=null!=a?a.getRole(t):null;return{type:T.GROUP,key:t,id:t,title:null!=o?o.name:"",count:n,index:r}}}function b(e,t,n){var r=n===f.default.getId(),a=m.default.isMobileOnline(n),o=r?_.default.getStatus():m.default.getStatus(n,e),i=r?_.default.getActivities():m.default.getActivities(n,e),l=d.default.getStreamForUser(n),u=h.default.getUser(n);return null==u?null:I({type:T.MEMBER},v.default.getMember(e,n),{user:u,status:o,activities:i,applicationStream:l,isOwner:t===n,isMobileOnline:a})}function M(e){var t=c.default.getChannel(e);return null==t?"everyone":null==t.memberListId?function(e){if(s.default.canEveryone(E.Permissions.VIEW_CHANNEL,e))return"everyone";return o.default.v3((0,a.default)(e.permissionOverwrites).reduce((function(e,t){var n=t.id,r=t.allow,a=t.deny;return i.default.has(r,E.Permissions.VIEW_CHANNEL)?e.push("allow:"+n):i.default.has(a,E.Permissions.VIEW_CHANNEL)&&e.push("deny:"+n),e}),[]).sort().join(",")).toString()}(t):t.memberListId}t.MemberListRowTypes=T;var N=function(){function e(e,t){this.rows=[],this.groups=[],this.members={},this.version=0,this.guildId=e,this.listId=t,this.updateOwnerId()}var t=e.prototype;return t.updateOwnerId=function(){var e=y.default.getGuild(this.guildId);if(null==e)return!1;var t=a.default.some(e.roles,(function(e){return e.hoist&&i.default.has(e.permissions,E.Permissions.ADMINISTRATOR)}))?null:e.ownerId;return this.ownerId!==t&&(this.ownerId=t,!0)},t.setGroups=function(e){var t=this,n=0;this.groups=e.map((function(e){var r=n;return n+=e.count+1,C(t.guildId,e.id,e.count,r)})),this.rows.length=n},t.sync=function(e,t){var n=this,r=e[0];t.forEach((function(e,t){return n.update(r+t,e)}))},t.invalidate=function(e){for(var t=e[0],n=e[1],r=t;r<=n;r++){var a=this.rows[r];if(null==a)break;delete this.rows[r],a.type===T.MEMBER&&delete this.members[a.user.id]}this.version++},t.insert=function(e,t){var n=t.group,r=t.member;if(null!=n)this.rows.splice(e,0,C(this.guildId,n.id,n.count));else if(null!=r){var a=b(this.guildId,this.ownerId,r.user.id);if(null==a)return;this.rows.splice(e,0,a),this.members[r.user.id]=a}this.version++},t.update=function(e,t){var n=t.group,r=t.member,a=this.rows[e];if(null!=a&&a.type===T.MEMBER&&delete this.members[a.user.id],null!=n)this.rows[e]=C(this.guildId,n.id,n.count);else if(null!=r){var o=b(this.guildId,this.ownerId,r.user.id);if(null==o)return;this.rows[e]=o,this.members[r.user.id]=o}this.version++},t.delete=function(e){var t=this.rows[e];null!=t&&(t.type===T.MEMBER&&delete this.members[t.user.id],this.rows.splice(e,1),this.version++)},t.rebuildMember=function(e){var t=this.members[e];null!=t&&(Object.assign(t,b(this.guildId,this.ownerId,e)),this.version++)},t.rebuildMembers=function(){var e=this;a.default.forEach(this.members,(function(t,n){e.rebuildMember(n)}))},e}(),A=new(function(){function e(){this._guildLists={}}var t=e.prototype;return t.get=function(e,t){var n=this._guildLists[e];null==n&&(n=this._guildLists[e]={});var r=n[t];return null==r&&((r=new N(e,t)).setGroups([{id:E.StatusTypes.UNKNOWN,count:p.default.getMemberCount(e)||0}]),n[t]=r),r},t.forEach=function(e,t){if(null==e)a.default.forEach(this._guildLists,(function(e){a.default.forEach(e,t)}));else{var n=this._guildLists[e];null!=n&&a.default.forEach(n,t)}},t.delete=function(e){delete this._guildLists[e]},t.reset=function(){this._guildLists={}},e}());function P(){A.reset()}var R=[];function L(){var e=d.default.getAllApplicationStreams(),t=R.concat(e);R=e,t.forEach((function(e){A.forEach(null,(function(t){return t.rebuildMember(e.ownerId)}))}))}function D(){var e=f.default.getId();A.forEach(null,(function(t){return t.rebuildMember(e)}))}var w=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(h.default,y.default,c.default,v.default,m.default,_.default,f.default,p.default,d.default),this.syncWith([_.default],D),this.syncWith([d.default],L)},a.getProps=function(e,t){var n=A.get(e,M(t));return{listId:n.guildId+":"+n.listId,groups:n.groups,rows:n.rows,version:n.version}},r}(l.default.Store))(u.default,{CONNECTION_OPEN:function(e){return P()},OVERLAY_INITIALIZE:function(e){return P()},GUILD_MEMBER_LIST_UPDATE:function(e){var t=A.get(e.guildId,e.id);e.ops.forEach((function(e){switch(e.op){case"SYNC":t.sync(e.range,e.items);break;case"INVALIDATE":t.invalidate(e.range);break;case"INSERT":t.insert(e.index,e.item);break;case"UPDATE":t.update(e.index,e.item);break;case"DELETE":t.delete(e.index)}})),t.setGroups(e.groups)},GUILD_UPDATE:function(e){var t=e.guild;A.forEach(t.id,(function(e){e.updateOwnerId()&&e.rebuildMembers()}))},GUILD_DELETE:function(e){var t=e.guild;A.delete(t.id)},GUILD_ROLE_UPDATE:function(e){var t=e.guildId;A.forEach(t,(function(e){return e.rebuildMembers()}))},GUILD_MEMBER_UPDATE:function(e){var t=e.guildId,n=e.user;A.forEach(t,(function(e){return e.rebuildMember(n.id)}))},CHANNEL_UPDATES:function(e){return!0}});t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=n(8468),i=l(n(7469));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t,n=e.activity,r=e.className,l=e.emojiClassName,u=e.textClassName,d=e.placeholderText,f=e.soloEmojiClassName,c=e.animate,p=void 0===c||c,v=e.hideTooltip,y=void 0!==v&&v,m=e.hideEmoji,_=void 0!==m&&m,h=e.children;if(null==n)return null;var E=n.emoji,g=n.state||d;return s("div",{className:(0,a.default)(i.default.container,r)},void 0,_||null==E?null:s(o.ActivityEmoji,{emoji:E,className:(0,a.default)(i.default.emoji,l,null!=f?(t={},t[f]=!g,t):null),animate:p,hideTooltip:y}),null!=g&&g.length>0?s("span",{className:u},void 0,g):null,h)}d.displayName="CustomStatus"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(8360)),i=l(n(7481));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){return e.toFixed(0)+"%"},f=a.forwardRef((function(e,t){var n=e.value,r=e.minValue,l=void 0===r?0:r,u=e.maxValue,f=void 0===u?100:u,c=e.onChange,p=e.renderValue,v=void 0===p?d:p,y=e["aria-label"],m=a.useRef(null);return a.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=m.current)||void 0===e?void 0:e.focus()},blur:function(){var e;return null===(e=m.current)||void 0===e?void 0:e.blur()},activate:function(){return!1}}}),[]),s("div",{className:i.default.sliderContainer},void 0,a.createElement(o.default,{ref:m,mini:!0,handleSize:16,className:i.default.slider,initialValue:n,minValue:l,maxValue:f,onValueChange:c,asValueChanges:c,onValueRender:v,orientation:"horizontal","aria-label":y}))}));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=v(n(2)),o=n(8839),i=v(n(216)),l=v(n(12)),u=v(n(5959)),s=n(41),d=n(5688),f=n(5697),c=v(n(9375)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=new(function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._premiumPaymentModalCloseResolve=null,t._premiumPaymentModalCloseReject=null,t._premiumSwitchPlanModalCloseResolve=null,t._premiumSwitchPlanModalCloseReject=null,t._maybeFetchPremiumTrialOffer=function(){var e;!(null===(e=l.default.getNullableCurrentUser())||void 0===e?void 0:e.hasPremiumPerks)&&u.default.shouldFetchOffer(p.PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID)&&(0,o.fetchUserTrialOffer)(p.PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID)},t._handlePremiumPaymentModalOpen=function(e){(0,f.openPremiumSubscriptionNewPlanModal)(m({},e,{onClose:function(e){a.default.dispatch({type:p.ActionTypes.PREMIUM_PAYMENT_MODAL_CLOSE,didSucceed:e})}}))},t._handlePremiumPaymentModalClose=function(e){e.didSucceed&&null!=t._premiumPaymentModalCloseResolve?t._premiumPaymentModalCloseResolve():null!=t._premiumPaymentModalCloseReject&&t._premiumPaymentModalCloseReject(),t._premiumPaymentModalCloseResolve=null,t._premiumPaymentModalCloseReject=null},t._handlePremiumSwitchPlanModalOpen=function(e){(0,d.openPremiumSelectPlanModal)(m({},e,{onClose:function(e){a.default.dispatch({type:p.ActionTypes.PREMIUM_SWITCH_PLAN_MODAL_CLOSE,didSucceed:e})}}))},t._handlePremiumSwitchPlanModalClose=function(e){e.didSucceed&&null!=t._premiumSwitchPlanModalCloseResolve?t._premiumSwitchPlanModalCloseResolve():null!=t._premiumSwitchPlanModalCloseReject&&t._premiumSwitchPlanModalCloseReject(),t._premiumSwitchPlanModalCloseResolve=null,t._premiumSwitchPlanModalCloseReject=null},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var v=i.prototype;return v._initialize=function(){__OVERLAY__?(a.default.subscribe(p.ActionTypes.PREMIUM_PAYMENT_MODAL_OPEN,this._handlePremiumPaymentModalOpen),a.default.subscribe(p.ActionTypes.PREMIUM_SWITCH_PLAN_MODAL_OPEN,this._handlePremiumSwitchPlanModalOpen)):(a.default.subscribe(p.ActionTypes.PREMIUM_PAYMENT_MODAL_CLOSE,this._handlePremiumPaymentModalClose),a.default.subscribe(p.ActionTypes.PREMIUM_SWITCH_PLAN_MODAL_CLOSE,this._handlePremiumSwitchPlanModalClose),a.default.subscribe(p.ActionTypes.MESSAGE_LENGTH_UPSELL,this.handleMessageLengthUpsell),this._maybeFetchPremiumTrialOffer())},v._terminate=function(){__OVERLAY__?(a.default.unsubscribe(p.ActionTypes.PREMIUM_PAYMENT_MODAL_OPEN,this._handlePremiumPaymentModalOpen),a.default.unsubscribe(p.ActionTypes.PREMIUM_SWITCH_PLAN_MODAL_OPEN,this._handlePremiumSwitchPlanModalOpen)):(a.default.unsubscribe(p.ActionTypes.PREMIUM_PAYMENT_MODAL_CLOSE,this._handlePremiumPaymentModalClose),a.default.unsubscribe(p.ActionTypes.PREMIUM_SWITCH_PLAN_MODAL_CLOSE,this._handlePremiumSwitchPlanModalClose),a.default.unsubscribe(p.ActionTypes.MESSAGE_LENGTH_UPSELL,this.handleMessageLengthUpsell))},v.handleMessageLengthUpsell=function(e){var t=e.channel,n=e.content;(0,s.openModal)((function(e){return r.createElement(c.default,m({channel:t,content:n},e))}))},v.openPremiumPaymentModalInApp=function(e){if(__OVERLAY__)throw new Error("Should not use this function from the overlay, use ModalAPI.openModal instead");return new Promise((function(t,n){(0,f.openPremiumSubscriptionNewPlanModal)(m({},e,{onClose:function(e){e?t():n()}}))}))},v.openPremiumPaymentModalInOverlay=function(e){var t=this;if(__OVERLAY__)throw new Error("Should not use this function from the overlay, use ModalAPI.openModal instead");return new Promise((function(n,r){t._premiumPaymentModalCloseResolve=n,t._premiumPaymentModalCloseReject=r,a.default.dispatch(m({type:p.ActionTypes.PREMIUM_PAYMENT_MODAL_OPEN},e))}))},v.openPremiumSwitchPlanModalInApp=function(e){if(__OVERLAY__)throw new Error("Should not use this function from the overlay, use ModalAPI.openModal instead");return new Promise((function(t,n){(0,d.openPremiumSelectPlanModal)(m({},e,{onClose:function(e){e?t():n()}}))}))},v.openPremiumSwitchPlanModalInOverlay=function(e){var t=this;if(__OVERLAY__)throw new Error("Should not use this function from the overlay, use ModalAPI.openModal instead");var n=e||{},r=n.initialPlanId,o=n.followupSKUInfo;return new Promise((function(e,n){t._premiumSwitchPlanModalCloseResolve=e,t._premiumSwitchPlanModalCloseReject=n,a.default.dispatch({type:p.ActionTypes.PREMIUM_SWITCH_PLAN_MODAL_OPEN,initialPlanId:r,followupSKUInfo:o})}))},i}(i.default));t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,p,v,y,m){void 0===p&&(p=!1);void 0===v&&(v=!0);void 0===y&&(y=!1);void 0===m&&(m=!1);if(e.length<1)return;var _=t.getGuildId();if(d.anyFileTooLarge(e,_)){var h=s.default.getCurrentUser();r.default.push(l.default,{title:c.default.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:c.default.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:d.sizeString(d.maxFileSize(_))}),promo:!f.default.canUploadLargeFiles(h)})}else v?(a.default.pushFiles({files:e,channelId:t.id,showLargeMessageDialog:y}),u.default.isModalOpen(i.default)||r.default.push(i.default,{backdropInstant:p,draftType:n,ignoreDraft:m})):o.default.instantBatchUpload(t.id,e,n)};var r=v(n(397)),a=v(n(8736)),o=v(n(8558)),i=v(n(9114)),l=v(n(8422)),u=v(n(690)),s=v(n(12)),d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8289)),f=v(n(96)),c=v(n(6));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={popFirstFile:function(){a.default.dispatch({type:o.ActionTypes.UPLOAD_MODAL_POP_FILE})},pushFiles:function(e){var t=e.files,n=e.channelId,r=e.showLargeMessageDialog;a.default.dispatch({type:o.ActionTypes.UPLOAD_MODAL_PUSH_FILES,files:t,channelId:n,showLargeMessageDialog:r})},clearAll:function(){a.default.dispatch({type:o.ActionTypes.UPLOAD_MODAL_CLEAR_ALL_FILES})}};t.default=i},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M22.545 4.91992V3.91992C22.545 2.79992 21.57 1.91992 20.52 1.91992C19.47 1.91992 18.52 2.79992 18.52 3.91992V4.91992H17.76C17.6275 4.91992 17.52 5.02737 17.52 5.15992V9.67992C17.52 9.81247 17.6275 9.91992 17.76 9.91992H23.28C23.4126 9.91992 23.52 9.81247 23.52 9.67992V5.15992C23.52 5.02737 23.4126 4.91992 23.28 4.91992H22.545ZM21.52 4.91992H19.52V3.91992C19.52 3.34849 19.9867 2.91992 20.52 2.91992C21.0533 2.91992 21.52 3.34849 21.52 3.91992V4.91992Z"}),s("path",{className:f,fill:d,d:"M15.44 6.99992C15.5725 6.99992 15.68 7.10737 15.68 7.23992V8.75992C15.68 8.89247 15.5725 8.99992 15.44 8.99992H9.41045L8.35045 14.9999H10.56V16.9999H8.00001L7.36325 20.5873C7.32088 20.826 7.11337 20.9999 6.87094 20.9999H5.88657C5.57547 20.9999 5.3399 20.7189 5.39427 20.4125L6.00001 16.9999H2.59511C2.28449 16.9999 2.04905 16.7197 2.10259 16.4137L2.27759 15.4137C2.31946 15.1745 2.52722 14.9999 2.77011 14.9999H6.35001L7.41001 8.99992H4.00511C3.69449 8.99992 3.45905 8.71969 3.51259 8.41373L3.68759 7.41373C3.72946 7.17448 3.93722 6.99992 4.18011 6.99992H7.76001L8.39677 3.41254C8.43914 3.17384 8.64664 2.99992 8.88907 2.99992H9.87344C10.1845 2.99992 10.4201 3.28099 10.3657 3.58731L9.76001 6.99992H15.44Z"}),s("path",{className:f,fill:d,d:"M13.44 12.9599C12.9098 12.9599 12.48 13.3897 12.48 13.9199V20.2212C12.48 20.7514 12.9098 21.1812 13.44 21.1812H14.4C14.5326 21.1812 14.64 21.2886 14.64 21.4212V23.4597C14.64 23.6677 14.8866 23.7772 15.0409 23.6377L17.4859 21.4289C17.6623 21.2694 17.8917 21.1812 18.1294 21.1812H22.56C23.0902 21.1812 23.52 20.7514 23.52 20.2212V13.9199C23.52 13.3897 23.0902 12.9599 22.56 12.9599H13.44Z"}))}d.displayName="PrivateThreadIcon"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleExpressionSuggestionsEnabled=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);t.toggleExpressionSuggestionsEnabled=function(){a.default.dispatch({type:o.ActionTypes.EXPRESSION_SUGGESTIONS_TOGGLE})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=v(n(9)),o=v(n(29)),i=n(85),l=n(475),u=n(35),s=v(n(272)),d=v(n(9125)),f=v(n(5963)),c=v(n(6)),p=v(n(7560));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.transitionState,n=e.onClose,r=e.guildTemplate,v=(0,d.default)(r,!1),y=v.form,_=v.preview,h=v.handleSubmit,E=(0,i.useUID)();return m("div",{},void 0,m(u.ModalRoot,{size:u.ModalSize.DYNAMIC,transitionState:t,className:(0,a.default)(p.default.modalRoot),"aria-labelledby":E},void 0,m("div",{className:p.default.modalContainer},void 0,m("div",{className:(0,a.default)(p.default.modalSection,p.default.ctaSection)},void 0,m("div",{className:p.default.ctaContainer},void 0,m(f.default,{guildTemplate:r,headerId:E}))),m("div",{className:(0,a.default)(p.default.modalSection,p.default.formSection)},void 0,m(s.default,{className:p.default.formContainer},void 0,m(l.Title,{className:p.default.header},void 0,c.default.Messages.GUILD_TEMPLATE_SETUP_DISCORD),y,_))),m(u.ModalFooter,{className:p.default.modalFooter},void 0,m(o.default,{color:o.default.Colors.GREY,onClick:n},void 0,c.default.Messages.CLOSE),m(o.default,{color:o.default.Colors.GREEN,onClick:function(){return h().then((function(e){return e&&n()}))}},void 0,c.default.Messages.CREATE))))}_.displayName="GuildTemplateModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,d:"M10 5V3H5.375C4.06519 3 3 4.06519 3 5.375V18.625C3 19.936 4.06519 21 5.375 21H18.625C19.936 21 21 19.936 21 18.625V14H19V19H5V5H10Z"}),s("path",{foreground:f,fill:d,d:"M21 2.99902H14V4.99902H17.586L9.29297 13.292L10.707 14.706L19 6.41302V9.99902H21V2.99902Z"}))}d.displayName="Launch"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M0 4.3258427C0 5.06741573.616438356 5.68539326 1.35616438 5.68539326 2.09589041 5.68539326 2.71232877 5.06741573 2.71232877 4.3258427 2.71232877 2.84269663 4.31506849 2.78089888 4.5 2.78089888 4.68493151 2.78089888 6.28767123 2.84269663 6.28767123 4.3258427L6.28767123 4.63483146C6.28767123 5.25280899 5.97945205 5.74719101 5.42465753 6.05617978L4.19178082 6.73595506C3.51369863 7.10674157 3.14383562 7.78651685 3.14383562 8.52808989L3.14383562 9.64044944C3.14383562 10.3820225 3.76027397 11 4.5 11 5.23972603 11 5.85616438 10.3820225 5.85616438 9.64044944L5.85616438 8.96067416 6.71917808 8.52808989C8.1369863 7.78651685 9 6.30337079 9 4.69662921L9 4.3258427C9 1.48314607 6.71917808 0 4.5 0 2.21917808 0 0 1.48314607 0 4.3258427zM4.5 12C2.5 12 2.5 15 4.5 15 6.5 15 6.5 12 4.5 12L4.5 12z"});function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:f,className:c,fillRule:"evenodd",transform:"translate(7 4)"},void 0,d))}f.displayName="Help"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=f(n(9)),i=f(n(61)),l=f(n(255)),u=n(1),s=f(n(6)),d=f(n(7588));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e.DEFAULT="",e.BOLD="Bold"}(a||(a={}));var v=function(e){var t,n,r=e.closeAction,f=e.theme,c=e.variant,v=e.keybind,y=e.className;return p("div",{className:(0,o.default)(d.default.container,y)},void 0,p(i.default,{className:(0,o.default)(d.default.closeButton,(t={},t[d.default.closeButtonBold]=c===a.BOLD,t)),onClick:r,"aria-label":s.default.Messages.CLOSE},void 0,p(l.default,{color:u.ThemeTypes.DARK===f?u.Colors.PRIMARY_DARK_200:u.Colors.PRIMARY_DARK_400,width:18,height:18,"aria-hidden":!0})),p("div",{className:(0,o.default)(d.default.keybind,(n={},n[d.default.keybindBold]=c===a.BOLD,n)),"aria-hidden":!0},void 0,v))};v.displayName="CloseIconWithKeybind",v.defaultProps={variant:a.DEFAULT},v.Variants=a;var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(473)),l=g(n(39)),u=g(n(12)),s=g(n(29)),d=g(n(372)),f=g(n(255)),c=g(n(47)),p=g(n(24)),v=g(n(96)),y=n(281),m=n(280),_=n(1),h=g(n(6)),E=g(n(7589));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t=e.children,n=e.isVertical,r=void 0!==n&&n,a=e.tierTitle,o=e.tierLogoSrc;return O("li",{className:r?E.default.tierVertical:E.default.tierHorizontal},void 0,O("img",{alt:a,className:E.default.tierLogo,src:o}),O("ul",{className:E.default.perkList},void 0,t))};I.displayName="TierPerks";var T=function(e){var t=e.children,n=e.isAvailable,r=void 0!==n&&n,a=r?d.default:f.default;return O("li",{className:r?E.default.perkAvailable:E.default.perkUnavailable},void 0,O(a,{className:E.default.perkAvailabilityIcon}),t)};T.displayName="TierPerk";var C=function(e){var t=e.onOpenPremiumClick,r=(0,o.useStateFromStores)([u.default],(function(){return u.default.getCurrentUser()})),d=v.default.isPremium(r,_.PremiumTypes.TIER_1),f=(0,o.useStateFromStores)([l.default],(function(){return l.default.locale})),g=(0,y.formatPercent)(f,m.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100);return v.default.isPremium(r,_.PremiumTypes.TIER_2)?null:O("div",{className:E.default.wrapper},void 0,O(c.default,{className:d?E.default.headingTier1:E.default.heading,size:c.default.Sizes.SIZE_24},void 0,d?h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_HEADING_SECONDARY_PREMIUM_USER:h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_HEADING_SECONDARY),d?O(p.default,{className:E.default.headingSecondary},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_HEADING_TERTIARY_PREMIUM_USER.format({numFreeGuildSubscriptions:m.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM})):null,O("ul",{className:E.default.tiersList},void 0,d?O(I,{tierTitle:h.default.Messages.PREMIUM_TIER_2,tierLogoSrc:n(9591)},void 0,O(T,{isAvailable:!0},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_GUILD_SUBSCRIPTION_DISCOUNT.format({discountPercentage:g})),O(T,{isAvailable:!0},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_NUM_GUILD_SUBSCRIPTIONS.format({numFreeGuildSubscriptions:m.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}))):a.createElement(a.Fragment,null,O(I,{isVertical:!0,tierTitle:h.default.Messages.PREMIUM_TIER_2,tierLogoSrc:n(9592)},void 0,O(T,{isAvailable:!0},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_GUILD_SUBSCRIPTION_DISCOUNT.format({discountPercentage:g})),O(T,{isAvailable:!0},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_NUM_GUILD_SUBSCRIPTIONS.format({numFreeGuildSubscriptions:m.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}))),O(I,{isVertical:!0,tierTitle:h.default.Messages.PREMIUM_TIER_1,tierLogoSrc:n(9593)},void 0,O(T,{isAvailable:!0},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_GUILD_SUBSCRIPTION_DISCOUNT.format({discountPercentage:g})),O(T,{},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_NO_FREE_GUILD_SUBSCRIPTIONS.format({numFreeGuildSubscriptions:m.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}))))),O("div",{className:E.default.action},void 0,O(s.default,{color:s.default.Colors.BRAND,look:s.default.Looks.INVERTED,onClick:function(){i.default.open(_.UserSettingsSections.PREMIUM),null!=t&&t()},size:s.default.Sizes.SMALL},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_LEARN_MORE)))};C.displayName="PremiumGuildSubscriptionUpsellCTA";var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=_(n(9)),o=n(3),i=_(n(39)),l=_(n(12)),u=_(n(1147)),s=_(n(47)),d=_(n(24)),f=_(n(96)),c=n(281),p=n(280),v=n(1),y=_(n(6)),m=_(n(7590));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t=e.className,n=(0,o.useStateFromStores)([l.default],(function(){return l.default.getCurrentUser()})),r=(0,o.useStateFromStores)([i.default],(function(){return i.default.locale})),_=(0,o.useStateFromStores)([u.default],(function(){return u.default.getPremiumTypeSubscription()}));return E("div",{className:(0,a.default)(m.default.wrapper,t)},void 0,E(s.default,{className:m.default.heading,size:s.default.Sizes.SIZE_24},void 0,y.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_HEADING_PRIMARY),E(d.default,{size:d.default.Sizes.SIZE_16},void 0,function(e,t,n){var r,a,o=f.default.isPremium(e);if(null==n||f.default.getInterval(n.planId)===v.SubscriptionIntervalTypes.MONTH){var i=f.default.getPrice(v.SubscriptionPlans.PREMIUM_MONTH_GUILD,o),l=f.default.getPrice(v.SubscriptionPlans.PREMIUM_MONTH_GUILD,!1);r=(0,c.formatRate)((0,c.formatPrice)(i.amount,i.currency),v.SubscriptionIntervalTypes.MONTH),a=(0,c.formatRate)((0,c.formatPrice)(l.amount,l.currency),v.SubscriptionIntervalTypes.MONTH)}else{var u=f.default.getPrice(v.SubscriptionPlans.PREMIUM_YEAR_GUILD,o),s=f.default.getPrice(v.SubscriptionPlans.PREMIUM_YEAR_GUILD,!1);r=(0,c.formatRate)((0,c.formatPrice)(u.amount,u.currency),v.SubscriptionIntervalTypes.YEAR),a=(0,c.formatRate)((0,c.formatPrice)(s.amount,s.currency),v.SubscriptionIntervalTypes.YEAR)}return f.default.isPremium(e,v.PremiumTypes.TIER_2)?y.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_SUBHEADING_TIER_2.format({price:r,originalPrice:a,originalPriceHook:function(e,t){return E("span",{className:m.default.originalPrice},t,e)},freeSubscriptionCount:p.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM,discountPercent:(0,c.formatPercent)(t,p.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100)}):f.default.isPremium(e,v.PremiumTypes.TIER_1)?y.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_SUBHEADING_TIER_1.format({price:r,originalPrice:a,originalPriceHook:function(e,t){return E("span",{className:m.default.originalPrice},t,e)},discountPercent:(0,c.formatPercent)(t,p.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100)}):y.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_SUBHEADING.format({price:r})}(n,r,_)))};g.displayName="PremiumGuildSubscriptionUpsellHeading";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.tier,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["tier"]);switch(t){case l.PremiumGuildTiers.TIER_1:return r.createElement(a.default,n);case l.PremiumGuildTiers.TIER_2:return r.createElement(o.default,n);case l.PremiumGuildTiers.TIER_3:return r.createElement(i.default,n);case l.PremiumGuildTiers.NONE:return null;default:throw new Error("Not a valid tier type")}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9602)),o=u(n(8920)),i=u(n(9603)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var d=u("path",{d:"M95.6718 1.80634C95.6718 0.808724 94.863 0 93.8654 0C92.8678 0 92.0591 0.808724 92.0591 1.80634V3.64278C92.0591 4.64039 92.8678 5.44911 93.8654 5.44911C94.863 5.44911 95.6718 4.64039 95.6718 3.64278V1.80634Z",fill:"#ADF3FF"}),f=u("path",{d:"M95.6713 16.3574C95.6713 15.3598 94.8625 14.5511 93.8649 14.5511C92.8673 14.5511 92.0586 15.3598 92.0586 16.3574V18.1939C92.0586 19.1915 92.8673 20.0002 93.8649 20.0002C94.8625 20.0002 95.6713 19.1915 95.6713 18.1939V16.3574Z",fill:"#ADF3FF"}),c=u("path",{d:"M102.194 11.8412C103.191 11.8412 104 11.0325 104 10.0349C104 9.03724 103.191 8.22852 102.194 8.22852H100.357C99.3596 8.22852 98.5509 9.03724 98.5509 10.0349C98.5509 11.0325 99.3596 11.8412 100.357 11.8412H102.194Z",fill:"#ADF3FF"}),p=u("path",{d:"M87.6434 11.7413C88.641 11.7413 89.4497 10.9325 89.4497 9.93494C89.4497 8.93733 88.641 8.1286 87.6434 8.1286H85.8069C84.8093 8.1286 84.0006 8.93733 84.0006 9.93494C84.0006 10.9325 84.8093 11.7413 85.8069 11.7413H87.6434Z",fill:"#ADF3FF"}),v=u("path",{d:"M11.1501 74.4573L15.3147 73.0684C15.5192 72.9747 15.6925 72.8241 15.814 72.6347C15.9354 72.4454 16 72.225 16 72C16 71.775 15.9354 71.5546 15.814 71.3653C15.6925 71.1759 15.5192 71.0253 15.3147 70.9316L11.1501 69.5427C10.8657 69.4142 10.6378 69.1862 10.5094 68.9016L9.01446 64.7348C8.94423 64.521 8.80835 64.3349 8.62619 64.203C8.44403 64.071 8.22488 64 7.99999 64C7.77511 64 7.55597 64.071 7.37381 64.203C7.19165 64.3349 7.05576 64.521 6.98554 64.7348L5.49057 68.9016C5.36216 69.1862 5.13433 69.4142 4.84986 69.5427L0.685276 70.9316C0.480802 71.0253 0.307523 71.1759 0.186045 71.3653C0.0645662 71.5546 0 71.775 0 72C0 72.225 0.0645662 72.4454 0.186045 72.6347C0.307523 72.8241 0.480802 72.9747 0.685276 73.0684L4.84986 74.4573C5.0011 74.5032 5.1387 74.5858 5.25046 74.6976C5.36222 74.8094 5.44469 74.9471 5.49057 75.0984L6.98554 79.2652C7.05576 79.479 7.19165 79.6651 7.37381 79.797C7.55597 79.929 7.77511 80 7.99999 80C8.22488 80 8.44403 79.929 8.62619 79.797C8.80835 79.6651 8.94423 79.479 9.01446 79.2652L10.5094 75.0984C10.5553 74.9471 10.6378 74.8094 10.7495 74.6976C10.8613 74.5858 10.9989 74.5032 11.1501 74.4573Z",fill:"#FFD01A"});function y(e){var t=e.width,n=void 0===t?104:t,r=e.height,a=void 0===r?80:r,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height"]);return o.createElement("svg",s({},(0,i.default)(l),{width:n,height:a,viewBox:"0 0 104 80",fill:"none"}),d,f,c,p,v)}y.displayName="InboxEmptyStateStars"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(8)),a=d(n(14)),o=d(n(2)),i=d(n(26)),l=d(n(1212)),u=d(n(10)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){f(o,r,a,i,l,"next",e)}function l(e){f(o,r,a,i,l,"throw",e)}i(void 0)}))}}function p(){return(p=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}).apply(this,arguments)}var v={},y=new i.default("UserGuildSettingsManager"),m=0;function _(){v=p({},l.default.getCollapsedCategories())}function h(){__OVERLAY__||(clearTimeout(m),m=setTimeout((function(){return E()}),15e3))}function E(e,t){return g.apply(this,arguments)}function g(){return(g=c(regeneratorRuntime.mark((function e(t,n){var o,i,d,f,c,_,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(f in clearTimeout(m),o=!1,i={},null!=n&&(i[null!=t?t:s.ME]=n,o=!0),d=l.default.getCollapsedCategories(),S())null!=(c=u.default.getChannel(f))&&null!=c.guild_id&&(c.guild_id in i||(i[c.guild_id]={}),null==i[c.guild_id].channel_overrides&&(i[c.guild_id].channel_overrides={}),i[c.guild_id].channel_overrides[c.id]=p({},i[c.guild_id].channel_overrides[c.id],{collapsed:c.id in d}),o=!0);if(o){e.next=9;break}return e.abrupt("return");case 9:v=p({},d),_=r.default.map(i,(function(e,t){return{guildId:t,updates:e,attempts:0}}));case 11:if(!(_.length>0)){e.next=29;break}return h=_.shift(),e.prev=13,e.next=16,a.default.patch({url:s.Endpoints.USER_GUILD_SETTINGS(h.guildId),body:h.updates});case 16:return e.next=18,O(1e3);case 18:e.next=27;break;case 20:return e.prev=20,e.t0=e.catch(13),y.error(e.t0),h.attempts+=1,h.attempts<3&&_.push(h),e.next=27,O(5e3);case 27:e.next=11;break;case 29:case"end":return e.stop()}}),e,null,[[13,20]])})))).apply(this,arguments)}function S(){var e={},t=l.default.getCollapsedCategories();for(var n in t)t[n]!==v[n]&&(e[n]=!0);for(var r in v)t[r]!==v[r]&&(e[r]=!0);return e}function O(e){return new Promise((function(t){return setTimeout(t,e+Math.ceil(e*Math.random()))}))}function I(){v=p({},l.default.getCollapsedCategories())}var T={init:function(){o.default.subscribe(s.ActionTypes.CATEGORY_COLLAPSE,h),o.default.subscribe(s.ActionTypes.CATEGORY_EXPAND,h),o.default.subscribe(s.ActionTypes.CATEGORY_COLLAPSE_ALL,h),o.default.subscribe(s.ActionTypes.CATEGORY_EXPAND_ALL,h),o.default.subscribe(s.ActionTypes.CONNECTION_OPEN,_),o.default.subscribe(s.ActionTypes.USER_GUILD_SETTINGS_FULL_UPDATE,I)},saveUserGuildSettings:E};t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=f(n(473)),o=f(n(8936)),i=n(280),l=f(n(5953)),u=f(n(13)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}var v=n(9657);function y(e){var t=e.onClose,n=e.onCloseParent,f=e.analyticsSource,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClose","onCloseParent","analyticsSource"]);return r.createElement(l.default,p({title:d.default.Messages.STREAM_PREMIUM_UPSELL_HEADER,body:__OVERLAY__?d.default.Messages.STREAM_PREMIUM_UPSELL_BODY_NO_CTA:d.default.Messages.STREAM_PREMIUM_UPSELL_BODY.format({onPressMore:function(){(0,o.default)(),t(),null==n||n(),u.default.track(s.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_section:s.AnalyticsSections.STREAM_UPSELL_MODAL,location_object:s.AnalyticsObjects.NAVIGATION_LINK}),a.default.open(s.UserSettingsSections.PREMIUM)}}),artURL:v,type:i.PremiumUpsellTypes.STREAM_QUALITY_UPSELL,analyticsLocation:{section:s.AnalyticsSections.STREAM_UPSELL_MODAL,object:s.AnalyticsObjects.BUTTON_CTA},analyticsSource:f,onClose:t,onSubscribeClick:o.default},c))}y.displayName="StreamUpsellModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSizeForWidth=function(e){return e<400?"small":e<1e3?"medium":"large"},t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=s(n(29)),i=s(n(55)),l=s(n(24)),u=s(n(7942));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.onCTAClick,n=e.callToAction,r=e.header,s=e.description,d=e.size,c=e.className,p=e.artURL,v=e.noArt,y=void 0!==v&&v,m=e.selected,_=void 0!==m&&m;return f(i.default,{className:c,justify:i.default.Justify.CENTER,align:i.default.Align.CENTER,direction:i.default.Direction.VERTICAL},void 0,!y&&null!=p&&f("div",{className:(0,a.default)(u.default.art,u.default[d]),style:{backgroundImage:"url("+p+")"}}),null!=r?f(l.default,{color:l.default.Colors.CUSTOM,size:l.default.Sizes.SIZE_16,className:u.default.header},void 0,r):null,null!=s?f(l.default,{color:l.default.Colors.CUSTOM,className:u.default.description,size:l.default.Sizes.SIZE_14},void 0,s):null,_||null==n?null:f(o.default,{className:u.default.outerButton,size:o.default.Sizes.NONE,color:o.default.Colors.WHITE,look:o.default.Looks.BLANK,innerClassName:u.default.button,onClick:function(e){e.stopPropagation(),null==t||t(e)}},void 0,n))}c.displayName="EmptyState"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){i.default.supports(a.Features.VIDEO)?(0,l.openModal)((function(t){return r.createElement(u.default,c({},t,{header:s.default.Messages.CAMERA_UNAVAILABLE,body:s.default.Messages.CAMERA_NO_DEVICE,confirmText:s.default.Messages.OKAY,onConfirm:e}))})):(0,l.openModal)((function(t){return r.createElement(u.default,c({},t,{header:s.default.Messages.VIDEO_UNSUPPORTED_BROWSER_TITLE,body:s.default.Messages.VIDEO_UNSUPPORTED_BROWSER_BODY,confirmText:s.default.Messages.DOWNLOAD_APP,onConfirm:function(){null==e||e(),(0,o.showAppDownloadModal)("Video unsupported browser")}}))}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(34),o=n(1228),i=d(n(51)),l=n(41),u=d(n(10357)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if((0,l.default)(),p.default.embedded)(0,c.openModal)((function(t){return r.createElement(u.default,m({},t,{guildId:e,analyticsLocation:n}))}));else{var v,y=(0,i.default)(o.ApplicationStreamPresets.PRESET_CUSTOM,o.ApplicationStreamResolutions.RESOLUTION_1080,o.ApplicationStreamFPS.FPS_30,f.default.getCurrentUser().premiumType,null===(v=s.default.getGuild(e))||void 0===v?void 0:v.premiumTier)?{width:1920,height:1080}:{width:1280,height:720};d.default.getMediaEngine().getDesktopSource(y,!0).then((function(n){(0,a.startStream)(e,t,{pid:null,sourceId:n,sourceName:null})}))}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(364),o=n(713),i=v(n(8453)),l=v(n(8936)),u=v(n(8756)),s=v(n(15)),d=v(n(51)),f=v(n(12)),c=n(41),p=v(n(16));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=ee;var r,a,o=$(n(0)),i=z(n(23)),l=n(122),u=n(3),s=z(n(132)),d=n(364),f=z(n(8257)),c=z(n(9665)),p=z(n(8942)),v=z(n(1185)),y=z(n(10)),m=z(n(71)),_=z(n(15)),h=z(n(51)),E=z(n(79)),g=z(n(36)),S=z(n(12)),O=z(n(710)),I=$(n(29)),T=z(n(55)),C=n(703),b=n(85),M=z(n(466)),N=n(35),A=n(41),P=z(n(47)),R=z(n(24)),L=z(n(13)),D=z(n(16)),w=z(n(43)),j=n(713),k=z(n(8453)),U=z(n(9666)),G=z(n(1248)),F=z(n(9667)),B=z(n(9674)),H=z(n(9675)),x=z(n(8949)),V=n(1),W=z(n(6)),Y=z(n(7348));function z(e){return e&&e.__esModule?e:{default:e}}function K(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return K=function(){return e},e}function $(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=K();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function q(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){q(o,r,a,i,l,"next",e)}function l(e){q(o,r,a,i,l,"throw",e)}i(void 0)}))}}function J(){return(J=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}).apply(this,arguments)}function Q(e,t){L.default.track(V.AnalyticEvents.SCREENSHARE_FAILED,{source_id:e,screens:t.length})}function ee(e){var t,n,r=e.selectGuild,z=void 0!==r&&r,K=e.selectSource,$=void 0===K||K,q=e.guildId,ee=e.analyticsLocation,te=e.onClose,ne=e.transitionState,re=(0,u.useStateFromStores)([v.default],(function(){return v.default.getState()})),ae=re.preset,oe=re.resolution,ie=re.fps,le=(0,u.useStateFromStores)([g.default,y.default],(function(){return y.default.getChannel(g.default.getVoiceChannelId())})),ue=(0,u.useStateFromStores)([E.default,O.default],(function(){return D.default.isWindows()?(0,G.default)(E.default,O.default):null})),se=p.default.useExperiment({})[0].showExtendedSettings,de=(0,u.useStateFromStores)([S.default],(function(){return S.default.getCurrentUser().premiumType})),fe=(0,u.useStateFromStores)([_.default],(function(){var e;return null===(e=_.default.getGuild(q))||void 0===e?void 0:e.premiumTier})),ce=null!==(t=(0,U.default)(ae,de,fe))&&void 0!==t?t:[j.ApplicationStreamResolutions.RESOLUTION_720,j.ApplicationStreamFPS.FPS_30],pe=ce[0],ve=ce[1];ae!==j.ApplicationStreamPresets.PRESET_CUSTOM&&(oe=pe,ie=ve);var ye=(0,b.useUID)(),me=o.useState(function(e,t){return e?a.GUILD:t?a.SOURCE:a.CONFIRM}(z,$)),_e=me[0],he=me[1],Ee=o.useState(!1),ge=Ee[0],Se=Ee[1],Oe=o.useState(null),Ie=Oe[0],Te=Oe[1],Ce=o.useState(null),be=Ce[0],Me=Ce[1],Ne=o.useState(ae),Ae=Ne[0],Pe=Ne[1],Re=o.useState(oe),Le=Re[0],De=Re[1],we=o.useState(ie),je=we[0],ke=we[1],Ue=o.useState(null!=q?q:null),Ge=Ue[0],Fe=Ue[1],Be=null!==(n=null==le?void 0:le.id)&&void 0!==n?n:Ie;function He(){!function(){var e,t;(0,i.default)(null!=ue||null!=be,"got nothing to stream");var n=null!==(e=null==le?void 0:le.id)&&void 0!==e?e:Ie;(0,i.default)(null!=n,"Received null target channel ID");var r=y.default.getChannel(n),a=null!==(t=null==r?void 0:r.getGuildId())&&void 0!==t?t:q;null==le&&s.default.selectVoiceChannel(n);var o=Ae,l=Le,u=je;(0,k.default)(o,l,u,de,fe)||(o=j.ApplicationStreamPresets.PRESET_VIDEO,l=j.ApplicationStreamResolutions.RESOLUTION_720,u=j.ApplicationStreamFPS.FPS_30),(0,d.updateStreamSettings)({preset:o,resolution:l,frameRate:u});var f=(0,x.default)(ue,be,E.default.getRunningGames()),c=!D.default.isWindows()||null==f||null==f?null:f.pid;(0,d.startStream)(a,n,{pid:c,sourceId:null==c&&null!=be?be.id:null,sourceName:null==c&&null!=be?be.name:null})}(),te()}function xe(){var e,t=null!==(e=null==ue?void 0:ue.pid)&&void 0!==e?e:null;(0,A.openModal)((function(e){return o.createElement(c.default,J({},e,{handleStream:He,pid:t}))}))}o.useEffect((function(){var e=D.default.isWindows()?(0,G.default)(E.default,O.default):null,t=null!=(null==e?void 0:e.id)?m.default.getGame(e.id):null;L.default.track(V.AnalyticEvents.OPEN_MODAL,{type:"Go Live Modal",application_id:null==t?void 0:t.id,application_name:null==e?void 0:e.name,game_id:null==t?void 0:t.id,location_section:ee})}),[ee]);var Ve=o.useCallback((function(e,t,n){var r=(0,U.default)(e,de,fe),a=null!=r?r:[t,n],o=a[0],i=a[1];if(e!==Ae&&(t=o,n=i),!(0,k.default)(e,t,n,de,fe)){var l=(0,U.default)(j.ApplicationStreamPresets.PRESET_VIDEO,de,fe);t=l[0],n=l[1]}n!==je&&ke(n),t!==Le&&De(t),o!==t||i!==n?Pe(j.ApplicationStreamPresets.PRESET_CUSTOM):e!==Ae&&Pe(e)}),[de,fe,je,Le,Ae]);function We(){return(We=X(regeneratorRuntime.mark((function e(t){var n,r,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),_e!==a.SOURCE){e.next=3;break}return e.abrupt("return",he(a.CONFIRM));case 3:if(n=(0,x.default)(ue,be,E.default.getRunningGames()),r=w.default.supportsFeature(V.NativeFeatures.ELEVATED_HOOK)&&(null==n?void 0:n.elevated),!D.default.isOSX()||null==be){e.next=14;break}return e.next=8,h.default.getMediaEngine().getDesktopSources();case 8:if(i=e.sent,!((l=be.id).startsWith("screen")&&i.length>0)||i.some((function(e){return e.includes(l)}))){e.next=14;break}return Q(l,i),(0,A.openModal)((function(e){return o.createElement(M.default,J({header:W.default.Messages.SCREENSHARE_RELAUNCH,confirmText:W.default.Messages.OKAY,cancelText:W.default.Messages.CANCEL,onConfirm:function(){return w.default.relaunch()}},e),Z(R.default,{size:R.default.Sizes.SIZE_16},void 0,W.default.Messages.SCREENSHARE_RELAUNCH_BODY))})),e.abrupt("return");case 14:r?xe():He();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ye=o.useCallback((function(e){Me(e),null!=e&&(he(a.CONFIRM),Se(!0))}),[]),ze=o.useCallback((function(e){Fe(e),he($?a.SOURCE:a.CONFIRM)}),[$]),Ke=Z(N.ModalHeader,{className:Y.default.modalHeader,separator:!1},void 0,Z(T.default,{direction:T.default.Direction.VERTICAL,align:T.default.Align.CENTER,className:Y.default.header},void 0,Z(P.default,{size:P.default.Sizes.SIZE_24,id:ye,className:Y.default.headerText},void 0,W.default.Messages.GO_LIVE_MODAL_TITLE),Z(R.default,{className:Y.default.headerDescription,size:R.default.Sizes.SIZE_16,color:R.default.Colors.STANDARD},void 0,function(e){switch(e){case a.SOURCE:return W.default.Messages.GO_LIVE_MODAL_DESCRIPTION_SELECT_SOURCE;case a.CONFIRM:return W.default.Messages.GO_LIVE_MODAL_DESCRIPTION;case a.GUILD:default:return W.default.Messages.GO_LIVE_MODAL_DESCRIPTION_GENERIC}}(_e)))),$e=Z(C.Slides,{springConfig:J({},l.config.stiff,{clamp:!0}),activeSlide:_e,width:400},void 0,Z(C.Slide,{id:a.GUILD},void 0,Z("div",{className:Y.default.modalSize},void 0,Z(B.default,{onSelectGuild:ze}))),Z(C.Slide,{id:a.SOURCE},void 0,Z("div",{className:Y.default.modalSize},void 0,Z(H.default,{selectedSource:be,onChangeSelectedSource:Ye}))),Z(C.Slide,{id:a.CONFIRM},void 0,Z("div",{className:Y.default.modalSize},void 0,Z(F.default,{selectedChannelId:Ie,selectedPreset:Ae,selectedResolution:Le,selectedSource:be,selectedFPS:je,showExtendedSettings:se,sourceChanged:ge,selectSource:$,onChangeSelectedFPS:function(e){return Ve(Ae,Le,e)},onChangeSelectedResolution:function(e){return Ve(Ae,e,je)},onChangeSelectedPreset:function(e){return Ve(e,Le,je)},onChangeSelectedChannelId:Te,onChangeSource:function(){return he(a.SOURCE)},onChangeGuild:function(){return he(a.GUILD)},onClose:te,guildId:Ge,selectGuild:z})))),Ze=function(e,t,n,r){switch(e){case a.SOURCE:return t?a.GUILD:null;case a.CONFIRM:return r?a.SOURCE:!n&&t?a.GUILD:null;case a.GUILD:default:return null}}(_e,z,$,ge),qe=_e!==a.CONFIRM||null==be&&null==ue||null==Be,Xe=Z(N.ModalFooter,{justify:null==Ze?T.default.Justify.START:T.default.Justify.BETWEEN},void 0,Z(I.default,{type:"submit",size:I.default.Sizes.SMALL,disabled:qe,autoFocus:!0},void 0,W.default.Messages.GO_LIVE_MODAL_CTA),null==Ze?Z(I.default,{className:Y.default.cancelButton,look:I.default.Looks.LINK,size:I.default.Sizes.SMALL,color:I.ButtonColors.PRIMARY,onClick:te},void 0,W.default.Messages.CANCEL):Z(I.default,{size:I.default.Sizes.SMALL,color:I.ButtonColors.PRIMARY,onClick:function(){return he(Ze)}},void 0,W.default.Messages.BACK));return Z(f.default,{page:V.AnalyticsPages.GO_LIVE_MODAL},void 0,Z(N.ModalRoot,{"aria-labelledby":ye,transitionState:ne,size:N.ModalSize.DYNAMIC,className:Y.default.modalSize},void 0,Z(N.ModalCloseButton,{onClick:te,className:Y.default.modalCloseButton}),Z("div",{className:Y.default.art}),Z("form",{onSubmit:function(e){return We.apply(this,arguments)}},void 0,Ke,$e,Xe)))}!function(e){e[e.GUILD=0]="GUILD",e[e.SOURCE=1]="SOURCE",e[e.CONFIRM=2]="CONFIRM"}(a||(a={})),ee.displayName="GoLiveModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(3)),a=s(n(2)),o=s(n(16)),i=s(n(43)),l=s(n(8943)),u=s(n(8944));n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=!1,p=!0;var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a,s,v,y=r.prototype;return y.initialize=function(){var e=this;o.default.embedded&&!__OVERLAY__&&i.default.getGPUDriverVersions().then((function(t){c=(0,u.default)(t),p=(0,l.default)(t),e.emitChange()}))},y.getState=function(){return{GPUDriversOutdated:c,canUseHardwareAcceleration:p}},a=r,(s=[{key:"GPUDriversOutdated",get:function(){return c}},{key:"canUseHardwareAcceleration",get:function(){return p}}])&&d(a.prototype,s),v&&d(a,v),r}(r.default.Store))(a.default,{OVERLAY_INITIALIZE:function(e){var t=e.streamingCapabilitiesStoreState;c=t.GPUDriversOutdated,p=t.canUseHardwareAcceleration}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=z,t.EmptyStateBottom=t.EmptyStateCenter=t.Header=void 0;var r,a=w(n(0)),o=L(n(9)),i=L(n(8)),l=n(680),u=w(n(3)),s=L(n(154)),d=L(n(390)),f=L(n(8375)),c=L(n(8954)),p=n(42),v=L(n(10)),y=L(n(201)),m=L(n(8955)),_=L(n(40)),h=L(n(39)),E=L(n(161)),g=L(n(29)),S=L(n(61)),O=L(n(8525)),I=L(n(151)),T=L(n(255)),C=L(n(47)),b=L(n(468)),M=L(n(13)),N=n(121),A=n(1),P=L(n(6)),R=L(n(7641));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function j(){return(j=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}).apply(this,arguments)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function G(e){e.stopPropagation()}var F=function(e){var t=e.title,n=e.children,r=e.className;return U("div",{className:(0,o.default)(r,R.default.header)},void 0,null==t?null:U(C.default,{size:C.default.Sizes.SIZE_16},void 0,t),n)};t.Header=F,F.displayName="Header";var B=function(e){var t=e.msg,n=e.image;return U("div",{className:R.default.emptyPlaceholder},void 0,U("div",{className:R.default.image,style:{backgroundImage:"url("+n+")"}}),U("div",{className:R.default.body},void 0,t))};t.EmptyStateCenter=B,B.displayName="EmptyStateCenter";var H=function(e){var t=e.msg,n=e.image;return U("div",{className:(0,o.default)(R.default.emptyPlaceholder,R.default.bottom)},void 0,U("div",{className:R.default.body},void 0,t),U("div",{className:R.default.image,style:{backgroundImage:"url("+n+")"}}))};t.EmptyStateBottom=H,H.displayName="EmptyStateBottom";var x=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClickJump=function(e){var n=t.props;(0,n.jumpTo)(n.message,e)},t.handleClickClose=function(e){var n=t.props,r=n.onCloseMessage,a=n.message;null!=r&&r(a,e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,k(t,n);var a=r.prototype;return a.renderJumpButton=function(){var e,t=this.props.jumping;return U(S.default,{className:R.default.jumpButton,onClick:this.handleClickJump},void 0,U("div",{className:(0,o.default)(R.default.text,{hidden:t})},void 0,P.default.Messages.JUMP),U(I.default,{type:I.default.Type.PULSING_ELLIPSIS,className:(0,o.default)(R.default.loading,(e={},e[R.default.visible]=t,e))}))},a.renderCloseButton=function(){var e=this.props,t=e.onCloseMessage,n=e.canCloseAllMessages,r=e.canManageMessages,a=e.channel;return null==t?null:n||r||null!=a&&a.isPrivate()?U(g.default,{look:g.default.Looks.BLANK,size:g.default.Sizes.NONE,onClick:this.handleClickClose},void 0,U(T.default,{className:R.default.closeIcon})):null},a.render=function(){return U("div",{className:R.default.actionButtons},void 0,this.renderJumpButton(),this.renderCloseButton())},r}(a.PureComponent);x.displayName="ControlButtons";var V=u.default.connectStores([_.default],(function(e){var t=e.channel;return{canManageMessages:null!=t&&_.default.can(A.Permissions.MANAGE_MESSAGES,t)}}))(x),W=U(I.default,{}),Y=U(I.default,{});function z(e){var t,n=e.analyticsName,r=e.onFetch,_=e.channel,S=e.messages,I=e.hasMore,T=e.loading,C=e.loadMore,L=e.onJump,D=e.canCloseAllMessages,w=void 0!==D&&D,k=e.renderHeader,F=e.renderEmptyState,B=e.renderMessage,H=e.getProTip,x=e.scrollerClassName,z=e.className,K=e.onCloseMessage,$=e.listName,Z=a.useRef(null),q=(0,c.default)($,Z),X=(0,u.useStateFromStores)([m.default],(function(){return m.default.hasNotice()})),J=(0,u.useStateFromStores)([E.default],(function(){return E.default.windowSize()})),Q=(0,u.useStateFromStores)([y.default],(function(){var e=null!=_?y.default.getMessages(_.id):null;return null!=e&&null!=e.jumpTargetId&&(e.loadingMore&&!e.get(e.jumpTargetId))}));function ee(e,t){var r=e.id,a=e.blocked,o=e.author,i=e.channel_id;if(a)s.default.show({title:P.default.Messages.UNBLOCK_TO_JUMP_TITLE,body:P.default.Messages.UNBLOCK_TO_JUMP_BODY.format({name:o.username}),confirmText:P.default.Messages.OKAY});else if(!Q){var l=v.default.getChannel(i);l&&(d.default.trackJump(i,r,n),(0,p.transitionTo)(A.Routes.CHANNEL(l.getGuildId(),i,r))),null==L||L(t)}}a.useEffect((function(){M.default.track(A.AnalyticEvents.OPEN_POPOUT,{type:n})}),[n]),a.useEffect((function(){r(_)}),[_,r]),a.useEffect((function(){function e(){var e;null===(e=Z.current)||void 0===e||e.scrollPageUp({animate:!0})}function t(){var e;null===(e=Z.current)||void 0===e||e.scrollPageDown({animate:!0})}return N.ComponentDispatch.subscribe(A.ComponentActions.SCROLL_PAGE_DOWN,t),N.ComponentDispatch.subscribe(A.ComponentActions.SCROLL_PAGE_UP,e),function(){N.ComponentDispatch.unsubscribe(A.ComponentActions.SCROLL_PAGE_DOWN,t),N.ComponentDispatch.unsubscribe(A.ComponentActions.SCROLL_PAGE_UP,e)}}),[]);var te=null===(t=Z.current)||void 0===t?void 0:t.getScrollerState();var ne=[],re=!0;null==S?ne=[U("div",{className:(0,o.default)(R.default.emptyPlaceholder,R.default.loadingPlaceholder)},"spinner",W)]:0===S.length?ne.push(U(a.Fragment,{},"empty-state",F(h.default.theme))):(re=!1,ne=[],i.default.each(S,(function(e){var t;(t=ne).push.apply(t,function(e,t){if(null==e)return[];if(null!=B)return B(e,(function(t){return ee(e,t)}));var n=[];return null==t?[]:(n.push(U("div",{className:R.default.messageGroupWrapper},e.id,U(f.default,{className:R.default.messageGroupCozy,message:e,channel:t}),U(V,{channel:_,message:e,jumping:Q,canCloseAllMessages:w,jumpTo:ee,onCloseMessage:K}))),n)}(e,_))})));var ae=null;S&&S.length>0&&C&&(ae=T?U("div",{className:R.default.loadingMore},"loading-more-after",Y):I?U("div",{className:R.default.hasMore},void 0,U(g.default,{look:g.default.Looks.FILLED,color:g.default.Colors.GREY,size:g.default.Sizes.MAX,onClick:C},void 0,P.default.Messages.LOAD_MORE_MESSAGES)):U("div",{className:R.default.scrollingFooterWrap},void 0,F(h.default.theme)));var oe=null==H?void 0:H(),ie=re&&oe?U("div",{className:R.default.footer},void 0,U(O.default,{style:{width:"100%",paddingTop:10}},void 0,oe)):null,le={maxHeight:J.height-43-25};X&&(le.maxHeight-=40);var ue=C&&I;return U("div",{className:(0,o.default)(z,R.default.messagesPopoutWrap),style:le,onClick:G,onDoubleClick:G,"aria-label":e["aria-label"]},void 0,k(),a.createElement(b.default,{className:(0,o.default)(R.default.messagesPopout,x),onScroll:ue?function(){null!=te&&te.scrollHeight===te.scrollTop+te.offsetHeight&&I&&!T&&(null==C||C())}:void 0,ref:Z},U(l.ListNavigatorProvider,{navigator:q},void 0,U(l.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement("div",j({ref:t},n),ne)}))),ae),ie)}z.displayName="MessagesPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(5979);n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f={hasFetchedConsumedInboundPromotionId:!1,consumedInboundPromotionId:null,lastSeenOutboundPromotionStartDate:null,lastDismissedOutboundPromotionStartDate:null},c=!1,p=null,v=[];function y(){for(var e,t=null,n=s(v);!(e=n()).done;){var r=e.value;(null==t||new Date(r.startDate)>new Date(t))&&(t=r.startDate)}return t}var m=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a,o,i,s=r.prototype;return s.initialize=function(e){null!=e&&(f=e)},s.getEligibleActiveOutboundPromotions=function(){return v.filter((function(e){return e.id!==f.consumedInboundPromotionId}))},s.getUnseenOutboundPromotions=function(){var e=f.lastSeenOutboundPromotionStartDate;return null==e?this.getEligibleActiveOutboundPromotions():this.getEligibleActiveOutboundPromotions().filter((function(t){var n=t.startDate;return new Date(n)>new Date(e)}))},s.shouldShowOutboundPromotionNotice=function(){var e=this.getUnseenOutboundPromotions(),t=f.lastDismissedOutboundPromotionStartDate;return e.length>0&&(null==t||e.some((function(e){var n=e.startDate;return new Date(n)>new Date(t)})))},s.getState=function(){return f},a=r,(o=[{key:"lastFetchedActivePromotions",get:function(){return p}},{key:"isFetchingActiveOutboundPromotions",get:function(){return c}},{key:"hasFetchedConsumedInboundPromotionId",get:function(){return f.hasFetchedConsumedInboundPromotionId}},{key:"consumedInboundPromotionId",get:function(){return f.consumedInboundPromotionId}}])&&l(a.prototype,o),i&&l(a,i),r}(r.default.PersistedStore);m.persistKey="PromotionsPersistedStore";var _=new m(a.default,{ACTIVE_OUTBOUND_PROMOTIONS_FETCH_SUCCESS:function(e){var t=e.activeOutboundPromotions,n=e.consumedInboundPromotionId;v=t.map((function(e){return(0,o.outboundPromotionFromServer)(e)})),p=Date.now(),c=!1,f.hasFetchedConsumedInboundPromotionId||(f.hasFetchedConsumedInboundPromotionId=!0,f.consumedInboundPromotionId=n)},ACTIVE_OUTBOUND_PROMOTIONS_FETCH:function(e){c=!0},ACTIVE_OUTBOUND_PROMOTIONS_FETCH_FAIL:function(e){return v=[],void(c=!1)},OUTBOUND_PROMOTION_NOTICE_DISMISS:function(e){return function(){if(0===v.length)return!1;var e=y();null!=e&&(f.lastDismissedOutboundPromotionStartDate=e)}()},OUTBOUND_PROMOTIONS_SEEN:function(e){return function(){if(0===v.length)return!1;var e=y();null!=e&&(f.lastDismissedOutboundPromotionStartDate=e,f.lastSeenOutboundPromotionStartDate=e)}()},LOGOUT:function(e){return f={hasFetchedConsumedInboundPromotionId:!1,consumedInboundPromotionId:null,lastSeenOutboundPromotionStartDate:null,lastDismissedOutboundPromotionStartDate:null},c=!1,p=null,void(v=[])}});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChangeLogTemplate=void 0;var r,a,o=_(n(743)),i=_(n(3)),l=_(n(28)),u=_(n(2)),s=n(141),d=_(n(8761)),f=_(n(382)),c=_(n(15)),p=_(n(9153)),v=_(n(39)),y=_(n(12)),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){return(g=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}).apply(this,arguments)}r=n(9707),t.ChangeLogTemplate=a,function(e){e.SPECIAL="special",e.STANDARD="standard"}(a||(t.ChangeLogTemplate=a={}));var S,O,I,T={},C={},b={},M={},N=!1,A=!1;function P(e){return e.locale||"en-us"}if(r.replace(/\r\n/g,"\n").split("---changelog---\n").slice(1).forEach((function(e){var t=!1,n={},r=e.split("\n").filter((function(e){if("---"===e)return t=!0,!1;if(""!==e&&!t){var r=e.split(": "),a=r.shift(),o=r.join(": ");null!=a&&(n[a]=JSON.parse(o))}return t})).join("\n");if(null==n.date||null==n.revision)throw new Error("ChangeLogStore: A changelog does not contain a date or revision property");var o=g({},n,{date:n.date,revision:n.revision,locale:null!=n.locale?n.locale.toLowerCase():"en-us",body:r});if("string"!=typeof n.template&&(o.template=a.STANDARD),null!=n.experiment_names&&n.experiment_names.length>0)n.experiment_names.forEach((function(e){var t=C[e]||(C[e]={}),n=o.experiment_bucket||(o.experiment_bucket=s.ExperimentBuckets.CONTROL),r=t[String(n)]||(t[String(n)]={}),a=P(o);if(null!=r[a])throw new Error("ChangeLogStore: Locale ("+a+") already defined for "+e);r[a]=o}));else if(n.partner_guild_owner){var i=P(o);if(null!=M[i])throw new Error("ChangeLogStore: Locale ("+i+") already defined for PartnerGuildOwner changelogs");M[i]=o}else if(n.hypesquad){var l=P(o);if(null!=b[l])throw new Error("ChangeLogStore: Locale ("+l+") already defined for HypeSquad changelogs");b[l]=o}else{var u=P(o);if(null!=T[u])throw new Error("ChangeLogStore: Locale ("+u+") already defined for default changelogs");T[u]=o}})),null==T["en-us"])throw new Error("ChangeLogStore: No default changeLog");function R(e){if(!e)return null;var t=e.date,n=e.revision,r=e.experiment_names;return o.default.v3(JSON.stringify({date:t,revision:n,experiment_names:r}))}function L(e){void 0===e&&(e=!1);var t=null!=C?Object.keys(C):[],n=v.default.locale.toLowerCase(),r=y.default.getCurrentUser(),a=null;if(!e&&t.length>0){var o=d.default.getFirstEligibleUserExperiment(t);if(null!=o){var i=o[0],l=o[1];if(null==i||null==C[i])throw new Error("ChangeLogStore: This changelog experiment has not been registered");var u=String(l.bucket);null!=C[i][u]&&(a=C[i][u][n]||C[i][u]["en-us"])}}if(null==a){var s=Object.values(c.default.getGuilds());if(null!=s&&s.some((function(e){return e.hasFeature(m.GuildFeatures.PARTNERED)&&e.isOwner(r)}))){var f=M[n]||M["en-us"];if(null!=f)return f}}if(null==a&&null!=r&&(r.hasFlag(m.UserFlags.HYPESQUAD)||r.hasFlag(m.UserFlags.HYPESQUAD_ONLINE_HOUSE_1)||r.hasFlag(m.UserFlags.HYPESQUAD_ONLINE_HOUSE_2)||r.hasFlag(m.UserFlags.HYPESQUAD_ONLINE_HOUSE_3))){var p=b[n]||b["en-us"];if(null!=p)return p}return null==a&&(a=T[n]||T["en-us"]),a}function D(){if(N=!0,p.default.getWillShow())return A=!1,!0;var e=R(S=L()),t=l.default.get("lastChangeLogDate"),n=t&&new Date(t),r=S.date&&new Date(S.date);return O!==e&&y.default.getCurrentUser().isClaimed()&&(!n||!r||r>n)&&(A=null!=O,O=e,l.default.set("lastChangeLog",O),l.default.set("lastChangeLogDate",S.date),l.default.set("shouldShowChangeLog",A)),!0}S=L(!0);var w=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var a,o,i,u=r.prototype;return u.initialize=function(){O=l.default.get("lastChangeLog")||O,A=l.default.get("shouldShowChangeLog")||A,this.waitFor(c.default,y.default,f.default,v.default,p.default)},u.isOpen=function(){return N&&A},u.lastSeenChangeLogMatches=function(e){return O===R(e)},a=r,(o=[{key:"changeLog",get:function(){return S}},{key:"changeLogSource",get:function(){return I}}])&&h(a.prototype,o),i&&h(a,i),r}(i.default.Store))(u.default,{CHANGE_LOG_OPEN:function(e){return t=e.query,I=t,A=!0,void l.default.set("shouldShowChangeLog",A);var t},CHANGE_LOG_CLOSE:function(e){return A=!1,void l.default.set("shouldShowChangeLog",A)},CONNECTION_OPEN:function(e){return D()},CONNECTION_CLOSED:function(e){N=!1},USER_SETTINGS_UPDATE:function(e){if(null==e.settings.locale)return!1;S=L()},EXPERIMENT_OVERRIDE_BUCKET:function(e){return D(),!0}});t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(8)),a=n(141),o=n(208),i=l(n(382));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e){for(var t,n=u(e);!(t=n()).done;){var r=t.value,a=i.default.getEligibleExperiment(r);if(null!=a)return[r,a]}return null}var f={getFirstEligibleUserExperiment:d,isInExperimentBucket:function(e,t){return i.default.getExperimentBucket(e)===t},experimentDescriptorEquals:function(e,t){if(null==e&&null==t)return!0;if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null!=e&&null!=t){if(e.type!==t.type)return!1;if(e.bucket!==t.bucket)return!1;if(e.revision!==t.revision)return!1;if(e.type===a.ExperimentTypes.USER&&t.type===a.ExperimentTypes.USER)return r.default.isEqual(e.context,t.context)}return!0},trackExposureToFirstEligibleUserExperiment:function(e){var t=d(e);if(null!=t){var n=t[0],r=t[1];return(0,o.trackExposureToExperiment)(n,r),r}},getExperimentBucketName:function(e){return e===a.ExperimentBuckets.CONTROL?"Control":e===a.ExperimentBuckets.NOT_ELIGIBLE?"Not Eligible":"Treatment "+e}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M5.79335761,5 L18.2066424,5 C19.7805584,5 21.0868816,6.21634264 21.1990185,7.78625885 L21.8575059,17.0050826 C21.9307825,18.0309548 21.1585512,18.9219909 20.132679,18.9952675 C20.088523,18.9984215 20.0442685,19 20,19 C18.8245863,19 17.8000084,18.2000338 17.5149287,17.059715 L17,15 L7,15 L6.48507125,17.059715 C6.19999155,18.2000338 5.1754137,19 4,19 C2.97151413,19 2.13776159,18.1662475 2.13776159,17.1377616 C2.13776159,17.0934931 2.1393401,17.0492386 2.1424941,17.0050826 L2.80098151,7.78625885 C2.91311838,6.21634264 4.21944161,5 5.79335761,5 Z M14.5,10 C15.3284271,10 16,9.32842712 16,8.5 C16,7.67157288 15.3284271,7 14.5,7 C13.6715729,7 13,7.67157288 13,8.5 C13,9.32842712 13.6715729,10 14.5,10 Z M18.5,13 C19.3284271,13 20,12.3284271 20,11.5 C20,10.6715729 19.3284271,10 18.5,10 C17.6715729,10 17,10.6715729 17,11.5 C17,12.3284271 17.6715729,13 18.5,13 Z M6,9 L4,9 L4,11 L6,11 L6,13 L8,13 L8,11 L10,11 L10,9 L8,9 L8,7 L6,7 L6,9 Z"}),d))}f.displayName="Activity"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=n(3),l=n(57),u=E(n(294)),s=E(n(8478)),d=E(n(163)),f=E(n(11)),c=E(n(51)),p=E(n(40)),v=E(n(283)),y=n(8670),m=E(n(9723)),_=n(1),h=E(n(7656));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){return(I=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}).apply(this,arguments)}var T=a.memo((function(e){var t=e.mute,n=e.deaf,r=e.sessionId,o=e.user.id,l=e.channel,p=(0,i.useStateFromStores)([f.default],(function(){return f.default.getId()===o}),[o]),y=(0,i.useStateFromStoresArray)([c.default],(function(){return p?[!c.default.isSupported()||c.default.isSelfMute()||c.default.isSelfMutedTemporarily(),c.default.isSelfDeaf(),!1]:[!c.default.isSupported()||c.default.isLocalMute(o),!1,c.default.isLocalVideoDisabled(o)]}),[p,o]),h=y[0],E=y[1],g=y[2],S=(0,i.useStateFromStoresArray)([v.default],(function(){return[v.default.isPrioritySpeaker(o),v.default.isSpeaking(o)||v.default.isSoundSharing(o)]}),[o]),O=S[0],T=S[1],C=(0,i.useStateFromStores)([u.default],(function(){return p?u.default.getSelfEmbeddedActivityForChannel(l.id):u.default.getEmbeddedActivitiesForUser(o,r)[0]}),[p,r,o,l.id]),b=(0,s.default)(null!=C?[C.applicationId]:[]),M=(0,i.useStateFromStoresArray)([d.default],(function(){return[d.default.getStreamForUser(o),d.default.getActiveStreamForUser(o)]}),[o]),N=M[0],A=M[1];return a.createElement(m.default,I({},e,{localMute:h&&!p,localVideoDisabled:g,mute:t||h,deaf:n||E,speaking:(p||!t&&!h)&&T,priority:O,embeddedActivityType:null==C?void 0:C.type,embeddedApplication:b[0],isStreaming:null!=N&&N.channelId===l.id,isWatching:null!=A&&A.state!==_.ApplicationStreamStates.ENDED}))}));T.displayName="ConnectedVoiceUser";var C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).showPreview=new l.DelayedCall(50,(function(){t.setState({previewUserId:t.previewUserIdAfterDelay}),t.previewUserIdAfterDelay=null})),t.hidePreview=new l.DelayedCall(175,(function(){t.setState({previewUserId:null})})),t.previewUserIdAfterDelay=null,t.state={previewUserId:null,previewIsOpen:!1},t.handleShowPreview=function(e){t.props.allowPreviews&&(t.setState({previewIsOpen:!0}),t.hidePreview.cancel(),t.previewUserIdAfterDelay=e,t.showPreview.delay())},t.handleHidePreview=function(e){if(t.props.allowPreviews){var n=t.state.previewUserId;t.showPreview.cancel(),n===e&&(t.setState({previewIsOpen:!1}),t.hidePreview.delay())}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a=r.prototype;return a.renderVoiceUsers=function(){var e=this,t=this.props,n=t.channel,r=t.allowDragging,a=t.voiceStates,o=t.collapsed,i=t.tabIndex,l=this.state,u=l.previewUserId,s=l.previewIsOpen;return null==a||0===a.length?null:a.map((function(t){var a,l=t.user,d=t.nick,c=t.voiceState;return S(T,{user:l,nick:d,isSelfOnOtherClient:f.default.getId()===l.id&&c.sessionId!==f.default.getSessionId(),mute:c.isVoiceMuted(),deaf:c.isVoiceDeafened(),video:c.selfVideo,serverMute:c.mute,serverDeaf:c.deaf,sessionId:null!==(a=c.sessionId)&&void 0!==a?a:"",channel:n,collapsed:o,canDrag:r&&p.default.can(_.Permissions.MOVE_MEMBERS,n),showPreview:e.handleShowPreview,hidePreview:e.handleHidePreview,previewIsOpen:s,shouldShowPreview:u===l.id,tabIndex:i},l.id)}))},a.render=function(){var e,t=this.renderVoiceUsers(),n=this.props,r=n.collapsed,a=n.className,i=n.children;return null==t&&null==i?null:S(y.VoiceUserList,{className:(0,o.default)(a,h.default.list,(e={},e[h.default.collapsed]=r,e)),collapsed:r},void 0,t,i)},r}(a.Component);C.displayName="VoiceUsers",C.defaultProps={allowPreviews:!0,allowDragging:!0};var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StaticGuildEventIndexes=void 0;var r=l(n(3)),a=l(n(313)),o=l(n(2)),i=n(8423);n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c={STAGE_EVENT:"stage-event",STAGE_EVENT_ACTIVE:"stage-event-active",GUILD_STAGE_EVENT:function(e){return e+"-"+c.STAGE_EVENT},GUILD_STAGE_EVENT_ACTIVE:function(e){return e+"-"+c.STAGE_EVENT_ACTIVE},GUILD_CHANNEL_STAGE_EVENT:function(e,t){return e+"-"+t+"-"+c.STAGE_EVENT},GUILD_CHANNEL_STAGE_EVENT_ACTIVE:function(e,t){return e+"-"+t+"-"+c.STAGE_EVENT_ACTIVE}};t.StaticGuildEventIndexes=c;var p=new a.default((function(e){var t=e.guild_id,n=e.entity_id,r=e.channel_id,a=[t];return null!=n&&a.push(n),e.entity_type===i.GuildScheduledEventEntityTypes.STAGE_INSTANCE&&(a.push(c.STAGE_EVENT),a.push(c.GUILD_STAGE_EVENT(t)),null!=r&&a.push(c.GUILD_CHANNEL_STAGE_EVENT(t,r)),function(e){return!i.GuildScheduledEventStatusDone.has(e.status)}(e)&&(a.push(c.STAGE_EVENT_ACTIVE),a.push(c.GUILD_STAGE_EVENT_ACTIVE(t)),null!=r&&a.push(c.GUILD_CHANNEL_STAGE_EVENT_ACTIVE(t,r)))),a}),(function(e){var t=e.id;return""+e.scheduled_start_time+t}));function v(e){p.set(e.id,e)}function y(e){v(e.guildScheduledEvent)}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.getGuildScheduledEvent=function(e){var t;return null==e?null:null!==(t=p.get(e))&&void 0!==t?t:null},a.getGuildScheduledEventsForGuild=function(e){return null==e?[]:p.values(e)},a.getGuildScheduledEventsByIndex=function(e){return p.values(e)},r}(r.default.Store))(o.default,{CONNECTION_OPEN:function(e){return p.clear(),!0},FETCH_GUILD_EVENTS_FOR_GUILD:function(e){for(var t,n=e.guildId,r=e.guildScheduledEvents,a=d(p.values(n,!0));!(t=a()).done;){var o=t.value;p.delete(o.id)}for(var i,l=d(r);!(i=l()).done;){v(i.value)}return!0},GUILD_SCHEDULED_EVENT_CREATE:y,GUILD_SCHEDULED_EVENT_UPDATE:y,GUILD_SCHEDULED_EVENT_USER_CREATE:function(e){var t=e.guildEventId,n=p.get(t);return null!=n&&(v(s({},n,{rsvped:!0})),!0)},GUILD_SCHEDULED_EVENT_USER_DELETE:function(e){var t=e.guildEventId,n=p.get(t);return null!=n&&(v(s({},n,{rsvped:!1})),!0)},GUILD_SCHEDULED_EVENT_RSVPS_FETCH_SUCESS:function(e){e.guildScheduledEvents.forEach((function(e){var t=p.get(e.id);null!=t&&v(s({},t,{rsvped:!0}))}))},LOGOUT:function(e){return p.clear(),!0}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={setSection:function(e){a.default.dispatch({type:o.ActionTypes.FRIENDS_SET_SECTION,section:e})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=p(n(0)),o=f(n(1330)),i=f(n(9731)),l=p(n(9732)),u=f(n(16)),s=f(n(43)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=u.default.embedded&&null!=s.default.getDiscordUtils().inputCaptureRegisterElement,_=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this)._mounted=!1,n.recordStart=function(){u.default.embedded&&!m&&(n.gs=new i.default,n.gs.on("change",n.handleGSChange)),n.setState({mode:l.RecordModes.RECORDING})},n.recordEnd=function(){n.cleanUp(),n.setState({mode:l.RecordModes.DEFAULT})},n.toggleRecordMode=function(){n.state.mode===l.RecordModes.DEFAULT?n.recordStart():n.recordEnd()},n.handleComboKeys=function(e,t,r){if(r.preventDefault(),"keydown"===r.type){var a=t.map((function(e){return[d.KeyboardDeviceTypes.KEYBOARD_KEY,(0,o.default)(e),d.KeyboardEnvs.BROWSER]})),i=r.keyCode;a.find((function(e){var t=e[1];return i===t}))||a.push([d.KeyboardDeviceTypes.KEYBOARD_KEY,i,d.KeyboardEnvs.BROWSER]),n.handleComboChange(a)}},n.handleGSChange=function(e){if(!1!==n._mounted){var t=[].concat(e.combo);n.handleComboChange(t)}},n.handleNativeChange=function(e){e.length>0&&n.handleComboChange(e),n.recordEnd()};var r=t.defaultValue;return n.state={codes:r,mode:l.RecordModes.DEFAULT},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.componentDidMount=function(){this._mounted=!0},a.componentWillUnmount=function(){this._mounted=!1,this.cleanUp()},a.cleanUp=function(){u.default.embedded&&null!=this.gs&&(this.gs.destroy(),this.gs=null)},a.handleComboChange=function(e){var t=this.state.mode,n=this.props.onChange;t===l.RecordModes.RECORDING&&(null!=n&&n(e),this.setState({codes:e}))},a.render=function(){var e,t,n=this.state,r=n.codes,a=n.mode,o=this.props.disabled;return m?(t=s.default.getDiscordUtils().inputCaptureRegisterElement,e=this.handleNativeChange):u.default.embedded||(e=this.handleComboKeys),v(l.default,{disabled:o,value:r,mode:a,onClick:this.toggleRecordMode,onChange:e,registerNativeRecorder:t,disableOnClickWhileRecording:m})},r}(a.PureComponent);_.displayName="KeybindRecorder";var h=_;t.default=h},function(e,t,n){e.exports=n.p+"3231ce6517d4a74dc5cdb4c98a0e8fd2.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(8751)),o=l(n(181)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u={update:function(e){r.default.dispatch({type:i.ActionTypes.CHANNEL_COLLAPSE,channelId:e})},toggleCollapseGuild:function(e){a.default.saveUserGuildSettings(e,{hide_muted_channels:!o.default.isGuildCollapsed(e)}),r.default.dispatch({type:i.ActionTypes.GUILD_TOGGLE_COLLAPSE_MUTED,guildId:e})}};t.default=u},function(e,t,n){"use strict";var r,a,o;Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsSetupTypes=t.AnalyticsActions=t.Steps=void 0,t.Steps=r,function(e){e.INVITE="member_joined",e.CHANNEL="create_channel",e.AVATAR="avatar",e.MESSAGE="send_message",e.COMPLETED="completed",e.DISMISSED="dismissed"}(r||(t.Steps=r={})),t.AnalyticsActions=a,function(e){e.PERSONALIZE_SERVER="Personalize Server",e.INVITE="Invite Friends",e.CREATE_CHANNEL="Create Channel",e.SEND_MESSAGE="Send Message",e.DOWNLOAD="Download",e.DISMISS_GUILD_PROGRESS="Dismiss Guild Progress",e.DISCORD_OVERVIEW_VIDEO="Discord Overview Video"}(a||(t.AnalyticsActions=a={})),t.AnalyticsSetupTypes=o,function(e){e.CHANNEL_WELCOME="Channel Welcome CTA",e.GUILD_PROGRESS="Guild Progress"}(o||(t.AnalyticsSetupTypes=o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(28)),o=i(n(2));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={};var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var o=r.prototype;return o.initialize=function(){u=a.default.get("GuildNSFWAgreeStore")||u},o.didAgree=function(e){return null!=e&&(u[e]||!1)},r}(r.default.Store))(o.default,{GUILD_NSFW_AGREE:function(e){var t=e.guildId;u[t]=!0,a.default.set("GuildNSFWAgreeStore",u)}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDispatchApplicationStates=j,t.default=void 0;var r,a,o,i,l,u=N(n(0)),s=b(n(9)),d=b(n(273)),f=b(n(3)),c=b(n(469)),p=n(42),v=b(n(155)),y=b(n(405)),m=b(n(71)),_=n(8432),h=b(n(9206)),E=b(n(149)),g=b(n(8376)),S=N(n(136)),O=b(n(9034)),I=n(1),T=b(n(6)),C=b(n(7798));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function A(e,t,n,r){l||(l="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var i=new Array(o),u=0;u<o;u++)i[u]=arguments[u+3];t.children=i}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:l,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,R(e,t)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=((i={})[I.LocalDispatchApplicationStates.INSTALLING]=((r={})[_.TimeUnits.NONE]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING.format({name:e})},r[_.TimeUnits.SECONDS]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_SECONDS.format({name:e,timeRemaining:t})},r[_.TimeUnits.MINUTES]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_MINUTES.format({name:e,timeRemaining:t})},r[_.TimeUnits.HOURS]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_HOURS.format({name:e,timeRemaining:t})},r),i[I.LocalDispatchApplicationStates.UPDATING]=((a={})[_.TimeUnits.NONE]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING.format({name:e})},a[_.TimeUnits.SECONDS]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_SECONDS.format({name:e,timeRemaining:t})},a[_.TimeUnits.MINUTES]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_MINUTES.format({name:e,timeRemaining:t})},a[_.TimeUnits.HOURS]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_HOURS.format({name:e,timeRemaining:t})},a),i[I.LocalDispatchApplicationStates.REPAIRING]=((o={})[_.TimeUnits.NONE]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING.format({name:e})},o[_.TimeUnits.SECONDS]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_SECONDS.format({name:e,timeRemaining:t})},o[_.TimeUnits.MINUTES]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_MINUTES.format({name:e,timeRemaining:t})},o[_.TimeUnits.HOURS]=function(e,t){return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_HOURS.format({name:e,timeRemaining:t})},o),i),D=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderProgressBody=function(e,n){var r=t.props,a=r.state,o=r.application,i=a.stage,l=a.progress,u=a.total,s=a.type;if(null==l||null==u||null==i)return null;var d=e[e.length-1]/n*1e3,f=u-l,c=0!==d?Math.max(1,f/d):null,p=null!=c?c/60:null,v=L[s],y=null!=v?Object.keys(v):[],m=(0,_.getTimeAndUnit)(p,y),h=m.unit,E=m.time;if(null!=v&&null!=h){var g=v[h];return null!=g?g(o.name,E):null}return null},t}P(t,e);var n=t.prototype;return n.renderText=function(){var e=this.props,t=e.state,n=e.isPaused;if(t.type===I.LocalDispatchApplicationStates.UPDATING||t.type===I.LocalDispatchApplicationStates.REPAIRING||t.type===I.LocalDispatchApplicationStates.INSTALLING){if(n)return T.default.Messages.APPLICATION_PROGRESS_INDICATOR_PAUSED;if(t.stage===I.DispatchApplicationStages.PATCHING||t.stage===I.DispatchApplicationStages.REPAIRING)return A(O.default,{getHistoricalTotalBytes:v.default.getHistoricalTotalBytesWritten,updateInterval:5e3},void 0,this.renderProgressBody)}return null},n.render=function(){var e=this.renderText();return null!=e?e:T.default.Messages.LIBRARY},t}(u.PureComponent);D.displayName="UpdateProgressTooltipText";var w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={animationScale:new d.default.Value(0)},t.handleOnClick=function(e){var n=t.props.onClick;e.preventDefault(),e.stopPropagation(),null!=n&&n(e),(0,p.transitionTo)(I.Routes.APPLICATION_LIBRARY)},t}P(t,e);var n=t.prototype;return n.componentWillAppear=function(e){this.state.animationScale.setValue(1),e()},n.componentWillEnter=function(e){d.default.spring(this.state.animationScale,{toValue:1,duration:200}).start(e)},n.componentWillLeave=function(e){d.default.spring(this.state.animationScale,{toValue:0,duration:200}).start(e)},n.getTooltipText=function(){var e=this.props,t=e.firstApplication,n=e.firstState,r=e.isPaused;return null==t||null==n?T.default.Messages.LIBRARY:A(D,{application:t,state:n,isPaused:r})},n.render=function(){var e=this.props,t=e.percent,n=e.isPaused,r=e.className;return A(d.default.div,{style:{transform:[{scale:this.state.animationScale}]},className:(0,s.default)(r,C.default.progressContainer),onClick:this.handleOnClick},void 0,A(E.default,{text:this.getTooltipText(),position:E.default.Positions.RIGHT,"aria-label":!1},void 0,(function(e){return u.createElement("div",e,A(h.default,{percent:t,colorOverride:n?I.Colors.PRIMARY_DARK_500:null},void 0,A(g.default,{className:C.default.downloadIcon})))})))},t}(u.PureComponent);w.displayName="GameUpdateProgressIndicator",w.defaultProps={strokeSize:h.default.StrokeSizes.MEDIUM};function j(e,t){return e.reduce((function(e,n){var r=n.applicationId,a=n.branchId,o=t.getState(r,a);return null!=o&&e.push(o),e}),[])}var k=f.default.connectStores([y.default,m.default,v.default],(function(){var e=y.default.activeItems,t=j(e,v.default),n=S.getCombinedProgress(t),r=n.total,a=n.progress;return{percent:S.calculateProgressPercentage(a,r),isPaused:y.default.paused,firstApplication:e.length>0?m.default.getGame(e[0].applicationId):null,firstState:t.length>0?t[0]:null}}))((function(e){var t=e.determineOwnVisibility,n=void 0===t||t,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["determineOwnVisibility"]);return n?A(c.default,{component:u.Fragment},void 0,r.percent>0&&r.percent<100?u.createElement(w,r):null):u.createElement(w,r)}));t.default=k},function(e,t,n){e.exports=n.p+"3bd0d83cb24ccf918b757ab5c18dc564.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8253),o=u(n(16)),i=u(n(43)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return o.default.embedded&&0!==(null==e?void 0:e.length)?d(a.MenuItem,{id:"copy",label:l.default.Messages.COPY,hint:o.default.isOSX()?"⌘C":"Ctrl+C",action:function(){i.default.copy(e),null==t||t.focus()}}):null}f.displayName="useNativeCopyItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=n(1395),i=n(8253),l=n(1163),u=n(1),s=(r=n(6))&&r.__esModule?r:{default:r};function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return l.SUPPORTS_COPY&&e.type!==u.MessageTypes.GUILD_INVITE_REMINDER?f(i.MenuItem,{id:"copy-link",label:s.default.Messages.COPY_MESSAGE_LINK,action:function(){return(0,o.copy)(location.protocol+"//"+location.host+u.Routes.CHANNEL(t.guild_id,t.id,e.id))}}):null}c.displayName="useMessageCopyLinkItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=p(n(390)),i=p(n(8487)),l=n(8253),u=n(8256),s=p(n(40)),d=p(n(12)),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){var n=(0,a.useStateFromStores)([d.default],(function(){return d.default.getCurrentUser()}),[]),r=(0,a.useStateFromStores)([s.default],(function(){return s.default.can(f.Permissions.MANAGE_MESSAGES,t)&&!t.isArchivedThread()}),[t]);return e.state===f.MessageStates.SENDING?null:(e.author.id===n.id||r)&&e.type in f.MessageTypesDeletable?y(l.MenuItem,{id:"delete",label:c.default.Messages.DELETE_MESSAGE,action:function(n){e.state===f.MessageStates.SEND_FAILED?o.default.deleteMessage(t.id,e.id,!0):n.shiftKey?o.default.deleteMessage(t.id,e.id):i.default.confirmDelete(t,e,!0)},color:u.MenuItemColor.DANGER}):null}m.displayName="useMessageDeleteItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=f(n(410)),l=f(n(204)),u=n(31),s=f(n(8706)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){if((0,a.useStateFromStores)([i.default,l.default],(function(){return!u.THREAD_CHANNEL_TYPES.has(t.type)||i.default.isActive(t.guild_id,t.id)&&l.default.hasJoined(t.id)})))return p(o.MenuItem,{id:"mark-unread",label:d.default.Messages.MARK_UNREAD,action:function(){return(0,s.default)(t.id,e.id)}})}v.displayName="useMessageMarkUnreadItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(24)),i=l(n(7905));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.children,n=e.className;return s(o.default,{color:o.default.Colors.CUSTOM,className:(0,a.default)(i.default.subtext,n),size:o.default.Sizes.SIZE_12},void 0,t)}d.displayName="PanelSubtext"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(1),o=(r=n(6))&&r.__esModule?r:{default:r};var i={getStatus:function(e,t){var n,r;switch(void 0===t&&(t=!1),e){case a.RTCConnectionStates.CONNECTING:n=a.ConnectionStatus.CONNECTING,r=o.default.Messages.CONNECTION_STATUS_CONNECTING;break;case a.RTCConnectionStates.AUTHENTICATING:n=a.ConnectionStatus.CONNECTING,r=o.default.Messages.CONNECTION_STATUS_AUTHENTICATING;break;case a.RTCConnectionStates.AWAITING_ENDPOINT:n=a.ConnectionStatus.CONNECTING,r=o.default.Messages.CONNECTION_STATUS_AWAITING_ENDPOINT;break;case a.RTCConnectionStates.RTC_CONNECTED:n=a.ConnectionStatus.CONNECTED,r=t?o.default.Messages.CONNECTION_STATUS_VIDEO_CONNECTED:o.default.Messages.CONNECTION_STATUS_VOICE_CONNECTED;break;case a.RTCConnectionStates.RTC_CONNECTING:n=a.ConnectionStatus.CONNECTING,r=o.default.Messages.CONNECTION_STATUS_RTC_CONNECTING;break;case a.RTCConnectionStates.ICE_CHECKING:n=a.ConnectionStatus.CONNECTING,r=o.default.Messages.CONNECTION_STATUS_ICE_CHECKING;break;case a.RTCConnectionStates.NO_ROUTE:n=a.ConnectionStatus.ERROR,r=o.default.Messages.CONNECTION_STATUS_NO_ROUTE;break;case a.RTCConnectionStates.RTC_DISCONNECTED:n=a.ConnectionStatus.ERROR,r=o.default.Messages.CONNECTION_STATUS_RTC_DISCONNECTED;break;case a.RTCConnectionStates.DISCONNECTED:default:n=a.ConnectionStatus.ERROR,r=o.default.Messages.CONNECTION_STATUS_DISCONNECTED}return{connectionStatus:n,connectionStatusText:r}},getShortHostname:function(e){return null==e?"":e.split(".")[0]}};t.default=i},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizeAndSetTestModeApplication=function(e,t){return _.apply(this,arguments)},t.reset=function(){r.default.dispatch({type:f.ActionTypes.DEVELOPER_TEST_MODE_RESET})},t.resetError=function(){r.default.dispatch({type:f.ActionTypes.DEVELOPER_TEST_MODE_RESET_ERROR})};var r=v(n(2)),a=v(n(379)),o=v(n(71)),i=n(99),l=v(n(186)),u=v(n(478)),s=p(n(8716)),d=p(n(5672)),f=n(1);function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){y(o,r,a,i,l,"next",e)}function l(e){y(o,r,a,i,l,"throw",e)}i(void 0)}))}}function _(){return(_=m(regeneratorRuntime.mark((function e(t,n){var c,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.default.dispatch({applicationId:t,type:f.ActionTypes.DEVELOPER_TEST_MODE_AUTHORIZATION_START}),e.prev=1,e.next=4,d.fetchSKUsForApplication(t,!1);case 4:if(null!=e.sent){e.next=7;break}throw new Error("Did not get a successful response from endpoint.");case 7:if(null!=(c=o.default.getGame(t))){e.next=14;break}return e.t0=a.default,e.next=12,u.default.fetchApplication(t);case 12:e.t1=e.sent,c=e.t0.createFromServer.call(e.t0,e.t1);case 14:if(!(p=(0,i.hasFlag)(c.flags,f.ApplicationFlags.EMBEDDED))||null!=n&&l.default.URL_REGEX.test(n)){e.next=17;break}throw new Error("Invalid Origin URL for embedded application");case 17:return p||s.createTestModeLibraryApplications(c),r.default.dispatch({type:f.ActionTypes.DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS,applicationId:t,originURL:p?n:null}),e.abrupt("return",!0);case 22:return e.prev=22,e.t2=e.catch(1),r.default.dispatch({type:f.ActionTypes.DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL,applicationId:t,error:e.t2.message}),e.abrupt("return",!1);case 26:case"end":return e.stop()}}),e,null,[[1,22]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openModal=function(e,t){return new Promise((function(n){a.default.dispatch({type:o.ActionTypes.ACTIVITY_INVITE_MODAL_OPEN,activity:e,isPrivate:t,resolve:n})}))},t.updateQuery=function(e){a.default.dispatch({type:o.ActionTypes.ACTIVITY_INVITE_MODAL_QUERY,query:e})},t.inviteChannel=function(e){a.default.dispatch({type:o.ActionTypes.ACTIVITY_INVITE_MODAL_SEND,channelId:e})},t.inviteUser=function(e){a.default.dispatch({type:o.ActionTypes.ACTIVITY_INVITE_MODAL_SEND,userId:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=function(e,t,n){void 0===n&&(n={});a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_OPEN,id:e,component:t,props:n})},t.close=function(e){a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_CLOSE,id:e})},t.hide=function(e){a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_HIDE,id:e})},t.show=function(e){a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_SHOW,id:e})},t.moveTo=function(e,t){a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_MOVE,id:e,position:t})},t.updateRect=function(e,t){a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_UPDATE_RECT,id:e,rect:t})},t.switchPIPFocus=function(e){a.default.dispatch({type:o.ActionTypes.PICTURE_IN_PICTURE_UPDATE_SELECTED_WINDOW,id:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(28)),o=l(n(2)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){return(d=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}).apply(this,arguments)}var f,c=new Map,p=i.PictureInPicturePositions.BOTTOM_RIGHT,v={};var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var o,l,d,y=r.prototype;return y.initialize=function(){p=a.default.get("PictureInPictureLocation",i.PictureInPicturePositions.BOTTOM_RIGHT)},y.isEmbeddedActivityHidden=function(){var e;return null==f||(null===(e=c.get(f))||void 0===e?void 0:e.component)!==i.PictureInPictureComponents.EMBED_IFRAME},y.getDockedRect=function(e){return v[e]},y.isOpen=function(e){return null!=e&&c.has(e)},o=r,(l=[{key:"pipWindow",get:function(){return null==f?null:c.get(f)}},{key:"pipWindows",get:function(){return c}}])&&u(o.prototype,l),d&&u(o,d),r}(r.default.Store))(o.default,{PICTURE_IN_PICTURE_OPEN:function(e){var t,n,r=e.id,a=e.component,o=e.props;if(null==c.get(r)){var i={id:r,component:a,position:null!==(t=o.position)&&void 0!==t?t:p,props:o,docked:null!==(n=o.docked)&&void 0!==n&&n};c.set(r,i),null==f&&(f=r)}},PICTURE_IN_PICTURE_CLOSE:function(e){var t=e.id;if(!c.has(t))return!1;if(c.delete(t),f===t){var n=Array.from(c.keys());f=0===n.length?null:n[0]}},PICTURE_IN_PICTURE_MOVE:function(e){var t=e.id,n=e.position;if(null==f||f!==t)return!1;var r=new Map;c.forEach((function(e,t){r.set(t,d({},e,{position:n}))})),c=r,p=n,a.default.set("PictureInPictureLocation",n)},PICTURE_IN_PICTURE_HIDE:function(e){var t=e.id;if(f!==t)return!1;var n=c.get(t);if(null==n)return!1;c.set(t,d({},n,{hidden:!0}))},PICTURE_IN_PICTURE_SHOW:function(e){var t=e.id;if(f!==t)return!1;var n=c.get(t);if(null==n)return!1;c.set(t,d({},n,{hidden:!1}))},PICTURE_IN_PICTURE_UPDATE_RECT:function(e){var t=e.id,n=e.rect;v[t]=n},PICTURE_IN_PICTURE_UPDATE_SELECTED_WINDOW:function(e){var t=e.id;f=t},LOGOUT:function(e){return f=null,void(c=new Map)}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openAgeGateModal=function(e){o.default.track(i.AnalyticEvents.OPEN_MODAL,{type:"Enter Your Birthday",source:{section:e}}),r.default.dispatch({type:i.ActionTypes.AGE_GATE_MODAL_OPEN,source:e})},t.closeAgeGateModal=function(){r.default.wait((function(){return r.default.dispatch({type:i.ActionTypes.AGE_GATE_MODAL_CLOSE})}))},t.openSuccessAgeGateModal=function(){r.default.wait((function(){r.default.dispatch({type:i.ActionTypes.AGE_GATE_SUCCESS_MODAL_OPEN})}))},t.openFailureAgeGateModal=function(e,t){void 0===t&&(t=!1);r.default.wait((function(){r.default.dispatch({type:i.ActionTypes.AGE_GATE_FAILURE_MODAL_OPEN,underageMessage:e,forceOpen:t})}))},t.closeFailedAgeGate=function(){r.default.dispatch({type:i.ActionTypes.LOGOUT}),(0,a.transitionTo)(i.Routes.LOGIN)};var r=l(n(2)),a=n(42),o=l(n(13)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCustomizeGuildSlide=N,t.default=function(e){return N(e).content};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(9)),i=n(3),l=T(n(199)),u=T(n(8792)),s=T(n(162)),d=T(n(12)),f=T(n(29)),c=T(n(55)),p=T(n(8272)),v=T(n(153)),y=n(85),m=n(131),_=n(35),h=T(n(47)),E=T(n(24)),g=T(n(9265)),S=n(1),O=T(n(6)),I=T(n(7361));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function N(e){var t=e.guildTemplate,n=e.onClose,r=e.onBack,T=e.onGuildCreated,C=e.onHubGuildCreated,N=e.isSlideReady,A=e.hasFooter,P=void 0===A||A,R=e.isCommunity,L=void 0!==R&&R,D=e.isHubCreationFlow,w=void 0!==D&&D,j=e.description,k=e.onDescriptionChange,U=(0,y.useUID)(),G=(0,i.useStateFromStores)([d.default],(function(){return d.default.getNullableCurrentUser()}),[]),F=a.useState(O.default.Messages.CREATE_SERVER_DEFAULT_SERVER_NAME_FORMAT.format({username:null==G?void 0:G.username})),B=F[0],H=F[1],x=a.useState(null),V=x[0],W=x[1],Y=a.useState(!1),z=Y[0],K=Y[1],$=a.useState(null),Z=$[0],q=$[1],X=a.useRef(null);a.useEffect((function(){var e;N&&(null===(e=X.current)||void 0===e||e.focus())}),[N]);var J=a.useCallback(function(){var e,n=(e=regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.preventDefault(),null!=t){e.next=3;break}return e.abrupt("return");case 3:return K(!0),q(null),e.prev=5,e.next=8,g.default.createGuildFromTemplate(B,V,t,L);case 8:r=e.sent,w?null==C||C(new s.default(r)):(l.default.transitionToGuildSync(r.id),null==T||T(r.id)),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),q(e.t0);case 15:K(!1);case 16:case"end":return e.stop()}}),e,null,[[5,12]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){M(o,r,a,i,l,"next",e)}function l(e){M(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),[t,V,B,T,C,L,w]),Q=a.createElement(a.Fragment,null,b(f.default,{color:f.default.Colors.BRAND,onClick:J,disabled:0===B.length,submitting:z},void 0,O.default.Messages.CREATE),b(f.default,{look:f.default.Looks.BLANK,size:f.default.Sizes.MIN,onClick:r},void 0,O.default.Messages.BACK));return{content:a.createElement(a.Fragment,null,b(_.ModalHeader,{direction:c.default.Direction.VERTICAL,className:I.default.header,separator:!1,id:U},void 0,b(h.default,{className:(0,o.default)(I.default.title),size:h.default.Sizes.SIZE_24},void 0,O.default.Messages.NUF_CREATE_SERVER_CUSTOMIZE_HEADER),b(E.default,{className:I.default.subtitle,color:E.default.Colors.HEADER_SECONDARY,size:E.default.Sizes.SIZE_16},void 0,O.default.Messages.NUF_CREATE_SERVER_CUSTOMIZE_SUBHEADER),n&&b(_.ModalCloseButton,{className:I.default.closeButton,onClick:n})),b(_.ModalContent,{className:I.default.createGuild},void 0,b("div",{className:I.default.uploadIcon},void 0,b(u.default,{icon:V,onChange:W})),b("form",{onSubmit:J},void 0,b(m.FormItem,{title:O.default.Messages.FORM_LABEL_SERVER_NAME,className:I.default.nameInput,error:null==Z?void 0:Z.getFirstFieldErrorMessage("name")},void 0,b(v.default,{type:"text",value:B,maxLength:100,onChange:H,inputRef:X})),b(E.default,{size:E.default.Sizes.SIZE_12,color:E.default.Colors.MUTED,className:I.default.guidelines},void 0,O.default.Messages.CREATE_SERVER_GUIDELINES.format({guidelinesURL:S.MarketingURLs.GUIDELINES})),w&&a.createElement(a.Fragment,null,b(m.FormItem,{title:O.default.Messages.HUB_ADD_GUILD_DESCRIPTION_TITLE,className:I.default.descriptionInput},void 0,b(p.default,{value:j,maxLength:200,placeholder:O.default.Messages.HUB_ADD_GUILD_DESCRIPTION_PLACEHOLDER,onChange:k})),b(E.default,{size:E.default.Sizes.SIZE_12,color:E.default.Colors.MUTED,className:I.default.guidelines},void 0,O.default.Messages.HUB_CUSTOMIZE_NEW_GUILD_SUBTITLE))),null==Z||Z.hasFieldErrors()?null:b(E.default,{size:E.default.Sizes.SIZE_12,color:E.default.Colors.STATUS_RED},void 0,Z.message)),P&&b(_.ModalFooter,{justify:c.default.Justify.BETWEEN},void 0,Q)),footer:Q}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(88)),o=l(n(8327)),i=l(n(7418));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none"},void 0,s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M54.8694 2.85498C53.8065 2.4291 52.721 2.04752 51.6153 1.71253L51.3254 2.66957L51.0354 3.62661C51.9783 3.91227 52.9057 4.23362 53.8161 4.58911C54.1311 3.98753 54.4832 3.40847 54.8694 2.85498ZM75.4109 26.1839C76.0125 25.8689 76.5915 25.5168 77.145 25.1306C77.5709 26.1935 77.9525 27.279 78.2875 28.3847L77.3304 28.6746L76.3734 28.9646C76.0877 28.0217 75.7664 27.0943 75.4109 26.1839ZM78.8148 43.8253L79.8102 43.9222C79.9357 42.6318 80 41.3234 80 40C80 38.6766 79.9357 37.3682 79.8102 36.0778L78.8148 36.1747L77.8195 36.2715C77.9389 37.4977 78 38.7414 78 40C78 41.2586 77.9389 42.5023 77.8195 43.7285L78.8148 43.8253ZM43.8253 1.18515L43.9222 0.189853C42.6318 0.0642679 41.3234 0 40 0C38.6766 0 37.3682 0.064268 36.0778 0.189853L36.1747 1.18515L36.2715 2.18045C37.4977 2.06112 38.7414 2 40 2C41.2586 2 42.5023 2.06112 43.7285 2.18045L43.8253 1.18515ZM28.6746 2.66957L28.3847 1.71253C25.8549 2.47897 23.4312 3.48925 21.1408 4.71604L21.6129 5.59756L22.0851 6.47907C24.2606 5.3138 26.5624 4.35439 28.9646 3.62661L28.6746 2.66957ZM15.2587 9.85105L14.6239 9.0784C12.5996 10.7416 10.7416 12.5996 9.0784 14.6239L9.85105 15.2587L10.6237 15.8935C12.2042 13.9699 13.9699 12.2042 15.8935 10.6237L15.2587 9.85105ZM5.59756 21.6129L4.71604 21.1408C3.48925 23.4312 2.47897 25.8549 1.71253 28.3847L2.66957 28.6746L3.62661 28.9646C4.35439 26.5624 5.3138 24.2607 6.47907 22.0851L5.59756 21.6129ZM0 40C0 38.6766 0.0642679 37.3682 0.189853 36.0778L1.18515 36.1747L2.18045 36.2715C2.06112 37.4977 2 38.7414 2 40C2 41.2586 2.06112 42.5023 2.18045 43.7285L1.18515 43.8253L0.189853 43.9222C0.064268 42.6318 0 41.3234 0 40ZM2.66957 51.3254L1.71253 51.6153C2.47897 54.1451 3.48926 56.5688 4.71604 58.8592L5.59756 58.3871L6.47907 57.9149C5.3138 55.7394 4.35439 53.4376 3.62661 51.0354L2.66957 51.3254ZM9.85105 64.7413L9.0784 65.3761C10.7416 67.4004 12.5996 69.2584 14.6239 70.9216L15.2587 70.1489L15.8935 69.3763C13.9699 67.7958 12.2042 66.0301 10.6237 64.1065L9.85105 64.7413ZM21.6129 74.4024L21.1408 75.284C23.4312 76.5107 25.8549 77.521 28.3847 78.2875L28.6746 77.3304L28.9646 76.3734C26.5624 75.6456 24.2607 74.6862 22.0851 73.5209L21.6129 74.4024ZM36.1747 78.8148L36.0778 79.8102C37.3682 79.9357 38.6766 80 40 80C41.3234 80 42.6318 79.9357 43.9222 79.8102L43.8253 78.8148L43.7285 77.8195C42.5023 77.9389 41.2586 78 40 78C38.7414 78 37.4977 77.9389 36.2715 77.8195L36.1747 78.8148ZM51.3254 77.3304L51.6153 78.2875C54.1451 77.521 56.5688 76.5107 58.8592 75.284L58.3871 74.4024L57.9149 73.5209C55.7394 74.6862 53.4376 75.6456 51.0354 76.3734L51.3254 77.3304ZM64.7413 70.1489L65.3761 70.9216C67.4004 69.2584 69.2584 67.4004 70.9216 65.3761L70.1489 64.7413L69.3763 64.1065C67.7958 66.0301 66.0301 67.7958 64.1065 69.3763L64.7413 70.1489ZM74.4024 58.3871L75.284 58.8592C76.5107 56.5688 77.521 54.1451 78.2875 51.6153L77.3304 51.3254L76.3734 51.0354C75.6456 53.4375 74.6862 55.7393 73.5209 57.9149L74.4024 58.3871Z",fill:"currentColor"}),s("circle",{cx:"68",cy:"12",r:"12",fill:"#5865f2"}),s("path",{d:"M73.3332 11.4075H68.5924V6.66675H67.4072V11.4075H62.6665V12.5927H67.4072V17.3334H68.5924V12.5927H73.3332V11.4075Z",fill:"white"}),s("path",{d:"M40 29C37.794 29 36 30.794 36 33C36 35.207 37.794 37 40 37C42.206 37 44 35.207 44 33C44 30.795 42.206 29 40 29Z",fill:"currentColor"}),s("path",{d:"M48 26.001H46.07C45.402 26.001 44.777 25.667 44.406 25.111L43.594 23.891C43.223 23.335 42.598 23 41.93 23H38.07C37.402 23 36.777 23.335 36.406 23.89L35.594 25.11C35.223 25.667 34.598 26 33.93 26H32C30.895 26 30 26.896 30 28V39C30 40.104 30.895 41 32 41H48C49.104 41 50 40.104 50 39V28C50 26.897 49.104 26.001 48 26.001ZM40 39C36.691 39 34 36.309 34 33C34 29.692 36.691 27 40 27C43.309 27 46 29.692 46 33C46 36.31 43.309 39 40 39Z",fill:"currentColor"}),s("path",{d:"M24.6097 52.712V47.72H22.5457V52.736C22.5457 53.792 22.0777 54.404 21.1417 54.404C20.2177 54.404 19.7377 53.78 19.7377 52.712V47.72H17.6737V52.724C17.6737 55.04 19.0897 56.132 21.1177 56.132C23.1217 56.132 24.6097 55.016 24.6097 52.712ZM26.0314 56H28.0834V53.252H28.6114C30.6154 53.252 31.9474 52.292 31.9474 50.42C31.9474 48.62 30.7114 47.72 28.6954 47.72H26.0314V56ZM29.9554 50.456C29.9554 51.308 29.4514 51.704 28.5394 51.704H28.0594V49.268H28.5754C29.4874 49.268 29.9554 49.664 29.9554 50.456ZM37.8292 56L37.5532 54.224H35.0092V47.72H32.9572V56H37.8292ZM45.9558 51.848C45.9558 49.292 44.4078 47.564 42.0078 47.564C39.6078 47.564 38.0478 49.304 38.0478 51.872C38.0478 54.428 39.6078 56.156 41.9838 56.156C44.3958 56.156 45.9558 54.404 45.9558 51.848ZM43.8918 51.86C43.8918 53.504 43.1958 54.548 41.9958 54.548C40.8078 54.548 40.0998 53.504 40.0998 51.86C40.0998 50.216 40.8078 49.172 41.9958 49.172C43.1958 49.172 43.8918 50.216 43.8918 51.86ZM52.2916 56.084L54.3676 55.748L51.4876 47.684H49.2316L46.2556 56H48.2716L48.8236 54.284H51.6916L52.2916 56.084ZM50.2516 49.796L51.1756 52.676H49.3156L50.2516 49.796ZM62.5174 51.848C62.5174 49.388 61.0174 47.72 58.1374 47.72H55.2814V56H58.1854C60.9814 56 62.5174 54.308 62.5174 51.848ZM60.4534 51.86C60.4534 53.636 59.5414 54.404 58.0774 54.404H57.3334V49.316H58.0774C59.4814 49.316 60.4534 50.12 60.4534 51.86Z",fill:"currentColor"}));function f(e){var t=e.icon,n=e.onChange;return s(a.default,{within:!0},void 0,s("div",{className:i.default.iconContainer},void 0,null!=t?s("img",{alt:"Your icon",className:i.default.filledIcon,src:t}):d,s(o.default,{onChange:n,multiple:!1,tabIndex:0})))}f.displayName="TempUploadIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?64:t,r=e.height,a=void 0===r?64:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 64 64"}),s("path",{className:f,fill:d,d:"M56 50.6667V13.3333C56 10.4 53.6 8 50.6667 8H13.3333C10.4 8 8 10.4 8 13.3333V50.6667C8 53.6 10.4 56 13.3333 56H50.6667C53.6 56 56 53.6 56 50.6667ZM22.6667 36L29.3333 44.0267L38.6667 32L50.6667 48H13.3333L22.6667 36Z"}))}d.displayName="ImagePlaceholder"},,function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LAST_ACTIVITY_FEEDBACK_DATE_STORAGE_KEY=t.LAST_VOICE_FEEDBACK_DATE_STORAGE_KEY=t.END_ACTIVITY_FEEDBACK_COOLDOWN=t.END_VOICE_FEEDBACK_COOLDOWN=t.END_ACTIVITY_FEEDBACK_CHANCE=t.END_STREAM_FEEDBACK_CHANCE=t.END_VOICE_FEEDBACK_CHANCE=t.FEEDBACK_FREEFORM_LENGTH=t.FeedbackRating=void 0,t.FeedbackRating=r,function(e){e.BAD="bad",e.NEUTRAL="neutral",e.GOOD="good"}(r||(t.FeedbackRating=r={}));t.FEEDBACK_FREEFORM_LENGTH=1024;t.END_VOICE_FEEDBACK_CHANCE=.2;t.END_STREAM_FEEDBACK_CHANCE=.2;t.END_ACTIVITY_FEEDBACK_CHANCE=1;t.END_VOICE_FEEDBACK_COOLDOWN=864e5;t.END_ACTIVITY_FEEDBACK_COOLDOWN=0;t.LAST_VOICE_FEEDBACK_DATE_STORAGE_KEY="lastVoiceFeedback";t.LAST_ACTIVITY_FEEDBACK_DATE_STORAGE_KEY="lastActivityFeedback"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inIncentiviedInstallExperiment=function(){return i.ExperimentStore.getUserExperimentBucket(i.Experiments.INCENTIVIZED_INSTALL)!==i.ExperimentBuckets.NOT_ELIGIBLE},t.useAndTrackExposureToExperiment=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return!l.default.isEligible()})),t=u.useExperiment({},{disable:e})[0];e||u.trackExposure({});return t.show},t.default=void 0;var r,a=n(3),o=n(50),i=n(1148),l=(r=n(8797))&&r.__esModule?r:{default:r};var u=(0,o.createExperiment)({id:i.Experiments.INCENTIVIZED_INSTALL,kind:"user",label:"Incentivized Install",defaultConfig:{show:!1},treatments:[{id:1,label:"Show Upsell",config:{show:!0}}]}),s=u;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(12)),i=u(n(96)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=!1;var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(o.default)},a.isEligible=function(){return d},r}(r.default.Store))(a.default,{NOTICE_SHOW:function(e){if(e.notice.type!==l.NoticeTypes.INCENTIVIZED_INSTALL)return!1;d=!0},CONNECTION_CLOSED:function(e){d=!1},CURRENT_USER_UPDATE:function(e){return function(){var e=o.default.getNullableCurrentUser();if(null==e)return!1;d=d&&!i.default.isPremium(e)}()}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return j({},G,{link:(0,b.default)(e),emoji:(t=e,n=t.emojiTooltipPosition,r=void 0===n?g.default.Positions.TOP:n,{react:function(e,t,n){return e.src?k(s.MessageStandardEmoji,{node:e,tooltipPosition:r},n.key):k("span",{},n.key,e.surrogate)}}),customEmoji:U(e)});var t,n,r};var r=w(n(0)),a=L(n(9)),o=L(n(132)),i=L(n(1326)),l=n(180),u=n(277),s=n(9275),d=n(42),f=n(31),c=L(n(10)),p=L(n(249)),v=L(n(15)),y=L(n(40)),m=L(n(70)),_=L(n(12)),h=L(n(8426)),E=L(n(8467)),g=L(n(149)),S=L(n(1221)),O=L(n(8276)),I=n(292),T=w(n(701)),C=n(9289),b=L(n(1393)),M=n(1),N=L(n(6)),A=L(n(5701));n(7442);var P,R=L(n(7342));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function j(){return(j=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}).apply(this,arguments)}function k(e,t,n,r){P||(P="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var i=new Array(o),l=0;l<o;l++)i[l]=arguments[l+3];t.children=i}if(t&&a)for(var u in a)void 0===t[u]&&(t[u]=a[u]);else t||(t=a||{});return{$$typeof:P,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function U(e){var t=e.emojiTooltipPosition,n=void 0===t?g.default.Positions.TOP:t;return{react:function(e,t,r){var a=r.key,o=r.guildId,i=r.isInteracting,l=p.default.getDisambiguatedEmojiContext(o).getById(e.emojiId);null!=l&&(e=j({},e,{name:!l||l.require_colons?":"+l.name+":":l.name}));return k(s.MessageCustomEmoji,{isInteracting:i,node:e,tooltipPosition:n},a)}}}var G={blockQuote:{react:function(e,t,n){return k("div",{className:R.default.blockquoteContainer},n.key,k("div",{className:R.default.blockquoteDivider}),k("blockquote",{},void 0,t(e.content,n)))}},s:{react:function(e,t,n){return k("s",{},n.key,t(e.content,n))}},highlight:{react:function(e,t,n){return k("span",{className:"highlight"},n.key,e.content)}},paragraph:{react:function(e,t,n){return k("p",{},n.key,t(e.content,n))}},channel:{handleClick:function(e,t){if(null!=e&&null!=t){var n=v.default.getGuild(e);if(null!=n&&null!=n.joinedAt){var r=c.default.getChannel(t);null!=r&&(0,f.isGuildVocalChannelType)(r.type)?o.default.selectVoiceChannel(r.id):(0,d.transitionTo)(M.Routes.CHANNEL(e,t))}else T.startLurking(e,{},t)}},react:function(e,t,n){var r=this,a=c.default.getChannel(e.channelId),o=c.default.getChannel(null!=a?a.parent_id:null),i=(0,I.shouldDisplayChannelIconPrefix)(null==a?void 0:a.type),u=null;return i&&(u=y.default.can(M.Permissions.CONNECT,a)?k(O.default,{className:R.default.channelIcon,"aria-label":N.default.Messages.VOICE_CHANNEL}):k(S.default,{className:R.default.channelIcon,"aria-label":N.default.Messages.VOICE_CHANNEL_LOCKED})),k(g.default,{text:null!=o?(0,l.computeChannelName)(o,_.default,m.default):null,position:g.default.Positions.TOP},n.key,(function(a){var o=a.onMouseEnter,l=a.onMouseLeave;return k(h.default,{onClick:r.handleClick.bind(r,e.guildId,e.channelId),onMouseEnter:o,onMouseLeave:l,className:i?R.default.iconMention:void 0},n.key,u,t(e.content,n))}))}},inlineCode:{react:function(e,t,n){return k("code",{className:"inline"},n.key,(0,C.smartOutput)(e,t,n))}},codeBlock:{react:function(e,t,r){var o=function(){return k("pre",{},r.key,k("code",{className:(0,a.default)(A.default.scrollbarGhostHairline,"hljs")},void 0,(0,C.smartOutput)(e,t,r)))};return k(u.LazyLibrary,{createPromise:function(){return Promise.resolve().then(n.t.bind(null,1231,7))},webpackId:1231,renderFallback:o,render:function(t){if(e.lang&&t.hasLanguage(e.lang)){var n=t.highlight(e.lang,e.content,!0);return null==n?o():k("pre",{},r.key,k("code",{className:(0,a.default)(A.default.scrollbarGhostHairline,"hljs",n.language),dangerouslySetInnerHTML:{__html:n.value}}))}return o()}},r.key)}},text:{react:function(e,t,n){return"string"==typeof e.content?e.content:k("span",{},n.key,t(e.content,n))}},spoiler:{react:function(e,t,n){return k(E.default,{type:E.default.Types.TEXT,renderTextElement:function(e,t){return null==e||e.type!==i.default||t?e:r.cloneElement(e,{tabIndex:-1})}},n.key,(function(){return t(e.content,n)}))}},timestamp:{react:function(e,t,n){return k(g.default,{text:e.full,tooltipClassName:R.default.timestampTooltip},n.key,(function(t){return r.createElement("span",j({},t,{className:R.default.timestamp}),e.formatted)}))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Controls=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=C(n(8)),l=C(n(273)),u=n(8425),s=n(733),d=C(n(271)),f=C(n(61)),c=C(n(8800)),p=C(n(8592)),v=C(n(9102)),y=C(n(8376)),m=C(n(9103)),_=C(n(9104)),h=C(n(8723)),E=C(n(9285)),g=C(n(5945)),S=n(1),O=C(n(6)),I=C(n(7436)),T=C(n(1170));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(){return(N=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}).apply(this,arguments)}function A(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,P(e,t)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var L={friction:14,tension:200},D={VIDEO:"VIDEO",AUDIO:"AUDIO"},w={width:"100%",height:"100%",backgroundColor:"black"};function j(e){var t=0|e,n=t%60;return(t-n)/60+":"+String(n).padStart(2,"0")}var k=function(e){var t=e.current,n=e.duration,r=null!=t?j(t):"-:--",a=null!=n?j(n):"-:--";return r=r.padStart(a.length,"0"),R("div",{className:I.default.durationTimeWrapper},void 0,R("span",{className:I.default.durationTimeDisplay},void 0,r),R("span",{className:I.default.durationTimeSeparator},void 0,"/"),R("span",{className:I.default.durationTimeDisplay},void 0,a))};k.displayName="DurationTime";var U=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={translateY:new l.default.Value(0)},t._isUnmounted=!1,t.setDurationRef=function(e){t.durationBar=e},t.setVolumeButtonRef=function(e){t.volumeButton=e},t}A(t,e);var n=t.prototype;return n.componentDidMount=function(){this.state.translateY.setValue(this.props.autoPlay?1:0)},n.componentDidUpdate=function(e){var t,n=this.props,r=n.hide,a=n.playing;r&&!e.hide?(this.animateControls(1,a),null===(t=this.volumeButton)||void 0===t||t.blur()):!r&&e.hide&&this.animateControls(0,a)},n.componentWillUnmount=function(){this._isUnmounted=!1},n.setStateIfMounted=function(e){this._isUnmounted||this.setState(e)},n.updateProgress=function(e,t){void 0===t&&(t=!0);var n=this.durationBar;null!=n&&n.setGrabber(e,t)},n.animateControls=function(e,t){var n=this.state.translateY;t?l.default.spring(n,N({toValue:e},L)).start():n.setValue(e)},n.getAnimatedStyle=function(){return{transform:[{translateY:this.state.translateY.interpolate({inputRange:[0,1],outputRange:["0%","100%"]})}]}},n.renderPlayIcon=function(){var e=this.props,t=e.playing,n=e.currentTime,r=e.duration,a=e.onPause,o=e.onPlay,i=e.disabled;return t?R(f.default,{onClick:a,tabIndex:i?-1:0,"aria-label":O.default.Messages.PAUSE},void 0,R(_.default,{className:I.default.controlIcon},"pause")):null!=n&&n===r?R(f.default,{onClick:o,tabIndex:i?-1:0,"aria-label":O.default.Messages.PLAY_AGAIN},void 0,R(E.default,{className:I.default.controlIcon},"replay")):R(f.default,{onClick:o,tabIndex:i?-1:0,"aria-label":O.default.Messages.PLAY},void 0,R(h.default,{className:I.default.controlIcon},"play"))},n.render=function(){var e=this.props,t=e.buffers,n=e.children,r=e.currentTime,o=e.duration,i=e.muted,u=e.onDrag,s=e.onDragEnd,d=e.onDragStart,f=e.onToggleMuted,p=e.width,y=e.volume,m=e.type,_="string"==typeof p||p>250;return R(l.default.div,{className:m===D.VIDEO?I.default.videoControls:I.default.audioControls,onClick:function(e){return e.stopPropagation()},onDoubleClick:function(e){return e.stopPropagation()},style:this.getAnimatedStyle()},void 0,this.renderPlayIcon(),_?R(k,{current:r,duration:o}):null,a.createElement(c.default,{buffers:t,value:o||0,onDrag:u,onDragEnd:s,onDragStart:d,type:c.default.Types.DURATION,ref:this.setDurationRef}),R("div",{className:T.default.flex},void 0,a.createElement(v.default,{ref:this.setVolumeButtonRef,muted:i,value:y,minValue:0,maxValue:1,currentWindow:window,onValueChange:function(e){return u(e,c.default.Types.VOLUME)},onToggleMute:f,iconClassName:I.default.controlIcon,sliderWrapperClassName:I.default.volumeSliderWrapper})),n)},t}(a.Component);t.Controls=U,U.displayName="Controls",U.defaultProps={disabled:!1};var G=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={translateY:new l.default.Value(0)},t}A(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){var t=this.props.hide;t&&!e.hide?this.animateControls(1):!t&&e.hide&&this.animateControls(0)},n.animateControls=function(e){l.default.spring(this.state.translateY,N({toValue:e},L)).start()},n.getAnimatedStyle=function(){return{transform:[{translateY:this.state.translateY.interpolate({inputRange:[0,1],outputRange:["0%","-100%"]})}]}},n.renderVideoMetadata=function(){var e=this.props,t=e.fileName,n=e.fileSize,r=e.src,a=e.disabled;return R(l.default.div,{className:I.default.metadata,style:this.getAnimatedStyle()},void 0,R("div",{className:I.default.metadataContent},void 0,R("div",{className:I.default.metadataName},void 0,t),R("div",{className:I.default.metadataSize},void 0,n)),!a&&R(d.default,{href:r,target:"_blank",rel:"noreferrer noopener",className:I.default.metadataDownload,"aria-label":O.default.Messages.DOWNLOAD},void 0,R(y.default,{className:I.default.metadataIcon})))},n.renderAudioMetadata=function(){var e=this.props,t=e.fileName,n=e.fileSize,r=e.src,a=e.disabled;return R("div",{className:I.default.audioMetadata},void 0,R("div",{className:I.default.metadataContent},void 0,a?t:R(d.default,{className:I.default.metadataName,href:r},void 0,t),R("div",{className:I.default.metadataSize},void 0,n)),a?t:R(d.default,{href:r,className:I.default.metadataDownload,"aria-label":O.default.Messages.DOWNLOAD},void 0,R(y.default,{className:I.default.metadataIcon})))},n.render=function(){return this.props.type===D.AUDIO?this.renderAudioMetadata():this.renderVideoMetadata()},t}(a.Component);G.displayName="Metadata";var F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={play:!1,scale:new l.default.Value(0),opacity:new l.default.Value(0)},t.popAnimation=function(){var e=t.state,n=e.opacity,r=e.scale;r.setValue(0),n.setValue(0),l.default.parallel([l.default.sequence([l.default.timing(n,{toValue:1,duration:200}),l.default.timing(n,{toValue:0,duration:200})]),l.default.spring(r,N({toValue:1.5},L,{friction:80}))]).start()},t}A(t,e);var n=t.prototype;return n.pop=function(e){void 0===e&&(e=!1),this.setState({play:e},this.popAnimation)},n.getAnimatedStyle=function(){var e=this.state,t=e.opacity,n=e.scale;return l.default.accelerate({opacity:t.interpolate({inputRange:[0,1],outputRange:[0,.8]}),transform:[{scale:n.interpolate({inputRange:[0,1],outputRange:[1,2]})}]})},n.render=function(){var e=this.state.play?h.default:_.default;return R(l.default.div,{className:I.default.playPausePop,style:this.getAnimatedStyle()},void 0,R(e,{className:I.default.playPausePopIcon}))},t}(a.Component);F.displayName="PlayPausePop";var B=function(e){function t(n){var r;(r=e.call(this,n)||this)._unmounted=!1,r._lastMove=0,r.mediaRef=a.createRef(),r.controlsRef=a.createRef(),r.playPausePopRef=a.createRef(),r.handleFullScreenExit=function(){var e=r.mediaRef.current;if(null!=e){var t=(0,s.getFullScreenNode)(e.parentNode,e);null!=t&&(0,s.isFullScreen)(t)||r.setState({fullscreen:!1})}},r.toggleFullscreen=function(){var e=!r.state.fullscreen;r.setState({fullscreen:e})},r.setMuted=function(e){r.setState({muted:e})},r.toggleMuted=function(){r.setMuted(!r.state.muted)},r.setTime=function(e,t){void 0===t&&(t=!0);var n=r.mediaRef.current;null!=n&&isFinite(n.duration)&&isFinite(n.currentTime)&&(n.currentTime=e,r.updateValue(e/n.duration,t),r.updateTime(e,n.duration))},r.handleUIUpdate=function(){if(r.state.playing&&!r._unmounted){var e=r.mediaRef.current;null!=e&&(e.duration>0&&r.updateValue(e.currentTime/e.duration),r.updateTime(e.currentTime,e.duration),r.updateControlsVisibility(),requestAnimationFrame(r.handleUIUpdate))}},r.handleDrag=function(e,t){var n=r.mediaRef.current;if(t===c.default.Types.DURATION)null!=n&&isFinite(n.duration)&&r.setTime(n.duration*e,!1);else if(t===c.default.Types.VOLUME){var a=(0,u.perceptualToAmplitude)(e,1);0===a?r.setState({muted:!0,volume:a}):r.state.muted&&a>0?r.setState({muted:!1,volume:a}):r.setState({volume:a})}},r.handleLoaded=function(){var e=r.mediaRef.current;null!=e&&(r.updateTime(e.currentTime,e.duration),r.setState({hasLoadedMetadata:!0,currentTime:e.currentTime,duration:e.duration}))},r.handleDurationChange=function(){var e=r.mediaRef.current;null!=e&&(r.updateTime(e.currentTime,e.duration),r.setState({duration:e.duration}))},r.handleBuffer=i.default.debounce((function(){var e=r.mediaRef.current,t=[];if(e)for(var n=e.duration,a=0;a<e.buffered.length;a++){var o=e.buffered.start(a),i=e.buffered.end(a);if(!(i-o<1)){var l=(i-o)/n,u=o/n;t.push([u,l])}}r.setState({buffers:t})}),400),r.handleEnded=function(e){var t=r.props.onEnded;r.setState({playing:!1,hideControls:!1}),null!=t&&t(e)},r.handleMouseMove=function(){r._lastMove=Date.now()},r.handleMouseLeave=function(){r._lastMove=0},r.handlePreload=function(){r.setState({preload:"metadata"})},r.handleVideoClick=function(e){e.stopPropagation();var t=M(r),n=t.state,a=n.hasClickedPlay,o=n.playing,i=t.props,l=i.autoPlay,u=i.autoMute;l&&!a&&o&&u?r.setState({muted:!1,hasClickedPlay:!0}):r.setPlay(!r.state.playing)},r.setPlay=function(e){var t=M(r),n=t.props.autoMute,a=t.state,o=a.hasClickedPlay,i=a.muted;e!==r.state.playing&&(e?r.setState({playing:e,hasClickedPlay:!0,muted:!(!o&&n)&&i}):r.setState({playing:!1,hideControls:!1}))},r.handleDragStart=function(e){r.setState({dragging:e})},r.handleDragEnd=function(){r.setState({dragging:null}),r._lastMove=Date.now()},r.handleKeyDown=function(e){var t=r.mediaRef.current;if(e.which===S.KeyboardKeys.SPACE)e.preventDefault(),r.setPlay(!r.state.playing);else if(e.which>=S.KeyboardKeys.DIGIT_0&&e.which<=S.KeyboardKeys.DIGIT_9&&null!=t){e.preventDefault();var n=(e.which-S.KeyboardKeys.DIGIT_0)/10;t.currentTime=t.duration*n,r.setPlay(!0)}};var o=r.props,l=o.autoPlay,d=o.autoMute,f=o.volume,p=o.playable,v="function"==typeof f?f():f,y="function"==typeof d?d():d;return r.state={buffers:[],currentTime:null,dragging:null,duration:null,fullscreen:!1,hasClickedPlay:!1,hasLoadedMetadata:!1,hideControls:!p,muted:y,volume:v,playing:l,preload:"none",width:t.minWidth,height:t.minHeight},r}A(t,e),t.getDerivedStateFromProps=function(e,t){return!e.playable&&t.playing?{playing:!1,hideControls:!1}:null};var n=t.prototype;return n.componentDidMount=function(){var e=this.state,t=e.playing,n=e.muted,r=e.volume,a=this.mediaRef.current;null!=a&&(n&&(a.muted=n),t&&(this.play(!0),this.handleUIUpdate()),a.volume=r)},n.componentDidUpdate=function(e,t){var n=this.props,r=n.onPause,a=n.onVolumeChange,o=n.onMute,i=this.state,l=i.playing,u=i.fullscreen,d=i.muted,f=i.dragging,p=i.volume,v=this.mediaRef.current,y=this.playPausePopRef.current;if(null!=v){l&&!t.playing?(this.play(),this.handleMouseMove(),this.handleUIUpdate(),t.hasClickedPlay&&y&&y.pop(l)):!l&&t.playing&&(v.pause(),y&&y.pop(l),r&&r());var m=(0,s.getFullScreenNode)(v.parentNode,v);u&&!t.fullscreen&&null!=m?((0,s.requestFullScreen)(m),m.addEventListener(s.FULLSCREEN_CHANGE_EVENT,this.handleFullScreenExit)):!u&&t.fullscreen&&null!=m&&(m.removeEventListener(s.FULLSCREEN_CHANGE_EVENT,this.handleFullScreenExit),(0,s.exitFullScreen)(m)),f===c.default.Types.DURATION&&t.dragging!==c.default.Types.DURATION&&l?v.pause():f!==c.default.Types.DURATION&&t.dragging===c.default.Types.DURATION&&l&&v.play(),d!==t.muted&&(v.muted=d,o&&o(d)),p!==t.volume&&(v.volume=p,a&&a(p))}},n.componentWillUnmount=function(){this._unmounted=!0;var e=this.mediaRef.current;if(null!=e){var t=(0,s.getFullScreenNode)(e.parentNode,e);null!=t&&(t.removeEventListener(s.FULLSCREEN_CHANGE_EVENT,this.handleFullScreenExit),(0,s.exitFullScreen)(t))}},n.play=function(e){void 0===e&&(e=!1);var t=this.props,n=t.onPlay,r=t.volume,a=t.autoMute,o=this.mediaRef.current;if(null!=o){var i={};if("function"==typeof r){var l=r();l!==this.state.volume&&(o.volume=l,i.volume=l)}if("function"==typeof a){var u=a();u!==this.state.muted&&(o.muted=u,i.muted=u)}this.setState(i),o.play(),n&&n(e)}},n.getWidth=function(){var e=this.props.width;return"100%"===e?e:Math.max(e,t.minWidth)},n.getHeight=function(){var e=this.props.height;return"100%"===e?e:Math.max(e,t.minHeight)},n.updateValue=function(e,t){void 0===t&&(t=!0);var n=this.controlsRef.current;null!=n&&n.updateProgress(e,t)},n.updateTime=function(e,t){var n=0|e,r=0|t;this.state.currentTime===n&&this.state.duration===r||this.setState({currentTime:n,duration:r})},n.updateControlsVisibility=function(){var e=this.state,t=e.dragging,n=e.fullscreen?1e3:3e3,r=Math.max(0,Date.now()-this._lastMove)>n;r!==this.state.hideControls&&null==t&&this.setState({hideControls:r})},n.renderVideo=function(){var e=this.props,t=e.src,n=e.poster,r=e.forceExternal,o=e.onError,i=this.state.playing,l=this.getWidth(),u=this.getHeight();return r?R(g.default,{className:I.default.video,controls:!1,height:u,poster:n,width:l,playsInline:!0,autoPlay:i}):a.createElement(g.default,{className:I.default.video,controls:!1,playsInline:!0,autoPlay:i,height:u,onClick:this.handleVideoClick,onEnded:this.handleEnded,onError:o,onLoadedMetadata:this.handleLoaded,onProgress:this.handleBuffer,poster:n,preload:this.state.preload,ref:this.mediaRef,width:l,src:t})},n.renderAudio=function(){return a.createElement("audio",{className:I.default.audio,controls:!1,onClick:this.handleVideoClick,onEnded:this.handleEnded,onLoadedMetadata:this.handleLoaded,onProgress:this.handleBuffer,preload:this.state.preload,ref:this.mediaRef},R("source",{src:this.props.src}))},n.renderControls=function(){var e=this,t=this.props,n=t.type,r=t.autoPlay,o=t.playable,i=void 0===o||o,l=t.renderLinkComponent,s=this.state,d=s.buffers,c=s.currentTime,v=s.duration,y=s.hasClickedPlay,_=s.hideControls,h=s.muted,E=s.playing,g=s.fullscreen,S=s.volume,O=s.dragging,T=this.getWidth();return y||r||n===D.AUDIO?a.createElement(U,{buffers:d,currentTime:c,duration:v,volume:(0,u.amplitudeToPerceptual)(S,1),hide:n===D.VIDEO&&_,muted:h,autoPlay:r,onDrag:this.handleDrag,onDragEnd:this.handleDragEnd,onDragStart:this.handleDragStart,onPause:function(){return e.setPlay(!1)},onPlay:function(){return e.setPlay(!0)},onToggleMuted:this.toggleMuted,playing:E,dragging:O,type:n,ref:this.controlsRef,width:g?window.screen.width:T,disabled:!i},n===D.VIDEO?R(f.default,{onClick:this.toggleFullscreen},void 0,R(m.default,{className:I.default.controlIcon,style:{marginLeft:0}})):null):R("div",{className:I.default.playCenter},void 0,R(p.default,{className:I.default.playButton,onPlay:this.handleVideoClick,renderLinkComponent:l,inactive:!i}))},n.renderMetadata=function(){var e=this.props,t=e.fileName,n=e.fileSize,r=e.src,a=e.type,o=e.playable,i=this.state.hideControls;return null==t||null==n?null:R(G,{fileName:t,fileSize:n,src:r,hide:a===D.VIDEO&&i,type:a,disabled:!o})},n.renderPlayPausePop=function(){return a.createElement(F,{ref:this.playPausePopRef})},n.render=function(){var e=this.props,t=e.height,n=e.type,r=e.src,a=e.forceExternal,i=e.className,l=e.renderLinkComponent,u=this.getWidth(),s=this.state,d=s.fullscreen,f=s.hideControls,c=s.playing,v=s.preload,y=I.default.wrapperPaused;return n===D.AUDIO?y=I.default.wrapperAudio:f?y=I.default.wrapperControlsHidden:c&&(y=I.default.wrapperPlaying),a&&n===D.VIDEO?R("div",{className:y,style:{width:u,height:t}},void 0,this.renderMetadata(),this.renderVideo(),R("div",{className:I.default.playCenter},void 0,R(p.default,{className:I.default.playButton,externalURL:r,renderLinkComponent:l}))):R("div",{className:(0,o.default)(y,i),"data-fullscreen":d,onMouseEnter:"none"===v?this.handlePreload:void 0,onMouseLeave:c?this.handleMouseLeave:void 0,onMouseMove:c?this.handleMouseMove:void 0,onKeyDown:this.handleKeyDown,style:d?w:{width:u,height:n===D.AUDIO?"auto":t}},void 0,this.renderMetadata(),n===D.AUDIO?this.renderAudio():this.renderVideo(),this.renderControls(),n===D.VIDEO?this.renderPlayPausePop():null)},t}(a.PureComponent);B.displayName="MediaPlayer",B.Types=D,B.defaultProps={width:400,height:300,forceExternal:!1,playable:!0,autoPlay:!1,autoMute:!1,volume:1},B.minWidth=150,B.minHeight=110;var H=B;t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(273)),l=u(n(7433));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(){return(f=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}).apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v={friction:14,tension:200},y={DURATION:"DURATION",VOLUME:"VOLUME"};function m(e){var t=0|e,n=t%60;return(t-n)/60+":"+String(n).padStart(2,"0")}var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={animatedProgress:new i.default.Value(0),dragging:!1,offsetLeft:0,offsetWidth:0,previewWidth:new i.default.Value(0)},t.handlePreviewChange=function(){var e=c(t),n=e.bubble,r=e.state,a=r.dragging,o=r.previewWidth,i=e.props.value;a||null==n||(n.innerText=m(o._value*i))},t.handleAnimatedChange=function(){var e=c(t),n=e.bubble,r=e.state,a=r.dragging,o=r.animatedProgress,i=e.props.value;a&&null!=n&&(n.innerText=m(o._value*i))},t.handleMouseMove=function(e){var n=t.state,r=n.dragging,a=n.previewWidth;if(!r){var o=e.clientX,i=e.clientY;a.setValue(t.calculatePercentage(o,i))}},t.handleDragMove=function(e){var n=t.props,r=n.onDrag,a=n.type,o=e.clientX,i=e.clientY;r(t.calculatePercentage(o,i),a)},t.handleDragStart=function(e){var n=t.props,r=n.onDragStart,a=n.onDrag,o=n.type,i=n.currentWindow,l=e.clientX,u=e.clientY;if(e.preventDefault(),null!=t.wrapper){var s=t.wrapper.getBoundingClientRect(),d=s.left,f=s.width;t.setState({dragging:!0,offsetLeft:d,offsetWidth:f},(function(){r(o),a(t.calculatePercentage(l,u),o),i.removeEventListener("mouseup",t.handleDragEnd,!1),i.removeEventListener("mousemove",t.handleDragMove,!1),i.addEventListener("mouseup",t.handleDragEnd,!1),i.addEventListener("mousemove",t.handleDragMove,!1)}))}},t.handleDragEnd=function(){var e=t.props,n=e.onDragEnd,r=e.currentWindow;n(),r.removeEventListener("mouseup",t.handleDragEnd,!1),r.removeEventListener("mousemove",t.handleDragMove,!1),t.setState({dragging:!1})},t.setBubbleRef=function(e){null==e?t.bubble=null:null!=e.componentRef?t.bubble=e.componentRef:null!=e.refs&&(t.bubble=e.refs.node)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var u=r.prototype;return u.componentDidMount=function(){var e=this.state,t=e.previewWidth,n=e.animatedProgress;t.addListener(this.handlePreviewChange),n.addListener(this.handleAnimatedChange)},u.componentWillUnmount=function(){var e=this.state,t=e.previewWidth,n=e.animatedProgress;t.removeListener(this.handlePreviewChange),n.removeListener(this.handleAnimatedChange),window.removeEventListener("mouseup",this.handleDragEnd,!1),window.removeEventListener("mousemove",this.handleDragMove,!1)},u.componentDidUpdate=function(e,t){var n=this.state,r=n.dragging,a=n.previewWidth,o=n.animatedProgress;!r&&t.dragging&&a.setValue(o._value)},u.setGrabber=function(e,t){void 0===t&&(t=!0);var n=this.state.animatedProgress;t?i.default.spring(n,f({toValue:e},v)).start():n.setValue(e)},u.calculatePercentage=function(e,t){var n=this.wrapper,r=this.props.type;if(null==n)return 0;var a=n.getBoundingClientRect(),o=a.left,i=a.width,l=a.bottom,u=a.height,s=r===y.VOLUME?(l-t)/u:(e-o)/i;return Math.min(1,Math.max(0,s))},u.render=function(){var e=this,t=this.props,n=t.buffers,r=t.type,u=t.className,s=t.sliderClassName,f=this.state,c=f.dragging,p=f.previewWidth,v=f.animatedProgress,m=c?v:p;return d("div",{className:(0,o.default)(u,r===y.VOLUME?l.default.vertical:l.default.horizontal)},void 0,a.createElement("div",{className:(0,o.default)(s,c?l.default.mediaBarInteractionDragging:l.default.mediaBarInteraction,r===y.VOLUME?l.default.mediaBarInteractionVolume:null),onMouseDown:this.handleDragStart,onMouseMove:this.handleMouseMove,ref:function(t){return e.wrapper=t}},d("div",{className:(0,o.default)(l.default.mediaBarWrapper,r===y.VOLUME?l.default.mediaBarWrapperVolume:null)},void 0,null!=n?n.map((function(e,t){var n=e[0],r=e[1];return d("div",{className:l.default.buffer,style:{width:100*r+"%",left:100*n+"%"}},t)})):null,r===y.DURATION?d(i.default.div,{className:l.default.mediaBarPreview,style:{width:p.interpolate({inputRange:[0,1],outputRange:["0%","100%"]})}}):null,d(i.default.div,{className:l.default.mediaBarProgress,style:{width:v.interpolate({inputRange:[0,1],outputRange:["0%","100%"]})}},void 0,d("span",{className:l.default.mediaBarGrabber})),r===y.DURATION?a.createElement(i.default.div,{ref:this.setBubbleRef,className:l.default.bubble,style:{left:m.interpolate({inputRange:[0,1],outputRange:["0%","100%"]})}}):null)))},r}(a.Component);_.displayName="MediaBar",_.Types=y,_.defaultProps={currentWindow:window};var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8289),i=d(n(8337)),l=d(n(8799)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){var e=this.props,t=e.src,n=e.fileSize,r=e.className,d=e.mediaPlayerClassName,f=e.poster,v=e.fileName,y=e.naturalWidth,m=e.naturalHeight,_=e.playable,h=e.volume,E=e.autoPlay,g=e.autoMute,S=e.renderLinkComponent,O=e.onPlay,I=e.onEnded,T=e.onVolumeChange,C=e.onMute,b=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["src","fileSize","className","mediaPlayerClassName","poster","fileName","naturalWidth","naturalHeight","playable","volume","autoPlay","autoMute","renderLinkComponent","onPlay","onEnded","onVolumeChange","onMute"]);return a.createElement(i.default,c({alt:s.default.Messages.VIDEO,className:r,src:f},b,{minWidth:l.default.minWidth,minHeight:l.default.minHeight,shouldLink:!1,shouldAnimate:!1}),(function(e){var r=e.src,a=e.size,i=a.width,s=a.height,f=!(y<=u.MAX_VIDEO_WIDTH&&m<=u.MAX_VIDEO_HEIGHT||y<=u.MAX_VIDEO_HEIGHT&&m<=u.MAX_VIDEO_WIDTH);return p(l.default,{className:d,forceExternal:f,src:t,poster:r,width:i,height:s,volume:h,autoPlay:E||!1,autoMute:g||!1,type:l.default.Types.VIDEO,fileName:v,fileSize:null==n?void 0:(0,o.sizeString)(n),playable:_,renderLinkComponent:S,onPlay:O,onEnded:I,onVolumeChange:T,onMute:C})}))},r}(a.Component);t.default=y,y.displayName="LazyVideo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({viewBox:"0 0 20 20"},(0,i.default)(c),{width:n,height:a}),s("path",{fill:d,className:f,d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),s("path",{fill:d,className:f,d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}))}d.displayName="InlineCode"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z",fill:d,"aria-hidden":!0}))}d.displayName="Crown"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{className:f,fill:d,d:"M6,7 L2,7 L2,6 L6,6 L6,7 Z M8,5 L2,5 L2,4 L8,4 L8,5 Z M8,3 L2,3 L2,2 L8,2 L8,3 Z M8.88888889,0 L1.11111111,0 C0.494444444,0 0,0.494444444 0,1.11111111 L0,8.88888889 C0,9.50253861 0.497461389,10 1.11111111,10 L8.88888889,10 C9.50253861,10 10,9.50253861 10,8.88888889 L10,1.11111111 C10,0.494444444 9.5,0 8.88888889,0 Z",transform:"translate(3 3)"}))}d.displayName="RichActivity"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CheckboxItem",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"MenuCheckboxItemProps",{enumerable:!0,get:function(){return a.MenuCheckboxItemProps}}),Object.defineProperty(t,"ControlItem",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"MenuControlItemProps",{enumerable:!0,get:function(){return o.MenuControlItemProps}}),Object.defineProperty(t,"CustomItem",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"MenuCustomItemProps",{enumerable:!0,get:function(){return i.MenuCustomItemProps}}),Object.defineProperty(t,"MenuCustomItemRenderProps",{enumerable:!0,get:function(){return i.MenuCustomItemRenderProps}}),Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"MenuGroupProps",{enumerable:!0,get:function(){return l.MenuGroupProps}}),Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MenuItemProps",{enumerable:!0,get:function(){return u.MenuItemProps}}),Object.defineProperty(t,"RadioItem",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"MenuRadioItemProps",{enumerable:!0,get:function(){return s.MenuRadioItemProps}}),Object.defineProperty(t,"Separator",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"SubmenuItem",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"MenuSubmenuItemProps",{enumerable:!0,get:function(){return f.MenuSubmenuItemProps}}),Object.defineProperty(t,"SubmenuListItem",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"MenuSubmenuListItemProps",{enumerable:!0,get:function(){return c.MenuSubmenuListItemProps}});var r,a=v(n(8806)),o=v(n(8809)),i=v(n(8810)),l=v(n(8811)),u=v(n(8812)),s=v(n(8813)),d=(r=n(8814))&&r.__esModule?r:{default:r},f=v(n(8815)),c=v(n(8816));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(61)),l=c(n(8807)),u=c(n(8808)),s=c(n(8427)),d=n(8256),f=c(n(7340));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t,n=e.color,r=void 0===n?d.MenuItemColor.DEFAULT:n,c=e.label,p=e.checked,m=e.subtext,_=e.disabled,h=e.isFocused,E=e.menuItemProps,g=e.action;return a.createElement(i.default,v({className:(0,o.default)(f.default.item,f.default.labelContainer,f.default[r],(t={},t[f.default.disabled]=_,t[f.default.focused]=h,t)),onClick:_?void 0:g},E,{"aria-checked":p,"aria-disabled":_}),y("div",{className:f.default.label},void 0,(0,s.default)(c,e),null!=m&&y("div",{className:f.default.subtext},void 0,m)),y("div",{className:f.default.iconContainer},void 0,p?y(u.default,{className:f.default.icon,background:f.default.checkbox,foreground:f.default.check}):y(l.default,{className:f.default.icon,foreground:f.default.checkboxEmpty})))}m.displayName="MenuCheckboxItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.className,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{className:f,width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.625 3H5.375C4.06519 3 3 4.06519 3 5.375V18.625C3 19.936 4.06519 21 5.375 21H18.625C19.936 21 21 19.936 21 18.625V5.375C21.0057 4.08803 19.9197 3 18.625 3ZM19 19V5H4.99999V19H19Z",className:c,fill:d}))}d.displayName="Checkbox"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.className,c=e.background,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","background","foreground"]);return o.createElement("svg",u({},(0,i.default)(v),{className:f,width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.37499 3H18.625C19.9197 3 21.0056 4.08803 21 5.375V18.625C21 19.936 19.9359 21 18.625 21H5.37499C4.06518 21 3 19.936 3 18.625V5.375C3 4.06519 4.06518 3 5.37499 3Z",className:c,fill:d}),s("path",{d:"M9.58473 14.8636L6.04944 11.4051L4.50003 12.9978L9.58473 18L19.5 8.26174L17.9656 6.64795L9.58473 14.8636Z",className:p,fill:d}))}d.displayName="CheckboxChecked"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=n(8256),l=u(n(7340));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t,n=e.color,r=void 0===n?i.MenuItemColor.DEFAULT:n,u=e.label,s=e.control,c=e.disabled,p=e.isFocused,v=e.showDefaultFocus,y=void 0!==v&&v,m=e.menuItemProps,_=e.onClose,h=a.useRef(null);a.useLayoutEffect((function(){var e,t,n;p?null===(e=h.current)||void 0===e||e.focus():null===(t=h.current)||void 0===t||null===(n=t.blur)||void 0===n||n.call(t)}),[p]);var E=a.useCallback((function(){var e,t;(null===(e=h.current)||void 0===e||null===(t=e.activate)||void 0===t?void 0:t.call(e))&&_()}),[_]),g=s({onClose:_,disabled:c,isFocused:p},h);return a.createElement("div",d({onClick:E,className:(0,o.default)(l.default.item,l.default[r],(t={},t[l.default.disabled]=c,t[l.default.focused]=y&&p,t[l.default.hideInteraction]=!y,t)),"aria-disabled":c},m),null!=u?f("div",{className:l.default.labelContainer},void 0,f("div",{className:l.default.label},void 0,u)):null,g)}c.displayName="MenuControlItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9)),o=u(n(61)),i=n(8256),l=u(n(7340));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e){var t,n=e.children,u=e.color,s=void 0===u?i.MenuItemColor.DEFAULT:u,f=e.isFocused,c=void 0!==f&&f,p=e.disabled,v=void 0!==p&&p,y=e.keepItemStyles,m=void 0!==y&&y,_=e.menuItemProps,h=e.action,E=e.onClose,g=r.useCallback((function(e){if(null==h)return!1;E(),e.persist(),requestAnimationFrame((function(){return h(e)}))}),[h,E]),S=m?(0,a.default)(l.default.item,l.default[s],((t={})[l.default.focused]=c,t)):l.default.customItem;return r.createElement(o.default,d({className:S,onClick:v?void 0:g,"aria-disabled":v},_),n({color:s,disabled:v,isFocused:c}))}f.displayName="MenuCustomItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=n(8256),i=l(n(7340));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.contents,n=e.label,r=e.className,l=e.color,u=void 0===l?o.MenuItemColor.DEFAULT:l;return 0===t.length?null:s("div",{"aria-label":n,role:"group",className:r},void 0,null!=n?s("div",{className:(0,a.default)(i.default.groupLabel,i.default[u])},void 0,n):null,t)}d.displayName="MenuGroup"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(61)),l=c(n(8320)),u=c(n(8427)),s=n(8256),d=c(n(8554)),f=c(n(7340));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t,n=e.color,r=void 0===n?s.MenuItemColor.DEFAULT:n,c=e.label,p=e.icon,m=e.showIconFirst,_=void 0!==m&&m,h=e.imageUrl,E=e.hint,g=e.subtext,S=e.hasSubmenu,O=e.disabled,I=e.isFocused,T=e.menuItemProps,C=e.action,b=e.onClose,M=a.useContext(d.default),N=a.useCallback((function(e){if(null==C)return!1;b(),e.persist(),null==M||M(),requestAnimationFrame((function(){return C(e)}))}),[C,b,M]);return a.createElement(i.default,v({className:(0,o.default)(f.default.item,f.default.labelContainer,f.default[r],(t={},t[f.default.disabled]=O,t[f.default.focused]=I,t)),onClick:O?void 0:N,"aria-disabled":O},T),_&&null!=p&&y("div",{className:f.default.iconContainerLeft},void 0,y(p,{className:f.default.icon})),y("div",{className:f.default.label},void 0,(0,u.default)(c,e),null!=g&&y("div",{className:f.default.subtext},void 0,g)),null!=E&&y("div",{className:f.default.hintContainer},void 0,(0,u.default)(E,e)),!_&&null!=p&&y("div",{className:f.default.iconContainer},void 0,y(p,{className:f.default.icon})),null!=h&&y("div",{className:f.default.imageContainer},void 0,y("img",{className:f.default.image,src:(0,u.default)(h,e),alt:""})),S&&y("div",{className:f.default.iconContainer},void 0,y(l.default,{className:f.default.caret})))}m.displayName="MenuItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(61)),l=c(n(750)),u=c(n(751)),s=c(n(8427)),d=n(8256),f=c(n(7340));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t,n=e.color,r=void 0===n?d.MenuItemColor.DEFAULT:n,c=e.label,p=e.checked,m=e.subtext,_=e.disabled,h=e.isFocused,E=e.menuItemProps,g=e.action;return a.createElement(i.default,v({className:(0,o.default)(f.default.item,f.default.labelContainer,f.default[r],(t={},t[f.default.disabled]=_,t[f.default.focused]=h,t)),onClick:_?void 0:g},E,{"aria-checked":p,"aria-disabled":_}),y("div",{className:f.default.label},void 0,(0,s.default)(c,e),null!=m&&y("div",{className:f.default.subtext},void 0,m)),y("div",{className:f.default.iconContainer},void 0,p?y(u.default,{className:f.default.icon,background:f.default.radio,foreground:f.default.radioSelection}):y(l.default,{className:f.default.icon,foreground:f.default.radio})))}m.displayName="MenuRadioItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(7340))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(){return l("div",{role:"separator",className:o.default.separator})}u.displayName="MenuSeparator"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=d(n(0)),o=d(n(250)),i=u(n(272)),l=u(n(7340));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.parentItem,n=e.isFocused,r=e.menuSubmenuProps,u=e.renderSubmenu,s=a.useRef(null),d=a.useRef(null);return a.useLayoutEffect((function(){var e;n&&(null===(e=d.current)||void 0===e||e.focus())}),[n]),c("div",{className:l.default.submenuContainer},void 0,a.createElement("div",{ref:s}),t,n?c(o.default,{reference:s,autoInvert:!0,nudgeAlignIntoViewport:!0,fixed:!0,spacing:4,position:o.Positions.RIGHT,align:o.Align.TOP},void 0,(function(){return c("div",{className:l.default.submenuPaddingContainer},void 0,a.createElement("div",f({className:l.default.submenu},r,{ref:d}),c(i.default,{className:l.default.scroller},void 0,u())))})):null)}p.displayName="MenuSubmenuItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=d(n(0)),o=u(n(8362)),i=d(n(250)),l=u(n(7340));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e){var t=e.parentItem,n=e.isFocused,r=e.menuSubmenuProps,u=e.rows,s=e.rowHeight,d=e.onScroll,p=e.listClassName,v=a.useRef(null),y=a.useRef(null),m=a.useRef(null);a.useLayoutEffect((function(){var e;n&&(null===(e=y.current)||void 0===e||e.focus())}),[n]);var _=a.useCallback((function(e){return u[e]}),[u]);return f("div",{className:l.default.submenuContainer},void 0,a.createElement("div",{ref:v}),t,n?f(i.default,{reference:v,autoInvert:!0,nudgeAlignIntoViewport:!0,fixed:!0,spacing:4,position:i.Positions.RIGHT,align:i.Align.TOP},void 0,(function(){return u.length>0&&f("div",{className:l.default.submenuPaddingContainer},void 0,a.createElement("div",c({className:l.default.submenu},r,{ref:y}),a.createElement(o.default,{ref:m,className:p,listPadding:[6,0,6,8],onScroll:d,renderRow:_,rowCount:u.length,rowHeight:s})))})):null)}p.displayName="MenuSubmenuListItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(t){case a.SpotifyActionTypes.USER_ACTIVITY_PLAY:return e.hasSpotifyAccount?o.default.Messages.USER_ACTIVITY_PLAY_ON_PLATFORM.format({platform:a.SPOTIFY_PLATFORM_NAME}):o.default.Messages.USER_ACTIVITY_CONNECT_PLATFORM.format({platform:a.SPOTIFY_PLATFORM_NAME});case a.SpotifyActionTypes.EMBED_SYNC:return e.hasSpotifyAccount?e.syncingWithUser||e.syncingWithParty?o.default.Messages.INVITE_EMBED_JOINED:o.default.Messages.JOIN:o.default.Messages.USER_ACTIVITY_CONNECT_PLATFORM.format({platform:a.SPOTIFY_PLATFORM_NAME});case a.SpotifyActionTypes.USER_ACTIVITY_SYNC:default:return}};var r,a=n(293),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){a.default.track(l.AnalyticEvents.SPOTIFY_BUTTON_CLICKED,{type:e,source:r,is_premium:(0,i.isSpotifyPremium)(),party_id:u.includes(e)&&null!=(null==n?void 0:n.party)?n.party.id:null,other_user_id:t.id})};var r,a=(r=n(13))&&r.__esModule?r:{default:r},o=n(293),i=n(8498),l=n(1);var u=[o.SpotifyActionTypes.USER_ACTIVITY_SYNC,o.SpotifyActionTypes.EMBED_SYNC]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e||((0,a.default)(o.PlatformTypes.SPOTIFY,"Spotify Button"),!1)};var r,a=(r=n(8377))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=j(n(9)),i=n(3),l=j(n(14)),u=j(n(8338)),s=n(5943),d=n(8277),f=n(280),c=j(n(11)),p=j(n(56)),v=j(n(15)),y=j(n(40)),m=j(n(12)),_=j(n(29)),h=j(n(467)),E=j(n(61)),g=j(n(8496)),S=n(1149),O=j(n(153)),I=j(n(149)),T=j(n(159)),C=j(n(5686)),b=n(35),M=n(8263),N=j(n(47)),A=j(n(24)),P=j(n(13)),R=j(n(150)),L=n(1),D=j(n(6)),w=j(n(7450));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function G(){return(G=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}).apply(this,arguments)}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(e,t,n){var r,a;return null!=e?e:null===e?null!==(a=n.avatar)&&void 0!==a?a:null:null!=t&&null!=t.guildMemberAvatar?t.guildMemberAvatar:null!==(r=n.avatar)&&void 0!==r?r:null}var H={page:L.AnalyticsPages.GUILD_CHANNEL,section:L.AnalyticsSections.CHANGE_GUILD_MEMBER_AVATAR};function x(e){var t=e.onClose;a.useEffect((function(){P.default.track(L.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:f.PremiumUpsellTypes.GUILD_MEMBER_AVATAR_INLINE,source:H})}),[]);return F(E.default,{className:w.default.upsellCard,onClick:function(){(0,s.showModalUpsell)({onCloseChangeIdentity:t,analyticsSource:L.AnalyticsLocations.CHANGE_IDENTITY_MODAL,analyticsLocation:H})}},void 0,F(C.default,{width:22,height:22,className:w.default.upsellIcon,color:S.GradientCssUrls.PREMIUM_TIER_2}),F(A.default,{tag:"span",className:w.default.upsellText,size:A.default.Sizes.SIZE_12},void 0,D.default.Messages.CHANGE_IDENTITY_MODAL_UPSELL.format()))}function V(e){var t,n=e.disabled,r=void 0!==n&&n,i=e.user,l=e.setNickname,u=e.nickname,s=e.error,d=e.hasNick,f=a.useRef(null),p=a.useCallback((function(){var e;l(""),null===(e=f.current)||void 0===e||e.focus()}),[l]);return a.createElement(a.Fragment,null,r||null==i||i.id===c.default.getId()?null:F(h.default,{type:h.default.Types.WARNING,className:w.default.card},void 0,F(A.default,{className:w.default.warning,size:A.default.Sizes.SIZE_16},void 0,D.default.Messages.CHANGE_NICKNAME_WARNING)),F(T.default,{className:(0,o.default)(w.default.itemGroup,(t={},t[w.default.disabled]=r,t))},void 0,r?D.default.Messages.CHANGE_IDENTITY_MODAL_CHANGE_NICKNAME_DISABLED:D.default.Messages.NICKNAME),F(O.default,{disabled:r,inputRef:f,value:u,placeholder:i.toString(),onChange:l,autoFocus:!0}),null!=s?F(A.default,{size:A.default.Sizes.SIZE_12,color:A.default.Colors.STATUS_RED,className:w.default.nickError},void 0,s):null,d&&!r?F(_.default,{look:_.default.Looks.LINK,color:_.default.Colors.LINK,size:_.default.Sizes.NONE,onClick:p,className:w.default.reset},void 0,D.default.Messages.RESET_NICKNAME):null)}function W(e){var t,n=e.pendingGuildMemberAvatar,r=e.setPendingGuildMemberAvatar,i=e.user,l=e.guildMember,s=e.error,d=e.hasPremium,f=e.onClose,c=a.useCallback((function(e){if(null===n||null==(null==l?void 0:l.guildMemberAvatar)){var t=i.merge({avatar:e});return R.default.getUserAvatarURL(t||i,!0)}if(null==l)return"";var r=G({},l,{guildMemberAvatar:e});return R.default.getGuildMemberAvatarURL(r,!0)}),[i,l,n]),p=F(u.default,{hint:D.default.Messages.CHANGE_IDENTITY_MODAL_UPLOADER_CTA,showIcon:!0,showRemoveButton:!1,avatar:B(n,l,i),onChange:r,makeURL:c,className:w.default.avatarUploader,avatarClassName:w.default.avatarUploaderInner});return d||(p=F(g.default,{},void 0,p)),a.createElement(a.Fragment,null,F(T.default,{className:w.default.perServerAvatarTitle},void 0,F(C.default,{width:16,height:16,className:w.default.serverAvatarPremiumIcon}),D.default.Messages.CHANGE_IDENTITY_MODAL_PER_SERVER_SECTION.format({betaBadgeHook:function(e,t){return F(I.default,{text:D.default.Messages.CHANGE_IDENTITY_BETA_TOOLTIP},void 0,(function(n){return a.createElement(M.TextBadge,G({},n,{text:e,className:w.default.betaBadge,key:t,color:L.Colors.BRAND_NEW}))}))}})),d?null:F(x,{onClose:f}),F("div",{className:(0,o.default)((t={},t[w.default.disabled]=!d,t))},void 0,p,null!=s?F(A.default,{size:A.default.Sizes.SIZE_12,color:A.default.Colors.STATUS_RED,className:w.default.avatarError},void 0,s):null,null!=(null==l?void 0:l.guildMemberAvatar)?F(_.default,{look:_.default.Looks.LINK,color:_.default.Colors.LINK,size:_.default.Sizes.NONE,onClick:function(){return r(null)},className:w.default.reset},void 0,D.default.Messages.CHANGE_IDENTITY_MODAL_RESET_PRIMARY_AVATAR):null))}function Y(e){var t,n=e.transitionState,r=e.user,o=e.guildId,u=e.onClose,f=e.analyticsSource,c=(0,i.useStateFromStores)([p.default],(function(){return null!=o?p.default.getMember(o,r.id):null})),h=(0,i.useStateFromStores)([y.default,m.default,v.default],(function(){var e,t=v.default.getGuild(o);return null!=t&&((null===(e=m.default.getNullableCurrentUser())||void 0===e?void 0:e.id)===r.id?y.default.can(L.Permissions.CHANGE_NICKNAME,t)||y.default.can(L.Permissions.MANAGE_NICKNAMES,t):y.default.canManageUser(L.Permissions.MANAGE_NICKNAMES,r.id,t))})),E=(0,i.useStateFromStores)([m.default],(function(){var e;return(null===(e=m.default.getNullableCurrentUser())||void 0===e?void 0:e.premiumType)===L.PremiumTypes.TIER_2})),g=(0,s.useAndTriggerGuildMemberAvatarExperiment)(),S=(null===(t=m.default.getNullableCurrentUser())||void 0===t?void 0:t.id)===r.id,O=a.useState(!1),I=O[0],T=O[1],C=a.useState((null==c?void 0:c.nick)||""),M=C[0],R=C[1],j=a.useState({}),k=j[0],G=j[1],B=a.useState(void 0),H=B[0],x=B[1];a.useEffect((function(){return P.default.track(L.AnalyticEvents.OPEN_MODAL,{type:"Change Server Identity",location:L.AnalyticsPages.GUILD_CHANNEL,source:f}),function(){S&&g&&(0,d.hideHotspot)(d.HotspotLocations.GUILD_PER_SERVER_AVATAR_BADGE)}}),[]);var Y=a.useCallback(function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,a,i,s,d,f,p,v,y,m,_,h,E;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),a=null,M!==(null!==(n=null==c?void 0:c.nick)&&void 0!==n?n:"")&&((a=a||{}).nick=M),S&&void 0!==H&&((a=a||{}).avatar=H),null!=a){e.next=7;break}return u(),e.abrupt("return");case 7:return e.prev=7,T(!0),e.next=11,l.default.patch({url:S?L.Endpoints.SET_GUILD_MEMBER(o):L.Endpoints.GUILD_MEMBER(o,r.id),body:a});case 11:u(),e.next=21;break;case 14:e.prev=14,e.t0=e.catch(7),T(!1),null!=(null==(p=null!==(i=null===(s=e.t0.body)||void 0===s?void 0:s.errors)&&void 0!==i?i:null)?void 0:p.nick)&&(f=(null===(v=p.nick)||void 0===v||null===(y=v._errors)||void 0===y||null===(m=y[0])||void 0===m?void 0:m.message)||D.default.Messages.CHANGE_IDENTITY_MODAL_UNKNOWN_ERROR),null!=(null==p?void 0:p.avatar)&&(d=(null===(_=p.avatar)||void 0===_||null===(h=_._errors)||void 0===h||null===(E=h[0])||void 0===E?void 0:E.message)||D.default.Messages.CHANGE_IDENTITY_MODAL_UNKNOWN_ERROR),G({avatar:d,nick:f});case 21:case"end":return e.stop()}}),e,null,[[7,14]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){U(o,r,a,i,l,"next",e)}function l(e){U(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),[o,S,M,u,r,c,H]);return F(b.ModalRoot,{"aria-label":D.default.Messages.CHANGE_IDENTITY_MODAL_TITLE,transitionState:n},void 0,F("form",{onSubmit:Y},void 0,F(b.ModalHeader,{separator:!1},void 0,F(N.default,{tag:N.default.Tags.H2,size:N.default.Sizes.SIZE_20},void 0,S&&g?D.default.Messages.CHANGE_IDENTITY:D.default.Messages.CHANGE_NICKNAME)),F(b.ModalContent,{className:w.default.modalContent},void 0,g&&S?F(A.default,{size:A.default.Sizes.SIZE_14,className:w.default.identityDescription},void 0,D.default.Messages.CHANGE_IDENTITY_MODAL_DESCRIPTION):null,F(V,{disabled:!h,user:r,error:k.nick,nickname:M,setNickname:R,hasNick:null!=(null==c?void 0:c.nick)}),g&&S?F(W,{hasPremium:E,error:k.avatar,user:r,pendingGuildMemberAvatar:H,setPendingGuildMemberAvatar:x,guildMember:c,onClose:u}):null),F(b.ModalFooter,{},void 0,F(_.default,{type:"submit",disabled:I},void 0,D.default.Messages.SAVE),F(_.default,{onClick:u,look:_.default.Looks.LINK,color:_.default.Colors.PRIMARY},void 0,D.default.Messages.CANCEL))))}x.displayName="UpsellCard",Y.displayName="ChangeIdentity";var z=Y;t.default=z},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getNote(e)}));return r.useEffect((function(){null==t&&function(e){p.apply(this,arguments)}(e)}),[t,e]),t||{loading:!0,note:null}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=s(n(14)),i=s(n(2)),l=s(n(9301)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){f(o,r,a,i,l,"next",e)}function l(e){f(o,r,a,i,l,"throw",e)}i(void 0)}))}}function p(){return(p=c(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.default.dirtyDispatch({type:u.ActionTypes.USER_NOTE_LOAD_START,userId:t}),e.prev=1,e.next=4,o.default.get({url:u.Endpoints.NOTE(t),oldFormErrors:!0});case 4:n=e.sent,r=n.body,i.default.dispatch({type:u.ActionTypes.USER_NOTE_LOADED,userId:t,note:r}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),i.default.dispatch({type:u.ActionTypes.USER_NOTE_LOADED,userId:t});case 12:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=F,t.UserBannerTypes=void 0;var r,a,o,i,l,u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),s=L(n(9)),d=n(3),f=L(n(473)),c=n(123),p=L(n(8555)),v=n(280),y=L(n(9107)),m=L(n(11)),_=L(n(12)),h=L(n(161)),E=L(n(61)),g=L(n(8722)),S=L(n(149)),O=L(n(5686)),I=L(n(1215)),T=n(41),C=n(8263),b=L(n(13)),M=L(n(150)),N=L(n(96)),A=n(1),P=L(n(6)),R=L(n(7453));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(){return(j=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}).apply(this,arguments)}t.UserBannerTypes=i,function(e){e[e.POPOUT=0]="POPOUT",e[e.PROFILE=1]="PROFILE",e[e.SETTINGS=2]="SETTINGS"}(i||(t.UserBannerTypes=i={})),function(e){e[e.SHOULD_LOAD=0]="SHOULD_LOAD",e[e.LOADING=1]="LOADING",e[e.COMPLETE=2]="COMPLETE"}(l||(l={}));var k=((r={})[i.POPOUT]=18,r[i.PROFILE]=24,r[i.SETTINGS]=0,r),U=((a={})[i.POPOUT]=R.default.bannerOverlayPopout,a[i.PROFILE]=R.default.bannerOverlayProfile,a[i.SETTINGS]=R.default.bannerOverlayHidden,a);function G(e){var t=e.type,n=e.shown,r=e.onClick,a=(0,d.useStateFromStores)([_.default],(function(){var e=_.default.getNullableCurrentUser();return N.default.canUsePremiumProfileCustomization(e)})),o=u.useRef(!1);return u.useEffect((function(){n&&!o.current&&(o.current=!0,b.default.track(A.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:v.PremiumUpsellTypes.CUSTOM_PROFILES_PROFILE_BANNER_SOCIAL_UPSELL,location:{page:t===i.PROFILE?A.AnalyticsPages.USER_PROFILE:A.AnalyticsPages.USER_POPOUT,section:A.AnalyticsSections.NITRO_BANNER,object:A.AnalyticsObjects.NITRO_BADGE}}))}),[n,t]),w(S.default,{text:a?P.default.Messages.PROFILE_CUSTOMIZATION_NITRO_ICON_TOOLTIP:P.default.Messages.PROFILE_BANNER_ICON_TOOLTIP_UPSELL},void 0,(function(e){var n;return u.createElement(E.default,j({},e,{onClick:a?void 0:function(){!function(e){(0,T.openModal)((function(t){return u.createElement(y.default,j({},t,{source:{page:e===i.PROFILE?A.AnalyticsPages.USER_PROFILE:A.AnalyticsPages.USER_POPOUT,section:A.AnalyticsSections.NITRO_BANNER,object:A.AnalyticsObjects.NITRO_BADGE}}))}))}(t),null==r||r()},className:(0,s.default)(R.default.premiumIconWrapper,(n={},n[R.default.clickable]=!a,n))}),w(C.TextBadge,{color:"rgba(32, 34, 37, 0.8)",text:w(O.default,{width:16,height:16,className:R.default.premiumIcon})}))}))}function F(e){var t,n,r=e.user,a=e.onClose,o=e.guildId,v=e.bannerType,y=void 0===v?i.POPOUT:v,_=e.allowEdit,S=void 0===_||_,O=u.useState(null==r.banner?l.COMPLETE:l.SHOULD_LOAD),T=O[0],C=O[1],b=u.useState(!1),N=b[0],P=b[1],L=(0,d.useStateFromStores)([m.default],(function(){return m.default.getId()})),D=(0,d.useStateFromStores)([h.default],(function(){return h.default.isFocused()})),F=u.useContext(c.AccessibilityPreferencesContext).reducedMotion,B=(0,p.default)(r.getAvatarURL(o),A.Colors.PRIMARY_DARK_800),H={},x=L===r.id&&S,V=k[y],W=M.default.hasAnimatedUserBanner(r);if(null!=r.banner){var Y,z=null!==(Y=M.default.getUserBannerURL(r,F.enabled?N:D))&&void 0!==Y?Y:"";if(T===l.SHOULD_LOAD){C(l.LOADING);var K=new Image;K.src=z,K.onload=function(){C(l.COMPLETE)}}H.backgroundImage="url("+z+")"}var $=null!==(t=r.bannerColor)&&void 0!==t?t:B;return u.useEffect((function(){var e;W&&F.enabled&&((new Image).src=null!==(e=M.default.getUserBannerURL({id:r.id,banner:r.banner},!0))&&void 0!==e?e:"")}),[r.id,r.banner,F.enabled,W]),w("div",{className:(0,s.default)(R.default.banner,function(){switch(y){case i.POPOUT:return null==r.banner?R.default.popoutBanner:R.default.popoutBannerPremium;case i.PROFILE:return null==r.banner?R.default.profileBanner:R.default.profileBannerPremium;case i.SETTINGS:return R.default.settingsBanner}}(),(n={},n[R.default.reducedMotion]=F.enabled,n)),onMouseMove:function(){return P(!0)},onMouseLeave:function(){return P(!1)},style:j({},H,{backgroundColor:T!==l.COMPLETE?A.Colors.PRIMARY_DARK_800:$})},void 0,x?w(E.default,{onClick:function(){null==a||a(),f.default.open(A.UserSettingsSections.PROFILE_CUSTOMIZATION)},className:U[y]},void 0,w(I.default,{width:V,height:V,className:R.default.pencilIcon})):null!=r.banner&&y!==i.SETTINGS?w(G,{type:y,shown:N,onClick:a}):null,F.enabled&&W?w(g.default,{className:R.default.gifTag}):void 0)}G.displayName="PremiumBadge",F.displayName="UserBanner"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Types=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=j(n(9)),u=j(n(23)),s=j(n(9109)),d=j(n(183)),f=n(156),c=j(n(1364)),p=j(n(732)),v=j(n(1333)),y=j(n(1277)),m=j(n(753)),_=j(n(707)),h=n(1278),E=j(n(150)),g=n(99),S=n(252),O=j(n(9306)),I=j(n(271)),T=j(n(55)),C=j(n(477)),b=j(n(8432)),M=j(n(8824)),N=j(n(149)),A=j(n(9307)),P=j(n(47)),R=j(n(248)),L=n(1),D=j(n(6)),w=j(n(7458));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(){return(U=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}).apply(this,arguments)}function G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,H(e,t)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.Types=o,function(e){e.USER_POPOUT="UserPopout",e.ACTIVITY_FEED="ActivityFeed",e.PROFILE="Profile",e.STREAM_PREVIEW="StreamPreview",e.VOICE_CHANNEL="VoiceChannel"}(o||(t.Types=o={}));var x=64,V=160,W=((r={})[o.STREAM_PREVIEW]=[108,60],r[o.USER_POPOUT]=[108,60],r[o.VOICE_CHANNEL]=[108,60],r[o.PROFILE]=[162,90],r[o.ACTIVITY_FEED]=[900,500],r),Y=n(409).getAssetImage;var z=(0,s.default)(function(e){function t(){return e.apply(this,arguments)||this}return B(t,e),t.prototype.render=function(){return F("div",{className:w.default.timestamp},void 0,this.props.message)},t}(i.PureComponent)),K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleOpenSpotifyTrack=function(){var e=t.props,n=e.activity,r=e.onOpenSpotifyTrack;(0,u.default)(null!=n,"Spotify activity was null"),null==r||r(n)},t.handleOpenSpotifyArtist=function(e){var n=t.props,r=n.activity,a=n.onOpenSpotifyArtist,o=n.user;(0,u.default)(null!=r,"Spotify activity was null"),null==a||a(r,o.id,e)},t.handleOpenSpotifyAlbum=function(){var e=t.props,n=e.activity,r=e.onOpenSpotifyAlbum,a=e.user;(0,u.default)(null!=n,"Spotify activity was null"),null==r||r(n,a.id)},t}B(t,e);var n,r,a,s=t.prototype;return s.getTypeClass=function(e,t){return(0,S.getClass)(w.default,e,this.props.type,t)},s.isStreamerOnTypeProfile=function(){return(0,_.default)(this.activity)&&this.props.type===o.PROFILE},s.isStreamerOnTypeActivityFeed=function(){return(0,_.default)(this.activity)&&this.props.type===o.ACTIVITY_FEED},s.renderHeader=function(e){var t=this.props,n=t.hideHeader,r=t.activityGuild,a=t.renderHeaderAccessory,o=this.activity;if(n||null==o)return null;var i,l,u=o.name;switch(o.type){case L.ActivityTypes.STREAMING:i=D.default.Messages.USER_ACTIVITY_HEADER_LIVE_ON_PLATFORM.format({platform:[L.PlatformTypes.TWITCH,L.PlatformTypes.YOUTUBE].includes(u.toLowerCase())?u:d.default.get(L.PlatformTypes.TWITCH).name});break;case L.ActivityTypes.LISTENING:i=D.default.Messages.USER_ACTIVITY_HEADER_LISTENING.format({name:u});break;case L.ActivityTypes.WATCHING:i=D.default.Messages.USER_ACTIVITY_HEADER_WATCHING.format({name:u});break;case L.ActivityTypes.PLAYING:i=(0,c.default)(o);break;case L.ActivityTypes.COMPETING:i=D.default.Messages.USER_ACTIVITY_HEADER_COMPETING.format({name:u})}null!=r&&(i=(0,g.hasFlag)(null!==(l=null==o?void 0:o.flags)&&void 0!==l?l:0,L.ActivityFlags.EMBEDDED)?o.type===L.ActivityTypes.WATCHING?D.default.Messages.EMBEDDED_ACTIVITIES_WATCHING_IN_GUILD.format({guildName:r.name}):D.default.Messages.EMBEDDED_ACTIVITIES_PLAYING_IN_GUILD.format({guildName:r.name}):D.default.Messages.USER_ACTIVITY_HEADER_STREAMING_TO_GUILD.format({server:r.name}));return F(P.default,{className:(0,S.getClass)(w.default,"headerText",e?"EmptyBody":"Normal"),size:P.default.Sizes.SIZE_12},void 0,i,null==a?void 0:a())},s.renderXboxImage=function(){return F("div",{className:w.default.xboxAssets},void 0,F("img",{alt:"",src:d.default.get(L.PlatformTypes.XBOX).icon.color3d,className:(0,l.default)(this.getTypeClass("assetsLargeImage","Xbox"))}))},s.renderImage=function(e){var t,n,r=this,a=this.props.type,o=e.assets,u=e.application_id;if(null==o||null==o.large_image&&null==o.small_image)return null;(0,_.default)(e)&&(n=W[a]);var s,d=F("img",{alt:o.large_text||"",src:Y(u,o.large_image,n||[V,V]),className:(0,l.default)(this.getTypeClass("assetsLargeImage",this.isStreamerOnTypeProfile()||this.isStreamerOnTypeActivityFeed()?L.PlatformTypes.TWITCH:""),(t={},t[this.getTypeClass("assetsLargeMask")]=null!=o.small_image,t))});if((0,y.default)(e))d=F(I.default,{onClick:this.handleOpenSpotifyAlbum},void 0,d);else if((0,h.isStageActivity)(e)){var f,c=(0,h.unpackStageChannelParty)(e);if(null==c)return null;d=F(R.default,{mask:R.default.Masks.SQUIRCLE,width:x,height:x},void 0,F("img",{src:null!==(f=E.default.getGuildIconURL({id:c.guildId,icon:o.small_image,size:x}))&&void 0!==f?f:void 0,className:w.default.assetsLargeImageVoiceChannel,alt:""}))}return this.isStreamerOnTypeActivityFeed()&&e.url&&(d=F("div",{className:w.default.twitchImageContainer},void 0,F("div",{className:w.default.twitchImageOverlay},void 0,F("h3",{className:w.default.streamName},void 0,e.name),F("div",{className:w.default.streamGame},void 0,D.default.Messages.STREAMER_PLAYING.format({game:e.details}))),F(I.default,{className:w.default.twitchBackgroundImage,href:e.url},void 0,d))),(0,h.isStageActivity)(e)||null==o.small_image||(s=F(N.default,{text:o.small_text?o.small_text:null,position:N.default.Positions.TOP},void 0,(function(e){return i.createElement("img",U({alt:o.small_text||"",src:Y(u,o.small_image,[x,x]),className:r.getTypeClass("assetsSmallImage")},e))}))),F("div",{className:w.default.assets},void 0,F(N.default,{text:null!=o.large_text?o.large_text:null,position:N.default.Positions.TOP},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return i.cloneElement(d,{onMouseEnter:t,onMouseLeave:n})})),s)},s.renderGameImage=function(e){var t=this.props,n=t.user,r=t.type,a=t.application,i=t.activityGuild;return(0,p.default)(e)||e.type!==L.ActivityTypes.PLAYING||r===o.ACTIVITY_FEED||n.bot?null:null==a&&null!=i?F("div",{className:(0,l.default)(w.default.gameIcon,w.default.screenshareIcon)}):F(C.default,{className:w.default.gameIcon,game:a})},s.renderName=function(e){var t=this.props,n=t.user,r=t.application;if(t.hideName)return null;var a=e.details;if(e.type===L.ActivityTypes.CUSTOM_STATUS)return null;var o=(0,v.default)(e),i=e.name,l=i;return o&&null!=r?i=F("span",{className:w.default.activityName},void 0,i):o||(l=a,i=a,(0,y.default)(e)&&null!=e.sync_id&&null!=a?i=F(I.default,{className:w.default.bodyLink,onClick:this.handleOpenSpotifyTrack},void 0,a):(0,h.isStageActivity)(e)&&(i=e.name)),null==i?null:F(P.default,{title:l,className:(0,S.getClass)(w.default,"name",n.bot||this.isStreamerOnTypeProfile()?"wrap":"normal")},void 0,i)},s.renderDetails=function(e){var t,n=this,r=e.details,a=e.state,o=r,i=r;if(e.type===L.ActivityTypes.CUSTOM_STATUS)o=a;else if(!(0,v.default)(e))if(i=o=a,(0,y.default)(e)&&null!=a){o=D.default.Messages.USER_ACTIVITY_LISTENING_ARTISTS.format({artists:i,artistsHook:function(t,r){return F(M.default,{artists:a,linkClassName:w.default.bodyLink,canOpen:null!=e.sync_id,onOpenSpotifyArtist:n.handleOpenSpotifyArtist},r)}})}else if((0,h.isStageActivity)(e)){var l;o=null===(l=e.assets)||void 0===l?void 0:l.small_text}return null==o||0===o.length?null:((0,_.default)(e)&&(o=D.default.Messages.STREAMER_PLAYING.format({game:o})),F("div",{title:null!==(t=i)&&void 0!==t?t:void 0,className:(0,_.default)(e)||(0,y.default)(e)?w.default.detailsWrap:w.default.details},void 0,o))},s.renderTimePlayed=function(e){var t=this.props.activityGuild;if(!(0,v.default)(e)||(0,y.default)(e))return null;var n=e.timestamps;return null==n?null:(0,p.default)(e)?F(z,{timestamps:n}):F(b.default,{start:n.start,location:b.default.Locations.USER_ACTIVITY,className:w.default.playTime,isApplicationStreaming:null!=t})},s.renderTimeBar=function(e){if(!(0,y.default)(e))return null;var t=e.timestamps;if(null==t)return null;var n=t.start,r=t.end;return null==n||null==r?null:F(O.default,{start:n,end:r,className:this.getTypeClass("timeBar"),themed:this.props.type===o.VOICE_CHANNEL})},s.renderState=function(e,t){var n,r,a,o=this,i=e.state,l=e.party,u=e.assets,s=i,d=s;if(!(0,v.default)(e)&&(s=null==u?void 0:u.large_text,d=s,(0,y.default)(e)&&null!=s)){s=D.default.Messages.USER_ACTIVITY_LISTENING_ALBUM.format({album:d,albumHook:function(t,n){return null!=e.sync_id&&null!=d?F(I.default,{className:w.default.bodyLink,onClick:o.handleOpenSpotifyAlbum},n,d):d}})}if((null==s||0===s.length||e.type===L.ActivityTypes.CUSTOM_STATUS)&&!(0,h.isStageActivity)(e))return null;null==(null==l?void 0:l.size)&&[f.POKER_NIGHT_APPLICATION_ID].includes(null!==(n=e.application_id)&&void 0!==n?n:"")?r=D.default.Messages.USER_ACTIVITY_STATE_SIZE.format({count:"0",max:null!==(a=null==t?void 0:t.getMaxParticipants())&&void 0!==a?a:0}):(0,h.isStageActivity)(e)&&null!=(null==l?void 0:l.size)?r=D.default.Messages.USER_ACTIVITY_STAGE_STATE_SIZE.format({numSpeakers:l.size[0],numListeners:l.size[1]-l.size[0]}):null!=(null==l?void 0:l.size)&&l.size.length>=2&&(r=D.default.Messages.USER_ACTIVITY_STATE_SIZE.format({count:l.size[0],max:l.size[1]}));return F("div",{className:w.default.state},void 0,F("span",{title:d},void 0,s),null!=r?F("span",{},void 0," ",r):null)},s.renderIcon=function(e){return(0,y.default)(e)?F(A.default,{color:L.Colors.SPOTIFY,className:w.default.spotifyIcon}):null},s.render=function(){var e=this.props,t=e.type,n=e.renderActions,r=e.className,a=e.application,i=this.activity;if(null==i||i.type===L.ActivityTypes.CUSTOM_STATUS)return null;var u,s=t===o.USER_POPOUT,d=t===o.PROFILE,f=t===o.ACTIVITY_FEED,c=t===o.STREAM_PREVIEW,p=!1;(0,m.default)(i)?(u=this.renderXboxImage(),p=!0):null==(u=this.renderImage(i))&&(p=null!=(u=this.renderGameImage(i)));var v=this.renderName(i),y=this.renderDetails(i),_=this.renderState(i,a),h=this.renderTimePlayed(i),E=null!=n?n():null,g=this.renderTimeBar(i),O=this.renderIcon(i),I=![u,v,y,_,h,g,E].some((function(e){return null!=e}));return F("div",{className:(0,l.default)(this.getTypeClass("activity"),r)},void 0,this.renderHeader(I),F("div",{className:p?w.default.bodyAlignCenter:w.default.bodyNormal},void 0,u,this.isStreamerOnTypeActivityFeed()?null:F(T.default.Child,{className:(0,l.default)((0,S.getClass)(w.default,"content",p?"GameImage":null!=u?"Images":"NoImages",t))},void 0,v,y,_,h,s||c?null:g,f?E:null),d?E:null),s?g:null,s||c?E:null,O)},n=t,(r=[{key:"activity",get:function(){var e=this.props,t=e.activity;return null!=e.activityGuild&&(null==t?void 0:t.type)!==L.ActivityTypes.PLAYING&&(null==t?void 0:t.type)!==L.ActivityTypes.WATCHING?{type:L.ActivityTypes.PLAYING,name:D.default.Messages.SHARING_SCREEN}:t}}])&&G(n.prototype,r),a&&G(n,a),t}(i.PureComponent);K.displayName="UserActivity",K.Types=o;var $=K;t.default=$},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(271))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props,n=e.onClick,r=e.index;n&&n(r)},t}return s(t,e),t.prototype.render=function(){var e=this.props,t=e.text,n=e.lastItem,r=e.className;return u("span",{},void 0,u(i.default,{className:r,onClick:this.handleClick},void 0,t),n?"":", ")},t}(o.PureComponent);f.displayName="SpotifyArtistLink";var c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleOpenSpotifyArtist=function(e){var n=t.props.onOpenSpotifyArtist;n&&n(e)},t}return s(t,e),t.prototype.render=function(){var e=this,t=this.props.artists.split(";");if(!this.props.canOpen)return t.join(", ");var n=t.length-1;return t.map((function(t,r){return u(f,{text:t,index:r,lastItem:r===n,onClick:e.handleOpenSpotifyArtist,className:e.props.linkClassName},"spotify-artist-"+r)}))},t}(o.PureComponent);t.default=c,c.displayName="SpotifyArtists"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"16",height:"16"});function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 16 16"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M12.7609503,7.08043507 C10.1796226,5.54647845 5.92178025,5.40543597 3.45759439,6.15380317 C3.06179846,6.27398591 2.64333918,6.05046133 2.5234242,5.65450895 C2.40350922,5.25826952 2.62670026,4.83983073 3.02268744,4.71945662 C5.85139953,3.86028398 10.5538071,4.02620506 13.52548,5.79134121 C13.8813999,6.00280925 13.9981592,6.46277616 13.7872083,6.81834866 C13.5760661,7.17449528 13.1160095,7.2919031 12.7609503,7.08043507 Z M12.7456938,9.37785148 C12.5639139,9.67256952 12.1782795,9.76502256 11.883727,9.58404861 C9.72377106,8.25738585 6.4301382,7.87299604 3.87475822,8.64810544 C3.54335063,8.74813503 3.19341953,8.56150265 3.09273996,8.2309159 C2.99292418,7.89984962 3.17979084,7.55075308 3.51062257,7.45005215 C6.42975429,6.56484307 10.0587298,6.99354129 12.5395359,8.51700243 C12.8340884,8.69826409 12.9268019,9.08380478 12.7456938,9.37785148 Z M11.7108365,11.5428368 C11.566471,11.780912 11.2582675,11.8554793 11.0223905,11.7103962 C9.13604653,10.5509855 6.76173752,10.28918 3.96555508,10.9314428 C3.69610478,10.9935661 3.42751778,10.823788 3.36603055,10.5528184 C3.30435146,10.2819451 3.47260203,10.0118436 3.74262788,9.95000969 C6.80260111,9.2465882 9.42736749,9.54929481 11.5446963,10.8504123 C11.7807651,10.995399 11.8551061,11.3055334 11.7108365,11.5428368 Z M0,7.99990447 C0,12.4185663 3.58181579,16 8,16 C12.4183753,16 16,12.4185663 16,7.99990447 C16,3.58172026 12.4183753,0 8,0 C3.58181579,0 0,3.58172026 0,7.99990447 Z"}),d))}f.displayName="PlatformSpotify"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M11.8 14a6.1 6.1 0 0 0 0 6H3v-2c0-2.7 5.3-4 8-4h.8zm-.8-2c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4zm6 1c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4zm-1 6.2l3-2.2-3-2.2v4.4z"}))}d.displayName="PersonPlay"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=B,t.BadgeSizes=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=w(n(9)),l=w(n(61)),u=w(n(149)),s=w(n(9335)),d=n(8433),f=w(n(6)),c=w(n(7471)),p=w(n(9336)),v=w(n(9337)),y=w(n(9338)),m=w(n(9339)),_=w(n(9340)),h=w(n(9341)),E=w(n(9342)),g=w(n(9343)),S=w(n(9344)),O=w(n(9345)),I=w(n(9346)),T=w(n(9347)),C=w(n(9348)),b=w(n(9349)),M=w(n(9350)),N=w(n(9351)),A=w(n(9352)),P=w(n(9353)),R=w(n(9354)),L=w(n(9355)),D=w(n(9356));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var G,F=Object.freeze(((r={})[d.BadgeKeys.STAFF]=L.default,r[d.BadgeKeys.PARTNER]=P.default,r[d.BadgeKeys.HYPESQUAD]=b.default,r[d.BadgeKeys.HYPESQUAD_ONLINE_HOUSE_1]=M.default,r[d.BadgeKeys.HYPESQUAD_ONLINE_HOUSE_2]=N.default,r[d.BadgeKeys.HYPESQUAD_ONLINE_HOUSE_3]=A.default,r[d.BadgeKeys.BUG_HUNTER_LEVEL_1]=O.default,r[d.BadgeKeys.BUG_HUNTER_LEVEL_2]=I.default,r[d.BadgeKeys.EARLY_VERIFIED_DEVELOPER]=D.default,r[d.BadgeKeys.EARLY_SUPPORTER]=C.default,r[d.BadgeKeys.CERTIFIED_MODERATOR]=T.default,r[d.BadgeKeys.PREMIUM]=R.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_1]=p.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_2]=v.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_3]=y.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_4]=m.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_5]=_.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_6]=h.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_7]=E.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_8]=g.default,r[d.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_9]=S.default,r));function B(e){var t=e.className,n=e.user,r=e.premiumSince,a=e.premiumGuildSince,d=e.openPremiumSettings,p=e.shrinkAtCount,v=e.shrinkToSize,y=e.size,m=void 0===y?G.SIZE_24:y,_=(0,s.default)({user:n,premiumSince:r,premiumGuildSince:a,openPremiumSettings:d}),h=null!=p&&null!=v&&_.length>p?v:m;return U("div",{className:(0,i.default)(t,c.default.container),"aria-label":f.default.Messages.PROFILE_USER_BADGES,role:"group"},void 0,_.map((function(e){return U(u.default,{position:u.default.Positions.TOP,text:e.tooltip,spacing:24},e.key,(function(t){var n;return o.createElement(l.default,k({},t,{onClick:e.onClick,className:c.default.clickable}),U("img",{alt:" ","aria-hidden":!0,src:F[e.key],className:(0,i.default)((n={},n[c.default.profileBadge24]=h===G.SIZE_24,n[c.default.profileBadge22]=h===G.SIZE_22,n[c.default.profileBadge18]=h===G.SIZE_18,n))}))}))})))}t.BadgeSizes=G,function(e){e[e.SIZE_24=0]="SIZE_24",e[e.SIZE_22=1]="SIZE_22",e[e.SIZE_18=2]="SIZE_18"}(G||(t.BadgeSizes=G={})),B.displayName="UserProfileBadgeList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(199)),i=p(n(8272)),l=p(n(476)),u=p(n(466)),s=p(n(24)),d=n(1),f=p(n(6)),c=p(n(7475));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={reason:""},t.handleReasonChange=function(e){t.setState({reason:e})},t.handleKick=function(){var e=t.props,n=e.guildId,r=e.user;o.default.kickUser(n,r.id,t.state.reason)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n),r.prototype.render=function(){var e=this.props.user;return a.createElement(u.default,y({header:f.default.Messages.KICK_USER_TITLE.format({user:e.username}),confirmText:f.default.Messages.KICK,cancelText:f.default.Messages.CANCEL,onConfirm:this.handleKick},this.props),m(s.default,{size:s.default.Sizes.SIZE_16,className:c.default.spacing},void 0,f.default.Messages.KICK_USER_BODY.format({user:"@"+e.toString()})),m(l.default,{title:f.default.Messages.FORM_LABEL_REASON_KICK,className:c.default.spacing},void 0,m(i.default,{maxLength:d.MAX_REASON_LENGTH,onChange:this.handleReasonChange,value:this.state.reason,rows:2})))},r}(a.PureComponent);h.displayName="KickConfirm";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useApplicationCommandsDiscoveryState=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=v(n(8)),o=n(3),i=v(n(40)),l=v(n(12)),u=n(8605),s=v(n(8383)),d=v(n(9363)),f=v(n(8341)),c=n(8260),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}var m=function(e,t,n){return{target:n,type:c.ApplicationCommandType.PLACEHOLDER,id:"placeholder-"+e+"-"+t,name:"",description:"",applicationId:""}};t.useApplicationCommandsDiscoveryState=function(e,t,n,v){var y=(0,o.useStateFromStoresObject)([f.default,d.default,i.default],(function(){if(null==e.guild)return{guildCommandSections:null,guildCommands:null};if(!i.default.can(p.Permissions.USE_APPLICATION_COMMANDS,e.channel))return{guildCommandSections:null,guildCommands:null};var t=e.guild.id;return{guildCommandSections:f.default.getGuildSectionsWithCommands(t,n),guildCommands:d.default.getGuildCommands(t,n)}})),_=y.guildCommandSections,h=y.guildCommands,E=(0,o.useStateFromStoresObject)([s.default,l.default],(function(){var t,r,a;if((null===(t=e.channel)||void 0===t?void 0:t.type)!==p.ChannelTypes.DM)return{dmCommandSections:null,dmCommands:null};var o=null===(r=e.channel)||void 0===r?void 0:r.getRecipientId(),i=l.default.getUser(o);if(null==i||!0!==i.bot)return{dmCommandSections:null,dmCommands:null};var u=s.default.getCommands(o,n);return{dmCommandSections:null!=u&&u.length>0?[{id:o,type:c.ApplicationCommandSectionType.DM,name:i.username,commandCountByTarget:(a={},a[n]=u.length,a),icon:i.avatar}]:[],dmCommands:u}})),g=E.dmCommandSections,S=E.dmCommands,O=r.useMemo((function(){return function(e,t,n){var r=e.channel,a=e.guild;return null!=r?(0,u.getBuiltInCommands)(t,!0,n).filter((function(e){return null==e.predicate||e.predicate({channel:r,guild:a})})):[]}(e,n,v)}),[v,e,n]),I=r.useMemo((function(){var t;return v?u.BUILT_IN_SECTIONS:(null!==(t=null!=e.guild?_:g)&&void 0!==t?t:[]).concat(u.BUILT_IN_SECTIONS)}),[v,e.guild,g,_]),T=r.useMemo((function(){var e=I.reduce((function(e,t){var r;return e+(null!==(r=t.commandCountByTarget&&t.commandCountByTarget[n])&&void 0!==r?r:0)}),0);return{hasMoreBefore:null!=h&&h.topOffset>0&&e>0,hasMoreAfter:null!=h&&h.bottomOffset<e-1}}),[h,I,n]),C=T.hasMoreBefore,b=T.hasMoreAfter,M=r.useMemo((function(){if(!C)return[];for(var e=[],r=0;r<t;r++)e.push(m("before",r,n));return e}),[C,t,n]),N=r.useMemo((function(){if(!b)return[];for(var e=[],r=0;r<t;r++)e.push(m("after",r,n));return e}),[b,t,n]),A=r.useMemo((function(){var t;if(v)return O;var n=null!==(t=null!=e.guild?null==h?void 0:h.commandsArray:S)&&void 0!==t?t:[];return b||(n=n.concat(O)),n}),[O,v,e.guild,S,h,b]),P=r.useMemo((function(){var e,t,r={},o=a.default.groupBy(A,(function(e){return e.applicationId})),i=I.map((function(e){var t=o[e.id]||[];return e.type===c.ApplicationCommandSectionType.BUILT_IN&&(r[e.id]=t.length),{data:t,section:e,key:e.id}})).filter((function(e){return e.data.length>0}));i.length>0&&((e=i[0].data).unshift.apply(e,M),(t=i[i.length-1].data).push.apply(t,N));var l=i.reduce((function(e,t){return e.concat(t.data)}),[]),u=[],s=0;return I.forEach((function(e){var t;u.push(s),s+=null!==(t=e.type===c.ApplicationCommandSectionType.BUILT_IN?r[e.id]:e.commandCountByTarget&&e.commandCountByTarget[n])&&void 0!==t?t:0})),{discoverySections:i,sectionsOffset:u,discoveryCommands:l}}),[A,M,N,I,n]),R=P.discoverySections,L=P.sectionsOffset,D=P.discoveryCommands;return{discoverySections:R,applicationCommandSections:I,discoveryCommands:D,commands:A,guildCommands:h,sectionsOffset:L,hasMoreBefore:C,hasMoreAfter:b}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u,t.renderSimpleAccessories=s;i(n(0));var r,a=i(n(8831));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e,t,n,r,o,i){var u=e.message,s=e.channel,d=e.compact,f=void 0!==d&&d;return l(a.default,{isInteracting:r,message:u,channel:s,compact:f,hasSpoilerEmbeds:t,onAttachmentContextMenu:n,renderThreadAccessory:o,renderComponentAccessory:i})}function s(e,t){var n=e.message,r=e.channel,o=e.compact,i=void 0!==o&&o,u=e.renderThreadAccessory;return l(a.SimpleMessageAccessories,{message:n,channel:r,compact:i,hasSpoilerEmbeds:t,renderThreadAccessory:u})}u.displayName="renderAccessories",s.displayName="renderSimpleAccessories"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleMessageAccessories=t.default=t.MessageAccessories=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=q();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=Z(n(9)),i=n(3),l=Z(n(184)),u=n(8507),s=Z(n(390)),d=Z(n(9372)),f=Z(n(8835)),c=Z(n(105)),p=Z(n(9530)),v=n(385),y=Z(n(9532)),m=Z(n(9537)),_=Z(n(182)),h=Z(n(8295)),E=n(290),g=Z(n(9542)),S=n(1209),O=Z(n(9546)),I=Z(n(11)),T=Z(n(8438)),C=Z(n(56)),b=Z(n(1219)),M=Z(n(40)),N=Z(n(39)),A=Z(n(12)),P=Z(n(8516)),R=n(8337),L=n(8517),D=Z(n(9552)),w=Z(n(9553)),j=n(466),k=Z(n(24)),U=n(121),G=n(99),F=Z(n(186)),B=Z(n(8645)),H=Z(n(8858)),x=Z(n(9569)),V=Z(n(9579)),W=n(8308),Y=Z(n(9582)),z=n(1),K=Z(n(6)),$=Z(n(7587));function Z(e){return e&&e.__esModule?e:{default:e}}function q(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return q=function(){return e},e}function X(){return(X=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}).apply(this,arguments)}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Q(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var ee=function(e){var t=e.width,n=e.height,r=e.url,a=e.src,o=e.format,l=e.className,s=(0,i.useStateFromStores)([T.default],(function(){return T.default.getIsFavorite(r)}));return Q(H.default,{className:l,onClick:function(e){e?(0,u.removeFavoriteGIF)(r):((0,u.addFavoriteGIF)({url:r,src:a,width:t,height:n,format:o}),U.ComponentDispatch.dispatch(z.ComponentActions.FAVORITE_GIF))},isFavorite:s})};ee.displayName="ConnectedGIFFavButton";var te=function(e,t,n){return function(){var r=t||n;if(null==r)return null;var a=r.url,o=r.proxyURL,i=r.width,l=r.height;return Q(ee,{width:i,height:l,src:o||a,url:e||o||a,format:null!=n?z.GIFResultFormat.VIDEO:z.GIFResultFormat.IMAGE,className:$.default.gifFavoriteButton})}},ne=function(e){return function(){var t=e.proxy_url,n=e.width,r=e.height;return R.IMAGE_GIF_RE.test(e.filename)&&null!=n&&null!=r?Q(ee,{width:n,height:r,src:t,url:t,format:z.GIFResultFormat.IMAGE,className:$.default.gifFavoriteButton}):null}};var re=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={showSuppressModal:!1,showRemoveAttachmentModal:!1,attachmentToDelete:null},t.getAcceptInviteContext=function(e){var n=t.props,r=n.channel,a=n.message;return{location:e,location_guild_id:r.getGuildId(),location_channel_id:r.id,location_channel_type:r.type,location_message_id:a.id}},t.renderEmbed=function(e,n){var r=t.props,o=r.gifAutoPlay,i=r.inlineEmbedMedia,l=r.canSuppressEmbeds,u=r.hasSpoilerEmbeds;return Q(L.GIFAccessoryContext.Provider,{value:te(e.url,e.image,e.video)},e.id,a.createElement(P.default,X({className:$.default.embedWrapper,embed:e,spoiler:u,autoPlayGif:o,hideMedia:!i,onSuppressEmbed:l?t.handleEmbedSuppressed:void 0,renderTitle:t.renderEmbedTitle,renderDescription:t.renderEmbedDescription},n)))},t.renderEmbedTitle=function(e,n){return e.type===z.EmbedTypes.RICH?h.default.parseEmbedTitle(n,!0,{channelId:t.props.channel.id}):n},t.renderEmbedDescription=function(e,n){return e.type===z.EmbedTypes.RICH?h.default.parse(n,!0,{channelId:t.props.channel.id,allowLinks:!0}):n},t.handleEmbedSuppressed=function(e){var n=t.props,r=n.channel,a=n.message;e.shiftKey?s.default.suppressEmbeds(r.id,a.id):t.setState({showSuppressModal:!0})},t.handleRemoveAttachment=function(e){t.setState({showRemoveAttachmentModal:!0,attachmentToDelete:e})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,J(t,n);var i=r.prototype;return i.shouldComponentUpdate=function(e,t){var n,r,a=this.props,o=a.channel,i=a.message,u=e.channel,s=e.message;return!((0,l.default)(this.state,t)&&(0,l.default)(this.props,e,["message","channel"])&&o.type===u.type&&s.codedLinks===i.codedLinks&&s.flags===i.flags&&s.giftCodes===i.giftCodes&&s.attachments===i.attachments&&s.embeds===i.embeds&&s.components===i.components&&s.activity===i.activity&&(n=s.reactions,r=i.reactions,n===r||n.length===r.length&&!n.some((function(e,t){var n=e.emoji,a=e.count,o=r[t],i=o.emoji;return a!==o.count||n.id!==i.id||n.name!==i.name}))))},i.renderCodedLinks=function(e){var t=this;return 0===e.codedLinks.length?null:e.codedLinks.map((function(n){var r=n.type,a=n.code;if(r===v.CodedLinkType.INVITE)return Q(x.default,{code:a,author:e.author,getAcceptInviteContext:t.getAcceptInviteContext},a);if(r===v.CodedLinkType.TEMPLATE)return Q(y.default,{code:a},a);throw Error("Unknown coded link type: "+r)}))},i.renderGiftCodes=function(e){var t=e.giftCodes,n=e.author,r=e.channel_id;return t.length>0?t.map((function(e){return Q("div",{className:$.default.giftCodeContainer},e,Q(d.default,{code:e,author:n,channelId:r}))})):null},i.renderReactions=function(e){var t=this.props,n=t.disableReactionCreates,r=t.disableReactionReads,a=t.disableReactionUpdates,o=t.isLurking,i=t.isPendingMember,l=t.channel;return r?null:Q(Y.default,{message:e,channel:l,disableReactionCreates:n,disableReactionUpdates:a,isLurking:o,isPendingMember:i})},i.renderAttachments=function(e){var t=this,n=e.attachments,r=this.props,a=r.gifAutoPlay,o=r.canDeleteAttachments,i=r.inlineAttachmentMedia,l=r.onAttachmentContextMenu,u=r.message;return n.length>0?n.map((function(e){return Q(L.GIFAccessoryContext.Provider,{value:ne(e)},e.id,Q(w.default,{className:$.default.embedWrapper,attachment:e,inlineMedia:i,autoPlayGif:a,renderImageComponent:W.renderImageComponent,renderVideoComponent:W.renderVideoComponent,renderAudioComponent:W.renderAudioComponent,renderPlaintextFilePreview:W.renderPlaintextFilePreview,canRemoveAttachment:o&&(n.length>1||""!==u.content),onRemoveAttachment:t.handleRemoveAttachment,onContextMenu:null!=l?function(t){t.stopPropagation(),t.preventDefault(),l(t,e)}:void 0}))})):null},i.renderEmbeds=function(e){var t=this,n=this.props.renderEmbeds;return e.embeds.length&&n?e.embeds.map((function(e){if(e.type===z.EmbedTypes.APPLICATION_NEWS)return null;var n={renderImageComponent:W.renderImageComponent,renderVideoComponent:W.renderVideoComponent,renderLinkComponent:W.renderMaskedLinkComponent};if(e.type===z.EmbedTypes.ARTICLE&&null!=e.url&&/^https?:\/\/(?:canary|ptb|www)?\.discord(?:app)?\.com\/store\/skus\/(?:[0-9]+)/.test(e.url)&&null!=e.provider&&"Discord"===e.provider.name){var r=F.default.safeParseWithQuery(e.url);if(null!=r&&null!=r.pathname){var a=r.pathname.split("/")[3];if(null!=a)return Q(f.default,{skuId:a,renderFallback:function(){return t.renderEmbed(e,n)}},e.id)}}return t.renderEmbed(e,n)})):null},i.renderComponentAccessories=function(e){return null==e.components||0===e.components.length||!1===this.props.renderComponentAccessory?null:Q(m.default,{message:e})},i.renderActivityInvite=function(e){if(null==e.activity)return null;var t=this.props.channel;return Q(V.default,{channel:t,message:e,hideParty:!1})},i.renderPublishBump=function(e){return this.props.channel.type!==z.ChannelTypes.GUILD_ANNOUNCEMENT||(0,G.hasFlag)(e.flags,z.MessageFlags.EPHEMERAL)?null:Q(p.default,{channelId:e.channel_id,messageId:e.id})},i.renderEphemeralAccessories=function(e){return(0,G.hasFlag)(e.flags,z.MessageFlags.EPHEMERAL)?Q(D.default,{message:e,onDeleteMessage:function(){s.default.dismissAutomatedMessage(e)}}):null},i.renderStickersAccessories=function(e){var t=(0,E.getMessageStickers)(e),n=this.props,r=n.channel,a=n.isInteracting;return 0===t.length?null:t.map((function(e){return Q(g.default,{channel:r,isInteracting:a,renderableSticker:e},e.id)}))},i.renderThreadAccessories=function(e){if(e.hasFlag(z.MessageFlags.HAS_THREAD)&&!1!==this.props.renderThreadAccessory&&(0,S.computeCanSeeThreads)())return Q(O.default,{message:e,compact:this.props.compact})},i.renderSuppressConfirmModal=function(){var e=this,t=this.props,n=t.channel,r=t.message;return Q(j.DeclarativeConfirmModal,{dismissable:!0,header:K.default.Messages.SUPPRESS_EMBED_TITLE,confirmText:K.default.Messages.SUPPRESS_EMBED_CONFIRM,cancelText:K.default.Messages.CANCEL,onCancel:function(){return e.setState({showSuppressModal:!1})},onConfirm:function(){s.default.suppressEmbeds(n.id,r.id),e.setState({showSuppressModal:!1})}},void 0,Q(k.default,{size:k.default.Sizes.SIZE_16,color:k.default.Colors.STANDARD,className:$.default.confirmText},void 0,K.default.Messages.SUPPRESS_EMBED_BODY),Q(k.default,{size:k.default.Sizes.SIZE_16,color:k.default.Colors.MUTED},void 0,K.default.Messages.SUPPRESS_EMBED_TIP))},i.renderRemoveAttachmentConfirmModal=function(){var e=this,t=this.props,n=t.channel,r=t.message,a=this.state.attachmentToDelete;if(null!=a)return Q(j.DeclarativeConfirmModal,{dismissable:!0,header:K.default.Messages.REMOVE_ATTACHMENT_TITLE,confirmText:K.default.Messages.REMOVE_ATTACHMENT_CONFIRM,cancelText:K.default.Messages.CANCEL,onCancel:function(){return e.setState({showRemoveAttachmentModal:!1,attachmentToDelete:null})},onConfirm:function(){var t=r.attachments.filter((function(e){return e.id!==a.id}));s.default.patchMessageAttachments(n.id,r.id,t),e.setState({showRemoveAttachmentModal:!1,attachmentToDelete:null})}},void 0,Q(k.default,{size:k.default.Sizes.SIZE_16,color:k.default.Colors.STANDARD,className:$.default.confirmText},void 0,K.default.Messages.REMOVE_ATTACHMENT_BODY));this.setState({showRemoveAttachmentModal:!1})},i.render=function(){var e=this.props,t=e.className,n=e.message,r=this.state,a=r.showSuppressModal,i=r.showRemoveAttachmentModal,l=this.renderCodedLinks(n),u=this.renderGiftCodes(n),s=this.renderAttachments(n),d=this.renderEmbeds(n),f=this.renderActivityInvite(n),c=this.renderReactions(n),p=this.renderPublishBump(n),v=this.renderEphemeralAccessories(n),y=this.renderStickersAccessories(n),m=this.renderThreadAccessories(n),_=this.renderComponentAccessories(n);return null==l&&null==s&&null==d&&null==f&&null==c&&null==u&&null==p&&null==v&&null==y&&null==m&&null==_?null:Q("div",{className:(0,o.default)(t,$.default.container)},void 0,l,u,s,d,f,y,_,c,p,v,a&&this.renderSuppressConfirmModal(),i&&this.renderRemoveAttachmentConfirmModal(),m)},r}(a.Component);t.MessageAccessories=re,re.displayName="MessageAccessories",re.defaultProps={renderEmbeds:!0,compact:!1};t.default=function(e){var t=e.channel,n=e.message,r=(0,i.useStateFromStores)([I.default],(function(){return I.default.getId()})),o=(0,i.useStateFromStoresObject)([c.default,N.default],(function(){var e=N.default.inlineAttachmentMedia,t=N.default.gifAutoPlay,n=N.default.renderEmbeds,r=N.default.inlineEmbedMedia,a=N.default.renderReactions,o=c.default.useReducedMotion;return{gifAutoPlay:t&&!o,renderEmbeds:n,inlineAttachmentMedia:e,inlineEmbedMedia:r,renderReactions:a}})),l=(0,i.useStateFromStores)([b.default],(function(){return null==t.guild_id||b.default.canChatInGuild(t.guild_id)}),[t]),u=o.renderReactions,s=(0,i.useStateFromStores)([_.default],(function(){return null!=t.guild_id&&_.default.isLurking(t.guild_id)}),[t]),d=(0,i.useStateFromStores)([C.default,A.default],(function(){var e,n,r=A.default.getCurrentUser();return null!==(e=null!=t.guild_id&&null!=r?null===(n=C.default.getMember(t.guild_id,r.id))||void 0===n?void 0:n.isPending:null)&&void 0!==e&&e})),f=(0,i.useStateFromStoresObject)([M.default],(function(){return{canAddNewReactions:l&&M.default.can(z.Permissions.ADD_REACTIONS,t),canManageMessages:M.default.can(z.Permissions.MANAGE_MESSAGES,t)}}),[l,t]),p=f.canAddNewReactions,v=f.canManageMessages,y=(r===n.author.id||v)&&n.author.id!==z.LOCAL_BOT_ID&&!t.isArchivedThread(),m=(r===n.author.id||v)&&!t.isArchivedThread(),h=(0,B.default)({channel:t,canChat:l,renderReactions:u,canAddNewReactions:p,isLurking:s});return a.createElement(re,X({canSuppressEmbeds:y,canDeleteAttachments:m},o,h,e,{isLurking:s&&l,isPendingMember:d&&l}))};var ae=function(e){var t=e.disableReactionReads,n=void 0!==t&&t,r=e.renderComponentAccessory,o=void 0!==r&&r,l=e.renderThreadAccessory,u=void 0!==l&&l,s=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["disableReactionReads","renderComponentAccessory","renderThreadAccessory"]),d=(0,i.useStateFromStoresObject)([c.default,N.default],(function(){var e=N.default.inlineAttachmentMedia,t=N.default.gifAutoPlay,n=N.default.renderEmbeds,r=N.default.inlineEmbedMedia,a=N.default.renderReactions,o=c.default.useReducedMotion;return{gifAutoPlay:t&&!o,renderEmbeds:n,inlineAttachmentMedia:e,inlineEmbedMedia:r,renderReactions:a}}));return a.createElement(re,X({},d,s,{disableReactionReads:n,disableReactionCreates:!0,disableReactionUpdates:!0,canSuppressEmbeds:!1,canDeleteAttachments:!1,renderComponentAccessory:o,renderThreadAccessory:u}))};t.SimpleMessageAccessories=ae,ae.displayName="SimpleMessageAccessories"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd",transform:"translate(2 6)"},void 0,s("path",{className:f,fill:d,d:"M14 0l2.29 2.29-4.88 4.88-4-4L0 10.59 1.41 12l6-6 4 4 6.3-6.29L20 6V0z"})))}d.displayName="TrendingUp"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7484));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(e){var t,n,r=e.renderTitle,i=e.renderTagline,l=e.renderActions,s=e.renderMedia,d=e.className,f=e.isHorizontal,c=void 0!==f&&f;return u("div",{className:(0,a.default)(o.default.tile,(t={},t[o.default.tileHorizontal]=c,t),d)},void 0,u("div",{className:(0,a.default)(o.default.media,(n={},n[o.default.mediaHorizontal]=c,n))},void 0,s&&s()),u("div",{className:o.default.description},void 0,u("h2",{className:o.default.title},void 0,r&&r()),u("div",{className:o.default.tagline},void 0,i&&i()),u("div",{className:o.default.actions},void 0,l&&l())))};s.displayName="ResponsiveTile";var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=C(n(0)),o=C(n(3)),i=I(n(478)),l=I(n(5960)),u=n(42),s=I(n(71)),d=I(n(8557)),f=I(n(120)),c=I(n(257)),p=I(n(373)),v=I(n(29)),y=I(n(477)),m=n(85),_=n(35),h=I(n(47)),E=I(n(24)),g=n(402),S=n(1),O=I(n(7486));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){N(o,r,a,i,l,"next",e)}function l(e){N(o,r,a,i,l,"throw",e)}i(void 0)}))}}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={error:null,accepted:!1},t.handleAccept=A(regeneratorRuntime.mark((function e(){var n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,r=n.giftCode,a=n.channelContext,null!=r){e.next=3;break}throw new Error("GiftCode is null at acceptance.");case 3:return e.prev=3,e.next=6,l.default.redeemGiftCode(r.code,{channelId:a});case 6:t.setState({accepted:!0}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),t.setState({error:e.t0});case 12:case"end":return e.stop()}}),e,null,[[3,9]])}))),t.handleGoToLibrary=function(){var e=t.props,n=e.onClose,r=e.libraryApplication;(0,u.transitionTo)(S.Routes.APPLICATION_LIBRARY,{state:{applicationId:null!=r?r.id:null}}),n()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var a,o,s,d=r.prototype;return d.componentDidMount=function(){var e=this.props,t=e.application,n=e.sku;null==t&&null!=n&&i.default.fetchApplication(n.applicationId)},d.render=function(){var e=this.props,t=e.application,n=e.accepting,r=e.onClose,a=e.giftCode,o=e.headerId,i=e.transitionState;return M(_.ModalRoot,{transitionState:i,size:_.ModalSize.SMALL,className:O.default.modal,"aria-labelledby":o},void 0,M("div",{className:O.default.backSplash}),M(_.ModalContent,{className:O.default.content},void 0,M(_.ModalCloseButton,{onClick:r,className:O.default.closeButton}),M(y.default,{size:y.default.Sizes.LARGE,game:t,skuId:a.skuId}),M(h.default,{className:O.default.header},void 0,this.headerText),M(E.default,{className:O.default.body},void 0,this.bodyText),M(v.default,{submitting:n,onClick:this.handleClick},void 0,this.buttonText)))},a=r,(o=[{key:"step",get:function(){var e=this.props,t=e.libraryApplication,n=e.accepting,r=e.giftCode,a=this.state,o=a.error,i=a.accepted;return(0,g.getStep)(t,r,o,i,n)}},{key:"buttonText",get:function(){return(0,g.getButtonText)(this.step,this.props.giftCode)}},{key:"headerText",get:function(){return null!=this.props.sku?(0,g.getHeaderText)(this.step,this.props.giftCode,this.props.sku):null}},{key:"bodyText",get:function(){var e=this.props,t=e.sku,n=e.accepting,r=e.libraryApplication,a=e.subscriptionPlan,o=this.state,i=o.error,l=o.accepted;return null!=t?(0,g.getBodyText)(this.step,t,r,i,l,n,this.handleGoToLibrary,a):null}},{key:"errorMessage",get:function(){var e=this.props,t=e.libraryApplication,n=e.accepting,r=this.state,a=r.error,o=r.accepted;return(0,g.getErrorMessage)(t,a,o,n,this.handleGoToLibrary)}},{key:"handleClick",get:function(){var e=this.props,t=e.giftCode,n=e.onClose;switch(this.step){case S.GiftCodeModalStates.ERROR:return n;case S.GiftCodeModalStates.SUCCESS:return __OVERLAY__||null!=t.subscriptionPlanId?n:this.handleGoToLibrary;case S.GiftCodeModalStates.CONFIRM:default:return this.handleAccept}}}])&&P(a.prototype,o),s&&P(a,s),r}(a.Component);L.displayName="GiftCodeAccept";var D=o.default.connectStores([f.default,p.default,s.default,d.default,c.default],(function(e){var t=e.giftCode,n=p.default.get(t.skuId),r=null!=n?s.default.getGame(n.applicationId):null;return{sku:n,libraryApplication:null!=n?(0,g.firstLibraryApplicationForGiftCode)(t,n,f.default):null,application:r,subscriptionPlan:null!=t.subscriptionPlanId?c.default.get(t.subscriptionPlanId):null,accepting:d.default.getIsAccepting(t.code)}}))(L),w=function(e){var t=e.channelContext,n=e.code,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channelContext","code"]),i=(0,m.useUID)(),l=(0,o.useStateFromStores)([d.default],(function(){return d.default.get(n)}));return null==l?null:a.createElement(D,b({},r,{channelContext:t,giftCode:l,headerId:i}))};w.displayName="GiftCodeAcceptModal";var j=w;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoreEmbedWithoutDimensions=t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(192),i=C(n(3)),l=n(8344),u=C(n(8257)),s=C(n(8836)),d=C(n(8636)),f=C(n(9523)),c=n(8614),p=C(n(8273)),v=C(n(8299)),y=C(n(71)),m=C(n(120)),_=C(n(8895)),h=C(n(373)),E=C(n(8364)),g=C(n(29)),S=n(289),O=n(1),I=C(n(6)),T=C(n(7555));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var R=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={playing:!1,muted:!0},t.handleToggleMute=function(){t.setState({muted:!t.state.muted})},t.handleMouseEnter=function(){t.setState({playing:!0})},t.handleMouseLeave=function(){t.setState({playing:!1})},t.getStoreListingLocation=function(){var e=t.props.sku;if(null==e)throw new Error("Should not be link to ApplicationStoreListing without SKU");return(0,S.getStoreListingLocation)(e.id,{slug:e.slug,analyticsSource:t.analyticsLocation})},t.handleActionButtonClick=function(e){return e.preventDefault()},t.handleBuyButtonClick=function(e){return e.preventDefault()},t.handleLinkClick=function(e){var n=t.props.onEmbedClick;null!=n&&n(e)},t.renderActions=function(e){var n=t.props,r=n.inLibrary,a=n.application,o=n.skuId,i=n.libraryApplication,l=n.renderCustomActions;if(null==a)return null;if(null!=l)return N("div",{className:T.default.tileActions},void 0,l());var u=null!=a&&a.primarySkuId===o,f=null!=i&&i.hasFlag(O.LibraryApplicationFlags.HIDDEN);return N("div",{className:T.default.tileActions},void 0,!u||f?t.renderViewInStoreButton():N(s.default,{application:a,customDisabledColor:g.default.Colors.GREY,size:g.default.Sizes.SMALL,className:T.default.actionButton,source:O.AnalyticsLocations.MESSAGE_EMBED,onClick:t.handleActionButtonClick}),r&&!f||e.premium?null:N(d.default,{type:d.default.Types.EMBED,sku:e,inLibrary:!1}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,P(t,n);var a,i,p,v=r.prototype;return v.componentDidMount=function(){var e=this.props,t=e.sku,n=e.skuId,r=e.storeListing;null!=t&&null!=r||(0,l.fetchStoreListingForSku)(n)},v.renderViewInStoreButton=function(){return N(g.default.Link,{to:this.getStoreListingLocation(),className:T.default.actionButton,color:g.default.Colors.GREEN,size:g.default.Sizes.SMALL},void 0,I.default.Messages.GAME_ACTION_BUTTON_VIEW_IN_STORE)},v.render=function(){var e=this,t=this.props,n=t.sku,r=t.storeListing,a=t.inLibrary,i=t.width,l=t.fetchFailed,s=t.renderFallback,d=t.renderCustomTitle,p=t.renderCustomTagline,v=this.state,y=v.playing,m=v.muted,_=i>c.HORIZONTAL_EMBED_BREAKPOINT;return null==n||null==r?l?s():N(c.ResponsiveLoadingEmbedTile,{isHorizontal:_}):N(u.default,{section:O.AnalyticsSections.APPLICATION_EMBED},void 0,N(o.Link,{onClick:this.handleLinkClick,to:this.getStoreListingLocation(),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},void 0,N(f.default,{sku:n,storeListing:r,playing:y,muted:m,inLibrary:a,onToggleMute:this.handleToggleMute,renderCustomActions:function(){return e.renderActions(n)},renderCustomTitle:d,renderCustomTagline:p,isHorizontal:_,isEmbed:!0})))},a=r,(i=[{key:"analyticsLocation",get:function(){var e=this.props,t=e.analyticsContext.location,n=e.analyticsSection;return M({},t,{section:null!=n?n:O.AnalyticsSections.APPLICATION_EMBED,object:O.AnalyticsObjects.CARD})}}])&&A(a.prototype,i),p&&A(a,p),r}(a.Component);R.displayName="StoreEmbed",R.defaultProps={renderFallback:O.NOOP};var L=[h.default,_.default,m.default,E.default,y.default];function D(e){var t=e.skuId,n=h.default.get(t);return{sku:n,application:null!=n?y.default.getGame(n.applicationId):null,fetchFailed:h.default.didFetchingSkuFail(t),inLibrary:null!=n&&m.default.hasApplication(n.applicationId,n.applicationId,!0),storeListing:null!=n?E.default.getForSKU(n.id):null,libraryApplication:null!=n?m.default.getLibraryApplication(n.applicationId,n.applicationId,!0):null}}var w=(0,v.default)((0,p.default)(R));var j=i.default.connectStores(L,D)(w);t.default=j;var k=(0,p.default)(i.default.connectStores(L,D)(R));t.StoreEmbedWithoutDimensions=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=c(n(120)),i=c(n(373)),l=c(n(29)),u=n(136),s=c(n(8470)),d=c(n(8891)),f=c(n(8892));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e){var t=e.application,n=e.fullWidth,c=void 0!==n&&n,p=e.size,y=void 0===p?l.default.Sizes.LARGE:p,m=e.color,_=e.customDisabledColor,h=e.hideNotLaunchable,E=e.tooltipPosition,g=e.onClick,S=e.className,O=e.source,I=e.storeListingAnalyticsProperties,T=e.pauseAnimation,C={fullWidth:c,size:y,color:m,customDisabledColor:_,tooltipPosition:E,onClick:g,className:S,hover:e.hover,innerClassName:e.innerClassName},b=(0,a.useStateFromStores)([o.default],(function(){return o.default.getActiveLibraryApplication(t.id)})),M=null!=b?b.sku.id:null,N=null!=M?M:t.primarySkuId,A=(0,a.useStateFromStores)([i.default],(function(){return null!=N&&!i.default.didFetchingSkuFail(N)}));return null!=b&&(0,u.isUserEntitledToLibraryApplication)(b)?r.createElement(f.default,v({},C,{libraryApplication:b,source:O})):A?r.createElement(s.default,v({},C,{skuId:null!=b?b.sku.id:null,applicationId:t.id,pauseAnimation:T,storeListingAnalyticsProperties:I})):r.createElement(d.default,v({},C,{hideNotLaunchable:h,applicationId:t.id}))}y.displayName="ApplicationActionButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openIAPPurchaseModal=function(e,t,n,r,a){var o;o=null==p.default.get(t)?u.fetchSKU(e,t):Promise.resolve();return o.then((function(){var o=p.default.get(t),l=d.default.getCurrentUser();return null!=o&&o.premium?y.default.canInstallPremiumApplications(l)?O(o,a):i.openModal(a).then((function(){return function(e,t,n,r){var a=c.default.getPremiumSubscription(),o={id:e.id,applicationId:e.applicationId};if(null!=a){var i=y.default.getClosestUpgrade(a.planId);if(null==i)return Promise.reject(new Error("Could not find premium upgrade."));var l={initialPlanId:i,followupSKUInfo:o};switch(r){case _.AppContext.APP:return s.default.openPremiumSwitchPlanModalInApp(l);case _.AppContext.OVERLAY:return s.default.openPremiumSwitchPlanModalInOverlay(l);default:throw new Error("Unexpected app context: "+r)}}return t()}(o,n,0,a)})).then((function(){return O(o,a)})):T(e,t,r,{isIAP:!0,context:a})}))},t.openSKUPaymentModal=T;var r=g(n(0)),a=h(n(2)),o=g(n(287)),i=g(n(8838)),l=n(8615),u=g(n(5672)),s=h(n(8734)),d=h(n(12)),f=h(n(693)),c=h(n(1147)),p=h(n(373)),v=n(41),y=h(n(96)),m=h(n(9515)),_=n(1);function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function O(e,t){var n=e.applicationId,r=e.id;return u.purchaseSKU(n,r).then((function(e){var a=e.entitlements;return(0,l.openPurchaseConfirmationModal)(n,r,a,{context:t})}))}var I={isIAP:!1,context:_.AppContext.APP,promotionId:null,isGift:!1};function T(e,t,n,i){void 0===i&&(i={});var l=Promise.resolve();f.default.hasFetchedPaymentSources||(l=o.fetchPaymentSources());var u=S({},I,{},i),s=u.isIAP,d=u.context,c=u.promotionId,p=u.isGift;return l.then((function(){return new Promise((function(o,i){a.default.dispatch({type:_.ActionTypes.SKU_PURCHASE_MODAL_OPEN,applicationId:e,skuId:t,isIAP:s,isGift:p,analyticsLocation:n,promotionId:c,context:d,resolve:o,reject:i}),(0,v.openModal)((function(n){var o=n.onClose,i=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(n,["onClose"]);return r.createElement(m.default,S({},i,{onClose:function(e){void 0===e&&(e=null),a.default.dispatch({type:_.ActionTypes.SKU_PURCHASE_MODAL_CLOSE,error:e}),o()},applicationId:e,skuId:t,appContext:d}))}))}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openModal=function(e){return f.apply(this,arguments)},t.closeModal=function(e){r.default.dispatch({type:i.ActionTypes.PREMIUM_REQUIRED_MODAL_CLOSE,shouldContinue:e})};var r=u(n(2)),a=u(n(1147)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(287)),i=n(1);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=a.default.getPremiumSubscription()){e.next=3;break}return e.next=3,o.fetchSubscriptions();case 3:return e.abrupt("return",new Promise((function(e,n){r.default.dispatch({type:i.ActionTypes.PREMIUM_REQUIRED_MODAL_OPEN,context:t,resolve:e,reject:n})})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchUserTrialOffer=function(e){return s.apply(this,arguments)},t.userTrialOfferViewed=function(e){return d.apply(this,arguments)};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}function s(){return(s=u(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.default.get({url:o.Endpoints.USER_TRIAL_OFFER(t),oldFormErrors:!0});case 3:n=e.sent,i=n.body,a.default.dispatch({type:o.ActionTypes.BILLING_USER_TRIAL_OFFER_FETCH_SUCCESS,trialId:t,userTrialOffer:i}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),a.default.dispatch({type:o.ActionTypes.BILLING_USER_TRIAL_OFFER_FETCH_SUCCESS,trialId:t});case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function d(){return(d=u(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t.expires_at){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,r.default.post({url:o.Endpoints.USER_TRIAL_OFFER_ACKNOWLEDGED(t.id)});case 5:n=e.sent,i=n.body,a.default.dispatch({type:o.ActionTypes.BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS,userTrialOffer:i}),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(2);case 12:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(8278),l=n(8619),u=y(n(47)),s=n(8504),d=n(8279),f=y(n(9393)),c=n(8342),p=y(n(6)),v=y(n(7489));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t,n){return _(f.default,{className:v.default.option,name:e.name,state:t,onClick:n},e.name)}function E(e){var t,n,r,o,i=e.command,l=e.optionStates,s=e.onOptionClick,d=null!==(t=null===(n=i.options)||void 0===n?void 0:n.filter((function(e){return e.required})))&&void 0!==t?t:[],f=null!==(r=null===(o=i.options)||void 0===o?void 0:o.filter((function(e){return!e.required})))&&void 0!==r?r:[];return a.createElement(a.Fragment,null,d.map((function(e){return h(e,null==l?void 0:l[e.name],s)})),f.length>0?a.createElement(a.Fragment,null,_(u.default,{className:v.default.optionalHeader,size:u.default.Sizes.SIZE_12},void 0,p.default.Messages.COMMANDS_OPTIONAL_HEADER),f.map((function(e){return h(e,null==l?void 0:l[e.name],s)}))):null)}function g(e){var t,n,r,u,f,p=e.command,y=e.activeOptionName,m=e.channel,h=e.showOptions,g=e.showImage,S=e.optionStates,O=e.onOptionClick,I=e.isSelectable,T=void 0===I||I,C=(0,s.useCommandSection)(m,p.applicationId),b=a.useMemo((function(){var e;return null==p||null===(e=p.options)||void 0===e?void 0:e.find((function(e){return e.name===y}))}),[y,p]),M=null!=y?null==S?void 0:S[y]:null;null!=M&&!1===(null===(t=M.lastValidationResult)||void 0===t?void 0:t.success)?u=null!==(f=M.lastValidationResult.error)&&void 0!==f?f:"":u=null;var N=g&&null!=C?(0,c.getIconComponent)(C):null;return _("div",{className:(0,o.default)(v.default.wrapper,T?null:v.default.disabled)},void 0,null!=N?_(N,{className:v.default.image,section:C,width:32,height:32}):null,_("div",{className:v.default.infoWrapper},void 0,_("div",{className:v.default.usageWrapper},void 0,_(l.AutocompleteRowHeading,{className:v.default.title},void 0,i.COMMAND_SENTINEL+p.name),h?_(E,{command:p,optionStates:S,onOptionClick:O}):null),_(l.AutocompleteRowSubheading,{className:(0,o.default)(v.default.description,null!=u?v.default.error:null)},void 0,null!==(n=null!==(r=u)&&void 0!==r?r:null==b?void 0:b.description)&&void 0!==n?n:p.description)),_(l.AutocompleteRowContentSecondary,{className:v.default.source},void 0,C?(0,d.getApplicationCommandSectionName)(C):void 0))}h.displayName="renderOption",g.displayName="ApplicationCommandItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{width:n,height:a,viewBox:"0 0 40 40",fill:"none",className:e.className},void 0,o("path",{className:e.foreground,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M33 34.5833V7.49998H35V36.6666H9C6.791 36.6666 5 34.801 5 32.5V7.49998C5 5.19894 6.791 3.33331 9 3.33331H31V30.4166H9C7.8955 30.4166 7 31.3485 7 32.5C7 33.6515 7.8955 34.5833 9 34.5833H33ZM23.9718 9.99998L15.8889 17.9915L12.7086 14.8441L10 17.5058L15.8885 23.3333L26.6667 12.6669L23.9718 9.99998Z"}))}i.displayName="ChannelRules"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{fillRule:"evenodd",clipRule:"evenodd",fill:l,className:s,d:"M22.545 4.87988V5.87988H23.28C23.4126 5.87988 23.52 5.98733 23.52 6.11988V10.6399C23.52 10.7724 23.4126 10.8799 23.28 10.8799H17.76C17.6275 10.8799 17.52 10.7724 17.52 10.6399V6.11988C17.52 5.98733 17.6275 5.87988 17.76 5.87988H18.52V4.87988C18.52 3.75988 19.47 2.87988 20.52 2.87988C21.57 2.87988 22.545 3.75988 22.545 4.87988ZM19.52 5.87988H21.52V4.87988C21.52 4.30845 21.0534 3.87988 20.52 3.87988C19.9867 3.87988 19.52 4.30845 19.52 4.87988V5.87988Z"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",fill:l,className:s,d:"M4.85 8.26429L15.84 5.84426V10.5599C15.84 11.6202 16.6996 12.4799 17.76 12.4799H21V19.0586H19.1V17.9302L12.7065 16.524L10.36 19.6233C10.1776 19.8633 9.89545 19.9998 9.6 19.9998C9.524 19.9998 9.4461 19.9904 9.3701 19.9725L5.5701 19.0313C5.1464 18.925 4.85 18.5495 4.85 18.1175V8.26429ZM9.2181 17.9942L6.75 17.3824V15.2111L10.6706 16.0751L9.2181 17.9942Z"}),o("path",{d:"M3.9 8.25981H2V15.2939H3.9V8.25981Z",fill:l}))}i.displayName="MegaphoneLimited"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground,d=e.background;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{fillRule:"evenodd",clipRule:"evenodd",fill:l,className:s,d:"M20.4683 4.76211L22.8094 9.51661C23.1366 10.1813 22.6554 10.9601 21.9174 10.9601L17.2104 10.9601C16.4706 10.9601 15.9894 10.1778 16.3203 9.51286L18.6861 4.75836C19.0537 4.01957 20.1037 4.02179 20.4683 4.76211ZM19.0833 5.96007H20.0786V8.46007H19.0834L19.0833 5.96007ZM19.0833 9.45894C19.0833 9.73596 19.3063 9.96007 19.5809 9.96007C19.8556 9.96007 20.0786 9.73596 20.0786 9.45894C20.0786 9.18231 19.8556 8.9578 19.5809 8.9578C19.3063 8.9578 19.0833 9.18231 19.0833 9.45894Z"}),o("path",{className:d,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M4.85 8.26445L16.7165 5.65143L15.1067 9.30608C14.5477 10.5751 15.4771 12 16.8638 12H21V19.0588H19.1V17.9303L12.7065 16.5242L10.36 19.6235C10.1776 19.8635 9.89545 20 9.6 20C9.524 20 9.4461 19.9906 9.3701 19.9727L5.5701 19.0315C5.1464 18.9252 4.85 18.5496 4.85 18.1176V8.26445ZM9.2181 17.9943L6.75 17.3826V15.2113L10.6706 16.0753L9.2181 17.9943Z"}),o("path",{d:"M3.9 8.25998H2V15.2941H3.9V8.25998Z",fill:l}))}i.displayName="MegaphoneNSFW"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,d:"M14.4 7C14.5326 7 14.64 7.10745 14.64 7.24V8.76C14.64 8.89255 14.5326 9 14.4 9H9.41045L8.35045 15H10.56V17H8.00001L7.36325 20.5874C7.32088 20.8261 7.11337 21 6.87094 21H5.88657C5.57547 21 5.3399 20.7189 5.39427 20.4126L6.00001 17H2.59511C2.28449 17 2.04905 16.7198 2.10259 16.4138L2.27759 15.4138C2.31946 15.1746 2.52722 15 2.77011 15H6.35001L7.41001 9H4.00511C3.69449 9 3.45905 8.71977 3.51259 8.41381L3.68759 7.41381C3.72946 7.17456 3.93722 7 4.18011 7H7.76001L8.39677 3.41262C8.43914 3.17391 8.64664 3 8.88907 3H9.87344C10.1845 3 10.4201 3.28107 10.3657 3.58738L9.76001 7H14.4Z"}),s("path",{className:f,fill:d,d:"M12.48 13.92C12.48 13.3898 12.9098 12.96 13.44 12.96H22.56C23.0902 12.96 23.52 13.3898 23.52 13.92V20.2213C23.52 20.7515 23.0902 21.1813 22.56 21.1813H18.1294C17.8917 21.1813 17.6623 21.2695 17.4859 21.4289L15.0409 23.6378C14.8866 23.7773 14.64 23.6677 14.64 23.4597V21.4213C14.64 21.2887 14.5326 21.1813 14.4 21.1813H13.44C12.9098 21.1813 12.48 20.7515 12.48 20.2213V13.92Z"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M22.8093 8.55658L20.4681 3.80208C20.1036 3.06176 19.0536 3.05954 18.686 3.79833L16.3201 8.55283C15.9893 9.21773 16.4705 10 17.2103 10L21.9173 10C22.6553 10 23.1365 9.22122 22.8093 8.55658ZM20.0785 5.00004H19.0832L19.0833 7.50004H20.0785V5.00004ZM19.5808 9.00004C19.3061 9.00004 19.0832 8.77593 19.0832 8.49891C19.0832 8.22228 19.3061 7.99777 19.5808 7.99777C19.8555 7.99777 20.0785 8.22228 20.0785 8.49891C20.0785 8.77593 19.8555 9.00004 19.5808 9.00004Z"}))}d.displayName="NSFWThreadIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M20 7H12L10.553 5.106C10.214 4.428 9.521 4 8.764 4H3C2.447 4 2 4.447 2 5V19C2 20.104 2.895 21 4 21H20C21.104 21 22 20.104 22 19V9C22 7.896 21.104 7 20 7Z"}))}d.displayName="Folder"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var i=o("rect",{width:"16",height:"16"});function l(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,u=void 0===l?"currentColor":l,s=e.className,d=e.foreground;return o("svg",{className:s,width:n,height:a,viewBox:"0 0 16 16"},void 0,o("g",{fill:"none",fillRule:"evenodd"},void 0,i,o("polygon",{className:d,fill:u,points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}l.displayName="Slash"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackAutocompleteOpen=function(e,t,n){var r,a;l.default.track(u.AnalyticEvents.CHANNEL_AUTOCOMPLETE_OPEN,s({},(0,o.collectChannelAnalyticsMetadata)(t),{},(0,o.collectGuildAnalyticsMetadata)(t.guild_id),{autocomplete_type:e,num_emoji_results:null!==(r=null==n?void 0:n.numEmojiResults)&&void 0!==r?r:0,num_sticker_results:null!==(a=null==n?void 0:n.numStickerResults)&&void 0!==a?a:0}))},t.trackAutocompleteSelect=function(e,t,n,r){var a,i;l.default.track(u.AnalyticEvents.CHANNEL_AUTOCOMPLETE_SELECTED,s({},(0,o.collectChannelAnalyticsMetadata)(n),{},(0,o.collectGuildAnalyticsMetadata)(n.guild_id),{autocomplete_type:e,selection_type:t,sticker_id:null==r?void 0:r.stickerId,num_emoji_results:null!==(a=null==r?void 0:r.numEmojiResults)&&void 0!==a?a:0,num_sticker_results:null!==(i=null==r?void 0:r.numStickerResults)&&void 0!==i?i:0}))},t.trackStickerPreviewSelect=function(e){var t=e.sticker,n=e.stickerSelectLocation,r=e.isReplacement;l.default.track(u.AnalyticEvents.STICKER_ATTACHED,{replaced:r,source:d(n),sticker_id:t.id})};var r,a,o=n(106),i=n(366),l=(r=n(13))&&r.__esModule?r:{default:r},u=n(1);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}).apply(this,arguments)}function d(e){switch(e){case i.StickerSelectLocation.AUTOCOMPLETE:return a.AUTOCOMPLETE;case i.StickerSelectLocation.EXPRESSION_SUGGESTIONS:return a.AUTOSUGGEST;case i.StickerSelectLocation.STICKER_PICKER:return a.STICKER_PICKER;default:return null}}!function(e){e.AUTOCOMPLETE="autocomplete",e.AUTOSUGGEST="autosuggest",e.STICKER_PICKER="picker"}(a||(a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(286),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8311)),o=E(n(8383)),i=E(n(8469)),l=E(n(8341)),u=n(8504),s=E(n(8280)),d=n(8279),f=E(n(40)),c=E(n(12)),p=E(n(8291)),v=n(8278),y=n(8346),m=n(8281),_=n(1),h=E(n(6));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}var S={results:{commands:[]}};var O={sentinel:v.COMMAND_SENTINEL,stores:[s.default,o.default,i.default,l.default,f.default],matches:function(e,t,n,r,a){return a.commands!==m.CommandMode.DISABLED&&null==s.default.getActiveCommand()},queryResults:function(e,t,n,s,p){var v=n.split(" ")[0];if(0===v.length&&s.commands!==m.CommandMode.OLD_BUILT_INS)return S;var y={channel:e,guild:t};if(s.commands===m.CommandMode.OLD_BUILT_INS){var h=(0,d.queryCommands)(y,[],n,r.ApplicationCommandTarget.CHAT,!1,m.MAX_COMMAND_AUTOCOMPLETE_RESULTS,!1,!1);return 0===h.length?S:{results:{commands:h}}}if(p&&s.commands===m.CommandMode.NEW)if(null!=e.guild_id)a.queryGuildApplicationCommands(e.guild_id,v,m.MAX_COMMAND_AUTOCOMPLETE_RESULTS,r.ApplicationCommandTarget.CHAT,null==l.default.getRemoteGuildApplications(e.guild_id));else if(e.type===_.ChannelTypes.DM){var E=c.default.getUser(e.getRecipientId());!0===(null==E?void 0:E.bot)&&null==o.default.getCommands(E.id,r.ApplicationCommandTarget.CHAT)&&a.queryDmApplicationCommands(E.id,r.ApplicationCommandTarget.CHAT)}for(var g=(0,u.getContextCommands)(e,r.ApplicationCommandTarget.CHAT,o.default,i.default,f.default),O=n.split(" ",3),I=0;I<O.length;I++){var T=O.join(" "),C=(0,d.queryCommands)(y,g,T,r.ApplicationCommandTarget.CHAT,!1,m.MAX_COMMAND_AUTOCOMPLETE_RESULTS,s.commands===m.CommandMode.NEW||s.commands===m.CommandMode.NEW_TEXT_ONLY,s.commands===m.CommandMode.NEW_TEXT_ONLY);if(C.length>0)return{results:{commands:C}};O.pop()}return S},renderResults:function(e,t,n,r,a,o,i,l){var u=e.commands;return(0,y.renderAutocompleteGroup)(a,t,u,i,l,h.default.Messages.COMMANDS_MATCHING,h.default.Messages.COMMANDS,o.commands===m.CommandMode.OLD_BUILT_INS?p.default.Command:p.default.NewCommand,(function(e){return{key:e.id,command:e,channel:n,guildId:n.guild_id,showImage:!0}}),(function(e){return""+v.COMMAND_SENTINEL+e}),"commands")},onSelect:function(e,t,n,r){var o=e.commands[t];return(0,d.hasAccess)(o)&&(r.commands===m.CommandMode.OLD_BUILT_INS?r.insertText(function(e){return""+v.COMMAND_SENTINEL+e.name}(o)):a.setActiveCommand(o)),{type:m.AutocompleteSelectionTypes.COMMAND}}};t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={},s={integration:"",query:""};var d=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getResults=function(e,t){if(null==e||null==t)return null;var n=u[e];return null!=n&&null!=n[t]?n[t]:null},a.getQuery=function(){return s},r}(r.default.Store))(a.default,{INTEGRATION_QUERY:function(e){var t=e.integration,n=e.query;u[t]=u[t]||{},u[t][n]={loading:!0,results:[]}},INTEGRATION_QUERY_SUCCESS:function(e){var t=e.integration,n=e.query,r=e.results;u[t][n]={loading:!1,results:r.map((function(e){return{type:o.ChannelTextAreaIntegrations[t].type,meta:e}}))},s={query:n,integration:t}},INTEGRATION_QUERY_FAILURE:function(e){var t=e.integration,n=e.query;delete u[t][n]}});t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LEGACY_COMMAND_REGEX=void 0;var r=d(n(9414)),a=n(8260),o=d(n(8291)),i=n(8346),l=n(8281),u=d(n(8850)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){return(f=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}).apply(this,arguments)}var c=/^(?:[A-Za-z]+(?!\.))?[!@#$%>?;+.=-]{1,3}/;t.LEGACY_COMMAND_REGEX=c;var p={results:{commands:[]}},v=f({},u.default,{sentinel:void 0,autoFocus:!1,matches:function(e,t,n,r,a){if(a.commands===l.CommandMode.DISABLED||a.commands===l.CommandMode.OLD_BUILT_INS||!r||n.length<2)return!1;var o=c.exec(n);return null!=o&&n.length>o[0].length},queryResults:function(e,t,n,o,i){var l=c.exec(n);if(null==l)return p;var s=u.default.queryResults(e,t,n.substring(l[0].length),o,i),d=s.results,f=s.metadata,v=d.commands.filter((function(e){return e.type===a.ApplicationCommandType.BOT}));return 0===v.length?p:(r.default.trackExposure({}),r.default.getCurrentConfig({}).showApplicationCommandSuggestions?{results:{commands:v},metadata:f}:p)},renderResults:function(e,t,n,r,a,u,d,f){var c=e.commands;return(0,i.renderAutocompleteGroup)(a,t,c,d,f,s.default.Messages.COMMANDS_MATCHING,s.default.Messages.COMMANDS,u.commands===l.CommandMode.OLD_BUILT_INS?o.default.Command:o.default.NewCommand,(function(e){return{key:e.id,command:e,channel:n,guildId:n.guild_id,showImage:!0}}),(function(e){return e}),"commands")},onSelect:function(e,t,n,r){var a=u.default.onSelect(e,t,n,r).metadata;return{type:l.AutocompleteSelectionTypes.COMMAND_SUGGESTION,metadata:a}}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{foreground:f,fill:d,d:"M20 10.9378H14.2199H8.06628L10.502 8.50202L9 7L4 12L9 17L10.502 15.498L8.06628 13.0622H20V10.9378Z"}))}d.displayName="ArrowLeft"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(133))&&r.__esModule?r:{default:r},i=n(1);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=(0,o.default)({ARROW_UP:null,ARROW_DOWN:null,ARROW_LEFT:null,ARROW_RIGHT:null});function d(e){switch(e){case i.KeyboardKeys.ARROW_DOWN:return s.ARROW_DOWN;case i.KeyboardKeys.ARROW_UP:return s.ARROW_UP;case i.KeyboardKeys.ARROW_LEFT:return s.ARROW_LEFT;case i.KeyboardKeys.ARROW_RIGHT:return s.ARROW_RIGHT;default:return null}}var f=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={focusedColumn:null,focusedRow:null},t.handleKeyDown=function(e){var n=t.props.onSelect;switch(e.keyCode){case i.KeyboardKeys.ARROW_DOWN:case i.KeyboardKeys.ARROW_UP:case i.KeyboardKeys.ARROW_LEFT:case i.KeyboardKeys.ARROW_RIGHT:e.preventDefault(),e.stopPropagation(),t.focusNext(d(e.keyCode));break;case i.KeyboardKeys.ENTER:e.preventDefault(),e.stopPropagation();var r=t.calculateFocusedItem();null!=r&&null!=n&&n(r)}},t.wrapPosition=function(e,n,r,a){var o=e.length,i=r*o+n,l=Math.max(i+a,0)%o,u=0;return a<0&&l>n&&(u=-1),a>0&&l<n&&(u=1),{column:l,row:(t.calculateClosest(e[n][r],e[l])||r)+u}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.componentDidMount=function(){document.addEventListener("keydown",this.handleKeyDown,!0)},a.componentWillUnmount=function(){document.removeEventListener("keydown",this.handleKeyDown,!0)},a.focusNext=function(e){var t=this,n=this.props,r=n.getItemGrid,a=n.onFocus,o=this.state,i=o.focusedColumn,l=o.focusedRow;if(null!=e){var u=r();if(null!=u){var s=this.getNext(u,i,l,e);this.setState({focusedColumn:s.column,focusedRow:s.row},(function(){var e=t.calculateFocusedItem();null!=e&&null!=a&&a(e)}))}}},a.getNext=function(e,t,n,r){var a,o,i,l;if(null==t||null==n)o=0,i=0,a={column:0,row:0};else switch(o=t,i=n,r){case s.ARROW_UP:a={column:o,row:Math.max(i-1,0)};break;case s.ARROW_DOWN:a={column:o,row:Math.min(i+1,e[o].length-1)};break;case s.ARROW_LEFT:a=this.wrapPosition(e,o,i,-1);break;case s.ARROW_RIGHT:a=this.wrapPosition(e,o,i,1)}return null!=a&&(l=e[a.column][a.row]),null!=l&&null!=a||(l=e[(a={column:o,row:i}).column][a.row]),{column:a.column,row:a.row,id:l}},a.calculateClosest=function(e,t){var n=this.props.getCoordsMap()[e];if(null!=n){for(var r,a=Number.MAX_SAFE_INTEGER,o=0;o<t.length;o++){var i=this.props.getCoordsMap()[t[o]];if(null!=i){var l=Math.abs(i.top-n.top);if(!(l<a))break;a=l,r=o}}return r}},a.calculateFocusedItem=function(){var e=this.props.getItemGrid,t=this.state,n=t.focusedRow,r=t.focusedColumn,a=e();return null==a||null==r||null==n||null==a[r]||null==a[r][n]?null:a[r][n]},a.render=function(){return this.props.children},r}(a.Component);t.default=f,f.displayName="MasonryKeyboardNavigationWrapper"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"MasonryListScrollerRef",{enumerable:!0,get:function(){return o.MasonryListScrollerRef}}),Object.defineProperty(t,"RenderSection",{enumerable:!0,get:function(){return o.RenderSection}}),Object.defineProperty(t,"RenderItem",{enumerable:!0,get:function(){return o.RenderItem}}),Object.defineProperty(t,"MasonryListScrollerProps",{enumerable:!0,get:function(){return o.MasonryListScrollerProps}}),Object.defineProperty(t,"MasonryListGetItemKey",{enumerable:!0,get:function(){return o.MasonryListGetItemKey}}),Object.defineProperty(t,"MasonryListUnitCoords",{enumerable:!0,get:function(){return o.MasonryListUnitCoords}}),Object.defineProperty(t,"MasonryListCoordsMap",{enumerable:!0,get:function(){return o.MasonryListCoordsMap}}),Object.defineProperty(t,"MasonryListGrid",{enumerable:!0,get:function(){return o.MasonryListGrid}}),t.default=t.MasonryListAuto=t.MasonryListThin=void 0;var r,a=n(741),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(9421)),i=(r=n(381))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var u=(0,o.default)(i.default.thin,i.default.fade,ResizeObserver||a.ResizeObserver);t.MasonryListThin=u;var s=(0,o.default)(i.default.auto,i.default.fade,ResizeObserver||a.ResizeObserver);t.MasonryListAuto=s;var d=u;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,n){var r=Math.max(Math.floor(e/t),1);return Math.min(r,n)}var d=(0,((r=n(8299))&&r.__esModule?r:{default:r}).default)((o=a=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={columns:s(t.props.width,t.props.desiredItemWidth,t.props.maxColumns)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),r.getDerivedStateFromProps=function(e,t){var n=s(e.width,e.desiredItemWidth,e.maxColumns);return n!==t.columns?{columns:n}:null},r.prototype.render=function(){var e=this.props,t=e.width,n=e.height;return(0,e.children)(this.state.columns,t,n)},r}(i.Component),a.defaultProps={desiredItemWidth:200},o));t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GIFPickerSearchItem=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=I(n(8)),l=I(n(10340)),u=I(n(3)),s=n(8507),d=I(n(8854)),f=I(n(8624)),c=I(n(8858)),p=I(n(8438)),v=I(n(29)),y=I(n(61)),m=I(n(8623)),_=I(n(8855)),h=I(n(272)),E=I(n(8856)),g=n(1),S=I(n(6)),O=I(n(7501));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}var A=[g.Colors.PREMIUM_TIER_1_PURPLE,g.Colors.PREMIUM_TIER_1_BLUE,"#929AFA"],P=Array.from({length:16}).map((function(e,t){return{id:""+t,height:Math.floor(100*Math.random())+120}}));function R(e){return e.id||e.src}function L(e,t){var n=P[t];return null==n?0:n.height}function D(e,t,n,r){if(!(e>0))return null==P[t]?null:M("div",{className:O.default.placeholder,style:N({animationDelay:75*t+"ms"},n)},r)}function w(e,t){var n;return e>0?"":(null===(n=P[t])||void 0===n?void 0:n.id)||""}function j(e){return e===g.GIFResultFormat.VIDEO}D.displayName="renderLoadingItem";var k=function(e){var t=e.className,n=e.isFavorite,r=e.item;return M(c.default,{className:t,isFavorite:n,onClick:function(e){var t=r.width,n=r.height,a=r.src,o=r.url,i=r.format;e?(0,s.removeFavoriteGIF)(o):(0,s.addFavoriteGIF)({width:t,height:n,src:a,url:o,format:i})}})};k.displayName="ConnectedGIFFavButtonInner";var U=u.default.connectStores([p.default],(function(e){var t=e.item.url;return{isFavorite:p.default.getIsFavorite(t)}}))(k),G=new l.default((function(){var e=document.createElement("video");return e.className=O.default.gif,e.autoplay=!0,e.loop=!0,e.muted=!0,e.preload="auto",e.controls=!1,e}),(function(e){e.src="",e.oncanplay=null;var t=e.parentNode;null!=t&&t.removeChild(e)})),F=new l.default((function(){return document.createElement("img")}),(function(e){e.onload=null,e.src=""})),B=function(e){function t(t){var n;(n=e.call(this,t)||this).ref=null,n._video=null,n._image=null,n._mounted=!0,n.handleCanPlay=function(){n._mounted&&n.setState({loaded:!0})},n.handleClick=function(){var e=n.props,t=e.onClick,r=e.item,a=e.index;null!=t&&t(r,a)};var r=n.props,a=r.format,o=r.color;return n.state={color:null==o?i.default.sample(A):o,loaded:!1},j(a)||(n._image=F.getElement(),n._image.onload=function(){return n.setState({loaded:!0})},n._image.src=t.src),n}C(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.format,n=e.src,r=e.coords,a=r.width,o=r.height,i=this.ref;if(t===g.GIFResultFormat.VIDEO&&null!=i){var l=G.getElement();l.oncanplay=this.handleCanPlay,l.src=n,l.width=a,l.height=o,i.appendChild(l),this._video=l}},n.componentDidUpdate=function(e){var t=this.props.coords,n=t.width,r=t.height;null==this._video||e.coords.width===n&&e.coords.height===r||(this._video.width=n,this._video.height=r)},n.componentWillUnmount=function(){this._mounted=!1;var e=this._image,t=this._video;null!=e&&(this._image=null,F.poolElement(e)),null!=t&&(this._video=null,G.poolElement(t))},n.renderGIF=function(){var e=this.props,t=e.src,n=e.coords,r=n.width,a=n.height;return this.state.loaded?M("img",{src:t,width:r,height:a,className:O.default.gif,alt:""}):null},n.render=function(){var e,t=this,n=this.props,r=n.item,a=n.renderExtras,i=n.format,l=n.coords,u=n.focused,s=this.state,d=s.color,f=s.loaded;return M(y.default,{tabIndex:-1,innerRef:function(e){t.ref=e},className:(0,o.default)(O.default.result,(e={},e[O.default.focused]=u,e)),onClick:this.handleClick,style:N({backgroundColor:f?void 0:d},l)},void 0,j(i)?null:this.renderGIF(),null!=a?a(r):null)},t}(a.PureComponent);t.GIFPickerSearchItem=B,B.displayName="GIFPickerSearchItem";var H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._masonryRef=a.createRef(),t.prevResultQuery=null,t.state={focusedId:null},t.handleFocus=function(e){var n=t._masonryRef.current;if(null!=n){var r=n.getCoordsMap()[e];null!=r&&(n.scrollIntoViewRect({start:r.top-10,end:r.top+r.height+10}),t.setState({focusedId:e}))}},t.handleSelect=function(e){var n,r=t.props.data,a=r.findIndex((function(t){return R(t)===e}));-1!==a&&(n=r[a]),null!=n&&t.selectItem(n,a)},t.handleClickItem=function(e,n){t.selectItem(e,n)},t.handleScroll=function(){var e=t.props.resultQuery,n=t._masonryRef.current;if(null!=n){var r=n.getScrollerState(),a=r.scrollTop;r.scrollHeight-a<=1220&&(e!==t.prevResultQuery&&(0,s.fetchSuggestions)(e),t.prevResultQuery=e)}},t.renderItem=function(e,n,r,a){if(e>0)return null;var o=t.state.focusedId,i=t.props.data[n];return null==i?null:M(B,{item:i,index:n,format:i.format,src:i.src,coords:r,onClick:t.handleClickItem,renderExtras:function(){return M(U,{className:O.default.favButton,item:i})},focused:R(i)===o},a)},t.getItemHeight=function(e,n,r){if(e>0)return 0;var a=t.props.data[n];return null==a?0:r*(a.height/a.width)},t.getItemKey=function(e,n){if(e>0)return null;var r=t.props.data[n];return null!=r?r.id||r.src:null},t.renderSection=function(e,n,r){var o=t.props,i=o.onSelectSuggestion,l=o.suggestions;return 1===e?M("div",{className:O.default.endContainer,style:n},r,l.length>0?M(a.Fragment,{},void 0,M("div",{className:O.default.endText},void 0,S.default.Messages.GIF_PICKER_RELATED_SEARCH),M("div",{className:O.default.searchSuggestions},void 0,l.map((function(e){return M(v.default,{look:v.default.Looks.OUTLINED,color:v.default.Colors.PRIMARY,size:v.default.Sizes.SMALL,className:O.default.searchSuggestion,onClick:function(){i(e)}},e,e)})))):null):null},t.renderContent=function(e,n,r){var o=t.props,i=o.data,l=o.resultQuery,u=o.query,s=o.resultType;return 0!==i.length||l===u&&s!==g.GIFPickerResultTypes.TRENDING_GIFS?a.createElement(_.default,{key:l+"-"+(s||""),ref:t._masonryRef,fade:!0,itemGutter:12,className:O.default.results,columns:e,sections:[i.length,0],getItemKey:t.getItemKey,getItemHeight:t.getItemHeight,renderItem:t.renderItem,getSectionHeight:t.getSectionHeight,renderSection:t.renderSection,onScroll:t.handleScroll,chunkSize:128}):M(_.default,{fade:!0,className:O.default.results,sections:[P.length],columns:e,itemGutter:12,getItemKey:w,getItemHeight:L,renderItem:D,chunkSize:128},l)},t.getItemGrid=function(){var e=t._masonryRef.current;return null!=e?e.getItemGrid():[]},t.getCoordsMap=function(){var e=t._masonryRef.current;return null!=e?e.getCoordsMap():{}},t}C(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.resultType,n=e.data;t===g.GIFPickerResultTypes.FAVORITES&&((0,s.trackSearchStart)(g.GIFPickerResultTypes.FAVORITES),(0,s.trackSearchResultViewed)(n,g.GIFPickerResultTypes.FAVORITES,{limit:null}))},n.componentWillUnmount=function(){G.clearPool(),F.clearPool()},n.selectItem=function(e,t){var n=this.props,r=n.onSelectGIF,a=n.resultType,o=n.data,i=n.resultQuery;null!=r&&r(e),(0,s.trackSelectGIF)({type:a,index:t,offset:this.props.searchOffset,limit:this.props.searchLimit,results:o,totalResults:this.props.searchTotalResults,query:i,gifId:e.id})},n.getSectionHeight=function(e){return 1===e?220:0},n.renderEmptyFavorite=function(e,t){return void 0===t&&(t=!1),M("div",{className:O.default.emptyHint},void 0,null!=e?M("div",{className:O.default.emptyHintCard},void 0,t?M(m.default,{className:O.default.emptyHintFavorite}):null,M("div",{className:O.default.emptyHintText},void 0,e)):M("div",{className:O.default.emptyHintSpacer}))},n.renderEmptyFavorites=function(){var e=this;return M(h.default,{className:O.default.results,fade:!0},void 0,M("div",{className:O.default.emptyHints},void 0,this.renderEmptyFavorite(S.default.Messages.NO_GIF_FAVORITES_HOW_TO_FAVORITE,!0),this.renderEmptyFavorite(S.default.Messages.NO_GIF_FAVORITES_WHERE_TO_FAVORITE),this.renderEmptyFavorite(S.default.Messages.NO_GIF_FAVORITES_GO_FAVORITE),Array.from({length:15}).map((function(t,n){return M(a.Fragment,{},n,e.renderEmptyFavorite())})),this.renderEmptyFavorite(S.default.Messages.NO_GIF_FAVORITES_FLAVOR_FAVORITE_PLEASE),Array.from({length:16}).map((function(t,n){return M(a.Fragment,{},n,e.renderEmptyFavorite())})),this.renderEmptyFavorite(S.default.Messages.NO_GIF_FAVORITES_FLAVOR_STILL_HERE)))},n.render=function(){var e=this.props,t=e.data,n=e.resultQuery,r=e.query,a=e.resultType;return 0===t.length&&n===r&&a!==g.GIFPickerResultTypes.TRENDING_GIFS?a===g.GIFPickerResultTypes.FAVORITES?this.renderEmptyFavorites():M(f.default,{message:S.default.Messages.NO_GIF_SEARCH_RESULTS,className:O.default.noResults}):M(d.default,{getItemGrid:this.getItemGrid,getCoordsMap:this.getCoordsMap,onFocus:this.handleFocus,onSelect:this.handleSelect},n,M(E.default,{desiredItemWidth:200,maxColumns:8},void 0,this.renderContent))},t}(a.PureComponent);H.displayName="GIFPickerSearchResults";var x=H;t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(61)),l=c(n(149)),u=c(n(9423)),s=c(n(8623)),d=c(n(6)),f=c(n(7500));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={showPulse:!1},t.showPulse=function(){t.setState({showPulse:!0}),t._timeout=setTimeout((function(){t.setState({showPulse:!1})}),500)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.componentWillUnmount=function(){clearTimeout(this._timeout)},a.render=function(){var e=this,t=this.props,n=t.className,r=t.size,a=t.isFavorite,c=t.onClick,p=this.state.showPulse,y=a?d.default.Messages.GIF_TOOLTIP_REMOVE_FROM_FAVORITES:d.default.Messages.GIF_TOOLTIP_ADD_TO_FAVORITES,m=a?s.default:u.default;return v(l.default,{text:y},void 0,(function(t){var l,u=t.onMouseEnter,s=t.onMouseLeave;return v(i.default,{tabIndex:-1,className:(0,o.default)(n,r,f.default.gifFavoriteButton,(l={},l[f.default.selected]=a,l[f.default.showPulse]=p,l)),onMouseDown:function(e){return e.preventDefault()},onClick:function(t){t.preventDefault(),t.stopPropagation(),e.showPulse(),c(a)},onDoubleClick:function(e){return e.preventDefault()},onMouseEnter:u,onMouseLeave:s},void 0,v(m,{className:f.default.icon}))}))},r}(a.PureComponent);m.displayName="GIFFavButton",m.defaultProps={size:f.default.size};var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Y;var r,a=D(n(0)),o=R(n(9)),i=R(n(8)),l=n(3),u=R(n(8512)),s=R(n(302)),d=n(260),f=R(n(8559)),c=R(n(712)),p=R(n(163)),v=D(n(86)),y=R(n(181)),m=R(n(12)),_=R(n(365)),h=R(n(375)),E=R(n(149)),g=R(n(1240)),S=R(n(8276)),O=R(n(291)),I=R(n(5955)),T=R(n(24)),C=R(n(8393)),b=n(139),M=n(1),N=R(n(6)),A=R(n(7367)),P=R(n(7505));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(){return(w=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}).apply(this,arguments)}function j(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var G=(0,b.cssValueToNumber)(P.default.iconSize);function F(e,t,n){return 0===t.length?null:U("div",{className:P.default.row},void 0,U(e,{className:P.default.activityIcon}),U(C.default,{guildId:n,users:t,max:6}))}F.displayName="makeRow";var B=U(g.default,{width:16,height:16});function H(e,t,n){return 0===t.length?null:U("div",{className:P.default.row},void 0,U(O.default,{className:P.default.activityIcon}),U(C.default,{guildId:e,users:t,max:3}),U("div",{className:P.default.stageListenerPill},void 0,B,U(T.default,{className:P.default.stageListenerCount,color:T.default.Colors.STANDARD,size:T.default.Sizes.SIZE_12},void 0,n)))}function x(e){var t=e.muteConfig,n=e.className;return null==t?null:null==t.end_time?U(T.default,{size:T.default.Sizes.SIZE_12,color:T.default.Colors.MUTED,className:n},void 0,N.default.Messages.FORM_LABEL_MUTED):U(u.default,{muteConfig:t,className:n})}function V(e){var t,n=e.guild,r=n.id,u=(0,l.useStateFromStoresArray)([v.default],(function(){return v.default.getChannels(r)[v.GUILD_VOCAL_CHANNELS_KEY].filter((function(e){return e.channel.type===M.ChannelTypes.GUILD_VOICE})).map((function(e){return e.channel.id}))}),[r]),c=(0,f.default)(r),h=a.useMemo((function(){return c.map((function(e){return e.id}))}),[c]),E=(0,l.useStateFromStores)([_.default],(function(){return _.default.getVoiceStates(r)}),[r]),g=i.default.flatMap(u,(function(e){var t;return e===n.afkChannelId?[]:(null!==(t=E[e])&&void 0!==t?t:[]).map((function(e){return e.user}))})),O=(0,l.useStateFromStoresArray)([s.default],(function(){return i.default.flatMap(h,(function(e){return e===n.afkChannelId?[]:s.default.getMutableParticipants(e,d.StageChannelParticipantNamedIndex.SPEAKER).map((function(e){return e.user}))}))})),T=(0,l.useStateFromStores)([s.default],(function(){for(var e,t=0,n=j(h);!(e=n()).done;){var r=e.value;t+=s.default.getParticipantCount(r,d.StageChannelParticipantNamedIndex.AUDIENCE)}return t})),C=(0,l.useStateFromStoresArray)([p.default],(function(){return p.default.getAllApplicationStreams().filter((function(e){return e.guildId===r})).map((function(e){return e.ownerId}))}),[r]),b=(0,l.useStateFromStoresArray)([m.default],(function(){return C.map((function(e){return m.default.getUser(e)}))}),[C]),N=F(S.default,g.filter((function(e){return!C.includes(e.id)})),r),A=H(r,O,T),R=F(I.default,b,r),L=(0,l.useStateFromStoresObject)([y.default],(function(){return{isMuted:y.default.isMuted(r),muteConfig:y.default.getMuteConfig(r)}}),[r]),D=L.isMuted,w=L.muteConfig,k=null!=N||null!=R;return a.createElement(a.Fragment,null,A,N,R,D?U(x,{muteConfig:w,className:(0,o.default)(P.default.muteText,(t={},t[P.default.muteTextWithActivity]=k,t))}):null)}function W(e){var t,n=e.guild,r=e.includeActivity,i=void 0===r||r?U(V,{guild:n}):null,u=(0,l.useStateFromStores)([c.default],(function(){return c.default.isViewingRoles(n.id)}));return a.createElement(a.Fragment,null,U("div",{className:(0,o.default)(P.default.row,P.default.rowGuildName)},void 0,U(h.default,{guild:n,size:G,className:P.default.rowIcon}),U("span",{className:(0,o.default)(P.default.guildNameText,(t={},t[P.default.guildNameTextLimitedSize]=null!=i,t))},void 0,n.toString())),u?U(T.default,{className:P.default.viewAsRolesWarning,color:T.default.Colors.STANDARD,size:T.default.Sizes.SIZE_12},void 0,N.default.Messages.VIEW_AS_ROLES_MENTIONS_WARNING):i)}function Y(e){var t=e.guild,n=e.disabled,r=void 0!==n&&n,o=e["aria-label"],i=void 0!==o&&o,l=e.children,u=e.includeActivity;return U(E.default,{hideOnClick:!0,spacing:20,position:E.default.Positions.RIGHT,text:r?null:U(W,{guild:t,includeActivity:u}),"aria-label":i,tooltipClassName:A.default.listItemTooltip},void 0,(function(e){var t=e.onFocus,n=e.onBlur,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onFocus","onBlur"]);return U("div",{onFocus:t,onBlur:n},void 0,a.cloneElement(a.Children.only(l),w({},r)))}))}H.displayName="makeStageRow",Y.displayName="GuildTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=m(n(9425)),o=m(n(9426)),i=m(n(9427)),l=m(n(1224)),u=m(n(9428)),s=m(n(9429)),d=m(n(9430)),f=m(n(9431)),c=m(n(9432)),p=m(n(5686)),v=m(n(8625)),y=n(1168);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}var h=r.memo((function(e){var t=e.categoryId,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["categoryId"]),m=function(e){switch(e){case y.EmojiCategories.RECENT:return l.default;case y.EmojiCategories.FAVORITES:return v.default;case y.EmojiCategories.PEOPLE:return d.default;case y.EmojiCategories.NATURE:return u.default;case y.EmojiCategories.FOOD:return i.default;case y.EmojiCategories.ACTIVITY:return a.default;case y.EmojiCategories.TRAVEL:return c.default;case y.EmojiCategories.OBJECTS:return s.default;case y.EmojiCategories.SYMBOLS:return f.default;case y.EmojiCategories.FLAGS:return o.default;case y.EmojiCategories.PREMIUM_UPSELL:return p.default}}(t);return null==m?null:r.createElement(m,n)}));t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCategorySelectHandler=t.useEmojiSelectHandler=t.useEmojiGrid=t.EmojiGridRowTypes=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(8)),i=E(n(98)),l=n(3),u=E(n(8511)),s=E(n(185)),d=E(n(249)),f=E(n(86)),c=E(n(15)),p=E(n(361)),v=E(n(261)),y=n(1168),m=n(8347),_=n(5949),h=n(1);function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(){return(I=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}).apply(this,arguments)}t.EmojiGridRowTypes=r,function(e){e[e.SECTION_HEADING=0]="SECTION_HEADING",e[e.SECTION_ROW=1]="SECTION_ROW"}(r||(t.EmojiGridRowTypes=r={}));t.useEmojiGrid=function(e){var t=e.channel,n=e.collapsedSections,r=e.pickerIntention,u=e.emojiSearchResults,m=e.gridWidth,E=e.gridPaddingTop,g=e.emojiRowHeight,O=e.emojiSectionHeadingHeight,T=e.emojiPaddingHorizontal,C=e.emojiSpriteSize,b=(0,l.useStateFromStores)([d.default],(function(){return d.default.categories})),M=(0,l.useStateFromStores)([c.default],(function(){return c.default.getGuild(null==t?void 0:t.getGuildId())}),[t]),N=(0,l.useStateFromStoresArray)([d.default],(function(){var e=d.default.getDisambiguatedEmojiContext(null==t?null:t.getGuildId());return[e,e.favoriteEmojis]}),[t]),A=N[0],P=N[1],R=(0,l.useStateFromStores)([p.default],(function(){return p.default.getFlattenedGuilds()}),[]);return a.useMemo((function(){var e=[],a=[],l=[],d=[],p=0,N=0;return null!=A&&null!=m&&function(){var L=Math.floor(m/(C+2*T)),D=function(i,u){for(var s=new Map,f=n.has(u.sectionId),c=o.default.partition(i,(function(e){var n=v.default.isEmojiDisabled(e,t,r);return s.set(e,n),!n})),y=c[0],m=c[1],_=y.concat(m),h=Math.ceil(_.length/L),S=[],T=0;T<h;T++){var b=T*L,M=_.slice(b,b+L).map((function(e,t){return{emoji:e,size:C,isDisabled:s.get(e),rowIndex:N,columnIndex:t,visibleRowIndex:p}}));S.push(M),f||(d.push(M.length),l.push(M),p++),N++}var A=f?0:h,P=0===e.length?0:(p-A)*g,R=a.length*O+P+2*E,D=I({},u,{count:i.length,offsetTop:R});a.push(D),e.push(A)};if(null!=u)0!==u.unlocked.length&&D(u.unlocked,{type:y.EmojiCategoryTypes.SEARCH_RESULTS,sectionId:y.EmojiCategoryTypes.SEARCH_RESULTS}),0!==u.locked.length&&D(u.locked,{type:y.EmojiCategoryTypes.PREMIUM_UPSELL,categoryId:y.EmojiCategories.PREMIUM_UPSELL,sectionId:y.EmojiCategoryTypes.PREMIUM_UPSELL});else for(var w,j=function(){var e=w.value;if(e===y.EmojiCategories.CUSTOM){var n=A.getCustomEmoji(),a=o.default.groupBy(n,"guildId"),l=function(n){var o=a[n];if(null!=o){var l=o.filter((function(e){return v.default.getEmojiUnavailableReason({emoji:e,channel:null!=t?t:f.default.getDefaultChannel(n),intention:r})!==h.EmojiDisabledReasons.DISALLOW_EXTERNAL}));if(0!==l.length){var u=c.default.getGuild(n);D(l,{categoryId:e,guild:u,type:y.EmojiCategoryTypes.GUILD,sectionId:null!=u?u.id:i.default.v4()})}}};if(null!=M&&l(M.id),(0,_.allowExternalEmojiForIntention)(r))for(var u,d=S(R);!(u=d()).done;){var p=u.value;null!=M&&M.id===p.id||l(p.id)}}else if(e===y.EmojiCategories.RECENT){var m=A.getFrequentlyUsedEmojis().filter((function(e){return!v.default.isEmojiFiltered(e,t,r)}));D(m,{categoryId:e,type:y.EmojiCategoryTypes.RECENT,sectionId:y.EmojiCategoryTypes.RECENT})}else if(e===y.EmojiCategories.FAVORITES){var E=P.filter((function(e){return!v.default.isEmojiFiltered(e,t,r)}));0!==E.length&&D(E,{categoryId:e,type:y.EmojiCategoryTypes.FAVORITES,sectionId:y.EmojiCategoryTypes.FAVORITES})}else{var g=s.default.getByCategory(e);D(null==g?[]:g,{categoryId:e,type:y.EmojiCategoryTypes.UNICODE,sectionId:e})}},k=S(b);!(w=k()).done;)j()}(),{columnCounts:d,emojiGrid:l,rowCountBySection:e,sectionDescriptors:a}}),[A,P,m,C,T,u,n,g,O,E,t,r,b,M,R])};t.useEmojiSelectHandler=function(e){var t=e.pickerIntention,n=e.selectedChannel,r=e.onSelectEmoji,o=e.setIsPremiumUpsellOpen,i=e.emojiSelectAnalytics,s=e.trackPremiumUpsellOpened,f=(0,l.useStateFromStores)([d.default],(function(){return d.default.getDisambiguatedEmojiContext(null==n?void 0:n.getGuildId())}),[n]);return a.useCallback((function(e,a){var l=e.emoji;if(null!=l){var d=v.default.getEmojiUnavailableReason({emoji:l,channel:n,intention:t});if(null==i||i(),a.toggleFavorite&&null==d)f.isFavoriteEmoji(l)?u.default.unfavoriteEmoji(l):u.default.favoriteEmoji(l);else if(d!==h.EmojiDisabledReasons.GUILD_SUBSCRIPTION_UNAVAILABLE)return d===h.EmojiDisabledReasons.PREMIUM_LOCKED?(null==s||s(l,n),void o(!0)):void r(l,a.isFinalSelection)}}),[n,t,r,o,f,i,s])};t.useCategorySelectHandler=function(e){var t=e.emojiListRef,n=(0,m.useEmojiPickerStore)((function(e){return e.searchQuery})),r=a.useCallback((function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.scrollToSectionTop(e)}),[t]);return a.useCallback((function(e){""!==n?((0,m.setSearchQuery)(""),(0,m.setActiveCategoryIndex)(e)):r(e)}),[r,n])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=s(n(8625)),i=s(n(24)),l=s(n(6)),u=s(n(7509));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.className,n=e.graphicPrimary,r=e.graphicSecondary,s=e.titlePrimary,d=e.titleSecondary,c=e.isFavorite,p=void 0!==c&&c;return f("div",{className:(0,a.default)(u.default.inspector,t)},void 0,f("div",{className:u.default.graphicPrimary,"aria-hidden":!0},void 0,n),f("div",{className:u.default.textWrapper},void 0,f(i.default,{className:u.default.titlePrimary,size:i.default.Sizes.SIZE_16},void 0,p?f(o.default,{"aria-label":p?l.default.Messages.EMOJI_IS_FAVORITE_ARIA_LABEL.format({names:s}):void 0,width:15,height:15,className:u.default.favorite}):null,s),null!=d&&f(i.default,{className:u.default.titleSecondary,size:i.default.Sizes.SIZE_12},void 0,d)),null!=r&&f("div",{className:u.default.graphicSecondary,"aria-hidden":!0},void 0,r))};c.displayName="ExpressionPickerInspector";var p=c;t.default=p},function(e,t,n){e.exports=n.p+"4c931151fd94ebc6aa6034427624b2ea.png"},function(e,t,n){e.exports=n.p+"059e1038a6af4a46d3664e70f5259c52.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M2 4.42007V6.79007L3 7.79007L4 6.79007V4.42007L3.01 3.42007L2 4.42007Z"}),f=s("path",{d:"M3 0.590088L0 3.59009V7.59009L3 10.5901L6 7.59009V3.59009L3 0.590088ZM5 7.21009L3 9.21009L1 7.21009V4.00009L3 2.00009L5 4.00009V7.21009Z"});function c(e){var t=e.width,n=void 0===t?6:t,r=e.height,a=void 0===r?11:r,l=e.color,c=void 0===l?"currentColor":l,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(v),{width:n,height:a,viewBox:"0 0 6 11"}),s("g",{fill:c,fillRule:"evenodd",className:p},void 0,d,f))}c.displayName="PremiumGuildTier2Simple"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=n(8),l=n(1250),u=m(n(61)),s=n(1172),d=n(366),f=n(290),c=m(n(5936)),p=m(n(8867)),v=m(n(6)),y=m(n(7521));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=(0,l.cssValueToNumber)(y.default.stickerPickerPreviewDimensions),S=(0,l.cssValueToNumber)(y.default.stickerPickerPreviewPadding),O=E(p.default,{size:20}),I=a.memo((function(e){var t=e.isDisplayingIndividualStickers,n=void 0!==t&&t,r=e.preferAnimation,l=void 0===r||r,p=e.getStickerItemProps,m=e.getStickerRowProps,_=e.gutterWidth,I=e.inspectedStickerPosition,T=e.isScrolling,C=e.isUsingKeyboardNavigation,b=e.onInspect,M=e.onSelect,N=e.rowIndex,A=e.stickerClassName,P=e.stickerDescriptors,R=e.stickerPadding,L=void 0===R?S:R,D=e.stickerSize,w=void 0===D?g:D,j=e.ownedStickerPacks,k=e.enlargeOnInteraction,U=void 0!==k&&k,G=e.channel,F=e.currentUser,B=e.checkSendability,H=void 0===B||B,x=w+2*L,V=a.useMemo((function(){return{gridColumnGap:_,gridTemplateColumns:"repeat(auto-fill, "+x+"px)",height:x,paddingRight:n?void 0:x}}),[n,_,x]),W=a.useMemo((function(){return{width:w,height:w,padding:L}}),[L,w]);return a.createElement("div",h({className:y.default.row,style:V},null==m?void 0:m(N)),P.map((function(e){var t,r=e.visibleRowIndex===(null==I?void 0:I.rowIndex)&&e.columnIndex===(null==I?void 0:I.columnIndex),m=e.type===d.StickerGridItemTypes.STICKER&&U&&r,_=function(t){!0!==(null==T?void 0:T.current)&&!0!==(null==C?void 0:C.current)&&(null==M||M(e,t))},g=(0,i.throttle)((function(){!0===(null==T?void 0:T.current)||!0===(null==C?void 0:C.current)||r||null==b||b(e)}),250),S=null!==(t=null==p?void 0:p(N,e.columnIndex))&&void 0!==t?t:{},P=S.ref,R=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(S,["ref"]);switch(e.type){case d.StickerGridItemTypes.STICKER:var L,D,k,B=n&&null!=j&&(0,f.isStandardSticker)(e.sticker)&&!j.has(e.sticker.pack_id);return a.createElement(u.default,h({},R,{key:e.sticker.id,"aria-label":e.sticker.name,className:(0,o.default)(y.default.sticker,A,(L={},L[y.default.stickerInspected]=r,L)),innerRef:P,onFocus:null!==(D=null==R?void 0:R.onFocus)&&void 0!==D?D:g,onMouseMove:g,onClick:_,style:W}),!U&&E("div",{className:y.default.inspectedIndicator}),E(c.default,{className:(0,o.default)(y.default.stickerNode,(k={},k[y.default.stickerNodeDimmed]=U&&!r&&null!=I&&-1!==I.rowIndex&&-1!==I.columnIndex,k[y.default.stickerNodeHidden]=m,k[y.default.stickerUnsendable]=H&&!(0,s.isSendableSticker)(e.sticker,F,G),k)),disableAnimation:!r&&!l,enlargeOnInteraction:U,isInteracting:r,maskAsset:r,sticker:e.sticker,size:w}),B?O:null);case d.StickerGridItemTypes.VIEW_ALL:var x,V;return a.createElement(u.default,h({},R,{key:"view-all",className:(0,o.default)(y.default.viewAll,A,(x={},x[y.default.viewAllInspected]=r,x)),innerRef:P,onFocus:null!==(V=null==R?void 0:R.onFocus)&&void 0!==V?V:g,onMouseOver:g,onClick:_,style:W}),E("div",{className:y.default.viewAllButton},void 0,v.default.Messages.STICKER_PICKER_VIEW_ALL))}})))}));t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(1221)),o=i(n(7520));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(e){var t=e.size;return u("div",{className:o.default.unownedStickerLockContainer,style:{width:t,height:t}},void 0,u(a.default,{width:12,height:12,className:o.default.unownedStickerLockIcon}))};s.displayName="StickerLock";var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(29)),o=d(n(5828)),i=d(n(5686)),l=n(8626),u=d(n(6)),s=d(n(7525));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.analyticsSection;return c(o.default,{className:s.default.premiumButton,innerClassName:s.default.premiumButtonInner,color:a.default.Colors.GREEN,size:a.default.Sizes.SMALL,onClick:function(){return(0,l.openStickerPackPremiumUpsellModal)({section:t})}},void 0,c(i.default,{className:s.default.premiumButtonNitroWheel}),u.default.Messages.STICKER_PICKER_PREMIUM_EMPTY_STATE_CTA)}p.displayName="StickersPremiumUpsellButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.useStateFromStores)([a.default],(function(){return o.default.canUseIncreasedMessageLength(a.default.getCurrentUser())}))?i.MAX_MESSAGE_LENGTH_PREMIUM:i.MAX_MESSAGE_LENGTH};var r=n(3),a=l(n(12)),o=l(n(96)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.installLegacy=function(){return s.default.ensureModule("discord_spellcheck").then((function(){var e=s.default.requireModule("discord_spellcheck"),t=e.getLegacySpellchecker?e.getLegacySpellchecker():e.Spellchecker,n=t instanceof Function?new t:t,r=new _(n);return function(e){null!=document.body&&document.body.addEventListener("input",(function(t){var n=function(e){if(null==e)return null;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.value;if(e instanceof HTMLElement&&e.hasAttribute("contenteditable"))return e.textContent}(t.target);null!=n&&e.detectLocale(n)}),!0)}(r),r}))},t.LegacySpellchecker=void 0;var r=n(8741),a=p(n(404)),o=p(n(118)),i=p(n(26)),l=n(48),u=p(n(16)),s=p(n(43)),d=p(n(8562)),f=p(n(8871)),c=p(n(8563));function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=new i.default("Spellchecker");function m(e){e=c.default[e]||e;var t=(0,r.parse)(e.replace(/[_-]/g,"-"));if(null!=t&&null!=t.langtag.language&&null!=t.langtag.region){var n=t.langtag,a=n.language,o=n.region;return a.language.toLowerCase()+"-"+o.toUpperCase()}y.error(e+" is not a valid locale.")}var _=function(){function e(e){var t=this;this._isMisspelledCache=new a.default({max:512,maxAge:4e3}),this._localeAvailable=!1,this._enabled=!0,this._learnedWords=new Set,this._spellchecker=e;var n=this.getAvailableLocales(),r=this.getAvailableLanguages(n);this._languageDetector=new d.default(n[0].split("-")[0],(function(e){var n=r[e]||c.default[e];null!=n&&t.setLocale(n)}))}var t,n,r,i=e.prototype;return i.reset=function(){var e=this;null!=this._locale&&(this._isMisspelledCache.reset(),o.default.spellCheck.setSpellCheckProvider(this._locale,!0,{spellCheck:function(t){return!e.isMisspelled(t)}}))},i.setLearnedWords=function(e){this._learnedWords=e,this.reset()},i.setLocale=function(e){e!==this._locale&&(this._locale=e,this._localeAvailable=this._spellchecker.setDictionary(e),y.info("Switching to "+e,this._localeAvailable?"(available)":"(unavailable)"),this.reset())},i.detectLocale=function(e){this.enabled&&this._languageDetector.process(e)},i.getAvailableLocales=function(){var e=s.default.requireModule("discord_spellcheck"),t=e.getKeyboardLayout?e.getKeyboardLayout():e.keyboardLayout;return(u.default.isOSX()?this._spellchecker.getAvailableDictionaries():t.getInstalledKeyboardLanguages()).map(m).filter(l.isNotNullish)},i.getAvailableLanguages=function(e){e=e||this.getAvailableLocales();var t={};return e.forEach((function(e){var n=e.split("-")[0];t[n]=t[n]||e})),t},i.isMisspelled=function(e,t){void 0===t&&(t=!1);var n=this._isMisspelledCache.get(e);return null!=n?n:!t&&(n=this._isMisspelled(e),this._isMisspelledCache.set(e,n),n)},i._isMisspelled=function(e){if(!this._enabled||!this._localeAvailable)return!1;if(1===e.length)return!1;var t=e.toLocaleLowerCase();return!this._learnedWords.has(t)&&!f.default.has(t)&&this._spellchecker.isMisspelled(e)},i.getCorrectionsForMisspelling=function(e,t){return void 0===t&&(t=!1),this.isMisspelled(e,t)&&this._spellchecker.getCorrectionsForMisspelling(e)||[]},i.setAppLocale=function(e){},i.replaceMisspelling=function(e){o.default.spellCheck.replaceMisspelling(e)},t=e,(n=[{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this.reset()}}])&&v(t.prototype,n),r&&v(t,r),e}();t.LegacySpellchecker=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=new Set(["ain't","aren't","can't","could've","couldn't","couldn't've","didn't","doesn't","don't","hadn't","hadn't've","hasn't","haven't","he'd","he'd've","he'll","he's","how'd","how'll","how's","I'd","I'd've","I'll","I'm","I've","isn't","it'd","it'd've","it'll","it's","let's","ma'am","mightn't","mightn't've","might've","mustn't","must've","needn't","not've","o'clock","shan't","she'd","she'd've","she'll","she's","should've","shouldn't","shouldn't've","that'll","that's","there'd","there'd've","there're","there's","they'd","they'd've","they'll","they're","they've","wasn't","we'd","we'd've","we'll","we're","we've","weren't","what'll","what're","what's","what've","when's","where'd","where's","where've","who'd","who'll","who're","who's","who've","why'll","why're","why's","won't","would've","wouldn't","wouldn't've","y'all","y'all'd've","you'd","you'd've","you'll","you're","you've"].map((function(e){return e.replace(/'.*/,"")})));t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.install=function(){return g.apply(this,arguments)},t.Spellchecker=void 0;var r,a=n(8741),o=f(n(118)),i=f(n(26)),l=f(n(39)),u=n(48),s=f(n(8562)),d=f(n(8563));function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=new i.default("Spellchecker"),m=(null===o.default||void 0===o.default||null===(r=o.default.spellCheck)||void 0===r?void 0:r.Spellchecker)||(null===o.default||void 0===o.default?void 0:o.default.spellCheck);function _(e){e=d.default[e]||e;var t=(0,a.parse)(e.replace(/[_-]/g,"-"));if(null!=t&&null!=t.langtag.language&&null!=t.langtag.region){var n=t.langtag,r=n.language,o=n.region;return r.language.toLowerCase()+"-"+o.toUpperCase()}y.error(e+" is not a valid locale.")}var h=function(){function e(e){var t=this;this._enabled=!0,this._misspelledWord="",this._corrections=[];var n=l.default.locale.split("-"),r=n[0],a=n[1];this._regionPreference=a;var o=this.getAvailableLanguages(e);this._languageDetector=new s.default(r,(function(n){var a=n+"-"+t._regionPreference;if(-1!==e.indexOf(a))t.setLocale(a);else{var i=o[n]||d.default[r];null!=i&&t.setLocale(i)}})),m.on("spellcheck-result",(function(e,n){t._misspelledWord=e||"",t._corrections=n||[]}))}var t,n,r,a=e.prototype;return a.setLearnedWords=function(e){m.setLearnedWords(e)},a.setLocale=function(e){m.setLocale(e).then((function(t){y.info("Switching to "+e,t?"(available)":"(unavailable)")}))},a.setAppLocale=function(e){this._regionPreference=e.split("-")[1]},a.detectLanguage=function(e){this.enabled&&this._languageDetector.process(e)},a.getAvailableLanguages=function(e){var t={};return e.forEach((function(e){var n=e.split("-")[0];t[n]=t[n]||e})),t},a.isMisspelled=function(e,t){return""!==this._misspelledWord&&e===this._misspelledWord},a.getCorrectionsForMisspelling=function(e,t){return this.isMisspelled(e,t)?this._corrections:[]},a.replaceMisspelling=function(e){m.replaceMisspelling(e)},t=e,(n=[{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e}}])&&v(t.prototype,n),r&&v(t,r),e}();function E(e){null!=document.body&&document.body.addEventListener("input",(function(t){var n=function(e){if(null==e)return null;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.value;if(e instanceof HTMLElement&&e.hasAttribute("contenteditable"))return e.textContent}(t.target);null!=n&&e.detectLanguage(n)}),!0)}function g(){return(g=p(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.getAvailableDictionaries();case 2:return t=e.sent,n=t.map(_).filter(u.isNotNullish),E(r=new h(n)),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.Spellchecker=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleSpellcheck=function(){a.default.dispatch({type:o.ActionTypes.SPELLCHECK_TOGGLE})},t.learnWord=function(e){a.default.dispatch({type:o.ActionTypes.SPELLCHECK_LEARN_WORD,word:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;c(n(0));var r,a=n(389),o=c(n(8253)),i=d(n(16)),l=d(n(8632)),u=d(n(8395)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.src,n=e.onSelect,r=(0,l.default)(t),d=(0,u.default)(t,null);return i.default.embedded?p(o.default,{navId:"image-context",onClose:a.closeContextMenu,"aria-label":s.default.Messages.IMAGE_ACTIONS_MENU_LABEL,onSelect:n},void 0,p(o.MenuGroup,{},void 0,r),p(o.MenuGroup,{},void 0,d)):null}v.displayName="NativeImageContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;f(n(0));var r,a=n(389),o=f(n(8253)),i=s(n(16)),l=s(n(8395)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.href,n=e.textContent,r=e.onSelect,s=(0,l.default)(t,n);return i.default.embedded?null==s?null:c(o.default,{navId:"image-context",onClose:a.closeContextMenu,"aria-label":u.default.Messages.IMAGE_ACTIONS_MENU_LABEL,onSelect:r},void 0,c(o.MenuGroup,{},void 0,s)):null}p.displayName="NativeLinkContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;c(n(0));var r,a=n(389),o=c(n(8253)),i=d(n(16)),l=d(n(43)),u=d(n(8471)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.text,n=e.onSelect,r=(0,u.default)(t);return i.default.embedded?p(o.default,{navId:"text-context",onClose:a.closeContextMenu,"aria-label":s.default.Messages.TEXT_ACTIONS_MENU_LABEL,onSelect:n},void 0,p(o.MenuGroup,{},void 0,r),p(o.MenuGroup,{},void 0,p(o.MenuItem,{id:"copy",label:s.default.Messages.COPY,action:function(){return l.default.copy(t)}}))):null}v.displayName="NativeTextContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationResults=function(e,t){var n={},r=e.options;if(null==r)return n;for(var a,o=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(r);!(a=o()).done;){var i=a.value,l=t[i.name];void 0!==l&&l.length>0&&(n[i.name]=d(i,l))}return n},t.validateOptionNameContent=function(e,t){var n,r=o.default.getActiveCommand(),a=null==r||null===(n=r.options)||void 0===n?void 0:n.find((function(t){return t.name===e}));if(null==a)return{success:!1};return d(a,t)},t.validateOptionContent=d;var r=n(8290),a=n(8434),o=u(n(8280)),i=u(n(9487)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=null!=t?(0,a.getString)({content:t},"content").trim():"";if(e.required&&""===n)return{success:!1,error:l.default.Messages.COMMAND_VALIDATION_REQUIRED_ERROR};if(null===t)return{success:!0};if(t.length>1&&(t=[{type:"text",text:n}]),0===t.length)return{success:!1,error:(0,r.getValidationErrorText)(e)};var o=i.default[e.type](t[0],e);return null==o.error&&(o.error=(0,r.getValidationErrorText)(e)),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCommandName=function(e,t){var n=e.value,o=n.document,i=n.selection,l=o.getFirstText();(0,r.default)(null!=l,"Failed to find first text");var u=""+s.COMMAND_SENTINEL+t.name+" ";if(l.text.startsWith(u))return;var f=o.getPath(l.key);(0,r.default)(null!=f,"Failed to find path for first text");var c=a.Point.create({key:l.key,path:f,offset:0}),p=c,v=o.data.get("commandName");null==v&&l.text.startsWith(""+s.COMMAND_SENTINEL+v+" ")?p=a.Point.create({key:l.key,path:f,offset:v.length+2}):(l.text.startsWith(s.COMMAND_SENTINEL)||d.LEGACY_COMMAND_REGEX.test(l.text))&&(p=i.end);var y=a.Range.create({anchor:c,focus:p});e.insertTextAtRange(y,u)},t.selectCommandOption=h,t.completeCurrentCommandOption=function(e){var t,n=i.default.getActiveCommand();if(null==n||n.type===l.ApplicationCommandType.BUILT_IN_INTEGRATION)return!1;var a=e.value,s=a.document,d=a.selection,c=f.getPreviousOptionNode(s,d.start.path);if(null==c||f.hasValueNodes(c))return!1;var p=c.data.get("name"),v=f.getOptionContent(s,p);(0,r.default)(null!=v,"Failed to find a content range for the current option");var y=(0,u.validateOptionNameContent)(p,v);if(o.updateOptionStates(((t={})[p]={lastValidationResult:y},t)),0===v.length)return!1;f.wrapOptionValueNodes(e,c);var m=f.getNextOptionNode(s,d.start.path,!0);null!=m?h(e,m.data.get("name")):g(e,!1);return!0},t.completeAllCommandOptions=function(e){var t=i.default.getActiveCommand();if(null==t||t.type===l.ApplicationCommandType.BUILT_IN_INTEGRATION)return!1;for(var n,r=e.value.document,a=f.getOptionNames(r),s={},d=m(a);!(n=d()).done;){var c=n.value,p=f.getOptionContent(r,c);if(null!=p){var v=(0,u.validateOptionNameContent)(c,p);if(s[c]={lastValidationResult:v},0!==p.length){var y=f.getOptionNode(r,c);null==y||f.hasValueNodes(y)||f.wrapOptionValueNodes(e,y)}}}o.updateOptionStates({validationResults:s})},t.unwrapPreviousCommandOption=function(e){var t=e.value,n=t.document,r=t.selection,a=n.getPreviousNode(r.anchor.path);if(null==a||!f.isOptionNode(a))return!1;if(f.hasValueNodes(a))return f.unwrapOptionValueNodes(e,a,!1),!0;return e.removeNodeByKey(a.key),!0},t.removeCurrentOptionValues=function(e){var t=e.value,n=t.document,a=t.selection,o=f.getPreviousOptionNode(n,a.focus.path);if(null==o||f.hasValueNodes(o))return!1;var i=n.getClosestBlock(o.key);(0,r.default)(null!=i,"Failed to find parent block for current option");var l=f.getRangeBetweenNodes({parent:i,startNode:o,endNode:f.getNextOptionNode(n,a.focus.path)});return(0,r.default)(null!=l,"Failed to find content range for current option"),e.deleteAtRange(l),!0},t.insertCommandOption=E,t.insertNextCommandOption=g,t.validateAllOptionContents=function(e){var t=i.default.getActiveCommand();if(null==(null==t?void 0:t.options))return{};for(var n,r={},a={},l=m(t.options);!(n=l()).done;){var s,d=n.value,f=(0,u.validateOptionNameContent)(d.name,null!==(s=e[d.name])&&void 0!==s?s:null);a[d.name]=f,r[d.name]={lastValidationResult:f}}return o.updateOptionStates(r),a},t.clear=function(e){var t=e.value.document,n=t.getFirstText(),o=t.getLastText();(0,r.default)(null!=n&&null!=o,"Failed to find any text nodes");var i=a.Range.create({anchor:a.Point.create({key:n.key,offset:0}),focus:a.Point.create({key:o.key,offset:o.text.length})});e.deleteAtRange(i)};var r=y(n(23)),a=n(8315),o=v(n(8311)),i=y(n(8280)),l=n(8260),u=n(8877),s=n(8278),d=n(8852),f=v(n(8350)),c=n(8879);function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){var n=e.value.document,a=f.getOptionNode(n,t);if(null!=a)if(f.hasValueNodes(a))f.unwrapOptionValueNodes(e,a,!0);else{var o=n.getClosestBlock(a.key);(0,r.default)(null!=o,"Failed to find parent block for selected option node");var i=f.getRangeBetweenNodes({parent:o,startNode:a,endNode:f.getNextOptionNode(n,a.key)});(0,r.default)(null!=i,"Failed to find option value range"),e.select(i)}}function E(e,t,n){var o,l=i.default.getActiveCommand();if(null==l)return!1;if(null==(null==l||null===(o=l.options)||void 0===o?void 0:o.find((function(e){return e.name===t}))))return!1;var u=e.value.document,d=a.Inline.create({type:f.COMMAND_OPTION_TYPE,data:{name:t},nodes:[a.Text.create({text:" "})]});if(n){var p=u.getFirstText();(0,r.default)(null!=p,"Failed to find first text node");var v=u.getPath(p.key);(0,r.default)(null!=v,"Failed to find path to first text node");var y=a.Point.create({key:p.key,path:v,offset:s.COMMAND_SENTINEL.length+l.name.length+1}),m=a.Range.create({anchor:y,focus:y});e.insertInlineAtRange(m,d),e.moveToEndOfInline()}else{var _,h=null===(_=u.getLastText())||void 0===_?void 0:_.text,E=null!=h&&h.length>0&&!c.WHITESPACE_RE.test(h[h.length-1]);e.moveToEndOfDocument(),E&&e.insertText(" "),e.insertInline(d),e.moveToEndOfDocument()}return!0}function g(e,t,n){var r=i.default.getActiveCommand();if(null!=r){for(var a,o=e.value.document,l=f.getOptionNames(o),u=m(null!==(s=r.options)&&void 0!==s?s:[]);!(a=u()).done;){var s,d=a.value;if((t||d.required)&&!l.has(d.name))return E(e,d.name,n),!0}return!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_RE=void 0;t.WHITESPACE_RE=/(\t|\s)/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){return{renderInline:function(t,n,a){return function(e,t,n,a){var o=e.attributes,i=e.node;switch(i.type){case"emoji":return r.createElement("span",m({},o,{contentEditable:!1}),a.renderEmoji(i.data.get("data")));case"customEmoji":return r.createElement("span",m({},o,{contentEditable:!1}),a.renderCustomEmoji(i.data.get("data")));case"textMention":return r.createElement("span",m({},o,{contentEditable:!1}),a.renderTextMention(i.data.get("text")));case"mention":return r.createElement("span",m({},o,{contentEditable:!1}),a.renderUserMention(i.data.get("id")));case"roleMention":return r.createElement("span",m({},o,{contentEditable:!1}),a.renderRoleMention(i.data.get("id")));case"channel":return r.createElement("span",m({},o,{contentEditable:!1}),a.renderChannelMention(i.data.get("id")));default:return n()}}(t,0,a,e)},onChange:f.catchAndLogExceptions((function(e,r){return function(e,t,n,r,a){!function(e){f.iterateNodes(e.value.document,(function(t){"inline"===t.object&&(s.isOptionNode(t)?0===t.text.length&&e.removeNodeByKey(t.key):" "!==t.text&&e.removeNodeByKey(t.key))}))}(r);for(;I(r,e,t,n););return a()}(t,n,a,e,r)})),onKeyDown:f.catchAndLogExceptions(A)}},t.stripAllBlocks=O,t.runOnce=I,t.onKeyDown=A;var r=y(n(0)),a=p(n(23)),o=n(8315),i=p(n(8280)),l=y(n(8881)),u=n(8396),s=y(n(8350)),d=y(n(8439)),f=y(n(8326)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(){return(m=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}).apply(this,arguments)}function _(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E=/(@[^@#]+#\d{4})|(:[a-zA-Z0-9_~]+:)|(#[^\s\t@#:]+(?=[\s\t@#:]))/g,g=/((?:\w|[-_])+):\s*/g;var S=new Set(["paragraph","line","blockQuote"]);function O(e){var t=e.value.document.nodes.get(0);(0,a.default)("block"===t.object,"Slate: Invalid block type:"+t.object+" "+t.type),b(e,t,!0,[])}function I(e,t,n,r){if(f.areStylesDisabledInEditor(e))return O(e),!1;for(var o,i=_(e.value.document.nodes);!(o=i()).done;){var l=o.value;if((0,a.default)("block"===l.object,"Slate: Invalid block type: "+l.object+" "+l.type),S.has(l.type)&&T(e,l,t,n,r))return!0}return!1}function T(e,t,n,r,a){var o=(0,u.getLineState)(t),s=!0===(null==o?void 0:o.wasInCodeBlock),d=l.parse(t.text,n,s);if(function(e,t,n){for(var r,a=_(n);!(r=a()).done;){var o=r.value;switch(o.attributes[0]){case"emoji":case"customEmoji":return N(e,t,o.start,o.text.length,o.attributes[0],{data:o.data});case"textMention":return N(e,t,o.start,o.text.length,o.attributes[0],{text:o.data.text});case"mention":case"roleMention":case"channel":return N(e,t,o.start,o.text.length,o.attributes[0],{id:o.data.id});case"commandOption":return N(e,t,o.start,o.text.length,o.attributes[0],{name:o.data.id})}}return!1}(e,t=b(e,t,!0===(null==o?void 0:o.isInCodeBlock),d),d))return!0;if(!(null==o?void 0:o.isInCodeBlock)){if(C(e,t,r,d,E))return!0;if(null!=a&&null!=i.default.getActiveCommand()&&C(e,t,a,d,g))return!0}}function C(e,t,n,r,a){for(var o,l=null,u=function(){var u,d=o.value;if(s.isOptionNode(d)){if(s.hasValueNodes(d))l=null;else{var f,c,p=i.default.getActiveCommand();l=null!==(f=null==p||null===(c=p.options)||void 0===c?void 0:c.find((function(e){return e.name===d.data.get("name")})))&&void 0!==f?f:null}return"continue"}if("text"!==d.object)return"continue";if(null!=(null===(u=l)||void 0===u?void 0:u.choices))return"continue";var v=d.text;a.lastIndex=0;for(var y=void 0;y=a.exec(v);)if((0===y.index||v.charAt(y.index-1).match(/(\t|\s)/))&&!M(y.index,y[0].length,r)){var m=n(y[0],e);if(null!=m){var _=t.getOffset(d.key);return{v:N(e,t,_+y.index,y[0].length,m.type,m.data)}}a.lastIndex=y.index+1}},d=_(t.nodes);!(o=d()).done;){var f=u();switch(f){case"continue":continue;default:if("object"==typeof f)return f.v}}return!1}function b(e,t,n,r){if(!function(e){for(var t,n=_(e.nodes);!(t=n()).done;){if("inline"===t.value.object)return!0}return!1}(t))return t;for(var i,l=!1,u=!1,s=_(t.nodes);!(i=s()).done;){var f=i.value;if("text"===f.object)for(var c=0;;){var p=f.text.indexOf("\\",c);if(-1===p)break;if(p===f.text.length-1){l=!0;break}c+=2}else"inline"===f.object&&(n||l||M(t.getOffset(f.key),1,r))&&(l=!1,e.replaceNodeByKey(f.key,o.Text.create({text:d.serializeInlineObject(f,"plain")})),u=!0)}if(!u)return t;var v=e.value.document.getNode(t.key);return(0,a.default)(null!=v&&"block"===v.object,"invalid block node"),v}function M(e,t,n){for(var r,a=e+t,o=_(n);!(r=o()).done;){var i=r.value;if(i.attributes.includes("codeBlockText")||i.attributes.includes("inlineCode")){var l=i.start,u=i.start+i.text.length;if(l<a&&u>e)return!0}}return!1}function N(e,t,n,r,i,l){e.normalize(),(0,a.default)("text"!==t.object,"Slate: block may not be a text node");var u=e.value.document.nodes.indexOf(t);(0,a.default)(u>=0,"Slate: line not found");var s=e.value,d=s.selection,c=s.document,p=f.selectionToLineChar(c,d),v=f.findPointInBlockNode(t,n,!0),y=f.findPointInBlockNode(t,n+r,!1),m=o.PathUtils.lift(v.path),h=0!==m.size?t.getChild(m):t,E=Array.from(h.nodes).map((function(e){return e.key})),g=E.indexOf(v.key),S=E.indexOf(y.key);(0,a.default)(g>=0&&(S>=0&&g<=S||h!==t),"Slate: inline object text nodes not found or out of order"+JSON.stringify({b:h.toJSON(),startPoint:v,endPoint:y,blockChildrenKeys:E,startPointIndex:g,endPointIndex:S}));for(var O,I=[],T=!1,C=_(h.nodes);!(O=C()).done;){var b=O.value;if(b.key===v.key){T=!0;var M=null==v.offset?null:b.text.substring(0,v.offset);M&&I.push(o.Text.create({text:M})),I.push(o.Inline.create({type:i,data:l,nodes:[{object:"text",text:" "}]}))}if("document"===b.object||b.key===v.key||b.key===y.key||T||I.push(b),b.key===y.key){T=!1;var N=null==y.offset?null:b.text.substring(y.offset);N&&I.push(o.Text.create({text:N}))}}if("block"===h.object?e.replaceNodeByKey(h.key,o.Block.create({type:h.type,nodes:I,data:h.data})):"inline"===h.object&&(0!==I.length&&"text"===I[0].object||I.unshift(o.Text.create({text:""})),"text"!==I[I.length-1].object&&I.push(o.Text.create({text:""})),e.replaceNodeByKey(h.key,o.Inline.create({type:h.type,nodes:I,data:h.data}))),d.isCollapsed&&null!=p&&p.line===u){var A=p.character>n?p.character-r+1:p.character,P=e.value.document.nodes.get(u),R=f.findPointInBlockNode(P,A);e.select(o.Range.create({anchor:R,focus:R}))}return!0}function A(e,t,n){if(e.ctrlKey||e.altKey||e.metaKey)return n();var r=t.value,a=r.selection,i=r.document,l=i.getClosestBlock(a.focus.key);if(null==l)return n();var u="rtl"===l.getTextDirection(),s=u&&e.which===c.KeyboardKeys.ARROW_RIGHT||!u&&e.which===c.KeyboardKeys.ARROW_LEFT,d=u&&e.which===c.KeyboardKeys.ARROW_LEFT||!u&&e.which===c.KeyboardKeys.ARROW_RIGHT;if(!s&&!d)return n();var p=f.pointToLineChar(i,a.focus);if(null==p)return n();if(s&&0===p.character)return n();if(d&&p.character>=l.text.length)return n();var v=s?-1:1,y=f.findPointInBlockNode(l,p.character+v,!1,s);if(e.shiftKey)t.select(o.Range.create({anchor:a.anchor,focus:y}));else if(a.isCollapsed)t.select(o.Range.create({anchor:y,focus:y}));else{var m=s?a.start:a.end;t.select(o.Range.create({anchor:m,focus:m}))}e.preventDefault()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r=!1);var a=d.findBackticksOnLine(e);if(a.push(e.length),1===a.length&&n)return[];for(var o,i=0,l=n,u=[],s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(a);!(o=s()).done;){var f=o.value;if(l)u.push({text:e.substring(i,f),start:i,attributes:["codeBlockText"],data:void 0});else{var c=f===a[a.length-2]?e.substring(f+3):"",p=null!=c.match(d.caseInsensitiveLangRegex);f+=3+(p?c:"").length;var m=e.substring(i,f);if(""!==m)R(m,t,r).forEach((function(e){u.push(y({},e,{start:e.start+i}))}))}l=!l,i=f}return u},t.markdownRules=void 0;var r=p(n(23)),a=p(n(404)),o=c(n(101)),i=c(n(718)),l=p(n(26)),u=p(n(1284)),s=p(n(1285)),d=c(n(8396));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(){return(y=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}).apply(this,arguments)}var m={link:{type:"skip"},highlight:{type:"skip"},blockQuote:{type:"skip"},codeBlock:{type:"skip"},newline:{type:"verbatim"},br:{type:"verbatim"},paragraph:{type:"verbatim"},text:{type:"verbatim"},emoticon:{type:"verbatim"},mention:{type:"inlineObject"},roleMention:{type:"inlineObject"},channel:{type:"inlineObject"},emoji:{type:"inlineObject"},customEmoji:{type:"inlineObject"},em:{type:"inlineStyle",before:"*",after:"*"},autolink:{type:"inlineStyle",before:"<",after:">"},strong:{type:"inlineStyle",before:"**",after:"**"},u:{type:"inlineStyle",before:"__",after:"__"},s:{type:"inlineStyle",before:"~~",after:"~~"},escape:{type:"inlineStyle",before:"\\",after:""},inlineCode:{type:"inlineStyle",before:"`",after:"`"},spoiler:{type:"inlineStyle",before:"||",after:"||"},url:{type:"inlineStyle",before:"",after:""},codeBlockText:{type:"inlineStyle",before:"",after:""},codeBlockSyntax:{type:"inlineStyle",before:"",after:""},codeBlockLang:{type:"inlineStyle",before:"",after:""},timestamp:{type:"inlineObject"}},_=new Set(["*","_","\\"]),h={},E={};for(var g in u.default.RULES){if(!(g in m))throw new Error("Slate: Unknown markdown rule: "+g+".  If you have just added a new markdown rule then you probably need to add it to this file so that the rich chat box understands it.");var S=m[g];"skip"!==S.type&&(h[g]=O(u.default.RULES[g])),"skip"!==S.type&&"inlineObject"!==S.type&&(E[g]=O("text"===g?o.defaultRules.text:u.default.RULES[g]))}function O(e){(0,r.default)(null!=e.parse,"Slate: rule must have a parse function");var t=e.parse;return y({},e,{parse:function(e,n,r){var a=t.call(this,e,n,r);return a instanceof Array||(a.originalMatch=e),a}})}var I={url:{parse:function(e){return{type:"link",content:e[1],originalMatch:e}}},autolink:{parse:function(e){return{type:"autolink",content:e[1],originalMatch:e}}},codeBlockSyntax:{order:o.defaultRules.inlineCode.order-.1,match:function(e){return/^(```)([a-z0-9_+\-.]+$)?/.exec(e)},parse:function(e){return e[2]&&d.isKnownLang(e[2])?[{type:"codeBlockSyntax",content:e[1],originalMatch:e},{type:"codeBlockLang",content:e[2],originalMatch:e}]:{type:"codeBlockSyntax",content:e[0],originalMatch:e}}}},T=(0,s.default)([h,I]);t.markdownRules=T;var C=(0,s.default)([E,I]),b=i.astParserFor(T),M=i.astParserFor(C),N={max:1/0,maxAge:6e4,updateAgeOnGet:!0},A=new a.default(N),P=new a.default(N);function R(e,t,n){var r=[],a={returnMentionIds:!0,disableAutoBlockNewlines:!0,guildId:t},o=n?M:b,i=n?P:A,l=i.get(e);if(null!=l)return l;var u=e.replace(/\r\n/g," \n").replace(/[\r\f]/g," ").replace(/\t/g," ")+"\n\n";L(r,u,{originalMatch:{index:0,0:""},type:"paragraph",content:o(u,!1,a)},0,[]);var s=function(e){if(0===(e=e.filter((function(e){return e.text.length>0}))).length)return e;for(var t=[e[0]],n=1;n<e.length;n++){var r=t[t.length-1],a=r.start+r.text.length,o=e[n];o.start===a&&null==r.data&&null==o.data&&r.attributes.join("-")===o.attributes.join("-")?r.text+=o.text:t.push(o)}return t}(r);return i.set(e,s),s}function L(e,t,n,a,o){var i=n.content,l=n.type,u=n.originalMatch;switch((0,r.default)(null!=u,"Slate: originalMatch must be set "+JSON.stringify(n,void 0,2)),l){case"newline":case"br":case"paragraph":case"text":case"emoticon":return D(e,t,i||"",a,o);case"emoji":case"customEmoji":var s=t.substring(a);if(s.startsWith(u[0])||(a=U(e,t,a,t.length),s=t.substring(a)),s.startsWith(u[0]))return j(e,t,u[0],a,[l],n);throw new Error("Slate: Unable to find emoji: "+u[0]+" in "+t+" at "+a);case"mention":case"roleMention":case"channel":var d=n.text,f=n.id;return null!=d?((0,r.default)(d===u[0],"Slate: text mentions must exactly match the regex match"),j(e,t,d,a,["textMention"],{text:d})):j(e,t,u[0],a,[l],{id:f});case"timestamp":return D(e,t,u[0],a,o);case"em":case"autolink":case"strong":case"u":case"s":case"escape":case"inlineCode":case"codeBlockSyntax":case"codeBlockLang":case"spoiler":case"url":case"link":var c=function(e,t,n,r){if("inlineCode"===t)return{before:r[1],after:r[1]};if("em"===t&&"_"===e.substring(n,n+1))return{before:"_",after:"_"};var a=m["link"===t?"url":t];if("inlineStyle"===a.type)return a;throw new Error("Slate: rule must be an inlineStyle")}(t,l,a=k(t,a),u),p=c.before,v=c.after;return a=w(e,t,p,a,"syntaxBefore"),o.push(l),a=D(e,t,null!=i?i:"",a,o),o.pop(),k(t,a=w(e,t,v,a,"syntaxAfter"));default:throw new Error("Slate: Unknown rule type: "+l)}}function D(e,t,n,r,a){return"string"==typeof n?r=j(e,t,n,r,a,null):(n instanceof Array||(n=[n]),n.forEach((function(n){r=L(e,t,n,r,a)}))),k(t,r)}function w(e,t,n,a,o){if(n.length>0){var i=t.indexOf(n,a),l=t.substring(a,i+n.length);(0,r.default)(i>=0,"Slate: Unable to find syntax characters"),e.push({text:l,attributes:[o],start:a,data:null}),a=i+n.length}return a}function j(e,t,n,r,a,o){for(var i=k(t,r);"\n"===n.charAt(0)||" "===n.charAt(0);)n=n.substring(1);var u=t.indexOf(n,i);if(u!==i?i=r=U(e,t,i,u):"\\"===n&&"\\"===t.charAt(u+1)&&(u++,r=++i),u!==i)throw new l.default("MarkdownToSlate").error(JSON.stringify({sourceText:t,searchText:n,searchStartsAt:t.substring(i),startPos:i})),Error("Slate: Unable to find content in source text!");var s=i+n.length,d=t.substring(r,s);return e.push({text:d,attributes:a.slice(),start:r,data:o}),s}function k(e,t){for(;"\n"===e.charAt(t)||" "===e.charAt(t);)t++;return t}function U(e,t,n,r){for(;n<r&&_.has(t[n]);)n=k(t,n=w(e,t,t[n],n,"syntaxBefore"));return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSelectedSyntax=l,t.doesSelectionHaveLineStyle=function(e,t){var n=e.selection,r=e.document,o=(0,a.pointToLineChar)(r,n.start),i=(0,a.pointToLineChar)(r,n.end);if(null==o||null==i)return!1;for(var l=o.line;l<=i.line;l++){var u=r.nodes.get(l);if("block"!==u.object||u.type!==t)return!1}return!0},t.toggleMarkdownStyle=function(e,t){e.ensureSelection();var n=l(e.value),o=n.before[t],u=n.after[t];if(null!=o&&null!=u){var s=e.value,d=s.selection,f=s.document,c=f.getClosestBlock(d.start.key);if(null==c)return;var p=(0,a.findPointInBlockNode)(c,o.location),v=f.getClosestBlock(d.end.key);if(null==v)return;var y=(0,a.findPointInBlockNode)(v,u.location);e.select(r.Range.create({anchor:y,focus:y})).deleteForward(u.chars.length).select(r.Range.create({anchor:p,focus:p})).deleteForward(o.chars.length).select(r.Range.create({anchor:p,focus:{key:y.key,offset:y.offset-o.chars.length}})).focus()}else{var m=e.value.selection,_=m.start,h=m.end;e.select(r.Range.create({anchor:h,focus:h})).insertTextAtRange(r.Range.create({anchor:h,focus:h}),i[t]).insertTextAtRange(r.Range.create({anchor:_,focus:_}),i[t]).select(r.Range.create({anchor:{key:_.key,offset:_.offset+i[t].length},focus:{key:h.key,offset:h.offset+i[t].length}})).focus()}};var r=n(8315),a=n(8326),o=new Set(["*","_","~","`","|"]),i={bold:"**",italics:"*",underline:"__",strikethrough:"~~",inlineCode:"`",spoiler:"||"};function l(e){var t=e.selection,n=e.document,r=u(n,t.start),a=u(n,t.end);for(var o in r)o in a||delete r[o];for(var i in a)i in r||delete a[i];return{before:r,after:a}}function u(e,t){var n=(0,a.pointToLineChar)(e,t);if(null==n)return{};for(var r=e.nodes.get(n.line).text,i=n.character,l=i-1;l>=0&&o.has(r.charAt(l));l--)i--;for(var u=n.character,f=u;f<r.length&&o.has(r.charAt(f));f++)u++;var c=r.substring(i,u),p={};return d(p,c,i,"***","italics","bold"),d(p,c,i,"___","italics","underline"),s(p,c,i,"**","bold"),s(p,c,i,"*","italics"),s(p,c,i,"_","italics"),s(p,c,i,"__","underline"),s(p,c,i,"`","inlineCode"),s(p,c,i,"~~","strikethrough"),s(p,c,i,"||","spoiler"),p}function s(e,t,n,r,a){var o=f(t,r);o>=0&&(e[a]={chars:r,location:n+o})}function d(e,t,n,r,a,o){var i=f(t,r);i>=0&&(e[a]={chars:r.substring(0,1),location:i+n},e[o]={chars:r.substring(1),location:i+n+1})}function f(e,t){var n=e.indexOf(t);if(n>=0){var r=t.charAt(0);if(n>0&&e.charAt(n-1)===r)return-1;if(n<e.length-1&&e.charAt(n+t.length)===r)return-1}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?12:t,r=e.height,a=void 0===r?12:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 12 12"}),s("path",{className:f,d:"M7.00168 1.08381C7.00168 0.485238 6.51645 0 5.91788 0C5.31931 0 4.83408 0.485238 4.83408 1.08381V2.18568C4.83408 2.78425 5.31931 3.26949 5.91788 3.26949C6.51645 3.26949 7.00168 2.78425 7.00168 2.18568V1.08381Z",fill:d}),s("path",{className:f,d:"M7.00159 9.81428C7.00159 9.21571 6.51636 8.73047 5.91779 8.73047C5.31922 8.73047 4.83398 9.21571 4.83398 9.81428V10.9161C4.83398 11.5147 5.31922 12 5.91779 12C6.51636 12 7.00159 11.5147 7.00159 10.9161V9.81428Z",fill:d}),s("path",{className:f,d:"M10.9162 7.10561C11.5148 7.10561 12 6.62037 12 6.0218C12 5.42323 11.5148 4.93799 10.9162 4.93799H9.81433C9.21576 4.93799 8.73053 5.42323 8.73053 6.0218C8.73053 6.62037 9.21576 7.10561 9.81433 7.10561H10.9162Z",fill:d}),s("path",{className:f,d:"M2.18573 7.04555C2.7843 7.04555 3.26953 6.56031 3.26953 5.96174C3.26953 5.36317 2.7843 4.87793 2.18573 4.87793H1.08386C0.485292 4.87793 5.67436e-05 5.36317 5.67436e-05 5.96174C5.67436e-05 6.56031 0.485292 7.04555 1.08386 7.04555H2.18573Z",fill:d}))}d.displayName="SparklePlus"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?10:t,r=e.height,a=void 0===r?10:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 10 10"}),s("path",{className:f,d:"M4.59185 1.69642L1.32007 0.0611887C1.14437 -0.00404167 0.953613 -0.0174513 0.770466 0.0225611C0.587319 0.0625734 0.419488 0.154328 0.286908 0.286908C0.154328 0.419488 0.0625738 0.587318 0.0225614 0.770466C-0.0174511 0.953613 -0.00404127 1.14437 0.0611893 1.32007L1.69642 4.59185C1.78832 4.83513 1.78825 5.10365 1.69623 5.34698L0.122153 8.68254C0.0375916 8.84984 0.00799916 9.03955 0.0375831 9.2246C0.0671671 9.40965 0.154425 9.58061 0.286913 9.7131C0.419402 9.84559 0.59035 9.93283 0.775402 9.96242C0.960453 9.992 1.15016 9.96241 1.31746 9.87785L4.65302 8.30377C4.89635 8.21175 5.16487 8.21168 5.40815 8.30358L8.67993 9.93881C8.85563 10.004 9.04639 10.0175 9.22953 9.97744C9.41268 9.93743 9.58051 9.84567 9.71309 9.71309C9.84567 9.58051 9.93743 9.41268 9.97744 9.22953C10.0175 9.04639 10.004 8.85563 9.93881 8.67993L8.30358 5.40815C8.24152 5.292 8.20906 5.16233 8.2091 5.03061C8.20913 4.89889 8.24165 4.7692 8.30377 4.65302L9.87785 1.31746C9.96241 1.15016 9.992 0.960453 9.96242 0.775401C9.93283 0.59035 9.84559 0.419401 9.7131 0.286913C9.58061 0.154424 9.40965 0.0671663 9.2246 0.0375824C9.03955 0.00799847 8.84984 0.037591 8.68254 0.122152L5.34698 1.69623C5.2308 1.75835 5.10111 1.79087 4.96939 1.7909C4.83767 1.79094 4.708 1.75848 4.59185 1.69642Z",fill:d}))}d.displayName="SparkleStar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({width:n,height:a},(0,i.default)(c),{viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M2 2C0.895431 2 0 2.89543 0 4V20C0 21.1046 0.89543 22 2 22H22C23.1046 22 24 21.1046 24 20V4C24 2.89543 23.1046 2 22 2H2ZM9.76445 11.448V15.48C8.90045 16.044 7.88045 16.356 6.74045 16.356C4.11245 16.356 2.66045 14.628 2.66045 12.072C2.66045 9.504 4.23245 7.764 6.78845 7.764C7.80845 7.764 8.66045 8.004 9.32045 8.376L9.04445 10.164C8.42045 9.768 7.68845 9.456 6.83645 9.456C5.40845 9.456 4.71245 10.512 4.71245 12.06C4.71245 13.62 5.43245 14.712 6.86045 14.712C7.31645 14.712 7.64045 14.616 7.97645 14.448V12.972H6.42845V11.448H9.76445ZM11.5481 7.92H13.6001V16.2H11.5481V7.92ZM20.4724 7.92V9.636H17.5564V11.328H19.8604V13.044H17.5564V16.2H15.5164V7.92H20.4724Z"}))}d.displayName="InvertedGIFLabel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ArchivedThreadListTypeAdapters=void 0;var r,a=c(n(23)),o=c(n(3)),i=c(n(2)),l=n(31),u=c(n(10)),s=c(n(204)),d=n(392),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=!1,m=!1,_=!1,h=null,E=d.ArchivedThreadListType.ALL_PUBLIC_THREADS,g=[],S=((r={})[d.ArchivedThreadListType.ALL_PUBLIC_THREADS]={matches:function(e){var t;return e.type!==f.ChannelTypes.PRIVATE_THREAD&&!0===(null===(t=e.threadMetadata)||void 0===t?void 0:t.archived)},sortKey:function(e){var t;return null===(t=e.threadMetadata)||void 0===t?void 0:t.archiveTimestamp},endpoint:function(e){return f.Endpoints.ALL_ARCHIVED_THREADS(e,"public")}},r[d.ArchivedThreadListType.ALL_PRIVATE_THREADS]={matches:function(e){var t;return e.type===f.ChannelTypes.PRIVATE_THREAD&&!0===(null===(t=e.threadMetadata)||void 0===t?void 0:t.archived)},sortKey:function(e){var t;return null===(t=e.threadMetadata)||void 0===t?void 0:t.archiveTimestamp},endpoint:function(e){return f.Endpoints.ALL_ARCHIVED_THREADS(e,"private")}},r[d.ArchivedThreadListType.MY_PRIVATE_THREADS]={matches:function(e){var t;return e.type===f.ChannelTypes.PRIVATE_THREAD&&!0===(null===(t=e.threadMetadata)||void 0===t?void 0:t.archived)&&s.default.hasJoined(e.id)},sortKey:function(e){return e.id},endpoint:function(e){return f.Endpoints.MY_ARCHIVED_THREADS(e)}},r);function O(){y=!1,m=!1,_=!1,h=null,E=d.ArchivedThreadListType.ALL_PUBLIC_THREADS,g=[]}function I(e){if(!(g.indexOf(e)>=0))return!1;g=g.filter((function(t){return t===e}))}t.ArchivedThreadListTypeAdapters=S;var T=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a,o,i,l=r.prototype;return l.initialize=function(){this.waitFor(u.default,s.default)},l.getThreads=function(e,t){return h===e&&E===t?g:[]},a=r,(o=[{key:"canLoadMore",get:function(){return m&&!y&&!_}},{key:"loading",get:function(){return y}}])&&p(a.prototype,o),i&&p(a,i),r}(o.default.Store))(i.default,{CONNECTION_OPEN:function(e){return O()},THREAD_UPDATE:function(e){var t=e.channel;if(!l.ALL_CHANNEL_TYPES.has(t.type))return!1;if(t.parent_id!==h)return!1;var n=I(t.id),r=S[E];if(!r.matches(t))return n;var a=r.sortKey(t);if(null==a)return n;var o=g.findIndex((function(e){var t=u.default.getChannel(e);if(null==t)return!1;var n=r.sortKey(t);return null!=n&&n<a}));if(-1===o)return n;(g=g.slice()).splice(o,0,t.id)},THREAD_DELETE:function(e){return I(e.channel.id)},CHANNEL_DELETE:function(e){if(e.channel.id!==h)return!1;O()},LOAD_ARCHIVED_THREADS:function(e){e.channelId===h&&e.listType===E||O(),h=e.channelId,E=e.listType,y=!0},LOAD_ARCHIVED_THREADS_SUCCESS:function(e){if(e.channelId!==h||e.listType!==E)return!1;var t=e.threads.filter((function(e){return l.ALL_CHANNEL_TYPES.has(e.type)})).map((function(e){return e.id})),n=g.length>0?u.default.getChannel(g[g.length-1]):null,r=n?S[E].sortKey(n):null;null!=e.before&&null!=r?((0,a.default)(e.before<=r,"handleLoadArchivedThreadsSuccess - It is illegal use a `before` time that is more recent than an existing archived thread"),g=g.concat(t)):g=t,m=e.hasMore,y=!1},LOAD_ARCHIVED_THREADS_FAIL:function(e){if(e.channelId!==h||e.listType!==E)return!1;y=!1,_=!0}});t.default=T},function(e,t,n){e.exports=n.p+"2366510047c77ec129d3b746237de881.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7545));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.application,n=e.splashSize,r=e.className,i=e.overrideSplash,l=null!=i?i:t.getSplashURL(n),s=null!=l?"url("+l+")":void 0;return u("div",{className:(0,a.default)(o.default.splashBackground,r),style:{backgroundImage:s}})}s.displayName="ApplicationSplashBackground"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=N(n(3)),i=N(n(2)),l=n(421),u=n(1391),s=n(1325),d=P(n(266)),f=N(n(473)),c=N(n(485)),p=N(n(1396)),v=n(42),y=N(n(210)),m=N(n(120)),_=N(n(306)),h=N(n(426)),E=N(n(29)),g=N(n(55)),S=N(n(477)),O=N(n(5828)),I=n(8366),T=n(289),C=n(1),b=N(n(6)),M=N(n(6032));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var D=function(){return[b.default.Messages.APPLICATION_STORE_PURCHASE_CONFIRMATION_TITLE_1,b.default.Messages.APPLICATION_STORE_PURCHASE_CONFIRMATION_TITLE_2,b.default.Messages.APPLICATION_STORE_PURCHASE_CONFIRMATION_TITLE_3,b.default.Messages.APPLICATION_STORE_PURCHASE_CONFIRMATION_TITLE_4]},w=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={confirmHeaderIndex:Math.floor(Math.random()*D().length),installPath:t.props.defaultInstallationPath,hasInstallPathError:!1,hasAcceptedNeccessaryTerms:!1},t.handleInstallPathChange=function(e,n){t.setState({installPath:e,hasInstallPathError:n})},t.handleInventoryClick=function(){f.default.open(C.UserSettingsSections.INVENTORY),t.props.onClose()},t.handleGoToLibrary=function(){(0,v.transitionTo)(C.Routes.APPLICATION_LIBRARY),t.props.onClose()},t.handleInstall=function(){var e=t.props,n=e.application,r=e.branchId,a=e.buildId,o=e.hasPreviouslyAcceptedStoreTerms,i=e.manifestIds,l=e.onClose,u=t.state,f=u.installPath,c=u.hasInstallPathError;o||(0,s.acceptPurchaseTerms)(),null!=n.eulaId&&(0,s.acceptEULA)(n.eulaId),c||null==a||null==i||(d.installApplication(n,r,a,i,f,C.AnalyticsLocations.APPLICATION_STORE_PAYMENT_MODAL),l(),(0,v.transitionTo)(C.Routes.APPLICATION_LIBRARY))},t.handlePurchaseTermsChange=function(e){t.setState({hasAcceptedNeccessaryTerms:e})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,L(t,n);var o=r.prototype;return o.fetchInstallSize=function(){var e=this.props,t=e.application,n=e.branchId,r=e.buildId,a=e.manifestIds,o=e.buildSizeKB;null!=r&&null!=a&&null==o&&i.default.wait((function(){(0,u.fetchBuildSize)(t.id,n,r,a)}))},o.componentDidMount=function(){var e=this.props,t=e.application,n=e.branchId,r=e.buildId,a=e.manifestIds,o=e.sku;!e.isIAP&&(0,I.canUserInstall)(o)&&(null==r||null==a?i.default.wait((function(){return(0,l.fetchLiveBuild)(t.id,n)})):this.fetchInstallSize())},o.componentDidUpdate=function(e){this.props.buildId===e.buildId&&this.props.manifestIds===e.manifestIds||this.fetchInstallSize()},o.getHeaderBlurb=function(){var e=this.props,t=e.sku,n=e.application,r=e.isIAP;if(t.isPreorder()&&null!=t.preorderReleaseAt)return b.default.Messages.APPLICATION_STORE_PREORDER_PURCHASE_CONFIRMATION_BLURB.format({applicationName:n.name,date:t.preorderReleaseAt.format("MMMM DD")});if(r||[C.SKUTypes.DURABLE,C.SKUTypes.CONSUMABLE].includes(t.type))return b.default.Messages.APPLICATION_ADDON_PURCHASE_CONFIRMATION_BLURB.format({applicationName:n.name,itemName:t.name});if(t.type===C.SKUTypes.BUNDLE)return b.default.Messages.APPLICATION_STORE_BUNDLE_PURCHASE_CONFIRMATION_BLURB.format({name:t.name});var a=t.supportedOperatingSystems[0];return b.default.Messages.APPLICATION_STORE_PURCHASE_CONFIRMATION_UNSUPPORTED_OS.format({name:n.name,operatingSystem:(0,T.skuOperatingSystemToText)(a)})},o.renderInstallationHeader=function(){var e=this.props.application;return R("div",{className:M.default.blurb},void 0,b.default.Messages.APPLICATION_STORE_PURCHASE_CONFIRMATION_BLURB.format({name:e.name}))},o.renderInstallationBody=function(){var e=this.props,t=e.isFetchingBuild,n=e.buildId,r=e.buildSizeKB,o=e.application,i=this.state,l=i.installPath,u=i.hasInstallPathError,s=i.hasAcceptedNeccessaryTerms;return R(a.Fragment,{},void 0,R(p.default,{className:M.default.installSelector,value:l,requiredDiskKB:r,onChange:this.handleInstallPathChange}),R(c.default,{eulaId:o.eulaId,applicationName:o.name,onChange:this.handlePurchaseTermsChange,className:M.default.storeTerms}),R(O.default,{className:M.default.confirmButton,disabled:u||null==n||!s,onClick:this.handleInstall,submitting:t,color:E.default.Colors.GREEN},void 0,b.default.Messages.APPLICATION_STORE_PURCHASE_INSTALL_GAME))},o.renderGenericHeader=function(){return R("div",{className:M.default.blurb},void 0,this.getHeaderBlurb())},o.renderBlurbBody=function(){var e,t=this.props,n=t.isIAP,r=t.sku,o=t.onClose;return r.isPreorder()?(e=b.default.Messages.APPLICATION_PREORDER_PURCHASE_CONFIRMATION_BUTTON,o=this.handleGoToLibrary):e=n?b.default.Messages.APPLICATION_IAP_PURCHASE_RETURN_TO_GAME:b.default.Messages.OKAY,R(a.Fragment,{},void 0,R(E.default,{className:M.default.confirmButton,onClick:o},void 0,e))},o.renderBlurb=function(){var e=this.props,t=e.sku;return e.isIAP||!(0,I.canUserInstall)(t)||t.isPreorder()?this.renderGenericHeader():this.renderInstallationHeader()},o.renderBody=function(){var e=this.props,t=e.sku;return e.isIAP||!(0,I.canUserInstall)(t)||t.isPreorder()?this.renderBlurbBody():this.renderInstallationBody()},o.render=function(){var e=this.props.application,t=this.state.confirmHeaderIndex;return R(g.default,{direction:g.default.Direction.VERTICAL,align:g.default.Align.CENTER},void 0,R(S.default,{game:e,className:M.default.icon,size:S.default.Sizes.LARGE}),R("div",{className:M.default.header},void 0,D()[t]),this.renderBlurb(),R("div",{className:M.default.divider}),this.renderBody())},r}(a.Component);w.displayName="PurchaseConfirmation";var j=o.default.connectStores([y.default,_.default,m.default,h.default],(function(e){var t,n=e.application,r=m.default.getActiveLibraryApplication(n.id);t=null!=r?r.id:n.id;var a=_.default.getTargetBuildId(n.id,t);return{defaultInstallationPath:y.default.defaultInstallationPath,branchId:t,isFetchingBuild:_.default.isFetching(n.id,t),buildId:a,manifestIds:_.default.getTargetManifests(n.id,t),buildSizeKB:null!=a?_.default.getBuildSize(a):null,hasPreviouslyAcceptedStoreTerms:h.default.hasAcceptedStoreTerms}}))(w);t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSkuHeaderText=function(e,t){if(e)return o.default.Messages.APPLICATION_STORE_PURCHASE_IAP;switch(t){case a.SKUTypes.DURABLE_PRIMARY:return o.default.Messages.APPLICATION_STORE_PURCHASE_APPLICATION;case a.SKUTypes.DURABLE:return o.default.Messages.APPLICATION_STORE_PURCHASE_DLC;case a.SKUTypes.CONSUMABLE:return o.default.Messages.APPLICATION_STORE_PURCHASE_CONSUMABLE;case a.SKUTypes.BUNDLE:return o.default.Messages.APPLICATION_STORE_PURCHASE_BUNDLE}};var r,a=n(1),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=T(n(9)),i=T(n(3)),l=b(n(389)),u=T(n(8273)),s=T(n(1245)),d=T(n(9521)),f=T(n(400)),c=T(n(155)),p=T(n(79)),v=T(n(29)),y=T(n(61)),m=T(n(5828)),_=T(n(149)),h=T(n(1266)),E=T(n(16)),g=b(n(1253)),S=n(1),O=T(n(6)),I=T(n(7547));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var R=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleDropdownClick=function(e){e.stopPropagation();var n=t.props,r=n.libraryApplication,o=n.onDropdownOpen,i=n.onDropdownClose;if(o&&o(e),null==r)throw new Error("Unexpected missing libraryApplication");l.openContextMenu(e,(function(e){return a.createElement(d.default,N({},e,{libraryApplication:r,onPlay:t.handleClick}))}),{onClose:i})},t.handleClick=function(){var e=t.props,n=e.applicationId,r=e.libraryApplication,a=e.analyticsListSort,o=e.analyticsListIndex;g.playApplication(n,r,{analyticsParams:{location:t.analyticsLocation,list_sort:a,list_index:o}})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,P(t,n);var i,u,s,f=r.prototype;return f.renderDropdown=function(){var e=this.props.dispatchState;return null!=e&&null!=e.launchOptions&&Object.keys(e.launchOptions).length>1?M(y.default,{"aria-label":O.default.Messages.APPLICATION_CONTEXT_MENU_LAUNCH_OPTIONS,className:I.default.dropdownArrowHitbox,onClick:this.handleDropdownClick},void 0,M("div",{className:I.default.arrowSeparator}),M(h.default,{className:I.default.dropdownArrow})):null},f.renderDisabledButton=function(e,t){var n=this.props,r=n.className,o=n.fullWidth,i=n.size,l=n.customDisabledColor,u=n.tooltipPosition;return M("div",{className:I.default.disabledButtonWrapper},void 0,M(v.default,{className:r,fullWidth:o,size:i,color:null!=l?l:I.default.disabledButtonColor,disabled:!0},void 0,e),M(_.default,{text:t,position:u},void 0,(function(e){return a.createElement("div",N({className:I.default.disabledButtonOverlay},e))})))},f.render=function(){var e=this.props,t=e.className,n=e.fullWidth,r=e.size,a=e.color,i=e.isLaunchable,l=e.isLaunching,u=e.isRunning,s=e.isShiny,d=e.hideNotLaunchable;return i?u?this.renderDisabledButton(O.default.Messages.GAME_ACTION_BUTTON_NOW_PLAYING):M(s?m.default:v.default,{className:(0,o.default)(I.default.playButton,t),innerClassName:I.default.playButtonContents,fullWidth:n,size:r,color:null!=a?a:v.default.Colors.GREEN,hover:null!=a?v.default.Hovers.GREEN:v.default.Hovers.DEFAULT,submitting:l,onClick:this.handleClick},void 0,M("div",{className:I.default.buttonText},void 0,O.default.Messages.GAME_ACTION_BUTTON_PLAY),this.renderDropdown()):d?null:this.renderDisabledButton(O.default.Messages.GAME_ACTION_BUTTON_PLAY,E.default.embedded?O.default.Messages.GAME_ACTION_BUTTON_GAME_NOT_DETECTED:O.default.Messages.GAME_ACTION_BUTTON_PLAY_DISABLED_DESKTOP_APP)},i=r,(u=[{key:"analyticsLocation",get:function(){return N({},this.props.analyticsContext.location,{object:S.AnalyticsObjects.BUTTON_CTA})}}])&&A(i.prototype,u),s&&A(i,s),r}(a.PureComponent);R.displayName="ApplicationPlayButton",R.defaultProps={fullWidth:!1,size:v.default.Sizes.LARGE,tooltipPosition:_.default.Positions.TOP,isShiny:!1,hideNotLaunchable:!1};var L=(0,u.default)(i.default.connectStores([p.default,s.default,c.default,f.default],(function(e){var t=e.applicationId,n=e.libraryApplication,r=new Set(p.default.getRunningVerifiedApplicationIds());return{isLaunchable:f.default.isConnected(t)||s.default.isLaunchable(t)||null!=n&&c.default.isLaunchable(n.id,n.branchId),isLaunching:s.default.launchingGames.has(t),isRunning:r.has(t),dispatchState:null!=n?c.default.getState(n.id,n.branchId):null}}))(R));t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=P(n(0)),l=N(n(3)),u=P(n(1286)),s=N(n(8273)),d=N(n(26)),f=n(42),c=N(n(155)),p=N(n(405)),v=N(n(306)),y=n(768),m=N(n(1342)),_=N(n(29)),h=N(n(8635)),E=N(n(149)),g=P(n(136)),S=N(n(16)),O=P(n(8366)),I=P(n(1253)),T=N(n(8891)),C=n(1),b=N(n(6)),M=N(n(7549));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){D(o,r,a,i,l,"next",e)}function l(e){D(o,r,a,i,l,"throw",e)}i(void 0)}))}}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.PLAY="play",e.NOW_PLAYING="now_playing",e.INSTALL="install",e.UPDATE="update",e.PAUSED="paused",e.LOCATE="locate",e.UNINSTALLING="uninstalling",e.QUEUED="queued",e.DOWNLOADING="downloading",e.UNSUPPORTED_OS="unsupported_os",e.ADD_TO_LIBRARY="add_to_library",e.PREORDER_WAIT="preorder_wait"}(o||(o={}));var U=Object.freeze(((r={})[C.LibraryApplicationActions.PLAY]=o.PLAY,r[C.LibraryApplicationActions.INSTALL]=o.INSTALL,r[C.LibraryApplicationActions.UPDATE]=o.UPDATE,r[C.LibraryApplicationActions.PAUSE]=o.DOWNLOADING,r[C.LibraryApplicationActions.MOVE_UP]=o.QUEUED,r[C.LibraryApplicationActions.RESUME]=o.PAUSED,r));var G=function(e){var t,n;function r(){for(var t,n,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=e.call.apply(e,[this].concat(a))||this)._uninstallStringIndex=null,n.handleAddToLibrary=w(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.props.libraryApplication,e.next=4,u.updateFlags(t.id,t.branchId,t.getFlags()&~C.LibraryApplicationFlags.HIDDEN);case 4:(0,f.transitionTo)(C.Routes.APPLICATION_LIBRARY),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),new d.default("LibraryApplicationButton").error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),n.handleInstall=function(){var e=n.props,t=e.libraryApplication,r=e.source;I.installApplication(t.id,t.branchId,r)},n.handleUpdate=function(){var e=n.props.libraryApplication;I.updateApplication(e.id,e.branchId)},n.onClickHandlers=((t={})[o.ADD_TO_LIBRARY]=n.handleAddToLibrary,t[o.INSTALL]=n.handleInstall,t[o.UPDATE]=n.handleUpdate,t),n.handleClick=function(e,t){var r=n.props.onClick;r&&r(e),t(e)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,k(t,n);var a,l,s,c=r.prototype;return c.getText=function(e){switch(e!==o.UNINSTALLING&&(this._uninstallStringIndex=null),e){case o.INSTALL:return b.default.Messages.GAME_ACTION_BUTTON_INSTALL;case o.UPDATE:return b.default.Messages.GAME_ACTION_BUTTON_UPDATE;case o.PAUSED:return b.default.Messages.GAME_ACTION_BUTTON_PAUSED;case o.LOCATE:return b.default.Messages.GAME_ACTION_BUTTON_LOCATE;case o.UNINSTALLING:var t=[b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_1,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_2,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_3,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_4,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_5,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_6,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_7,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_8,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_9,b.default.Messages.GAME_ACTION_BUTTON_UNINSTALLING_10];return null==this._uninstallStringIndex&&(this._uninstallStringIndex=Math.floor(Math.random()*t.length)),t[this._uninstallStringIndex];case o.QUEUED:return b.default.Messages.GAME_ACTION_BUTTON_QUEUED;case o.DOWNLOADING:return b.default.Messages.GAME_ACTION_BUTTON_DOWNLOADING;case o.UNSUPPORTED_OS:return b.default.Messages.GAME_ACTION_BUTTON_INSTALL;case o.PREORDER_WAIT:return b.default.Messages.GAME_ACTION_BUTTON_PREORDER_WAIT;case o.ADD_TO_LIBRARY:return b.default.Messages.GAME_ACTION_BUTTON_ADD_TO_LIBRARY;default:throw new Error("Unexpected button state")}},c.getButtonState=function(){var e=this.props,t=e.libraryApplication,n=e.dispatchState,r=e.actionState;if(t.isHidden())return o.ADD_TO_LIBRARY;if(t.isPreorder())return o.PREORDER_WAIT;var a=null!=r?U[r]:null;return null!=a?a:null!=n&&n.type===C.LocalDispatchApplicationStates.UNINSTALLING?o.UNINSTALLING:S.default.isWeb()?o.PLAY:o.UNSUPPORTED_OS},c.renderPlayButton=function(){var e=this.props,t=e.libraryApplication,n=e.fullWidth,r=e.size,a=e.color,o=e.customDisabledColor,i=e.isPlayShiny,l=e.onDropdownOpen,u=e.onDropdownClose,s=e.analyticsListSort,d=e.analyticsListIndex;return L(T.default,{applicationId:t.id,libraryApplication:t,fullWidth:n,size:r,color:a,customDisabledColor:o,isShiny:i,onDropdownOpen:l,onDropdownClose:u,analyticsListSort:s,analyticsListIndex:d})},c.renderDisabledButton=function(e,t){var n=this.props,r=n.className,a=n.fullWidth,o=n.size,l=n.customDisabledColor,u=n.tooltipPosition;return L("div",{className:M.default.disabledButtonWrapper},void 0,L(_.default,{className:r,fullWidth:a,size:o,color:null!=l?l:M.default.disabledButtonColor,disabled:!0},void 0,this.getText(e),this.renderProgressBar()),L(E.default,{text:t,position:u},void 0,(function(e){return i.createElement("div",R({className:M.default.disabledButtonOverlay},e))})))},c.renderProgressBar=function(){var e=this.props,t=e.hideProgress,n=e.dispatchState;if(t)return null;var r=g.convertToTransitionState(n);if(null==r)return null;var a=r.type===C.LocalDispatchApplicationStates.UNINSTALLING?h.default.INDETERMINATE:g.calculateProgressPercentage(r.progress,r.total);return L(h.default,{percent:a,size:h.default.Sizes.XSMALL,foregroundColor:r.paused?C.Colors.PRIMARY_DARK:C.Colors.STATUS_GREEN_600,backgroundColor:C.Colors.TRANSPARENT,className:M.default.progress})},c.renderActionButton=function(e,t){var n=this,r=this.props,a=r.className,i=r.fullWidth,l=r.size,u=r.color,s=r.isCloudSyncing;return L(_.default,{className:a,fullWidth:i,size:l,color:null!=u?u:_.default.Colors.GREEN,hover:null!=u?_.default.Hovers.GREEN:_.default.Hovers.DEFAULT,submitting:e===o.UNINSTALLING||s,onClick:function(e){return n.handleClick(e,t)}},void 0,this.getText(e),this.renderProgressBar())},c.render=function(){var e=this.props,t=e.hasNoBuild,n=e.libraryApplication,r=this.getButtonState();if(r===o.PLAY)return this.renderPlayButton();if(r===o.PREORDER_WAIT)return this.renderDisabledButton(r,function(e){var t=O.getReadablePreorderReleaseDate(e.sku);return null!=t?b.default.Messages.GAME_ACTION_BUTTON_PREORDER_WAIT_TOOLTIP.format({date:t}):null}(n));if(r===o.UNSUPPORTED_OS)return this.renderDisabledButton(r,b.default.Messages.GAME_ACTION_BUTTON_UNAVAILABLE_TOOLTIP.format({operatingSystem:b.default.Messages.WINDOWS}));if(r===o.INSTALL&&t)return this.renderDisabledButton(r,b.default.Messages.GAME_ACTION_BUTTON_CANNOT_INSTALL);var a=this.onClickHandlers[r];return null==a?this.renderDisabledButton(r):this.renderActionButton(r,a)},a=r,(l=[{key:"analyticsLocation",get:function(){return R({},this.props.analyticsContext.location,{object:C.AnalyticsObjects.BUTTON_CTA})}}])&&j(a.prototype,l),s&&j(a,s),r}(i.Component);G.displayName="LibraryApplicationButton",G.defaultProps={fullWidth:!1,size:_.default.Sizes.LARGE,hideProgress:!1,isPlayShiny:!1,tooltipPosition:E.default.Positions.TOP},G.ButtonStates=o;var F=(0,s.default)(l.default.connectStores([c.default,p.default,v.default,m.default],(function(e){var t=e.libraryApplication;return{actionState:(0,y.getDefaultLibraryApplicationAction)(t,c.default,p.default),isCloudSyncing:m.default.isSyncing(t.id,t.branchId),hasNoBuild:v.default.hasNoBuild(t.id,t.branchId),dispatchState:c.default.getState(t.id,t.branchId)}}))(G));t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E,t.OperatingSystemSection=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=v(n(9)),l=v(n(149)),u=v(n(9524)),s=v(n(9525)),d=v(n(9526)),f=n(1),c=v(n(6)),p=v(n(7550));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}var h=((r={})[f.OperatingSystems.WINDOWS]={icon:d.default,label:c.default.Messages.WINDOWS},r[f.OperatingSystems.MACOS]={icon:s.default,label:c.default.Messages.MACOS},r[f.OperatingSystems.LINUX]={icon:u.default,label:c.default.Messages.LINUX},r);function E(e){var t=e.operatingSystem,n=e.className,r=h[t];if(null==r)throw new Error("Unexpected operating system: "+t);var a=r.icon;return m(l.default,{text:r.label},void 0,(function(e){return o.createElement(a,_({},e,{className:n}))}))}E.displayName="OperatingSystemIcon";var g=function(e){var t=e.systems,n=e.className,r=e.iconClassName;return m("div",{className:(0,i.default)(p.default.OSSection,n)},void 0,t.map((function(e){return m(E,{operatingSystem:e,className:(0,i.default)(p.default.purchaseUnitOperatingSystem,r)},e)})))};t.OperatingSystemSection=g,g.displayName="OperatingSystemSection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(57);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(){return(i=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}).apply(this,arguments)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).timer=new a.Interval,t.state={hovered:!1},t.handlePause=function(){t.state.hovered||t.setState({hovered:!0})},t.handleResume=function(){t.setState({hovered:!1})},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),o.getDerivedStateFromProps=function(e){return e.disable?{hovered:!1}:null};var u=o.prototype;return u.componentDidMount=function(){var e=this.props,t=e.pauseOnHover,n=e.disable,r=this.state.hovered&&t;n||r||this.startTimer()},u.componentWillUnmount=function(){this.stopTimer()},u.componentDidUpdate=function(e,t){var n=this.props,r=function(e,t){return!(e.disable||t.hovered&&e.pauseOnHover)},a=r(n,this.state),o=r(e,t);a&&!o||e.interval!==n.interval?this.startTimer():!a&&o&&this.stopTimer()},u.startTimer=function(){var e=this.props,t=e.interval,n=e.onInterval;e.disable||this.timer.start(t,(function(){n()}))},u.stopTimer=function(){this.timer.stop()},u.render=function(){var e=this.props,t=e.children,n=e.className,a=e.disable?null:{onMouseEnter:this.handlePause,onFocus:this.handlePause,onMouseLeave:this.handleResume,onBlur:this.handleResume};return r.createElement("div",i({},a,{className:n}),t)},o}(r.Component);u.displayName="IntervalWrapper",u.defaultProps={disable:!1,pauseOnHover:!1};var s=u;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={matureAgree:!1,muted:!0};var s=new(function(e){var t,n,r,a,o;function s(){return e.apply(this,arguments)||this}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r=s,(a=[{key:"didMatureAgree",get:function(){return u.matureAgree}},{key:"isDirectoryMuted",get:function(){return u.muted}}])&&i(r.prototype,a),o&&i(r,o),s}(r.default.Store))(a.default,{APPLICATION_STORE_MATURE_AGREE:function(e){u.matureAgree=!0},APPLICATION_STORE_DIRECTORY_MUTE:function(e){u.muted=!0},APPLICATION_STORE_DIRECTORY_UNMUTE:function(e){u.muted=!1}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.confirmPublish=function(e,t){(0,v.openModal)((function(n){return a.createElement(b,S({channelId:e,messageId:t},n))}))},t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(3)),i=E(n(8514)),l=E(n(8254)),u=E(n(390)),s=E(n(8897)),d=E(n(10)),f=E(n(29)),c=E(n(151)),p=E(n(466)),v=n(41),y=E(n(24)),m=n(1),_=E(n(6)),h=E(n(7372));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=O(c.default,{}),C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).openSettings=function(){var e=t.props,n=e.guildId,r=e.onClose;null!=n&&null!=r&&(r(),l.default.open(n,m.GuildSettingsSections.ANALYTICS))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var o=r.prototype;return o.componentDidMount=function(){var e=this.props.channelId;this.needsReload()&&i.default.fetchChannelFollowerStats(e)},o.needsReload=function(){var e=this.props.followerStats;return null==e||Date.now()-e.lastFetched>36e5},o.render=function(){var e=this.props,t=e.channelId,n=e.messageId,r=e.followerStats,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channelId","messageId","followerStats"]),i=null!=r&&null!=r.guildsFollowing&&r.guildsFollowing>0?a.createElement(a.Fragment,null,O(y.default,{className:h.default.spacing},void 0,_.default.Messages.PUBLISH_FOLLOWED_NEWS_BODY_REACH.format({numGuildsFollowing:r.guildsFollowing})),O(y.default,{},void 0,_.default.Messages.PUBLISH_FOLLOWED_NEWS_BODY_SETTINGS_INSIGHTS.format({onClick:this.openSettings}))):_.default.Messages.PUBLISH_FOLLOWED_NEWS_BODY;return a.createElement(p.default,S({header:_.default.Messages.MODIFY_FOLLOWED_NEWS_HEADER,confirmText:_.default.Messages.CONFIRM,cancelText:_.default.Messages.CANCEL,confirmButtonColor:f.default.Colors.BRAND,onConfirm:function(){return u.default.crosspostMessage(t,n)}},o),O(y.default,{size:y.default.Sizes.SIZE_16,className:h.default.spacing},void 0,this.needsReload()?T:i))},r}(a.PureComponent);C.displayName="PublishModal";var b=o.default.connectStores([d.default,s.default],(function(e){var t=e.channelId,n=d.default.getChannel(t);return{followerStats:s.default.getFollowerStatsForChannel(t),guildId:null!=n?n.guild_id:null}}))(C),M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=i(n(3)),o=i(n(2));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.FAILED="failed",e.SUCCEEDED="succeeded"}(r||(r={}));var u={};var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r.prototype.getFollowerStatsForChannel=function(e){return u[e]},r}(a.default.Store))(o.default,{CONNECTION_OPEN:function(e){u={}},CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.stats;n=null!=n?n:{},u[t]={loadingStatus:r.SUCCEEDED,lastFetched:Date.now(),channelsFollowing:n.channels_following,guildMembers:n.guild_members,guildsFollowing:n.guilds_following,usersSeenEver:n.users_seen_ever,subscribersGainedSinceLastPost:n.subscribers_gained_since_last_post,subscribersLostSinceLastPost:n.subscribers_lost_since_last_post}},CHANNEL_FOLLOWER_STATS_FETCH_FAILURE:function(e){var t=e.channelId;u[t]={loadingStatus:r.FAILED,lastFetched:Date.now(),channelsFollowing:0,guildMembers:0,guildsFollowing:0,usersSeenEver:0,subscribersGainedSinceLastPost:0,subscribersLostSinceLastPost:0}}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){return(l=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}).apply(this,arguments)}var u={},s={},d={};function f(e){var t=s[e];null!=t&&delete d[t],delete s[e],delete u[e]}function c(e){return e.join("-")}var p=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.getInteractionComponentStates=function(){return u},a.getInteractionComponentState=function(e,t){var n=c(t);return null!=u[e]?u[e][n]:null},r}(r.default.Store))(a.default,{LOGOUT:function(e){return u={},s={},void(d={})},QUEUE_INTERACTION_COMPONENT_STATE:function(e){var t,n=e.messageId,r=e.nonce,a=e.indices,o=e.state;s[n]=r,d[r]={messageId:n,indices:a};var i=c(a),f=null!==(t=u[n])&&void 0!==t?t:{};f[i]=o,u[n]=f,u=l({},u)},MESSAGE_DELETE:function(e){var t=e.id;if(null==u[t])return!1;f(t),u=l({},u)},MESSAGE_UPDATE:function(e){var t=e.message;if(null==t.id||null==u[t.id])return!1;f(t.id),u=l({},u)},INTERACTION_SUCCESS:function(e){var t=e.nonce;if(null==t)return!1;var n=d[t];if(null==n)return!1;delete s[n.messageId],delete d[t]},INTERACTION_FAILURE:function(e){var t=e.nonce;if(null==t)return!1;var n=d[t];if(null==n)return!1;!function(e){var t=e.indices,n=e.messageId,r=c(t);if(null==u[n]||null==u[n][r])return!1;delete u[n][r],0===Object.entries(u[n]).length&&delete u[n]}(n),u=l({},u)}});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderComponents=l;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function l(e,t,n){return i(a.Fragment,{},void 0,null==t?void 0:t.map((function(t,r){return n(e,t,r.toString())})))}l.displayName="renderComponents"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({width:n,height:a},(0,i.default)(f),{viewBox:"0 0 16 16"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.20038 2.39762V5.24178C9.20038 6.10455 9.89673 6.80072 10.7597 6.80072H13.6046C13.9558 6.80072 14.1343 6.37826 13.8844 6.12835L9.87292 2.11796C9.62295 1.86806 9.20038 2.04061 9.20038 2.39762ZM10.7461 8.01794C9.22044 8.01794 7.98197 6.77947 7.98197 5.25382V2.03499H3.19561C2.53749 2.03499 1.99902 2.57346 1.99902 3.23158V12.8043C1.99902 13.4624 2.53749 14.0009 3.19561 14.0009H12.7683C13.4265 14.0009 13.9649 13.4624 13.9649 12.8043V8.01794H10.7461ZM9.80015 9C9.80015 9.99411 8.99427 10.8 8.00015 10.8C7.00604 10.8 6.20015 9.99411 6.20015 9H5.00015C5.00015 10.6569 6.3433 12 8.00015 12C9.65701 12 11.0002 10.6569 11.0002 9H9.80015Z",fill:d}))}d.displayName="StickerSmall"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r=(0,o.useStateFromStores)([f.default],(function(){return f.default.getGuild(e.guild_id)})),p=(0,s.useCanManageThread)(e),v=(0,s.useCanUnarchiveThread)(e),m=(0,s.useIsThreadModerator)(e);if(!(!0===(null===(t=e.threadMetadata)||void 0===t?void 0:t.archived)?v:p))return;var _=new Date((0,d.default)(e)).toLocaleString(c.default.getLocale(),{month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit"});return(null===(n=e.threadMetadata)||void 0===n?void 0:n.archived)?y(i.MenuItem,{id:"unarchive-thread",label:c.default.Messages.UNARCHIVE_THREAD,action:function(){return l.default.unarchiveThread(e,m)}}):a.createElement(a.Fragment,null,y(i.MenuItem,{id:"archive-thread",label:c.default.Messages.ARCHIVE_THREAD,action:function(){return l.default.archiveThread(e,m)}}),y(i.MenuItem,{id:"auto-archive-thread",label:c.default.Messages.AUTO_ARCHIVE,subtext:c.default.Messages.AUTO_ARCHIVE_THREAD_AT.format({time:_})},void 0,(0,u.getAutoArchiveOptions)(r).map((function(t){var n=t.value,r=t.label;return y(i.MenuItem,{id:String(n),label:r,action:function(){return l.default.setAutoArchiveDuration(e,n)}},n)}))))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(8253),l=p(n(8265)),u=n(8566),s=n(1209),d=p(n(9547)),f=p(n(15)),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(8330)),o=n(8253),i=n(1209),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t;return!(0,i.useCanManageThread)(e)||(null===(t=e.threadMetadata)||void 0===t?void 0:t.archived)?null:d(o.MenuItem,{id:"edit-thread",label:l.default.Messages.EDIT_THREAD,action:function(){return a.default.open(e.id)}})}f.displayName="useThreadEditItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 20 20"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M10 0C4.4764 0 0 4.4764 0 10C0 15.5236 4.4764 20 10 20C15.5236 20 20 15.5236 20 10C20 4.4764 15.5236 0 10 0ZM10 3.6C10.4422 3.6 10.8 3.95781 10.8 4.4V9.5376L14.5625 11.7126C14.9453 11.9329 15.0703 12.4173 14.85 12.8001C14.6297 13.183 14.1453 13.3079 13.7625 13.0876L9.68726 10.7376C9.65601 10.7251 9.62788 10.7048 9.59976 10.6876C9.3607 10.5486 9.19976 10.2954 9.19976 10.0001V4.4001C9.19976 3.9579 9.55781 3.6 10 3.6Z"})))}d.displayName="Clock"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.AttachmentUpload=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=v(n(9)),o=v(n(8794)),i=n(8289),l=v(n(271)),u=v(n(61)),s=v(n(8635)),d=v(n(255)),f=v(n(8376)),c=v(n(6)),p=v(n(7573));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.filename,r=(0,i.classifyFileName)(t),a=n(9554)("./icon-file-"+r+".svg");return m("img",{className:p.default.icon,src:a,alt:c.default.Messages.IMG_ALT_ATTACHMENT_FILE_TYPE.format({fileType:r}),title:r})};_.displayName="AttachmentIcon";var h=function(e){var t=e.className,n=e.filename,r=e.size,i=e.progress,l=e.onCancelUpload,f=e.onClick,v=e.onContextMenu,y=100===i,h=!y&&r>0;return m("div",{className:(0,a.default)(p.default.attachment,t)},void 0,m(_,{filename:n}),m("div",{className:p.default.attachmentInner},void 0,m("div",{className:p.default.filenameWrapper},void 0,m(u.default,{className:p.default.filename,onClick:f,onContextMenu:v},void 0,n),h?m("div",{className:p.default.size},void 0,"— "+o.default.filesize(r)):null),m("div",{className:p.default.progressContainer},void 0,y?c.default.Messages.ATTACHMENT_PROCESSING:m(s.default,{className:p.default.progress,percent:i}))),y?null:m(u.default,{onClick:l},void 0,m(d.default,{className:p.default.cancelButton,width:24,height:24})))};t.AttachmentUpload=h,h.displayName="AttachmentUpload";var E=function(e){var t=e.className,n=e.url,r=e.filename,i=e.size,u=e.onClick,s=e.onContextMenu;return m("div",{className:(0,a.default)(p.default.attachment,t)},void 0,m(_,{filename:r}),m("div",{className:p.default.attachmentInner},void 0,m("div",{className:p.default.filenameLinkWrapper},void 0,m(l.default,{className:p.default.fileNameLink,href:n,onClick:u,onContextMenu:s},void 0,r)),m("div",{className:p.default.metadata},void 0,o.default.filesize(i))),m(l.default,{href:n,target:"_blank",rel:"noreferrer noopener",className:p.default.downloadWrapper},void 0,m(f.default,{className:p.default.downloadButton,width:24,height:24})))};E.displayName="Attachment";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=j(n(3)),i=j(n(1234)),l=j(n(478)),u=U(n(8428)),s=j(n(8836)),d=n(1228),f=n(156),c=j(n(1363)),p=j(n(1309)),v=j(n(8499)),y=j(n(1245)),m=n(8596),_=j(n(708)),h=j(n(9580)),E=j(n(8268)),g=j(n(89)),S=j(n(400)),O=j(n(155)),I=j(n(8647)),T=j(n(56)),C=j(n(120)),b=j(n(1255)),M=j(n(12)),N=j(n(8429)),A=j(n(9581)),P=j(n(150)),R=n(263),L=j(n(16)),D=j(n(8257)),w=n(1);function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(){return(F=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}).apply(this,arguments)}function B(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){B(o,r,a,i,l,"next",e)}function l(e){B(o,r,a,i,l,"throw",e)}i(void 0)}))}}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var V={spotify:"Spotify"},W=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={sending:!1},t.handleJoin=function(){var e=t.props,n=e.activity,r=e.userId,a=e.message,o=e.channelId;null!=n&&null!=r&&null!=a&&null!=n.session_id&&null!=n.application_id&&(l.default.join(r,n.session_id,n.application_id,o,a.id),(0,v.default)(w.AnalyticsGameOpenTypes.JOIN,w.AnalyticsLocations.MESSAGE_EMBED,r,n,a.id))},t.handleInvite=H(regeneratorRuntime.mark((function e(){var n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,r=n.activity,a=n.channelId,null==r||null==a){e.next=9;break}return e.prev=2,t.setState({sending:!0}),e.next=6,i.default.sendActivityInvite({type:w.ActivityActionTypes.JOIN,channelId:a,activity:r,location:w.AnalyticsLocations.MESSAGE_EMBED});case 6:return e.prev=6,t.setState({sending:!1}),e.finish(6);case 9:case"end":return e.stop()}}),e,null,[[2,,6,9]])}))),t.handleSync=function(){var e=t.props,n=e.activity,r=e.userId;null!=n&&null!=r&&u.sync(n,r)},t.handleDownloadApp=function(){(0,d.showAppDownloadModal)("Game Invite")},t.renderUserPopout=function(e,n){var r=t.props,o=r.channelId,i=r.guildId;return null==o?null:a.createElement(E.default,F({},n,{userId:e.id,guildId:i,channelId:o}))},t.renderSpotifyJoinButton=function(e){var n=t.props,r=n.channelId,o=n.guildId;return a.createElement(h.default,F({guildId:null!=o?o:void 0,channelId:r,source:"Invite Embed"},e))},t.renderCustomButton=function(e){var n=t.props.application;return a.createElement(s.default,F({},e,{source:w.AnalyticsLocations.MESSAGE_EMBED,application:n}))},t.renderEmbed=function(){var e,n=t.props,r=n.activity,a=n.partyId,o=n.myPartyId,i=n.application,l=n.partyMembers,u=n.isPreview,s=n.isLaunching,d=n.isSender,f=n.activityActionType,c=n.className,p=n.channelId,v=n.message,y=n.hideParty,m=n.isSyncable,_=n.isLaunchable,h=n.guildId;if(null!=i)e=i.name;else if(null!=a){var E=a.split(":")[0];e=V[E]}return G(A.default,{activity:r,partyId:a,myPartyId:o,applicationId:null!=i?i.id:null,name:e,partyMembers:l,className:c,coverImage:t.getCoverImage(),isPreview:u,isGameLaunchable:_,isLoading:s||t.state.sending,activityActionType:f,isInBrowser:!L.default.embedded,isSyncable:m,isSender:d,channelId:p,guildId:h||void 0,message:v,hideParty:y,onJoin:t.handleJoin,onInvite:t.handleInvite,onSync:t.handleSync,onDownloadApp:t.handleDownloadApp,onOpenSpotifyTrack:t.handleOpenSpotifyTrack,onOpenSpotifyArtist:t.handleOpenSpotifyArtist,onOpenSpotifyAlbum:t.handleOpenSpotifyAlbum,renderUserPopout:t.renderUserPopout,renderSpotifyJoinButton:t.renderSpotifyJoinButton,renderCustomButton:t.shouldRenderCustomButton()?t.renderCustomButton:null})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var o=r.prototype;return o.getCoverImage=function(){var e=this.props,t=e.activity,n=e.connectedApplication,r=e.application,a=e.isPreview,o=e.message;if(null!=r&&(a||null!=o&&(0,p.default)(t,o,r.id))){var i=(0,c.default)(t,r.id);if(null!=i)return i}return null!=r?P.default.getApplicationIconURL({id:r.id,icon:null!=n?n.coverImage:r.coverImage,size:f.ACTIVITY_INVITE_COVER_IMAGE_SIZE}):null},o.handleOpenSpotifyTrack=function(e){(0,m.openTrack)(e)},o.handleOpenSpotifyArtist=function(e,t,n){(0,m.openArtist)(e,t,n)},o.handleOpenSpotifyAlbum=function(e,t){(0,m.openAlbum)(e,t)},o.shouldRenderCustomButton=function(){var e=this.props,t=e.isLaunchable,n=e.application;return null!=n&&null!=n.primarySkuId&&!t&&L.default.embedded},o.render=function(){return G(D.default,{section:D.default.Sections.APPLICATION_EMBED},void 0,this.renderEmbed())},r}(a.PureComponent);W.displayName="ActivityInviteEmbedContainer",W.defaultProps={isPreview:!1};var Y=o.default.connectStores([_.default,I.default,b.default,C.default,y.default,O.default,S.default,N.default,M.default,T.default],(function(e){var t=e.activity,n=e.application,r=e.partyId,a=e.userId,o=e.guildId,i=(n||{}).id,l=null!=t&&null!=t.party&&t.party.id===r?I.default.getParty(t.party.id):null,u=i?b.default.getApplicationActivity(i):b.default.findActivity((function(e){return e.type===w.ActivityTypes.LISTENING})),s=!1;null!=i&&(s=N.default.getState(i,w.ActivityActionTypes.JOIN)===w.ActivityActionStates.LOADING);var d=Array.from(l||[]).map((function(e){var t=o?T.default.getMember(o,e):null,n=null!=t?t.nick:null,r=M.default.getUser(e),a=null==r;return null==r&&(r=new g.default({discriminator:"0005"})),{user:r,unknownUser:a,nick:n}})),f=null!=t&&_.default.canPlay(t),c=_.default.getSyncingWith(),p=null!=c&&null!=a&&c.userId===a,v=f&&!p;return{partyMembers:d,connectedApplication:null!=i?S.default.getApplication(i):null,myPartyId:null!=u&&null!=u.party?u.party.id:null,isLaunching:s,isSyncable:v,isLaunchable:null!=i&&(0,R.isLaunchable)(C.default,y.default,O.default,S.default,i)}}))(W);t.default=Y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=O(n(0)),o=n(3),i=g(n(469)),l=g(n(8292)),u=g(n(39)),s=n(29),d=g(n(8518)),f=n(85),c=n(35),p=n(41),v=n(8301),y=O(n(8411)),m=n(8648),_=g(n(9128)),h=g(n(6)),E=g(n(7350));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var T=function(){var e=(0,o.useStateFromStores)([u.default],(function(){return u.default.theme}));return I(l.default,{theme:e,submitting:!1,message:h.default.Messages.MEMBER_VERIFICATION_PROGRESS_LOST_TITLE,onReset:function(){(0,m.setShowWarning)(!1)},onResetText:h.default.Messages.CANCEL,onSave:function(){(0,m.setShowWarning)(!1),(0,p.closeModal)(v.IN_APP_MEMBER_VERIFICATION_MODAL_KEY)},onSaveText:h.default.Messages.MEMBER_VERIFICATION_PROGRESS_LOST_CONTINUE,onSaveButtonColor:s.ButtonColors.RED})};T.displayName="WarnOnCloseNotice";var C=I(T,{}),b=function(e){var t=e.guildId,n=e.transitionState,r=e.onClose,l=e.onComplete,u=e.isPreview,s=void 0!==u&&u,p=(0,m.useMemberVerificationFormNoticeStore)((function(e){return e.shouldShowWarning})),v=(0,o.useStateFromStores)([y.default],(function(){return y.default.get(t)})),h=(0,f.useUID)();return a.useEffect((function(){v===y.NO_MEMBER_VERIFICATION_FORM&&r()}),[r,v]),v===y.NO_MEMBER_VERIFICATION_FORM?null:a.createElement(a.Fragment,null,I(c.ModalRoot,{size:c.ModalSize.MEDIUM,className:E.default.container,transitionState:n,"aria-labelledby":h},void 0,I(c.ModalCloseButton,{onClick:function(){return r(!1)},className:E.default.closeButton}),I(_.default,{guildId:t,onClose:r,onComplete:l,isPreview:s})),I(i.default,{},void 0,!0===p&&I(d.default,{className:E.default.notice},void 0,C)))};t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=E(n(15)),l=E(n(12)),u=E(n(55)),s=n(8301),d=E(n(8411)),f=n(8262),c=E(n(8908)),p=E(n(8909)),v=E(n(8910)),y=E(n(8911)),m=E(n(8912)),_=E(n(8913)),h=n(1);function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var I=function(e){var t,n,r=e.guildId,E=e.className,g=e.formState,I=e.updateFormState,T=e.isPreview,C=void 0!==T&&T,b=e.requestingUser,M=(0,o.useStateFromStores)([d.default],(function(){return d.default.get(r)})),N=(0,o.useStateFromStores)([i.default],(function(){var e;return null===(e=i.default.getGuild(r))||void 0===e?void 0:e.rulesChannelId})),A=null!==(t=null!=g?g:null==M?void 0:M.formFields)&&void 0!==t?t:[],P=(0,o.useStateFromStores)([i.default],(function(){var e;return null===(e=i.default.getGuild(r))||void 0===e?void 0:e.verificationLevel}),[r]),R=null!=P?P:null==M||null===(n=M.guild)||void 0===n?void 0:n.verification_level,L=(0,o.useStateFromStores)([l.default],(function(){return null!=b?b:l.default.getCurrentUser()}),[b]),D=R===h.VerificationLevels.VERY_HIGH&&!(null==L?void 0:L.isStaff()),w=null!=b,j=!C&&(D?null==L?void 0:L.isPhoneVerified():(null==L?void 0:L.verified)||(null==L?void 0:L.isPhoneVerified())),k=a.useRef(j),U=function(e,t){var n=A[e];I&&I([].concat(A.slice(0,e),[O({},n,{response:t})],A.slice(e+1)))},G=function(e,t,n){switch(e.field_type){case f.VerificationFormFieldTypes.VERIFICATION:return w||!0!==k.current?S(D?y.default:c.default,{passesVerification:j,isPreview:C,isReviewing:w},n):null;case f.VerificationFormFieldTypes.TERMS:return S(m.default,{channelId:N,field:e,isReviewing:w,onChange:function(e,n){return function(e,t){var n=A[e];I&&I([].concat(A.slice(0,e),[O({},n,{response:t})],A.slice(e+1)))}(t,n)}},n);case f.VerificationFormFieldTypes.TEXT_INPUT:return S(_.default,{field:e,isReviewing:w,onChange:function(e){return U(t,e)}},n);case f.VerificationFormFieldTypes.PARAGRAPH:return S(v.default,{field:e,isReviewing:w,onChange:function(e){return U(t,e)}},n);case f.VerificationFormFieldTypes.MULTIPLE_CHOICE:return S(p.default,{field:e,isReviewing:w,onChange:function(e){return function(e,t){var n=t.value,r=A[e];I&&I([].concat(A.slice(0,e),[O({},r,{response:n})],A.slice(e+1)))}(t,e)}},n);default:return null}};return null==M?null:S(u.default,{direction:u.default.Direction.VERTICAL,className:E},void 0,s.REQUIRED_FORM_FIELDS.map((function(e,t){return G(e,t,"required-"+t)})),null==A?void 0:A.map((function(e,t){return G(e,t,"field-"+t)})))};I.displayName="MemberVerificationFormRenderer";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=_(n(363)),l=_(n(8254)),u=_(n(29)),s=_(n(55)),d=_(n(149)),f=_(n(372)),c=_(n(9584)),p=_(n(24)),v=n(1),y=_(n(6)),m=_(n(7345));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}var S=function(e){var t,n,r=e.passesVerification,_=void 0!==r&&r,h=e.isPreview,S=void 0!==h&&h,O=e.isSettingsView,I=void 0!==O&&O,T=e.isReviewing,C=void 0!==T&&T,b=a.useState(!1),M=b[0],N=b[1];a.useEffect((function(){var e;return M&&(e=setTimeout((function(){N(!1)}),2e3)),function(){null!=e&&clearTimeout(e)}}),[M]);var A,P=y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_EMAIL_VERIFICATION_LABEL;return C||_?P=y.default.Messages.MEMBER_VERIFICATION_EMAIL_VERIFIED:!S&&_?P=y.default.Messages.MEMBER_VERIFICATION_EMAIL_VERIFICATION_ENABLED:I&&(P=y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_EMAIL_VERIFICATION_SETTINGS_LABEL),A=S?E(d.default,{text:y.default.Messages.MEMBER_VERIFICATION_VERIFICATION_FIELD_SETTINGS_TOOLTIP},void 0,(function(e){return a.createElement(u.default,g({},e,{disabled:!0,size:u.default.Sizes.SMALL,onClick:v.NOOP}),y.default.Messages.VERIFY)})):M?E(s.default,{align:s.default.Align.CENTER,grow:0},void 0,E(p.default,{className:m.default.verifyConfirmText,size:p.default.Sizes.SIZE_14,color:p.default.Colors.STATUS_GREEN},void 0,y.default.Messages.MEMBER_VERIFICATION_EMAIL_VERIFICATION_EMAIL_SENT)):_||C?E(s.default,{align:s.default.Align.CENTER,grow:0},void 0,E(f.default,{className:m.default.verificationCheckmark}),E(p.default,{className:m.default.verifyConfirmText,size:p.default.Sizes.SIZE_14,color:p.default.Colors.STATUS_GREEN},void 0,y.default.Messages.MEMBER_VERIFICATION_VERIFIED)):E(u.default,{disabled:I,size:u.default.Sizes.SMALL,onClick:S?v.NOOP:function(){N(!0),i.default.verifyResend()}},void 0,y.default.Messages.MEMBER_VERIFICATION_EMAIL_VERIFICATION_RESEND_EMAIL),E("div",{className:(0,o.default)((t={},t[m.default.formItem]=!I,t[m.default.settingsFormItem]=I,t))},void 0,E(s.default,{justify:s.default.Justify.BETWEEN,align:s.default.Align.CENTER,className:(0,o.default)(m.default.formFieldWrapper,(n={},n[m.default.settingsFormFieldWrapper]=I||C,n))},void 0,E(s.default,{align:s.default.Align.CENTER},void 0,E(c.default,{className:m.default.verificationIcon}),E(p.default,{size:p.default.Sizes.SIZE_16},void 0,P)),A),I?E(p.default,{color:p.default.Colors.HEADER_SECONDARY,className:m.default.settingsLink},void 0,y.default.Messages.MEMBER_VERIFICATION_FORM_VERIFICATION_SETTINGS.format({onSettingsClick:function(){return l.default.setSection(v.GuildSettingsSections.MODERATION)}})):null)};S.displayName="EmailVerificationField";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(1162)),l=f(n(474)),u=f(n(159)),s=n(1),d=f(n(7345));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t,n,r=e.field,f=e.onChange,c=void 0===f?s.NOOP:f,v=e.isSettingsView,y=void 0!==v&&v,m=e.isReviewing,_=void 0!==m&&m,h=r.label,E=r.description,g=r.choices,S=r.response,O=a.useMemo((function(){return g.map((function(e,t){return{name:e,value:t}}))}),[g]);return p("div",{className:(0,o.default)((t={},t[d.default.formItem]=!y,t[d.default.settingsFormItem]=y,t))},void 0,p(u.default,{},void 0,h),E&&p(l.default,{},void 0,E),p(i.default,{disabled:y||_,options:O,value:S,onChange:c,radioItemClassName:(0,o.default)((n={},n[d.default.radioItem]=_||y,n))}))};v.displayName="MultipleChoiceField";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(8272)),i=f(n(474)),l=f(n(159)),u=n(8301),s=n(1),d=f(n(7345));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t,n=e.field,r=e.onChange,f=void 0===r?s.NOOP:r,c=e.isSettingsView,v=void 0!==c&&c,y=e.isReviewing,m=void 0!==y&&y,_=n.label,h=n.description,E=n.placeholder,g=n.response;return p("div",{className:(0,a.default)((t={},t[d.default.formItem]=!v,t[d.default.settingsFormItem]=v,t))},void 0,p(l.default,{},void 0,_),h&&p(i.default,{},void 0,h),p(o.default,{maxLength:u.MAX_PARAGRAPH_RESPONSE_LENGTH,value:null!=g?g:"",placeholder:E,onChange:f,disabled:v||m,autosize:!0}))};v.displayName="ParagraphField";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=E(n(8254)),l=E(n(8447)),u=n(5831),s=E(n(29)),d=E(n(55)),f=E(n(149)),c=E(n(372)),p=E(n(9587)),v=n(41),y=E(n(24)),m=n(1),_=E(n(6)),h=E(n(7345));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t,n,r=e.passesVerification,E=void 0!==r&&r,g=e.isSettingsView,I=void 0!==g&&g,T=e.isPreview,C=void 0!==T&&T,b=e.isReviewing,M=void 0!==b&&b,N=function(){(0,v.openModal)((function(e){return a.createElement(l.default,e)}),{modalKey:u.PHONE_VERIFICATION_MODAL_KEY})},A=_.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_PHONE_VERIFICATION_LABEL;return M||E?A=_.default.Messages.MEMBER_VERIFICATION_PHONE_VERIFIED:!C&&E&&(A=_.default.Messages.MEMBER_VERIFICATION_PHONE_VERIFICATION_ENABLED),O("div",{className:(0,o.default)((t={},t[h.default.formItem]=!I,t[h.default.settingsFormItem]=I,t))},void 0,O(d.default,{justify:d.default.Justify.BETWEEN,align:d.default.Align.CENTER,className:(0,o.default)(h.default.formFieldWrapper,(n={},n[h.default.settingsFormFieldWrapper]=I||M,n))},void 0,O(d.default,{align:d.default.Align.CENTER},void 0,O(p.default,{className:h.default.verificationIcon}),O(y.default,{size:y.default.Sizes.SIZE_16},void 0,A)),E||M?O(d.default,{align:d.default.Align.CENTER,grow:0},void 0,O(c.default,{className:h.default.verificationCheckmark}),O(y.default,{className:h.default.verifyConfirmText,size:y.default.Sizes.SIZE_14,color:y.default.Colors.STATUS_GREEN},void 0,_.default.Messages.MEMBER_VERIFICATION_VERIFIED)):O(f.default,{text:I||C?_.default.Messages.MEMBER_VERIFICATION_VERIFICATION_FIELD_SETTINGS_TOOLTIP:null},void 0,(function(e){return a.createElement(s.default,S({},e,{disabled:I||C,size:s.default.Sizes.SMALL,onClick:C?m.NOOP:N}),_.default.Messages.VERIFY)}))),I?O(y.default,{color:y.default.Colors.HEADER_SECONDARY,className:h.default.settingsLink},void 0,_.default.Messages.MEMBER_VERIFICATION_FORM_VERIFICATION_SETTINGS.format({onSettingsClick:function(){return i.default.setSection(m.GuildSettingsSections.MODERATION)}})):null)};I.displayName="PhoneVerificationField";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=p(n(9)),o=p(n(8295)),i=p(n(1160)),l=p(n(474)),u=p(n(159)),s=p(n(24)),d=n(1),f=p(n(6)),c=p(n(7345));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t,n,r=e.channelId,p=e.field,v=e.onChange,m=void 0===v?d.NOOP:v,_=e.isSettingsView,h=void 0!==_&&_,E=e.isReviewing,g=void 0!==E&&E,S=p.label,O=p.description,I=p.values,T=p.response;return y("div",{className:(0,a.default)((t={},t[c.default.formItem]=!h,t[c.default.settingsFormItem]=h,t))},void 0,y(u.default,{},void 0,S),O&&y(l.default,{},void 0,O),!g&&y("div",{className:(0,a.default)(c.default.formFieldWrapper,(n={},n[c.default.settingsFormFieldWrapper]=h||g,n))},void 0,I.map((function(e,t){return y("div",{className:c.default.termsRow},"term-"+t,y(s.default,{size:s.default.Sizes.SIZE_16,color:s.default.Colors.MUTED},void 0,t+1+"."),y(s.default,{size:s.default.Sizes.SIZE_16,className:c.default.termsRowContent},void 0,o.default.parseGuildVerificationFormRule(e,!0,{channelId:r})))}))),y(i.default,{size:20,type:i.default.Types.INVERTED,value:null!=T&&T,onChange:m,disabled:h||g,className:c.default.checkbox},void 0,y(s.default,{className:c.default.checkboxText,size:s.default.Sizes.SIZE_16},void 0,f.default.Messages.MEMBER_VERIFICATION_READ_RULES)))};m.displayName="TermsField";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(153)),i=f(n(474)),l=f(n(159)),u=n(8301),s=n(1),d=f(n(7345));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t,n=e.field,r=e.onChange,f=void 0===r?s.NOOP:r,c=e.isSettingsView,v=void 0!==c&&c,y=e.isReviewing,m=void 0!==y&&y,_=n.label,h=n.description,E=n.placeholder,g=n.response;return p("div",{className:(0,a.default)((t={},t[d.default.formItem]=!v,t[d.default.settingsFormItem]=v,t))},void 0,p(l.default,{},void 0,_),h&&p(i.default,{},void 0,h),p(o.default,{maxLength:u.MAX_TEXT_RESPONSE_LENGTH,value:null!=g?g:"",placeholder:E,onChange:f,disabled:v||m}))};v.displayName="TextInputField";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LurkerModeUpsellPopoutTypes=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(3),l=E(n(199)),u=E(n(8398)),s=E(n(29)),d=E(n(282)),f=n(85),c=E(n(47)),p=E(n(24)),v=n(48),y=E(n(182)),m=n(1),_=E(n(6)),h=E(n(7374));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}t.LurkerModeUpsellPopoutTypes=a,function(e){e[e.CHAT=0]="CHAT",e[e.REACTIONS=1]="REACTIONS"}(a||(t.LurkerModeUpsellPopoutTypes=a={}));var I=function(e){var t=e.type,r=e.guild,E=e.closePopout,g=(0,f.useUID)(),I=o.useState(!1),T=I[0],C=I[1],b=(0,i.useStateFromStores)([y.default],(function(){return y.default.isLurking(r.id)}),[r.id]),M=r.hasFeature(m.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED)&&r.hasFeature(m.GuildFeatures.COMMUNITY);o.useEffect((function(){T&&!b&&E()}),[T,b,E]);var N=null,A=_.default.Messages.LURKER_MODE_POPOUT_UPSELL_BODY;switch(t){case a.CHAT:N=_.default.Messages.LURKER_MODE_POPOUT_CHAT_HEADER;break;case a.REACTIONS:N=_.default.Messages.LURKER_MODE_POPOUT_REACTIONS_HEADER;break;default:return(0,v.assertNever)(t)}if(null==N)return null;var P=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.prev=1,e.next=4,l.default.joinGuild(r.id,!1,m.JoinGuildSources.CHAT_INPUT_BLOCKER);case 4:n=e.sent,M&&null!=(null===(t=n.body)||void 0===t?void 0:t.member_verification_form)&&(E(),(0,u.default)(r.id)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),C(!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){O(o,r,a,i,l,"next",e)}function l(e){O(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return S(d.default,{className:h.default.container,"aria-labelledby":g},void 0,S("img",{alt:"",className:h.default.image,src:n(8915)}),S("div",{className:h.default.content},void 0,S(c.default,{size:c.default.Sizes.SIZE_16,id:g},void 0,N),S(p.default,{color:p.default.Colors.HEADER_SECONDARY},void 0,A),S("div",{className:h.default.buttonContainer},void 0,S(s.default,{onClick:P,submitting:T},void 0,_.default.Messages.LURKER_MODE_POPOUT_JOIN),S(s.default,{onClick:E,look:s.default.Looks.BLANK,className:h.default.cancel},void 0,_.default.Messages.LURKER_MODE_POPOUT_CANCEL))))};I.displayName="LurkerModeUpsellPopout";var T=I;t.default=T},function(e,t,n){e.exports=n.p+"01ae13d7aba8e6c7812c608d17a35ffb.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(3)),a=c(n(2)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1235)),i=c(n(182)),l=c(n(89)),u=c(n(10)),s=c(n(12)),d=n(1);function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v={},y=function(){function e(){this.fetched=!1,this.users={}}return e.ensure=function(t,n){var r=t+":"+n.name+":"+(n.id||"");return v[r]=v[r]||new e},e}();function m(e){var t=e.type,n=e.messageId,r=e.userId,a=e.emoji,o=y.ensure(n,a);if(t===d.ActionTypes.MESSAGE_REACTION_ADD){var i=s.default.getUser(r);i&&(o.users[r]=i)}else delete o.users[r]}var _=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.getReactions=function(e,t,n,r){var a=y.ensure(t,n);if(!a.fetched){var l=u.default.getChannel(e),s=null!=l?l.getGuildId():null;if(null!=s&&i.default.isLurking(s))return;o.getReactions(e,t,n,r),a.fetched=!0}return a.users},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){v={}},MESSAGE_REACTION_ADD:m,MESSAGE_REACTION_REMOVE:m,MESSAGE_REACTION_ADD_USERS:function(e){var t=e.messageId,n=e.users,r=e.emoji,a=y.ensure(t,r);n.forEach((function(e){return a.users[e.id]=new l.default(e)}))}});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=s(n(8)),l=s(n(273)),u=s(n(161));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){return{toValue:e,duration:300,easing:l.default.Easing.inOut(l.default.Easing.back())}}!function(e){e[e.ABOVE=0]="ABOVE",e[e.VISIBLE=1]="VISIBLE",e[e.BELOW=2]="BELOW"}(a||(a={}));var y=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).animateNext=function(){var e=n.state,t=e.currValue,r=e.nextValue;null!=r?n.setState({prevValue:u.default.isFocused()?t:null,currValue:r,nextValue:null}):n.setState({prevValue:null})},n.state={prevValue:null,currValue:t.value,nextValue:null},n.prevAnimate=new l.default.Value(a.ABOVE),n.currAnimate=new l.default.Value(a.VISIBLE),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.getDerivedStateFromProps=function(e,t){var n=t.prevValue,r=t.currValue,a=t.nextValue;return null==n&&r!==e.value?{prevValue:u.default.isFocused()?r:null,currValue:e.value}:null!=a&&a!==e.value?{nextValue:e.value}:null};var s=r.prototype;return s.componentDidUpdate=function(e,t){var n=this.state,r=n.prevValue,a=n.currValue;r!==t.prevValue&&null!=r&&this.animateBetween(r,a)},s.animateBetween=function(e,t){var n,r=this.props.forcePosition;this.prevAnimate.setValue(a.VISIBLE),null!=r?r===a.ABOVE?(this.currAnimate.setValue(a.ABOVE),n=a.BELOW):r===a.BELOW&&(this.currAnimate.setValue(a.BELOW),n=a.ABOVE):e>t?(this.currAnimate.setValue(a.ABOVE),n=a.BELOW):(this.currAnimate.setValue(a.BELOW),n=a.ABOVE),l.default.parallel([l.default.timing(this.prevAnimate,v(n)),l.default.timing(this.currAnimate,v(a.VISIBLE))]).start(this.animateNext)},s.getAnimatedStyle=function(e){return{transform:[{translateY:e.interpolate({inputRange:[0,1,2],outputRange:["-100%","0%","100%"]})}],position:"absolute",top:0,left:0,right:0,bottom:0}},s.getMinWidth=function(e){var t=this.props,n=t.digitWidth,r=t.padStartLength;if(null!=n){var a=Math.ceil(Math.log10(e+1));return r?Math.min(a,r)*n:a*n}},s.padValue=function(e){var t=this.props.padStartLength;return null!=t?String(e).padStart(t,"0"):e},s.render=function(){var e=this.state,t=e.prevValue,n=e.currValue,r=i.default.omit(this.props,["value","digitWidth","padStartLength","forcePosition"]);if(null==t)return o.createElement("div",c({},r,{style:{minWidth:this.getMinWidth(n)}}),this.padValue(n));var a=Math.max(t,n);return o.createElement("div",c({},r,{style:{position:"relative",overflow:"hidden"}}),f("div",{style:{visibility:"hidden",minWidth:this.getMinWidth(a)}},void 0,this.padValue(a)),f(l.default.div,{style:this.getAnimatedStyle(this.prevAnimate)},void 0,this.padValue(t)),f(l.default.div,{style:this.getAnimatedStyle(this.currAnimate)},void 0,this.padValue(n)))},r}(o.PureComponent);t.default=y,y.displayName="AnimatedCounter",y.Positions=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=h(n(0)),o=m(n(9)),i=n(123),l=m(n(8264)),u=m(n(278)),s=h(n(150)),d=n(121),f=m(n(8443)),c=n(8442),p=m(n(8641)),v=n(1),y=m(n(7341));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t,r,a,i,l,u,d){var f,c,p,m=t.guildMemberAvatar,_=e.author;e.type===v.MessageTypes.APPLICATION_COMMAND&&null==_.avatar&&null!=e.application?c=null!=(null===(p=e.application)||void 0===p?void 0:p.icon)?s.default.getApplicationIconURL({id:e.application.id,icon:e.application.icon}):n(1321):c=null!=m&&null!=a?(0,s.getGuildMemberAvatarURLSimple)({guildId:a,userId:_.id,avatar:m,canAnimate:r}):_.getAvatarURL(void 0,r);return E("img",{src:c,onClick:i,onContextMenu:l,onMouseDown:u,onKeyDown:d,"aria-hidden":!0,className:(0,o.default)((f={},f[y.default.avatar]=!0,f[y.default.clickable]=null!=i,f)),alt:" "})}g.displayName="renderAvatar";var S=function(e){var t=e.message,n=e.repliedMessage,r=e.compact,o=void 0!==r&&r,m=e.renderPopout,_=e.showTimestampOnHover,h=a.useMemo((function(){return null!=m?function(e){return m(e,t)}:void 0}),[m,t]),S=function(e,t,n){var r,o=e.message,f=e.author,c=e.compact,p=void 0!==c&&c,y=e.subscribeToGroupId,m=e.animate,_=void 0===m||m,h=e.onContextMenu,S=e.onClickAvatar,O=e.onPopoutRequestClose,I=e.showAvatarPopout,T=a.useState(!1),C=T[0],b=T[1],M=a.useContext(i.AccessibilityPreferencesContext).reducedMotion,N=null!==(r=f.guildMemberAvatar)&&void 0!==r?r:o.author.avatar,A=(0,s.isAnimatedIconHash)(N),P=!M.enabled&&(null!=y?C:_),R=o.author.id;if(a.useEffect((function(){if(A&&null!=y)return d.ComponentDispatch.subscribe(v.ComponentActions.ANIMATE_CHAT_AVATAR(y+":"+R),b),function(){d.ComponentDispatch.unsubscribe(v.ComponentActions.ANIMATE_CHAT_AVATAR(y+":"+R),b)}}),[R,A,y]),!p)return null!=n&&null!=I?E(u.default,{preload:o.author.bot?void 0:function(){return(0,l.default)(o.author.id,null!=f.guildMemberAvatar&&null!=t?(0,s.getGuildMemberAvatarURLSimple)({guildId:t,userId:o.author.id,avatar:f.guildMemberAvatar}):o.author.getAvatarURL(void 0))},renderPopout:n,shouldShow:I,position:u.default.Positions.RIGHT,onRequestClose:O},void 0,(function(e){return g(o,f,P,t,S,h,e.onMouseDown,e.onKeyDown)})):g(o,f,P,t,S,h)}(e,e.guildId,h),O=function(e,t){var n=e.message,r=e.author,o=e.compact,i=void 0!==o&&o,l=e.onContextMenu,u=e.showUsernamePopout,s=e.onClickUsername,d=e.onPopoutRequestClose;return a.createElement(a.Fragment,null,E(p.default,{message:n,author:r,compact:i,showPopout:u,renderPopout:t,onClick:s,onContextMenu:l,onPopoutRequestClose:d}),i&&a.createElement(a.Fragment,null,E("i",{className:y.default.separator},void 0,":")," "))}(e,h),I=n?(0,c.repliedMessageElementId)(t):void 0;return a.createElement(a.Fragment,null,S,E("h2",{className:y.default.header,"aria-describedby":I},void 0,o&&E(f.default,{compact:!0,timestamp:t.timestamp,isVisibleOnlyOnHover:_,isInline:!1}),E("span",{className:y.default.headerText},void 0,O),!o&&E(f.default,{timestamp:t.timestamp})))};t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(3)),a=p(n(28)),o=p(n(2)),i=p(n(106)),l=p(n(9594)),u=p(n(1323)),s=p(n(9596)),d=p(n(9597)),f=p(n(9598)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(){return(y=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}).apply(this,arguments)}var m=[{type:c.ChannelNoticeTypes.MFA_WARNING,store:s.default},{type:c.ChannelNoticeTypes.INVITE,store:d.default},{type:c.ChannelNoticeTypes.QUICKSWITCHER,store:u.default},{type:c.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS_GUILD_AFFINITY,store:l.default},{type:c.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS,store:f.default}],_={},h=0,E=!1,g=0;function S(){a.default.set("channelNotices",_),a.default.set("lastHiddenChannelNotice",h)}var O=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var o=r.prototype;return o.initialize=function(){var e=a.default.get("channelNotices")||{};h=a.default.get("lastHiddenChannelNotice")||0,Object.keys(c.ChannelNoticeTypes).forEach((function(e){return _[e]=!0})),Object.keys(e).forEach((function(t){_[t]&&"boolean"==typeof e[t]&&(_[t]=e[t])})),S(),this.waitFor.apply(this,m.map((function(e){return e.store})))},o.getNotice=function(e){var t=this.getState(),n=t.noticeStates,r=t.lastHidden;return E&&null!=e?m.find((function(t){var a=t.store,o=t.type;return a.channelNoticePredicate(n[o],e,r)})):null},o.getState=function(){return E?{noticeStates:_,lastHidden:h}:{noticeStates:{},lastHidden:0}},o.shouldShowInviteNotice=function(){return a.default.get("showInviteNotice")||!1},o.getVersion=function(){return g},r}(r.default.Store))(o.default,{CONNECTION_OPEN:function(e){return E=!0,void(g+=1)},CONNECTION_CLOSED:function(e){return E=!1,void(g+=1)},CHANNEL_NOTICE_HIDE:function(e){var t=e.noticeType,n=e.suppressAnalyticsTracking;_[t]=!1,_=y({},_),t!==c.ChannelNoticeTypes.MFA_WARNING&&(h=Date.now()),S(),n||i.default.trackWithMetadata(c.AnalyticEvents.CHANNEL_NOTICE_CLOSED,{notice_type:t}),g+=1}});t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 32 32"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M16.5 1.46002L24.62 9.58002L20.62 11.23L16.5 7.12002V1.46002ZM11 12.16L7 10.5V21.42L11 19.76V12.16ZM16.5 24.8001V30.4601L24.62 22.3401L20.62 20.6801L16.5 24.8001ZM15.5 7.12004V1.46004L7.38 9.58004L11.38 11.23L15.5 7.12004ZM15.5 30.46L7.38 22.34L11.38 20.68L15.5 24.8V30.46ZM21 19.76L25 21.42V10.5L21 12.16V19.76ZM16 8.03003L20 12.03V19.89L16 23.89L12 19.89V12.03L16 8.03003Z"}))}d.displayName="PremiumGuildTier2"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPerkIcon=function(e,t){if(t)return{icon:a.default,className:v.default.unlocked};switch(e){case p.PerkIcons.EMOJI:return{icon:o.default,className:(0,r.default)(v.default.icon,v.default.emoji)};case p.PerkIcons.AUDIO:return{icon:i.default,className:(0,r.default)(v.default.icon,v.default.audio)};case p.PerkIcons.ANIMATED:return{icon:l.default,className:(0,r.default)(v.default.icon,v.default.animated)};case p.PerkIcons.CUSTOMIZATION:return{icon:u.default,className:(0,r.default)(v.default.icon,v.default.customization)};case p.PerkIcons.UPLOAD:return{icon:c.default,className:(0,r.default)(v.default.icon,v.default.upload)};case p.PerkIcons.VANITY:return{icon:s.default,className:(0,r.default)(v.default.icon,v.default.vanity)};case p.PerkIcons.STREAM:return{icon:f.default,className:(0,r.default)(v.default.icon,v.default.stream)};case p.PerkIcons.STICKER:return{icon:d.default,className:(0,r.default)(v.default.icon,v.default.sticker)}}throw new Error("Unexpected perk icon "+e)};var r=y(n(9)),a=y(n(372)),o=y(n(5954)),i=y(n(1240)),l=y(n(8885)),u=y(n(9604)),s=y(n(8625)),d=y(n(8627)),f=y(n(5955)),c=y(n(5980)),p=n(5935),v=y(n(7593));function y(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Steps=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=R(n(480)),l=R(n(23)),u=n(3),s=n(5946),d=n(6004),f=R(n(5673)),c=R(n(15)),p=R(n(8568)),v=R(n(361)),y=R(n(5832)),m=R(n(29)),_=R(n(61)),h=R(n(371)),E=R(n(6005)),g=R(n(5942)),S=n(85),O=n(35),I=R(n(47)),T=R(n(24)),C=R(n(13)),b=n(5935),M=R(n(9606)),N=n(1),A=R(n(6)),P=R(n(7597));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}t.Steps=a,function(e){e.UNUSED_QUANTITY_SELECT="UNUSED_QUANTITY_SELECT",e.GUILD_SELECT="GUILD_SELECT",e.CONFIRM="CONFIRM",e.SUCCESS="SUCCESS"}(a||(t.Steps=a={}));var j=function(e){var t,n,r,R=e.userPremiumGuildSubscriptionSlots,L=e.selectedGuild,j=e.locationSection,k=e.transitionState,U=e.onClose,G=(0,b.getAvailableUserPremiumGuildSubscriptionSlots)(y.default.slots);(0,l.default)(null!=R||null!=L,"Must either provide slots or an initial selected guild"),(0,l.default)(!(null==R?void 0:R.some((function(e){return e.isOnCooldown()}))),"If slots are provided, they must not be on cooldown");var F=[null==R?a.UNUSED_QUANTITY_SELECT:null,null==L?a.GUILD_SELECT:null,a.CONFIRM,a.SUCCESS].filter((function(e){return null!=e})),B=(0,u.useStateFromStores)([v.default],(function(){return v.default.getFlattenedGuilds()})),H=(0,u.useStateFromStoresArray)([p.default],(function(){return[p.default.isModifyingSubscription,p.default.subscribeError]})),x=H[0],V=H[1],W=o.useState(""),Y=W[0],z=W[1],K=o.useState(F[0]),$=K[0],Z=K[1],q=o.useState(!1),X=q[0],J=q[1],Q=o.useState(L),ee=Q[0],te=Q[1],ne=o.useState(null!=R?R:G.slice(0,1)),re=ne[0],ae=ne[1],oe=o.useMemo((function(){return null==re?[]:re.map((function(e){var t=e.premiumGuildSubscription;return c.default.getGuild(null==t?void 0:t.guildId)})).filter((function(e){return null!=e}))}),[re]),ie=o.useMemo((function(){var e;return null!=(null==re||null===(e=re[0])||void 0===e?void 0:e.premiumGuildSubscription)}),[re]),le=function(){U($===a.SUCCESS),C.default.track(N.AnalyticEvents.MODAL_DISMISSED,{type:N.AnalyticsSections.PREMIUM_GUILD_SUBSCRIBE_MODAL,location_section:j})},ue=((t={})[a.UNUSED_QUANTITY_SELECT]={body:function(){return(0,l.default)(!(null==R&&0===G.length),"Cannot provide no slots if there are no other available slots"),w("div",{className:P.default.quantitySelectorBody},void 0,w(I.default,{size:I.default.Sizes.SIZE_16,className:P.default.quantitySelectorHeader},void 0,A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_UNUSED_SLOTS_HEADER),w(T.default,{size:T.default.Sizes.SIZE_16,className:P.default.quantitySelectorDescription},void 0,A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_UNUSED_SLOTS_DESCRIPTION),w("div",{className:P.default.quantitySelectorWrapper},void 0,w(E.default,{value:re.length,onChange:function(e){return ae(G.slice(0,e))},minValue:1,maxValue:G.length}),w(T.default,{className:P.default.quantitySelectorLabel,size:T.default.Sizes.SIZE_16},void 0,A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_UNUSED_SLOTS_COUNTER)))},footer:function(){return w(O.ModalFooter,{},void 0,w(m.default,{onClick:function(){return Z(a.CONFIRM)}},void 0,A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_UNUSED_SLOTS_NEXT),w(m.default,{look:m.default.Looks.LINK,color:m.default.Colors.PRIMARY,onClick:le},void 0,A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_UNUSED_SLOTS_CANCEL))}},t[a.GUILD_SELECT]={header:function(e){return w(O.ModalHeader,{className:P.default.selectHeaderContainer,id:e},void 0,w(I.default,{className:P.default.selectHeader,size:I.default.Sizes.SIZE_16},void 0,ie?A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_SELECT_GUILD_TRANSFER_HEADER:A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_SELECT_GUILD_HEADER),w(g.default,{size:g.default.Sizes.MEDIUM,placeholder:A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_SEARCH_GUILD_PLACEHOLDER,className:P.default.selectSearch,query:Y,onChange:z,onClear:function(){return z("")}}))},bodyClass:P.default.selectContent,body:function(){return B.filter((function(e){return!oe.some((function(t){return t.id===e.id}))&&(Y.length<=0||(0,i.default)(Y.toLowerCase(),e.name.toLowerCase()))})).map((function(e){return w(_.default,{className:P.default.selectGuild,onClick:function(){te(e),Z(a.CONFIRM)}},e.id,w(h.default,{guild:e,size:h.default.Sizes.SMALL}),w(T.default,{className:P.default.selectGuildName,size:T.default.Sizes.SIZE_16},void 0,e.name))}))}},t[a.CONFIRM]={body:function(){if(null==ee)return null;var e=re.filter((function(e){return e.canceled})).length,t=re.length,n=oe.length;return ie?w(M.default.TransferBody,{fromGuilds:oe,toGuild:ee,blurb:A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_TRANSFER_BLURB.format({slotCount:t,guildCount:n}),imageClass:P.default.transferConfirmImage,error:X?V:null,onDismissError:function(){return J(!1)},slotCount:t,canceledCount:e}):w(M.default.SubscribeBody,{guild:ee,blurb:A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_BLURB,warning:A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_COOLDOWN_WARNING.format({days:N.PREMIUM_GUILD_SUBSCRIBE_COOLDOWN_DAYS,slotCount:t}),imageClass:P.default.confirmImage,error:X?V:null,onDismissError:function(){return J(!1)},slotCount:t,canceledCount:e})},footer:function(){var e=re.length,t=F[0]===a.CONFIRM?le:function(){return Z(F[F.indexOf($)-1])},n=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=ee&&0!==(null==re?void 0:re.length)){e.next=2;break}return e.abrupt("return");case 2:return(0,l.default)(!re.some((function(e){return e.isOnCooldown()})),"Cannot use a premium guild subscription slot while on cooldown"),e.prev=3,e.next=6,Promise.all(re.map((function(e){var t=e.premiumGuildSubscription;return null!=t?(0,s.unsubscribeFromGuild)(t.guildId,t.id):Promise.resolve()})));case 6:return e.next=8,(0,s.subscribeToGuild)(ee.id,re.map((function(e){return e.id})));case 8:Z(a.SUCCESS),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),J(!0);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){D(o,r,a,i,l,"next",e)}function l(e){D(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return w(M.default.Footer,{confirmation:ie?A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_TRANSFER_CONFIRM_CONFIRMATION.format({slotCount:e}):A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_CONFIRMATION.format({slotCount:e}),confirmationLabel:ie?A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_TRANSFER_CONFIRM_CONFIRMATION_LABEL.format({slotCount:e}):A.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_CONFIRMATION_LABEL.format({slotCount:e}),onConfirm:n,onCancel:t,isModifyingSubscription:x})}},t[a.SUCCESS]={body:function(){return w(d.PremiumGuildSubscriptionConfirmation,{guild:ee,isTransfer:ie,guildSubscriptionQuantity:re.length,onClose:le})}},t);o.useEffect((function(){C.default.track(N.AnalyticEvents.OPEN_MODAL,{type:N.AnalyticsSections.PREMIUM_GUILD_SUBSCRIBE_MODAL,location_section:j})}),[j]);var se=ue[$],de=(0,S.useUID)();return w(O.ModalRoot,{transitionState:k,className:P.default.modal,size:O.ModalSize.SMALL,"aria-labelledby":de},void 0,null===(n=se.header)||void 0===n?void 0:n.call(se,de),w(O.ModalContent,{className:se.bodyClass},void 0,w(f.default,{step:$,steps:F},void 0,se.body())),null===(r=se.footer)||void 0===r?void 0:r.call(se),w(O.ModalCloseButton,{className:P.default.modalCloseButton,onClick:le}))};j.displayName="PremiumGuildSubscribeModal";var k=j;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(35),i=n(698),l=d(n(9131)),u=d(n(6)),s=d(n(7604));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.channel,n=e.onClose,r=e.transitionState;return a.useEffect((function(){(0,i.trackThreadBrowserOpened)()}),[]),c(o.ModalRoot,{className:s.default.modal,transitionState:r,"aria-label":u.default.Messages.THREADS,size:o.ModalSize.DYNAMIC},void 0,c(l.default,{className:s.default.browser,channel:t,onClose:n}))}p.displayName="ThreadBrowserModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(29)),o=c(n(8750)),i=c(n(8287)),l=c(n(47)),u=c(n(24)),s=n(1209),d=c(n(6)),f=c(n(7602));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=v(i.default,{width:36,height:36});function m(e){var t=e.channel,n=e.header,r=e.startThread,i=(0,s.useCanStartPublicThread)(t),c=(0,s.useCanStartPrivateThread)(t);return v("div",{className:f.default.container},void 0,v("div",{className:f.default.iconContainer},void 0,v("div",{className:f.default.icon},void 0,y),v(o.default,{className:f.default.stars})),v(l.default,{className:f.default.header,size:l.default.Sizes.SIZE_24},void 0,n),v(u.default,{color:u.default.Colors.HEADER_SECONDARY,size:u.default.Sizes.SIZE_16},void 0,d.default.Messages.THREAD_BROWSER_EMPTY_STATE_SUBTEXT),i||c?v(a.default,{className:f.default.cta,onClick:r},void 0,d.default.Messages.CREATE_THREAD):null)}m.displayName="ThreadBrowserEmptyState"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(389),l=h(n(199)),u=h(n(8397)),s=h(n(10)),d=h(n(12)),f=h(n(61)),c=h(n(47)),p=h(n(8393)),v=n(392),y=h(n(1360)),m=h(n(8658)),_=h(n(7375));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var O=a.memo((function(e){var t=e.threadId,n=e.type,r=e.gotoThread,l=(0,o.useStateFromStores)([s.default],(function(){return s.default.getChannel(t)}));return g(f.default,{className:_.default.container,onClick:function(e){return r(l,e.shiftKey)},onContextMenu:function(e){return(0,i.openContextMenu)(e,(function(e){return a.createElement(u.default,S({},e,{channel:l}))}))}},void 0,g("div",{className:_.default.left},void 0,g(c.default,{className:_.default.threadName,size:c.default.Sizes.SIZE_16},void 0,l.name),(0,m.default)(l,n)),g(I,{channel:l}))}));function I(e){var t=e.channel,n=(0,o.useStateFromStores)([y.default],(function(){return y.default.getMemberIdsPreview(t.id)||[]})),r=(0,o.useStateFromStores)([y.default],(function(){var e;return null!==(e=y.default.getMemberCount(t.id))&&void 0!==e?e:0})),i=(0,o.useStateFromStoresArray)([d.default],(function(){return n.map((function(e){return d.default.getUser(e)}))}));return a.useEffect((function(){var e=n.filter((function(e,t){return null==i[t]}));e.length>0&&l.default.requestMembersById(t.guild_id,e)}),[]),0===n.length?null:g(p.default,{className:_.default.facepile,showDefaultAvatarsForNullUsers:!0,guildId:t.guild_id,users:i,count:r,max:v.MAX_THREAD_MEMBERS_PREVIEW})}t.default=O,I.displayName="Facepile"},function(e,t,n){e.exports=n.p+"0c9615349350c4185381d58c69b88cbc.svg"},function(e,t,n){e.exports=n.p+"d6ad2a5e5abb35e5fb3cb43e1c9c3b27.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openUserContextMenu=function(e,t,n){if(n.isGroupDM())(0,a.openContextMenu)(e,(function(e){return r.createElement(i.default,d({},e,{user:t,channel:n}))}));else if(n.isDM())(0,a.openContextMenu)(e,(function(e){return r.createElement(o.default,d({},e,{user:t,channel:n,showMute:!1}))}));else{var u=n.getGuildId();if(null==u)return;(0,a.openContextMenu)(e,(function(e){return r.createElement(l.default,d({},e,{user:t,channelId:n.id,guildId:u}))}))}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(389),o=u(n(8476)),i=u(n(8930)),l=u(n(8322));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.useStateFromStores)([s.default],(function(){return s.default.getId()===e}),[e]),r=(0,a.useStateFromStoresArray)([l.default],(function(){return[l.default.getParticipants(t),l.default.getParticipant(t,e)]}),[t,e]),f=r[0],c=r[1];if(n||0===f.length)return null;if(null==c)return p(u.MenuItem,{id:"ring",label:d.default.Messages.RING,action:function(){return o.default.ring(t,[e])}});if(c.type===i.ParticipantTypes.USER&&c.ringing)return p(u.MenuItem,{id:"stop-ringing",label:d.default.Messages.STOP_RINGING,action:function(){return o.default.stopRinging(t,[e])}});return null};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(728)),i=n(691),l=f(n(688)),u=n(8253),s=f(n(11)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=j;D(n(0));var r,a=n(389),o=R(n(8257)),i=n(286),l=R(n(8323)),u=R(n(8500)),s=R(n(8258)),d=D(n(8253)),f=R(n(8430)),c=R(n(11)),p=R(n(8378)),v=R(n(8379)),y=R(n(8380)),m=R(n(8340)),_=R(n(8384)),h=R(n(8385)),E=R(n(8607)),g=R(n(8386)),S=R(n(8505)),O=R(n(8343)),I=R(n(9651)),T=R(n(8929)),C=R(n(8387)),b=R(n(8324)),M=R(n(8407)),N=R(n(8388)),A=n(1),P=R(n(6));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e){var t=e.user,n=e.channel,r=e.target,R=e.context,L=e.showChatItems,D=void 0===L||L,j=e.showMediaItems,k=void 0!==j&&j,U=e.showChannelCallItems,G=void 0!==U&&U,F=e.showModalItems,B=void 0===F||F,H=e.analyticsContext,x=e.onSelect,V=(0,b.default)(t.id,null,R),W=(0,S.default)(t,null,R),Y=(0,T.default)(t.id,n.id),z=(0,O.default)(t.id,R),K=(0,h.default)(t,R),$=(0,y.default)({user:t,channelId:n.id,target:r,context:R}),Z=(0,v.default)(t),q=(0,M.default)(t.id),X=(0,I.default)(t.id,n.id),J=(0,C.default)(t.id),Q=(0,E.default)(t.id,n.id),ee=(0,m.default)(i.ApplicationCommandTarget.USER,n.id),te=(0,g.default)(t),ne=(0,l.default)(null,t),re=(0,p.default)(t),ae=(0,_.default)(t),oe=(0,s.default)(t.id),ie=(0,N.default)(t.id),le=(0,u.default)(n.id),ue=(0,f.default)(t);if(c.default.isGuest()||t.isNonUserBot())return null;var se=n.isManaged();return w(o.default,{context:H,object:A.AnalyticsObjects.CONTEXT_MENU},void 0,w(d.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":P.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:x},void 0,w(d.MenuGroup,{},void 0,ue),w(d.MenuGroup,{},void 0,B&&V,D&&W,z,K,!se&&Y,B&&$,B&&Z,ie),k&&w(d.MenuGroup,{},void 0,q),w(d.MenuGroup,{},void 0,!se&&X),w(d.MenuGroup,{},void 0,B&&ne),w(d.MenuGroup,{},void 0,k&&J,k&&Q,ee,B&&te,re,B&&ae),G&&w(d.MenuGroup,{},void 0,le),w(d.MenuGroup,{},void 0,oe)))}j.displayName="GroupDMUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){return e.type!==f.MessageTypes.REPLY||null==t?null:v(y,{baseMessage:e,referencedMessage:n,compact:r})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(706),l=c(n(70)),u=c(n(8442)),s=c(n(8361)),d=n(682),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=a.memo((function(e){var t=e.baseMessage,n=e.referencedMessage,r=e.compact,f=void 0!==r&&r,c=n.state===i.ReferencedMessageState.LOADED?n.message:void 0,p=a.useMemo((function(){return null!=c&&c.content?(0,s.default)(c,{formatInline:!0}).content:null}),[c]),y=(0,o.useStateFromStores)([l.default],(function(){return null!=c&&l.default.isBlocked(c.author.id)}),[c]),m=(0,d.useNullableMessageAuthor)(c),_=(0,d.useNullableMessageAuthor)(t);return v(u.default,{author:m,baseAuthor:_,baseMessage:t,referencedMessage:n,content:p,compact:f,isReplyAuthorBlocked:y})}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=n(92),i=n(3),l=j(n(5938)),u=j(n(185)),s=n(42),d=j(n(10)),f=j(n(249)),c=j(n(15)),p=j(n(40)),v=j(n(29)),y=j(n(61)),m=j(n(375)),_=j(n(371)),h=j(n(151)),E=j(n(149)),g=n(85),S=n(131),O=j(n(683)),I=j(n(8307)),T=n(35),C=j(n(47)),b=j(n(248)),M=j(n(24)),N=j(n(13)),A=j(n(8451)),P=n(8933),R=U(n(8523)),L=n(1),D=j(n(6)),w=j(n(7377));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var F=function(e){var t=e.channelData,n=e.onClose,r=e.trackOptionClick,a=(0,i.useStateFromStores)([d.default],(function(){return d.default.getChannel(t.channel_id)})),c=(0,i.useStateFromStores)([p.default],(function(){return null!=a&&p.default.can(o.Permissions.VIEW_CHANNEL,a)})),v=(0,i.useStateFromStores)([f.default],(function(){return null!=t.emoji_id?f.default.getCustomEmojiById(t.emoji_id):null}),[t.emoji_id]),m=null!=t.emoji_name?u.default.getByName(u.default.convertSurrogateToName(t.emoji_name,!1)):null;return null!=a&&c?G(y.default,{className:w.default.optionContainer,onClick:function(){r(),n(),(0,s.transitionToGuild)(a.guild_id,a.id)}},void 0,null!=v||null!=m?G(l.default,{emojiName:null!=t.emoji_id?null==v?void 0:v.name:t.emoji_name,animated:null!=v&&v.animated,emojiId:null==v?void 0:v.id,autoplay:!0,className:w.default.optionEmoji}):G(I.default,{className:w.default.channelIcon}),G("div",{className:w.default.optionTextContainer},void 0,G(M.default,{size:M.default.Sizes.SIZE_16,className:w.default.channelDescription},void 0,t.description),G(M.default,{size:M.default.Sizes.SIZE_12,color:M.default.Colors.HEADER_SECONDARY},void 0,"#"+a.name)),G(O.default,{direction:O.default.Directions.RIGHT,className:w.default.optionArrow})):null};F.displayName="WelcomeScreenModalOption";var B=function(e){var t,n=e.onClose,r=e.transitionState,o=e.guildId,l=e.isPreview,u=(0,i.useStateFromStores)([c.default],(function(){return c.default.getGuild(o)})),s=(0,i.useStateFromStoresObject)([R.default],(function(){return{welcomeScreen:R.default.get(o),fetching:R.default.isFetching(),hasError:R.default.hasError()}})),d=s.welcomeScreen,f=s.fetching,p=s.hasError,y=(0,g.useUID)();a.useEffect((function(){null==d&&A.default.fetchWelcomeScreen(o)}),[o,d]),a.useEffect((function(){!1===f&&!0===p&&n()}),[f,p,n]),a.useEffect((function(){d===R.NO_WELCOME_SCREEN&&n()}),[n,d]),a.useEffect((function(){!0!==l&&N.default.track(L.AnalyticEvents.OPEN_MODAL,{type:P.WELCOME_SCREEN_TYPE,guild_id:o})}),[o,l]);var O=a.useCallback((function(e){var t;if(null!=d&&!0!==l){var n=[],r=[],a=!1;null===(t=d.welcome_channels)||void 0===t||t.forEach((function(e){n.push(e.description),r.push(e.channel_id),null!=e.emoji_id&&(a=!0)})),N.default.track(L.AnalyticEvents.GUILD_WELCOME_SCREEN_OPTION_SELECTED,{index:e,guild_id:o,options:n,options_channel_ids:r,guild_description:d.description,has_custom_emojis:a})}}),[o,l,d]);return null==u?null:null==d?G(T.ModalRoot,{transitionState:r,className:w.default.main,"aria-label":D.default.Messages.LOADING},void 0,G(h.default,{type:h.default.Type.SPINNING_CIRCLE})):G(T.ModalRoot,{transitionState:r,className:w.default.main,"aria-labelledby":y},void 0,G(T.ModalCloseButton,{onClick:n,className:w.default.close}),G(b.default,{mask:b.default.Masks.SQUIRCLE,width:64,height:64,className:w.default.guildIcon},void 0,G(_.default,{size:_.default.Sizes.LARGER,guild:u,active:!0,animate:!0,tabIndex:-1})),G(C.default,{size:C.default.Sizes.SIZE_24,className:w.default.header,id:y},void 0,D.default.Messages.WELCOME_SCREEN_TITLE.format({guildName:u.name,guildNameHook:function(e,t){return G("span",{},t,G(m.default,{guild:u,className:w.default.headerGuildBadge,flowerStarClassName:w.default.flowerStar,tooltipColor:E.default.Colors.PRIMARY}),G("strong",{className:w.default.headerGuildName},void 0,e))}})),null!=d.description?G(M.default,{size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY,className:w.default.guildDescription},void 0,d.description):null,G(S.FormTitle,{className:w.default.choiceHeader},void 0,D.default.Messages.WELCOME_SCREEN_CHOICE_HEADER),G("div",{className:w.default.options},void 0,null===(t=d.welcome_channels)||void 0===t?void 0:t.map((function(e,t){return G(F,{channelData:e,trackOptionClick:function(){return O(t)},onClose:n},e.channel_id+"-"+t)}))),G(v.default,{look:v.default.Looks.LINK,color:w.default.skipColor,className:w.default.skip,onClick:n},void 0,D.default.Messages.WELCOME_SCREEN_SKIP))};B.displayName="WelcomeScreenModal";var H=B;t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WELCOME_EMOJI_TOOLTIP_STORAGE_KEY=t.WELCOME_SCREEN_TYPE=void 0;t.WELCOME_SCREEN_TYPE="Guild Welcome Screen";t.WELCOME_EMOJI_TOOLTIP_STORAGE_KEY="hasClickedWelcomeEmojiPicker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CallTileFit=t.CallTileOverlay=void 0;var r,a=F(n(0)),o=U(n(9)),i=n(3),l=n(34),u=U(n(288)),s=n(691),d=U(n(9138)),f=n(8661),c=U(n(11)),p=U(n(51)),v=U(n(61)),y=U(n(149)),m=F(n(9139)),_=U(n(1317)),h=U(n(8313)),E=U(n(9140)),g=U(n(1281)),S=U(n(1261)),O=U(n(8662)),I=U(n(8331)),T=U(n(8276)),C=U(n(8724)),b=U(n(24)),M=U(n(10931)),N=U(n(10932)),A=U(n(9655)),P=F(n(10935)),R=U(n(10941)),L=n(10353),D=U(n(10943)),w=n(1),j=U(n(6)),k=U(n(7402));function U(e){return e&&e.__esModule?e:{default:e}}function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function F(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function B(){return(B=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}).apply(this,arguments)}function H(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var V=a.memo((function(e){var t,n,r,y,_=e.participant,E=e.onDoubleClick,g=e.onContextMenu,S=e.onClick,O=e.onMouseDown,I=e.onKeyDown,T=e.className,C=e.style,b=e.channel,L=e.width,w=e.inPopout,j=e.onVideoResize,U=e.inCall,G=void 0!==U&&U,F=e.selected,B=void 0!==F&&F,H=e.noBorder,V=void 0!==H&&H,W=e.focused,Y=void 0!==W&&W,z=e.blocked,K=void 0!==z&&z,Z=e.fit,q=void 0===Z?m.default.Fit.CONTAIN:Z,X=e.paused,J=void 0!==X&&X,Q=e.pulseSpeakingIndicator,ee=void 0!==Q&&Q,te=a.useContext(f.IdleStateContext),ne=(0,i.useStateFromStores)([c.default],(function(){return c.default.getId()})),re=_.type===s.ParticipantTypes.ACTIVITY?null:null===(t=_.user)||void 0===t?void 0:t.id,ae=(0,i.useStateFromStores)([p.default],(function(){return null!=re&&p.default.isLocalVideoDisabled(re,(0,d.default)(_.type))}),[re,_.type]),oe=(0,D.default)(_,ne),ie=oe.speaking,le=oe.muted,ue=oe.deafen,se=oe.ringing,de=oe.hasVideo,fe=(0,i.useStateFromStores)([p.default],(function(){return null!=re&&p.default.isLocalMute(re,(0,d.default)(_.type))}),[re,_.type]),ce=_.type===s.ParticipantTypes.STREAM&&re===ne,pe=a.useCallback((function(){null!=re&&u.default.toggleLocalMute(re,l.MediaEngineContextTypes.STREAM)}),[re]),ve=a.useCallback((function(e){null==S||S(_,e)}),[S,_]),ye=a.useCallback((function(e){null==E||E(_,e)}),[E,_]),me=a.useCallback((function(e){null==g||g(_,e)}),[g,_]),_e=null,he=null,Ee=!0;switch(_.type){case s.ParticipantTypes.STREAM:_e=x(P.default,{participant:_,selected:B,width:L,fit:q,onVideoResize:j,paused:J,inPopout:w}),he=x(P.StreamTileIndicators,{participant:_,selected:B,width:L,focused:Y,idle:te}),Ee=!1;break;case s.ParticipantTypes.USER:_e=x(R.default,{channel:b,inCall:G,participant:_,fit:q,paused:J,selected:B,width:L,blocked:K,pulseSpeakingIndicator:ee});break;case s.ParticipantTypes.ACTIVITY:_e=x(N.default,{interactible:Y,participant:_,selected:B,channel:b,width:L})}var ge=a.useRef(null);return x("div",{className:(0,o.default)(k.default.wrapper,(n={},n[k.default.ringing]=se,n),T)},void 0,a.createElement(A.default,{ref:ge,className:(0,o.default)(k.default.tile,(r={},r[k.default.noBorder]=V,r[k.default.noInteraction]=null==S,r[k.default.idle]=te,r[k.default.videoLayer]=Ee,r)),noBorder:V,style:C},x(v.default,{focusProps:{ringTarget:ge,offset:1},onDoubleClick:ye,onContextMenu:me,onClick:ve,onMouseDown:O,onKeyDown:I,className:k.default.tileChild},void 0,_e,V?null:x("div",{className:k.default.indicators},void 0,he),B?x("div",{className:k.default.selectedScreen},void 0,x(h.default,{className:k.default.selectedIcon})):null,x($,{focused:Y,width:L,inCall:G,participantType:_.type,hasVideo:null!=de&&de,muted:le,deafen:ue,idle:te,title:(0,M.default)(b,_),blocked:K,localMute:fe,localVideoDisabled:ae,hideAudioIcon:ce,onContextMenu:me,onToggleMute:pe}),G&&!V?x("div",{className:(0,o.default)(k.default.border,(y={},y[k.default.speaking]=ie&&!Y,y))}):null)))}));V.displayName="CallTile";var W=x(C.default,{width:20,height:20}),Y=x(T.default,{width:20,height:20}),z=x(I.default,{width:20,height:20}),K=x("div",{}),$=a.memo((function(e){var t,n,r=e.muted,i=e.deafen,u=e.idle,d=e.title,f=e.width,c=e.hasVideo,m=e.inCall,I=e.localMute,T=e.localVideoDisabled,C=e.focused,M=e.blocked,N=e.hideAudioIcon,A=e.participantType,P=e.onContextMenu,R=e.onToggleMute,D=null,U=null,G=null,F=(0,L.isVideoCompact)(f),V=(0,L.isNamesCompact)(f);N||(i||r||I?(D=x(i?g.default:S.default,{foreground:(0,o.default)((n={},n[k.default.localMuteStrikethrough]=I&&!i,n)),className:k.default.status}),I&&A===s.ParticipantTypes.STREAM&&c&&!C&&(D=x(y.default,{text:j.default.Messages.UNMUTE},void 0,(function(e){var t=e.onClick,n=H(e,["onClick"]);return a.createElement(v.default,B({},n,{onClick:function(e){e.stopPropagation(),null==t||t(),R()},className:(0,o.default)(k.default.status,k.default.interactive)}),W)})))):I||A!==s.ParticipantTypes.STREAM||!c||F||C||(D=x(y.default,{text:j.default.Messages.MUTE},void 0,(function(e){var t=e.onClick,n=H(e,["onClick"]);return a.createElement(v.default,B({},n,{onClick:function(e){e.stopPropagation(),null==t||t(),R()},className:(0,o.default)(k.default.status,k.default.interactive,k.default.toggleMute)}),Y)}))));return m&&p.default.supports(l.Features.VIDEO)||!c||(U=x(h.default,{className:k.default.status})),m&&c&&T&&(U=x(E.default,{className:k.default.status,foreground:k.default.localMuteStrikethrough})),A===s.ParticipantTypes.STREAM&&!C&&c&&(G=x(y.default,{text:j.default.Messages.OPTIONS},void 0,(function(e){var t=e.onClick,n=H(e,["onClick"]);return a.createElement(v.default,B({},n,{onClick:function(e){e.stopPropagation(),null==t||t(),P(e)},className:(0,o.default)(k.default.status,k.default.interactive)}),z)}))),x("div",{className:k.default.overlay},void 0,V||C?K:x(b.default,{className:(0,o.default)(k.default.overlayTitle,(t={},t[k.default.idle]=u,t)),color:b.default.Colors.CUSTOM,size:b.default.Sizes.SIZE_16},void 0,M?x("div",{className:k.default.blocked},void 0,x(_.default,{className:k.default.blockedIcon,color:w.Colors.STATUS_RED})):null,A===s.ParticipantTypes.STREAM&&x(O.default,{className:k.default.titleIcon}),x("span",{className:k.default.overlayTitleText},void 0,d)),x("div",{className:k.default.statusContainer},void 0,U,D,G))}));t.CallTileOverlay=$,$.displayName="CallTitleOverlay";var Z=m.VideoStreamFit;t.CallTileFit=Z;var q=V;t.default=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=n(3),l=p(n(9141)),u=p(n(55)),s=p(n(151)),d=p(n(24)),f=p(n(6)),c=p(n(7620));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y(s.default,{});function _(e){var t=e.isLoading,n=e.noText,r=e.className;return y(u.default,{className:(0,o.default)(c.default.emptyPreviewContainer,r),direction:u.default.Direction.VERTICAL,align:u.default.Align.CENTER,justify:u.default.Justify.CENTER},void 0,t?m:a.createElement(a.Fragment,null,y("div",{className:c.default.emptyPreviewImage}),n?null:y(d.default,{size:d.default.Sizes.SIZE_14,color:d.default.Colors.CUSTOM,className:c.default.emptyPreviewText},void 0,f.default.Messages.STREAM_NO_PREVIEW)))}function h(e){var t=e.stream,n=e.className,r=e.noText,u=void 0!==r&&r,s=(0,i.useStateFromStoresObject)([l.default],(function(){return{url:l.default.getPreviewURL(t.guildId,t.channelId,t.ownerId),isLoading:l.default.getIsPreviewLoading(t.guildId,t.channelId,t.ownerId)}})),d=s.url,f=s.isLoading,p=a.useRef(f?null:d);a.useEffect((function(){f||(p.current=d)}),[d,f]);var v=null==d||f?p.current:d;return null==v?y(_,{className:n,isLoading:f,noText:u}):y("div",{className:(0,o.default)(n,c.default.root)},void 0,y("img",{src:v,alt:"",className:c.default.image}))}_.displayName="DefaultFallback",h.displayName="StreamPreview"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){r.default.embedded?a.default.focus():window.focus()};var r=o(n(16)),a=o(n(43));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoButtonWrapper=m,t.default=_;var r,a=c(n(0)),o=d(n(9)),i=n(6129),l=d(n(8313)),u=c(n(8288)),s=d(n(7958));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function m(e){var t=(0,i.getVideoButtonLabel)(e),n=e.enabled,r=e.cameraUnavailable,o=e.onChange,u=e.onCameraUnavailable,s=e.hasPermission,d=e.children,f=e.channelLimitReached,c=void 0!==f&&f,p=r?function(){return u()}:function(){return o(!e.enabled)};return a.createElement(a.Fragment,null,d({onClick:p,active:n,disabled:!s||c&&!n,iconComponent:l.default,label:t,unavailable:r}))}function _(e){var t=e.enabled,n=e.join,r=e.channel,i=e.onChange,l=e.onCameraUnavailable,d=e.cameraUnavailable,f=e.hasPermission,c=e.className,_=e.channelLimitReached,h=e.channelLimit,E=e.centerButton,g=void 0!==E&&E,S=y(e,["enabled","join","channel","onChange","onCameraUnavailable","cameraUnavailable","hasPermission","className","channelLimitReached","channelLimit","centerButton"]),O=g?u.CenterControlButton:u.default;return p(m,{enabled:t,join:n,channel:r,onChange:i,onCameraUnavailable:l,cameraUnavailable:d,hasPermission:f,channelLimitReached:_,channelLimit:h},void 0,(function(e){var t,n=e.unavailable,r=y(e,["unavailable"]);return a.createElement(O,v({className:(0,o.default)(c,(t={},t[s.default.fauxDisabled]=n,t))},r,S))}))}_.displayName="VideoButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M21.1169 1.11603L22.8839 2.88403L19.7679 6.00003L22.8839 9.11603L21.1169 10.884L17.9999 7.76803L14.8839 10.884L13.1169 9.11603L16.2329 6.00003L13.1169 2.88403L14.8839 1.11603L17.9999 4.23203L21.1169 1.11603ZM18 22H13C6.925 22 2 17.075 2 11V6C2 5.447 2.448 5 3 5H7C7.553 5 8 5.447 8 6V10C8 10.553 7.553 11 7 11H6C6.063 14.938 9 18 13 18V17C13 16.447 13.447 16 14 16H18C18.553 16 19 16.447 19 17V21C19 21.553 18.553 22 18 22Z"}))}d.displayName="CallLeave"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{className:e.className,width:n,height:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,o("path",{className:e.foreground,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}i.displayName="Screenshare"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOtherStreams=M,t.default=N;var r,a=C(n(0)),o=n(3),i=n(34),l=I(n(8257)),u=I(n(688)),s=I(n(8941)),d=I(n(9663)),f=I(n(5966)),c=C(n(8253)),p=I(n(163)),v=I(n(51)),y=I(n(12)),m=I(n(8939)),_=I(n(8520)),h=I(n(9144)),E=I(n(258)),g=I(n(16)),S=n(1),O=I(n(6));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t,n){var r=(0,o.useStateFromStores)([u.default],(function(){return u.default.getSelectedParticipantId(e.id)})),a=(0,o.useStateFromStores)([p.default],(function(){return null!=r?p.default.getActiveStreamForStreamKey(r):null}),[r]);return(0,o.useStateFromStoresArray)([y.default],(function(){var r=n.filter((function(e){return e.ownerId!==t.id})).map((function(t){return{stream:t,username:E.default.getName(e.getGuildId(),e.id,y.default.getUser(t.ownerId))}}));return 1===r.length&&r[0].stream.ownerId===(null==a?void 0:a.ownerId)?[]:r}),[e,a,n])}function N(e){var t,n=e.channel,r=e.currentUser,o=e.activeStreams,u=e.hideSelfOptions,p=void 0!==u&&u,y=e.showReportOption,E=void 0!==y&&y,I=e.handleGoLive,T=e.onClose,C=e.onSelect,N=e.appContext,A=void 0===N?S.AppContext.APP:N,P=v.default.supports(i.Features.DESKTOP_CAPTURE_APPLICATIONS),R=null!==(t=o.find((function(e){return e.ownerId===r.id})))&&void 0!==t?t:null,L=M(n,r,o),D=(0,d.default)(R,A),w=(0,s.default)(R,A,S.NOOP_NULL),j=null==R?b(c.MenuItem,{id:"share-your-screen",label:O.default.Messages.SHARE_YOUR_SCREEN,icon:m.default,action:I}):a.createElement(a.Fragment,null,g.default.embedded?b(c.MenuItem,{id:"stream-settings",label:O.default.Messages.SCREENSHARE_STREAM_QUALITY},void 0,D):null,E?w:null,P?b(c.MenuItem,{id:"change-windows",label:O.default.Messages.SCREENSHARE_CHANGE_WINDOWS,icon:m.default,action:I}):null,b(c.MenuItem,{id:"stop-streaming",label:O.default.Messages.STOP_STREAMING,icon:_.default,action:function(){return(0,f.default)(R)}}));return b(l.default,{section:S.AnalyticsSections.CONTEXT_MENU},void 0,b(c.default,{onSelect:C,navId:"manage-streams",onClose:T,"aria-label":null!=R?O.default.Messages.STOP_STREAMING:O.default.Messages.SHARE_YOUR_SCREEN},void 0,b(c.MenuGroup,{},void 0,L.map((function(e){var t=e.stream,n=e.username;return b(c.MenuItem,{id:t.ownerId,label:O.default.Messages.STOP_WATCHING_USER.format({username:n}),icon:h.default,action:function(){return(0,f.default)(t)}},"manage-stream-menu"+t.ownerId)}))),p?null:j))}N.displayName="ManageStreamsMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(726),l=v(n(9662)),u=n(8253),s=v(n(11)),d=v(n(256)),f=v(n(1270)),c=n(41),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n){var r=(0,o.useStateFromStores)([d.default],(function(){return(0,i.getStreamerApplication)(e,d.default)}),[e]),v=(0,o.useStateFromStores)([s.default],(function(){return s.default.getId()})),y={media_session_id:f.default.getActiveMediaSessionId(),rtc_connection_id:f.default.getActiveRTCConnectionId()};return null==e?null:m(u.MenuItem,{id:"report-stream-problem",label:p.default.Messages.STREAM_REPORT_PROBLEM_MENU_ITEM,action:function(){null==n||n(),null!=e&&(0,c.openModal)((function(t){return a.createElement(l.default,_({stream:e,streamApplication:r,isStreamer:v===(null==e?void 0:e.ownerId),analyticsData:y},t))}))}})}h.displayName="useReportProblemItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-03_stream_extended_quality_settings",label:"Stream Extended Quality Settings",defaultConfig:{showExtendedSettings:!1},treatments:[{id:1,label:"Shows extra stream quality settings",config:{showExtendedSettings:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var a=n[t],o=e[a];if(null!=o&&null==o.error&&r.has(a))return!0}return!1},t.SUPPORTED_HARDWARE_ACCEL_VENDORS=void 0;var r=new Set(["nvidia"]);t.SUPPORTED_HARDWARE_ACCEL_VENDORS=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=u[i.default.getPlatform()];if(null==t)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var a=r[n],l=e[a],s=t[a];if(null!=l&&null!=s&&null==l.error){var d=((f=l).major||0)+"."+(f.minor||0)+".0";if(!o.default.satisfies(d,s))return!0}}var f;return!1},t.REQUIRED_DRIVER_VERSIONS_BY_PLATFORM=void 0;var r,a,o=(r=n(1290))&&r.__esModule?r:{default:r},i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(16));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var u=((a={})[i.PlatformTypes.WINDOWS]={nvidia:">=397.93.0"},a);t.REQUIRED_DRIVER_VERSIONS_BY_PLATFORM=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(9)),o=c(n(180)),i=c(n(8449)),l=n(149),u=c(n(8393)),s=c(n(258)),d=c(n(6)),f=c(n(7624));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t,n=e.channel,r=e.users,c=e.selected,p=void 0!==c&&c,y=(0,o.default)(n),m=null;if(null!=r&&r.length>0){m=v(u.default,{guildId:n.guild_id,className:f.default.voiceUserList,users:r,renderUser:function(e){if(null==e)return null;var t=s.default.getName(n.guild_id,n.id,e),r=e.getAvatarURL(n.guild_id);return v(l.TooltipContainer,{text:t},void 0,v("img",{src:null!=r?r:void 0,"aria-label":e.username,alt:"",className:f.default.avatar}))},renderMoreUsers:function(e){var t=function(e,t){var n=t.id,r=t.guild_id;return e.length<=1?null:2===e.length?d.default.Messages.GO_LIVE_MODAL_OVERFLOW_TWO_USERS.format({nickname0:s.default.getName(r,n,e[0]),nickname1:s.default.getName(r,n,e[1])}):3===e.length?d.default.Messages.GO_LIVE_MODAL_OVERFLOW_THREE_USERS.format({nickname0:s.default.getName(r,n,e[0]),nickname1:s.default.getName(r,n,e[1]),nickname2:s.default.getName(r,n,e[2])}):d.default.Messages.GO_LIVE_MODAL_OVERFLOW_FOUR_OR_MORE_USERS.format({nickname0:s.default.getName(r,n,e[0]),nickname1:s.default.getName(r,n,e[1]),remainingCount:e.length-2})}(r.slice(4),n);return v("div",{},void 0,v(l.TooltipContainer,{text:t},void 0,v("div",{className:f.default.userListOverflow},void 0,e)))},max:5,showUserPopout:!1})}var _=(0,i.default)(n);return v("div",{className:(0,a.default)(f.default.channelInfo,(t={},t[f.default.selected]=p,t))},void 0,v(_,{className:f.default.channelIcon}),v("div",{className:f.default.channelName},void 0,y),m)}y.displayName="RadioItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.title,r=e.scrollerClassName,f=e.children,c=a.useRef(null),v=a.useState(!1),y=v[0],m=v[1],_=a.useState(!1),h=_[0],E=_[1],g=a.useCallback((function(){var e=c.current;null!=e&&(m(!e.isScrolledToTop()),E(!e.isScrolledToBottom()))}),[]);return a.useLayoutEffect((function(){return g()}),[]),a.createElement(a.Fragment,null,p("div",{className:(0,o.default)(d.default.title,d.default.scrollWrapper)},void 0,p(i.FormTitle,{className:s.default.formItemTitle},void 0,n),p(u.default,{separator:y})),p("div",{className:r},void 0,a.createElement(l.default,{ref:c,className:(0,o.default)(d.default.scrollerInner,(t={},t[d.default.bottomSeparator]=h,t)),onScroll:g},f)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(131),l=f(n(468)),u=f(n(8947)),s=f(n(7348)),d=f(n(7626));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7625));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t,n=e.separator,r=void 0!==n&&n;return u("div",{className:(0,a.default)(o.default.divider,(t={},t[o.default.separator]=r,t))})}s.displayName="Divider"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(7628))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e){var t=e.children;return l("div",{className:o.default.card},void 0,t)}u.displayName="RowCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(null==t)return e;return n.find((function(e){return(0,a.default)(t.id,e.windowHandle)}))};var r,a=(r=n(1302))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(61)),l=d(n(55)),u=n(1),s=d(n(7634));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(e){var n=t.props.onClick;return n&&n(t.props.option,e)},t}return p(t,e),t.prototype.render=function(){var e,t=this.props,n=t.selected,r=t.className,a=t.selectedClassName,l=this.props.option.name,u=((e={})[s.default.selected]=n,e);return a&&(u[a]=n),c(i.default,{className:(0,o.default)(s.default.item,r,u),onClick:this.handleClick},void 0,l)},t}(a.PureComponent);y.displayName="SegmentControlItem";var m=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var n=t.prototype;return n.renderItem=function(e){var t=this.props,n=t.value,r=t.optionClassName,a=t.selectedOptionClassName,o=n===e.value;return c(y,{selected:o,option:e,onClick:this.props.onChange,className:r,selectedClassName:a},e.value)},n.render=function(){var e=this.props.className;return c(l.default,{className:(0,o.default)(s.default.container,e),shrink:0},void 0,this.props.options.map(this.renderItem,this))},t}(a.PureComponent);m.displayName="SegmentControl",m.defaultProps={options:[],onChange:u.NOOP,value:null};var _=m;t.default=_},function(e,t,n){var r={"./amsterdam.png":9679,"./brazil.png":9680,"./dubai.png":9681,"./eu-central.png":9682,"./eu-west.png":9683,"./europe.png":9684,"./frankfurt.png":9685,"./hongkong.png":9686,"./india.png":9687,"./japan.png":9688,"./london.png":9689,"./russia.png":9690,"./singapore.png":9691,"./south-korea.png":9692,"./southafrica.png":9693,"./sydney.png":9694,"./unknown.png":8454,"./us-central.png":9695,"./us-east.png":9696,"./us-south.png":9697,"./us-west.png":9698};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8951},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{d:"M19 3H4.99C3.88 3 3.01 3.89 3.01 5L3 19C3 20.1 3.88 21 4.99 21H19C20.1 21 21 20.1 21 19V5C21 3.89 20.1 3 19 3ZM19 15H15C15 16.66 13.65 18 12 18C10.35 18 9 16.66 9 15H4.99V5H19V15Z",fill:d,className:f}))}d.displayName="Inbox"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={setGuildFilter:function(e){var t=e.guildFilter,n=e.roleFilter,r=e.everyoneFilter;a.default.dispatch({type:o.ActionTypes.SET_RECENT_MENTIONS_FILTER,guildFilter:t,roleFilter:n,everyoneFilter:r})},truncateMentions:function(e){a.default.dirtyDispatch({type:o.ActionTypes.TRUNCATE_MENTIONS,size:e})},fetchRecentMentions:function(e,t,n,i,l){void 0===t&&(t=o.MAX_MENTIONS_PER_FETCH),void 0===n&&(n=null),void 0===i&&(i=!0),void 0===l&&(l=!0),a.default.dirtyDispatch({type:o.ActionTypes.LOAD_RECENT_MENTIONS,guildId:n}),r.default.get({url:o.Endpoints.MENTIONS,query:{before:e,limit:t,guild_id:n,roles:i,everyone:l},retries:2,oldFormErrors:!0}).then((function(t){var n=t.body;a.default.dispatch({type:o.ActionTypes.LOAD_RECENT_MENTIONS_SUCCESS,messages:n,isAfter:null!=e,hasMoreAfter:n.length>=o.MAX_MENTIONS_PER_FETCH})}),(function(){a.default.dispatch({type:o.ActionTypes.LOAD_RECENT_MENTIONS_FAILURE})}))},deleteRecentMention:function(e){r.default.delete({url:o.Endpoints.MENTIONS_MESSAGE_ID(e),retries:2,oldFormErrors:!0}),a.default.dispatch({type:o.ActionTypes.RECENT_MENTION_DELETE,id:e})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.useStateFromStores)([i.default],(function(){return i.default.keyboardModeEnabled})),l=r.useCallback((function(e){var n=document.querySelector(e),r=t.current;null!=n&&null!=r&&(n.focus(),r.scrollIntoViewNode({node:n,padding:80}))}),[t]),u=r.useCallback((function(){return new Promise((function(e){var n=t.current;if(null==n)return e();n.scrollTo({to:0,callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[t]),s=r.useCallback((function(){return new Promise((function(e){var n=t.current;if(null==n)return e();n.scrollTo({to:Number.MAX_SAFE_INTEGER,callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[t]);return(0,a.default)({id:e,isEnabled:n,setFocus:l,scrollToStart:u,scrollToEnd:s})};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(680)),o=n(3),i=l(n(105));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=re(n(3)),o=n(34),i=re(n(1351)),l=re(n(28)),u=re(n(2)),s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ne();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(287)),d=n(1150),f=re(n(183)),c=n(141),p=re(n(187)),v=re(n(412)),y=re(n(8797)),m=re(n(182)),_=n(280),h=re(n(8759)),E=re(n(708)),g=n(304),S=re(n(712)),O=re(n(16)),I=re(n(96)),T=re(n(107)),C=re(n(11)),b=re(n(9152)),M=re(n(738)),N=re(n(8760)),A=re(n(10)),P=re(n(709)),R=re(n(9708)),L=re(n(9154)),D=re(n(1353)),w=re(n(405)),j=re(n(71)),k=re(n(56)),U=re(n(15)),G=re(n(51)),F=re(n(8359)),B=re(n(40)),H=re(n(9709)),x=re(n(94)),V=re(n(79)),W=re(n(36)),Y=re(n(9155)),z=re(n(160)),K=re(n(9710)),$=re(n(8957)),Z=re(n(12)),q=re(n(80)),X=re(n(1147)),J=re(n(5959)),Q=re(n(5826)),ee=re(n(1167)),te=n(1);function ne(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ne=function(){return e},e}function re(e){return e&&e.__esModule?e:{default:e}}function ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oe(){return(oe=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}).apply(this,arguments)}var ie=((r={})[te.NoticeTypes.DOWNLOAD_NAG]="hideNag",r[te.NoticeTypes.NOTIFICATION_NAG]="hideNotificationNag",r[te.NoticeTypes.CONNECT_SPOTIFY]="hideConnectSpotify",r[te.NoticeTypes.PREMIUM_PROMO]="hidePremiumPromo",r[te.NoticeTypes.MFA_SMS_BACKUP]="hideMFASMSNotice",r[te.NoticeTypes.PREMIUM_GRANDFATHERED_ENDING]="hidePremiumGrandfatheredEnding",r[te.NoticeTypes.PREMIUM_GRANDFATHERED_ENDED]="hidePremiumGrandfatheredEnded",r[te.NoticeTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL]="hideDetectedOffPlatformPremiumPerkUpsell",r[te.NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING]="hidePremiumTier2TrialEnding",r[te.NoticeTypes.INCENTIVIZED_INSTALL]="hideIncentivizedUpsell",r),le=new Set([te.NoticeTypes.NO_INPUT_DETECTED,te.NoticeTypes.STREAMER_MODE,te.NoticeTypes.NOTIFICATION_NAG,te.NoticeTypes.VIDEO_UNSUPPORTED_BROWSER,te.NoticeTypes.SPOTIFY_AUTO_PAUSED,te.NoticeTypes.DISPATCH_ERROR,te.NoticeTypes.DISPATCH_ERROR,te.NoticeTypes.DISPATCH_INSTALL_SCRIPT_PROGRESS,te.NoticeTypes.NOISE_DETECTED]),ue={},se=Object.freeze({id:null,message:null,buttonText:null,callback:null,metadata:null}),de=null;function fe(e,t){if(null!=e){var n=ie[e];null==n||t||l.default.set(n,!0),le.has(e)&&(ue[e]=!0),e===te.NoticeTypes.PREMIUM_PROMO&&(0,d.setFlag)(te.UserFlags.PREMIUM_PROMO_DISMISSED,!0)}}function ce(e){if(null==e)return!1;var t=ue[e];if(t)return!0;var n=ie[e];return n?l.default.get(n):!!le.has(e)&&t}function pe(){var e,t;if(!P.default.isConnected())return!1;de=null;var n,r=Z.default.getCurrentUser(),a=X.default.getPremiumSubscription(),l=null!=a?a.planId:null,u=W.default.getVoiceChannelId(),s=null!=u&&q.default.hasVideo(u),d=null!=u?q.default.getVoiceStateForChannel(u):null,C=(0,g.getAudienceRequestToSpeakState)(d),b=T.default.getGuildId(),N=A.default.getChannel(u),U=(null==N?void 0:N.isGuildStageVoice())&&(null==d?void 0:d.suppress),B=R.default.getDetectedOffPlatformPremiumPerks(),$=L.default.getLastError(),Q=D.default.getLastProgress(),ne=K.default.getCurrentSurvey(),re=S.default.isViewingRoles(b),ae=J.default.getUserTrialOffer(te.SubscriptionTrials[te.PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID].id);if(re)de=oe({},se,{type:te.NoticeTypes.VIEWING_ROLES});else if(C===g.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK)de=oe({},se,{type:te.NoticeTypes.INVITED_TO_SPEAK});else if(null!=b&&m.default.isLurking(b))de=oe({},se,{type:te.NoticeTypes.LURKING_GUILD});else if(null!=x.default.getRemoteDisconnectVoiceChannelId())de=oe({},se,{type:te.NoticeTypes.VOICE_DISABLED});else if(!1!==G.default.getInputDetected()||U)if(x.default.isConnected()&&G.default.isHardwareMute()){var ie=G.default.getInputDeviceId(),le=M.default.getVendor(ie),ue=M.default.getModel(ie);null!=le&&null!=ue&&(de=oe({},se,{type:te.NoticeTypes.HARDWARE_MUTE,metadata:{vendor:le,model:ue}}))}else if(null!=$)de=oe({},se,{type:te.NoticeTypes.DISPATCH_ERROR,metadata:{error:$}});else if(null!=Q)de=oe({},se,{type:te.NoticeTypes.DISPATCH_INSTALL_SCRIPT_PROGRESS,metadata:Q});else if(E.default.wasAutoPaused())de=oe({},se,{type:te.NoticeTypes.SPOTIFY_AUTO_PAUSED});else if(!ce(te.NoticeTypes.PREMIUM_GRANDFATHERED_ENDED)&&null!=l&&I.default.isGrandfathered(l)&&I.default.getDaysToGrandfatheredEnd(l)>=-14&&I.default.getDaysToGrandfatheredEnd(l)<=0&&!r.hasFreePremium())de=oe({},se,{type:te.NoticeTypes.PREMIUM_GRANDFATHERED_ENDED});else if(!ce(te.NoticeTypes.PREMIUM_GRANDFATHERED_ENDING)&&null!=l&&I.default.isGrandfathered(l)&&I.default.isWithinGrandfatheredUpgradeTime()&&!r.hasFreePremium()&&(null==a||null===(e=a.renewalMutations)||void 0===e?void 0:e.planId)!==te.SubscriptionPlans.PREMIUM_YEAR_TIER_2)de=oe({},se,{type:te.NoticeTypes.PREMIUM_GRANDFATHERED_ENDING,metadata:{plan:l}});else if(null==r||r.isClaimed())if(null!=b&&null!=r&&(null===(t=k.default.getMember(b,r.id))||void 0===t?void 0:t.isPending))de=oe({},se,{type:te.NoticeTypes.PENDING_MEMBER});else if(h.default.shouldShowOutboundPromotionNotice())de=oe({},se,{type:te.NoticeTypes.OUTBOUND_PROMOTION});else if(!O.default.embedded||i.default.supported()&&!w.default.isCorruptInstallation())if(!s||G.default.supports(o.Features.VIDEO)||ce(te.NoticeTypes.VIDEO_UNSUPPORTED_BROWSER))if(B.length>0&&I.default.canRedeemPremiumPerks(r)){var fe=B[0];de=oe({},se,{type:te.NoticeTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERK,metadata:fe})}else if(!ce(te.NoticeTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL)&&B.length>0){var pe=B[0];de=oe({},se,{type:te.NoticeTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL,metadata:pe})}else if(z.default.enabled)de=oe({},se,{type:te.NoticeTypes.STREAMER_MODE});else if(O.default.embedded||ce(te.NoticeTypes.DOWNLOAD_NAG))if(O.default.embedded||F.default.getDesktopType()!==te.DesktopNotificationTypes.NEVER||!ce(te.NoticeTypes.DOWNLOAD_NAG)||p.default.getUserExperimentBucket(v.default.NOTIFICATION_NAG)!==c.ExperimentBuckets.TREATMENT_1&&p.default.getUserExperimentBucket(v.default.NOTIFICATION_NAG)!==c.ExperimentBuckets.TREATMENT_2||ce(te.NoticeTypes.NOTIFICATION_NAG))if(n=Y.default.getScheduledMaintenance())de=oe({},se,{type:te.NoticeTypes.SCHEDULED_MAINTENANCE,metadata:{id:n.id,start:new Date(n.scheduled_for),end:new Date(n.scheduled_until)}});else if(null!=ne)de=oe({},se,{type:te.NoticeTypes.SURVEY,metadata:ne});else if(null==(null==r?void 0:r.email)||r.verified)if(E.default.hasConnectedAccount()||!V.default.isObservedAppRunning(f.default.get(te.PlatformTypes.SPOTIFY).name)||ce(te.NoticeTypes.CONNECT_SPOTIFY))if(null!=ae&&null!=ae.expires_at&&Date.parse(ae.expires_at)<Date.now()+_.USER_PREMIUM_TIER_2_TRIAL_EXPIRES_APPROACHING_THRESHOLD&&!ce(te.NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING))de=oe({},se,{type:te.NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING});else if(!ce(te.NoticeTypes.INCENTIVIZED_INSTALL)&&y.default.isEligible())de=oe({},se,{type:te.NoticeTypes.INCENTIVIZED_INSTALL});else if(null==r||I.default.isPremium(r)||r.hasFlag(te.UserFlags.PREMIUM_PROMO_DISMISSED)||!H.default.isEligible()||ce(te.NoticeTypes.PREMIUM_PROMO))if(null==r||!r.mfaEnabled||r.hasFlag(te.UserFlags.MFA_SMS)||r.hasFlag(te.UserFlags.STAFF)||r.hasFlag(te.UserFlags.PARTNER)||ce(te.NoticeTypes.MFA_SMS_BACKUP))if(null!=ee.default.testModeApplicationId){var ve=ee.default.testModeApplicationId,ye=j.default.getGame(ve),me=null!=ye?ye.name:ve;de=oe({},se,{type:te.NoticeTypes.APPLICATION_TEST_MODE,metadata:{applicationName:me,applicationId:ve}})}else G.default.getNoiseDetected()&&(de=oe({},se,{type:te.NoticeTypes.NOISE_DETECTED}));else de=oe({},se,{type:te.NoticeTypes.MFA_SMS_BACKUP});else de=oe({},se,{type:te.NoticeTypes.PREMIUM_PROMO});else de=oe({},se,{type:te.NoticeTypes.CONNECT_SPOTIFY});else de=oe({},se,{type:te.NoticeTypes.UNVERIFIED_ACCOUNT});else de=oe({},se,{id:te.NoticeTypes.NOTIFICATION_NAG,type:te.NoticeTypes.NOTIFICATION_NAG});else de=oe({},se,{type:te.NoticeTypes.DOWNLOAD_NAG});else de=oe({},se,{type:te.NoticeTypes.VIDEO_UNSUPPORTED_BROWSER});else de=oe({},se,{type:te.NoticeTypes.CORRUPT_INSTALLATION});else de=oe({},se,{type:te.NoticeTypes.UNCLAIMED_ACCOUNT});else de=oe({},se,{type:te.NoticeTypes.NO_INPUT_DETECTED});null!=de&&ce(de.type)&&(de=null)}function ve(){return z.default.enabled||delete ue[te.NoticeTypes.STREAMER_MODE],pe()}var ye=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ae(t,n);var a=r.prototype;return a.initialize=function(){this.syncWith([K.default,H.default,R.default,T.default,h.default,J.default,b.default,y.default],pe),this.waitFor(Z.default,Y.default,U.default,k.default,x.default,G.default,z.default,p.default,T.default,$.default,E.default,V.default,H.default,L.default,D.default,ee.default,F.default,X.default,w.default,R.default,N.default,B.default,h.default,Q.default,J.default)},a.hasNotice=function(){return null!=de&&null!=de.type},a.getNotice=function(){return null==$.default.getAction()?de:null},a.isNoticeDismissed=function(e){return ce(e)},r}(a.default.Store))(u.default,{CONNECTION_OPEN:function(e){return function(){if(!P.default.isConnected())return!1;var e=Z.default.getCurrentUser();I.default.isPremium(e)&&I.default.shouldCheckGrandfatheredPlan()&&u.default.wait((function(){return s.fetchSubscriptions()})),pe()}()},CURRENT_USER_UPDATE:function(e){return pe()},MEDIA_ENGINE_SET_AUDIO_ENABLED:function(e){return pe()},CLEAR_REMOTE_DISCONNECT_VOICE_CHANNEL_ID:function(e){return pe()},STATUS_PAGE_SCHEDULED_MAINTENANCE:function(e){return pe()},STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK:function(e){return pe()},GUILD_CREATE:function(e){return pe()},GUILD_DELETE:function(e){return pe()},AUDIO_INPUT_DETECTED:function(e){return pe()},AUDIO_SET_DISPLAY_SILENCE_WARNING:function(e){return pe()},CERTIFIED_DEVICES_SET:function(e){return pe()},AUDIO_SET_INPUT_DEVICE:function(e){return pe()},AUDIO_SET_OUTPUT_DEVICE:function(e){return pe()},MEDIA_ENGINE_DEVICES:function(e){return pe()},RTC_CONNECTION_STATE:function(e){return pe()},RPC_APP_AUTHENTICATED:function(e){return pe()},RPC_APP_DISCONNECTED:function(e){return pe()},USER_CONNECTIONS_UPDATE:function(e){return pe()},WINDOW_FOCUS:function(e){return pe()},INSTANT_INVITE_CREATE:function(e){return pe()},INSTANT_INVITE_REVOKE_SUCCESS:function(e){return pe()},SPOTIFY_PLAYER_PAUSE:function(e){return pe()},RUNNING_GAMES_CHANGE:function(e){return pe()},EXPERIMENTS_FETCH_SUCCESS:function(e){return pe()},PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS:function(e){return pe()},DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS:function(e){return pe()},DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL:function(e){return pe()},DEVELOPER_TEST_MODE_RESET:function(e){return pe()},BILLING_SUBSCRIPTION_FETCH_SUCCESS:function(e){return pe()},DISPATCH_APPLICATION_INSTALL:function(e){return pe()},CHANGE_LOG_OPEN:function(e){return pe()},VIEW_AS_ROLES_STOP:function(e){return pe()},VIEW_AS_ROLES_UPDATE:function(e){return pe()},GUILD_MEMBER_UPDATE:function(e){return pe()},NOISE_DETECTED:function(e){return pe()},SURVEY_FETCHED:function(e){return pe()},VOICE_STATE_UPDATE:function(e){return e.userId===C.default.getId()&&pe()},STREAMER_MODE_UPDATE:function(e){return ve()},RUNNING_STREAMER_TOOLS_CHANGE:function(e){return ve()},DISPATCH_APPLICATION_ERROR:function(e){return delete ue[te.NoticeTypes.DISPATCH_ERROR],pe()},DISPATCH_APPLICATION_LAUNCH_SETUP_START:function(e){return delete ue[te.NoticeTypes.DISPATCH_INSTALL_SCRIPT_PROGRESS],pe()},DISPATCH_APPLICATION_INSTALL_SCRIPTS_PROGRESS_UPDATE:function(e){return pe()},DISPATCH_APPLICATION_LAUNCH_SETUP_COMPLETE:function(e){return pe()},NOTICE_SHOW:function(e){de=e.notice},NOTICE_DISMISS:function(e){return null!=de&&((null==e.id||e.id===de.id)&&(fe(de.type,e.isTemporary),pe()))},NOTICE_DISABLE:function(e){return fe(e.noticeType),pe()},LOGOUT:function(e){return ue={},void(de=null)}});t.default=ye},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l=o.STATUS_PAGE_ENDPOINT+"/api/v2/scheduled-maintenances",u=o.STATUS_PAGE_ENDPOINT+"/api/v2/incidents/unresolved.json",s={checkIncidents:function(){Promise.all([r.default.get(l+"/active.json"),r.default.get(u)]).then((function(e){var t=e[0],n=e[1],r=t.body.scheduled_maintenances[0],i=n.body.incidents[0];a.default.dispatch({type:o.ActionTypes.STATUS_PAGE_INCIDENT,incident:i||r})}))},checkScheduledMaintenances:function(){r.default.get(l+"/upcoming.json").then((function(e){var t=e.body.scheduled_maintenances[0];a.default.dispatch({type:o.ActionTypes.STATUS_PAGE_SCHEDULED_MAINTENANCE,maintenance:t})}))},ackScheduledMaintenance:function(){a.default.dispatch({type:o.ActionTypes.STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK})}};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=null;function u(e){l=e.requiredAction}var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.hasAction=function(){return null!=l},a.getAction=function(){return l},r}(r.default.Store))(a.default,{CONNECTION_OPEN:u,USER_REQUIRED_ACTION_UPDATE:u});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=g(n(8)),a=g(n(3)),o=g(n(28)),i=n(206),l=g(n(2)),u=n(297),s=g(n(747)),d=g(n(685)),f=g(n(1307)),c=g(n(11)),p=g(n(10)),v=g(n(201)),y=g(n(70)),m=g(n(107)),_=g(n(39)),h=g(n(12)),E=n(1);function g(e){return e&&e.__esModule?e:{default:e}}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){return(I=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}).apply(this,arguments)}var T=[],C={},b=!1,M=!0,N=o.default.get("recentMentionFilterSettings",{guildFilter:E.RecentMentionsFilters.ALL_SERVERS,everyoneFilter:!0,roleFilter:!0}),A=!1,P=0,R=!1;function L(e){if(e instanceof f.default)return e;var t=v.default.getMessage(e.channel_id,e.id);return null!=t?t:(0,u.createMessageRecord)(e)}function D(e,t){if(void 0===t&&(t=null),(0,d.default)(e))return null;t||(t=e.channel_id);var n=p.default.getChannel(t);if(!n||n&&n.type===E.ChannelTypes.DM)return null;if(N.guildFilter===E.RecentMentionsFilters.THIS_SERVER&&n.getGuildId()!==m.default.getGuildId())return null;var r=e.author.id,a=c.default.getId();return y.default.isBlocked(r)||r===a?null:(e=L(e),(0,s.default)(e,a,!N.everyoneFilter,!N.roleFilter)?e:null)}function w(e){if(null==C[e])return!1;delete C[e],T=r.default.filter(T,(function(t){return t.id!==e}))}function j(e){return w(e.id)}function k(e){var t=I({},N);N=r.default.defaults(r.default.pick(e,["guildFilter","roleFilter","everyoneFilter"]),N),o.default.set("recentMentionFilterSettings",N);var n=function(e,n){return t[e]!==N[e]&&N[e]===n},a=n("guildFilter",E.RecentMentionsFilters.THIS_SERVER)||n("everyoneFilter",!1)||n("roleFilter",!1);C={};var i=[];a&&T.forEach((function(e){var t=D(e);t&&(i.push(t),C[t.id]=!0)})),0===(T=i).length&&(A=!1)}function U(){r.default.forEach(T,(function(e){e.timestamp.locale(_.default.locale)}))}function G(){T=T.filter((function(e){return!y.default.isBlocked(e.author.id)}))}function F(e){var t=e.channel;T=r.default.filter(T,(function(e){return e.channel_id!==t.id||(delete C[e.id],!1)}))}var B=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a,o,i,l=r.prototype;return l.initialize=function(){this.waitFor(h.default,p.default,v.default)},l.isOpen=function(){return R},l.getMentions=function(){return A||T.length?T:null},a=r,(o=[{key:"hasLoadedEver",get:function(){return A}},{key:"lastLoaded",get:function(){return P}},{key:"loading",get:function(){return b}},{key:"hasMore",get:function(){return M}},{key:"guildFilter",get:function(){return N.guildFilter}},{key:"everyoneFilter",get:function(){return N.everyoneFilter}},{key:"roleFilter",get:function(){return N.roleFilter}}])&&S(a.prototype,o),i&&S(a,i),r}(a.default.Store))(l.default,{LOAD_RECENT_MENTIONS:function(e){var t=e.guildId;b=!0,null==t&&N.guildFilter===E.RecentMentionsFilters.THIS_SERVER&&k({guildFilter:E.RecentMentionsFilters.ALL_SERVERS})},LOAD_RECENT_MENTIONS_SUCCESS:function(e){var t=e.hasMoreAfter,n=e.messages,a=e.isAfter,o=r.default.map(n,L);a?T=T.concat(o):(T=o,C={}),r.default.forEach(o,(function(e){C[e.id]=!0})),b=!1,M=t,P=(0,i.now)(),A=!0},LOAD_RECENT_MENTIONS_FAILURE:function(e){b=!1},SET_RECENT_MENTIONS_FILTER:k,TRUNCATE_MENTIONS:function(e){for(var t=e.size,n=t;n<T.length;++n)delete C[T[n].id];T=T.slice(0,t),M=!0},CHANNEL_SELECT:function(e){return function(){if(N.guildFilter!==E.RecentMentionsFilters.THIS_SERVER)return!1;A=!1}()},CONNECTION_OPEN:function(e){return T=[],C={},void(A=!1)},GUILD_DELETE:function(e){var t=e.guild;T=r.default.filter(T,(function(e){var n=p.default.getChannel(e.channel_id);return!(!n||n.getGuildId()===t.id)||(delete C[e.id],!1)}))},MESSAGE_CREATE:function(e){var t=e.channelId,n=D(e.message,t);if(!n)return!1;(T=T.slice()).unshift(n),C[n.id]=!0},MESSAGE_UPDATE:function(e){var t=e.message.id;if(null==C[String(t)])return!1;var n=r.default.findIndex(T,(function(e){return e.id===t})),a=(T=T.slice())[n];null!=a&&(T[n]=(0,u.updateMessageRecord)(a,e.message))},MESSAGE_DELETE:j,RECENT_MENTION_DELETE:j,MESSAGE_DELETE_BULK:function(e){var t=e.ids;r.default.forEach(t,w)},USER_SETTINGS_UPDATE:function(e){return U()},I18N_LOAD_SUCCESS:function(e){return U()},CHANNEL_DELETE:F,THREAD_DELETE:F,RELATIONSHIP_ADD:function(e){return G()},RELATIONSHIP_REMOVE:function(e){return G()},MENTION_MODAL_OPEN:function(e){R=!0},MENTION_MODAL_CLOSE:function(e){R=!1}});t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=n(42),l=p(n(61)),u=p(n(151)),s=p(n(24)),d=n(1),f=p(n(6)),c=p(n(7643));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.guildId,n=e.message,r=e.className,p=a.useState(!1),v=p[0],m=p[1];return y(l.default,{className:(0,o.default)(c.default.jumpButton,r),onClick:function(){m(!0),(0,i.transitionTo)(d.Routes.CHANNEL(t,n.channel_id,n.id))}},void 0,v?y(u.default,{type:u.default.Type.PULSING_ELLIPSIS}):y(s.default,{size:s.default.Sizes.SIZE_12,className:c.default.text},void 0,f.default.Messages.JUMP))}m.displayName="JumpToMessageButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=R;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(9)),i=n(680),l=n(3),u=b(n(8468)),s=n(5937),d=b(n(180)),f=b(n(88)),c=b(n(163)),p=b(n(10)),v=b(n(15)),y=b(n(256)),m=b(n(12)),_=b(n(8961)),h=b(n(61)),E=b(n(371)),g=n(85),S=b(n(47)),O=b(n(24)),I=n(1),T=b(n(6)),C=b(n(7645));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P={top:8,bottom:8,left:-4,right:-4};function R(e){var t=e.channel,n=e.children,r=e.gotoChannel,o=e.mentionCount,l=e.channelState,u=e.toggleCollapsed,s=(0,i.useListItem)("recents-header-"+t.id+"-"+(0,g.useUID)());return A(f.default,{offset:P},void 0,a.createElement("div",N({className:C.default.channelHeader},s,{tabIndex:0,"data-recents-channel":t.id,onKeyDown:function(e){null!=u&&null!=l&&("ArrowRight"===e.key&&l.collapsed||"ArrowLeft"===e.key&&!l.collapsed)&&(null==u||u(l))}}),A(L,{channel:t,gotoChannel:r}),A(j,{channel:t,gotoChannel:r,mentionCount:o}),n))}function L(e){var t=e.channel,n=e.gotoChannel;return t.isPrivate()?A(D,{channel:t,gotoChannel:n}):A(w,{channel:t,gotoChannel:n})}function D(e){var t=e.channel,n=e.gotoChannel,r=(0,l.useStateFromStores)([m.default],(function(){return t.type===I.ChannelTypes.DM?m.default.getUser(t.getRecipientId()):null})),a=null==r?(0,s.getChannelIconURL)(t):r.getAvatarURL(void 0);return A(h.default,{onClick:n,tabIndex:-1},void 0,A("img",{className:C.default.dmIcon,src:a,alt:"","aria-hidden":!0}))}function w(e){var t=e.channel,n=e.gotoChannel,r=(0,l.useStateFromStores)([v.default],(function(){return v.default.getGuild(t.guild_id)}));return null==r?null:A(E.default,{className:C.default.guildIcon,guild:r,size:E.default.Sizes.MEDIUM,active:!0,onClick:n,tabIndex:-1})}function j(e){var t=e.channel,n=e.gotoChannel,r=e.mentionCount,a=(0,d.default)(t,!0),i=(0,l.useStateFromStores)([v.default],(function(){return v.default.getGuild(t.guild_id)})),u=(0,l.useStateFromStores)([p.default],(function(){return p.default.getChannel(t.parent_id)})),s=null==u?null==i?void 0:i.name:(null==i?void 0:i.name)+" › "+u.name,f=t.isMultiUserDM()?T.default.Messages.MEMBERS_HEADER.format({members:t.recipients.length+1}):t.isPrivate()?A(k,{channel:t,gotoChannel:n}):A(h.default,{className:(0,o.default)(C.default.subtext,C.default.guildName),onClick:n},void 0,s);return A("div",{className:C.default.channelNameSection},void 0,A(S.default,{size:O.default.Sizes.SIZE_16,className:C.default.channelNameHeader},void 0,A(h.default,{className:C.default.channelName,onClick:n},void 0,a,null!=r&&r>0?A(_.default,{value:r,className:C.default.badge}):null)),A(O.default,{color:O.default.Colors.HEADER_SECONDARY,size:O.default.Sizes.SIZE_12,className:C.default.subtextContainer},void 0,f))}function k(e){var t=e.channel,n=(0,l.useStateFromStoresObject)([m.default,y.default,c.default],(function(){var e=m.default.getUser(t.getRecipientId());return{activities:null!=e?y.default.getActivities(e.id):null,applicationStream:null!=e?c.default.getStreamForUser(e.id):null}})),r=n.activities,a=n.applicationStream;return null==r?null:A(u.default,{className:C.default.activityStatus,emojiClassName:C.default.activityEmoji,activities:r,applicationStream:a,hideTooltip:!0})}R.displayName="RecentsChannelHeader",D.displayName="DMSectionsIcon",j.displayName="ChannelName"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(9)),o=i(n(7644));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}var s=function(e){var t=e.value,n=void 0===t?0:t,i=e.text,l=e.className,s=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["value","text","className"]);return null!=i?r.createElement("div",u({className:(0,a.default)(o.default.wrapper,l)},s),i):n>0?r.createElement("div",u({className:(0,a.default)(o.default.wrapper,l)},s),n):null};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(8750)),o=s(n(47)),i=s(n(24)),l=s(n(6)),u=s(n(7646));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.Icon,n=e.header,r=e.tip;return f("div",{className:u.default.container},void 0,f("div",{className:u.default.iconContainer},void 0,f(t,{className:u.default.icon,width:36,height:36}),f(a.default,{className:u.default.stars})),f(o.default,{className:u.default.header,size:o.default.Sizes.SIZE_24},void 0,n),f(i.default,{color:i.default.Colors.HEADER_SECONDARY,size:i.default.Sizes.SIZE_12},void 0,f(i.default,{tag:"span",className:u.default.protip,size:i.default.Sizes.SIZE_12,color:i.default.Colors.STATUS_GREEN},void 0,l.default.Messages.FORM_LABEL_ROLES_PRO_TIP,":"," "),r))}c.displayName="EmptyState"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,t.Tab=void 0;c(n(0));var r,a,o=d(n(9)),i=n(8758),l=c(n(8293)),u=d(n(6)),s=d(n(7648));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t,n,r=e.tab,d=e.setTab,f=e.children;return p(i.Header,{className:s.default.header},void 0,p(l.default,{selectedItem:r,type:l.Types.TOP_PILL,onItemSelect:d,className:s.default.tabBar},void 0,p(l.Item,{id:a.Mentions,className:(0,o.default)(s.default.tab,(t={},t[s.default.active]=r===a.Mentions,t))},void 0,u.default.Messages.MENTIONS),p(l.Item,{id:a.Unreads,className:(0,o.default)(s.default.tab,(n={},n[s.default.active]=r===a.Unreads,n))},void 0,u.default.Messages.UNREADS_TAB_LABEL)),p("div",{className:s.default.controls},void 0,f))}t.Tab=a,function(e){e.Mentions="Recent Mentions",e.Unreads="Inbox"}(a||(t.Tab=a={})),v.displayName="RecentsHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16",fill:"none"}),s("path",{d:"M12 4.66668L11.06 3.72668L6.83332 7.95335L7.77332 8.89335L12 4.66668ZM14.8266 3.72668L7.77332 10.78L4.98665 8.00002L4.04665 8.94002L7.77332 12.6667L15.7733 4.66668L14.8266 3.72668ZM0.273315 8.94002L3.99998 12.6667L4.93998 11.7267L1.21998 8.00002L0.273315 8.94002Z",fill:d,className:f}))}d.displayName="DoubleCheckmark"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=r.useState(o),t=e[0],n=e[1];return r.useEffect((function(){var e=function(e){n(e)};return i.add(e),function(){i.delete(e)}}),[]),t};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}var o=!1,i=new Set;function l(e){e!==o&&(o=e,i.forEach((function(e){return e(o)})))}window.addEventListener("keydown",(function(e){l(e.shiftKey)})),window.addEventListener("keyup",(function(e){l(e.shiftKey)})),window.addEventListener("mousemove",(function(e){l(e.shiftKey)})),window.addEventListener("blur",(function(){l(!1)}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null==e?void 0:e.id,r=(0,o.useStateFromStoresObject)([d.default],(function(){return{muted:null!=n?d.default.isMuted(n):void 0,muteConfig:null!=n?d.default.getMuteConfig(n):void 0}}),[n]),c=r.muted,p=r.muteConfig,y=(0,s.useMutedUntilText)(p);if(null==n)return null;var m=[{time:u.MuteUntilSeconds.MINUTES_15,label:f.default.Messages.MUTE_DURATION_15_MINUTES},{time:u.MuteUntilSeconds.HOURS_1,label:f.default.Messages.MUTE_DURATION_1_HOUR},{time:u.MuteUntilSeconds.HOURS_8,label:f.default.Messages.MUTE_DURATION_8_HOURS},{time:u.MuteUntilSeconds.HOURS_24,label:f.default.Messages.MUTE_DURATION_24_HOURS},{time:u.MuteUntilSeconds.ALWAYS,label:f.default.Messages.MUTE_DURATION_ALWAYS}];return c?v(l.MenuItem,{id:"unmute-guild",label:f.default.Messages.UNMUTE_SERVER,subtext:y,action:function(){return i.default.updateGuildNotificationSettings(n,{muted:!1})}}):v(l.MenuItem,{id:"mute-guild",label:f.default.Messages.MUTE_SERVER,action:function(){return i.default.updateGuildNotificationSettings(n,{muted:!0})}},void 0,m.map((function(e){var r=e.time,o=e.label;return v(l.MenuItem,{id:""+r,label:o,action:function(){return function(e){if(null!=n){var r=e>0?(0,a.default)().add(e,"second").toISOString():null;i.default.updateGuildNotificationSettings(n,{muted:!0,mute_config:{selected_time_window:e,end_time:r}},t)}}(r)}},r)})))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(5)),o=n(3),i=c(n(8477)),l=n(8253),u=n(1271),s=n(8512),d=c(n(181)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e)return o.default.Messages.EMBEDDED_ACTIVITIES_IN_ACTIVITY;switch(t){case a.ActivityTypes.WATCHING:return o.default.Messages.EMBEDDED_ACTIVITIES_WATCHING_APPLICATION.format({applicationName:e});case a.ActivityTypes.PLAYING:return o.default.Messages.EMBEDDED_ACTIVITIES_PLAYING_APPLICATION.format({applicationName:e});default:return o.default.Messages.EMBEDDED_ACTIVITIES_IN_APPLICATION.format({applicationName:e})}};var r,a=n(1),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(8)),a=l(n(3)),o=l(n(2)),i=l(n(1305));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}var d,f,c=Object.freeze({}),p={};function v(e){var t=e.lobbyId;delete p[t]}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.getAllVoiceStates=function(){return p},a.getVoiceStates=function(e){return p[e]||c},a.getVoiceState=function(e,t){return this.getVoiceStates(e)[t]},a.getLobbyIdsForUser=function(e){return Object.keys(p).filter((function(t){return null!=p[t][e]}))},r}(a.default.Store))(o.default,{CONNECTION_OPEN:function(e){var t=e.user,n=e.sessionId;p={},d=t.id,f=n},OVERLAY_INITIALIZE:function(e){var t=e.lobbyVoiceStates,n=e.user,a=e.sessionId;p={},r.default.each(t,(function(e,t){p[t]={},r.default.each(e,(function(e,n){p[t][n]=new i.default(e)}))})),d=n.id,f=a},LOBBY_VOICE_STATE_UPDATE:function(e){var t,n,r=e.sessionId,a=e.userId,o=e.lobbyId,l=e.channelId,u=e.mute,c=e.deaf,v=e.selfMute,y=e.selfDeaf,m=a===d&&r!==f,_=p[o]||{},h=_[a];if(null==l||m||(t=null==h?new i.default({userId:a,sessionId:r,channelId:l,mute:u,deaf:c,selfMute:v,selfDeaf:y}):h.merge({userId:a,sessionId:r,channelId:l,mute:u,deaf:c,selfMute:v,selfDeaf:y})),h===t)return!1;null==t?delete(_=s({},_))[a]:_=s({},_,((n={})[a]=t,n)),p[o]=_},LOBBY_DELETE:v,LOBBY_DISCONNECT:v});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(1329),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(411)),o=n(305),i=f(n(1181)),l=f(n(13)),u=f(n(1267)),s=f(n(1178)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}var v=p({},s.default,{openNativeAppModal:function(e){i.default.openNativeAppModal(e,d.RPCCommands.GUILD_TEMPLATE_BROWSER)},openMobileApp:function(e,t){if(!(null!=platform.ua&&platform.ua.toLowerCase().indexOf("googlebot")>-1)){var n=null!=e?(0,r.getGuildTemplateDynamicLinkTemplate)(e):(0,r.getDefaultDynamicLinkTemplate)(),i=(0,a.generateAttemptId)(),s=(0,a.default)(n,{utmSource:"template",fingerprint:t,attemptId:i});l.default.track(d.AnalyticEvents.DEEP_LINK_CLICKED,{fingerprint:(0,o.maybeExtractId)(t),attempt_id:i,source:"template",guild_template_code:e}),u.default.launch(s,(function(){}))}}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7664));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.className;return u("div",{className:(0,a.default)(o.default.image,t)})}s.displayName="NoResultsImage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isGuildEligibleForStageChannels=l,t.useGuildEligibleForStageChannels=function(e){return(0,a.useStateFromStores)([o.default],(function(){return l(e,[o.default])}),[e])};var r,a=n(3),o=(r=n(15))&&r.__esModule?r:{default:r},i=n(1);function l(e,t){var n,r=(void 0===t?[o.default]:t)[0];return Boolean(null===(n=r.getGuild(e))||void 0===n?void 0:n.hasFeature(i.GuildFeatures.COMMUNITY))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=h(n(0)),o=m(n(9)),i=m(n(29)),l=m(n(61)),u=h(n(9750)),s=m(n(153)),d=m(n(5971)),f=m(n(5950)),c=m(n(47)),p=n(1),v=m(n(6)),y=m(n(7671));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t=e.page,n=e.totalPageCount,r=e.onPageChange,i=a.useState(!1),u=i[0],d=i[1],f=a.useState(null),v=f[0],m=f[1],_=null!=v&&v>=1&&v<=n;return u?E(s.default,{autoFocus:!0,className:y.default.jumpToPageInlineInput,size:s.default.Sizes.MINI,value:null==v?"":""+v,onChange:function(e){var t=parseInt(e);""===e||isNaN(t)?m(null):m(t)},onBlur:function(){d(!1),m(null)},onKeyPress:function(e){e.which===p.KeyboardKeys.ENTER&&null!=v&&_&&(r(v),d(!1),m(null))}},t.key):E(l.default,{onClick:function(){return d(!0)}},t.key,E(c.default,{className:(0,o.default)(y.default.roundButton,y.default.gap),"aria-hidden":!0},void 0,"…"))},S=function(e){var t=e.currentPage,n=e.totalCount,r=e.pageSize,a=e.maxVisiblePages,s=e.onPageChange,c=Math.ceil(n/r),p=function(e){var t=e.pages;return e.hasMultiplePages?E("div",{className:(0,o.default)(y.default.pageControlContainer)},void 0,E("nav",{className:y.default.pageControl},void 0,t.map((function(e){switch(e.type){case u.PaginationTypes.BACK:return n=(t=e).key,r=t.disabled,a=t.navigateToPage,E(i.default,{className:y.default.endButton,innerClassName:y.default.endButtonInner,look:i.default.Looks.BLANK,color:i.default.Colors.TRANSPARENT,onClick:a,disabled:r,rel:"prev"},n,E(d.default,{className:y.default.iconCaret,"aria-hidden":!0}),E("span",{},void 0,v.default.Messages.BACK));case u.PaginationTypes.PAGE:return function(e){var t;return E(l.default,{className:(0,o.default)(y.default.roundButton,(t={},t[y.default.activeButton]=e.selected,t)),onClick:e.selected?void 0:e.navigateToPage,"aria-label":v.default.Messages.PAGINATION_PAGE_LABEL.format({pageNumber:e.targetPage}),"aria-current":e.selected?"page":void 0},e.key,E("span",{},void 0,e.targetPage))}(e);case u.PaginationTypes.GAP:return function(e){return E(g,{page:e,totalPageCount:c,onPageChange:s})}(e);case u.PaginationTypes.NEXT:return function(e){var t=e.key,n=e.disabled,r=e.navigateToPage;return E(i.default,{className:y.default.endButton,innerClassName:y.default.endButtonInner,look:i.default.Looks.BLANK,color:i.default.Colors.TRANSPARENT,onClick:r,disabled:n,rel:"next"},t,E("span",{},void 0,v.default.Messages.NEXT),E(f.default,{className:y.default.iconCaret,"aria-hidden":!0}))}(e);default:return null}var t,n,r,a})))):null};return E(u.default,{totalPageCount:c,selectedPage:t,maxVisiblePages:a,onPageChange:function(e){null!=s&&s(e)}},void 0,p)};S.displayName="Paginator";var O=S;t.default=O},function(e,t,n){e.exports=n.p+"300e574bfeb954dc85176e515eb7b57c.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePositionDeltas=i,t.moveItemFromTo=l,t.getPositionUpdates=u,t.default=void 0;var r=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}var o=new(a(n(26)).default)("DragAndDropUtils");function i(e,t,n,r,a){void 0===a&&(a=!0);var i=t.length;if(e.length!==i)return o.warn("Arrays are not of the same length!",e,t),[];var l=e.map(n).sort().join(":"),u=t.map(n).sort().join(":");if(l!==u)return o.warn("Object IDs in the old ordering and the new ordering are not the same.",l,u),[];for(var s={},d=0;d<i;d++)s[n(e[d])]=r(e[d]);for(var f=[],c=0;c<i;c++){var p=n(t[c]),v=a?c:i-1-c;s[p]===v&&r(t[c])===v||f.push({id:p,position:v})}return a||f.reverse(),f}function l(e,t,n){var r=e[t],a=[].concat(e);return a.splice(t,1),a.splice(n,0,r),a}function u(e,t,n,a,o,u){return void 0===u&&(u=!0),Array.isArray(e)||(e=r.default.values(e)),i(e,l(e,t,n),a,o,u)}var s={moveItemFromTo:l,calculatePositionDeltas:i,getPositionUpdates:u};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(8424)),l=f(n(8497)),u=f(n(8652)),s=f(n(8653)),d=f(n(7343));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e){var t,n=e.message,r=e.compact,a=e.className,f=e.isGroupStart,c=e.renderMediaEmbeds,y=void 0===c||c,m=(0,l.default)(n,y).content;return p(i.default,{compact:r,className:(0,o.default)(a,(t={},t[d.default.message]=!0,t[d.default.cozyMessage]=!r,t[d.default.groupStart]=f,t)),childrenHeader:(0,s.default)(v({},e,{guildId:void 0})),childrenMessageContent:(0,u.default)(e,m)})}y.displayName="Message";var m=a.memo(y);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(88))&&r.__esModule?r:{default:r},i=n(42),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}var d=a.forwardRef((function(e,t){var n=e.href,r=e.children,u=e.onClick,d=e.onKeyPress,f=e.focusProps,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["href","children","onClick","onKeyPress","focusProps"]),p=a.useCallback((function(e){e.repeat||(e.charCode!==l.KeyboardKeys.SPACE&&e.charCode!==l.KeyboardKeys.ENTER||(e.preventDefault(),null!=n&&(0,i.transitionTo)(n),null==u||u()),null==d||d(e))}),[n,d,u]),v=a.useCallback((function(e){e.metaKey||e.shiftKey||0!==e.button||(e.preventDefault(),e.stopPropagation(),null!=n&&(0,i.transitionTo)(n),null==u||u())}),[n,u]),y=a.createElement("a",s({ref:t,href:n,onClick:v,onKeyPress:p},c),r);return a.createElement(o.default,f,y)}));t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddRoleMembersModalContent=L,t.default=D;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(202),i=n(3),l=C(n(8254)),u=n(8297),s=n(1229),d=n(8482),f=C(n(8355)),c=C(n(29)),p=C(n(55)),v=n(85),y=C(n(8448)),m=n(35),_=C(n(47)),h=C(n(24)),E=C(n(723)),g=n(8674),S=n(8529),O=n(1),I=C(n(6)),T=C(n(7683));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){P(o,r,a,i,l,"next",e)}function l(e){P(o,r,a,i,l,"throw",e)}i(void 0)}))}}function L(e){var t,n=e.onClose,r=e.roleId,v=e.guildId,C=e.headerId,b=e.onBack,P=e.isCreateRoleFlow,L=e.focusSearchAfterReady,D=e.isReady,w=(0,i.useStateFromStores)([f.default],(function(){return f.default.getRole(r)}),[r]),j=a.useState(""),k=j[0],U=j[1],G=a.useState({}),F=G[0],B=G[1],H=a.useState(!1),x=H[0],V=H[1];a.useEffect((function(){E.default.requestMembers(v,k.trim().toLowerCase(),S.ADD_MEMBER_QUERY_LIMIT)}),[v,k]);var W=(0,S.useGuildMembers)(v),Y=a.useMemo((function(){return W.filter((function(e){return!e.roles.includes(r)}))}),[W,r]),z=a.useMemo((function(){return Y.filter((function(e){return(0,S.filterFullMembersByQuery)(k,e)}))}),[k,Y]),K=a.useCallback(R(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object.values(F).map((function(e){return e.row.id})),V(!0),e.prev=2,e.next=5,l.default.bulkAddMemberRoles(v,r,t);case 5:(0,g.requestMembersForRole)(v,r,!1),n(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),V(!1);case 12:case"end":return e.stop()}}),e,null,[[2,9]])}))),[v,r,F,n]),$=a.useCallback((function(e){var t=e;B((function(e){var n=A({},e),r=(0,d.getFullRowId)(t);return r in n?(delete n[r],n):(n[r]={display:{type:u.RichTagTypes.MEMBER,label:t.name,avatar:t.avatarURL},row:t},n)}))}),[]),Z=a.useCallback((function(e){B((function(t){t[e];return function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,[e].map(N))}))}),[]),q=a.useMemo((function(){return z.map((function(e){return{rowType:s.RowType.MEMBER,name:e.name,userTag:e.userTag,id:e.id,avatarURL:e.avatarURL,bot:e.bot,verifiedBot:e.verifiedBot,disabled:!1,key:e.id}}))}),[z]);return a.createElement(a.Fragment,null,M(m.ModalHeader,{className:T.default.header,separator:!1,id:C,direction:p.default.Direction.VERTICAL},void 0,M(_.default,{size:_.default.Sizes.SIZE_24},void 0,I.default.Messages.ROLE_ADD_MEMBERS_TITLE),P?M(h.default,{className:T.default.subtitle,color:h.default.Colors.STANDARD,size:h.default.Sizes.SIZE_16},void 0,I.default.Messages.ROLE_CREATE_ADD_MEMBERS_SUBTITLE):M("div",{className:T.default.roleContainer},void 0,M(y.default,{color:null!==(t=null==w?void 0:w.colorString)&&void 0!==t?t:(0,o.int2hex)(O.DEFAULT_ROLE_COLOR),width:16,height:16}),M(h.default,{className:T.default.roleName,color:h.default.Colors.STANDARD,size:h.default.Sizes.SIZE_16},void 0,null==w?void 0:w.name))),M(d.MemberRoleSelector,{listClassName:T.default.list,pendingAdditions:F,query:k,onQueryChange:U,onClickRow:$,onRemovePendingAddition:Z,roles:[],members:q,placeholderText:I.default.Messages.ROLE_ADD_MEMBERS_SEARCH,renderEmptyText:function(e){return I.default.Messages.ROLE_EDIT_MEMBERS_NO_RESULTS.format({query:e})},focusSearchAfterReady:L,isReady:D}),M(m.ModalFooter,{className:T.default.footer},void 0,M("div",{className:T.default.buttonsRight},void 0,P&&0===Object.keys(F).length?M(c.default,{onClick:n,color:c.default.Colors.GREY},void 0,I.default.Messages.ROLE_CREATION_SKIP):M(c.default,{onClick:K,submitting:x},void 0,I.default.Messages.ADD),!P&&M(c.default,{look:c.default.Looks.LINK,color:c.default.Colors.PRIMARY,size:c.default.Sizes.SMALL,onClick:n},void 0,I.default.Messages.CANCEL)),null!=b&&M(c.default,{color:c.default.Colors.PRIMARY,look:c.default.Looks.LINK,size:c.default.Sizes.TINY,onClick:b,className:T.default.backButton},void 0,I.default.Messages.BACK)))}function D(e){var t=e.transitionState,n=e.onClose,r=e.roleId,a=e.guildId,o=(0,v.useUID)();return M(m.ModalRoot,{transitionState:t,"aria-labelledby":o,size:m.ModalSize.SMALL},void 0,M(L,{onClose:n,roleId:r,guildId:a,headerId:o}))}D.displayName="AddRoleMembersModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M0 0h24v24H0z",fill:"none"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.className,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({},(0,i.default)(v),{className:c,width:n,height:a,viewBox:"0 0 24 24"}),d,s("path",{className:p,fill:f,d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}f.displayName="NotAllowed"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLockTooltip=function(e,t,n){var r=(0,o.useStateFromStores)([i.default],(function(){return!i.default.isRoleHigher(e,t,n)}),[e,t,n]);if(a.useMemo((function(){return r&&n.id===(null==t?void 0:t.id)}),[r,n,t]))return s.default.Messages.HELP_ROLE_LOCKED_MINE;if(r)return s.default.Messages.HELP_ROLE_LOCKED;return null},t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=d(n(40)),l=d(n(149)),u=d(n(1221)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(e){var t=e.className,n=e.tooltipText,r=e.width,o=void 0===r?16:r,i=e.height,s=void 0===i?16:i,d=c(u.default,{width:o,height:s});return c(l.default,{text:n},void 0,(function(e){return a.createElement("div",p({className:t},e),d)}))}v.displayName="LockWithTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=r.useState(null),n=t[0],o=t[1],i=r.useCallback((function(e){o(e)}),[]),l=r.useCallback((function(){o(null)}),[]),u=r.useCallback((function(t){l();var r=e.find((function(e){var t=e.id;return n===t})),o=e.find((function(e){var n=e.id;return t===n}));if(null!=r&&null!=o&&r!==o){var i=function(e,t,n){var r=[].concat(e),a=r.indexOf(t),o=r.indexOf(n),i=o-a>0?1:0;return r.splice(a,1),o=r.indexOf(n),r.splice(o+i,0,t),r}(e,r,o);(0,a.updateRoleSort)([].concat(i.map((function(e){return e.id}))))}}),[e,n,l]);return{draggingRoleId:n,handleDragStart:i,handleDragReset:l,handleDragComplete:u}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(8459);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(61)),o=d(n(683)),i=d(n(696)),l=d(n(24)),u=d(n(6)),s=d(n(7694));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=c(i.default,{width:20,height:20});function v(e){var t=e.role,n=e.onClick;return c(a.default,{className:s.default.container,onClick:n},void 0,c("div",{className:s.default.icon},void 0,p),c("div",{className:s.default.description},void 0,c(l.default,{className:s.default.label,color:l.default.Colors.CUSTOM,size:l.default.Sizes.SIZE_16},void 0,u.default.Messages.ROLE_EVERYONE_LABEL),c(l.default,{color:l.default.Colors.CUSTOM,size:l.default.Sizes.SIZE_12},void 0,t.name," • ",u.default.Messages.ROLE_EVERYONE_DESCRIPTION)),c(o.default,{className:s.default.arrow,direction:o.default.Directions.RIGHT}))}v.displayName="GuildSettingsRolesEveryoneButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(8)),a=f(n(3)),o=f(n(2)),i=f(n(8369)),l=f(n(8255)),u=f(n(40)),s=f(n(9175)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(){return(m=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}).apply(this,arguments)}var _,h,E=[],g=[],S=null,O=null,I=!1,T=!1,C=d.FormStates.CLOSED,b={},M=!1;function N(e){if(e.section!==d.GuildSettingsSections.INTEGRATIONS)return!1;if(h=d.IntegrationSettingsSections.OVERVIEW,null==_){var t=l.default.getGuildId();null!=t&&i.default.fetchForGuild(t),A(!1)}}function A(e){if(null!=(_=l.default.getProps().guild)&&u.default.can(d.Permissions.MANAGE_GUILD,_)){var t=l.default.getProps().integrations;null==t&&(T=!0),E=t||[]}else E=[];if(g=null!=_&&u.default.can(d.Permissions.MANAGE_WEBHOOKS,_)?s.default.getWebhooksForGuild(_.id):[],!e&&null!=S){var n=R(S.id);null!=n&&(S=n)}if(null!=O){var r=L(O.id);null!=r&&(O=r)}C=d.FormStates.OPEN,b={},M=!1}var P=r.default.debounce((function(){M&&(null!=S?r.default.isEqual(S,R(S.id))&&(M=!1):null!=O?r.default.isEqual(O,L(O.id))&&(M=!1):M=!1,M||D.emitChange())}),500);function R(e){return E.find((function(t){return t.id===e}))}function L(e){return g.find((function(t){return t.id===e}))}var D=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a,o,i,f=r.prototype;return f.initialize=function(){this.waitFor(l.default,s.default,u.default)},f.hasChanges=function(){return M},f.getIntegration=function(e){return R(e)},f.getWebhook=function(e){return L(e)},f.showNotice=function(){return this.hasChanges()},f.getProps=function(){return{submitting:C===d.FormStates.SUBMITTING,integrations:E,webhooks:g,editedIntegration:S,editedWebhook:O,section:h,isFetching:T||I,hasChanges:this.hasChanges(),errors:b}},a=r,(o=[{key:"guild",get:function(){return _}},{key:"integrations",get:function(){return E}},{key:"webhooks",get:function(){return g}},{key:"editedIntegration",get:function(){return S}},{key:"editedWebhook",get:function(){return O}},{key:"formState",get:function(){return C}}])&&c(a.prototype,o),i&&c(a,i),r}(a.default.Store))(o.default,__OVERLAY__?{}:{INTEGRATION_SETTINGS_INIT:function(e){return A(!1)},INTEGRATION_SETTINGS_SAVE_SUCCESS:function(e){return A(!0)},GUILD_SETTINGS_INIT:N,GUILD_SETTINGS_SET_SECTION:N,INTEGRATION_SETTINGS_SET_SECTION:function(e){var t=e.section;h=t},INTEGRATION_SETTINGS_START_EDITING_INTEGRATION:function(e){var t=R(e.integrationId);if(null==t)return!1;S=t,O=null,b={},M=!1},INTEGRATION_SETTINGS_STOP_EDITING_INTEGRATION:function(e){return S=null,b={},void(M=!1)},INTEGRATION_SETTINGS_UPDATE_INTEGRATION:function(e){var t=e.settings;if(null==S)return!1;S=m({},S),null!=t.enableEmoticons&&S.enable_emoticons!==t.enableEmoticons&&(S.enable_emoticons=t.enableEmoticons,M=!0),null!=t.expireBehavior&&S.expire_behavior!==t.expireBehavior&&(S.expire_behavior=t.expireBehavior,M=!0),null!=t.expireGracePeriod&&S.expire_grace_period!==t.expireGracePeriod&&(S.expire_grace_period=t.expireGracePeriod,M=!0),M&&P()},INTEGRATION_SETTINGS_UPDATE_WEBHOOK:function(e){var t=e.settings;if(null==O)return!1;O=m({},O),null!=t.name&&O.name!==t.name&&(O.name=t.name,M=!0),void 0!==t.avatar&&O.avatar!==t.avatar&&(O.avatar=t.avatar,M=!0),null!=t.channelId&&O.channel_id!==t.channelId&&(O.channel_id=t.channelId,M=!0),M&&P()},INTEGRATION_SETTINGS_START_EDITING_WEBHOOK:function(e){var t=L(e.webhookId);if(null==t)return!1;O=t,S=null,b={},M=!1},INTEGRATION_SETTINGS_STOP_EDITING_WEBHOOK:function(e){return O=null,b={},void(M=!1)},GUILD_SETTINGS_CLOSE:function(e){return _=null,E=[],g=[],S=null,O=null,C=d.FormStates.CLOSED,void(M=!1)},GUILD_SETTINGS_LOADED_INTEGATIONS:function(e){var t=e.guildId,n=e.integrations;if(null==_||t!==_.id||C===d.FormStates.SUBMITTING)return!1;T=!1;for(var r,a=function(){var e,t,n,a=r.value;null==E.find((function(e){if(e.id===a.id)return!0}))&&(E.push(a),a.type===(null===(e=S)||void 0===e?void 0:e.type)&&(null===(t=a.account)||void 0===t?void 0:t.id)===(null===(n=S.account)||void 0===n?void 0:n.id)&&(S=a))},o=v(n);!(r=o()).done;)a();for(var i=function(e){var t=E[e],r=n.find((function(e){if(e.id===t.id)return!0}));if(r){var a,o=m({},t,{},r);(null===(a=S)||void 0===a?void 0:a.id)===o.id&&(!1===o.enabled?S=null:M||(S=o)),E[e]=o}else{var i;(null===(i=S)||void 0===i?void 0:i.id)===t.id&&(S=null),E.splice(e,1)}},l=E.length-1;l>=0;l--)i(l);E=[].concat(E),P()},WEBHOOKS_UPDATE:function(e){var t=e.guildId,n=e.channelId,r=e.webhooks;if(null==_||t!==_.id||null==r||C===d.FormStates.SUBMITTING)return!1;I=!1;for(var a=function(e){var t=g[e];if(null!=n&&(null==t?void 0:t.channel_id)!==n)return"continue";var a=r.find((function(e){if(e.id===t.id)return!0}));if(null!=a){var o,i=m({},t,{},a);g[e]=i,M||(null===(o=O)||void 0===o?void 0:o.id)!==i.id||(O=i)}else{var l;(null===(l=O)||void 0===l?void 0:l.id)===t.id&&(O=null),g.splice(e,1)}},o=g.length-1;o>=0;o--)a(o);for(var i,l=function(){var e=i.value;null==g.find((function(t){if(t.id===e.id)return!0}))&&g.push(e)},u=v(r);!(i=u()).done;)l();g=[].concat(g),P()},INTEGRATION_SETTINGS_SUBMITTING:function(e){return C=d.FormStates.SUBMITTING,void(b={})},INTEGRATION_SETTINGS_SAVE_FAILURE:function(e){if(C!==d.FormStates.SUBMITTING)return!1;C=d.FormStates.OPEN,b=e.errors||{}}}),w=D;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=null,s=0,d=null,f=!1;var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a,o,c,p=r.prototype;return p.showNotice=function(){return u!==d},p.hasError=function(){return f},a=r,(o=[{key:"vanityURLCode",get:function(){return u}},{key:"originalVanityURLCode",get:function(){return d}},{key:"vanityURLUses",get:function(){return s}}])&&i(a.prototype,o),c&&i(a,c),r}(r.default.Store))(a.default,{GUILD_SETTINGS_SET_VANITY_URL:function(e){d=u=e.code||"",s=e.uses,f=!1},GUILD_SETTINGS_VANITY_URL_CLOSE:function(e){return d=u=null,s=0,void(f=!1)},GUILD_SETTINGS_VANITY_URL_RESET:function(e){return u=d,void(s=0)},GUILD_SETTINGS_VANITY_URL_SET:function(e){u=e.code,s=0},GUILD_SETTINGS_VANITY_URL_ERROR:function(e){f=!0}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(480)),i=d(n(61)),l=d(n(8503)),u=d(n(278)),s=d(n(9145));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderItems=function(e){var n=t.props,r=n.items,a=n.renderItem;return r.reduce((function(t,n,r){return(0,o.default)(e.toLowerCase(),n.label.toLowerCase())&&t.push(a(n,r)),t}),[])},t.renderPopout=function(e){var n=e.closePopout,r=t.props,a=r.placeholder,o=r.popoutClassName,i=r.onChange,u=r.value;return p(l.default,{className:o,placeholder:a,value:new Set([u.value]),onChange:i,onClose:n},void 0,(function(e){return t.renderItems(e)}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){var e=this.props,t=e.label,n=e.value,r=e.popoutProps,o=e.renderValue,l=e.className,d=p(s.default,{label:t,value:n,renderValue:o});return a.createElement(u.default,c({},r,{renderPopout:this.renderPopout}),(function(e){return a.createElement(i.default,c({},e,{className:l}),d)}))},r}(a.PureComponent);y.displayName="SearchableQuickSelectWrapper";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChangeTitle=function(e){switch(e.action){case M.AuditLogActions.GUILD_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_UPDATE;case M.AuditLogActions.CHANNEL_CREATE:var t=e.changes?e.changes.find((function(e){return e.key===M.AuditLogChangeKeys.TYPE})):null;if(null==t)throw new Error("[AuditLog] Could not find type change for channel create");switch(t.newValue){case M.ChannelTypes.GUILD_STAGE_VOICE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_STAGE_CREATE;case M.ChannelTypes.GUILD_VOICE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_VOICE_CREATE;case M.ChannelTypes.GUILD_CATEGORY:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_CATEGORY_CREATE;default:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TEXT_CREATE}case M.AuditLogActions.CHANNEL_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_UPDATE;case M.AuditLogActions.CHANNEL_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_DELETE;case M.AuditLogActions.CHANNEL_OVERWRITE_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_OVERWRITE_CREATE;case M.AuditLogActions.CHANNEL_OVERWRITE_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_OVERWRITE_UPDATE;case M.AuditLogActions.CHANNEL_OVERWRITE_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_OVERWRITE_DELETE;case M.AuditLogActions.MEMBER_KICK:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_KICK;case M.AuditLogActions.MEMBER_PRUNE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_PRUNE;case M.AuditLogActions.MEMBER_BAN_ADD:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_BAN_ADD;case M.AuditLogActions.MEMBER_BAN_REMOVE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_BAN_REMOVE;case M.AuditLogActions.MEMBER_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_UPDATE;case M.AuditLogActions.MEMBER_ROLE_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_ROLE_UPDATE;case M.AuditLogActions.MEMBER_MOVE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_MOVE;case M.AuditLogActions.MEMBER_DISCONNECT:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_DISCONNECT;case M.AuditLogActions.BOT_ADD:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_BOT_ADD;case M.AuditLogActions.ROLE_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_CREATE;case M.AuditLogActions.ROLE_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_UPDATE;case M.AuditLogActions.ROLE_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_DELETE;case M.AuditLogActions.INVITE_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_CREATE;case M.AuditLogActions.INVITE_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_UPDATE;case M.AuditLogActions.INVITE_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_DELETE;case M.AuditLogActions.WEBHOOK_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_CREATE;case M.AuditLogActions.WEBHOOK_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_UPDATE;case M.AuditLogActions.WEBHOOK_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_DELETE;case M.AuditLogActions.EMOJI_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_EMOJI_CREATE;case M.AuditLogActions.EMOJI_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_EMOJI_UPDATE;case M.AuditLogActions.EMOJI_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_EMOJI_DELETE;case M.AuditLogActions.STICKER_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STICKER_CREATE;case M.AuditLogActions.STICKER_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STICKER_UPDATE;case M.AuditLogActions.STICKER_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STICKER_DELETE;case M.AuditLogActions.MESSAGE_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MESSAGE_DELETE;case M.AuditLogActions.MESSAGE_BULK_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MESSAGE_BULK_DELETE;case M.AuditLogActions.MESSAGE_PIN:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MESSAGE_PIN;case M.AuditLogActions.MESSAGE_UNPIN:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MESSAGE_UNPIN;case M.AuditLogActions.INTEGRATION_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_CREATE;case M.AuditLogActions.INTEGRATION_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_UPDATE;case M.AuditLogActions.INTEGRATION_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_DELETE;case M.AuditLogActions.STAGE_INSTANCE_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_CREATE;case M.AuditLogActions.STAGE_INSTANCE_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_UPDATE;case M.AuditLogActions.STAGE_INSTANCE_DELETE:return null!=e.userId?N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_DELETE:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_DELETE_NO_USER;case M.AuditLogActions.GUILD_SCHEDULED_EVENT_CREATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_CREATE;case M.AuditLogActions.GUILD_SCHEDULED_EVENT_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_UPDATE;case M.AuditLogActions.GUILD_SCHEDULED_EVENT_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_DELETE;case M.AuditLogActions.THREAD_CREATE:var n=e.changes?e.changes.find((function(e){return e.key===M.AuditLogChangeKeys.TYPE})):null;if(null==n)throw new Error("[AuditLog] Could not find type change for thread create");switch(n.newValue){case M.ChannelTypes.PRIVATE_THREAD:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_PRIVATE_THREAD_CREATE;case M.ChannelTypes.ANNOUNCEMENT_THREAD:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ANNOUNCEMENT_THREAD_CREATE;default:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_CREATE}case M.AuditLogActions.THREAD_UPDATE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_UPDATE;case M.AuditLogActions.THREAD_DELETE:return N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_DELETE;default:return null}},t.getStringForPermission=function(e,t){switch(e){case M.Permissions.CREATE_INSTANT_INVITE:return N.default.Messages.CREATE_INSTANT_INVITE;case M.Permissions.KICK_MEMBERS:return N.default.Messages.KICK_MEMBERS;case M.Permissions.BAN_MEMBERS:return N.default.Messages.BAN_MEMBERS;case M.Permissions.ADMINISTRATOR:return N.default.Messages.ADMINISTRATOR;case M.Permissions.MANAGE_CHANNELS:return t.targetType===M.AuditLogTargetTypes.CHANNEL||t.targetType===M.AuditLogTargetTypes.CHANNEL_OVERWRITE?N.default.Messages.MANAGE_CHANNEL:N.default.Messages.MANAGE_CHANNELS;case M.Permissions.MANAGE_GUILD:return N.default.Messages.MANAGE_SERVER;case M.Permissions.VIEW_GUILD_ANALYTICS:return N.default.Messages.VIEW_GUILD_ANALYTICS;case M.Permissions.CHANGE_NICKNAME:return N.default.Messages.CHANGE_NICKNAME;case M.Permissions.MANAGE_NICKNAMES:return N.default.Messages.MANAGE_NICKNAMES;case M.Permissions.MANAGE_ROLES:return N.default.Messages.MANAGE_ROLES;case M.Permissions.MANAGE_WEBHOOKS:return N.default.Messages.MANAGE_WEBHOOKS;case M.Permissions.MANAGE_EMOJIS:return null==T.default.getGuildId()?N.default.Messages.MANAGE_EMOJIS:N.default.Messages.MANAGE_EMOJIS_AND_STICKERS;case M.Permissions.VIEW_AUDIT_LOG:return N.default.Messages.VIEW_AUDIT_LOG;case M.Permissions.VIEW_CHANNEL:return N.default.Messages.READ_MESSAGES;case M.Permissions.SEND_MESSAGES:return N.default.Messages.SEND_MESSAGES;case M.Permissions.SEND_TTS_MESSAGES:return N.default.Messages.SEND_TTS_MESSAGES;case M.Permissions.USE_APPLICATION_COMMANDS:return N.default.Messages.USE_APPLICATION_COMMANDS;case M.Permissions.MANAGE_MESSAGES:return N.default.Messages.MANAGE_MESSAGES;case M.Permissions.EMBED_LINKS:return N.default.Messages.EMBED_LINKS;case M.Permissions.ATTACH_FILES:return N.default.Messages.ATTACH_FILES;case M.Permissions.READ_MESSAGE_HISTORY:return N.default.Messages.READ_MESSAGE_HISTORY;case M.Permissions.MENTION_EVERYONE:return N.default.Messages.MENTION_EVERYONE;case M.Permissions.USE_EXTERNAL_EMOJIS:return N.default.Messages.USE_EXTERNAL_EMOJIS;case M.Permissions.ADD_REACTIONS:return N.default.Messages.ADD_REACTIONS;case M.Permissions.CONNECT:return N.default.Messages.CONNECT;case M.Permissions.SPEAK:return N.default.Messages.SPEAK;case M.Permissions.MUTE_MEMBERS:return N.default.Messages.MUTE_MEMBERS;case M.Permissions.DEAFEN_MEMBERS:return N.default.Messages.DEAFEN_MEMBERS;case M.Permissions.MOVE_MEMBERS:return N.default.Messages.MOVE_MEMBERS;case M.Permissions.USE_VAD:return N.default.Messages.USE_VAD;case M.Permissions.PRIORITY_SPEAKER:return N.default.Messages.PRIORITY_SPEAKER;case M.Permissions.STREAM:return N.default.Messages.VIDEO;case M.Permissions.REQUEST_TO_SPEAK:return N.default.Messages.REQUEST_TO_SPEAK;case M.Permissions.MANAGE_EVENTS:return N.default.Messages.MANAGE_EVENTS;case M.Permissions.USE_PUBLIC_THREADS:return N.default.Messages.USE_PUBLIC_THREADS;case M.Permissions.USE_PRIVATE_THREADS:return N.default.Messages.USE_PRIVATE_THREADS;case M.Permissions.MANAGE_THREADS:return N.default.Messages.MANAGE_THREADS}return null},t.transformLogs=function(e,t){var n=[];return e.forEach((function(e){var r=function(e,t){switch(e.targetType){case M.AuditLogTargetTypes.GUILD:return t;case M.AuditLogTargetTypes.CHANNEL:case M.AuditLogTargetTypes.CHANNEL_OVERWRITE:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return g.default.getChannel(e)}),(function(e){return(0,p.computeChannelName)(e,C.default,I.default,!0)}));case M.AuditLogTargetTypes.USER:return k(e,M.AuditLogChangeKeys.NICK,(function(e){return C.default.getUser(e)}),(function(e){return e}));case M.AuditLogTargetTypes.ROLE:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return t.getRole(e)}),(function(e){return e.name}));case M.AuditLogTargetTypes.INVITE:return k(e,M.AuditLogChangeKeys.CODE,M.NOOP_NULL);case M.AuditLogTargetTypes.INTEGRATION:return k(e,M.AuditLogChangeKeys.TYPE,(function(e){return O.default.integrations.find((function(t){return t.id===e}))}),(function(e){return e.name}));case M.AuditLogTargetTypes.WEBHOOK:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return O.default.webhooks.find((function(t){return t.id===e}))}),(function(e){return e.name}));case M.AuditLogTargetTypes.EMOJI:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return S.default.getGuildEmoji(t.id).find((function(t){return t.id===e}))}),(function(e){return e.name}));case M.AuditLogTargetTypes.STICKER:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return h.default.getStickerById(e)}),(function(e){return e.name}));case M.AuditLogTargetTypes.STAGE_INSTANCE:return k(e,M.AuditLogChangeKeys.TOPIC,(function(e){var n;return null===(n=Object.values(_.default.getStageInstancesByGuild(t.id)))||void 0===n?void 0:n.find((function(t){return t.id===e}))}),(function(e){return e.topic}));case M.AuditLogTargetTypes.GUILD_SCHEDULED_EVENT:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return O.default.guildScheduledEvents.find((function(t){return t.id===e}))}),(function(e){return e.name}));case M.AuditLogTargetTypes.THREAD:return k(e,M.AuditLogChangeKeys.NAME,(function(e){return O.default.threads.find((function(t){return t.id===e}))}),(function(e){return e.name}));default:return R.warn("Unknown targetType for log",e),null}}(e,t),a=C.default.getUser(e.userId);if(null!=a&&(null!=r||[M.AuditLogActions.MEMBER_PRUNE,M.AuditLogActions.MEMBER_DISCONNECT,M.AuditLogActions.MEMBER_MOVE].includes(e.action))){if(null!=(e=(e=(e=e.set("user",a)).set("target",r)).set("options",function(e){if(null!=e.options){var t=P({},e.options);switch(e.options.type){case M.AuditLogSubtargetTypes.USER:t.subtarget=U(e.options.id,(function(e){return C.default.getUser(e)}),(function(e){return e.tag}));break;case M.AuditLogSubtargetTypes.ROLE:t.subtarget=U(e.options.role_name,M.NOOP_NULL)}return null!=e.options.channel_id&&(t.channel=k(e,"",(function(e){return g.default.getChannel(e)}),(function(e){return e}),e.options.channel_id)),e.options.members_removed&&(t.count=e.options.members_removed),t}return e.options}(e))).changes){var o=[];e.changes.forEach((function(e){var t=function(e){switch(e.key){case M.AuditLogChangeKeys.OWNER_ID:return j(e,(function(e){return C.default.getUser(e)}));case M.AuditLogChangeKeys.CHANNEL_ID:case M.AuditLogChangeKeys.AFK_CHANNEL_ID:case M.AuditLogChangeKeys.SYSTEM_CHANNEL_ID:case M.AuditLogChangeKeys.RULES_CHANNEL_ID:case M.AuditLogChangeKeys.PUBLIC_UPDATES_CHANNEL_ID:return j(e,(function(e){return g.default.getChannel(e)}),(function(e){return(0,p.computeChannelName)(e,C.default,I.default,!0)}));case M.AuditLogChangeKeys.AFK_TIMEOUT:return j(e,(function(e){return e/60}));case M.AuditLogChangeKeys.BITRATE:return j(e,(function(e){return e/1e3}));case M.AuditLogChangeKeys.COLOR:return j(e,(function(e){return(0,c.int2hex)(e).toUpperCase()}));case M.AuditLogChangeKeys.MAX_AGE:return j(e,(function(e){var t=b.default.getMaxAgeOptions.find((function(t){var n=t.value;return e===n}));return t?t.label:e}));case M.AuditLogChangeKeys.PERMISSIONS:var t=[],n=w(e.oldValue,e.newValue),r=n.added,a=n.removed;if(r.length>0){var o=new E.AuditLogChange(M.AuditLogChangeKeys.PERMISSIONS_GRANTED,null,r);t.push(o)}if(a.length){var i=new E.AuditLogChange(M.AuditLogChangeKeys.PERMISSIONS_DENIED,null,a);t.push(i)}return t;case M.AuditLogChangeKeys.PERMISSIONS_GRANTED:case M.AuditLogChangeKeys.PERMISSIONS_DENIED:var l=[],u=w(e.oldValue,e.newValue),s=u.added,d=u.removed;if(s.length>0){var f=new E.AuditLogChange(e.key,null,s);l.push(f)}if(d.length){var v=new E.AuditLogChange(M.AuditLogChangeKeys.PERMISSIONS_RESET,d,d);l.push(v)}return l;case M.AuditLogChangeKeys.PREFERRED_LOCALE:return j(e,(function(e){var t=N.default.getAvailableLocales().find((function(t){return t.value===e}));return null!=t?t.name:null}));case M.AuditLogChangeKeys.VIDEO_QUALITY_MODE:return j(e,(function(e){return e===M.VideoQualityMode.FULL?N.default.Messages.VIDEO_QUALITY_MODE_FULL:N.default.Messages.VIDEO_QUALITY_MODE_AUTO}))}return e}(e);Array.isArray(t)?t.forEach((function(e){return o.push(e)})):o.push(t)})),e=e.set("changes",o)}n.push(e)}})),n},t.ACTION_FILTER_ITEMS=t.NotRenderedChanges=t.ThreadChangeStrings=t.GuildScheduledEventChangeStrings=t.StageInstanceChangeStrings=t.IntegrationChangeStrings=t.StickerChangeStrings=t.EmojiChangeStrings=t.WebhookChangeStrings=t.InviteChangeStrings=t.RoleChangeStrings=t.UserChangeStrings=t.ChannelChangeStrings=t.GuildChangeStrings=t.DEFAULT_FOR_STRINGS_KEY=void 0;var r,a,o,i,l,u,s,d,f=A(n(63)),c=n(202),p=n(180),v=A(n(26)),y=n(8423),m=n(207),_=A(n(81)),h=A(n(362)),E=n(8681),g=A(n(10)),S=A(n(249)),O=A(n(8680)),I=A(n(70)),T=A(n(107)),C=A(n(12)),b=A(n(8286)),M=n(1),N=A(n(6));function A(e){return e&&e.__esModule?e:{default:e}}function P(){return(P=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}).apply(this,arguments)}var R=new v.default("AuditLogUtils");t.DEFAULT_FOR_STRINGS_KEY=-1;var L=function(){var e;return(e={})[M.AuditLogChangeKeys.REASON]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_COMMON_REASON,e};t.GuildChangeStrings=function(){var e,t,n,r,a;return P(((a={})[M.AuditLogChangeKeys.NAME]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_NAME_CHANGE,a[M.AuditLogChangeKeys.DESCRIPTION]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_DESCRIPTION_CLEAR,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_DESCRIPTION_CHANGE),a[M.AuditLogChangeKeys.ICON_HASH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_ICON_HASH_CHANGE,a[M.AuditLogChangeKeys.SPLASH_HASH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_SPLASH_HASH_CHANGE,a[M.AuditLogChangeKeys.DISCOVERY_SPLASH_HASH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_DISCOVERY_SPLASH_HASH_CHANGE,a[M.AuditLogChangeKeys.BANNER_HASH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_BANNER_HASH_CHANGE,a[M.AuditLogChangeKeys.OWNER_ID]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_OWNER_ID_CHANGE,a[M.AuditLogChangeKeys.REGION]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_REGION_CHANGE,a[M.AuditLogChangeKeys.PREFERRED_LOCALE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_PREFERRED_LOCALE_CHANGE,a[M.AuditLogChangeKeys.AFK_CHANNEL_ID]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_AFK_CHANNEL_ID_CLEAR,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_AFK_CHANNEL_ID_CHANGE),a[M.AuditLogChangeKeys.AFK_TIMEOUT]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_AFK_TIMEOUT_CHANGE,a[M.AuditLogChangeKeys.SYSTEM_CHANNEL_ID]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_SYSTEM_CHANNEL_ID_DISABLE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_SYSTEM_CHANNEL_ID_CHANGE),a[M.AuditLogChangeKeys.RULES_CHANNEL_ID]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_RULES_CHANNEL_ID_CLEAR,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_RULES_CHANNEL_ID_CHANGE),a[M.AuditLogChangeKeys.PUBLIC_UPDATES_CHANNEL_ID]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_UPDATES_CHANNEL_ID_CLEAR,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_UPDATES_CHANNEL_ID_CHANGE),a[M.AuditLogChangeKeys.MFA_LEVEL]=((e={})[M.MFALevels.NONE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_MFA_LEVEL_DISABLED,e[M.MFALevels.ELEVATED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_MFA_LEVEL_ENABLED,e),a[M.AuditLogChangeKeys.WIDGET_ENABLED]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_WIDGET_ENABLED,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_WIDGET_DISABLED},a[M.AuditLogChangeKeys.WIDGET_CHANNEL_ID]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_WIDGET_CHANNEL_ID_DELETE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_WIDGET_CHANNEL_ID_CHANGE),a[M.AuditLogChangeKeys.VERIFICATION_LEVEL]=((t={})[M.VerificationLevels.NONE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VERIFICATION_LEVEL_CHANGE_NONE,t[M.VerificationLevels.LOW]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VERIFICATION_LEVEL_CHANGE_LOW,t[M.VerificationLevels.MEDIUM]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VERIFICATION_LEVEL_CHANGE_MEDIUM,t[M.VerificationLevels.HIGH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VERIFICATION_LEVEL_CHANGE_HIGH,t[M.VerificationLevels.VERY_HIGH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VERIFICATION_LEVEL_CHANGE_VERY_HIGH,t),a[M.AuditLogChangeKeys.DEFAULT_MESSAGE_NOTIFICATIONS]=((n={})[M.UserNotificationSettings.ALL_MESSAGES]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_DEFAULT_MESSAGE_NOTIFICATIONS_CHANGE_ALL_MESSAGES,n[M.UserNotificationSettings.ONLY_MENTIONS]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_DEFAULT_MESSAGE_NOTIFICATIONS_CHANGE_ONLY_MENTIONS,n),a[M.AuditLogChangeKeys.VANITY_URL_CODE]=F(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VANITY_URL_CODE_DELETE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_VANITY_URL_CODE_CHANGE),a[M.AuditLogChangeKeys.EXPLICIT_CONTENT_FILTER]=((r={})[M.GuildExplicitContentFilterTypes.DISABLED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_EXPLICIT_CONTENT_FILTER_DISABLE,r[M.GuildExplicitContentFilterTypes.MEMBERS_WITHOUT_ROLES]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_EXPLICIT_CONTENT_FILTER_MEMBERS_WITHOUT_ROLES,r[M.GuildExplicitContentFilterTypes.ALL_MEMBERS]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_GUILD_EXPLICIT_CONTENT_FILTER_ALL_MEMBERS,r),a),L())};t.ChannelChangeStrings=function(){var e;return(e={})[M.AuditLogChangeKeys.NAME]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_NAME_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_NAME_CHANGE),e[M.AuditLogChangeKeys.POSITION]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_POSITION_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_POSITION_CHANGE),e[M.AuditLogChangeKeys.TOPIC]=B(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TOPIC_CHANGE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TOPIC_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TOPIC_CLEAR),e[M.AuditLogChangeKeys.BITRATE]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_BITRATE_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_BITRATE_CHANGE),e[M.AuditLogChangeKeys.RTC_REGION_OVERRIDE]=B(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RTC_REGION_OVERRIDE_CHANGE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RTC_REGION_OVERRIDE_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RTC_REGION_OVERRIDE_DELETE),e[M.AuditLogChangeKeys.USER_LIMIT]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_USER_LIMIT_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_USER_LIMIT_CHANGE),e[M.AuditLogChangeKeys.RATE_LIMIT_PER_USER]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RATE_LIMIT_PER_USER_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RATE_LIMIT_PER_USER_CHANGE),e[M.AuditLogChangeKeys.PERMISSIONS_RESET]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_PERMISSION_OVERRIDES_RESET,e[M.AuditLogChangeKeys.PERMISSIONS_GRANTED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_PERMISSION_OVERRIDES_GRANTED,e[M.AuditLogChangeKeys.PERMISSIONS_DENIED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_PERMISSION_OVERRIDES_DENIED,e[M.AuditLogChangeKeys.REASON]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_COMMON_REASON,e[M.AuditLogChangeKeys.NSFW]={false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_NSFW_DISABLED,true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_NSFW_ENABLED},e[M.AuditLogChangeKeys.TYPE]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TYPE_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TYPE_CHANGE),e[M.AuditLogChangeKeys.VIDEO_QUALITY_MODE]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_VIDEO_QUALITY_MODE_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_VIDEO_QUALITY_MODE_CHANGE),e[M.AuditLogChangeKeys.DEFAULT_AUTO_ARCHIVE_DURATION]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_DEFAULT_AUTO_ARCHIVE_DURATION_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_DEFAULT_AUTO_ARCHIVE_DURATION_CHANGE),e};t.UserChangeStrings=function(){var e;return P(((e={})[M.AuditLogChangeKeys.NICK]=B(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_NICK_CHANGE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_NICK_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_NICK_DELETE),e[M.AuditLogChangeKeys.DEAF]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_DEAF_ON,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_DEAF_OFF},e[M.AuditLogChangeKeys.MUTE]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_MUTE_ON,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_MUTE_OFF},e[M.AuditLogChangeKeys.ROLES_REMOVE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_ROLES_REMOVE,e[M.AuditLogChangeKeys.ROLES_ADD]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_ROLES_ADD,e[M.AuditLogChangeKeys.PRUNE_DELETE_DAYS]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_MEMBER_PRUNE_DELETE_DAYS,e),L())};t.RoleChangeStrings=function(){var e,t;return P(((t={})[M.AuditLogChangeKeys.NAME]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_NAME_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_NAME_CHANGE),t[M.AuditLogChangeKeys.PERMISSIONS_GRANTED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_PERMISSIONS_GRANTED,t[M.AuditLogChangeKeys.PERMISSIONS_DENIED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_PERMISSIONS_DENIED,t[M.AuditLogChangeKeys.COLOR]=((e={"#000000":N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_COLOR_NONE})[-1]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_COLOR_IOS,e),t[M.AuditLogChangeKeys.HOIST]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_HOIST_ON,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_HOIST_OFF},t[M.AuditLogChangeKeys.MENTIONABLE]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_MENTIONABLE_ON,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_ROLE_MENTIONABLE_OFF},t),L())};t.InviteChangeStrings=function(){var e,t,n;return P(((n={})[M.AuditLogChangeKeys.CODE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_CODE_CREATE,n[M.AuditLogChangeKeys.CHANNEL_ID]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_CHANNEL_CREATE,n[M.AuditLogChangeKeys.MAX_USES]=((e={0:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_MAX_USES_CREATE_INFINITE})[-1]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_MAX_USES_CREATE,e),n[M.AuditLogChangeKeys.MAX_AGE]=((t={0:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_MAX_AGE_CREATE_INFINITE})[-1]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_MAX_AGE_CREATE,t),n[M.AuditLogChangeKeys.TEMPORARY]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_TEMPORARY_ON,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INVITE_TEMPORARY_OFF},n),L())};t.WebhookChangeStrings=function(){var e;return(e={})[M.AuditLogChangeKeys.CHANNEL_ID]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_CHANNEL_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_CHANNEL_CHANGE),e[M.AuditLogChangeKeys.NAME]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_NAME_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_NAME_CHANGE),e[M.AuditLogChangeKeys.AVATAR_HASH]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_WEBHOOK_AVATAR,e[M.AuditLogChangeKeys.REASON]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_COMMON_REASON,e};t.EmojiChangeStrings=function(){var e;return P(((e={})[M.AuditLogChangeKeys.NAME]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_EMOJI_NAME_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_EMOJI_NAME_CHANGE),e),L())};t.StickerChangeStrings=function(){var e;return P(((e={})[M.AuditLogChangeKeys.NAME]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_NAME_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_NAME_CHANGE),e[M.AuditLogChangeKeys.TAGS]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_TAGS_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_TAGS_CHANGE),e[M.AuditLogChangeKeys.DESCRIPTION]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_DESCRIPTION_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_DESCRIPTION_CHANGE),e),L())};t.IntegrationChangeStrings=function(){var e;return P(((e={})[M.AuditLogChangeKeys.ENABLE_EMOTICONS]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_ENABLE_EMOTICONS_ON,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_ENABLE_EMOTICONS_OFF},e[M.AuditLogChangeKeys.EXPIRE_BEHAVIOR]={0:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_EXPIRE_BEHAVIOR_REMOVE_SYNCED_ROLE,1:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_EXPIRE_BEHAVIOR_KICK_FROM_SERVER},e[M.AuditLogChangeKeys.EXPIRE_GRACE_PERIOD]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_INTEGRATION_EXPIRE_GRACE_PERIOD,e),L())};t.StageInstanceChangeStrings=function(){var e,t;return(t={})[M.AuditLogChangeKeys.TOPIC]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TOPIC_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_TOPIC_CHANGE),t[M.AuditLogChangeKeys.PRIVACY_LEVEL]=((e={})[m.StageInstancePrivacyLevel.GUILD_ONLY]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_PRIVACY_LEVEL_GUILD_ONLY,e[m.StageInstancePrivacyLevel.PUBLIC]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_PRIVACY_LEVEL_PUBLIC,e),t};t.GuildScheduledEventChangeStrings=function(){var e,t,n,r;return(r={})[M.AuditLogChangeKeys.NAME]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_NAME_CREATE,r[M.AuditLogChangeKeys.DESCRIPTION]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_DESCRIPTION_CREATE,r[M.AuditLogChangeKeys.PRIVACY_LEVEL]=((e={})[m.StageInstancePrivacyLevel.GUILD_ONLY]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_PRIVACY_LEVEL_GUILD_ONLY,e[m.StageInstancePrivacyLevel.PUBLIC]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_STAGE_INSTANCE_PRIVACY_LEVEL_PUBLIC,e),r[M.AuditLogChangeKeys.STATUS]=((t={})[y.GuildScheduledEventStatus.SCHEDULED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_STATUS_SCHEDULED,t[y.GuildScheduledEventStatus.ACTIVE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_STATUS_ACTIVE,t[y.GuildScheduledEventStatus.COMPLETED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_STATUS_COMPLETED,t[y.GuildScheduledEventStatus.CANCELED]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_STATUS_CANCELED,t),r[M.AuditLogChangeKeys.ENTITY_TYPE]=((n={})[y.GuildScheduledEventEntityTypes.NONE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_ENTITY_TYPE_NONE,n[y.GuildScheduledEventEntityTypes.STAGE_INSTANCE]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_ENTITY_TYPE_STAGE_INSTANCE,n),r[M.AuditLogChangeKeys.SKU_IDS]=N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_SCHEDULED_EVENT_SKUS_CREATE,r};t.ThreadChangeStrings=function(){var e;return(e={})[M.AuditLogChangeKeys.NAME]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_NAME_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_NAME_CHANGE),e[M.AuditLogChangeKeys.ARCHIVED]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_ARCHIVED,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_UNARCHIVED},e[M.AuditLogChangeKeys.LOCKED]={true:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_LOCKED,false:N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_UNLOCKED},e[M.AuditLogChangeKeys.AUTO_ARCHIVE_DURATION]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_AUTO_ARCHIVE_DURATION_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_THREAD_AUTO_ARCHIVE_DURATION_CHANGE),e[M.AuditLogChangeKeys.RATE_LIMIT_PER_USER]=G(N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RATE_LIMIT_PER_USER_CREATE,N.default.Messages.GUILD_SETTINGS_AUDIT_LOG_CHANNEL_RATE_LIMIT_PER_USER_CHANGE),e};var D=((d={})[M.AuditLogTargetTypes.CHANNEL]=((r={})[M.AuditLogChangeKeys.ID]=!0,r[M.AuditLogChangeKeys.PERMISSION_OVERWRITES]=!0,r),d[M.AuditLogTargetTypes.CHANNEL_OVERWRITE]=((a={})[M.AuditLogChangeKeys.TYPE]=!0,a[M.AuditLogChangeKeys.ID]=!0,a[M.AuditLogChangeKeys.PERMISSION_OVERWRITES]=!0,a),d[M.AuditLogTargetTypes.INVITE]=((o={})[M.AuditLogChangeKeys.INVITER_ID]=!0,o[M.AuditLogChangeKeys.USES]=!0,o),d[M.AuditLogTargetTypes.WEBHOOK]=((i={})[M.AuditLogChangeKeys.TYPE]=!0,i[M.AuditLogChangeKeys.APPLICATION_ID]=!0,i),d[M.AuditLogTargetTypes.INTEGRATION]=((l={})[M.AuditLogChangeKeys.TYPE]=!0,l),d[M.AuditLogTargetTypes.THREAD]=((u={})[M.AuditLogChangeKeys.ID]=!0,u[M.AuditLogChangeKeys.TYPE]=!0,u),d[M.AuditLogTargetTypes.STICKER]=((s={})[M.AuditLogChangeKeys.ID]=!0,s[M.AuditLogChangeKeys.TYPE]=!0,s[M.AuditLogChangeKeys.ASSET]=!0,s[M.AuditLogChangeKeys.FORMAT_TYPE]=!0,s[M.AuditLogChangeKeys.AVAILABLE]=!0,s[M.AuditLogChangeKeys.GUILD_ID]=!0,s),d);t.NotRenderedChanges=D;function w(e,t){var n=f.default.deserialize("string"==typeof e?e:0),r=f.default.deserialize("string"==typeof t?t:0),a=f.default.remove(r,n),o=f.default.remove(n,r),i=[],l=[];for(var u in M.Permissions){var s=M.Permissions[u];f.default.has(a,s)&&i.push(s),f.default.has(o,s)&&l.push(s)}return{added:i,removed:l}}function j(e,t,n){var r=e.newValue,a=e.oldValue;return null!=e.newValue&&(r=t(e.newValue),null!=n&&null!=r&&(r=n(r))),null!=e.oldValue&&(a=t(e.oldValue),null!=n&&null!=a&&(a=n(a))),new E.AuditLogChange(e.key,a||e.oldValue,r||e.newValue)}function k(e,t,n,r,a){var o=null,i=n(a=a||e.targetId);if(null!=i&&null!=r&&(o=r(i)),null==o){var l=O.default.deletedTargets[e.targetType];null!=l&&l[a]&&(o=l[a])}if(null==o&&null!=e.changes){var u=e.changes.find((function(e){return e.key===t}));null!=u&&(o=u.newValue||u.oldValue)}return o||a}function U(e,t,n){var r=e,a=t(e);return null!=a&&null!=n&&(r=n(a)),r}function G(e,t){return function(n){return null==n.oldValue?e:t}}function F(e,t){return function(n){return null==n.newValue?e:t}}function B(e,t,n,r){return function(a){return null!=a.newValue&&null!=a.oldValue?e:null!=a.newValue?t:null!=a.oldValue?n:r}}t.ACTION_FILTER_ITEMS=function(){return[{value:M.AuditLogActions.ALL,label:N.default.Messages.GUILD_SETTINGS_FILTER_ALL_ACTIONS,valueLabel:N.default.Messages.GUILD_SETTINGS_FILTER_ALL},{value:M.AuditLogActions.GUILD_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_GUILD_UPDATE},{value:M.AuditLogActions.CHANNEL_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_CHANNEL_CREATE},{value:M.AuditLogActions.CHANNEL_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_CHANNEL_UPDATE},{value:M.AuditLogActions.CHANNEL_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_CHANNEL_DELETE},{value:M.AuditLogActions.CHANNEL_OVERWRITE_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_CHANNEL_OVERWRITE_CREATE},{value:M.AuditLogActions.CHANNEL_OVERWRITE_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_CHANNEL_OVERWRITE_UPDATE},{value:M.AuditLogActions.CHANNEL_OVERWRITE_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_CHANNEL_OVERWRITE_DELETE},{value:M.AuditLogActions.MEMBER_KICK,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_KICK},{value:M.AuditLogActions.MEMBER_PRUNE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_PRUNE},{value:M.AuditLogActions.MEMBER_BAN_ADD,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_BAN_ADD},{value:M.AuditLogActions.MEMBER_BAN_REMOVE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_BAN_REMOVE},{value:M.AuditLogActions.MEMBER_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_UPDATE},{value:M.AuditLogActions.MEMBER_ROLE_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_ROLE_UPDATE},{value:M.AuditLogActions.MEMBER_MOVE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_MOVE},{value:M.AuditLogActions.MEMBER_DISCONNECT,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MEMBER_DISCONNECT},{value:M.AuditLogActions.BOT_ADD,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_BOT_ADD},{value:M.AuditLogActions.THREAD_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_THREAD_CREATE},{value:M.AuditLogActions.THREAD_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_THREAD_UPDATE},{value:M.AuditLogActions.THREAD_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_THREAD_DELETE},{value:M.AuditLogActions.ROLE_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_ROLE_CREATE},{value:M.AuditLogActions.ROLE_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_ROLE_UPDATE},{value:M.AuditLogActions.ROLE_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_ROLE_DELETE},{value:M.AuditLogActions.INVITE_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_INVITE_CREATE},{value:M.AuditLogActions.INVITE_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_INVITE_UPDATE},{value:M.AuditLogActions.INVITE_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_INVITE_DELETE},{value:M.AuditLogActions.WEBHOOK_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_WEBHOOK_CREATE},{value:M.AuditLogActions.WEBHOOK_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_WEBHOOK_UPDATE},{value:M.AuditLogActions.WEBHOOK_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_WEBHOOK_DELETE},{value:M.AuditLogActions.EMOJI_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_EMOJI_CREATE},{value:M.AuditLogActions.EMOJI_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_EMOJI_UPDATE},{value:M.AuditLogActions.EMOJI_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_EMOJI_DELETE},{value:M.AuditLogActions.MESSAGE_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MESSAGE_DELETE},{value:M.AuditLogActions.MESSAGE_BULK_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MESSAGE_BULK_DELETE},{value:M.AuditLogActions.MESSAGE_PIN,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MESSAGE_PIN},{value:M.AuditLogActions.MESSAGE_UNPIN,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_MESSAGE_UNPIN},{value:M.AuditLogActions.INTEGRATION_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_INTEGRATION_CREATE},{value:M.AuditLogActions.INTEGRATION_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_INTEGRATION_UPDATE},{value:M.AuditLogActions.INTEGRATION_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_INTEGRATION_DELETE},{value:M.AuditLogActions.STICKER_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_STICKER_CREATE},{value:M.AuditLogActions.STICKER_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_STICKER_UPDATE},{value:M.AuditLogActions.STICKER_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_STICKER_DELETE},{value:M.AuditLogActions.STAGE_INSTANCE_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_STAGE_INSTANCE_CREATE},{value:M.AuditLogActions.STAGE_INSTANCE_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_STAGE_INSTANCE_UPDATE},{value:M.AuditLogActions.STAGE_INSTANCE_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_STAGE_INSTANCE_DELETE},{value:M.AuditLogActions.GUILD_SCHEDULED_EVENT_CREATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_GUILD_SCHEDULED_EVENT_CREATE},{value:M.AuditLogActions.GUILD_SCHEDULED_EVENT_UPDATE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_GUILD_SCHEDULED_EVENT_UPDATE},{value:M.AuditLogActions.GUILD_SCHEDULED_EVENT_DELETE,label:N.default.Messages.GUILD_SETTINGS_ACTION_FILTER_GUILD_SCHEDULED_EVENT_DELETE}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FeatureCard=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=R(n(9)),i=n(3),l=n(395),u=n(1220),s=R(n(9814)),d=R(n(40)),f=R(n(29)),c=R(n(149)),p=R(n(9176)),v=R(n(1236)),y=R(n(8832)),m=n(41),_=R(n(47)),h=R(n(24)),E=R(n(93)),g=n(1),S=R(n(6)),O=R(n(7708)),I=R(n(8988)),T=R(n(9821)),C=R(n(9822)),b=R(n(9823)),M=R(n(9824)),N=R(n(9825)),A=R(n(9826)),P=R(n(9827));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(){return(D=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}).apply(this,arguments)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var j=[{iconSrc:N.default,name:"Pokemon GO Paris",position:[-230,-100]},{iconSrc:A.default,name:"Python",position:[-180,-100],faded:!0,rightAlign:!0},{iconSrc:b.default,name:"Learn Latin",position:[-280,-30],faded:!0},{iconSrc:M.default,name:"r/leagueoflegends",position:[-320,-30],rightAlign:!0},{iconSrc:P.default,name:"Sneaker Fans",position:[-250,40]},{iconSrc:C.default,name:"Hogwarts School",position:[-270,40],faded:!0,rightAlign:!0}],k=function(e){var t=e.icon,n=e.color,r=e.size,a=void 0===r?24:r,o=e.header,i=e.body,l=t;return w("div",{className:O.default.featureCard},void 0,w("div",{className:O.default.featureIcon},void 0,w(l,{color:n,width:a,height:a})),w(_.default,{size:_.default.Sizes.SIZE_16,className:O.default.featureHeader},void 0,o),w(h.default,{color:h.default.Colors.HEADER_SECONDARY},void 0,i))};t.FeatureCard=k,k.displayName="FeatureCard";var U=function(e){var t,n,r=e.iconSrc,a=e.name,i=e.position,l=e.faded,u=e.rightAlign,s=e.imageCoordinates,d=((t={})[u?"right":"left"]=s[0]+i[0],t.top=s[1]+i[1],t);return w("div",{className:(0,o.default)(O.default.guildDetails,(n={},n[O.default.faded]=l,n)),style:d},void 0,w("img",{alt:"",src:r,className:O.default.guildIcon,width:24,height:24}),w(_.default,{size:_.default.Sizes.SIZE_12},void 0,a))};U.displayName="GuildDetails";var G=function(e){var t,n,r=e.guild,o=a.useState(0),C=o[0],b=o[1],M=a.useState(0),N=M[0],A=M[1],P=a.useRef(null),R=(0,i.useStateFromStores)([d.default],(function(){return d.default.can(g.Permissions.ADMINISTRATOR,r)})),L=null==P||null===(t=P.current)||void 0===t?void 0:t.offsetWidth,G=null==P||null===(n=P.current)||void 0===n?void 0:n.offsetHeight;a.useEffect((function(){null!=L&&b(L/2),null!=G&&A(G/2)}),[L,G,b,A]),a.useEffect((function(){(0,u.hideHotspot)(l.HotspotLocations.GUILD_SETTINGS_COMMUNITY_GUILD_UPSELL)}),[]);var F=function(){(0,m.openModal)((function(e){return a.createElement(s.default,e)}))};return w("div",{className:O.default.container},void 0,a.createElement("div",{className:O.default.banner,ref:P},j.map((function(e){return a.createElement(U,D({key:e.name},e,{imageCoordinates:[C,N]}))})),w("img",{alt:"",src:I.default,className:O.default.image,width:256}),w("img",{alt:"",src:T.default,className:O.default.sparkles})),w(_.default,{size:_.default.Sizes.SIZE_24},void 0,S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_HEADER),w(h.default,{color:h.default.Colors.HEADER_SECONDARY,size:h.default.Sizes.SIZE_16,className:O.default.body},void 0,S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_BODY),w(c.default,{text:R?null:S.default.Messages.GUILD_SETTINGS_COMMUNITY_ADMINISTRATOR_ONLY,"aria-label":R?void 0:S.default.Messages.GUILD_SETTINGS_COMMUNITY_ADMINISTRATOR_ONLY},void 0,(function(e){return a.createElement(f.default,D({onClick:F,className:O.default.button,disabled:!R},e),S.default.Messages.GET_STARTED)})),w("hr",{className:O.default.separator}),w(h.default,{color:h.default.Colors.HEADER_SECONDARY},void 0,S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_DETAILS),w(h.default,{color:h.default.Colors.HEADER_SECONDARY,className:O.default.body},void 0,S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_LEARN_MORE.format({helpdeskArticle:E.default.getArticleURL(g.HelpdeskArticles.GUILD_COMMUNITY_FEATURE)})),w("div",{className:O.default.features},void 0,[{icon:y.default,color:g.Colors.STATUS_GREEN_600,header:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_DISCOVERY_HEADER,body:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_DISCOVERY_BODY.format({featureHook:function(e,t){return w("strong",{className:O.default.featuredText},t,e)}})},{icon:p.default,color:g.Colors.PARTNER,header:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_ANALYTICS_HEADER,body:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_ANALYTICS_BODY.format({infoHook:function(){return w(c.default,{text:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_ANALYTICS_TOOLTIP,"aria-label":S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_ANALYTICS_TOOLTIP},void 0,(function(e){return a.createElement(v.default,D({className:O.default.infoIcon},e))}))},featureHook:function(e,t){return w("strong",{className:O.default.featuredText},t,e)}})},{icon:v.default,color:g.Colors.STATUS_RED_400,header:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_STAY_INFORMED_HEADER,body:S.default.Messages.GUILD_SETTINGS_COMMUNITY_INTRO_UPSELL_STAY_INFORMED_BODY}].map((function(e,t){return a.createElement(k,D({key:t},e))}))))};G.displayName="GuildSettingsCommunityIntro";var F=G;t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=v(n(5673)),l=v(n(29)),u=n(85),s=n(35),d=v(n(47)),f=v(n(24)),c=v(n(6)),p=v(n(7706));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t,n=e.index,r=e.title,a=e.selected;return m("div",{className:(0,o.default)(p.default.overviewStep,(t={},t[p.default.selected]=a,t))},void 0,m(f.default,{className:p.default.stepIndex},void 0,n+1),m(f.default,{size:f.default.Sizes.SIZE_16,className:p.default.stepTitle},void 0,r))};_.displayName="OverviewStep";var h=function(e){var t=e.className,n=e.title,r=e.stepData,f=e.transitionState,v=e.onClose,y=e.completeButtonText,h=e.overviewFooter,E=e.onComplete,g=e.sequencerClassName,S=e.initialStep,O=void 0===S?0:S,I=e.submitting,T=void 0!==I&&I,C=e.autoCloseOnComplete,b=void 0===C||C,M=a.useState([]),N=M[0],A=M[1],P=a.useState(O),R=P[0],L=P[1],D=(0,u.useUID)();a.useEffect((function(){A([].concat(Array(r.length).keys()))}),[r.length]);var w=r[R],j=0===R,k=R===r.length-1,U=null!=y?y:c.default.Messages.DONE;return m(s.ModalRoot,{size:s.ModalSize.MEDIUM,className:(0,o.default)(p.default.container,t),transitionState:f,"aria-labelledby":D},void 0,m("div",{className:p.default.overviewSidebar},void 0,m(d.default,{size:d.default.Sizes.SIZE_24,className:p.default.header},void 0,n),m("div",{className:p.default.overviewSteps},void 0,r.map((function(e,t){return m(_,{index:t,title:e.overviewTitle,selected:t===R},t)}))),h),m("div",{className:p.default.modal},void 0,m(s.ModalContent,{},void 0,m(s.ModalCloseButton,{focusProps:{offset:{top:4,right:4,left:4}},onClick:v,className:p.default.closeButton}),m(i.default,{step:R,steps:N,sideMargin:24,verticalMargin:24,className:(0,o.default)(p.default.sequencer,g),innerClassName:p.default.innerSequencer},void 0,w.modalContent)),m(s.ModalFooter,{className:p.default.footer},void 0,m(l.default,{type:"submit",submitting:T,onClick:function(){k?(E(),b&&v()):L(R+1)},color:l.default.Colors.GREEN,disabled:w.disableNextStep},void 0,k?U:c.default.Messages.NEXT),j?null:m(l.default,{look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY,size:l.default.Sizes.MIN,onClick:function(){return L(R-1)}},void 0,c.default.Messages.BACK))))};h.displayName="MultiStepModal";var E=h;t.default=E},function(e,t,n){e.exports=n.p+"7f62c4c1f689de046a6ad83020c897ad.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=n(3),i=j(n(28)),l=j(n(5938)),u=j(n(8257)),s=n(180),d=j(n(8408)),f=j(n(249)),c=U(n(86)),p=j(n(70)),v=j(n(12)),y=j(n(29)),m=j(n(8564)),_=j(n(55)),h=j(n(278)),E=j(n(1159)),g=j(n(153)),S=n(149),O=n(85),I=j(n(681)),T=j(n(686)),C=n(35),b=j(n(47)),M=j(n(24)),N=j(n(78)),A=n(8933),P=j(n(8523)),R=j(n(8990)),L=n(1),D=j(n(6)),w=j(n(7710));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(){return(G=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}).apply(this,arguments)}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var B=function(e){var t,n,r=e.guildId,j=e.welcomeChannel,k=e.transitionState,U=e.onSave,B=e.onClose,H=(0,O.useUID)(),x=a.useState(null!=j?j.channel_id:null),V=x[0],W=x[1],Y=a.useState(null!=j?j.description:""),z=Y[0],K=Y[1],$=a.useState(null!=j?{id:j.emoji_id,name:j.emoji_name}:null),Z=$[0],q=$[1],X=a.useState(!1),J=X[0],Q=X[1],ee=(0,o.useStateFromStores)([f.default],(function(){return null!=(null==Z?void 0:Z.id)?f.default.getUsableCustomEmojiById(Z.id):null})),te=(0,o.useStateFromStores)([c.default],(function(){return c.default.getChannels(r)[c.GUILD_SELECTABLE_CHANNELS_KEY]}),[r]),ne=(0,o.useStateFromStores)([P.default],(function(){return P.default.get(r)})),re=null!==(t=null==ne||null===(n=ne.welcome_channels)||void 0===n?void 0:n.map((function(e){return e.channel_id})))&&void 0!==t?t:[],ae=a.useState(!1),oe=ae[0],ie=ae[1];a.useEffect((function(){i.default.get(A.WELCOME_EMOJI_TOOLTIP_STORAGE_KEY)||setTimeout((function(){return ie(!0)}),300)}),[]);var le=[];te.forEach((function(e){var t=e.channel;!N.default.canEveryoneRole(L.Permissions.VIEW_CHANNEL,t)||(null==j?void 0:j.channel_id)!==t.id&&re.includes(t.id)||le.push({value:t.id,label:(0,s.computeChannelName)(t,v.default,p.default,!0)})}));var ue=function(){ie(!1),B()},se=a.useCallback((function(e){return K(e)}),[]),de=a.useCallback((function(){i.default.set(A.WELCOME_EMOJI_TOOLTIP_STORAGE_KEY,!0),ie(!1)}),[]);return F(u.default,{page:L.AnalyticsPages.CHANNEL_WELCOME_CREATE_MODAL},void 0,F(C.ModalRoot,{transitionState:k,"aria-labelledby":H},void 0,F("div",{className:w.default.modalContents},void 0,F(C.ModalCloseButton,{onClick:ue,className:w.default.closeButton}),F(b.default,{size:b.default.Sizes.SIZE_16,className:w.default.headerText,id:H},void 0,null==j?D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_RECOMMENDED_CHANNEL_MODAL_ADD:D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_RECOMMENDED_CHANNEL_MODAL_EDIT),F(M.default,{size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY,className:w.default.formDescription},void 0,D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_PICK_CHANNEL),F(I.default,{className:w.default.formGroup,title:D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_SELECT_A_CHANNEL},void 0,F(E.default,{clearable:!1,searchable:!0,options:le,onChange:function(e){var t=e.value;return W(t)},value:V}),F(M.default,{size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY,className:w.default.formDescription},void 0,D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_ONLY_VIEWABLE_CHANNELS)),F(I.default,{className:w.default.formGroup,title:D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_SET_DESCRIPTION},void 0,F("div",{className:w.default.channelDescriptionWrapper},void 0,F("div",{className:w.default.emojiButtonContainer},void 0,F(h.default,{renderPopout:function(e){var t=e.closePopout,n=c.default.getDefaultChannel(r);return F(d.default,{guildId:r,closePopout:t,onSelectEmoji:function(e,n){!function(e){var t,n,r;null!=e&&q(null!=e.id?{id:null!==(t=e.id)&&void 0!==t?t:null,name:null!==(n=e.name)&&void 0!==n?n:null}:{id:null,name:null!==(r=e.optionallyDiverseSequence)&&void 0!==r?r:null})}(e),n&&t()},pickerIntention:L.EmojiIntention.COMMUNITY_CONTENT,onNavigateAway:ue,channel:n})},position:h.default.Positions.LEFT,animation:h.default.Animation.NONE,align:h.default.Align.BOTTOM},void 0,(function(e,t){return F(S.TooltipContainer,{color:S.TooltipColors.BRAND,tooltipClassName:w.default.tooltip,position:S.TooltipPositions.LEFT,text:oe?D.default.Messages.WELCOME_CHANNEL_EMOJI_PICKER_TOOLTIP:null,forceOpen:oe},void 0,a.createElement(m.default,G({},e,{onClick:function(t){de(),e.onClick&&e.onClick(t)},active:t,className:w.default.emojiButton,tabIndex:0,renderButtonContents:null==Z||null==Z.id&&null==Z.name?null:function(){return F(l.default,{className:w.default.emoji,emojiId:Z.id,emojiName:Z.name,animated:Boolean(null==ee?void 0:ee.animated)})}})))}))),F(g.default,{maxLength:42,value:z,inputClassName:w.default.input,placeholder:D.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_CHANNEL_DESCRIPTION_PLACEHOLDER,onChange:se}),z.length>0||null!=Z?F(y.default,{className:w.default.clearButton,onClick:function(){K(""),q(null)},look:y.default.Looks.BLANK,size:y.default.Sizes.NONE},void 0,F(T.default,{className:w.default.clearIcon})):null))),F(C.ModalFooter,{className:w.default.footer,justify:_.default.Justify.BETWEEN},void 0,F(_.default,{grow:0,align:_.default.Align.CENTER},void 0,F(y.default,{onClick:ue,size:y.default.Sizes.SMALL,look:y.default.Looks.LINK,color:y.default.Colors.PRIMARY},void 0,D.default.Messages.CANCEL),F(y.default,{onClick:function(){null!=V&&z.length>0&&U({channel_id:V,description:z,emoji_id:null==Z?void 0:Z.id,emoji_name:null==Z?void 0:Z.name}),ue()},disabled:null==V||0===z.length},void 0,D.default.Messages.SAVE)),null!=j&&F(y.default,{onClick:function(){Q(!0)},size:y.default.Sizes.MIN,look:y.default.Looks.LINK,color:y.default.Colors.RED},void 0,D.default.Messages.REMOVE)),J&&F(R.default,{onConfirm:function(){U(),ue()},onCancel:function(){return Q(!1)},channelId:V})))};B.displayName="CreateWelcomeChannelModal";var H=B;t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=d(n(180)),i=d(n(10)),l=n(466),u=d(n(24)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.onConfirm,n=e.onCancel,r=e.channelId,d=(0,a.useStateFromStores)([i.default],(function(){return null!=r?i.default.getChannel(r):null})),f=(0,o.default)(d,!0);return c(l.DeclarativeConfirmModal,{dismissable:!0,header:s.default.Messages.WELCOME_CHANNEL_DELETE_CONFIRM_TITLE,confirmText:s.default.Messages.REMOVE,cancelText:s.default.Messages.CANCEL,onConfirm:t,onCancel:n},void 0,c(u.default,{size:u.default.Sizes.SIZE_14},void 0,null!=d?s.default.Messages.WELCOME_CHANNEL_DELETE_CONFIRM_BODY.format({channelName:f}):s.default.Messages.WELCOME_CHANNEL_DELETE_CONFIRM_BODY_GENERIC))}p.displayName="WelcomeChannelDeleteConfirmModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackGuildSelected=function(e,t,n){a.default.track(i.AnalyticEvents.GUILD_DISCOVERY_GUILD_SELECTED,{load_id:n.loadId,location:u({},n.location,{object:i.AnalyticsObjects.CARD}),guild_id:e,card_index:t})},t.trackDiscoveryViewed=function(e,t){var n=t.loadId,r=(t.loadDate,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["loadId","loadDate"]));a.default.track(i.AnalyticEvents.GUILD_DISCOVERY_VIEWED,u({},r,{load_id:n,num_guilds_recommended:e.length,recommended_guild_ids:e}))},t.trackGuildSettingsDiscoveryViewed=function(e){var t=o.default.getDiscoveryChecklist(e),n=[];(null==t?void 0:t.sufficient)||((null==t?void 0:t.safeEnvironment)||n.push(r.SAFE_ENVIRONMENT),(null==t?void 0:t.healthy)&&!(null==t?void 0:t.healthScorePending)||n.push(r.HEALTHY),(null==t?void 0:t.size)||n.push(r.SIZE),Object.keys((null==t?void 0:t.nsfwProperties)||{}).length>0&&n.push(r.NSFW),(null==t?void 0:t.protected)||n.push(r.PROTECTED));a.default.track(i.AnalyticEvents.GUILD_SETTINGS_DISCOVERY_VIEWED,{guild_id:e,failed_reasons:n})};var r,a=l(n(13)),o=l(n(8533)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=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}).apply(this,arguments)}!function(e){e.SAFE_ENVIRONMENT="TNS",e.HEALTHY="HEALTH",e.SIZE="MEMBER_COUNT",e.NSFW="BAD_WORDS",e.PROTECTED="2FA"}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=g(n(9)),l=g(n(1166)),u=g(n(375)),s=g(n(149)),d=g(n(248)),f=g(n(24)),c=g(n(150)),p=n(193),v=n(139),y=n(1),m=g(n(6)),_=g(n(7715)),h=g(n(8993)),E=g(n(8994));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=((r={})[y.ThemeTypes.DARK]=h.default,r[y.ThemeTypes.LIGHT]=E.default,r),T=[16,16,14,14,12,10,8];function C(e){var t,n,r=e.guild,a=e.disabled,y=e.small,h=e.loading,E=void 0!==h&&h,g=e.description,S=e.memberCount,C=e.presenceCount,b=e.className,M=(0,l.default)(),N=o.useState(!1),A=N[0],P=N[1];if(null==r||E)return O("div",{className:(0,i.default)(b,_.default.card,_.default.cardPlaceholder,(n={},n[_.default.cardSmall]=y,n[_.default.cardDisabled]=a,n))});var R=r.name,L=null!=r.discoverySplash&&/^data:/.test(r.discoverySplash)?r.discoverySplash:c.default.getGuildDiscoverySplashURL({id:r.id,splash:r.discoverySplash,size:240*(0,p.getDevicePixelRatio)()}),D=null!=L?L:I[M],w=c.default.getGuildIconURL({id:r.id,icon:r.icon,size:40})||void 0,j=null!=r.description?r.description:g,k=null!=S?S:null==r?void 0:r.memberCount,U=null!=C?C:null==r?void 0:r.presenceCount,G=null;if(null!=w)G=O("img",{src:w,alt:"",className:_.default.avatar});else{var F=(0,v.getAcronym)(r.name);G=O("div",{className:_.default.defaultIcon},void 0,O(f.default,{className:_.default.acronym,style:{fontSize:T[F.length]||T[T.length-1]}},void 0,F))}return O("div",{className:(0,i.default)(b,_.default.card,(t={},t[_.default.cardSmall]=y,t[_.default.cardDisabled]=a,t[_.default.splashLoaded]=A,t))},void 0,O("div",{className:_.default.cardHeader},void 0,O("div",{className:_.default.splash},void 0,O("img",{src:D,alt:"",className:_.default.splashImage,onLoad:function(){return P(!0)}})),O("div",{className:_.default.guildIcon},void 0,O(d.default,{mask:d.default.Masks.SQUIRCLE,width:48,height:48},void 0,O("div",{className:_.default.iconMask},void 0,O(d.default,{mask:d.default.Masks.SQUIRCLE,width:40,height:40},void 0,null!=G?G:null))))),O("div",{className:_.default.guildInfo},void 0,O("div",{className:_.default.title},void 0,O(u.default,{className:_.default.verifiedIcon,guild:r,tooltipColor:s.default.Colors.PRIMARY}),O(f.default,{className:_.default.guildName,size:f.default.Sizes.SIZE_16},void 0,O("span",{},void 0,R))),O(f.default,{className:_.default.description,size:f.default.Sizes.SIZE_14},void 0,O("span",{},void 0,j)),O("div",{className:_.default.memberInfo},void 0,null!=U&&O("div",{className:_.default.memberCount},void 0,O("div",{className:_.default.dotOnline}),O(f.default,{size:f.default.Sizes.SIZE_12},void 0,y?m.default.Messages.NUMBERS_ONLY.format({count:U}):m.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:U}))),null!=k&&O("div",{className:_.default.memberCount},void 0,O("div",{className:_.default.dotOffline}),O(f.default,{size:f.default.Sizes.SIZE_12},void 0,y?m.default.Messages.NUMBERS_ONLY.format({count:k}):m.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:k}))))))}C.displayName="DiscoverStaticGuildCard";var b=C;t.default=b},function(e,t,n){e.exports=n.p+"d03d90cb6f12a7ea06274b278dfa4160.svg"},function(e,t,n){e.exports=n.p+"7b6ed225050df29a07cb5db712d35a73.svg"},function(e,t,n){e.exports=n.p+"446a060321730a318ca1649b0cc40d44.svg"},function(e,t,n){e.exports=n.p+"38defe07899a762bfc301ddddd206116.svg"},function(e,t,n){e.exports=n.p+"712a0fd4d14a1caadd31cb0745e91238.svg"},function(e,t,n){e.exports=n.p+"857c505aafbe092e4f6efecebcad0bc8.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=M(n(8)),l=M(n(3)),u=n(5946),s=M(n(8300)),d=M(n(56)),f=M(n(8255)),c=M(n(8568)),p=M(n(12)),v=M(n(278)),y=M(n(9899)),m=M(n(151)),_=M(n(149)),h=M(n(8409)),E=n(131),g=M(n(279)),S=M(n(272)),O=n(5935),I=n(139),T=n(1),C=M(n(6)),b=M(n(7385));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=(0,I.cssValueToNumber)(b.default.progressWithSubscriptionsMarginTop),D=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).tierRefs={},t.defaultTierRef=a.createRef(),t.state={tierPositions:null,animatedTier:T.PremiumGuildTiers.NONE},t.setTierRef=function(e,n){t.tierRefs[n.tier]=e},t.handleAnimatedTier=function(e){t.setState({animatedTier:e.key})},t.renderSubscriber=function(e,n,r){return null==e?null:P(_.default,{text:P(s.default,{user:e.user,nick:e.nick}),"aria-label":e.nick||e.user.tag},r,(function(r){return a.createElement(g.default,A({},r,{tabIndex:-1,src:null!=e?e.user.getAvatarURL(t.props.guildId||void 0):null,className:(0,o.default)(b.default.avatar,n,null!=n?b.default.subscriberMask:null),size:g.default.Sizes.SIZE_32}))}))},t.renderSubscribersPopout=function(){return P(S.default,{className:b.default.subscribersPopout},void 0,t.props.subscribers.map((function(e){return P("div",{className:b.default.subscribersPopoutUser},e.user.id,P(g.default,{src:e.user.getAvatarURL(t.props.guildId||void 0),"aria-label":e.user.username,size:g.default.Sizes.SIZE_32,className:b.default.avatar}),P("div",{className:b.default.subscribersPopoutUsername},void 0,P(s.default,{user:e.user,nick:e.nick})))})))},t.renderMoreSubscribers=function(e,n,r){return P(v.default,{renderPopout:t.renderSubscribersPopout,position:v.default.Positions.BOTTOM,autoInvert:!1},r,(function(t){return a.createElement("div",A({className:b.default.moreSubscribers},t),e)}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var i=r.prototype;return i.componentDidMount=function(){this.measure();var e=this.props.guildId;null!=e&&(0,u.fetchPremiumSubscriptions)(e)},i.componentDidUpdate=function(){null==this.state.tierPositions&&(Object.values(this.tierRefs).some((function(e){return null==e}))||this.measure())},i.getSubscriptionCount=function(){var e=this.props.subscriptions;return null!=e?e.length:0},i.measure=function(){var e=this.props.subscriberCount,t=this.defaultTierRef.current;if(null!=t){var n=t.getBoundingClientRect().top,r={};for(var a in this.tierRefs){var o=this.tierRefs[a];if(null==o)return;var i=o.getBoundingClientRect().top-n+32-(e>0?L:0);r[a]=i}this.setState({tierPositions:r})}},i.renderProgressBar=function(e){var t=this.state.tierPositions,n=this.getSubscriptionCount();if(null==t)return null;var r={numRequired:0,y:0,key:T.PremiumGuildTiers.NONE},a=e.map((function(e){var n;return{numRequired:T.PremiumGuildSubscriptionsRequired[e.tier],name:(0,O.getTierName)(e.tier),y:null!==(n=t[e.tier])&&void 0!==n?n:0,key:e.tier}}));return P(y.default,{className:n>0?b.default.progressWithSubscriptions:b.default.progress,progress:n,tiers:[r].concat(a),initialAnimationDelay:500,onAnimatedTierMaker:this.handleAnimatedTier})},i.renderTierNone=function(){return a.createElement("div",{className:b.default.tierDefaultUnlocked,ref:this.defaultTierRef},P(E.FormText,{type:E.FormText.Types.LABEL_BOLD},void 0,C.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERKS_TITLE_NONE),P(E.FormText,{type:E.FormText.Types.DESCRIPTION,className:b.default.tierDefaultUnlockedDescription},void 0,C.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERKS_DESCRIPTION_NONE))},i.renderSubscribers=function(){var e=this.props,t=e.subscribers,n=e.subscriberCount,r=e.guildId;return a.createElement("div",{ref:this.defaultTierRef,className:b.default.subscribers},P(h.default,{guildId:r||void 0,users:t,renderUser:this.renderSubscriber,renderMoreUsers:this.renderMoreSubscribers,max:5}),P("div",{className:b.default.subscriberCount},void 0,C.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_COUNT_SUBSCRIBERS.format({count:n})))},i.renderContent=function(){var e=this,t=this.props,n=t.renderTier,r=t.subscriptions,o=t.subscriberCount,i=t.tiers;return null==r?P(m.default,{type:m.default.Type.SPINNING_CIRCLE}):a.createElement(a.Fragment,null,P("div",{className:b.default.content},void 0,this.renderProgressBar(i),P("div",{className:b.default.tiers},void 0,0===o?this.renderTierNone():this.renderSubscribers(),i.map((function(t,r,a){return n({tier:t,tiers:a,tierIndex:r,onSetRef:e.setTierRef,isAnimatedTo:T.PremiumGuildSubscriptionsRequired[e.state.animatedTier]>=T.PremiumGuildSubscriptionsRequired[t.tier],subscriptionCount:e.getSubscriptionCount()})})))))},i.render=function(){return P("div",{},void 0,this.renderContent())},r}(a.Component);D.displayName="GuildSettingsPremiumStatus";var w=l.default.connectStores([f.default,p.default,c.default,d.default],(function(){var e=f.default.getGuildId(),t=null!=e?c.default.getSubscriptionsForGuild(e):null,n=(0,i.default)(null!=t?t:[]).uniqBy((function(e){return e.userId})),r=n.map((function(t){return{user:p.default.getUser(t.userId),nick:d.default.getNick(e,t.userId)}})).filter((function(e){return null!=e.user})).value();return{guildId:e,subscriptions:t,subscribers:r,subscriberCount:n.size()}}))(D);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=n(122),l=n(8921),u=_(n(61)),s=_(n(9900)),d=_(n(9901)),f=_(n(686)),c=_(n(1221)),p=_(n(8749)),v=n(1),y=_(n(6)),m=_(n(7385));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,S(e,t)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}var I,T={tension:200,friction:20},C=O({},T,{clamp:!0});!function(e){e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED"}(I||(I={}));var b,M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={closingState:I.OPEN},t.handleCloseClick=function(){t.setState({closingState:I.CLOSING})},t.handleFlyingAnimationComplete=function(){t.setState({closingState:I.CLOSED})},t}g(t,e);var n=t.prototype;return n.shouldShow=function(e){void 0===e&&(e=this.props);var t=e,n=t.numUnlocked,r=t.numRequired;return!(n>=r)&&n/r>=.8},n.render=function(){var e=this,t=this.props,n=t.numUnlocked,r=t.numRequired,a=this.state.closingState===I.CLOSED,l=this.state.closingState===I.CLOSING;if(!this.shouldShow()||a)return null;var s=l||a?m.default.hidden:null,c=l?d.default.Stages.FLYING:d.default.Stages.HOVERING;return E(i.Spring,{from:{opacity:0},to:{opacity:1},config:C},void 0,(function(t){return E(i.animated.div,{className:m.default.tierClose,style:t},void 0,E(d.default,{className:m.default.tierCloseMechaWumpus,stage:c,onFlyingComplete:e.handleFlyingAnimationComplete}),E("div",{className:(0,o.default)(m.default.tierCloseHint,s)},void 0,y.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_CLOSE_HINT.format({numLeft:r-n})),E(u.default,{onClick:e.handleCloseClick,className:(0,o.default)(m.default.tierCloseClose,s)},void 0,E(f.default,{className:m.default.tierCloseCloseIcon})))}))},t}(a.Component);M.displayName="TierCloseHint",function(e){e[e.NONE=0]="NONE",e[e.UNLOCKED_SLIDE=1]="UNLOCKED_SLIDE"}(b||(b={}));var N=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={animationStage:b.NONE},t.getAnimationConfig=function(e){switch(e){case"headerFill":return C;case"unlockedTranslateY":default:return T}},t.setRef=function(e){var n=t.props,r=n.onSetRef,a=n.tier;null!=r&&r(e,a)},t}g(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.isAnimatedTo&&this.props.isAnimatedTo!==e.isAnimatedTo&&this.setState({animationStage:b.UNLOCKED_SLIDE})},n.renderPerk=function(e,t){var n=(0,l.getPerkIcon)(e.icon,t),r=n.icon,a=n.className;return E("div",{className:m.default.perk},e.title,E(s.default,{name:String(e.icon),icon:r,className:m.default.perkIcon,iconClassName:a}),E("div",{className:m.default.perkText},void 0,E("div",{className:m.default.perkTitle},void 0,e.title),E("div",{className:m.default.perkDescription},void 0,e.description)))},n.render=function(){var e=this,t=this.state.animationStage,n=this.props,r=n.children,l=n.subscriptionCount,u=n.tier,s=n.isAnimatedTo,d=n.hasBottomMargin,f=n.withCardBody,_=v.PremiumGuildSubscriptionsRequired[u.tier],h=s&&l>=_,g=u.tier!==v.PremiumGuildTiers.NONE&&u.tier!==v.PremiumGuildTiers.TIER_1,S=E(M,{numUnlocked:l,numRequired:_});return E(i.Spring,{from:{unlockedTranslateY:50},to:{unlockedTranslateY:t===b.NONE?50:0},config:T},void 0,(function(t){var n,l,s,v;return E("div",{className:(0,o.default)(m.default.tier,(n={},n[m.default.tierBottomMargin]=d,n))},u.tier,a.createElement("div",{className:(0,o.default)((l={},l[m.default.tierHeaderWithoutCardBody]=!f,l[m.default.tierHeaderUnlocked]=h,l[m.default.tierHeaderLocked]=!h,l)),ref:e.setRef},E("div",{className:m.default.tierHeaderContent},void 0,E(p.default,{tier:u.tier,className:m.default.tierIcon}),E("div",{className:(0,o.default)(m.default.tierTitle,(s={},s[m.default.tierTitleActive]=h,s))},void 0,u.title),h?E(i.animated.div,{style:{transform:t.unlockedTranslateY.to((function(e){return"translate3d(0, "+e+"px, 0)"}))},className:m.default.tierUnlocked},void 0,y.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_UNLOCKED):E(a.Fragment,{},void 0,E("div",{className:m.default.tierRequirement},void 0,y.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_TIER_REQUIREMENT.format({required:_})),E(c.default,{className:m.default.tierLock})),S)),E("div",{className:(0,o.default)((v={},v[m.default.tierBody]=f,v))},void 0,null!=r?r:a.createElement(a.Fragment,null,g?E("div",{className:m.default.previousPerks},void 0,y.default.Messages.GUILD_SETTINGS_GUILD_PREMIUM_PERKS_PREVIOUS_PERKS):null,null!=u.perks&&E("div",{className:m.default.perks},void 0,u.perks.map((function(t){return e.renderPerk(t,h)}))))))}))},t}(a.Component);N.displayName="GuildSettingsPremiumTierStatusCard",N.defaultProps={withCardBody:!0};var A=N;t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StickerUploadModal=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=G(n(9)),i=G(n(98)),l=n(3),u=G(n(5938)),s=G(n(8589)),d=G(n(185)),f=G(n(8408)),c=G(n(39)),p=G(n(12)),v=G(n(29)),y=G(n(8564)),m=G(n(55)),_=G(n(278)),h=G(n(8272)),E=G(n(153)),g=G(n(149)),S=n(131),O=G(n(476)),I=G(n(1236)),T=n(35),C=G(n(47)),b=G(n(24)),M=n(380),N=n(5940),A=n(398),P=n(366),R=n(290),L=G(n(5936)),D=n(1),w=G(n(6)),j=G(n(7751)),k=G(n(9906)),U=G(n(9907));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var V=new Set(["application/json","image/png","image/apng"]),W=[{extensions:["json","png","apng"]}],Y=function(e){var t=e.stickerPreview;return x("div",{className:j.default.preview},void 0,x("div",{className:j.default.previewDark},void 0,null!=t?t:x("img",{src:k.default,alt:w.default.Messages.GUILD_STICKER_PREVIEW_IMG_ALT_DARK})),x("div",{className:j.default.previewLight},void 0,null!=t?t:x("img",{src:U.default,alt:w.default.Messages.GUILD_STICKER_PREVIEW_IMG_ALT_LIGHT})))};Y.displayName="StickerUploadPreview";var z=function(e){var t=e.filename,n=e.onFileSelect;return x("div",{className:j.default.fileUpload},void 0,x("input",{className:j.default.fileUploadInput,tabIndex:-1,readOnly:!0,placeholder:w.default.Messages.GUILD_STICKER_UPLOAD_FILE_PLACEHOLDER,type:"text",value:t}),x(v.default,{size:v.default.Sizes.MIN,className:j.default.fileUploadButton},void 0,w.default.Messages.GUILD_STICKER_UPLOAD_FILE_BUTTON,x(s.default,{tabIndex:-1,onChange:function(e){var t=e.currentTarget.files[0];n(t)},multiple:!1,filters:W})))};function K(e){if(null==e)return null;var t={className:j.default.emoji,emojiName:e.optionallyDiverseSequence,autoplay:!0};return function(){return a.createElement(u.default,t)}}z.displayName="FileUploadInput";var $=function(e){var t=e.emoji,n=e.onSelectEmoji;return x(_.default,{animation:_.default.Animation.NONE,position:_.default.Positions.TOP,renderPopout:function(e){var t=e.closePopout;return x(f.default,{closePopout:t,pickerIntention:D.EmojiIntention.GUILD_STICKER_RELATED_EMOJI,onNavigateAway:t,onSelectEmoji:function(e,r){n(e),r&&t()}})}},void 0,(function(e,n){return a.createElement("div",H({className:j.default.emojiInputContainer},e),x(y.default,{className:j.default.emojiButton,active:n,tabIndex:0,renderButtonContents:K(t)}),x(E.default,{inputClassName:j.default.emojiText,placeholder:w.default.Messages.GUILD_STICKER_UPLOAD_RELATED_EMOJI_PLACEHOLDER,value:null!=t?":"+t.uniqueName+":":"",readOnly:!0}))}))};$.displayName="RelatedEmojiInput";var Z=function(e){var t=e.sticker,n=e.previewData,r=e.onStickerError;if(null!=t)return x(L.default,{size:160,sticker:t});if(null==n)return null;var a=n.id,o=n.formatType,i=n.content;return x(L.default,{assetData:i,fileUri:i,size:160,sticker:{name:a,description:"",id:a,pack_id:"",format_type:o},onError:r},a)};Z.displayName="getStickerPreview";var q=function(e){var t,n,r,u,s,f,y,_,L=e.transitionState,k=e.onClose,U=e.guildId,G=e.sticker,F=(0,l.useStateFromStores)([c.default],(function(){return c.default.theme})),W=null!==(t=null===(n=p.default.getNullableCurrentUser())||void 0===n?void 0:n.isStaff())&&void 0!==t&&t?A.STAFF_MAX_STICKER_FILE_SIZE:A.MAX_STICKER_FILE_SIZE,K=a.useState(null),q=K[0],X=K[1],J=a.useState(null!==(r=null==G?void 0:G.name)&&void 0!==r?r:""),Q=J[0],ee=J[1],te=a.useState({file:null,filename:null!==(u=(0,R.getFilenameForSticker)(G))&&void 0!==u?u:""}),ne=te[0],re=te[1],ae=a.useState(null!=(null==G?void 0:G.tags)&&null!==(s=d.default.getByName(G.tags))&&void 0!==s?s:null),oe=ae[0],ie=ae[1],le=a.useState(null!==(f=null==G?void 0:G.description)&&void 0!==f?f:""),ue=le[0],se=le[1],de=a.useState(!1),fe=de[0],ce=de[1],pe=a.useState(null),ve=pe[0],ye=pe[1],me=null!=G,_e=me||null!=(null==ne?void 0:ne.file),he=0===ue.length||ue.length>=2&&ue.length<=100,Ee=!fe&&!0!==(null==ve?void 0:ve.isBlocking)&&Q.length>=2&&null!=oe&&_e&&he,ge=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),e.prev=1,ce(!0),!me){e.next=8;break}return e.next=6,(0,N.updateGuildSticker)(U,null!==(n=null==G?void 0:G.id)&&void 0!==n?n:"",{name:Q,tags:null!==(r=null==oe?void 0:oe.uniqueName)&&void 0!==r?r:"",description:ue});case 6:e.next=15;break;case 8:return(o=new FormData).append("name",Q),o.append("tags",null!==(a=null==oe?void 0:oe.uniqueName)&&void 0!==a?a:""),o.append("description",ue),null!=(null==ne?void 0:ne.file)&&o.append("file",ne.file),e.next=15,(0,N.createGuildSticker)(U,o);case 15:k(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),ye({message:e.t0.body.message,isBlocking:!1});case 21:return e.prev=21,ce(!1),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[1,18,21,24]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){B(o,r,a,i,l,"next",e)}function l(e){B(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),Se=a.useCallback((function(){ye({message:w.default.Messages.GUILD_STICKER_INVALID_STICKER,isBlocking:!0})}),[]),Oe=Z({sticker:G,previewData:q,onStickerError:Se});return x(T.ModalRoot,{transitionState:L,"aria-labelledby":"STICKER_UPLOAD_MODAL",className:j.default.modal},void 0,x(T.ModalCloseButton,{onClick:k,className:j.default.modalClose}),x("form",{onSubmit:ge},void 0,x(T.ModalContent,{},void 0,x(T.ModalHeader,{direction:m.default.Direction.VERTICAL,separator:!1,className:j.default.modalHeader},void 0,x(C.default,{size:C.default.Sizes.SIZE_24,className:j.default.modalHeaderTitle},void 0,w.default.Messages.GUILD_STICKER_UPLOAD_TITLE),x(b.default,{size:b.default.Sizes.SIZE_16},void 0,w.default.Messages.GUILD_STICKER_UPLOAD_DESCRIPTION.format({fileSize:(0,M.formatKbSize)(A.MAX_STICKER_FILE_SIZE,{useKibibytes:!0})}))),x(S.FormSection,{title:w.default.Messages.GUILD_STICKER_UPLOAD_PREVIEW_TITLE,className:j.default.formItem},void 0,x(Y,{stickerPreview:Oe})),x(O.default,{title:w.default.Messages.GUILD_STICKER_UPLOAD_NAME_TITLE,required:!0,className:j.default.formItem},void 0,x(E.default,{value:Q,onChange:ee,placeholder:w.default.Messages.GUILD_STICKER_UPLOAD_NAME_PLACEHOLDER,maxLength:30})),x(S.FormSection,{className:(0,o.default)(j.default.formItem,j.default.formItemRow)},void 0,x(O.default,{title:me?w.default.Messages.GUILD_STICKER_UPLOAD_FILE_TITLE_BLOCKED:w.default.Messages.GUILD_STICKER_UPLOAD_FILE_TITLE,required:!0,className:j.default.formItemRowChild},void 0,me?x(E.default,{disabled:!0,value:null!==(y=null==ne?void 0:ne.filename)&&void 0!==y?y:""}):x(z,{filename:null!==(_=null==ne?void 0:ne.filename)&&void 0!==_?_:"",onFileSelect:function(e){var t=e.type.split(";")[0];if(V.has(t))if(e.size>W)ye({message:w.default.Messages.GUILD_STICKER_FILE_TOO_BIG.format({maxSize:(0,M.formatKbSize)(W,{useKibibytes:!0})}),isBlocking:null==ne.file});else{var n=(0,R.getStickerFormatTypeFromFileType)(e.type),r=n===P.StickerFormat.LOTTIE,a=new FileReader;if(a.addEventListener("load",(function(){var e=a.result;r||X({id:i.default.v4(),formatType:n,content:e}),ye(null)})),a.readAsDataURL(e),r){var o=new FileReader;o.addEventListener("load",(function(){X({id:i.default.v4(),formatType:n,content:o.result})})),o.readAsText(e)}re({file:e,filename:e.name})}else ye({message:w.default.Messages.GUILD_STICKER_UNKNOWN_MIME_TYPE,isBlocking:!0})}})),x(O.default,{title:w.default.Messages.GUILD_STICKER_UPLOAD_RELATED_EMOJI_TITLE,required:!0,className:j.default.formItemRowChild},void 0,x($,{emoji:oe,onSelectEmoji:ie}))),x("div",{className:j.default.formItem},void 0,x(S.FormTitle,{},void 0,w.default.Messages.GUILD_STICKER_UPLOAD_DESCRIPTION_TITLE,x(g.default,{text:w.default.Messages.GUILD_STICKER_UPLOAD_DESCRIPTION_TOOLTIP},void 0,(function(e){return a.createElement(I.default,H({className:j.default.infoIcon},e))}))),x(h.default,{value:ue,onChange:se,placeholder:w.default.Messages.GUILD_STICKER_UPLOAD_DESCRIPTION_PLACEHOLDER,maxLength:100})),null!=ve&&x(b.default,{className:j.default.formItem,size:b.default.Sizes.SIZE_14,color:b.default.Colors.ERROR},void 0,ve.message)),x(T.ModalFooter,{},void 0,x(v.default,{type:"submit",disabled:!Ee},void 0,me?w.default.Messages.GUILD_STICKERS_UPDATE:w.default.Messages.UPLOAD),x(v.default,{look:v.default.Looks.LINK,color:F===D.ThemeTypes.LIGHT?v.default.Colors.PRIMARY:v.default.Colors.WHITE,onClick:k},void 0,w.default.Messages.NEVERMIND))))};t.StickerUploadModal=q,q.displayName="StickerUploadModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CALL_START=t.CALL_ACCEPT=void 0;var r=n(121),a=n(1),o={binds:["mod+return"],comboKeysBindGlobal:!0,action:function(){if(r.ComponentDispatch.hasSubscribers(a.ComponentActions.CALL_ACCEPT))return r.ComponentDispatch.dispatch(a.ComponentActions.CALL_ACCEPT),!1}};t.CALL_ACCEPT=o;var i={binds:["ctrl+'","ctrl+shift+'"],comboKeysBindGlobal:!0,action:function(e){if(r.ComponentDispatch.hasSubscribers(a.ComponentActions.CALL_START))return r.ComponentDispatch.dispatch(a.ComponentActions.CALL_START,e),!1}};t.CALL_START=i;var l={CALL_ACCEPT:o,CALL_START:i};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NAVIGATE_FORWARD=t.NAVIGATE_BACK=t.TOGGLE_PREVIOUS_GUILD=t.CHANNEL_PREV=t.CHANNEL_NEXT=void 0;var r,a,o=c(n(66)),i=c(n(9930)),l=n(8356),u=n(42),s=c(n(36)),d=c(n(107)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}var p=/Darwin|OS X/.test(null!==(r=null===(a=o.default.os)||void 0===a?void 0:a.family)&&void 0!==r?r:""),v={binds:["alt+down"],comboKeysBindGlobal:!0,action:function(){return(0,i.default)(),!1}};t.CHANNEL_NEXT=v;var y={binds:["alt+up"],comboKeysBindGlobal:!0,action:function(){return(0,i.default)(-1),!1}};t.CHANNEL_PREV=y;var m={binds:["mod+alt+right"],comboKeysBindGlobal:!0,action:function(){var e;if(d.default.getGuildId())e=f.ME;else{var t=d.default.getLastSelectedGuildId();t&&(e=t,(0,l.transitionToChannel)(t,s.default.getChannelId(t)))}return null!=e&&(0,u.transitionTo)(f.Routes.CHANNEL(e,s.default.getChannelId(e))),!1}};t.TOGGLE_PREVIOUS_GUILD=m;var _={binds:p?["mod+["]:["alt+left"],comboKeysBindGlobal:!0,action:function(){return(0,u.back)(),!1}};t.NAVIGATE_BACK=_;var h={binds:p?["mod+]"]:["alt+right"],comboKeysBindGlobal:!0,action:function(){return(0,u.forward)(),!1}};t.NAVIGATE_FORWARD=h;var E={CHANNEL_PREV:y,CHANNEL_NEXT:v,TOGGLE_PREVIOUS_GUILD:m,NAVIGATE_BACK:_,NAVIGATE_FORWARD:h};t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldShowAllActiveJoinedThreads=u,t.getVisibleThreadsForChannel=void 0;var r=l(n(8)),a=n(31),o=l(n(1212)),i=l(n(181));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(null!=t){if(t.id===e.id)return!0;if(t.isThread()&&t.parent_id===e.id)return!0}return!i.default.isChannelMuted(e.guild_id,e.id)&&(null==e.parent_id||!o.default.isCollapsed(e.parent_id))}t.getVisibleThreadsForChannel=function(e){var t,n=e.channel,o=e.selectedChannel,i=e.activeJoinedThreads,l=e.activeJoinedUnreadThreads,s=u(n,o)?i[n.id]:l[n.id],d=null!==(t=null==o?void 0:o.id)&&void 0!==t?t:null;return a.THREADED_CHANNEL_TYPES.has(n.type)?n.id===d?{count:r.default.size(s),threads:s,includeSelectedChannel:!1}:null!=d&&null!=o&&o.parent_id===n.id&&a.THREAD_CHANNEL_TYPES.has(o.type)?null==s?{count:1,threads:void 0,includeSelectedChannel:!0}:d in s?{count:r.default.size(s),threads:s,includeSelectedChannel:!1}:{count:r.default.size(s)+1,threads:s,includeSelectedChannel:!0}:{count:r.default.size(s),threads:s,includeSelectedChannel:!1}:{count:0,threads:void 0,includeSelectedChannel:!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.id,d=e.guild_id,f=e.parent_id;if(null==d)return!1;null==t&&(t=r.default.getState().channelId);if(function(e,t){return e===t||e===l.default.getVoiceChannelId()||i.default.getMentionCount(e)>0}(e.id,t))return!1;var c=u.default.getMutedChannels(d).has(n);if(null!=f&&o.default.isCollapsed(f)&&(c||e.isVocal()||e.type===s.ChannelTypes.GUILD_STORE||u.default.isChannelMuted(d,f)||(0,a.isGuildReadableType)(e.type)&&!1===i.default.hasUnread(n)))return!0;return c&&u.default.isGuildCollapsed(d)};var r=d(n(5939)),a=n(31),o=d(n(1212)),i=d(n(200)),l=d(n(36)),u=d(n(181)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MARK_CHANNEL_READ=void 0;var r=S(n(390)),a=n(8321),o=n(8390),i=S(n(8437)),l=S(n(1276)),u=n(5940),s=S(n(8265)),d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1268)),f=S(n(719)),c=S(n(8333)),p=S(n(201)),v=S(n(200)),y=S(n(36)),m=S(n(107)),_=S(n(161)),h=n(121),E=n(1);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){return e&&e.__esModule?e:{default:e}}var O={binds:["esc","shift+pagedown"],comboKeysBindGlobal:!0,action:function(){if(_.default.isElementFullScreen())return!1;if(h.ComponentDispatch.hasSubscribers(E.ComponentActions.CALL_DECLINE))return h.ComponentDispatch.dispatch(E.ComponentActions.CALL_DECLINE),!1;if(f.default.close())return!1;if(h.ComponentDispatch.hasSubscribers(E.ComponentActions.POPOUT_CLOSE))return h.ComponentDispatch.dispatch(E.ComponentActions.POPOUT_CLOSE),!1;if(h.ComponentDispatch.hasSubscribers(E.ComponentActions.CLOSE_GIF_PICKER))return h.ComponentDispatch.dispatch(E.ComponentActions.CLOSE_GIF_PICKER),!1;if(h.ComponentDispatch.hasSubscribers(E.ComponentActions.MODAL_CLOSE))return h.ComponentDispatch.dispatch(E.ComponentActions.MODAL_CLOSE),!1;if(h.ComponentDispatch.hasSubscribers(E.ComponentActions.SEARCH_RESULTS_CLOSE))return h.ComponentDispatch.dispatch(E.ComponentActions.SEARCH_RESULTS_CLOSE),!1;var e=m.default.getGuildId(),t=y.default.getChannelId(e),n=d.default.getSection(t)===E.ChannelSections.THREAD?d.default.getThreadSidebarState(t):null,r=(null==n?void 0:n.type)===d.ThreadSidebarType.VIEW?n.channelId:null;if(!1===I(t))return!1;if(!1===I(r))return!1;if(null!=t&&(null==n?void 0:n.type)===d.ThreadSidebarType.CREATE)return s.default.closeThreadSidebar(t),!1;var a=T(t),o=T(r);return null==t||a||o||null==n?(h.ComponentDispatch.dispatch(E.ComponentActions.SCROLLTO_PRESENT),!1):(s.default.closeThreadSidebar(t),!1)}};function I(e){if(null!=e)return c.default.isEditingAny(e)?(r.default.endEditMessage(e),!1):null!=i.default.getPendingReply(e)?((0,o.deletePendingReply)(e),!1):null!=l.default.getStickerPreview(e)?((0,u.clearStickerPreview)(e),!1):void 0}function T(e){if(null==e)return!1;var t=!1;return p.default.getMessages(e).hasMoreAfter&&(r.default.jumpToPresent(e,E.MAX_MESSAGES_PER_CHANNEL),t=!0),v.default.hasUnread(e)&&((0,a.ack)(e),t=!0),(0,a.localAck)(e),t}t.MARK_CHANNEL_READ=O;var C={MARK_CHANNEL_READ:O};t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MARK_SERVER_READ=void 0;var r=c(n(14)),a=c(n(2)),o=c(n(390)),i=c(n(1223)),l=c(n(201)),u=c(n(36)),s=c(n(107)),d=n(121),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}var p={};var v={binds:["shift+esc"],comboKeysBindGlobal:!0,action:function(){var e=s.default.getGuildId();if(e&&i.default.getUnreadGuildsIgnoreMuted(e)){if(!p[e]){var t=function(){return delete p[e]};(n=e,r.default.post({url:f.Endpoints.GUILD_ACK(n),oldFormErrors:!0}).then((function(){return a.default.dispatch({type:f.ActionTypes.GUILD_ACK,guildId:n})}))).then(t,t)}var n,c=u.default.getChannelId(e);if(c)l.default.getMessages(c).hasMoreAfter?o.default.jumpToPresent(c,f.MAX_MESSAGES_PER_CHANNEL):d.ComponentDispatch.dispatch(f.ComponentActions.SCROLLTO_PRESENT)}}};t.MARK_SERVER_READ=v;var y={MARK_SERVER_READ:v};t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.JUMP_TO_FIRST_UNREAD=void 0;var r=i(n(390)),a=i(n(200)),o=i(n(36));function i(e){return e&&e.__esModule?e:{default:e}}var l={binds:["shift+pageup"],comboKeysBindGlobal:!0,action:function(){var e=o.default.getChannelId();if(e){var t=a.default.ackMessageId(e);t&&a.default.getOldestUnreadTimestamp(e)>0&&r.default.jumpToMessage({channelId:e,messageId:t,offset:1,context:"Keyboard Shortcut"})}return!1}};t.JUMP_TO_FIRST_UNREAD=l;var u={JUMP_TO_FIRST_UNREAD:l};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RETURN_TO_AUDIO_CHANNEL=void 0;var r=u(n(1226)),a=n(8356),o=u(n(94)),i=u(n(36)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s={binds:["mod+alt+left"],comboKeysBindGlobal:!0,action:function(){if(!o.default.isConnected())return!1;var e=o.default.getGuildId()||l.ME,t=i.default.getChannelId(e);return(0,a.transitionToChannel)(e,t),r.default.channelListScrollTo(e,o.default.getChannelId()),!1}};t.RETURN_TO_AUDIO_CHANNEL=s;var d={RETURN_TO_AUDIO_CHANNEL:s};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SCROLL_DOWN=t.SCROLL_UP=void 0;var r=n(121),a=n(1),o={binds:["pageup"],comboKeysBindGlobal:!0,action:function(){return r.ComponentDispatch.dispatchToLastSubscribed(a.ComponentActions.SCROLL_PAGE_UP),!1}};t.SCROLL_UP=o;var i={binds:["pagedown"],comboKeysBindGlobal:!0,action:function(){return r.ComponentDispatch.dispatchToLastSubscribed(a.ComponentActions.SCROLL_PAGE_DOWN),!1}};t.SCROLL_DOWN=i;var l={SCROLL_UP:o,SCROLL_DOWN:i};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SEARCH_EMOJIS=void 0;var r=n(121),a=n(1),o={binds:["mod+e"],comboKeysBindGlobal:!0,action:function(){return r.ComponentDispatch.dispatchToLastSubscribed(a.ComponentActions.TOGGLE_EMOJI_POPOUT),!1}};t.SEARCH_EMOJIS=o;var i={SEARCH_EMOJIS:o};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SERVER_PREV=t.SERVER_NEXT=void 0;var r,a=(r=n(9937))&&r.__esModule?r:{default:r};var o={binds:["mod+alt+down","mod+shift+]","ctrl+tab"],comboKeysBindGlobal:!0,action:function(e){return e.preventDefault(),e.stopPropagation(),(0,a.default)(),!1}};t.SERVER_NEXT=o;var i={binds:["mod+alt+up","mod+shift+[","ctrl+shift+tab"],comboKeysBindGlobal:!0,action:function(e){return e.preventDefault(),e.stopPropagation(),(0,a.default)(-1),!1}};t.SERVER_PREV=i;var l={SERVER_NEXT:o,SERVER_PREV:i};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SUBMIT=void 0;var r,a=(r=n(105))&&r.__esModule?r:{default:r},o=n(121),i=n(1);var l={binds:["return"],action:function(){if(!a.default.keyboardModeEnabled&&o.ComponentDispatch.hasSubscribers(i.ComponentActions.MODAL_SUBMIT))return o.ComponentDispatch.dispatch(i.ComponentActions.MODAL_SUBMIT),!1}};t.SUBMIT=l;var u={SUBMIT:l};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEXTAREA_FOCUS=void 0;var r=n(422),a=c(n(105)),o=c(n(694)),i=c(n(51)),l=c(n(94)),u=n(121),s=n(1344),d=n(401),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}var p=new Set(["PageDown","PageUp","Home","End","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),v=new Set(["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Hyper","Meta","NumLock","OS","ScrollLock","Shift","Super","Symbol","SymbolLock"]),y=new Set(["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","F13","F14","F15","F16","F17","F18","F19","F20","Accept","ContextMenu","Find","ZoomIn","ZoomOut"]),m={binds:["any-character"],keydown:function(e,t){if((0,s.isInputLikeElement)(document.activeElement))return!1;if(r.LOCK_STACK.isActive())return!1;if(v.has(t))return!1;if(y.has(t))return!1;var n=null!=document.activeElement&&"BODY"===document.activeElement.tagName;return!(a.default.keyboardModeEnabled&&!n&&!/^[a-zA-Z0-9]$/.test(t))&&(!u.ComponentDispatch.hasSubscribers(f.ComponentActions.MODAL_CLOSE)&&(!o.default.hasLayers()&&("Tab"===t&&u.ComponentDispatch.hasSubscribers(f.ComponentActions.TEXTAREA_FOCUS)&&null!=document.querySelector('[data-can-focus="true"]')?(e.preventDefault(),u.ComponentDispatch.dispatch(f.ComponentActions.TEXTAREA_FOCUS),!1):!(l.default.isConnected()&&i.default.getMode()===f.InputModes.PUSH_TO_TALK&&!i.default.isSelfMute()&&Object.values(i.default.getShortcuts()).map(d.toBrowserEvents).some((function(t){return t.map((function(e){return e.keyCode})).includes(e.keyCode)})))&&void(e.metaKey||e.ctrlKey||p.has(t)||u.ComponentDispatch.dispatchToLastSubscribed(f.ComponentActions.TEXTAREA_FOCUS)))))}};t.TEXTAREA_FOCUS=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TOGGLE_DEAFEN=t.TOGGLE_MUTE=void 0;var r,a=(r=n(288))&&r.__esModule?r:{default:r};var o={binds:["mod+shift+m"],comboKeysBindGlobal:!0,action:function(){return a.default.toggleSelfMute(),!1}};t.TOGGLE_MUTE=o;var i={binds:["mod+shift+d"],comboKeysBindGlobal:!0,action:function(){return a.default.toggleSelfDeaf(),!1}};t.TOGGLE_DEAFEN=i;var l={TOGGLE_MUTE:o,TOGGLE_DEAFEN:i};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOGGLE_CATEGORY_COLLAPSED=void 0;var r=n(8450),a=u(n(1212)),o=u(n(86)),i=u(n(107)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s={binds:["mod+shift+a"],comboKeysBindGlobal:!0,action:function(){var e=i.default.getGuildId();return null==e||(o.default.getChannels(e)[l.ChannelTypes.GUILD_CATEGORY].some((function(e){var t=e.channel;return"null"!==t.id&&!a.default.isCollapsed(t.id)}))?(0,r.categoryCollapseAll)(e):(0,r.categoryExpandAll)(e)),!1}};t.TOGGLE_CATEGORY_COLLAPSED=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MENTION_PREV=t.MENTION_NEXT=t.UNREAD_PREV=t.UNREAD_NEXT=void 0;var r=d(n(9942)),a=d(n(5939)),o=n(31),i=d(n(10)),l=d(n(200)),u=d(n(181)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e,t){var n=i.default.getChannel(t);return null!=n&&((0,o.isPrivate)(n.type)?Boolean(l.default.getMentionCount(t)):(!u.default.isChannelMuted(e,t)||l.default.getMentionCount(t)>0)&&l.default.hasUnread(t))},c={binds:["alt+shift+down"],comboKeysBindGlobal:!0,action:function(){var e=a.default.getState().guildId||s.ME;return(0,r.default)(1,f,(function(t){return t===e||!u.default.isMuted(t)})),!1}};t.UNREAD_NEXT=c;var p={binds:["alt+shift+up"],comboKeysBindGlobal:!0,action:function(){var e=a.default.getState().guildId||s.ME;return(0,r.default)(-1,f,(function(t){return t===e||!u.default.isMuted(t)})),!1}};t.UNREAD_PREV=p;var v=function(e,t){return l.default.getMentionCount(t)>0},y={binds:["mod+shift+alt+down"],comboKeysBindGlobal:!0,action:function(){return(0,r.default)(1,v),!1}};t.MENTION_NEXT=y;var m={binds:["mod+shift+alt+up"],comboKeysBindGlobal:!0,action:function(){return(0,r.default)(-1,v),!1}};t.MENTION_PREV=m;var _={UNREAD_NEXT:c,UNREAD_PREV:p,MENTION_NEXT:y,MENTION_PREV:m};t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ZOOM_RESET=t.ZOOM_OUT=t.ZOOM_IN=void 0;var r,a=n(285),o=(r=n(105))&&r.__esModule?r:{default:r},i=n(1);function l(e){return i.Accessibility.ZOOM_SCALES[Math.max(0,Math.min(i.Accessibility.ZOOM_SCALES.indexOf(o.default.zoom)+e,i.Accessibility.ZOOM_SCALES.length-1))]}var u={binds:["mod+plus"],comboKeysBindGlobal:!0,action:function(){return(0,a.setZoom)(l(1)),!1}};t.ZOOM_IN=u;var s={binds:["mod+minus"],comboKeysBindGlobal:!0,action:function(){return(0,a.setZoom)(l(-1)),!1}};t.ZOOM_OUT=s;var d={binds:["mod+0"],comboKeysBindGlobal:!0,action:function(){return(0,a.setZoom)(i.Accessibility.ZOOM_DEFAULT),!1}};t.ZOOM_RESET=d;var f={ZOOM_IN:u,ZOOM_OUT:s,ZOOM_RESET:d};t.default=f},function(e,t,n){e.exports=n.p+"99ac3518ec114a8f0d5731e44edcd311.jpg"},function(e,t,n){e.exports=n.p+"7cae05d9deaeae011c5401e259f1c48a.jpg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePurchasableLiveScheduledEventsStageChannel=function(e){var t=(0,r.useStateFromStores)([i.default],(function(){return Object.values(i.default.getStageInstancesByGuild(e)).find((function(e){return null!=e.guild_scheduled_event_id}))}),[e]),n=(d=null==t?void 0:t.channel_id,f=(0,r.useStateFromStores)([l.default],(function(){return l.default.getChannel(d)}),[d]),(0,r.useStateFromStores)([u.default],(function(){return u.default.can(o.JOIN_VOCAL_CHANNEL_PERMISSIONS,f)}))?null:f),s=(0,r.useStateFromStores)([a.default],(function(){return a.default.getGuildScheduledEvent(null==t?void 0:t.guild_scheduled_event_id)}));var d,f;return{purchasableLiveScheduledEventStageChannel:n,purchasableLiveScheduledEvent:s}},t.useLiveScheduledEventStageChannel=function(e,t){var n=(0,r.useStateFromStores)([i.default],(function(){var n;return null===(n=Object.values(i.default.getStageInstancesByGuild(e)).find((function(e){return e.guild_scheduled_event_id===t})))||void 0===n?void 0:n.channel_id}),[t,e]);return(0,r.useStateFromStores)([l.default],(function(){return l.default.getChannel(n)}),[n])};var r=n(3),a=s(n(8764)),o=n(203),i=s(n(81)),l=s(n(10)),u=s(n(40));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDirectoryGuildEntry=function(e,t,n){return v.apply(this,arguments)},t.removeDirectoryGuildEntry=function(e,t){l.default.delete({url:s.Endpoints.DIRECTORY_CHANNEL_ENTRY(e,t),trackedActionData:{event:a.NetworkActionNames.DIRECTORY_GUILD_ENTRY_DELETE,metadata:{directory_channel_id:e,guild_id:t}}}),i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_ENTRY_DELETE,channelId:e,guildId:t})},t.updateDirectoryEntry=t.clearDirectorySearch=t.searchDirectoryEntries=t.fetchDirectoryEntries=void 0;var r=d(n(378)),a=n(95),o=d(n(14)),i=d(n(2)),l=d(n(482)),u=d(n(10386)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){f(o,r,a,i,l,"next",e)}function l(e){f(o,r,a,i,l,"throw",e)}i(void 0)}))}}var p=(0,r.default)(function(){var e=c(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_FETCH_START}),e.next=4,o.default.get({url:s.Endpoints.DIRECTORY_CHANNEL_ENTRIES(t)});case 4:n=e.sent,i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_FETCH_SUCCESS,channelId:t,entries:n.body}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_FETCH_FAILURE});case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),200);function v(){return(v=c(regeneratorRuntime.mark((function e(t,n,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.default.post({url:s.Endpoints.DIRECTORY_CHANNEL_ENTRY(t,n),body:{description:r},trackedActionData:{event:a.NetworkActionNames.DIRECTORY_GUILD_ENTRY_CREATE,metadata:{directory_channel_id:t,guild_id:n}}});case 2:o=e.sent,i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_ENTRY_CREATE,channelId:t,entry:o.body});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.fetchDirectoryEntries=p;var y=(0,r.default)(function(){var e=c(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u.default.shouldFetch(t,n)){e.next=4;break}return i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_CACHED_SEARCH,channelId:t,query:n}),e.abrupt("return");case 4:return e.prev=4,i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_SEARCH_START,channelId:t,query:n}),e.next=8,o.default.get({url:s.Endpoints.DIRECTORY_ENTRIES_SEARCH(t),query:{query:n}});case 8:r=e.sent,i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_SEARCH_SUCCESS,channelId:t,query:n,results:r.body}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_FETCH_FAILURE});case 15:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t,n){return e.apply(this,arguments)}}(),200);t.searchDirectoryEntries=y;t.clearDirectorySearch=function(e){i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_SEARCH_CLEAR,channelId:e})};var m=function(){var e=c(regeneratorRuntime.mark((function e(t,n,r){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.default.patch({url:s.Endpoints.DIRECTORY_CHANNEL_ENTRY(t,n),body:{description:r}});case 2:a=e.sent,i.default.dispatch({type:s.ActionTypes.GUILD_DIRECTORY_ENTRY_UPDATE,channelId:t,entry:a.body});case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.updateDirectoryEntry=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(10));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s={},d=s;function f(){Object.keys(d).forEach((function(e){null==o.default.getChannel(e)&&delete d[e]}))}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.initialize=function(e){this.waitFor(o.default),d=e||s},a.getState=function(){return d},a.getCollapsed=function(){return d},a.isCollapsed=function(e){return d[e]||!1},r}(r.default.PersistedStore);c.persistKey="collapsedChannels";var p=new c(a.default,{CONNECTION_OPEN:function(e){return f()},OVERLAY_INITIALIZE:function(e){return f()},CHANNEL_COLLAPSE:function(e){var t=e.channelId;d[t]?delete d[t]:d[t]=!0,d=u({},d)}});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areTypesInSameSection=u,t.getDropData=function(e,t,n,r,o){if(null==e||null==n)return null;var l=i.ChannelTypes.GUILD_CATEGORY;if(e.type===l)return r===t||r<t&&e.type===n.type?f(n):r>t?function(e,t,n){var r=i.ChannelTypes.GUILD_CATEGORY,a=n[(d(t,n,!0)||0)+1],o=s(-1,t.id,e.type,n);if(null==o||o&&o.channel.id===e.id)return null;if(null==a||a.channel.type===r)return{referenceId:o.channel.id,parentId:null};return null}(e,n,o):null;if(u(e.type,n.type))return f(n);if(r<t)return n.type===l?function(e,t,n){var r=n[(d(t,n,!0)||0)-1],o=s(1,t.id,e.type,n);if(null==r)return{referenceId:null,parentId:null};if(null!=o){if(u(r.channel.type,e.type)||e.isVocal()&&(0,a.isGuildSelectableChannelType)(r.channel.type))return{referenceId:o.channel.id,parentId:r.channel.parent_id};if(r.channel.isCategory())return{referenceId:o.channel.id,parentId:r.channel.id}}return null}(e,n,o):function(e,t,n){var r=n[(d(t,n,!0)||0)-1],o=s(1,t.id,e.type,n);if(null==r&&!e.isVocal())return{referenceId:null!=o?o.channel.id:null,parentId:null};if((0,a.isGuildSelectableChannelType)(e.type)&&null!=o&&((0,a.isGuildSelectableChannelType)(r.channel.type)||r.channel.isCategory()))return{referenceId:o.channel.id,parentId:t.parent_id};return null}(e,n,o);if(n.type===l)return function(e,t,n){var r=n[(d(t,n,!0)||0)+1],o=s(-1,t.id,e.type,n);if(null!=o){if(null==r)return{referenceId:o.channel.id,parentId:t.id};if(u(r.channel.type,e.type)||(0,a.isGuildSelectableChannelType)(e.type)&&r.channel.isVocal())return{referenceId:o.channel.id,parentId:r.channel.parent_id};if(r.channel.isCategory())return{referenceId:o.channel.id,parentId:t.id}}return null}(e,n,o);return function(e,t,n){var r=n[(d(t,n,!0)||0)+1],a=s(-1,t.id,e.type,n);if(null==a)return null;if(e.isVocal()){if(null==r||r.channel.isCategory())return{referenceId:a.channel.id,parentId:t.parent_id};if(r.channel.isVocal())return{referenceId:a.channel.id,parentId:r.channel.parent_id}}if(e.isCategory()&&(null==r||r.channel.isCategory()))return{referenceId:a.channel.id,parentId:null};return null}(e,n,o)},t.getDnDUpdates=function(e,t,n,i){var l,u,s=[],f=[],c=i._categories,p=function(t){var n;return n=null!=l&&null!=u&&function(e,t,n,r){if(null!=t&&null!=n&&null!=r[t]&&r[t].channel===e&&null!=r[n])return!0;return!1}(e,l,u,t)?o.default.moveItemFromTo(t,l,u):[].concat(t),s=s.concat(o.default.calculatePositionDeltas(t,n,(function(e){return e.channel.id}),(function(e){return e.channel.position}))),n};if(e.isCategory()){var v=[].concat(c).slice(1);l=d(e,v),u=d(t,v),(f=p(v)).unshift(c[0])}if((0,a.isGuildSelectableChannelType)(e.type)||e.isCategory()){var y=(0,r.default)(f.length?f:c,i,(function(e){var t=e.channel.type;return(0,a.isGuildSelectableChannelType)(t)}));l=d(e,y),u=d(t,y),p(y)}if(e.isVocal()||e.isCategory()){var m=(0,r.default)(f.length?f:c,i,(function(e){return e.channel.isVocal()}));l=d(e,m),u=d(t,m),p(m)}if(e.parent_id!==n){var _=!1;s.find((function(t){return t.id===e.id&&(t.parent_id=n,_=!0)})),_||s.push({id:e.id,parent_id:n})}return s};var r=l(n(1282)),a=n(31),o=l(n(8974)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return null!=e&&null!=t&&(e===t||(0,a.isGuildSelectableChannelType)(e)&&(0,a.isGuildSelectableChannelType)(t)||(0,a.isGuildVocalChannelType)(e)&&(0,a.isGuildVocalChannelType)(t))}function s(e,t,n,r){var a=-1;if(r.find((function(e,n){return e.channel.id===t&&(a=n,!0)})),a<0)return null;for(var o=a;o>=0&&o<r.length;o+=e){var i=r[o];if(u(i.channel.type,n))return i}return null}function d(e,t,n){if(void 0===n&&(n=!1),null==e)return 0;var r=null;return t.filter((function(t){var r=t.channel.type;return null!=e&&(n||u(e.type,r))})).find((function(t,n){var a=t.channel.id;return null!=e&&a===e.id&&(r=n,!0)})),r}function f(e){return{referenceId:e.id,parentId:e.parent_id}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;v(n(0));var r,a=n(389),o=c(n(8258)),i=v(n(8253)),l=c(n(11)),u=c(n(8329)),s=c(n(8370)),d=c(n(8485)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.channel,n=e.guild,r=e.onSelect,c=(0,s.default)(t),p=(0,d.default)(t,n),v=(0,u.default)(t),m=(0,o.default)(t.id);return l.default.isGuest()?null:y(i.default,{navId:"channel-context",onClose:a.closeContextMenu,"aria-label":f.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:r},void 0,y(i.MenuGroup,{},void 0,c),y(i.MenuGroup,{},void 0,p),y(i.MenuGroup,{},void 0,v),y(i.MenuGroup,{},void 0,m))}m.displayName="ChannelListStoreChannelContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;g(n(0));var r,a=n(389),o=h(n(8323)),i=h(n(8258)),l=g(n(8253)),u=h(n(11)),s=h(n(8579)),d=h(n(8484)),f=h(n(8329)),c=h(n(8370)),p=h(n(8485)),v=h(n(8441)),y=h(n(8399)),m=h(n(8571)),_=h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.channel,n=e.guild,r=e.onSelect,h=(0,v.default)(t),E=(0,y.default)(t),g=(0,m.default)(t),O=(0,c.default)(t),I=(0,p.default)(t,n),T=(0,s.default)(t,n),C=(0,d.default)(t,n),b=(0,f.default)(t),M=(0,i.default)(t.id),N=(0,o.default)(t);return u.default.isGuest()?null:S(l.default,{navId:"channel-context",onClose:a.closeContextMenu,"aria-label":_.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:r},void 0,S(l.MenuGroup,{},void 0,h),S(l.MenuGroup,{},void 0,E),S(l.MenuGroup,{},void 0,g,O),S(l.MenuGroup,{},void 0,N),S(l.MenuGroup,{},void 0,I,T,C),S(l.MenuGroup,{},void 0,b),S(l.MenuGroup,{},void 0,M))}O.displayName="ChannelListTextChannelContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(378)),l=f(n(273)),u=f(n(184)),s=n(123),d=f(n(7784));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E={friction:10,tension:300},g=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={translateY:new l.default.Value,reduceMotion:!1},n}_(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t){return!(0,u.default)(this.props,e,["animate"])||!(0,u.default)(this.state,t)},n.componentDidMount=function(){this.props.hide?this.state.translateY.setValue(1):this.state.translateY.setValue(0)},n.componentDidUpdate=function(e){var t=e.hide,n=this.props.hide;n&&!t?this.animateOut():!n&&t&&this.animateIn()},n.componentWillUnmount=function(){null!=this._timeout&&clearTimeout(this._timeout)},n.animateIn=function(){var e=this.state.translateY;null!=this._timeout&&clearTimeout(this._timeout),this.props.animate?this._timeout=setTimeout((function(){l.default.spring(e,m({toValue:0},E)).start()}),100):e.setValue(0)},n.animateOut=function(){var e=this.state.translateY;null!=this._timeout&&clearTimeout(this._timeout),this.props.animate?l.default.spring(e,m({toValue:1},E)).start():e.setValue(1)},n.render=function(){var e=this.props,t=e.className,n=e.text,r=e.hide,a=e.onClick;return y(l.default.div,{className:(0,o.default)(d.default.bar,t),onClick:a,style:this.getAnimatedStyle(),"aria-hidden":r},void 0,y("span",{className:d.default.text},void 0,n))},n.getAnimatedStyle=function(){var e=this.state.translateY,t=this.props.reverse;return{transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:["0%",t?"180%":"-180%"]})}]}},t}(a.Component);g.displayName="Bar";var S=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={unread:null,mention:null},t.calculateState=(0,i.default)((function(){var e=t.props,n=e.items,r=e.expandedFolders,a=e.isVisible,o=e.isUnread,i=e.isMentioned,l=e.reverse,u=e.onCalculate,s=null,d=null,f=[];n.forEach((function(e){"string"==typeof e?f.push(e):"object"==typeof e&&null!=e.folderId?null!=r&&r.has(e.folderId)?(f.push("folder:"+e.folderId),e.guildIds.forEach((function(e){return f.push(e)}))):f.push(e.guildIds):f.push(e.guildIds[0])}));for(var c=function(e){null==s&&i(e,l,f)&&(s=e),null==d&&o(e,l,f)&&(d=e)},v=l?f.length-1:0,y=f[v];null!=y;){if("string"==typeof y){if(a(y,l,f))break;c(y)}else{for(var m,_=!1,h=p(y);!(m=h()).done;){var E=m.value;if(a(E,l,f)){_=!0;break}c(E)}if(_)break}y=f[v+=l?-1:1]}null!=u&&u(s,d,l),t.setState({mention:s,unread:d})}),200),t.handleClick=function(e){e.preventDefault(),e.stopPropagation();var n=t.state,r=n.unread,a=n.mention,o=t.props.onJumpTo,i=a||r;null!=i&&o(i,[a,r])},t}_(t,e);var n=t.prototype;return n.componentDidMount=function(){this.calculateState()},n.componentDidUpdate=function(){this.calculateState()},n.componentWillUnmount=function(){this.calculateState.cancel()},n.render=function(){var e=this.state,t=e.unread,n=e.mention,r=this.props,a=r.textMention,i=r.textUnread,l=r.reverse,u=r.className,s=r.barClassName,f=r.hide,c=r.animate,p=this.context.reducedMotion;return y("div",{className:null!=u?u:void 0},void 0,y(g,{hide:!0===f||null==t&&null==n,className:(0,o.default)(s,null!=n?d.default.mention:d.default.unread),text:null!=n?a:i,reverse:l,animate:c&&!p.enabled,onClick:this.handleClick}))},t}(a.PureComponent);S.displayName="UnreadBar",S.contextType=s.AccessibilityPreferencesContext,S.defaultProps={className:d.default.container,reverse:!1,hide:!1,animate:!0};var O=S;t.default=O},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEntity=y,t.getCollapsedSelection=function(e,t,n){var r=t.getCurrentContent().getFirstBlock();n=(n=(n=n||t.getSelection()).set("focusKey",r.getKey())).set("anchorKey",r.getKey());var a=Math.min(n.getStartOffset(),n.getEndOffset())+e.length;return n=(n=n.set("anchorOffset",a)).set("focusOffset",a)},t.updateContent=m,t.deleteContent=function(e,t){switch(e){case"delete":return(0,c.default)(t);case"delete-word":return(0,u.default)(t);case"backspace":return(0,f.default)(t);case"backspace-word":return(0,l.default)(t);case"backspace-to-start-of-line":return(0,i.default)(t);default:return t}},t.miscCommand=function(e,t){switch(e){case"transpose-characters":return(0,p.default)(t);case"move-selection-to-start-of-block":return(0,d.default)(t);case"move-selection-to-end-of-block":return(0,s.default)(t);default:return t}},t.adaptSelection=function(e,t){var n=(e=(e=e.set("focusKey",t.getKey())).set("anchorKey",t.getKey())).getEndOffset();return e=(e=e.set("anchorOffset",n)).set("focusOffset",n)},t.getFirstTextBlock=_,t.applyTokensAsEntities=function(e,t,n){void 0===n&&(n={});var r=t.getCurrentContent(),a=r.getFirstBlock(),o=a.getText(),i=[];return a.findEntityRanges((function(e){return null!==e.getEntity()}),(function(e,t){var n=r.getEntity(a.getEntityAt(e)).getType(),l=o.substring(e,t);i.push({processed:!1,type:n,start:e,end:t,text:l})})),e.forEach((function(e){var r=!1;if(i.forEach((function(n){var a=e.type,o=e.start,i=e.end,l=e.getFullMatch();n.processed||(n.type===a&&n.start===o&&n.text===l?(n.processed=!0,r=!0):(o>=n.start&&o<n.end||i>n.start&&i<=n.end)&&(n.processed=!0,t=y(null,n.start,n.end,t)))})),!r){var a=n[e.type];t=y([e.type,a&&a.mutable?"MUTABLE":"IMMUTABLE",{token:e}],e.start,e.end,t)}})),i.forEach((function(e){e.processed||(t=y(null,e.start,e.end,t))})),t},t.getSelectionScope=function(e,t){var n,r,a=t.getSelection(),o=a.focusOffset,i=a.anchorOffset,l=e.find((function(t,a){return o>=t.start&&o<=t.end&&i>=t.start&&i<=t.end?(e[a+1]&&(r=e[a+1]),!0):(n=t,!1)}));if(!l)return null;return{previousToken:n,currentToken:l,nextToken:r}},t.createEmptyEditorState=function(e){return r.EditorState.createEmpty(new r.CompositeDecorator(e))},t.clearContent=function(e){var t=r.EditorState.push(e,r.ContentState.createFromText("")),n=e.getSelection();null!=n&&n.hasFocus&&(t=r.EditorState.moveFocusToEnd(t));return t},t.replaceAllContent=function(e,t){var n=_(t);return m(e,t,0,n.length)},t.appendSpace=function(e){var t=_(e);return m(" ",e,t.length)},t.setCollapsedSelection=h,t.setCollapsedEndSelection=function(e){return h(e.getCurrentContent().getFirstBlock().getText().length,e)},t.setCollapsedStartSelection=function(e){return h(0,e)},t.setToStartSelection=function(e){var t=e.getSelection();return t=(t=t.set("focusOffset",0)).set("isBackward",!0),r.EditorState.forceSelection(e,t)},t.setToEndSelection=function(e){var t=_(e),n=e.getSelection();return n=(n=n.set("focusOffset",t.length)).set("isBackward",!1),r.EditorState.forceSelection(e,n)},t.truncateContent=function(e,t){void 0===t&&(t=512);var n=_(e);if(n.length>t){var a=e.getSelection();e=m("",e,t,n.length),a.getAnchorOffset()>t&&(a=a.set("anchorOffset",t)),a.getFocusOffset()>t&&(a=a.set("focusOffset",t)),e=r.EditorState.forceSelection(e,a)}return e},t.scrollCursorIntoView=function(e){var t=window.getSelection();if(!t||"Caret"!==t.type||!e)return;var n=t.getRangeAt(0);if(!function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}(n.commonAncestorContainer,e))return;var r=n.getClientRects()[0],a=e.getClientRects()[0];if(!r||!a)return;var o=r.left-a.left+e.scrollLeft;o<e.scrollLeft?e.scrollLeft=o-10:o>e.scrollLeft+e.offsetWidth&&(e.scrollLeft=o-e.offsetWidth+3)},t.isEmpty=function(e){return 0===_(e).length},Object.defineProperty(t,"getDefaultKeyBinding",{enumerable:!0,get:function(){return a.default}});var r=n(9193),a=v(n(9205)),o=v(n(9031)),i=v(n(10006)),l=v(n(10007)),u=v(n(10008)),s=v(n(10009)),d=v(n(10010)),f=v(n(9204)),c=v(n(10011)),p=v(n(10012));function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t,n,a){var o,i=a.getCurrentContent(),l=null;null!=e&&(l=(i=(o=i).createEntity.apply(o,e)).getLastCreatedEntityKey());var u=i.getFirstBlock(),s=new r.SelectionState({anchorKey:u.getKey(),anchorOffset:t,focusKey:u.getKey(),focusOffset:n});return i=r.Modifier.applyEntity(i,s,l),r.EditorState.set(a,{currentContent:i})}function m(e,t,n,a){var i,l=t.getCurrentContent(),u=l.getFirstBlock(),s=u.getText();"number"==typeof n?(n>s.length&&(n=s.length),a>s.length&&(a=s.length),i=new r.SelectionState({anchorKey:u.getKey(),anchorOffset:n,focusKey:u.getKey(),focusOffset:a||n})):i=t.getSelection();var d,f=t.getCurrentInlineStyle(),c=(0,o.default)(l,i);return i.isCollapsed()?(l=r.Modifier.insertText(l,i,e,f,c),d="insert-characters"):(l=r.Modifier.replaceText(l,i,e,f,c),d="replace-characters"),r.EditorState.push(t,l,d)}function _(e){return e.getCurrentContent().getFirstBlock().getText()}function h(e,t){var n=t.getSelection();return n=(n=n.set("focusOffset",e)).set("anchorOffset",e),r.EditorState.forceSelection(t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(57);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this)._interval=new a.Interval,n.update=function(){var e=n.props,t=e.onUpdate,r=e.numUpdatesToShow,a=e.pointsToSmooth,o=e.updateInterval,i=n.props.getHistoricalTotalBytes(),l=null!=i[0]?i[0].bytes:0,u=[].concat(n.state.deltaBytes.slice(1,r+a),[l-n.state.lastTotalBytes]);n.setState({deltaBytes:u,smoothedDeltaBytes:n.smoothDeltaBytes(u),lastTotalBytes:l},(function(){return null!=t&&t(o)}))};var r=n.props.getHistoricalTotalBytes(),o=n.calculateInitialDeltaBytes(r);return n.state={deltaBytes:o,smoothedDeltaBytes:n.smoothDeltaBytes(o),lastTotalBytes:null!=r[0]?r[0].bytes:0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var o=r.prototype;return o.componentDidMount=function(){this.update(),this._interval.start(this.props.updateInterval,this.update)},o.componentWillUnmount=function(){this._interval.stop()},o.calculateInitialDeltaBytes=function(e){for(var t=this.props,n=t.numUpdatesToShow,r=t.updateInterval,a=t.pointsToSmooth,o=Date.now(),i=0,l=0,u=[],s=null!=e[0]?e[0].bytes:0;i<n+a;i++){for(var d=o-(i+1)*r,f=void 0;l<e.length&&(f=e[l]).timestamp>d;)l++;if(l===e.length)break;null!=f&&(u.push(s-f.bytes),s=f.bytes)}for(;i<n+a;i++)u.push(0);return u.reverse(),u},o.smoothDeltaBytes=function(e){for(var t=this.props.pointsToSmooth,n=[],r=0;r<e.length-t;r++){for(var a=0,o=0;o<t;o++)a+=e[r+o];n.push(a/t)}return n},o.render=function(){var e=this.props,t=e.numUpdatesToShow,n=e.updateInterval;return(0,e.children)(this.state.smoothedDeltaBytes,n,t)},r}(r.Component);l.displayName="ByteProgressSmoother",l.defaultProps={numUpdatesToShow:30,updateInterval:500,pointsToSmooth:10};var u=l;t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=new Set;var d=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.initialize=function(e){null!=e&&(s=new Set(e.expandedFolders))},a.getState=function(){return{expandedFolders:Array.from(s)}},a.getExpandedFolders=function(){return s},a.isFolderExpanded=function(e){return s.has(e)},r}(r.default.PersistedStore);d.persistKey="ExpandedGuildFolderStore";var f=new d(a.default,{TOGGLE_GUILD_FOLDER_EXPAND:function(e){var t=e.folderId;(s=new Set(s)).has(t)?s.delete(t):s.add(t)},SET_GUILD_FOLDER_EXPANDED:function(e){var t=e.folderId,n=e.expanded;s=new Set(s),n?s.add(t):s.has(t)&&s.delete(t)},USER_SETTINGS_UPDATE:function(e){var t=e.settings.guildFolders;if(null==t)return!1;for(var n,r=!1,a=function(){var e=n.value;t.some((function(t){return t.folderId===e}))||((s=new Set(s)).delete(e),r=!0)},o=l(s);!(n=o()).done;)a();return r}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(9)),i=n(122),l=n(680),u=n(202),s=n(3),d=n(389),f=A(n(199)),c=A(n(10040)),p=A(n(15)),v=A(n(61)),y=A(n(371)),m=A(n(8847)),_=A(n(8464)),h=n(8263),E=A(n(8465)),g=n(139),S=n(8358),O=A(n(8540)),I=A(n(8701)),T=n(9037),C=n(1),b=A(n(6)),M=A(n(7389)),N=A(n(7388));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var D=(0,g.cssValueToNumber)(N.default.animationDuration),w=(0,g.cssValueToNumber)(N.default.guildIconSize),j=(0,g.cssValueToNumber)(N.default.guildIconMargin);function k(e){var t=e.guildId,n=e.animate,r=(0,s.useStateFromStores)([p.default],(function(){return p.default.getGuild(t)}),[t]);return null==r?L("div",{className:N.default.guildIconUnavailable},void 0,"!"):L(y.default,{guild:r,animate:n,size:y.default.Sizes.SMOL,className:N.default.guildIcon,tabIndex:-1})}function U(e){var t,n,r=e.guildIds,o=e.color,l=e.hovered,s=e.expanded,d=e.isDropHovered,f=null!=o?o:(0,T.getDefaultFolderColor)(),c=a.useState(!1),p=c[0],v=c[1],y=a.useState(s),_=y[0],h=y[1],E=s?0:-w,g=(0,i.useSpring)({transform:"translate3d(0, "+E+"px, 0)",config:{duration:D},onStart:function(){v(!0),h(s)},onRest:function(){v(!1)}}),O=p?g:void 0;if((p||_)&&(t=L(i.animated.div,{style:O,className:N.default.expandedFolderIconWrapper},void 0,L(m.default,{style:{color:(0,u.int2hex)(f)}}))),p||!_||d){var I=d&&r.length<4?L(S.DragPlaceholder,{className:N.default.miniPlaceholder}):null;n=L(i.animated.div,{style:O,className:N.default.closedFolderIconWrapper},void 0,r.slice(0,4).map((function(e){return L(k,{guildId:e,animate:l},e)})),I)}return L("div",{style:s?void 0:{backgroundColor:(0,u.int2rgba)(f,.4)},className:N.default.folderIconWrapper},void 0,t,n)}function G(e){var t=e.id,n=e.expanded,r=e.sorting,a=e.draggingGuildId,o=e.guildIds,l=e.folderIndex,u=e.setRef,s=e.onDragStart,d=e.onDragEnd,f=e.guildNodeOverride,c=(0,i.useTransition)(n,{from:{height:0},enter:{height:1},leave:{height:0},config:{duration:D}}),p=o.map((function(e,n){return null!=f?L(f,{guildId:e},e):L(O.default,{guildId:e,draggable:!0,sorting:r,draggingGuildId:a,folderIndex:l,folderName:t,index:n,setRef:u,onDragStart:s,onDragEnd:d},e)})),v=o.length*(w+j);return c((function(e,n,r){var a=r.key;return n&&L(i.animated.ul,{id:t,style:{height:e.height.to((function(e){return e*v}))},className:N.default.expandedGuilds,role:"group"},a,p)}))}k.displayName="GuildIcon",U.displayName="FolderIcon";var F=L("div",{},void 0,L(S.DragPlaceholder,{})),B=a.forwardRef((function(e,t){var n,r=e.guildIds,i=e.setGuildRef,u=e.setFolderRef,s=e.folderId,p=e.folderName,y=e.folderColor,m=e.selected,g=e.expanded,O=e.unread,T=void 0!==O&&O,A=e.audio,P=void 0!==A&&A,D=e.video,w=void 0!==D&&D,j=e.screenshare,k=void 0!==j&&j,B=e.currentActiveVoiceType,H=e.badge,x=void 0===H?0:H,V=e.index,W=e.defaultFolderName,Y=e.draggable,z=void 0===Y||Y,K=e.sorting,$=e.draggingGuildId,Z=e.dragging,q=e.connectDragSource,X=e.onDragStart,J=e.onDragEnd,Q=e.onClickOverride,ee=e.onContextClickOverride,te=e.folderIconOverride,ne=e.guildNodeOverride,re=e.useCircleMask,ae=void 0!==re&&re,oe=a.useState(!1),ie=oe[0],le=oe[1],ue=a.useState(!1),se=ue[0],de=ue[1],fe="folder-items-"+s;a.useEffect((function(){K&&ie&&le(!1)}),[K,ie]),a.useEffect((function(){Z&&null!=X&&X(null)}),[Z]);var ce=null!=$&&r.includes($),pe=ie||se||ce,ve=a.useCallback((function(){f.default.toggleGuildFolderExpand(s)}),[s]),ye=a.useCallback((function(e){(0,d.openContextMenu)(e,(function(e){return a.createElement(c.default,R({},e,{folderId:s,folderName:p,folderColor:y,unread:T||x>0}))}))}),[s,p,y,T,x]),me=(0,l.useListItem)(""+s),_e=me.onFocus,he=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(me,["onFocus"]),Ee=a.useCallback((function(){!K&&le(!1)}),[K]),ge=a.useCallback((function(){!K&&le(!0)}),[K]),Se=a.useCallback((function(e){de(e)}),[]),Oe=a.useCallback((function(e){("ArrowRight"===e.key&&!g||"ArrowLeft"===e.key&&g)&&ve()}),[ve,g]),Ie=L(U,{guildIds:r,color:y,hovered:ie,expanded:g,isDropHovered:se}),Te=L(I.default,{folderIndex:V,isExpandedFolder:g,onDragOverChanged:Se}),Ce=a.useCallback((function(e){null!=u&&u(s,e)}),[u,s]);return a.createElement("div",{ref:Ce,className:N.default.wrapper},!Z&&L("span",{className:(0,o.default)(N.default.expandedFolderBackground,(n={},n[N.default.collapsed]=!g,n[N.default.hover]=pe,n))}),function(){var e,t,n;Z?e=F:(e=L("div",{className:(0,o.default)((t={},t[M.default.wobble]=se&&!g,t))},void 0,L(E.default,{selected:!ae,upperBadge:g?null:(0,S.renderIconBadge)({audio:P,video:w,screenshare:k,participating:null!=B,participatingInStage:B===C.ChannelTypes.GUILD_STAGE_VOICE}),lowerBadge:!g&&x>0?(0,S.renderMentionBadge)(x):null,lowerBadgeWidth:(0,h.getBadgeWidthForValue)(x)},void 0,a.createElement(v.default,R({className:(0,o.default)(N.default.folder,(n={},n[N.default.hover]=pe,n)),onClick:null!=Q?Q:ve,onContextMenu:null!=ee?ee:ye,onMouseEnter:ge,onMouseLeave:Ee,onKeyDown:Oe,onFocus:_e,"aria-label":b.default.Messages.GUILD_FOLDER_TOOLTIP_A11Y_LABEL.format({folderName:p||W||b.default.Messages.SERVER_FOLDER_PLACEHOLDER,mentions:x}),"aria-expanded":g,"aria-owns":fe,focusProps:{enabled:!1}},he),te?L("div",{className:N.default.expandedFolderIconWrapper},void 0,te):Ie))),z&&null!=q&&(e=q(e)));var r=p||W||b.default.Messages.SERVER_FOLDER_PLACEHOLDER;return(0,S.renderListItem)(L(a.Fragment,{},void 0,L(_.default,{hovered:!Z&&!g&&ie,selected:!Z&&!g&&m,unread:!Z&&!g&&T,className:M.default.pill}),L(S.ListItemTooltip,{text:r,disabled:K,disableWrapper:!0},void 0,e),z?Te:null))}(),L(G,{id:fe,expanded:g&&!Z,sorting:K,draggingGuildId:$,guildIds:r,setRef:i,folderIndex:V,onDragStart:X,onDragEnd:J,guildNodeOverride:ne}))}));var H=a.memo(B);t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultFolderColor=function(){return r.DEFAULT_FOLDER_COLOR};var r=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){r.useEffect((function(){return l.default.trackExposure({})}),[]);var e=(0,a.useStateFromStores)([f.default],(function(){return f.default.getGuilds()})),t=l.default.useExperiment({})[0].enableStageDiscoveryForUser,n=i.default.useExperiment({})[0].enablePublicStageToggle;return t||!!n&&Object.keys(e).filter((function(e){return u.ExperimentStore.getGuildExperimentBucket(o.default.definition.id,e)===u.ExperimentBuckets.TREATMENT_1})).some((function(t){return c.default.can(p.Permissions.MANAGE_GUILD,e[t])||c.default.can(p.Permissions.MANAGE_CHANNELS,e[t])||d.default.getChannels(t)[d.GUILD_VOCAL_CHANNELS_KEY].some((function(e){var t=e.channel;return t.isGuildStageVoice()&&(0,s.canCreatePublicStage)(t)}))}))};var r=m(n(0)),a=n(3),o=v(n(1371)),i=v(n(1372)),l=v(n(1373)),u=n(1148),s=n(1294),d=m(n(86)),f=v(n(15)),c=v(n(40)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=ge,t.PrivateChannelRecipientsInvitePopoutConnected=void 0;var r,a=de(n(0)),o=ue(n(9)),i=ue(n(8)),l=ue(n(5)),u=de(n(3)),s=ue(n(2)),d=ue(n(728)),f=ue(n(391)),c=ue(n(8765)),p=ue(n(1211)),v=ue(n(10053)),y=ue(n(1217)),m=ue(n(8297)),_=ue(n(10054)),h=n(106),E=n(5937),g=ue(n(180)),S=ue(n(1258)),O=n(42),I=n(31),T=ue(n(303)),C=ue(n(10)),b=ue(n(8521)),M=ue(n(10055)),N=ue(n(70)),A=ue(n(160)),P=ue(n(12)),R=ue(n(29)),L=ue(n(61)),D=ue(n(55)),w=ue(n(278)),j=ue(n(153)),k=ue(n(149)),U=n(85),G=n(131),F=ue(n(10056)),B=ue(n(8368)),H=ue(n(466)),x=n(35),V=n(41),W=n(217),Y=n(745),z=ue(n(279)),K=ue(n(47)),$=ue(n(8282)),Z=ue(n(24)),q=ue(n(1210)),X=ue(n(272)),J=ue(n(13)),Q=n(121),ee=n(48),te=n(1163),ne=ue(n(10057)),re=n(1),ae=ue(n(6)),oe=ue(n(7811)),ie=ue(n(370)),le=ue(n(1244));function ue(e){return e&&e.__esModule?e:{default:e}}function se(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return se=function(){return e},e}function de(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=se();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(){return(ce=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}).apply(this,arguments)}function pe(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var ve=(0,U.uid)();function ye(e){var t=e.className,n=e.children;return pe(D.default,{align:D.default.Align.CENTER,justify:D.default.Justify.CENTER,direction:D.default.Direction.VERTICAL,className:(0,o.default)(oe.default.errorState,t)},void 0,pe("div",{className:(0,o.default)(oe.default.errorStateIcon,ie.default.marginBottom20)}),n)}ye.displayName="ErrorState";var me=function(e){var t,n=e.channel,r=e.onClose,a=null!==(t=(0,g.default)(n))&&void 0!==t?t:"";return pe(L.default,{onClick:function(){(0,O.transitionToGuild)(re.ME,n.id),r()}},void 0,pe("div",{className:oe.default.confirmChannelItemContainer},void 0,pe(z.default,{src:(0,E.getChannelIconURL)(n),size:z.default.Sizes.SIZE_24,"aria-label":a}),pe("span",{className:oe.default.confirmChannelName},void 0,a),pe("span",{className:oe.default.lastActiveTimestamp},void 0,(0,l.default)(n.lastActiveTimestamp).fromNow())))};me.displayName="InviteConfirmChannelItem";var _e=function(e){var t=e.onConfirm,n=e.channelIds,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onConfirm","channelIds"]),o=(0,u.useStateFromStores)([C.default],(function(){return Array.from(n).map(C.default.getChannel)}),[n]);return a.createElement(H.default,ce({header:ae.default.Messages.GROUP_DM_INVITE_CONFIRM,confirmText:ae.default.Messages.GROUP_DM_INVITE_CONFIRM_BUTTON,cancelText:ae.default.Messages.CANCEL,onConfirm:t,confirmButtonColor:R.default.Colors.BRAND},r),pe(Z.default,{size:Z.default.Sizes.SIZE_16},void 0,ae.default.Messages.GROUP_DM_INVITE_CONFIRM_DESCRIPTION),pe(G.FormTitle,{className:oe.default.selectExistingFormHeader},void 0,ae.default.Messages.GROUP_DM_INVITE_SELECT_EXISTING),pe(X.default,{className:oe.default.confirmInviteScroller},void 0,o.filter(ee.isNotNullish).sort((function(e,t){return t.lastActiveTimestamp-e.lastActiveTimestamp})).map((function(e){return pe(me,{onClose:r.onClose,channel:e},e.id)}))))};_e.displayName="PrivateChannelInviteConfirm";var he=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={separator:!1,copied:!1},t.scrollerRef=a.createRef(),t.searchBarRef=a.createRef(),t._headerId=i.default.uniqueId(),t.scrollPageUp=function(){var e;null===(e=t.scrollerRef.current)||void 0===e||e.scrollPageUp({animate:!0})},t.scrollPageDown=function(){var e;null===(e=t.scrollerRef.current)||void 0===e||e.scrollPageDown({animate:!0})},t.getRowHeight=function(e,n){return e>0?0:null!=t.props.results[n]?42:0},t.renderRow=function(e){var n=e.section,r=e.row;if(n>0)return null;var a=t.props,o=a.results,i=a.selectedUsers,l=a.selectedRow,u=a.hideDiscriminator,s=o[r];if(null==s)return null;var d=s.user,f=s.comparator,c=i.has(d.id);return pe(ne.default,{row:r,user:d,hideDiscriminator:u,comparator:f,checked:c,selected:r===l,onClick:t.handleClick,onMouseEnter:t.focusResult,"aria-posinset":r+1,"aria-setsize":o.length},d.id)},t.forceFocus=function(){var e=t.searchBarRef.current;e&&e.focus()},t.focusResult=function(e){v.default.select(e)},t.handleSelect=function(e,n){var r=t.props,a=r.results,o=r.channel;null==n?v.default.clear(null==o?void 0:o.id):null!=a&&t.handleClick(a[n].user.id)},t.handleSelectionChange=function(e,n){v.default.select(n);var r=t.scrollerRef.current;null!=r&&r.scrollToIndex({section:e,row:n,padding:8})},t.handleQueryChange=function(e){var n=t.props.channel;v.default.search(e,null==n?void 0:n.id)},t.handleRemoveUser=function(e){var n=Array.from(t.props.selectedUsers);v.default.removeUser(n[e]),t.forceFocus()},t.handleClick=function(e){var n=t.props,r=n.selectedUsers,a=n.query,o=n.channel;!r.has(e)?(v.default.addUser(e),a.length>0&&v.default.clear(null==o?void 0:o.id)):v.default.removeUser(e),t.forceFocus()},t.handleAddFriendNavigation=function(){(0,O.transitionTo)(re.Routes.FRIENDS),c.default.setSection(re.FriendsSections.ADD_FRIEND),t.props.onClose()},t.handleScroll=function(){var e=t.scrollerRef.current;null!=e&&t.setState({separator:!e.isScrolledToTop()})},t.createNewDM=function(e){f.default.openPrivateChannel(e,!1,!1,"New Group DM")},t.pushToExistingDM=function(e,t){var n=T.default.isCallActive(e.id);f.default.addRecipients(e.id,t,re.AnalyticsLocations.ADD_FRIENDS_TO_DM).then((function(e){n&&d.default.ring(e,t)}))},t.handleInviteUsers=function(){var e=t.props,n=e.channel,r=e.selectedUsers,o=e.onClose,i=Array.from(r);if(null!=n){var l=Se(Array.from(new Set([].concat(n.recipients,i))));l.size>0?(0,V.openModal)((function(e){return a.createElement(_e,ce({},e,{onConfirm:function(){return t.pushToExistingDM(n,i)},channelIds:l}))}),{},t.context):t.pushToExistingDM(n,i)}else{var u=Se(i);i.length>1&&u.size>0?(0,V.openModal)((function(e){return a.createElement(_e,ce({},e,{onConfirm:function(){return t.createNewDM(i)},channelIds:u}))}),{},t.context):t.createNewDM(i)}o()},t.handleCopyInvite=function(e){var n=t.props,r=n.channel,a=n.invite;null!=a&&(0,te.copy)(e),null!=t.copyTimeout&&clearTimeout(t.copyTimeout),t.setState({copied:!0}),t.copyTimeout=setTimeout((function(){t.setState({copied:!1})}),1e3),J.default.track(re.AnalyticEvents.COPY_INSTANT_INVITE,{server:null,channel:null!=r?r.id:null,channel_type:null!=r?r.type:null,location:re.AnalyticsLocations.ADD_FRIENDS_TO_DM,code:null!=a?a.code:null})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,fe(t,n);var l=r.prototype;return l.componentDidMount=function(){var e=this.props.channel;s.default.wait((function(){return v.default.open(null==e?void 0:e.id)}));var t=(0,h.collectChannelAnalyticsMetadata)(e);null!=e?e.isDM()?J.default.track(re.AnalyticEvents.OPEN_POPOUT,ce({},t,{type:"Add Friends to DM",source:"DM",is_friend:!this.isNotFriends()})):J.default.track(re.AnalyticEvents.OPEN_POPOUT,ce({},t,{type:"Add Friends to DM",source:"Group DM"})):J.default.track(re.AnalyticEvents.OPEN_POPOUT,ce({},t,{type:"New Group DM",source:"Friends List"})),Q.ComponentDispatch.subscribe(re.ComponentActions.SCROLL_PAGE_UP,this.scrollPageUp),Q.ComponentDispatch.subscribe(re.ComponentActions.SCROLL_PAGE_DOWN,this.scrollPageDown)},l.componentWillUnmount=function(){Q.ComponentDispatch.unsubscribe(re.ComponentActions.SCROLL_PAGE_UP,this.scrollPageUp),Q.ComponentDispatch.unsubscribe(re.ComponentActions.SCROLL_PAGE_DOWN,this.scrollPageDown),null!=this.copyTimeout&&clearTimeout(this.copyTimeout),s.default.wait((function(){return v.default.close()}))},l.isNotFriends=function(){var e=this.props.channel;if(null==e||!e.isDM())return!1;var t=e.getRecipientId();if(null==t)throw new Error("no recipient in DM");return!N.default.isFriend(t)},l.createInvite=function(){var e=this.props.channel;if(null!=e&&e.isMultiUserDM()&&!this.isPartyFull()){var t=_.default.getCurrentConfig({}).inviteMaxAgeSeconds;p.default.createInvite(e.id,{max_age:t},"Group DM Invite Create")}},l.isPartyFull=function(){var e=this.props.channel;return null!=e&&e.recipients.length+1>=this.getMaxParticipants()},l.getMaxParticipants=function(){var e=this.props.channel;return P.default.getCurrentUser().isStaff()?re.MAX_GROUP_DM_STAFF_PARTICIPANTS:null!=e&&e.userLimit?e.userLimit:re.MAX_GROUP_DM_PARTICIPANTS},l.getRemaining=function(){var e=this.props,t=e.channel,n=e.selectedUsers,r=(null==t?0:t.recipients.length)+1;return this.getMaxParticipants()-n.size-r},l.renderCreateGroupButton=function(){var e=this.props,t=e.channel,n=e.selectedUsers,r=this.getRemaining(),a=null!=t&&0===n.size||r<0;return pe(R.default,{fullWidth:!0,disabled:a,onClick:this.handleInviteUsers},void 0,ae.default.Messages.CREATE_GROUP_DM)},l.renderAddUsersButton=function(){var e=this.props,t=e.channel,n=e.selectedUsers;if(null!=t&&!t.isDM()){var r=this.getRemaining(),a=0===n.size||r<0;return pe("div",{className:oe.default.addButton},void 0,pe(R.default,{size:R.default.Sizes.SMALL,disabled:a,onClick:this.handleInviteUsers},void 0,ae.default.Messages.ADD))}},l.renderSubtitle=function(){var e;if(!this.props.hasFriends||this.isNotFriends()||this.isPartyFull())return null;var t=this.getRemaining(),n=t<=0?ae.default.Messages.GROUP_DM_INVITE_FULL_SUB2.format({number:this.getMaxParticipants()}):ae.default.Messages.GROUP_DM_INVITE_REMAINING.format({number:t});return pe(Z.default,{size:Z.default.Sizes.SIZE_12,className:(0,o.default)(oe.default.subtitle,(e={},e[oe.default.subtitleWarning]=t<0,e),ie.default.marginTop4)},void 0,n)},l.renderSearchBar=function(){var e=this.props,t=e.query,n=e.hasFriends,r=e.results,i=e.selectedRow,l=e.selectedUsers;if(!n||this.isNotFriends())return null;var u=[];return l.forEach((function(e){var t=P.default.getUser(e);null!=t&&u.push(t.username)})),pe(D.default,{className:(0,o.default)(oe.default.searchBar,ie.default.marginTop20)},void 0,a.createElement(m.default,{ref:this.searchBarRef,size:m.default.Sizes.MEDIUM,query:t,selectedSection:0,selectedRow:i,sections:[r?r.length:0],tags:u,onSelect:this.handleSelect,onSelectionChange:this.handleSelectionChange,onQueryChange:this.handleQueryChange,onRemoveTag:this.handleRemoveUser,placeholder:0===l.size?ae.default.Messages.GROUP_DM_SEARCH_PLACEHOLDER:void 0,disabled:this.isPartyFull(),className:oe.default.searchBarComponent,autoFocus:!0,inputProps:{"aria-autocomplete":"list","aria-controls":ve},"aria-activedescendant":"user-row-"+i}),this.renderAddUsersButton())},l.renderHeader=function(){var e=null!=this.scrollerRef.current&&this.state.separator,t=this.isNotFriends()?ae.default.Messages.GROUP_DM_ADD_FRIENDS:ae.default.Messages.GROUP_DM_HEADER;return pe(x.ModalHeader,{direction:D.default.Direction.VERTICAL,align:D.default.Align.STRETCH,id:this._headerId,className:oe.default.header,separator:e},void 0,pe(K.default,{tag:K.default.Tags.H2,size:K.default.Sizes.SIZE_20},void 0,t),this.renderSubtitle(),this.renderSearchBar())},l.renderBody=function(){var e=this,t=this.props,n=t.channel,r=t.hasFriends,i=t.results;if(this.isNotFriends()){var l=null!=n?n.getRecipientId():null;if(null==l)throw new Error("no recipient in DM");var u=P.default.getUser(l),s=null!=u?u.username:"";return pe(ye,{className:oe.default.notFriends},void 0,pe("div",{},void 0,ae.default.Messages.GROUP_DM_INVITE_NOT_FRIENDS.format({username:s})),pe(R.default,{size:R.default.Sizes.SMALL,onClick:function(){return u?e.handleAddFriend(u):null},className:ie.default.marginTop20},void 0,ae.default.Messages.ADD_FRIEND_BUTTON))}return r?this.isPartyFull()?pe(ye,{className:oe.default.partyFull},void 0,pe("div",{},void 0,ae.default.Messages.GROUP_DM_INVITE_FULL_MAIN),pe("div",{},void 0,ae.default.Messages.GROUP_DM_INVITE_FULL_SUB2.format({number:this.getMaxParticipants()}))):0===i.length?pe(ye,{className:(0,o.default)(oe.default.noResults,ie.default.marginBottom20)},void 0,pe("div",{},void 0,ae.default.Messages.GROUP_DM_INVITE_EMPTY)):a.createElement(q.default,{role:"listbox",id:ve,ref:this.scrollerRef,sections:[i.length],className:oe.default.scroller,renderRow:this.renderRow,rowHeight:this.getRowHeight,renderSection:this.renderSection,sectionHeight:0,onScroll:this.handleScroll,paddingTop:0,paddingBottom:14,fade:!0}):pe(ye,{className:oe.default.noFriends},void 0,pe("div",{},void 0,ae.default.Messages.GROUP_DM_INVITE_NO_FRIENDS),pe(R.default,{autoFocus:!0,color:R.default.Colors.GREEN,fullWidth:!0,size:R.default.Sizes.SMALL,onClick:this.handleAddFriendNavigation,className:ie.default.marginTop20},void 0,ae.default.Messages.ADD_FRIEND))},l.renderSection=function(){return null},l.renderInviteLink=function(){var e,t=this,n=this.props,r=n.channel,i=n.invite,l=n.hideInstantInvites,u=this.state.copied;if(null==r||!r.isMultiUserDM()||this.isPartyFull())return null;var s=null!=i?(0,S.default)(i.code):"";return pe(a.Fragment,{},void 0,pe(G.FormTitle,{tag:G.FormTitle.Tags.H5,className:ie.default.marginBottom8},void 0,ae.default.Messages.GROUP_DM_INVITE_LINK_TITLE),pe(D.default,{className:(0,o.default)(le.default.input,(e={},e[le.default.success]=u,e)),justify:D.default.Justify.BETWEEN,align:D.default.Align.CENTER},void 0,s.length>0?pe(j.default,{className:oe.default.copyInput,name:"invite",value:l?ae.default.Messages.INSTANT_INVITE_HIDDEN:s,editable:!1,inputClassName:oe.default.noBorder,spellCheck:"false",onClick:function(e){return e.currentTarget.select()}}):pe(j.default,{className:oe.default.copyInput,name:"invite",value:s,placeholder:(0,S.default)(ae.default.Messages.GROUP_DM_INVITE_LINK_EXAMPLE),editable:!1,inputClassName:oe.default.noBorder,spellCheck:"false",onClick:function(){return t.createInvite()}}),te.SUPPORTS_COPY&&s.length>0?pe(R.default,{size:R.default.Sizes.SMALL,color:u?R.default.Colors.GREEN:R.default.Colors.BRAND,className:oe.default.copyButton,onClick:function(){return t.handleCopyInvite(s)}},void 0,u?ae.default.Messages.INVITE_COPIED:ae.default.Messages.COPY):null,0===s.length?pe(R.default,{size:R.default.Sizes.SMALL,color:R.default.Colors.BRAND,className:oe.default.copyButton,onClick:function(){return t.createInvite()}},void 0,ae.default.Messages.GROUP_DM_INVITE_LINK_CREATE):null),s.length>0?pe(Z.default,{size:Z.default.Sizes.SIZE_12,className:(0,o.default)(ie.default.marginTop8,oe.default.footerText)},void 0,ae.default.Messages.INVITE_EXPIRES_HOURS.format({numHours:"24"})):null)},l.renderFooter=function(){var e=this.props,t=e.hasFriends,n=e.channel;if(this.isNotFriends()||!t||this.isPartyFull())return null;var r=null==n||n.isDM()?this.renderCreateGroupButton():this.renderInviteLink();return null!=r?pe(a.Fragment,{},void 0,pe("div",{className:oe.default.footerSeparator}),pe(D.default,{direction:D.default.Direction.VERTICAL,className:oe.default.footer},void 0,r)):void 0},l.render=function(){var e=this.props.transitionState;return pe(x.ModalRoot,{"aria-labelledby":this._headerId,transitionState:null!=e?e:W.ModalTransitionState.ENTERED,className:oe.default.popout},void 0,pe("div",{role:"combobox","aria-controls":ve,"aria-haspopup":"listbox","aria-expanded":!0,"aria-owns":ve},void 0,this.renderHeader(),this.renderBody(),this.renderFooter()))},l.handleAddFriend=function(e){this.props.onClose(),y.default.sendRequest(e.tag,{location:"Group DM"})},r}(a.PureComponent);he.displayName="PrivateChannelRecipientsInvitePopout",he.contextType=Y.ModalContext;var Ee=u.default.connectStores([M.default,b.default,A.default],(function(e){var t,n=e.channel;return null!=n&&null!=(t=b.default.getInvite(n.id))&&t.isExpired()&&(t=null),ce({},M.default.getState(),{invite:t,hideDiscriminator:A.default.hidePersonalInformation,hideInstantInvites:A.default.hideInstantInvites})}))(he);function ge(e){var t=e.channel,n=e.iconClassName,r=e.icon,o=e.tooltip,i=e.tooltipPosition,l=void 0===i?k.default.Positions.BOTTOM:i,u=e.popoutPosition,s=void 0===u?w.default.Positions.BOTTOM:u,d=e.popoutAlign,f=void 0===d?w.default.Align.RIGHT:d,c=e.subscribeToGlobalHotkey,p=void 0!==c&&c,v=a.useState(null!=t&&t.isGroupDM()&&0===t.recipients.length),y=v[0],m=v[1],_=function(){return m((function(e){return!e}))};a.useEffect((function(){return p&&Q.ComponentDispatch.subscribe(re.ComponentActions.TOGGLE_DM_CREATE,_),function(){Q.ComponentDispatch.unsubscribe(re.ComponentActions.TOGGLE_DM_CREATE,_)}}),[p]);return pe(w.default,{renderPopout:function(e){return a.createElement(Ee,ce({},e,{onClose:e.closePopout,channel:t}))},position:s,shouldShow:y,align:f,onRequestClose:function(){return m(!1)},animation:w.default.Animation.NONE},void 0,(function(e){return a.createElement($.default.Icon,ce({},e,{onClick:_,icon:null!=r?r:null==t?F.default:B.default,className:n,iconClassName:n,tooltip:o,tooltipPosition:l}))}))}function Se(e){var t=Oe(e);return new Set((0,i.default)(C.default.getMutablePrivateChannels()).values().filter((function(e){return(0,I.isMultiUserDM)(e.type)})).filter((function(e){return Oe(e.recipients)===t})).map((function(e){return e.id})).value())}function Oe(e){return JSON.stringify(e.sort())}t.PrivateChannelRecipientsInvitePopoutConnected=Ee,ge.displayName="PrivateChannelRecipientsInviteButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStageDiscoveryLoadAnalytics=function(e,t){var n=E(),a=n.setLastVisibleIndex,o=n.setNewLoadId,i=n.setLoadEventSent,u=n.setLastVisibleIndexAtLoad,p=n.loadEventSent,v=n.lastVisibleIndexAtLoad,h=n.loadId;r.useEffect((function(){a(e)}),[a,e]),r.useEffect((function(){if(t)return o(m()),void i(!1);a(e)}),[o,i,a,t]),r.useEffect((function(){if(!t){var n=setTimeout((function(){-1===E.getState().lastVisibleIndexAtLoad&&u(e)}),500);return function(){return clearTimeout(n)}}}),[u,t,e]),r.useEffect((function(){var e;p||-1!==v&&(i(!0),l.default.track(c.AnalyticEvents.STAGE_DISCOVERY_LOADED,y({load_id:h,last_visible_index_at_load:v},{indexes:(e=f.useStageDiscoveryListStore.getState().list.map(_)).map((function(e){return e.index})),stage_instance_ids:e.map((function(e){var t;return null!==(t=e.stage_instance_id)&&void 0!==t?t:"-1"})),recommendation_sources:e.map((function(e){var t;return null!==(t=e.recommendation_source[0])&&void 0!==t?t:s.StageDiscoveryRecommendationSource.UNSPECIFIED})),recommendation_scores:e.map((function(e){var t;return null!==(t=e.recommendation_score)&&void 0!==t?t:-1}))})))}),[i,h,p,v]),(0,d.useOnStageDiscoveryExited)((function(){l.default.track(c.AnalyticEvents.STAGE_DISCOVERY_EXITED,{load_id:h,last_visible_index_at_load:v,last_visible_index:e,has_scrolled:v!==e})}))},t.trackStageDiscoveryReload=function(){var e=E.getState();l.default.track(c.AnalyticEvents.STAGE_DISCOVERY_RELOADED,{load_id:e.loadId,last_visible_index_at_load:e.lastVisibleIndexAtLoad,last_visible_index:e.lastVisibleIndex,has_scrolled:e.lastVisibleIndexAtLoad!==e.lastVisibleIndex})},t.trackStageDiscoveryStageJoined=function(e){var t=E.getState();l.default.track(c.AnalyticEvents.STAGE_DISCOVERY_STAGE_JOINED,y({load_id:t.loadId,last_visible_index_at_load:t.lastVisibleIndexAtLoad},h(e))),t.setStageJoinTimestamp(new Date)},t.trackStageDiscoveryStageExited=function(e){var t,n=E.getState();l.default.track(c.AnalyticEvents.STAGE_DISCOVERY_STAGE_EXITED,y({load_id:n.loadId,last_visible_index_at_load:n.lastVisibleIndexAtLoad},h(e),{join_timestamp:null===(t=n.stageJoinTimestamp)||void 0===t?void 0:t.getTime()})),n.setStageJoinTimestamp(null)},t.trackStageDiscoveryStageOpened=function(e){var t=E.getState();l.default.track(c.AnalyticEvents.STAGE_DISCOVERY_STAGE_OPENED,y({load_id:t.loadId,last_visible_index_at_load:t.lastVisibleIndexAtLoad},h(e)))},t.NO_VISIBLE_INDEX=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=p(n(98)),o=p(n(251)),i=p(n(81)),l=p(n(13)),u=n(48),s=n(722),d=n(11301),f=n(10446),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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}).apply(this,arguments)}function m(){return a.default.v4()}function _(e,t){var n,r;switch(e.type){case s.DiscoveryItemTypes.USER_GUILDS:n=s.StageDiscoveryRecommendationSource.USER_GUILDS,r=null;break;case s.DiscoveryItemTypes.FRIENDS_GUILDS:n=s.StageDiscoveryRecommendationSource.FRIENDS_GUILDS,r=null;break;case s.DiscoveryItemTypes.RECOMMENDED:n=e.data.source,r=e.data.score;break;case s.DiscoveryItemTypes.CONNECTED:n=s.StageDiscoveryRecommendationSource.UNSPECIFIED,r=null;break;default:(0,u.assertNever)(e)}var a=function(e){switch(e.type){case s.DiscoveryItemTypes.CONNECTED:case s.DiscoveryItemTypes.FRIENDS_GUILDS:case s.DiscoveryItemTypes.RECOMMENDED:return e.data.instance;case s.DiscoveryItemTypes.USER_GUILDS:return i.default.getStageInstanceByChannel(e.data.id);default:(0,u.assertNever)(e)}}(e);return{index:t,guild_id:null==a?void 0:a.guild_id,stage_instance_id:null==a?void 0:a.id,recommendation_source:[n],recommendation_score:r}}function h(e){var t=f.useStageDiscoveryListStore.getState().list,n=t.findIndex((function(t){return t.id===e}));if(-1!==n)return _(t[n],n)}t.NO_VISIBLE_INDEX=-1;var E=(0,o.default)((function(e){return{loadId:m(),lastVisibleIndexAtLoad:-1,lastVisibleIndex:-1,loadEventSent:!1,stageJoinTimestamp:null,setNewLoadId:function(t){return e({loadId:t,lastVisibleIndex:-1,lastVisibleIndexAtLoad:-1})},setLastVisibleIndexAtLoad:function(t){return e({lastVisibleIndexAtLoad:t})},setLastVisibleIndex:function(t){return e((function(e){return{lastVisibleIndex:Math.max(e.lastVisibleIndex,t)}}))},setLoadEventSent:function(t){return e({loadEventSent:t})},setStageJoinTimestamp:function(t){return e({stageJoinTimestamp:t})}}}))},function(e,t,n){var r={"./2017-11-16.mp4":11322,"./2019-12-17.mp4":11323,"./channel-following.png":11324,"./discovery.jpg":11325,"./discriminator.mp4":11326,"./g250k-cl.mp4":11327,"./header.mp4":11328,"./hypesquad-hack-week/header.png":11329,"./hypesquad-hack-week/paladins-loot.png":11330,"./ko-new-year.jpg":11331,"./league-rp-cl.mp4":11332,"./polish-week.png":11333,"./special-template/desktop-cta.png":11334,"./special-template/desktop-cta.svg":11335,"./special-template/header-left.svg":11336,"./special-template/header-right.svg":11337,"./special-template/mobile-cta.svg":11338,"./special-template/update-badge.svg":11339,"./stickers-launch/2020_PMM_STICKERS_Mrkt_BlogHdr_2500x1000.png":11340,"./stickers-launch/2020_PMM_STICKERS_Mrkt_DesktopHero_Left_180x220.png":11341,"./stickers-launch/2020_PMM_STICKERS_Mrkt_DesktopHero_Right_180x220.png":11342,"./stickers-launch/2020_PMM_STICKERS_Mrkt_Desktop_Changelog_658X220.png":11343,"./stickers-launch/2020_PMM_STICKERS_Mrkt_Desktop_FooterCTA_238x220.png":11344,"./stickers-launch/2020_PMM_STICKERS_Mrkt_MobileHero_375x190.png":11345,"./stickers-launch/2020_PMM_STICKERS_Mrkt_Mobile_FooterCTA_343x78.png":11346,"./store.jpg":11347};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=9041},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=e.background,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","background"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:d,fillRule:"nonzero",d:"M22.031 12.665c-.923-.4338-1.9384-.665-2.9778-.665-.695 0-1.3663.1013-2 .29V11h-4V7h-2v4h-4v2h4v4h1.29c-.1887.6337-.29 1.305-.29 2 0 1.0394.2312 2.055.665 2.978-.2207.0146-.4424.022-.665.022-2.6522 0-5.1957-1.0536-7.071-2.929C3.1067 17.1958 2.053 14.6523 2.053 12c0-5.5228 4.4772-10 10-10 2.6522 0 5.1957 1.0536 7.071 2.929 1.8754 1.8753 2.929 4.4188 2.929 7.071 0 .2225-.0074.4443-.022.665zM15.4457 13c-.9793.59-1.8023 1.413-2.3924 2.3924V13h2.3924z"}),s("path",{className:f,fill:d,d:"M19.0532 14c1.326 0 2.598.5268 3.5355 1.4645.9377.9376 1.4645 2.2094 1.4645 3.5355 0 1.326-.5268 2.598-1.4645 3.5355C21.651 23.4732 20.3793 24 19.0532 24c-1.326 0-2.5978-.5268-3.5355-1.4645C14.58 21.598 14.0532 20.326 14.0532 19c0-2.7614 2.2386-5 5-5zm-1 7l3-2-3-2v4z"})))}d.displayName="PlusCirclePlay"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,y){var m=[];e&&m.push({type:r.UPLOAD_A_FILE,icon:c.default,display:v.default.Messages.CHAT_ATTACH_UPLOAD_A_FILE});t&&m.push({type:r.CREATE_THREAD,icon:f.default,display:v.default.Messages.CREATE_THREAD});return y.forEach((function(e){(0,a.default)(e,p.ActivityFlags.EMBEDDED)||(e.type===p.ActivityTypes.PLAYING&&(0,a.default)(e,p.ActivityFlags.JOIN)&&m.push({type:r.INVITE_TO_PLAY_GAME,icon:s.default,display:v.default.Messages.CHAT_ATTACH_INVITE_TO_PLAY_GAME.format({channel:(0,o.computeChannelName)(n,l.default,i.default,!0),game:null!=e?e.name:""}),activity:e}),e.type===p.ActivityTypes.LISTENING&&(0,a.default)(e,p.ActivityFlags.SYNC)&&m.push({type:r.INVITE_TO_LISTEN,icon:d.default,display:v.default.Messages.CHAT_ATTACH_INVITE_TO_LISTEN.format({channel:(0,o.computeChannelName)(n,l.default,i.default,!0),name:null!=e?e.name:""}),activity:e}),e.type===p.ActivityTypes.WATCHING&&(0,a.default)(e,p.ActivityFlags.SYNC)&&m.push({type:r.INVITE_TO_WATCH,icon:u.default,display:v.default.Messages.CHAT_ATTACH_INVITE_TO_WATCH.format({channel:(0,o.computeChannelName)(n,l.default,i.default,!0),name:null!=e?e.name:""}),activity:e}))})),m},t.AttachmentTypes=void 0;var r,a=y(n(399)),o=n(180),i=y(n(70)),l=y(n(12)),u=y(n(8475)),s=y(n(9044)),d=y(n(8826)),f=y(n(8287)),c=y(n(10083)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}t.AttachmentTypes=r,function(e){e.UPLOAD_A_FILE="UPLOAD_A_FILE",e.INVITE_TO_PLAY_GAME="INVITE_TO_GAME",e.INVITE_TO_LISTEN="INVITE_TO_LISTEN",e.INVITE_TO_WATCH="INVITE_TO_WATCH",e.CREATE_THREAD="CREATE_THREAD"}(r||(t.AttachmentTypes=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"}))}d.displayName="Gamepad"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateMessageSpecs=function(e,t,n,r,a,u){if(r>t)throw new Error("generateMessageSpecs: too many attachments relative to messageGroups: "+t+", "+r);var s=a/l.Accessibility.FONT_SIZE_DEFAULT,d=e?i.HEIGHT_COMPACT_MESSAGE_START:i.HEIGHT_COZY_MESSAGE_START,f=e?i.HEIGHT_COMPACT_MESSAGE:i.HEIGHT_COZY_MESSAGE,c=0,p=new Array(t).fill(null).map((function(){var e=o.default.random(1,n);return c+=u*s,c+=d*s,c+=(e-1)*f*s,e})),v=p.map((function(e,t){return t})),y=[];for(;y.length<r;){var m={width:o.default.random(140,400),height:o.default.random(100,320)};y.push([v.splice(o.default.random(0,v.length-1),1)[0],m]),c+=m.height+i.HEIGHT_ATTACHMEMT_PADDING*s}return{messages:p,attachmentSpecs:y,totalHeight:c,groupSpacing:u}},t.default=function(e){var t=e.compact,n=e.messages,r=e.attachmentSpecs,o=e.totalHeight,l=e.groupSpacing;return a.useMemo((function(){for(var e,a=new Array(n.length).fill(void 0),s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(r);!(e=s()).done;){var d=e.value,f=d[0],v=d[1];a[f]=v}return c("div",{className:u.default.wrapper,style:{height:o}},void 0,n.map((function(e,n){return c(i.default,{groupSpacing:l,compact:t,messages:e,attachmentSpecs:a[n]},n)})))}),[t,n,r,o,l])},Object.defineProperty(t,"AttachmentSpecs",{enumerable:!0,get:function(){return i.AttachmentSpecs}});var r,a=f(n(0)),o=s(n(8)),i=f(n(10089)),l=n(1),u=s(n(7822));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentInAppReporting=void 0;var r,a=n(141),o=n(208),i=(r=n(412))&&r.__esModule?r:{default:r};var l=(0,o.registerUserExperiment)({id:i.default.IN_APP_REPORTING,title:"2020-29 Exp: Report TOS violating messages in-app via new modal",description:["An experiment that tests if in-app reporting is useful for Trust & Safety","Control: No changes","Treatment 1: Add menu options to report message"],buckets:[a.ExperimentBuckets.CONTROL,a.ExperimentBuckets.TREATMENT_1]});t.ExperimentInAppReporting=l},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=B(n(0)),o=G(n(9)),i=G(n(8)),l=B(n(3)),u=n(389),s=B(n(1235)),d=G(n(8300)),f=B(n(8332)),c=G(n(185)),p=G(n(8351)),v=G(n(10)),y=G(n(56)),m=G(n(8916)),_=G(n(201)),h=G(n(40)),E=G(n(70)),g=G(n(39)),S=G(n(12)),O=G(n(61)),I=G(n(55)),T=G(n(151)),C=G(n(149)),b=G(n(255)),M=n(35),N=G(n(24)),A=G(n(1210)),P=G(n(272)),R=G(n(150)),L=G(n(261)),D=G(n(258)),w=n(1),j=G(n(6)),k=G(n(7824)),U=G(n(370));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function V(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,W(e,t)}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Y=function(e){function t(){return e.apply(this,arguments)||this}return V(t,e),t.prototype.render=function(){var e,t=this.props,n=t.emoji,r=t.count,a=t.selected,i=t.setSelected,l=null==n.id?L.default.getURL(n.name):R.default.getEmojiURL({id:n.id,animated:n.animated});e=null==n.id?c.default.convertSurrogateToName(n.name):":"+n.name+":";var u=l?x("img",{className:k.default.emoji,src:l,alt:n.name}):x("span",{className:(0,o.default)(k.default.emoji,k.default.emojiText)},void 0,n.name),s=x(N.default,{},void 0,r);return x(C.default,{position:C.default.Positions.LEFT,text:e},void 0,(function(e){var t,n=e.onMouseEnter,r=e.onMouseLeave;return x(O.default,{className:(0,o.default)((t={},t[k.default.reactionDefault]=!a,t[k.default.reactionSelected]=a,t)),onClick:i,onMouseEnter:n,onMouseLeave:r},void 0,u,s)}))},t}(a.PureComponent);function z(e){var t=e.emoji,n=e.user,r=e.message,o=e.channel,i=e.guildId;var c=S.default.getCurrentUser(),m=(0,l.useStateFromStores)([h.default],(function(){return h.default.can(w.Permissions.MANAGE_MESSAGES,o)&&!o.isArchivedThread()}))||c.id===n.id?x(O.default,{onClick:function(){s.removeReaction(o.id,r.id,t,n.id)}},void 0,x(b.default,{width:16,height:16,className:k.default.remove})):null,_=(0,l.useStateFromStores)([y.default,v.default,E.default],(function(){return D.default.getName(i,o.id,n)}));return x(I.default,{className:k.default.reactorDefault,onContextMenu:function(e){(0,u.openContextMenu)(e,(function(e){return a.createElement(p.default,H({},e,{user:n,channelId:o.id}))}))},align:I.default.Align.CENTER},void 0,x(I.default.Child,{wrap:!0,grow:0,shrink:0,className:U.default.marginReset},void 0,x(f.default,{user:n,size:f.Sizes.SIZE_24})),x(I.default.Child,{},void 0,x(N.default,{tag:"strong",size:N.default.Sizes.SIZE_16,className:k.default.name},void 0,_&&x("span",{className:k.default.nickname},void 0,_),x(d.default,{user:n,className:_?k.default.tagFaded:null,usernameClass:k.default.username,discriminatorClass:k.default.discriminator}))),m)}Y.displayName="Reaction",z.displayName="Reactor";var K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).scrollerRef=a.createRef(),t.state={lastId:null,loadingMore:!1},t.handleScroll=function(){var e=t.scrollerRef.current;if(null!=e){var n=e.getScrollerState();n.scrollTop+n.offsetHeight>=n.scrollHeight-44&&t.props.hasMore&&!t.state.loadingMore&&t.loadMore()}},t.getRowHeight=function(e,n){var r=t.props.reactors;if(1===e)return 0===n?44:0;if(0===e){if(0===n&&0===r.length)return 440;if(null!=t.props.reactors[n])return 44}return 0},t.renderRow=function(e){var n=e.section,r=e.row,a=t.props,o=a.message,i=a.guildId,l=a.channel,u=a.reaction,s=a.reactors,d=s[r];return 1===n?0===r?x(T.default,{className:k.default.spinnerMore},"hasMore"):null:0===s.length&&t.state.loadingMore?x(T.default,{className:k.default.spinner},"loadingMore"):null!=d&&x(z,{message:o,emoji:u.emoji,guildId:i,channel:l,user:d},d.id)},t}V(t,e);var n=t.prototype;return n.componentDidMount=function(){this.loadMore()},n.componentDidUpdate=function(e){var t=this;i.default.isEqual(this.props.reaction,e.reaction)||this.setState({lastId:null,loadingMore:!1},(function(){return t.loadMore()}))},n.loadMore=function(){var e=this,t=this.props,n=t.message,r=t.reaction,a=this.state.lastId;this.setState({loadingMore:!0}),s.getReactions(n.getChannelId(),n.id,r.emoji,w.DEFAULT_NUM_REACTION_USERS,a).then((function(t){return e.setState({loadingMore:!1,lastId:t[t.length-1].id})}))},n.renderSection=function(){return null},n.render=function(){var e=this.props,t=e.hasMore,n=e.reactors,r=[];return 0===n.length&&this.state.loadingMore?r.push(length):(r.push(n.length),t&&r.push(1)),a.createElement(A.default,{className:k.default.reactors,fade:!0,ref:this.scrollerRef,sections:r,sectionHeight:0,rowHeight:this.getRowHeight,renderRow:this.renderRow,renderSection:this.renderSection,onScroll:t?this.handleScroll:void 0})},t}(a.PureComponent);K.displayName="ReactorsComponent";var $=l.default.connectStores([m.default],(function(e){var t=e.message,n=e.reaction,r=m.default.getReactions(t.getChannelId(),t.id,n.emoji,w.DEFAULT_NUM_REACTION_USERS);return{hasMore:null!=r&&n.count>Object.keys(r).length,reactors:null==r?[]:Object.values(r)}}))(K),Z=x(T.default,{}),q=function(t){function n(e){var n,r=(n=t.call(this,e)||this).props.reactions;return n.state={selectedReaction:r[0]},n}V(n,t);var r=n.prototype;return r.componentDidUpdate=function(t){var n=this.props,r=n.reactions,a=n.onClose;r.length!==t.reactions.length&&0===r.length&&e(a)},r.setSelectedReaction=function(e){this.setState({selectedReaction:e})},r.render=function(){var e=this,t=this.props,n=t.message,r=t.reactions,o=t.transitionState,l=this.state.selectedReaction;if(!l)return Z;var u=v.default.getChannel(n.getChannelId());if(null==u)throw new Error("MessageReactions.render: Message does not have a channelId");var s=null==u||u.isPrivate()?null:u.getGuildId(),d=r.map((function(e,t){return H({},e,{pos:t})})).sort((function(e,t){return e.count!==t.count?t.count-e.count:e.pos-t.pos})).map((function(t){return a.createElement(Y,H({key:(t.emoji.id||"")+":"+t.emoji.name,selected:i.default.isEqual(l.emoji,t.emoji),setSelected:function(){return e.setSelectedReaction(t)}},t))}));return x(M.ModalRoot,{"aria-label":j.default.Messages.REACTIONS,transitionState:o,size:M.ModalSize.DYNAMIC,className:k.default.container},void 0,x(P.default,{className:k.default.scroller,fade:!0},void 0,d),x($,{message:n,reaction:l,guildId:s,channel:u},(l.emoji.id||"")+":"+l.emoji.name))},n}(a.PureComponent);q.displayName="MessageReactions";var X=l.default.connectStores([_.default,g.default],(function(e){var t=e.message,n=_.default.getMessage(t.getChannelId(),t.id),r=null!=n?n.reactions:[];return{theme:g.default.theme,reactions:r}}),{forwardRef:!0})(q);t.default=X}).call(this,n(68).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={};var u=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getOptions=function(e){return l[e]},r}(r.default.Store))(a.default,{MESSAGE_CREATE:function(e){var t=e.message,n=e.sendMessageOptions;null!=n&&(l[t.id]=n),null!=t.nonce&&t.nonce in l&&delete l[t.nonce]}});t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){void 0===r&&(r={});if(a.default.deleteMessage(e.id,t.id,!0),t.type===i.MessageTypes.APPLICATION_COMMAND)return void(t.interactionData&&r.applicationId&&(0,o.retryCommandMessage)(t,e,r.applicationId));var l=t.content,u=t.tts;a.default.sendMessage(e.id,{content:l,tts:u,invalidEmojis:[],validNonShortcutEmojis:[]},void 0,r)};var r,a=(r=n(390))&&r.__esModule?r:{default:r},o=n(9224),i=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,i.isPublicSystemMessage)(t))return y;if((0,d.default)(t))return v(o.default,{messageReference:t.messageReference});if(null!=t.interaction&&"SENDING"===t.state)return null;var n=s.default.getChannel(t.channel_id);return null!=n?a.createElement(u.default,p({},e,{channelId:t.channel_id,guildId:n.guild_id,userId:t.author.id})):null};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(1311)),i=n(8643),l=f(n(10114)),u=f(n(8268)),s=f(n(10)),d=f(n(8642));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=v(l.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(7831));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.className,n=e.children,r=e.roleColor,i=e.roleName;return u("div",{className:(0,a.default)(t,o.default.role)},void 0,u("div",{className:o.default.roleColor,style:{backgroundColor:r}}),i,n)}s.displayName="RoleLabel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(29)),o=u(n(55)),i=u(n(24)),l=u(n(7833));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.icon,n=e.onClick,r=e.label;return d(a.default,{look:a.default.Looks.BLANK,size:a.default.Sizes.MIN,className:l.default.button,onClick:n},void 0,d(o.default,{align:o.default.Align.CENTER},void 0,d("div",{className:l.default.buttonIcon},void 0,t),d(i.default,{size:i.default.Sizes.SIZE_16,color:i.default.Colors.CUSTOM},void 0,r)))}f.displayName="ChannelSettingsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(9)),o=l(n(8472)),i=l(n(7343));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}var d=r.forwardRef((function(e,t){var n,l=e.className,u=e.isBeforeGroup,d=void 0!==u&&u,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className","isBeforeGroup"]),c=f.children;return r.createElement(o.default,s({},f,{ref:t,className:(0,a.default)(l,(n={},n[i.default.divider]=!0,n[i.default.hasContent]=null!=c,n[i.default.beforeGroup]=d,n))}))})),f=r.memo(d);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(29)),i=f(n(8685)),l=f(n(8649)),u=f(n(47)),s=f(n(24)),d=f(n(7840));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=a.memo((function(e){var t=e.message,n=e.subtitle,r=e.countdown,f=e.buttonText,c=e.buttonColor,v=e.buttonSubmitting,y=e.onButtonClick,m=e.imageSrc,_=e.animationSrc,h=e.secondaryButtonText,E=e.onSecondaryButtonClick,g=e.children,S=e.useReducedMotion,O=void 0!==S&&S;if(null==t)return a.createElement(a.Fragment,null,a.Children.only(g));var I=null;return null!=m?I=p("img",{alt:"",src:m,className:d.default.image}):null!=_&&(I=p(l.default,{importData:_,shouldAnimate:!O,className:d.default.animation})),p("div",{className:d.default.wrapper},void 0,p("div",{className:d.default.content},void 0,I,p("div",{className:d.default.text},void 0,p(u.default,{size:u.default.Sizes.SIZE_16,className:d.default.title},void 0,t),n&&p(s.default,{color:s.default.Colors.MUTED,size:s.default.Sizes.SIZE_12},void 0,n))),p("div",{className:d.default.buttonContainer},void 0,null!=h&&p(o.default,{className:d.default.button,size:o.default.Sizes.SMALL,onClick:E,look:o.default.Looks.LINK,color:o.default.Colors.PRIMARY,submitting:v},void 0,h),null!=f&&p(o.default,{className:d.default.button,size:o.default.Sizes.SMALL,onClick:y,submitting:v,color:c||o.default.Colors.PRIMARY},void 0,f)),null!=r&&p(i.default,{className:d.default.countdown,deadline:r}))}));t.default=v},function(e,t,n){e.exports=n.p+"1541db19fe490f7b5e623e86e8f13d41.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=c(n(0)),o=d(n(9)),i=c(n(29)),l=d(n(55)),u=d(n(7850)),s=d(n(370));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){var e=this.props,t=e.title,n=e.description,r=e.agreement,a=e.disagreement,d=e.onAgree,f=e.onDisagree,c=e.imageClassName;return p(l.default,{className:u.default.gatedContent,justify:l.default.Justify.CENTER,align:l.default.Align.CENTER,direction:l.default.Direction.VERTICAL},void 0,p("div",{className:(0,o.default)(u.default.image,c)}),p("div",{className:(0,o.default)(u.default.title,s.default.marginBottom8)},void 0,t),p("div",{className:(0,o.default)(u.default.description,s.default.marginBottom20)},void 0,n),p(l.default,{justify:l.default.Justify.CENTER,align:l.default.Align.CENTER,grow:0},void 0,a?p(i.default,{className:u.default.action,size:i.ButtonSizes.LARGE,color:i.ButtonColors.PRIMARY,onClick:f},void 0,a):null,r?p(i.default,{className:u.default.action,color:u.default.actionRed,size:i.ButtonSizes.LARGE,onClick:d},void 0,r):null))},r}(a.PureComponent);y.displayName="GatedContent";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MODAL_CAROUSEL_PREV=t.MODAL_CAROUSEL_NEXT=t.CAROUSEL_PREV=t.CAROUSEL_NEXT=void 0;var r=u(n(694)),a=u(n(690)),o=n(41),i=n(121),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s=function(){return a.default.hasModalOpen()||r.default.hasLayers()||(0,o.hasAnyModalOpen)()},d={binds:["right"],comboKeysBindGlobal:!0,action:function(){if(!s())return i.ComponentDispatch.dispatch(l.ComponentActions.CAROUSEL_NEXT),!1}};t.CAROUSEL_NEXT=d;var f={binds:["left"],comboKeysBindGlobal:!0,action:function(){if(!s())return i.ComponentDispatch.dispatch(l.ComponentActions.CAROUSEL_PREV),!1}};t.CAROUSEL_PREV=f;var c={binds:["right","down","space"],comboKeysBindGlobal:!0,action:function(){return i.ComponentDispatch.dispatch(l.ComponentActions.MODAL_CAROUSEL_NEXT),!1}};t.MODAL_CAROUSEL_NEXT=c;var p={binds:["left","up"],comboKeysBindGlobal:!0,action:function(){return i.ComponentDispatch.dispatch(l.ComponentActions.MODAL_CAROUSEL_PREV),!1}};t.MODAL_CAROUSEL_PREV=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(1169),o=c(n(257)),i=c(n(24)),l=n(96),u=n(281),s=n(1),d=c(n(6)),f=c(n(7852));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.subscription,n=e.withOverheadSeparator,r=(0,a.useSubscriptionInvoicePreview)({subscriptionId:t.id,renewal:!0})[0];if(null==r)return null;var c=n?f.default.finePrintWithOverheadSeparator:f.default.finePrint,p=r.invoiceItems.find((function(e){var t=e.subscriptionPlanId;return(0,l.isPremiumBaseSubscriptionPlan)(t)}));if(null==p)return null;var y=p.subscriptionPlanId,m=o.default.getHardcoded(y).interval===s.SubscriptionIntervalTypes.YEAR,_=(0,u.formatPrice)(r.total,r.currency);return v(i.default,{color:i.default.Colors.MUTED,className:c,size:i.default.Sizes.SIZE_12},void 0,m?d.default.Messages.BILLING_PAYMENT_PREMIUM_LEGALESE_YEARLY.format({price:_,termsUrl:s.MarketingURLs.TERMS,privacyUrl:s.MarketingURLs.PRIVACY}):d.default.Messages.BILLING_PAYMENT_PREMIUM_LEGALESE_MONTHLY.format({price:_,termsUrl:s.MarketingURLs.TERMS,privacyUrl:s.MarketingURLs.PRIVACY}))}function m(e){var t=e.subscription,n=e.withOverheadSeparator;return t.status===s.SubscriptionStatusTypes.CANCELED||t.isPurchasedExternally?null:v(y,{subscription:t,withOverheadSeparator:n})}y.displayName="PremiumSubscriptionFinePrintContent",m.displayName="PremiumSubscriptionFinePrint"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumGuildSubscriptionHeader=A,t.SubscriptionDetailsEmpty=L,t.default=w;M(n(0));var r,a=C(n(9)),o=n(3),i=C(n(473)),l=n(1169),u=n(5688),s=C(n(12)),d=C(n(29)),f=C(n(467)),c=C(n(55)),p=C(n(477)),v=C(n(151)),y=n(131),m=C(n(5686)),_=M(n(96)),h=C(n(9060)),E=C(n(10164)),g=C(n(10166)),S=C(n(10167)),O=n(1),I=C(n(6)),T=C(n(7858));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e){var t=e.subscription,n=e.className,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getCurrentUser()}));if(0===(0,_.getNumPremiumGuildSubscriptions)(t.additionalPlans))return null;var l,u=t.status;return l=(0,_.isPremiumGuildSubscriptionCanceled)(t)?T.default.premiumGuildSubscriptionRowCanceled:(0,_.isSubscriptionStatusFailedPayment)(u)?T.default.premiumGuildSubscriptionRowFailedPayment:T.default.premiumGuildSubscriptionRowActive,N("div",{className:(0,a.default)(l,n)},void 0,N("div",{className:T.default.premiumGuildSubscriptionRowBackground}),N("div",{className:T.default.premiumGuildImage}),N("div",{className:T.default.premiumGuildSubscriptionRowBody},void 0,N("div",{className:T.default.premiumGuildWordmark}),N("div",{},void 0,(0,_.getPremiumGuildHeaderDescription)(t,r))),N(h.default,{color:d.default.Colors.BRAND,onClick:function(){return i.default.open(O.UserSettingsSections.PREMIUM_GUILD_SUBSCRIPTION)}},void 0,I.default.Messages.PREMIUM_GUILD_PERKS_MODAL_MANAGE_YOUR_SUBSCRIPTIONS))}function P(e){var t=e.subscription,n=e.renewalInvoicePreview,r=e.className;return N("div",{className:(0,a.default)(T.default.billingInformation,r)},void 0,N(y.FormTitle,{tag:y.FormTitle.Tags.H3,className:T.default.detailBlockHeader},void 0,I.default.Messages.PREMIUM_SETTINGS_BILLING_INFO),N("div",{},void 0,_.default.getBillingInformationString(t,n)))}function R(e){var t=e.subscription,n=_.default.getGrandfatheredEndDate(t.planId),r=_.default.getInterval(t.planId)===O.SubscriptionIntervalTypes.MONTH,a=(0,_.isUpgradingFromGrandfathered)(t);return N("div",{className:T.default.grandfatheredMessage},void 0,N(m.default,{className:T.default.grandfatheredIcon}),N("span",{className:T.default.grandfatheredMessageText},void 0,a?I.default.Messages.PREMIUM_GRANDFATHERED_YEARLY_UPGRADING.format({date:_.default.GRANDFATHERED_YEARLY_END_DATE}):I.default.Messages.PREMIUM_GRANDFATHERED_YEARLY.format({date:n})),r?N(d.default,{look:d.default.Looks.INVERTED,size:d.default.Sizes.SMALL,onClick:function(){return(0,u.openPremiumSelectPlanModal)({initialPlanId:O.SubscriptionPlans.PREMIUM_MONTH_TIER_2,analyticsLocation:{page:O.AnalyticsPages.USER_SETTINGS,section:O.AnalyticsSections.SETTINGS_PREMIUM,object:O.AnalyticsObjects.BUTTON_CTA}})}},void 0,I.default.Messages.BILLING_SWITCH_PLAN_UPGRADE):null)}function L(e){return N("div",{className:e.className},void 0,N(y.FormTitle,{className:T.default.sectionTitle,tag:y.FormTitle.Tags.H1},void 0,I.default.Messages.USER_SETTINGS_SUBSCRIPTIONS_HEADER),N("p",{className:T.default.sectionDescription},void 0,I.default.Messages.BILLING_PAYMENT_PREMIUM_DESCRIPTION),N(f.default,{className:T.default.noItemsCard,type:f.default.Types.CUSTOM},void 0,N(c.default,{align:c.default.Align.CENTER},void 0,N(p.default,{game:null,size:p.default.Sizes.SMALL,className:T.default.noItemsIcon}),N("span",{className:T.default.cardText},void 0,I.default.Messages.USER_SETTINGS_NO_SUBSCRIPTIONS))))}A.displayName="PremiumGuildSubscriptionHeader",P.displayName="SubscriptionBillingInformation",R.displayName="GrandfatheredNotice",L.displayName="SubscriptionDetailsEmpty";var D=N(v.default,{});function w(e){var t,n=e.subscription,r=e.paymentSource,a=e.busy,o=e.className,i=e.useStandaloneSubscriptionsTab,u=(0,l.useSubscriptionInvoicePreview)({subscriptionId:n.id,renewal:!0})[0],s=(0,l.useSubscriptionInvoicePreview)({subscriptionId:n.id,renewal:!0,applyEntitlements:!0})[0];if(null==u||null==s)return D;null!=n.renewalMutations&&(n.renewalMutations.planId!==n.planId&&!_.default.isNoneSubscription(n.renewalMutations.planId)||n.hasExternalPlanChange)&&(t=N(S.default,{subscription:n,renewalMutations:n.renewalMutations,className:T.default.renewalMutationNotice}));var d=_.default.isGrandfathered(n.planId),f=I.default.Messages.USER_SETTINGS_SUBSCRIPTIONS_HEADER;return i||(f=I.default.Messages.BILLING_PAYMENT_PREMIUM),N("div",{className:o},void 0,N(y.FormTitle,{className:T.default.sectionTitle,tag:y.FormTitle.Tags.H1},void 0,f),t,d?N(R,{subscription:n}):null,N("div",{className:T.default.subscriptionRows},void 0,N("p",{className:T.default.sectionDescription},void 0,I.default.Messages.BILLING_PAYMENT_PREMIUM_DESCRIPTION),N(E.default,{subscription:n,renewalInvoicePreview:u,paymentSource:r,busy:a}),N(A,{subscription:n,className:T.default.guildSubscriptionRow})),N("div",{},void 0,N(y.FormTitle,{tag:y.FormTitle.Tags.H5},void 0,I.default.Messages.BILLING_STEP_PAYMENT),N("div",{className:T.default.details},void 0,N(P,{subscription:n,renewalInvoicePreview:s,className:T.default.detailsBlock}),N(g.default,{subscription:n,className:T.default.detailsBlock}))))}w.displayName="SubscriptionDetails"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(29)),o=i(n(7853));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children"]);return r.createElement(a.default,u({},n,{size:a.default.Sizes.SMALL,look:a.default.Looks.INVERTED,className:o.default.button}),t)}s.displayName="PremiumSettingsPushButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_standalone_subscriptions_tab",label:"Standalone Subscriptions Tab",defaultConfig:{useStandaloneSubscriptionsTab:!1},treatments:[{id:1,label:"Enables the standalone Subscriptions tab",config:{useStandaloneSubscriptionsTab:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumTier1Buttons=t.PremiumTier2Buttons=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(5689),l=d(n(5948)),u=n(1),s=d(n(7860));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}var v=function(e){var t,n=e.className,r=e.alignLeft,d=void 0!==r&&r,f=e.premiumModalAnalyticsLocation,v=e.subscribeButtonProps,y=e.giftButtonProps,m=(0,i.usePremiumTrialOffer)();return c("div",{className:(0,o.default)(n,s.default.buttons,(t={},t[s.default.buttonsCenter]=!d,t))},void 0,a.createElement(l.default,p({},v,{subscriptionTier:u.PremiumSubscriptionSKUs.TIER_2,className:s.default.button,premiumModalAnalyticsLocation:f,trialId:null!=m?m.trial_id:null})),a.createElement(l.default,p({},y,{subscriptionTier:u.PremiumSubscriptionSKUs.TIER_2,isGift:!0,premiumModalAnalyticsLocation:f,className:s.default.button})))};t.PremiumTier2Buttons=v,v.displayName="PremiumTier2Buttons";var y=function(e){var t=e.premiumModalAnalyticsLocation;return c("div",{className:s.default.buttons},void 0,c(l.default,{subscriptionTier:u.PremiumSubscriptionSKUs.TIER_1,premiumModalAnalyticsLocation:t,className:s.default.button}),c(l.default,{subscriptionTier:u.PremiumSubscriptionSKUs.TIER_1,isGift:!0,premiumModalAnalyticsLocation:t,className:s.default.button}))};t.PremiumTier1Buttons=y,y.displayName="PremiumTier1Buttons"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l,u,s;function d(){u={},l={},s=new Set}d();var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.getStatisticsForApplication=function(e){return l[e]},a.shouldFetchStatisticsForApplication=function(e){var t=u[e];return!s.has(e)&&(null==t||Date.now()-t>36e5)},r}(r.default.Store))(a.default,{APPLICATION_ACTIVITY_STATISTICS_FETCH_START:function(e){var t=e.applicationId;s.add(t)},APPLICATION_ACTIVITY_STATISTICS_FETCH_FAIL:function(e){var t=e.applicationId;s.delete(t)},APPLICATION_ACTIVITY_STATISTICS_FETCH_SUCCESS:function(e){var t=e.statistics,n=e.applicationId;u[n]=Date.now(),s.delete(n),l[n]=t},LOGOUT:function(e){return d()}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ItemSizes=void 0;var r,a=S(n(0)),o=E(n(9)),i=E(n(273)),l=E(n(8299)),u=n(8308),s=S(n(9065)),d=S(n(8655)),f=E(n(61)),c=n(8516),p=E(n(8894)),v=E(n(8337)),y=E(n(8592)),m=n(121),_=n(1),h=E(n(7873));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(){var e=function(e,t){t||(t=e.slice(0));return e.raw=t,e}(["grayscale(",")"]);return O=function(){return e},e}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(){return(b=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}).apply(this,arguments)}var M={SMALL:{width:640,height:360,margin:15},MEDIUM:{width:880,height:495,margin:20}};t.ItemSizes=M;var N={width:1920,height:1080},A={width:1280,height:720},P=function(e){return(0,u.renderVideoComponent)(b({},e,{className:h.default.videoWrapper,mediaPlayerClassName:h.default.mediaPlayer}))},R=function(e){return a.createElement(v.default,e)};R.displayName="carouselRenderImage";var L=function(e){var t,n,r=e.item,a=e.size,o=e.onPlay,i=e.onEnded,l=e.onClick,s=e.playable,d=e.volume,p=e.isMuted,v=e.onVolumeChange,y=e.onMute;if(r.type===_.CarouselMediaTypes.YOUTUBE_VIDEO)t=b({url:(0,_.YOUTUBE_PREVIEW_URL)(r.youtubeVideoId)},N),n=b({url:(0,_.YOUTUBE_EMBED_URL)(r.youtubeVideoId)+"?rel=0&iv_load_policy=3&showinfo=0&modestbranding=1"},A);else{var m=null!=r.width?r.width:0,E=null!=r.height?r.height:0;t={url:r.thumbnailSrc,width:m,height:E},n={url:r.src,proxyURL:r.src,width:m,height:E}}var g=C(c.EmbedVideo,{href:null,thumbnail:t,video:n,allowFullScreen:!0,maxHeight:a.height,maxWidth:a.width,onPlay:o,onEnded:i,playable:s,className:h.default.video,volume:d,onVolumeChange:v,autoMute:p,onMute:y,autoPlay:s,renderVideoComponent:P,renderImageComponent:R,renderLinkComponent:u.renderMaskedLinkComponent});return s?g:C(f.default,{className:h.default.itemImageWrapper,onClick:l},void 0,g)},D=function(){return C("div",{className:h.default.paginationVideoOverlay},void 0,C(y.default,{inactive:!0,className:h.default.paginationVideoPlayPill,renderLinkComponent:u.renderMaskedLinkComponent}))};D.displayName="VideoOverlay";var w=C(D,{}),j=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={currentIndex:0,animate:!0,playingVideo:!1,hasInteracted:!1,hoveringPreviousItem:!1,hoveringNextItem:!1,volume:1,isMuted:!0},t.getItemSize=function(){var e=t.props.width,n=M.MEDIUM;return null!=e&&e<n.width&&(n=M.SMALL),n},t.setItem=function(e,n){var r=I(t),a=r.props,o=a.items,i=a.onIntentionalChange,l=r.state.currentIndex,u=(0,d.normalizeIndex)(l,o.length),s=(0,d.normalizeIndex)(e,o.length),f=1===Math.abs(e-u)||e===o.length-1&&0===u||0===e&&u===o.length-1;t.setState({playingVideo:!1,currentIndex:s,animate:f,hasInteracted:n}),n&&null!=i&&i(o[s],u,s)},t.autoNext=function(){t.setItem(t.state.currentIndex+1,!1)},t.manualNext=function(){t.setItem(t.state.currentIndex+1,!0)},t.manualPrevious=function(){t.setItem(t.state.currentIndex-1,!0)},t.handlePlay=function(e){return t.setState({playingVideo:!0,hasInteracted:!e})},t.handleEnded=function(){t.state.hasInteracted||t.autoNext()},t.handleVolumeChange=function(e){t.setState({volume:e,hasInteracted:!0})},t.handleMute=function(e){t.setState({isMuted:e,hasInteracted:!0})},t.handleVideoClick=function(e){t.setItem(e,!0)},t.handleEdgeItemMouseLeave=function(){t.setState({hoveringPreviousItem:!1,hoveringNextItem:!1})},t.renderCarouselImage=function(e,n,r){return r?C(f.default,{onClick:function(){return t.handleCurrentItemClick(e,n)},className:h.default.itemImageWrapper},void 0,C("img",{src:e.src,alt:"",className:h.default.currentImage})):C(f.default,{onClick:function(){return t.setItem(n,!0)},className:h.default.itemImageWrapper},void 0,C("img",{alt:"",className:h.default.itemImage,src:e.src,draggable:!1}))},t.renderItem=function(e,n,r){var a,l=t.state,u=l.currentIndex,s=l.volume,f=l.isMuted,c=n===(0,d.normalizeIndex)(u,t.props.items.length);return C(i.default.div,{className:(0,o.default)(h.default.item,(a={},a[h.default.currentItem]=c,a)),style:null!=r?t.getStyle(n,r):null,onMouseEnter:c?null:function(){return t.handleEdgeItemMouseEnter(n)},onMouseLeave:c?null:t.handleEdgeItemMouseLeave},void 0,e.type===_.CarouselMediaTypes.VIDEO||e.type===_.CarouselMediaTypes.YOUTUBE_VIDEO?C(L,{item:e,size:t.getItemSize(),onPlay:t.handlePlay,onEnded:t.handleEnded,playable:c,onClick:function(){return t.handleVideoClick(n)},volume:s,onVolumeChange:t.handleVolumeChange,isMuted:f,onMute:t.handleMute}):t.renderCarouselImage(e,n,c))},t.renderPaginationItem=function(e,n){var r=t.state.currentIndex===n;return C("div",{className:(0,o.default)(h.default.paginationItem,r?h.default.selectedStorePaginationItem:h.default.unselectedStorePaginationItem)},"page-"+n,C("img",{alt:null==e.alt?n:e.alt,className:h.default.storePaginationImg,src:t.getPaginationSrc(e),draggable:!1}),e.type===_.CarouselMediaTypes.YOUTUBE_VIDEO||e.type===_.CarouselMediaTypes.VIDEO?w:null,r?C("div",{className:h.default.overlappingBorder}):null)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n);var a=r.prototype;return a.componentDidMount=function(){m.ComponentDispatch.subscribe(_.ComponentActions.CAROUSEL_PREV,this.manualPrevious),m.ComponentDispatch.subscribe(_.ComponentActions.CAROUSEL_NEXT,this.manualNext)},a.componentWillUnmount=function(){m.ComponentDispatch.unsubscribe(_.ComponentActions.CAROUSEL_PREV,this.manualPrevious),m.ComponentDispatch.unsubscribe(_.ComponentActions.CAROUSEL_NEXT,this.manualNext)},a.getStyle=function(e,t){var n=t.interpolate({inputRange:[0,1],outputRange:[1,0],extrapolate:i.default.Extrapolate.CLAMP});return{opacity:t.interpolate({inputRange:[0,1],outputRange:[.3,1],extrapolate:i.default.Extrapolate.CLAMP}),filter:i.default.template(O(),n)}},a.handleCurrentItemClick=function(e,t){var n=this.props.onCurrentItemClick;null!=n&&n(e,t),this.setState({hasInteracted:!0})},a.handleEdgeItemMouseEnter=function(e){var t=this.state.currentIndex;e<t?this.setState({hoveringPreviousItem:!0}):e>t&&this.setState({hoveringNextItem:!0})},a.renderCarousel=function(){var e,t,n=this.props.items,r=this.state,a=r.currentIndex,i=r.animate,l=r.hoveringPreviousItem,u=r.hoveringNextItem,f=C(d.default,{items:n,itemSize:this.getItemSize(),renderItem:this.renderItem,currentIndex:a,animate:i,edgeItems:2});return n.length<=1?f:C("div",{className:h.default.carouselButtonsContainer},void 0,f,C(s.CarouselPrevious,{onClick:this.manualPrevious,className:(0,o.default)(h.default.arrow,(e={},e[h.default.arrowHovered]=l,e))}),C(s.CarouselNext,{onClick:this.manualNext,className:(0,o.default)(h.default.arrow,(t={},t[h.default.arrowHovered]=u,t))}))},a.getPaginationSrc=function(e){return e.type===_.CarouselMediaTypes.YOUTUBE_VIDEO?(0,_.YOUTUBE_PREVIEW_URL)(e.youtubeVideoId):e.type===_.CarouselMediaTypes.IMG?e.src:e.type===_.CarouselMediaTypes.VIDEO?e.thumbnailSrc:null},a.render=function(){var e=this,t=this.props,n=t.items,r=t.className,a=t.autoplayInterval,o=t.paused,i=this.state,l=i.currentIndex,u=i.playingVideo,d=i.hasInteracted;return C(p.default,{pauseOnHover:!0,onInterval:this.autoNext,interval:a,className:r,disable:u||d||o},void 0,this.renderCarousel(),C("div",{className:h.default.pagination},void 0,C(s.default,{renderItem:this.renderPaginationItem,scrollToPadding:85,items:n,selectedIndex:l,onSetItem:function(t){return e.setItem(t,!0)},paginationContainerClass:h.default.scroller,align:n.length<6?s.default.Align.LEFT:s.default.Align.CENTER})))},r}(a.PureComponent);j.displayName="MediaCarousel",j.defaultProps={autoplayInterval:8e3,paused:!1};var k=(0,l.default)(j);t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CarouselNext=t.CarouselPrevious=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(9066)),l=d(n(29)),u=n(468),s=d(n(7872));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y={CENTER:s.default.alignCenter,LEFT:s.default.alignLeft},m=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._scrollerRef=null,t._paginationItemRefs=[],t.handleSetScrollerRef=function(e){t._scrollerRef=e},t.handleSelectedIndexChange=function(e){var n=t._scrollerRef;if(null!=n){var r=t._paginationItemRefs[e];null!=r&&n.scrollIntoViewNode({node:r,animate:!0,padding:t.props.scrollToPadding})}},t.handlePageClick=function(e){(0,t.props.onSetItem)(e)},t}p(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){var t=this.props.selectedIndex;e.selectedIndex!==t&&this.handleSelectedIndexChange(t)},n.render=function(){var e=this,t=this.props,n=t.renderItem,r=t.items,i=t.vertical,l=t.paginationContainerClass,d=t.align,f=i?s.default.verticalPaginationItemContainer:s.default.horizontalPaginationItemContainer;return a.createElement(u.AdvancedScrollerAuto,{orientation:i?"vertical":"horizontal",className:(0,o.default)(f,l,d),ref:this.handleSetScrollerRef},r.map((function(t,r){return a.cloneElement(n(t,r),{onClick:function(){return e.handlePageClick(r)},key:r,ref:function(t){e._paginationItemRefs[r]=t}})})))},t}(a.PureComponent);m.displayName="CarouselPaginationStrip",m.Align=y,m.defaultProps={scrollToPadding:{top:0,left:0,bottom:0,right:0},align:y.CENTER};var _=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePrevClick=function(e){e.stopPropagation(),e.preventDefault();var n=t.props.onClick;n&&n(e)},t}return p(t,e),t.prototype.render=function(){var e=this.props.className;return c(l.default,{look:l.default.Looks.BLANK,size:l.default.Sizes.NONE,className:(0,o.default)(s.default.prevButtonContainer,e),onClick:this.handlePrevClick},void 0,c(i.default,{className:s.default.arrow,direction:i.default.Directions.LEFT}))},t}(a.PureComponent);t.CarouselPrevious=_,_.displayName="CarouselPrevious";var h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleNextClick=function(e){e.stopPropagation(),e.preventDefault();var n=t.props.onClick;n&&n(e)},t}return p(t,e),t.prototype.render=function(){var e=this.props.className;return c(l.default,{look:l.default.Looks.BLANK,size:l.default.Sizes.NONE,className:(0,o.default)(s.default.nextButtonContainer,e),onClick:this.handleNextClick},void 0,c(i.default,{className:s.default.arrow,direction:i.default.Directions.RIGHT}))},t}(a.PureComponent);t.CarouselNext=h,h.displayName="CarouselNext";var E=m;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ArrowDirections=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=s(n(9)),l=s(n(9237)),u=s(n(7871));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={UP:"up",RIGHT:"right",DOWN:"down",LEFT:"left"};t.ArrowDirections=p;var v=((r={})[p.UP]=u.default.up,r[p.RIGHT]=u.default.right,r[p.DOWN]=u.default.down,r[p.LEFT]=u.default.left,r),y=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.onClick,a=t.className;return f(l.default,{className:(0,i.default)(u.default.arrow,a,(e={},e[v[n]]=!0,e)),onClick:r})},r}(o.PureComponent);y.displayName="Arrow",y.Directions=p;var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MessageStyles=void 0;var r,a=p(n(0)),o=f(n(133)),i=f(n(3)),l=f(n(2)),u=p(n(5672)),s=f(n(8634)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=(0,o.default)({SHORT:null,LONG:null});t.MessageStyles=m;var _=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.getText=function(e,t){if(429===e.status)switch(t){case m.SHORT:return d.default.Messages.APPLICATION_STORE_LISTING_PURCHASE_RATE_LIMIT_ERROR_SHORT;case m.LONG:return d.default.Messages.APPLICATION_STORE_LISTING_PURCHASE_RATE_LIMIT_ERROR}switch(t){case m.SHORT:return d.default.Messages.APPLICATION_STORE_LISTING_PURCHASE_GENERIC_ERROR_SHORT;case m.LONG:return d.default.Messages.APPLICATION_STORE_LISTING_PURCHASE_GENERIC_ERROR}},a.componentWillUnmount=function(){this.props.purchaseError&&l.default.wait((function(){return u.clearPurchaseError()}))},a.render=function(){var e=this.props,t=e.className,n=e.purchaseError,r=e.messageStyle;return null==n?null:v("div",{className:t},void 0,this.getText(n,r))},r}(a.PureComponent);_.displayName="ApplicationStorePurchaseError",_.defaultProps={messageStyle:m.LONG};var h=i.default.connectStores([s.default],(function(){return{purchaseError:s.default.error}}))(_);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=n(131),l=d(n(24)),u=n(8289),s=d(n(8132));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.errors;return a.createElement(a.Fragment,null,t.map((function(e,t){return c(l.default,{size:l.default.Sizes.SIZE_12,color:l.default.Colors.STATUS_RED,className:s.default.errorMessage},t,e.replace(/[0-9.,]+ ?kb/g,(function(e){var t=1024*parseInt(e,10);return isNaN(t)?e:(0,u.sizeString)(t)})))})))}function v(e){var t=e.title,n=e.description,r=e.children,a=e.className,l=e.errors;return c("div",{className:(0,o.default)(s.default.customizationSection,a)},void 0,c(i.FormTitle,{},void 0,t),null!=n?c(i.FormText,{type:i.FormText.Types.DESCRIPTION,className:s.default.sectionDescription},void 0,n):null,r,null!=l&&c(p,{errors:l}))}v.displayName="CustomizationSection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SETTINGS_LAYERS_LAYOUT=void 0;var r=l(n(719)),a=n(121),o=l(n(9018)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=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}).apply(this,arguments)}var s=u({POP_LAYER:{binds:["esc"],global:!0,action:function(){return a.ComponentDispatch.hasSubscribers(i.ComponentActions.CALL_DECLINE)?(a.ComponentDispatch.dispatch(i.ComponentActions.CALL_DECLINE),!1):!r.default.close()&&(a.ComponentDispatch.hasSubscribers(i.ComponentActions.POPOUT_CLOSE)?(a.ComponentDispatch.dispatch(i.ComponentActions.POPOUT_CLOSE),!1):a.ComponentDispatch.hasSubscribers(i.ComponentActions.MODAL_CLOSE)?(a.ComponentDispatch.dispatch(i.ComponentActions.MODAL_CLOSE),!1):void a.ComponentDispatch.dispatch(i.ComponentActions.LAYER_POP_ESCAPE_KEY))}}},o.default);t.SETTINGS_LAYERS_LAYOUT=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(24)),i=l(n(7906));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.children,n=e.className;return s(o.default,{color:o.default.Colors.CUSTOM,className:(0,a.default)(i.default.title,n),size:o.default.Sizes.SIZE_14},void 0,t)}d.displayName="PanelTitle"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Link=t.Header=t.Application=t.User=t.GroupDM=t.Channel=t.Guild=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(5937),i=n(180),l=n(8328),u=n(1338),s=I(n(70)),d=I(n(160)),f=I(n(12)),c=I(n(8961)),p=I(n(61)),v=I(n(477)),y=I(n(371)),m=I(n(8409)),_=I(n(10238)),h=I(n(736)),E=I(n(1221)),g=I(n(279)),S=I(n(6)),O=I(n(7907));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(e){e.preventDefault();var n=t.props.onClick,r=b(t).node;null!=r&&n(e,r)},t.handleMouseEnter=function(e){var n=t.props.onMouseEnter,r=b(t).node;null!=r&&n(e,r)},t.setRef=function(e){t.node=e},t}M(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.focused,n=e.onFocus,r=this.node;t&&null!=r&&n(r)},n.componentDidUpdate=function(e){var t=this.props,n=t.focused,r=t.onFocus,a=this.node;null!=a&&n&&!e.focused&&r(a)},n.render=function(){var e=this.props,t=e.focused,n=e.children,r=e.score,a=e.onContextMenu;return C(p.default,{focusProps:{enabled:!1},tabIndex:-1,innerRef:this.setRef,className:t?O.default.resultFocused:O.default.resultDefault,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onContextMenu:a},void 0,n,null!=r?C("div",{className:O.default.score},void 0,r>>0):null)},t}(a.PureComponent);A.displayName="Result";var P=function(e){function t(){return e.apply(this,arguments)||this}M(t,e);var n=t.prototype;return n.renderIcon=function(){var e=this.props.guild;return C("div",{className:O.default.guildIconContainer},void 0,C(y.default,{tabIndex:-1,guild:e,size:y.default.Sizes.MINI,className:O.default.guildIcon}))},n.renderName=function(){var e=this.props.guild;return C("div",{className:O.default.name},void 0,C("span",{className:O.default.match},void 0,e.name))},n.renderContent=function(){var e=this.props,t=e.unread,n=e.children;return C("div",{className:t?O.default.contentUnread:O.default.contentDefault},void 0,this.renderIcon(),this.renderName(),C("div",{className:O.default.misc},void 0,n))},n.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,r=e.onFocus,a=e.onContextMenu,o=e.focused,i=e.score;return C(A,{onMouseEnter:t,onClick:n,onFocus:r,onContextMenu:a,focused:o,score:i},void 0,this.renderContent())},t}(a.Component);t.Guild=P,P.displayName="Guild";var R=function(e){function t(){return e.apply(this,arguments)||this}M(t,e);var n=t.prototype;return n.renderIcon=function(){var e=this.props.channel,t=(0,l.getChannelIconComponent)(e);return null==t?null:C("div",{className:O.default.iconContainer},void 0,C(t,{className:O.default.icon,width:16,height:16}))},n.renderName=function(){var e,t,n=this.props,r=n.mentions,a=n.category,o=n.channel;return null!=r&&r>0&&(e=C(c.default,{className:O.default.badge,value:r})),null!=a&&(t=C("span",{className:O.default.note},void 0,(0,i.computeChannelName)(a,f.default,s.default))),C("div",{className:O.default.name},void 0,C("span",{className:O.default.match},void 0,(0,i.computeChannelName)(o,f.default,s.default)),e,this.renderVoiceStates(),t)},n.renderVoiceStates=function(){var e=this.props,t=e.voiceStates,n=e.channel;return null==t?null:C(m.default,{guildId:n.guild_id,users:t.map((function(e){return{user:e.user}})),max:4})},n.renderContent=function(){var e=this.props,t=e.unread,n=e.mentions,r=e.children;return C("div",{className:t||null!=n&&n>0?O.default.contentUnread:O.default.contentDefault},void 0,this.renderIcon(),this.renderName(),C("div",{className:O.default.misc},void 0,r))},n.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,r=e.onFocus,a=e.onContextMenu,o=e.focused,i=e.score;return C(A,{onMouseEnter:t,onClick:n,onFocus:r,onContextMenu:a,focused:o,score:i},void 0,this.renderContent())},t}(a.Component);t.Channel=R,R.displayName="Channel",R.defaultProps={unread:!1};var L=function(e){function t(){return e.apply(this,arguments)||this}M(t,e);var n=t.prototype;return n.renderIcon=function(){var e=this.props.channel;return C("div",{className:O.default.dmIconContainer},void 0,C(g.default,{src:(0,o.getChannelIconURL)(e),size:g.default.Sizes.SIZE_24,className:O.default.avatarSizeOverride,"aria-label":(0,i.computeChannelName)(e,f.default,s.default)}))},n.renderName=function(){var e,t=this.props,n=t.mentions,r=t.channel;return null!=n&&n>0&&(e=C(c.default,{className:O.default.badge,value:n})),C("div",{className:O.default.name},void 0,C("span",{className:O.default.match},void 0,(0,i.computeChannelName)(r,f.default,s.default)),e)},n.renderContent=function(){var e=this.props,t=e.mentions,n=e.children;return C("div",{className:null!=t&&t>0?O.default.contentUnread:O.default.contentDefault},void 0,this.renderIcon(),this.renderName(),C("div",{className:O.default.misc},void 0,n))},n.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,r=e.onFocus,a=e.onContextMenu,o=e.focused,i=e.score;return C(A,{onMouseEnter:t,onClick:n,onFocus:r,onContextMenu:a,focused:o,score:i},void 0,this.renderContent())},t}(a.Component);t.GroupDM=L,L.displayName="GroupDM";var D=function(e){function t(){return e.apply(this,arguments)||this}M(t,e);var n=t.prototype;return n.renderIcon=function(){var e=this.props.user;return C("div",{className:O.default.iconContainer},void 0,C(g.default,{src:e.getAvatarURL(void 0),"aria-label":e.username,size:g.default.Sizes.SIZE_24,className:O.default.avatarSizeOverride}))},n.renderName=function(){var e,t,n=this.props,r=n.user,a=n.comparator,o=n.mentions,i=n.nickname;if(null!=o&&o>0&&(e=C(c.default,{className:O.default.badge,value:o})),null!=a&&a===r.tag){var l=a.split("#");l.pop(),t=l.join("#")}else t=a||r.username;return t===r.username&&(t=i||t),C("div",{className:O.default.name},void 0,C("span",{className:O.default.match},void 0,t),e,C("span",{className:O.default.username},void 0,d.default.hidePersonalInformation?r.username:r.tag))},n.renderContent=function(){var e=this.props,t=e.children,n=e.mentions;return C("div",{className:null!=n&&n>0?O.default.contentUnread:O.default.contentDefault},void 0,this.renderIcon(),this.renderName(),C("div",{className:O.default.misc},void 0,t))},n.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,r=e.onFocus,a=e.onContextMenu,o=e.focused,i=e.score;return C(A,{onMouseEnter:t,onClick:n,onFocus:r,onContextMenu:a,focused:o,score:i},void 0,this.renderContent())},t}(a.Component);t.User=D,D.displayName="User";var w=function(e){function t(){return e.apply(this,arguments)||this}M(t,e);var n=t.prototype;return n.renderContent=function(){var e=this.props,t=e.children,n=e.application;return C("div",{className:O.default.contentDefault},void 0,C("div",{className:O.default.iconContainer},void 0,C(v.default,{tabIndex:-1,className:O.default.gameIcon,game:n,size:O.default.gameIconSize})),n.name,C("div",{className:O.default.misc},void 0,t))},n.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,r=e.onFocus,a=e.focused;return C(A,{onMouseEnter:t,onClick:n,onFocus:r,focused:a},void 0,this.renderContent())},t}(a.Component);t.Application=w,w.displayName="Application";var j=function(e){function t(){return e.apply(this,arguments)||this}return M(t,e),t.prototype.render=function(){return C("div",{className:O.default.resultDefault},void 0,C("div",{className:O.default.contentDefault},void 0,C("div",{className:O.default.header},void 0,this.props.children)))},t}(a.Component);t.Header=j,j.displayName="Header";var k=C(h.default,{width:16,height:16}),U=C(_.default,{width:16,height:16}),G=C(E.default,{width:16,height:16}),F=function(e){function t(){return e.apply(this,arguments)||this}M(t,e);var n=t.prototype;return n.renderContent=function(){var e,t,n=this.props,r=n.link,a=n.children,o=(0,u.tryParseChannelPath)(r.path);return null==o||void 0===o.messageId?(e=S.default.Messages.QUICKSWITCHER_LINK_UNKNOWN,t=k):(0,u.isAccessibleChannelPath)(o)?(e=S.default.Messages.QUICKSWITCHER_LINK_MESSAGE,t=U):(e=S.default.Messages.QUICKSWITCHER_LINK_NO_ACCESS,t=G),C("div",{className:O.default.contentDefault},void 0,C("div",{className:O.default.iconContainer},void 0,t),e,C("div",{className:O.default.misc},void 0,a))},n.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,r=e.onFocus,a=e.onContextMenu,o=e.focused,i=e.score;return C(A,{onMouseEnter:t,onClick:n,onFocus:r,onContextMenu:a,focused:o,score:i},void 0,this.renderContent())},t}(a.Component);t.Link=F,F.displayName="Link"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(29)),o=u(n(24)),i=u(n(6)),l=u(n(8193));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.closePopout,n=e.body,r=e.header;return d("div",{className:l.default.container},void 0,d("div",{className:l.default.content},void 0,d("div",{className:l.default.art}),d(o.default,{className:l.default.headerText,size:o.default.Sizes.SIZE_16,color:o.default.Colors.CUSTOM},void 0,r),null==n?null:d(o.default,{className:l.default.bodyText,size:o.default.Sizes.SIZE_14,color:o.default.Colors.CUSTOM},void 0,n),d(a.default,{className:l.default.button,size:a.default.Sizes.MAX,onClick:t,color:a.default.Colors.WHITE},void 0,i.default.Messages.EMBEDDED_ACTIVITIES_MARKETING_TOOLTIP_CTA),d("div",{className:l.default.pointer})))}f.displayName="EmbeddedActivitiesMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldNotify=function(e,t,n,r){void 0===n&&(n=!0);void 0===r&&(r=!1);var a=p.default.getChannel(t),o=g.default.getCurrentUser(),i=g.default.getUser(e.author.id);if(null==a||null==o||null==i)return!1;if(!b(o,i,a,r))return!1;if(!n){var u=m.default.getChannelId(_.default.getGuildId());if(u===a.id)return!1;if(c.default.getCurrentThreadId(u)===a.id)return!1}if(f.THREAD_CHANNEL_TYPES.has(a.type)){var v=(0,d.computeThreadNotificationSetting)(a);return v!==s.ThreadMemberFlags.NO_MESSAGES&&(v===s.ThreadMemberFlags.ALL_MESSAGES||(0,l.isRawMessageMentioned)(e,o.id,!1,!1))}if(E.default.allowAllMessages(a))return!0;var y=E.default.isSuppressEveryoneEnabled(a.getGuildId()),h=E.default.isSuppressRolesEnabled(a.getGuildId());return(0,l.isRawMessageMentioned)(e,o.id,y,h)},t.shouldNotifyVoiceStatus=function(e,t){var n=g.default.getCurrentUser();return null!=n&&b(n,e,t)},t.makeTextChatNotification=function(e,t,n){var o,l=S.default.getName(e.getGuildId(),e.id,n),s=l;switch(e.type){case I.ChannelTypes.GUILD_ANNOUNCEMENT:case I.ChannelTypes.GUILD_TEXT:case I.ChannelTypes.ANNOUNCEMENT_THREAD:case I.ChannelTypes.PUBLIC_THREAD:case I.ChannelTypes.PRIVATE_THREAD:var d=p.default.getChannel(e.parent_id);if((0,u.default)(t))null!=v.default.getGuild(e.getGuildId())&&(s=M(s,e,d));else s=M(s,e,d);break;case I.ChannelTypes.GROUP_DM:e.isManaged()&&n.bot&&s===(0,r.computeChannelName)(e,g.default,y.default)||(s=s+" ("+(0,r.computeChannelName)(e,g.default,y.default,!0)+")")}var f=t.content;if((0,u.default)(t)&&null==(f=O.default.stringify(t)))throw new a.default("NotificationTextUtils").warn("SystemMessageUtils.stringify(...) could not convert",t),new Error("failed to stringify system message");var c,m=null!==(o=t.sticker_items)&&void 0!==o?o:t.stickers;if(null!=t.activity&&null!=t.application)c=t.activity.type===I.ActivityActionTypes.JOIN?N(e,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_GUILD_ACTIVITY_JOIN,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_GROUP_DM_ACTIVITY_JOIN,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN).format({user:l,game:t.application.name}):t.activity.type===I.ActivityActionTypes.JOIN_REQUEST?N(e,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST).format({user:l,game:t.application.name}):"";else if(null!=t.activity&&t.activity.type===I.ActivityActionTypes.LISTEN){var _=N(e,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_GUILD_ACTIVITY_LISTEN,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_GROUP_DM_ACTIVITY_LISTEN,T.default.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_LISTEN);c=_.format({user:l})}else c=null!=m&&m.length>0?T.default.Messages.STICKER_NOTIFICATION_BODY.format({stickerName:m[0].name}):i.default.unparse(f,e.id,!0);if(!c.length&&t.attachments.length){var h=t.attachments[0].filename;c=T.default.Messages.NOTIFICATION_BODY_ATTACHMENT.format({filename:h})}if(!c.length&&t.embeds.length){var E=t.embeds[0];if(null!=E.description)c=null!=E.title?E.title+": "+E.description:E.description;else if(null!=E.title)c=E.title;else if(null!=E.fields){var C=E.fields[0];c=C.name+": "+C.value}}return{icon:n.getAvatarURL(e.guild_id),title:s,body:c}};var r=n(180),a=C(n(26)),o=C(n(182)),i=C(n(1216)),l=n(747),u=C(n(685)),s=n(392),d=n(8473),f=n(31),c=C(n(1268)),p=C(n(10)),v=C(n(15)),y=C(n(70)),m=C(n(36)),_=C(n(107)),h=C(n(479)),E=C(n(181)),g=C(n(12)),S=C(n(258)),O=C(n(8659)),I=n(1),T=C(n(6));function C(e){return e&&e.__esModule?e:{default:e}}function b(e,t,n,r){if(void 0===r&&(r=!1),n.isManaged())return!1;var a=n.getGuildId();return(null==a||!o.default.isLurking(a))&&(t.id!==e.id&&(!y.default.isBlocked(t.id)&&(!(!r&&h.default.getStatus()===I.StatusTypes.DND)&&!E.default.allowNoMessages(n))))}var M=function(e,t,n){return e+" ("+(0,r.computeChannelName)(t,g.default,y.default,!0)+(null!=n?", "+(0,r.computeChannelName)(n,g.default,y.default):"")+")"};function N(e,t,n,r){switch(e.type){case I.ChannelTypes.GUILD_ANNOUNCEMENT:case I.ChannelTypes.GUILD_TEXT:return t;case I.ChannelTypes.GROUP_DM:return n;case I.ChannelTypes.DM:default:return r}}},,,,,,,,,,,,function(e,t,n){e.exports=n.p+"4b25b64915cb0e74934b6b749445def2.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useChannelPromptSlide=C,t.default=function(e){return C(e).content};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=S(n(391)),l=n(275),u=S(n(86)),s=S(n(15)),d=S(n(29)),f=S(n(55)),c=S(n(371)),p=S(n(153)),v=n(85),y=n(131),m=n(35),_=S(n(47)),h=S(n(24)),E=S(n(6)),g=S(n(7413));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(e){var t=e.createdGuildId,n=e.hasFooter,r=void 0===n||n,S=e.onClose,O=e.onChannelPromptCompleted,C=e.isSlideReady,b=(0,v.useUID)(),M=a.useState(""),N=M[0],A=M[1],P=a.useState(null),R=P[0],L=P[1],D=a.useState(!1),w=D[0],j=D[1],k=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuild(t)}),[t]),U=a.useRef(null);a.useEffect((function(){var e;C&&(null===(e=U.current)||void 0===e||e.focus())}),[C]);var G=a.useCallback(function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),null!=k){e.next=3;break}return e.abrupt("return");case 3:return j(!0),L(null),n=u.default.getDefaultChannel(k.id),e.prev=6,r=E.default.Messages.NUF_CHANNEL_PROMPT_CHANNEL_TOPIC_TEMPLATE.format({topic:N}),e.next=10,i.default.createTextChannel(k.id,N,null==n?void 0:n.parent_id,r);case 10:O(),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),L(new l.V6OrEarlierAPIError(e.t0));case 16:j(!1);case 17:case"end":return e.stop()}}),e,null,[[6,13]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),[k,N,O]),F=a.createElement(a.Fragment,null,I(d.default,{color:d.default.Colors.BRAND,onClick:G,disabled:0===N.length,submitting:w},void 0,E.default.Messages.DONE),I(d.default,{className:g.default.skipButton,look:d.default.Looks.BLANK,size:d.default.Sizes.MIN,onClick:O},void 0,E.default.Messages.SKIP));return{content:a.createElement(a.Fragment,null,I(m.ModalHeader,{className:g.default.header,direction:f.default.Direction.VERTICAL,separator:!1,id:b},void 0,k&&I(c.default,{guild:k}),I(h.default,{className:g.default.guildName,color:h.default.Colors.HEADER_PRIMARY},void 0,null==k?void 0:k.name),I(_.default,{className:g.default.title},void 0,E.default.Messages.NUF_CHANNEL_PROMPT_TITLE),I(h.default,{className:g.default.subtitle,color:h.default.Colors.HEADER_SECONDARY,size:h.default.Sizes.SIZE_16},void 0,E.default.Messages.NUF_CHANNEL_PROMPT_SUBTITLE),S&&I(m.ModalCloseButton,{className:g.default.closeButton,onClick:S})),I(m.ModalContent,{className:g.default.channelPrompt},void 0,I("form",{onSubmit:G},void 0,I(y.FormItem,{title:E.default.Messages.NUF_CHANNEL_PROMPT_TOPIC,error:null==R?void 0:R.getFieldMessage("name")},void 0,I(p.default,{type:"text",value:N,onChange:A,placeholder:E.default.Messages.NUF_CHANNEL_PROMPT_TOPIC_PLACEHOLDER,inputRef:U}))),null!=R&&0===Object.keys(R.fields).length&&I(h.default,{size:h.default.Sizes.SIZE_12,color:h.default.Colors.STATUS_RED},void 0,R.message)),r&&I(m.ModalFooter,{},void 0,F)),footer:F}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCreationIntentSlide=I,t.default=function(e){return I(e).content};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=E(n(29)),l=E(n(55)),u=n(85),s=n(35),d=E(n(47)),f=E(n(24)),c=E(n(13)),p=E(n(8717)),v=n(1),y=E(n(6)),m=E(n(7415)),_=E(n(8718)),h=E(n(8719));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=Math.random()<.5;function I(e){var t=e.onClose,n=e.onBack,r=e.onCreationIntentChosen,E=e.hasFooter,g=void 0===E||E,I=(0,u.useUID)(),T=a.createElement(a.Fragment,null,S(i.default,{className:m.default.backButton,look:i.default.Looks.BLANK,size:i.default.Sizes.MIN,onClick:n},void 0,y.default.Messages.BACK));function C(e){c.default.track(v.AnalyticEvents.GUILD_CREATION_INTENT_SELECTED,{skipped:null==e,is_community:Boolean(e)}),r(Boolean(e))}return{content:a.createElement(a.Fragment,null,S(s.ModalHeader,{direction:l.default.Direction.VERTICAL,className:m.default.header,separator:!1,id:I},void 0,S(d.default,{className:(0,o.default)(m.default.title),size:d.default.Sizes.SIZE_24},void 0,y.default.Messages.CREATION_INTENT_TITLE),S(f.default,{className:m.default.subtitle,color:f.default.Colors.HEADER_SECONDARY,size:f.default.Sizes.SIZE_16},void 0,y.default.Messages.CREATION_INTENT_DESCRIPTION),t&&S(s.ModalCloseButton,{className:m.default.closeButton,onClick:t})),S(s.ModalContent,{className:m.default.optionsList},void 0,O?a.createElement(a.Fragment,null,S(p.default,{icon:_.default,message:y.default.Messages.CREATION_INTENT_OPTION_FRIENDS,onClick:function(){return C(!1)}}),S(p.default,{icon:h.default,message:y.default.Messages.CREATION_INTENT_OPTION_COMMUNITY,onClick:function(){return C(!0)}})):a.createElement(a.Fragment,null,S(p.default,{icon:h.default,message:y.default.Messages.CREATION_INTENT_OPTION_COMMUNITY,onClick:function(){return C(!0)}}),S(p.default,{icon:_.default,message:y.default.Messages.CREATION_INTENT_OPTION_FRIENDS,onClick:function(){return C(!1)}})),S(f.default,{className:m.default.skip,color:f.default.Colors.HEADER_SECONDARY,size:f.default.Sizes.SIZE_14},void 0,y.default.Messages.CREATION_INTENT_SKIP.format({onSkip:function(){return C(null)}}))),g&&S(s.ModalFooter,{justify:l.default.Justify.BETWEEN},void 0,T)),footer:T}}},function(e,t,n){e.exports=n.p+"69a0ea5dbf79a129c81a0cb171b60b7a.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.className,n=e.isNewUser,r=e.onClose,v=e.onChooseTemplate,y=e.onJoin,h=(0,s.useUID)(),E=(0,p.getGuildTemplatesMap)();i.default.trackExposure({});var O=i.default.useExperiment({})[0].reorderTemplates;return a.createElement(a.Fragment,null,g(d.ModalHeader,{direction:u.default.Direction.VERTICAL,className:_.default.header,separator:!1,id:h},void 0,g(f.default,{className:_.default.title,size:f.default.Sizes.SIZE_24},void 0,n?m.default.Messages.NUF_DESKTOP_TEMPLATES_TITLE:m.default.Messages.CREATE_GUILD_WITH_TEMPLATES_TITLE),g(c.default,{className:_.default.subtitle,color:c.default.Colors.HEADER_SECONDARY,size:c.default.Sizes.SIZE_16},void 0,m.default.Messages.NUF_DESKTOP_TEMPLATES_SUBTITLE),r&&g(d.ModalCloseButton,{className:_.default.closeButton,onClick:r})),g(d.ModalContent,{className:(0,o.default)(_.default.templatesList,t),paddingFix:!1},void 0,g(S,{guildTemplate:E[p.GuildTemplateId.CREATE],onClick:v,autoFocus:!0}),g(c.default,{className:_.default.optionHeader,color:c.default.Colors.HEADER_SECONDARY,size:c.default.Sizes.SIZE_12},void 0,m.default.Messages.GUILD_TEMPLATE_SELECTOR_OPTION_HEADER),O?a.createElement(a.Fragment,null,g(S,{guildTemplate:E[p.GuildTemplateId.GAMING],onClick:v}),g(S,{guildTemplate:E[p.GuildTemplateId.SCHOOL_CLUB],onClick:v}),g(S,{guildTemplate:E[p.GuildTemplateId.STUDY],onClick:v}),g(S,{guildTemplate:E[p.GuildTemplateId.FRIENDS],onClick:v})):a.createElement(a.Fragment,null,g(S,{guildTemplate:E[p.GuildTemplateId.GAMING],onClick:v}),g(S,{guildTemplate:E[p.GuildTemplateId.FRIENDS],onClick:v}),g(S,{guildTemplate:E[p.GuildTemplateId.STUDY],onClick:v})),g(S,{guildTemplate:E[p.GuildTemplateId.CREATORS],onClick:v}),O?null:g(S,{guildTemplate:E[p.GuildTemplateId.CLUBS],onClick:v}),g(S,{guildTemplate:E[p.GuildTemplateId.LOCAL_COMMUNITY],onClick:v})),y&&g(d.ModalFooter,{className:_.default.footer},void 0,g(f.default,{size:f.default.Sizes.SIZE_20,className:_.default.footerTitle},void 0,m.default.Messages.NUF_HAVE_AN_INVITE_ALREADY),g(l.default,{className:_.default.footerButton,color:l.default.Colors.GREY,onClick:y},void 0,m.default.Messages.JOIN_SERVER_TITLE)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(9266)),l=h(n(29)),u=h(n(55)),s=n(85),d=n(35),f=h(n(47)),c=h(n(24)),p=n(9090),v=n(9267),y=h(n(8717)),m=h(n(6)),_=h(n(7420));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e){var t=e.guildTemplate,n=e.onClick,r=e.autoFocus,o=a.useCallback((function(){n(t)}),[t,n]);return g(y.default,{icon:v.GUILD_TEMPLATE_ICONS[t.id],message:t.label,onClick:o,autoFocus:r})}S.displayName="GuildTemplatesItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuildTemplatesMap=function(){var e;return(e={})[r.CREATE]={id:r.CREATE,code:"2TffvPucqHkN",label:l.default.Messages.GUILD_TEMPLATE_HEADER_CREATE,channels:[],system_channel_id:null},e[r.GAMING]={id:r.GAMING,code:"hvtBQMfw6uSJ",label:l.default.Messages.GUILD_TEMPLATE_HEADER_GAMING,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_CLIPS_AND_HIGHLIGHTS,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOBBY,type:i.ChannelTypes.GUILD_VOICE},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_GAMING,type:i.ChannelTypes.GUILD_VOICE}],system_channel_id:"01"},e[r.FRIENDS]={id:r.FRIENDS,code:"hgM48av5Q69A",label:l.default.Messages.GUILD_TEMPLATE_HEADER_FRIEND,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_GAME,type:i.ChannelTypes.GUILD_TEXT},{id:"03",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_MUSIC,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:i.ChannelTypes.GUILD_VOICE},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STREAM_ROOM,type:i.ChannelTypes.GUILD_VOICE}],system_channel_id:"01"},e[r.STUDY]={id:r.STUDY,code:"FbwUwRp4j8Es",label:l.default.Messages.GUILD_TEMPLATE_HEADER_STUDY,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFORMATION,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_WELCOME_AND_RULES,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_NOTES_RESOURCES,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_HOMEWORK_HELP,type:i.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_SESSION_PLANNING,type:i.ChannelTypes.GUILD_TEXT},{id:"14",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:i.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:i.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:1}),type:i.ChannelTypes.GUILD_VOICE},{id:"23",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:2}),type:i.ChannelTypes.GUILD_VOICE}],system_channel_id:"11"},e[r.CLUBS]={id:r.CLUBS,code:"s4WNnBxTDPsY",label:l.default.Messages.GUILD_TEMPLATE_HEADER_CLUBS,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFORMATION,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_WELCOME_AND_RULES,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_ANNOUNCEMENTS,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_MEETING_PLANS,type:i.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:i.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MEETING_ROOM,type:i.ChannelTypes.GUILD_VOICE}],system_channel_id:"11"},e[r.CREATORS]={id:r.CREATORS,code:"6exdzMgjZgah",label:l.default.Messages.GUILD_TEMPLATE_HEADER_CREATOR,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFORMATION,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_WELCOME_AND_RULES,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_ANNOUNCEMENTS,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_EVENTS,type:i.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_IDEAS_AND_FEEDBACK,type:i.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:i.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_COMMUNITY_HANGOUT,type:i.ChannelTypes.GUILD_VOICE},{id:"23",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STREAM_ROOM,type:i.ChannelTypes.GUILD_VOICE}],system_channel_id:"11"},e[r.LOCAL_COMMUNITY]={id:r.LOCAL_COMMUNITY,code:"64UDvRNCC52Y",label:l.default.Messages.GUILD_TEMPLATE_HEADER_COMMUNITY,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFORMATION,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_WELCOME_AND_RULES,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_ANNOUNCEMENTS,type:i.ChannelTypes.GUILD_TEXT},{id:"03",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_RESOURCES,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_MEETING_PLANS,type:i.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:i.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:i.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MEETING_ROOM,type:i.ChannelTypes.GUILD_VOICE}],system_channel_id:"11"},e[r.SCHOOL_CLUB]={id:r.SCHOOL_CLUB,code:"Ctg7PUHcQmZu",label:l.default.Messages.GUILD_TEMPLATE_HEADER_SCHOOL_CLUB,channels:[{id:"00",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFORMATION,type:i.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_WELCOME_AND_RULES,type:i.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_ANNOUNCEMENTS,type:i.ChannelTypes.GUILD_TEXT},{id:"03",parent_id:"00",name:l.default.Messages.GUILD_TEMPLATE_NAME_RESOURCES,type:i.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:i.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:i.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_MEETING_PLANS,type:i.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:l.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:i.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:l.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:i.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:i.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MEETING_ROOM_1,type:i.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:l.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MEETING_ROOM_2,type:i.ChannelTypes.GUILD_VOICE}],roles:[{id:"00",name:"@everyone",permissions:o.default.DEFAULT},{id:"01",name:"officers (example)",mentionable:!0,hoist:!0,permissions:a.default.combine(o.default.DEFAULT,i.Permissions.MANAGE_ROLES,i.Permissions.MANAGE_CHANNELS,i.Permissions.KICK_MEMBERS,i.Permissions.BAN_MEMBERS,i.Permissions.MANAGE_NICKNAMES,i.Permissions.MANAGE_EMOJIS,i.Permissions.MANAGE_MESSAGES,i.Permissions.SEND_TTS_MESSAGES),color:3066993}],system_channel_id:"11"},e},t.GuildTemplateId=void 0;var r,a=u(n(63)),o=u(n(78)),i=n(1),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}t.GuildTemplateId=r,function(e){e.CREATE="CREATE",e.GAMING="GAMING",e.FRIENDS="FRIENDS",e.STUDY="STUDY",e.CLUBS="CLUBS",e.CREATORS="CREATORS",e.LOCAL_COMMUNITY="LOCAL_COMMUNITY",e.SCHOOL_CLUB="SCHOOL_CLUB"}(r||(t.GuildTemplateId=r={}))},function(e,t,n){e.exports=n.p+"d149a7d17b8c891a36059af8d4108813.svg"},function(e,t,n){e.exports=n.p+"79516499036b21acd5f56ccba0635c38.svg"},function(e,t,n){e.exports=n.p+"6670414aa93c6a4b3b5c7f57ead40533.svg"},function(e,t,n){e.exports=n.p+"b13e5fb6748d48b8d32a0a7b720d3a31.svg"},function(e,t,n){e.exports=n.p+"8ea6fb273c261048c7cfb159b0bd286e.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=s(n(61)),i=s(n(683)),l=s(n(24)),u=s(n(7423));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.options,n=e.onClick,r=e.className,s=e.optionClassName;return f("div",{className:(0,a.default)(u.default.root,r)},void 0,t.map((function(e,t){return f(o.default,{onClick:function(){return n(e)},className:(0,a.default)(u.default.option,s)},t,f(l.default,{className:u.default.text,color:l.default.Colors.CUSTOM,size:l.default.Sizes.SIZE_16},void 0,e.label),f(i.default,{className:u.default.caret,direction:i.default.Directions.RIGHT}))})))}c.displayName="ChoiceButtonList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shuffleProblems=void 0;var r,a=(r=n(8))&&r.__esModule?r:{default:r};t.shuffleProblems=function(e,t){var n=a.default.shuffle(e),r=n.findIndex((function(e){return e.value===t}));if(r>-1){var o=n[r];n.splice(r,1),n.push(o)}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return[{value:a.StreamIssueReportReasons.BLACK_SCREEN,label:t?o.default.Messages.STREAM_REPORT_ENDED_BLACK:o.default.Messages.STREAM_REPORT_BLACK},{value:a.StreamIssueReportReasons.BLURRY,label:t?o.default.Messages.STREAM_REPORT_ENDED_BLURRY:o.default.Messages.STREAM_REPORT_BLURRY},{value:a.StreamIssueReportReasons.LAGGING,label:t?o.default.Messages.STREAM_REPORT_ENDED_LAGGING:o.default.Messages.STREAM_REPORT_LAGGING},{value:a.StreamIssueReportReasons.OUT_OF_SYNC,label:t?o.default.Messages.STREAM_REPORT_ENDED_OUT_OF_SYNC:o.default.Messages.STREAM_REPORT_OUT_OF_SYNC},{value:a.StreamIssueReportReasons.AUDIO_MISSING,label:t?o.default.Messages.STREAM_REPORT_ENDED_AUDIO_MISSING:o.default.Messages.STREAM_REPORT_AUDIO_MISSING},{value:a.StreamIssueReportReasons.AUDIO_POOR,label:t?o.default.Messages.STREAM_REPORT_ENDED_AUDIO_POOR:o.default.Messages.STREAM_REPORT_AUDIO_POOR},{value:a.StreamIssueReportReasons.STREAM_STOPPED,label:o.default.Messages.STREAM_REPORT_ENDED_STREAM_STOPPED_UNEXPECTEDLY},{value:a.StreamIssueReportReasons.OTHER,label:o.default.Messages.CALL_FEEDBACK_OPTION_OTHER}]};var r,a=n(196),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,l,u,s){void 0===s&&(s=null);a.default.track(o.AnalyticEvents.STREAM_REPORT_PROBLEM,i({reason:e,streamer_user_id:t.ownerId,stream_channel_id:t.channelId,guild_id:t.guildId,application_id:null!=r?r.id:null,application_name:null!=r?r.name:null,location:u,rating:s,feedback:n},l))};var r,a=(r=n(13))&&r.__esModule?r:{default:r},o=n(1);function i(){return(i=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8494),i=s(n(9270)),l=s(n(9272)),u=s(n(9273));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.onClose,n=e.invite,r=a.useState(o.HubEmailConnectionSteps.VERIFY_EMAIL),s=r[0],d=r[1],c=a.useState(""),p=c[0],v=c[1];switch(s){case o.HubEmailConnectionSteps.VERIFY_EMAIL:return f(l.default,{setStep:d,email:p,setEmail:v,invite:n});case o.HubEmailConnectionSteps.EMAIL_CONFIRMATION:return f(i.default,{setStep:d,email:p,onClose:t});case o.HubEmailConnectionSteps.EMAIL_WAITLIST:return f(u.default,{setStep:d});default:return null}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(24)),o=l(n(6)),i=l(n(7426));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(){return s("div",{className:i.default.container},void 0,s("div",{className:i.default.iconContainer},void 0,s("div",{className:i.default.icon})),s(a.default,{strong:!0,color:a.default.Colors.HEADER_PRIMARY,size:a.default.Sizes.SIZE_20,className:i.default.header},void 0,o.default.Messages.HUB_EMAIL_CONNECTION_SIDEBAR_HEADER),s(a.default,{color:a.default.Colors.HEADER_SECONDARY,size:a.default.Sizes.SIZE_14,className:i.default.description},void 0,o.default.Messages.HUB_EMAIL_CONNECTION_SIDEBAR_DESCRIPTION.format()))};d.displayName="HubEmailConnectionSidebar";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(29)),l=p(n(8800)),u=p(n(8276)),s=p(n(8724)),d=p(n(9284)),f=p(n(6)),c=p(n(7435));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._mediaBar=a.createRef(),t.state={hovered:!1,focused:!1,dragging:!1},t.handleValueChange=function(e){var n=t.props,r=n.maxValue,a=n.onValueChange;null==a||a(e*r)},t.handleToggleMute=function(){var e=t.props.onToggleMute;e&&e()},t.handleKeyDown=function(e){var n=t.props,r=n.minValue,a=n.value,o=n.maxValue,i=n.onValueChange,l=.05*(o-r);switch(e.key){case"ArrowUp":e.stopPropagation(),e.preventDefault(),null==i||i(Math.min(o,a+l));break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),null==i||i(Math.max(r,a-l))}},t.handleDragStart=function(){t.setState({dragging:!0})},t.handleDragEnd=function(){t.setState({dragging:!1})},t.blur=function(){t.setState({focused:!1})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var p=r.prototype;return p.componentDidMount=function(){this.updateMediaBar()},p.componentDidUpdate=function(e){this.props.value===e.value&&this.props.muted===e.muted||this.updateMediaBar()},p.updateMediaBar=function(){var e=this.props,t=e.muted,n=e.value,r=e.maxValue,a=this._mediaBar.current;null!=a&&(t?a.setGrabber(0):a.setGrabber(n/r))},p.render=function(){var e,t=this,n=this.props,r=n.iconClassName,p=n.sliderWrapperClassName,v=n.sliderClassName,m=n.currentWindow,_=n.muted,h=n.minValue,E=n.maxValue,g=n.value,S=this.state,O=S.hovered,I=S.focused,T=S.dragging,C=u.default;return _||g===h?C=s.default:g<E/2&&(C=d.default),y("div",{className:c.default.volumeButton,onMouseEnter:function(){clearTimeout(t._hoverTimeout),t.setState({hovered:!0})},onMouseLeave:function(){clearTimeout(t._hoverTimeout),t._hoverTimeout=setTimeout((function(){return t.setState({hovered:!1})}),150)},onFocus:function(){return t.setState({focused:!0})},onBlur:function(){return t.setState({focused:!1})},onKeyDown:this.handleKeyDown},void 0,y("div",{className:(0,o.default)(c.default.volumeButtonSlider,p,(e={},e[c.default.sliderVisible]=O||I||T,e)),onMouseEnter:function(){clearTimeout(t._hoverTimeout),t.setState({hovered:!0})},onMouseLeave:function(){clearTimeout(t._hoverTimeout),t._hoverTimeout=setTimeout((function(){return t.setState({hovered:!1})}),150)}},void 0,a.createElement(l.default,{sliderClassName:v,type:l.default.Types.VOLUME,value:g/E,onDrag:this.handleValueChange,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,currentWindow:m,ref:this._mediaBar})),y(i.default,{"aria-label":f.default.Messages.CONTROL_VOLUME,size:i.default.Sizes.NONE,look:i.default.Looks.BLANK,onClick:this.handleToggleMute},void 0,y(C,{className:r})))},r}(a.PureComponent);_.displayName="VolumeButton",_.defaultProps={minValue:0,maxValue:100,handleSize:16};var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M19,3H14V5h5v5h2V5A2,2,0,0,0,19,3Z"}),s("path",{className:f,fill:d,d:"M19,19H14v2h5a2,2,0,0,0,2-2V14H19Z"}),s("path",{className:f,fill:d,d:"M3,5v5H5V5h5V3H5A2,2,0,0,0,3,5Z"}),s("path",{className:f,fill:d,d:"M5,14H3v5a2,2,0,0,0,2,2h5V19H5Z"}))}d.displayName="Fullscreen"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M0,14 L4,14 L4,0 L0,0 L0,14 L0,14 Z M8,0 L8,14 L12,14 L12,0 L8,0 L8,0 Z",transform:"translate(6 5)"}))}d.displayName="Pause"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeMembers=function(e,t){a.default.dirtyDispatch({type:i.ActionTypes.GUILD_SUBSCRIPTIONS_MEMBERS_ADD,guildId:e,userIds:t})},t.unsubscribeMembers=function(e,t){a.default.dirtyDispatch({type:i.ActionTypes.GUILD_SUBSCRIPTIONS_MEMBERS_REMOVE,guildId:e,userIds:t})},t.subscribeChannel=l,t.subscribeChannelDimensions=function(e,t,n,r,a){function i(e,t){return void 0===t&&(t=0),Math.max(0,Math.ceil(Math.ceil(e/a))+t)}var u=[];function s(e){var t=e+(o.MINIMUM_RANGE-1);return u.push([e,t]),t+1}var d=i(.5*r),f=i(n,-d),c=i(n+r,d);f>0&&(f=Math.max(s(0),f));f=Math.floor(f/o.MINIMUM_RANGE)*o.MINIMUM_RANGE;for(;f<=c;)f=s(f);l(e,t,u)};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(9106),i=n(1);function l(e,t,n){a.default.dirtyDispatch({type:i.ActionTypes.GUILD_SUBSCRIPTIONS_CHANNEL,guildId:e,channelId:t,ranges:n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DEFAULT_RANGES=t.MINIMUM_RANGE=void 0;var r=o(n(8)),a=o(n(404));function o(e){return e&&e.__esModule?e:{default:e}}t.MINIMUM_RANGE=100;var i=[[0,99]];function l(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}t.DEFAULT_RANGES=i;var u=function(){function e(e){this._subscriptions={},this._onChange=e}var t=e.prototype;return t.reset=function(){this._subscriptions={}},t.get=function(e){return l(this._get(e))},t._get=function(e){return this._subscriptions[e]||new a.default({max:5})},t.clear=function(e){delete this._subscriptions[e]},t.subscribe=function(e,t,n){var a=this._get(e);return!r.default.isEqual(a.get(t),n)&&(a.set(t,n),this._subscriptions[e]=a,this._onChange(e,l(a)),!0)},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=f(n(473)),i=f(n(12)),l=n(280),u=f(n(5953)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e){var t=e.onClose,f=e.source,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClose","source"]),v=(0,a.useStateFromStores)([i.default],(function(){return i.default.getCurrentUser()})).premiumType===s.PremiumTypes.TIER_1?d.default.Messages.PREMIUM_PROFILE_CUSTOMIZATION_UPGRADE_BODY:d.default.Messages.PREMIUM_PROFILE_CUSTOMIZATION_UPSELL_BODY;return r.createElement(u.default,p({artURL:n(9303),type:l.PremiumUpsellTypes.CUSTOM_PROFILE_UPSELL,title:d.default.Messages.PREMIUM_PROFILE_CUSTOMIZATION_UPSELL_HEADER,body:v.format({onLearnMore:function(){t(),o.default.open(s.UserSettingsSections.PREMIUM,null,{openWithoutBackstack:!0})}}),premiumType:s.PremiumTypes.TIER_2,analyticsSource:f,analyticsLocation:{section:s.AnalyticsSections.CUSTOM_PROFILES_UPSELL_MODAL,object:s.AnalyticsObjects.BUTTON_CTA},onClose:t},c))}v.displayName="PremiumProfileUpsell"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(67)),i=n(3),l=p(n(9305)),u=p(n(8821)),s=p(n(160)),d=p(n(8550)),f=p(n(6)),c=p(n(7456));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).noteRef=a.createRef(),t.handleBlur=function(e){var n=e.currentTarget.value;t.props.note!==n&&l.default.updateNote(t.props.userId,n)},t.handleKeyPress=function(e){13===e.which&&(e.shiftKey?(e.currentTarget.value.match(/\n/g)||[]).length>=5&&e.preventDefault():(e.preventDefault(),e.currentTarget.blur()))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var i=r.prototype;return i.componentDidMount=function(){if(this.props.autoFocus&&!this.props.hideNote){var e=o.default.findDOMNode(this.noteRef.current);null!=e&&null!=e.selectionStart&&(e.focus(),e.selectionStart=e.selectionEnd=e.value.length)}},i.render=function(){var e=this.props,t=e.className,n=e.loading,r=e.note;return e.hideNote?null:m("div",{className:t},void 0,a.createElement(d.default,{ref:this.noteRef,className:c.default.textarea,disabled:n,placeholder:n?f.default.Messages.LOADING_NOTE:f.default.Messages.NOTE_PLACEHOLDER,onBlur:this.handleBlur,onKeyPress:this.handleKeyPress,defaultValue:r||void 0,maxLength:256}))},r}(a.PureComponent);function E(e){var t=(0,i.useStateFromStores)([s.default],(function(){return s.default.hidePersonalInformation})),n=(0,u.default)(e.userId);return a.createElement(h,y({},e,n,{hideNote:t}))}h.displayName="Note",h.defaultProps={autoFocus:!1},E.displayName="ConnectedNote"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n,r;function l(e){var n;return(n=t.call(this,e)||this)._interval=new o.Interval,n.state=u({},n.getUpdatedTime()),n}r=t,(n=l).prototype=Object.create(r.prototype),n.prototype.constructor=n,s(n,r);var f=l.prototype;return f.componentDidMount=function(){var e=this;this._interval.start(1e3,(function(){return e.setState(e.getUpdatedTime())}))},f.componentWillUnmount=function(){this._interval.stop()},f.componentDidUpdate=function(e){e.timestamps.end===this.props.timestamps.end&&e.timestamps.start===this.props.timestamps.start||this.setState(this.getUpdatedTime())},f.getUpdatedTime=function(){var e=this.props.timestamps,t=Date.now()/1e3;return null!=e.end?this.getDiff(t,d(e.end)/1e3):null!=e.start?this.getDiff(d(e.start)/1e3,t):{hours:0,minutes:0,seconds:0}},f.renderTime=function(e,t){return void 0===t&&(t=!1),t&&e<=0?-1:e<10?"0"+e:e},f.getDiff=function(e,t){var n=Math.max(t-e,0),r=Math.floor(n)%60,a=Math.floor(n/60)%60;return{hours:Math.floor(n/3600)%24,minutes:a,seconds:r}},f.render=function(){var t=this.props,n=t.timestamps,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["timestamps"]),o=this.state,l=o.hours,s=o.minutes,d=o.seconds,f={hours:this.renderTime(l,!0),minutes:this.renderTime(s),seconds:this.renderTime(d)};return null!=n.end?a.createElement(e,u({},r,{message:i.default.Messages.USER_ACTIVITY_TIMESTAMP_END.format(f)})):null!=n.start?a.createElement(e,u({},r,{message:i.default.Messages.USER_ACTIVITY_TIMESTAMP_START.format(f)})):null},l}(a.PureComponent)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(57),i=(r=n(6))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(""+e).length<13?1e3*e:e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(98)),i=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,l=void 0===r?16:r,u=e.color,f=void 0===u?"currentColor":u,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]),v=a.useRef(o.default.v4());return a.createElement("svg",s({},(0,i.default)(p),{width:n,height:l,viewBox:"0 0 24 25"}),d("g",{"clip-path":"url("+v.current+")"},void 0,d("path",{d:"M21 0.994141V3.99414H24V5.99414H21V8.99414H19V5.99414H16V3.99414H19V0.994141H21Z",fill:f,className:c}),d("path",{d:"M14 12.9941C14 14.0987 13.1046 14.9941 12 14.9941C10.8954 14.9941 10 14.0987 10 12.9941C10 11.8896 10.8954 10.9941 12 10.9941C13.1046 10.9941 14 11.8896 14 12.9941Z",fill:f,className:c}),d("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11.9941C20.6987 11.9941 21.3734 11.8918 22.0101 11.7012C22.6497 12.4666 23 12.9941 23 12.9941C23 12.9941 18.352 19.9941 12 19.9941C5.648 19.9941 1 12.9941 1 12.9941C1 12.9941 5.648 5.99414 12 5.99414C12.3661 5.99414 12.7266 6.0174 13.0808 6.06123C13.5947 9.42075 16.4968 11.9941 20 11.9941ZM8 12.9941C8 15.2041 9.791 16.9941 12 16.9941C14.209 16.9941 16 15.2041 16 12.9941C16 10.7841 14.209 8.99414 12 8.99414C9.791 8.99414 8 10.7841 8 12.9941Z",fill:f,className:c})),d("defs",{},void 0,d("clipPath",{id:v.current},void 0,d("rect",{width:"24",height:"24",fill:f,className:c,transform:"translate(0 0.994141)"}))))}f.displayName="EyeAdd"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 60 60"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M8.95185131,8.62650012 L8.92775494,8.65059649 C3.20486729,14.2891468 -0.0119979765,21.9758886 5.02080018e-05,29.9999795 C-0.0119979765,36.56624 2.14462705,42.9517778 6.13257613,48.1686417 C6.16872068,48.2168345 6.24100979,48.252979 6.28920253,48.2168345 C6.33739527,48.1806899 6.34944345,48.120449 6.32534708,48.0602081 C4.03619202,40.9879237 15.722931,23.8433572 21.7711196,16.6626392 C21.795216,16.6385428 21.8193124,16.6144465 21.8193124,16.5783019 C21.8193124,16.5421573 21.795216,16.5060128 21.7590715,16.4819164 C11.6024519,6.37348961 8.8795622,8.68674104 8.92775494,8.65059649 M51.048208,8.62650012 L51.0723044,8.65059649 C56.795192,14.2770987 60.0000091,21.9758886 59.9879609,29.9999795 C60.0000091,36.56624 57.8433841,42.9517778 53.855435,48.1686417 C53.8192905,48.2168345 53.7470014,48.252979 53.6988086,48.2168345 C53.6506159,48.1806899 53.6506159,48.120449 53.6626641,48.0602081 C55.9518191,40.9879237 44.2650801,23.831309 38.2289397,16.650591 C38.2048433,16.6264946 38.180747,16.6023983 38.180747,16.5662537 C38.180747,16.518061 38.2048433,16.4939646 38.2409879,16.4698682 C48.4096556,6.36144143 51.0964008,8.68674104 51.0602562,8.65059649 M30.0000297,0 C36.0482183,0 41.0361667,1.66264946 45.626525,4.38553917 C45.6867659,4.40963554 45.6988141,4.48192464 45.6747177,4.53011738 C45.6506214,4.57831012 45.5903804,4.5903583 45.5301395,4.57831012 C39.7229146,3.32529893 30.8915953,8.33734369 30.0602706,8.84336744 C30.0361742,8.85541562 30.024126,8.86746381 30.0000297,8.86746381 C29.9759333,8.86746381 29.9518369,8.85541562 29.9397887,8.84336744 C27.7229228,7.56625988 19.5663019,3.28915437 14.4217271,4.61445467 C14.3614862,4.62650286 14.3012452,4.61445467 14.2771489,4.56626193 C14.2530525,4.50602101 14.2771489,4.44578009 14.3253416,4.42168372 C18.9156999,1.66264946 23.9638892,0 30.0000297,0 M30.0000297,24.0602245 C30.0361742,24.0602245 30.0723188,24.0843209 30.0964151,24.1084172 C39.0723126,30.9397379 54.4337479,47.8071962 49.7470041,52.5782773 L49.7590523,52.5662291 L49.7590523,52.5782773 L49.7470041,52.5782773 C44.2771283,57.3734547 37.2650849,60.0120071 30.0000297,59.9999589 C22.7349744,60.0120071 15.7108828,57.3734547 10.2530552,52.5782773 L10.2410071,52.5662291 L10.2530552,52.5782773 C5.56631146,47.8071962 20.9277467,30.9276897 29.9036442,24.1084172 C29.9156924,24.0843209 29.9638851,24.0602245 30.0000297,24.0602245"})))}d.displayName="PlatformXbox"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserPopoutCustomStatus=C,t.UserPopoutInfo=b,t.UserPopoutProfileText=function(e){var t=e.customStatus,n=e.hidePersonalInformation,r=void 0!==n&&n,o=e.userBio;return a.createElement(a.Fragment,null,null!=t&&t,!r&&T("div",{className:g.default.divider}),o&&!r&&T("div",{className:g.default.aboutMeSection},void 0,T(c.default,{size:c.default.Sizes.SIZE_12,className:g.default.aboutMeTitle,muted:!0,uppercase:!0},void 0,E.default.Messages.USER_POPOUT_ABOUT_ME),T(m.default,{className:g.default.aboutMeBody,userBio:o})))},t.UserPopoutAvatar=function(e){var t,n=e.user,r=e.status,l=e.isMobile,u=e.guildId,c=e.onClose,v=e.disableUserProfileLink,y=(0,i.useStateFromStores)([s.default],(function(){return s.default.isGuest()})),m=n.isNonUserBot(),_=T(M,{className:g.default.avatar,src:n.getAvatarURL(u,!0),size:f.Sizes.SIZE_80,"aria-label":n.username,status:r,isMobile:l,statusTooltip:!0});return a.createElement(a.Fragment,null,y?_:T(d.default,{className:(0,o.default)((t={},t[g.default.avatarWrapperNonUserBot]=m,t[g.default.avatarWrapperNormal]=!m,t[g.default.avatarPositionPremium]=null!=n.banner&&!m,t[g.default.avatarPositionNormal]=null==n.banner||m,t[g.default.clickable]=!v,t)),onClick:m||v?void 0:function(){(0,h.openUserProfileModal)({userId:n.id,guildId:u||void 0}),null==c||c()}},void 0,_,!v&&(S=p.default.Masks.AVATAR_DEFAULT,null!=r&&(S=l?p.default.Masks.AVATAR_STATUS_MOBILE_80:p.default.Masks.AVATAR_STATUS_ROUND_80),T(p.default,{mask:S,className:g.default.avatarHint,width:80,height:80},void 0,T("div",{className:g.default.avatarHintInner},void 0,E.default.Messages.VIEW_PROFILE)))));var S};var r,a=I(n(0)),o=S(n(9)),i=n(3),l=S(n(8300)),u=S(n(8732)),s=S(n(11)),d=S(n(61)),f=I(n(279)),c=S(n(47)),p=S(n(248)),v=S(n(43)),y=S(n(8363)),m=S(n(9113)),_=I(n(8827)),h=n(8310),E=S(n(6)),g=S(n(7472));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e){var t=e.customStatusActivity;return T(u.default,{activity:t,className:g.default.customStatus,emojiClassName:g.default.customStatusEmoji,soloEmojiClassName:g.default.customStatusSoloEmoji,textClassName:g.default.customStatusText})}function b(e){var t,n=e.user,r=e.nickname,a=e.onOpenPremiumSettings,u=e.usernameIcon,s=e.identityCTA,d=e.hasCustomStatus,f=(0,i.useStateFromStores)([y.default],(function(){return y.default.getUserProfile(n.id)}),[n]),p=n.isNonUserBot();return T("div",{className:(0,o.default)(g.default.headerTop,(t={},t[g.default.headerTopWithCustomStatus]=d,t))},void 0,T(_.default,{className:g.default.profileBadges,user:n,premiumSince:null==f?void 0:f.premiumSince,premiumGuildSince:null==f?void 0:f.premiumGuildSince,openPremiumSettings:a,size:_.BadgeSizes.SIZE_22}),T("div",{className:g.default.headerText},void 0,null!=r?T(c.default,{size:c.default.Sizes.SIZE_20,className:g.default.nickname},void 0,r):null,T(l.default,{usernameIcon:u,user:n,hideDiscriminator:p,className:null==r?g.default.headerTagNoNickname:g.default.headerTagWithNickname,usernameClass:null==r?g.default.headerTagUsernameNoNickname:g.default.headerTagUsernameBase,discriminatorClass:null==r?g.default.headerTagDiscriminatorNoNickname:g.default.discrimBase,botClass:null==r?g.default.headerBotTag:g.default.headerBotTagWithNickname}),s))}C.displayName="UserPopoutCustomStatus",b.displayName="UserPopoutInfo";var M=v.default.getEnableHardwareAcceleration()?f.AnimatedAvatar:f.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=n(9334),l=s(n(7470)),u=s(n(7342));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.userBio,n=e.className,r=a.useMemo((function(){return(0,i.parseBioReact)(t)}),[t]);return f("div",{className:(0,o.default)(n,u.default.markup,l.default.clamped)},void 0,r)}c.displayName="UserBio"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=x();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=H(n(9)),i=H(n(8325)),l=n(3),u=H(n(8389)),s=H(n(397)),d=H(n(8309)),f=H(n(8736)),c=H(n(8558)),p=n(180),v=H(n(8391)),y=H(n(1216)),m=H(n(8869)),_=n(8594),h=H(n(8437)),E=H(n(10)),g=H(n(1225)),S=H(n(1238)),O=H(n(70)),I=H(n(1242)),T=H(n(9514)),C=H(n(12)),b=H(n(29)),M=H(n(1160)),N=n(8593),A=H(n(153)),P=H(n(149)),R=H(n(24)),L=H(n(13)),D=n(121),w=H(n(16)),j=n(8381),k=H(n(43)),U=n(1),G=H(n(6)),F=H(n(7360)),B=H(n(370));function H(e){return e&&e.__esModule?e:{default:e}}function x(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return x=function(){return e},e}function V(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){V(o,r,a,i,l,"next",e)}function l(e){V(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function z(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,K(e,t)}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t,n,r,i,l=e.file,u=a.useState(),s=u[0],d=u[1],f=a.useState({}),c=f[0],p=f[1],v=a.useRef(null);a.useEffect((function(){if(null!=l){var e=URL.createObjectURL(l);return d(e),function(){d(void 0),URL.revokeObjectURL(e)}}}),[l]),a.useLayoutEffect((function(){var e=v.current;null!=e&&(e.onload=function(){var t=e.naturalWidth/e.naturalHeight,n=Math.max(.66,Math.min(t,4));p(1===n?{width:104,height:104}:n>1?{width:104*n,height:void 0}:{width:void 0,height:104/n})})}),[]);var y=Math.max(16,(120-(null!==(t=null===(n=v.current)||void 0===n?void 0:n.width)&&void 0!==t?t:0))/2);return a.createElement("img",{ref:v,src:s,className:(0,o.default)(F.default.icon,F.default.image),"aria-hidden":!0,alt:"",style:{width:null!==(r=c.width)&&void 0!==r?r:"initial",height:null!==(i=c.height)&&void 0!==i?i:104,marginLeft:y,marginRight:y,marginTop:c.height?104-c.height-33:-33}})}$.displayName="ImageFilePreview";var Z=function(e){function t(){return e.apply(this,arguments)||this}return z(t,e),t.prototype.render=function(){return this.props.upload.isImage?Y($,{file:this.props.upload.file}):Y("div",{className:(0,o.default)(F.default.icon,(e={},e[F.default[this.props.upload.classification]]=!0,e))});var e},t}(a.Component);Z.displayName="UploadIcon";var q=function(e){function t(t){var n,r,o;(o=e.call(this,t)||this)._transitionTimeout=null,o._channelTextAreaRef=a.createRef(),o.cancelAll=function(){f.default.clearAll(),o.props.onClose()},o.cancel=function(){o.showNextFile()},o.confirm=W(regeneratorRuntime.mark((function e(){var t,n,r,a,i,l,u,s,f,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.props,n=t.cooldown,r=t.upload,a=t.channel,i=o.state,l=i.textValue,u=i.transitioning,s=i.hasSpoiler,!u&&null!=r){e.next=4;break}return e.abrupt("return",{shouldClear:!1,shouldRefocus:!1});case 4:if(!(n>0)){e.next=6;break}return e.abrupt("return",{shouldClear:!1,shouldRefocus:!0});case 6:if(!S.default.isOpen("popout-channel-text-area-shouting")){e.next=10;break}return d.default.close("popout-channel-text-area-shouting"),o.submitUpload(!0,l,r,a,s),e.abrupt("return",{shouldClear:!0,shouldRefocus:!0});case 10:return e.next=12,(0,j.applyChatRestrictions)({target:o._channelTextAreaRef.current,type:U.TextareaTypes.FORM,content:l,channel:a});case 12:return f=e.sent,c=f.valid,o.submitUpload(c,l,r,a,s),e.abrupt("return",{shouldClear:!1,shouldRefocus:!1});case 16:case"end":return e.stop()}}),e)}))),o.handleTextChange=function(e,t,n){o.setState({textValue:t,richValue:n})},o.handleSubmit=function(){return o.confirm()};var l=null!=t.upload?t.upload.channelId:null,u=null==l||t.ignoreDraft?"":g.default.getDraft(l,t.draftType);return o.state={transitioning:!1,textValue:u,richValue:i.default.deserialize(u),textFocused:!0,hasSpoiler:!1,filename:null!==(n=null===(r=t.upload)||void 0===r?void 0:r.filename)&&void 0!==n?n:""},o}z(t,e);var n=t.prototype;return n.componentDidMount=function(){var e;D.ComponentDispatch.subscribe(U.ComponentActions.MODAL_SUBMIT,this.confirm),D.ComponentDispatch.subscribe(U.ComponentActions.MODAL_CLOSE,this.cancel),(null===(e=this.props.upload)||void 0===e?void 0:e.showLargeMessageDialog)&&L.default.track(U.AnalyticEvents.OPEN_MODAL,{type:"Upload Large Message",message_content_length:this.props.upload.file.size}),w.default.embedded&&k.default.focus()},n.componentWillUnmount=function(){D.ComponentDispatch.unsubscribe(U.ComponentActions.MODAL_SUBMIT,this.confirm),D.ComponentDispatch.unsubscribe(U.ComponentActions.MODAL_CLOSE,this.cancel),clearTimeout(this._transitionTimeout)},n.shouldComponentUpdate=function(e){return null!=e.upload},n.componentDidUpdate=function(e){var t,n,r,a;(null===(t=e.upload)||void 0===t?void 0:t.filename)!==(null===(n=this.props.upload)||void 0===n?void 0:n.filename)&&this.setState({filename:null!==(r=null===(a=this.props.upload)||void 0===a?void 0:a.filename)&&void 0!==r?r:""})},n.submitUpload=function(e,t,n,r,a){var o=this;if(e&&null!=r){var l=y.default.parse(r,t);u.default.saveDraft(r.id,"",this.props.draftType);var s=this.state.filename;this.setState({textFocused:!0,textValue:"",richValue:i.default.deserialize(""),filename:""}),setTimeout((function(){return c.default.upload(r.id,n.file,o.props.draftType,l,a,s)}),125),this.showNextFile()}},n.showNextFile=function(){var e=this;this.state.transitioning||(this.props.hasAdditionalUploads?(this.setState({transitioning:!0}),setTimeout((function(){return f.default.popFirstFile()}),100),this._transitionTimeout=setTimeout((function(){return e.setState({transitioning:!1})}),200)):(f.default.popFirstFile(),this.props.onClose()))},n.renderFooter=function(){var e=this,t=this.props,n=t.cooldown,r=t.hasAdditionalUploads,i=this.state.hasSpoiler,l=n>0,u=null,s=l?G.default.Messages.CHANNEL_SLOWMODE_COOLDOWN.format({seconds:Math.round((n+1e3)/1e3)}):null;r&&(u=Y(b.default,{type:"button",look:b.default.Looks.LINK,color:b.default.Colors.PRIMARY,onClick:this.cancelAll,className:F.default.cancelAllButton},void 0,Y("span",{},void 0,G.default.Messages.UPLOAD_AREA_CANCEL_ALL)));var d=Y(a.Fragment,{},void 0,Y(M.default,{value:i,onChange:function(t,n){return e.setState({hasSpoiler:n})}},void 0,Y(R.default,{},void 0,G.default.Messages.SPOILER_MARK_SELECTED)),Y("div",{className:F.default.hasSpoilers},void 0,u,Y(b.default,{type:"button",look:b.default.Looks.LINK,color:b.default.Colors.PRIMARY,onClick:this.cancel},void 0,Y("span",{},void 0,G.default.Messages.CANCEL)),Y(P.default,{text:s},void 0,(function(t){return a.createElement("div",t,Y(b.default,{disabled:l,type:"submit",onClick:e.confirm},void 0,Y("span",{},void 0,G.default.Messages.UPLOAD)))}))));return Y("div",{className:(0,o.default)(F.default.footer,F.default.hasSpoilers)},void 0,d)},n.render=function(){var e,t,n,r,i=this,l=this.props,u=l.upload,s=l.channel,d=l.pendingReply,f=l.messageMaxLength,c=this.state,y=c.transitioning,m=c.textValue,h=c.richValue,E=c.textFocused;if(null==u||null==s)return null;var g=N.PlaintextFilePreviewExperiment.getCurrentConfig({}).enabled;return Y("div",{className:(0,o.default)(F.default.uploadModal,(e={},e[F.default.transitioning]=y,e))},void 0,Y("div",{className:F.default.inner},void 0,Y("div",{className:(0,o.default)(F.default.file,(t={},t[F.default.expandable]=u.isImage,t))},void 0,Y(Z,{upload:u}),Y("div",{className:F.default.description},void 0,Y("div",{className:F.default.filename},void 0,u.showLargeMessageDialog?G.default.Messages.LARGE_MESSAGE_UPLOAD_TITLE_MAX_LENGTH.format({maxLength:f}):u.filename),u.showLargeMessageDialog?Y("div",{className:F.default.subtitle},void 0,G.default.Messages.LARGE_MESSAGE_UPLOAD_SUBTITLE):null,Y(R.default,{className:F.default.destination,color:R.default.Colors.HEADER_SECONDARY,size:R.default.Sizes.SIZE_14},void 0,G.default.Messages.UPLOAD_TO.format({destination:(0,p.computeChannelName)(s,C.default,O.default,!0)})))),Y("div",{className:F.default.comment},void 0,g&&(0,_.isPlaintextPreviewableFile)(null!==(n=null===(r=this.props.upload)||void 0===r?void 0:r.filename)&&void 0!==n?n:"")?a.createElement(a.Fragment,null,Y("div",{className:F.default.label},void 0,Y("span",{},void 0,G.default.Messages.UPLOAD_AREA_FILENAME)),Y(A.default,{className:(0,o.default)(F.default.channelTextAreaUpload,B.default.marginTop8),value:this.state.filename,onChange:function(e){return i.setState({filename:e})},onKeyDown:function(e){if(e.which===U.KeyboardKeys.ENTER)return i.confirm()}})):null,Y("div",{className:F.default.label},void 0,Y("span",{},void 0,G.default.Messages.UPLOAD_AREA_LEAVE_A_COMMENT),Y("span",{className:F.default.optional},void 0,"(",G.default.Messages.UPLOAD_AREA_OPTIONAL,")")),a.createElement(v.default,{ref:this._channelTextAreaRef,className:(0,o.default)(F.default.channelTextAreaUpload,B.default.marginTop8),textValue:m,richValue:h,focused:E,channel:s,onChange:this.handleTextChange,onSubmit:this.handleSubmit,type:U.TextareaTypes.FORM,pendingReply:d}))),this.renderFooter())},t}(a.Component);function X(e){var t,n,r=e.onClose,a=e.draftType,o=e.ignoreDraft,i=(0,l.useStateFromStores)([T.default],(function(){return T.default.getFirstUpload()})),u=(0,l.useStateFromStores)([T.default],(function(){return T.default.hasAdditionalUploads()})),s=null!==(t=null==i?void 0:i.channelId)&&void 0!==t?t:null,d=(0,l.useStateFromStores)([E.default],(function(){var e;return null!==(e=E.default.getChannel(s))&&void 0!==e?e:null})),f=(0,l.useStateFromStores)([I.default],(function(){return null!=s?I.default.getSlowmodeCooldownGuess(s):0})),c=(0,l.useStateFromStores)([h.default],(function(){return null!=s?h.default.getPendingReply(s):void 0})),p=(0,m.default)();return Y(q,{onClose:r,draftType:a,ignoreDraft:o,upload:i,file:null!==(n=null==i?void 0:i.file)&&void 0!==n?n:null,hasAdditionalUploads:u,channel:d,cooldown:f,pendingReply:c,messageMaxLength:p})}q.displayName="Upload",X.displayName="UploadConnected";var J=function(e){function t(){return e.apply(this,arguments)||this}z(t,e);var n=t.prototype;return n.close=function(){s.default.pop()},n.render=function(){return Y(X,{onClose:this.close,draftType:this.props.draftType,ignoreDraft:this.props.ignoreDraft})},t}(a.Component);t.default=J,J.displayName="UploadModal",J.modalConfig={closable:!1}},,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ResizeOrientation=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(1243))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var l;t.ResizeOrientation=l,function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(l||(t.ResizeOrientation=l={}));var u=function(e){var t=e.initialElementDimension,n=e.resizableDomNodeRef,r=e.maxDimension,i=e.minDimension,u=e.onElementResize,s=e.throttleDuration,d=void 0===s?300:s,f=e.orientation,c=a.useState(!1),p=c[0],v=c[1],y=a.useRef(0),m=a.useRef(null==t?0:t);return a.useLayoutEffect((function(){if(p){var e=(0,o.default)(u,d),t=function(t){if(null==n.current)return null;var a=f===l.HORIZONTAL,o=a?t.screenX:t.screenY,u=(y.current-o)*(a?1:-1),s=m.current+u,d=null==r?s:Math.min(r,s),c=null==i?d:Math.max(null!=i?i:0,d);y.current=o,m.current=c,n.current.style[a?"width":"height"]=c+"px",e(c)},a=function(){v(!1),u(m.current)};return document.addEventListener("mouseup",a),document.addEventListener("mousemove",t),function(){document.removeEventListener("mouseup",a),document.removeEventListener("mousemove",t),e.cancel()}}}),[p,u,i,r,f,n,d]),a.useCallback((function(e){var t=f===l.HORIZONTAL;null!=n.current&&(m.current=t?n.current.offsetWidth:n.current.offsetHeight),y.current=t?e.screenX:e.screenY,v(!0)}),[f,n])};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t=!0);var n=a.useState(""),r=n[0],o=n[1],i=a.useState(null),l=i[0],v=i[1],y=a.useState(null),m=y[0],C=y[1],b=(0,E.default)(e.code);a.useEffect((function(){function e(){return(e=A(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(t=f.default.getNullableCurrentUser())){e.next=11;break}return e.prev=2,e.next=5,(0,s.fetchCurrentUser)();case 5:t=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),u.default.verifySSOToken(null);case 11:null!=t&&o(b.defaultName.format({username:t.username}));case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[b.defaultName]);(0,g.default)(e);var N=a.createElement(a.Fragment,null,t?M(S.default,{guildTemplate:e}):null,M("div",{className:T.default.icon},void 0,M(d.default,{icon:l,onChange:v})),M(p.default,{title:b.nameLabel},void 0,M(c.default,{type:"text",value:r,maxLength:100,onChange:o,error:null==m?void 0:m.name})),M(_.default,{size:_.default.Sizes.SIZE_12,color:_.default.Colors.MUTED,className:T.default.guidelines},void 0,b.terms.format({guidelinesURL:O.MarketingURLs.GUIDELINES}))),L=e.serializedSourceGuild.roles.filter((function(e){return"@everyone"!==e.name})),D=a.createElement(a.Fragment,null,M("div",{className:T.default.divider}),M(p.default,{className:T.default.previewSection,title:I.default.Messages.GUILD_TEMPLATE_MODAL_CHANNELS_HEADER},void 0,M(P,{channels:e.serializedSourceGuild.channels}),M(_.default,{size:_.default.Sizes.SIZE_12,color:_.default.Colors.HEADER_SECONDARY,className:T.default.protip},void 0,M("span",{className:T.default.protipText},void 0,I.default.Messages.FORM_LABEL_ROLES_PRO_TIP,":")," ",I.default.Messages.GUILD_TEMPLATE_MODAL_CHANNELS_TIP)),L.length>0?a.createElement(a.Fragment,null,M(p.default,{className:T.default.previewSection,title:I.default.Messages.GUILD_TEMPLATE_MODAL_ROLES_HEADER2},void 0,M(R,{roles:L}))):null);return{form:N,preview:D,handleSubmit:function(){return h.default.acceptGuildTemplate(e.code,r,l).catch((function(e){return C(e)}))}}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=C(n(8)),l=n(202),u=C(n(363)),s=n(1150),d=C(n(8792)),f=C(n(12)),c=C(n(153)),p=C(n(476)),v=C(n(683)),y=C(n(8307)),m=C(n(8276)),_=C(n(24)),h=C(n(9534)),E=C(n(5698)),g=C(n(9535)),S=C(n(5967)),O=n(1),I=C(n(6)),T=C(n(7559));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){N(o,r,a,i,l,"next",e)}function l(e){N(o,r,a,i,l,"throw",e)}i(void 0)}))}}function P(e){var t=e.channels,n=(0,i.default)(t).sortBy((function(e){return null==e.parent_id?1e4*Number(e.id):1e4*Number(e.parent_id)+e.id})).map((function(e){var t,n,r=(n=e.type)===O.ChannelTypes.GUILD_VOICE?m.default:n===O.ChannelTypes.GUILD_CATEGORY?v.default:y.default;return M("div",{className:(0,o.default)(T.default.channel,(t={},t[T.default.category]=e.type===O.ChannelTypes.GUILD_CATEGORY,t))},e.id,M(r,{className:T.default.channelIcon}),M(_.default,{className:T.default.channelText},void 0,e.name))})).value();return M("div",{className:T.default.channelsWrapper},void 0,n)}function R(e){var t=e.roles.slice().reverse().map((function(e){return M(L,{role:e},e.id)}));return M("ul",{className:T.default.rolesWrapper},void 0,t)}function L(e){var t,n=e.role,r=null==n.color?O.HEXColors.PRIMARY_DARK_300:(0,l.int2hex)(n.color),a=M("div",{className:T.default.roleCircle,style:{backgroundColor:r}});return M("li",{className:T.default.role,style:{borderColor:null!==(t=(0,l.hex2rgb)(r,.6))&&void 0!==t?t:void 0}},void 0,a,M("div",{className:T.default.roleName},void 0,n.name))}n(9536),P.displayName="Channels",R.displayName="Roles",L.displayName="Role"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=v(n(8254)),o=v(n(180)),i=v(n(15)),l=v(n(29)),u=n(35),s=v(n(47)),d=v(n(24)),f=n(1),c=v(n(6)),p=v(n(7569));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.channel,n=e.onClose,r=e.onConfirm,v=e.transitionState,y=(0,o.default)(t,!0),_=t.id,h=i.default.getGuild(t.getGuildId());if(null==h||!h.hasFeature(f.GuildFeatures.COMMUNITY)||h.rulesChannelId!==_&&h.publicUpdatesChannelId!==_){var E=t.type===f.ChannelTypes.GUILD_CATEGORY?c.default.Messages.DELETE_CATEGORY:t.isThread()?c.default.Messages.DELETE_THREAD:c.default.Messages.DELETE_CHANNEL;return m(u.ModalRoot,{transitionState:v,"aria-label":E},void 0,m(u.ModalHeader,{separator:!1},void 0,m(s.default,{tag:s.default.Tags.H2,size:s.default.Sizes.SIZE_20},void 0,E)),m(u.ModalContent,{},void 0,m(d.default,{size:d.default.Sizes.SIZE_16,className:p.default.modalText},void 0,c.default.Messages.DELETE_CHANNEL_BODY.format({channelName:y}))),m(u.ModalFooter,{},void 0,m(l.default,{onClick:r,color:l.default.Colors.RED},void 0,E),m(l.default,{onClick:n,look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY},void 0,c.default.Messages.CANCEL)))}var g=h.rulesChannelId===_?c.default.Messages.DELETE_RULES_CHANNEL_BODY:c.default.Messages.DELETE_UPDATES_CHANNEL_BODY;return m(u.ModalRoot,{transitionState:v,"aria-label":c.default.Messages.CANNOT_DELETE_CHANNEL},void 0,m(u.ModalHeader,{separator:!1},void 0,m(s.default,{tag:s.default.Tags.H2,size:s.default.Sizes.SIZE_20},void 0,c.default.Messages.CANNOT_DELETE_CHANNEL)),m(u.ModalContent,{},void 0,m(d.default,{size:d.default.Sizes.SIZE_16,className:p.default.modalText},void 0,g),m(d.default,{size:d.default.Sizes.SIZE_16,className:p.default.modalText},void 0,c.default.Messages.DESIGNATE_OTHER_CHANNEL.format({onClick:function(){a.default.open(h.id,f.GuildSettingsSections.COMMUNITY),n()}}))),m(u.ModalFooter,{},void 0,m(l.default,{onClick:n},void 0,c.default.Messages.OKAY)))};t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8253),o=s(n(8265)),i=n(392),l=n(8473),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=(0,l.useThreadNotificationSetting)(e);return f(a.MenuItem,{id:"thread-notifications",label:u.default.Messages.NOTIFICATION_SETTINGS},void 0,(0,i.getThreadNotificationOptions)().map((function(n){var r=n.setting,i=n.label;return f(a.MenuRadioItem,{group:"thread-notifications",id:""+r,label:i,action:function(){return o.default.setNotificationSetting(e,r)},checked:r===t},r)})))}c.displayName="useThreadNotificationItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=z(n(0)),o=W(n(9)),i=n(3),l=W(n(363)),u=n(1171),s=W(n(105)),d=W(n(5673)),f=W(n(162)),c=W(n(249)),p=W(n(684)),v=W(n(56)),y=W(n(15)),m=W(n(12)),_=W(n(29)),h=W(n(55)),E=W(n(371)),g=W(n(8649)),S=W(n(153)),O=W(n(149)),I=n(131),T=W(n(159)),C=n(35),b=W(n(47)),M=W(n(24)),N=W(n(13)),A=W(n(150)),P=W(n(8410)),R=n(8301),L=z(n(8411)),D=n(8262),w=n(9583),j=n(8648),k=W(n(8907)),U=n(1),G=W(n(6)),F=W(n(7350)),B=W(n(9588)),H=W(n(1377)),x=W(n(1378)),V=W(n(9589));function W(e){return e&&e.__esModule?e:{default:e}}function Y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Y=function(){return e},e}function z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function K(){return(K=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}).apply(this,arguments)}function $(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function Z(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){$(o,r,a,i,l,"next",e)}function l(e){$(o,r,a,i,l,"throw",e)}i(void 0)}))}}function q(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var X;!function(e){e[e.CLAIM_ACCOUNT=0]="CLAIM_ACCOUNT",e[e.EMAIL_CONFIRMATION=1]="EMAIL_CONFIRMATION",e[e.VERIFICATION_FORM=2]="VERIFICATION_FORM"}(X||(X={}));var J=function(e){var t=e.email,n=e.password,r=e.setEmail,a=e.setPassword,o=e.emailError,i=e.passwordError;return q("div",{className:F.default.content},void 0,q("img",{alt:G.default.Messages.MEMBER_VERIFICATION_CLAIM_ACCOUNT_ICON,src:B.default,className:F.default.applicationIcon}),q(b.default,{size:b.default.Sizes.SIZE_24,className:F.default.header},void 0,G.default.Messages.MEMBER_VERIFICATION_CLAIM_ACCOUNT_TITLE),q(M.default,{size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY},void 0,G.default.Messages.MEMBER_VERIFICATION_CLAIM_ACCOUNT_SUBTITLE),q("hr",{className:F.default.divider}),q(I.FormItem,{title:G.default.Messages.FORM_LABEL_EMAIL,className:F.default.formItem},void 0,q(S.default,{value:t,error:o,onChange:r,autoFocus:!0})),q(I.FormItem,{title:G.default.Messages.FORM_LABEL_PASSWORD,className:F.default.formItem},void 0,q(S.default,{type:"password",value:n,error:i,onChange:a})))};J.displayName="MemberVerificationClaimAccountStep";var Q=function(e){var t=e.email;return q("div",{className:F.default.content},void 0,q("img",{alt:G.default.Messages.MEMBER_VERIFICATION_VERIFY_EMAIL_ICON,src:V.default,className:F.default.applicationIcon}),q(b.default,{size:b.default.Sizes.SIZE_24,className:F.default.header},void 0,G.default.Messages.MEMBER_VERIFICATION_EMAIL_CONFIRMATION_TITLE.format({email:t})),q(M.default,{size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY},void 0,G.default.Messages.MEMBER_VERIFICATION_EMAIL_CONFIRMATION_SUBTITLE),q(_.default,{className:F.default.resendButton,size:_.default.Sizes.NONE,look:_.default.Looks.LINK,onClick:function(){return l.default.verifyResend()}},void 0,G.default.Messages.MEMBER_VERIFICATION_EMAIL_RESEND))};Q.displayName="MemberVerificationEmailConfirmationStep";var ee=function(){return n.e(20).then(n.t.bind(null,9259,3)).then((function(e){return e.default}))},te=function(e){var t=e.guildId,n=e.formState,r=e.updateFormState,a=e.useReducedMotion,i=e.isPreview,l=void 0!==i&&i;return q("div",{className:F.default.content},void 0,q("div",{className:F.default.animationAndSparklesContainer},void 0,q("img",{alt:G.default.Messages.MEMBER_VERIFICATION_VERIFICATION_ICON,src:x.default,className:(0,o.default)(F.default.sparkleIcon,F.default.sparkleBottom)}),q(g.default,{importData:ee,shouldAnimate:!a,className:F.default.animation}),q("img",{alt:G.default.Messages.MEMBER_VERIFICATION_VERIFICATION_ICON,src:H.default,className:(0,o.default)(F.default.sparkleIcon,F.default.sparkleTop)})),q(b.default,{size:b.default.Sizes.SIZE_24,className:F.default.header},void 0,G.default.Messages.MEMBER_VERIFICATION_MODAL_TITLE),q(M.default,{size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY},void 0,G.default.Messages.MEMBER_VERIFICATION_MODAL_SUBTITLE),q("hr",{className:F.default.divider}),q(k.default,{className:F.default.verificationForm,guildId:t,formState:n,updateFormState:r,isPreview:l}))};te.displayName="MemberVerificationFormStep";var ne=function(e){var t,n,r=e.guildId,l=e.onClose,g=e.onComplete,S=e.inviteCode,I=e.isPreview,k=void 0!==I&&I,B=(0,j.useMemberVerificationFormNoticeStore)((function(e){return e.hasUnsubmittedChanges})),H=(0,i.useStateFromStores)([y.default],(function(){return y.default.getGuild(r)})),x=(0,i.useStateFromStores)([L.default],(function(){return L.default.get(r)})),V=(0,i.useStateFromStores)([m.default],(function(){return m.default.getNullableCurrentUser()})),W=!(null==V?void 0:V.isClaimed()),Y=null==V?void 0:V.verified,z=null==V?void 0:V.isPhoneVerified(),$=(0,i.useStateFromStores)([c.default],(function(){return c.default.getGuildEmoji(r)})),ee=(0,i.useStateFromStoresObject)([p.default],(function(){return{storeMemberCount:p.default.getMemberCount(r),storeOnlineCount:p.default.getOnlineCount(r)}})),ne=ee.storeMemberCount,re=ee.storeOnlineCount,ae=a.useState(null!==(t=null==x?void 0:x.formFields)&&void 0!==t?t:[]),oe=ae[0],ie=ae[1],le=a.useState(!1),ue=le[0],se=le[1],de=a.useState(null),fe=de[0],ce=de[1],pe=a.useState(W?X.CLAIM_ACCOUNT:X.VERIFICATION_FORM),ve=pe[0],ye=pe[1],me=a.useState(""),_e=me[0],he=me[1],Ee=a.useState(""),ge=Ee[0],Se=Ee[1],Oe=a.useState(null),Ie=Oe[0],Te=Oe[1],Ce=a.useState(null),be=Ce[0],Me=Ce[1],Ne=null==x?void 0:x.guild,Ae=a.useMemo((function(){return null!=H?H:null!=Ne?new f.default(Ne):null}),[H,Ne]),Pe=a.useMemo((function(){var e,t=null!==(e=0===$.length?null==Ne?void 0:Ne.emojis:$)&&void 0!==e?e:[],n=[].concat(t).reverse(),r=0,a=n.length;return a>12&&null!=n&&(n=n.slice(0,11),r=Math.min(a-n.length,99)),{emojisToRender:n,remainingEmojis:r,numGuildEmoji:a}}),[Ne,$]),Re=Pe.emojisToRender,Le=Pe.remainingEmojis,De=Pe.numGuildEmoji,we=null!=ne?ne:null==Ne?void 0:Ne.approximate_member_count,je=null!=re?re:null==Ne?void 0:Ne.approximate_presence_count;a.useEffect((function(){return(0,j.setHasUnsubmittedChanges)(!1),function(){(0,j.setHasUnsubmittedChanges)(!1)}}),[]),a.useEffect((function(){P.default.fetchVerificationForm(r,S)}),[r,S]),a.useEffect((function(){null!=x&&ie(x.formFields)}),[x]),a.useEffect((function(){null!=V&&V.isClaimed()&&ye(X.VERIFICATION_FORM)}),[V]),a.useEffect((function(){ve===X.EMAIL_CONFIRMATION&&Y&&ye(X.VERIFICATION_FORM)}),[ve,Y]),a.useEffect((function(){null!=r&&N.default.track(U.AnalyticEvents.OPEN_MODAL,{type:R.MEMBER_VERIFICATION_TYPE,guild_id:r})}),[r]),a.useEffect((function(){var e=oe.some((function(e){return e.field_type!==D.VerificationFormFieldTypes.TERMS&&(0,w.isValidFormResponse)(e)}));e&&!B?(0,j.setHasUnsubmittedChanges)(!0):!e&&B&&(0,j.setHasUnsubmittedChanges)(!1)}),[oe,B]);var ke=a.useMemo((function(){return!(((null==Ae?void 0:Ae.verificationLevel)!==U.VerificationLevels.VERY_HIGH||(null==V?void 0:V.isStaff()))&&Y||z)||oe.some((function(e){return!(0,w.isValidFormResponse)(e)}))}),[oe,Ae,z,Y,V]),Ue=(0,i.useStateFromStores)([s.default],(function(){return s.default.useReducedMotion}));if(null==Ae)return null;var Ge=function(){var e=Z(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return se(!0),Te(null),Me(null),e.prev=3,e.next=6,(0,u.saveAccountRequest)({email:_e,password:ge});case 6:se(!1),ye(X.EMAIL_CONFIRMATION),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(3),Te(null===e.t0||void 0===e.t0||null===(t=e.t0.body)||void 0===t?void 0:t.email),Me(null===e.t0||void 0===e.t0||null===(n=e.t0.body)||void 0===n?void 0:n.password);case 14:return e.prev=14,se(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[3,10,14,17]])})));return function(){return e.apply(this,arguments)}}(),Fe=function(){var e=Z(regeneratorRuntime.mark((function e(){var t,n,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(se(!0),ce(null),null==(t=null!=V?v.default.getMember(r,V.id):null)||t.isPending){e.next=6;break}return null==l||l(!0),e.abrupt("return");case 6:if(e.prev=6,e.t0=g,!e.t0){e.next=11;break}return e.next=11,g(K({},null!=x?x:L.NO_MEMBER_VERIFICATION_FORM,{formFields:oe}));case 11:null==l||l(!0),e.next=19;break;case 14:e.prev=14,e.t1=e.catch(6),null!=(null==(o=null===e.t1||void 0===e.t1?void 0:e.t1.body)||null===(n=o.errors)||void 0===n?void 0:n.version)||null!=(null==o||null===(a=o.errors)||void 0===a?void 0:a.form_fields)?ce(G.default.Messages.MEMBER_VERIFICATION_VERSION_MISMATCH_ERROR):ce(null==o?void 0:o.message),se(!1);case 19:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(){return e.apply(this,arguments)}}(),Be=q(J,{email:_e,password:ge,setEmail:he,setPassword:Se,emailError:Ie,passwordError:be}),He=q(Q,{email:_e}),xe=q(te,{guildId:r,formState:oe,updateFormState:ie,isPreview:k,useReducedMotion:Ue});return a.createElement(a.Fragment,null,q(h.default,{direction:h.default.Direction.VERTICAL,justify:h.default.Justify.BETWEEN,className:F.default.guildSidebar,shrink:0},void 0,q("div",{},void 0,q(E.default,{guild:Ae,className:F.default.guildIcon}),q(b.default,{size:b.default.Sizes.SIZE_20,className:F.default.guildName},void 0,null==Ae?void 0:Ae.name),q(M.default,{className:F.default.guildDescription,size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY},void 0,null==x?void 0:x.description),null!=Re&&Re.length>0?a.createElement(a.Fragment,null,q("hr",{className:F.default.divider}),q(T.default,{},void 0,G.default.Messages.MEMBER_VERIFICATION_NUM_EMOJIS.format({emojis:De})),q("div",{className:F.default.emojisContainer},void 0,Re.map((function(e){var t=A.default.getEmojiURL({id:e.id,animated:!1});return q(O.default,{text:":"+e.name+":"},e.id,(function(e){return a.createElement("img",K({},e,{width:24,height:24,src:t,className:F.default.emoji,alt:""}))}))})),null!=Le&&Le>0?q(b.default,{size:b.default.Sizes.SIZE_12,muted:!0,className:F.default.emoji},void 0,"+"+Le):null)):null),q("div",{},void 0,null!=je&&q(h.default,{align:h.default.Align.CENTER,className:F.default.onlineCount},void 0,q("div",{className:F.default.dotOnline}),q(M.default,{},void 0,G.default.Messages.MEMBER_VERIFICATION_NUM_ONLINE.format({membersOnline:je}))),null!=we&&q(h.default,{align:h.default.Align.CENTER},void 0,q("div",{className:F.default.dotMembers}),q(M.default,{},void 0,G.default.Messages.MEMBER_VERIFICATION_NUM_MEMBERS.format({members:we}))))),q("div",{className:F.default.modal},void 0,q(C.ModalContent,{className:F.default.modalContent},void 0,q(d.default,{className:(0,o.default)(F.default.sequencer,(n={},n[F.default.centerContent]=ve!==X.VERIFICATION_FORM,n)),steps:[X.CLAIM_ACCOUNT,X.EMAIL_CONFIRMATION,X.VERIFICATION_FORM],step:ve},void 0,function(){switch(ve){case X.CLAIM_ACCOUNT:return Be;case X.EMAIL_CONFIRMATION:return He;case X.VERIFICATION_FORM:return xe}}())),function(){switch(ve){case X.CLAIM_ACCOUNT:return q(C.ModalFooter,{className:F.default.footer},void 0,q(_.default,{className:F.default.submitButton,type:"submit",submitting:ue,onClick:Ge,disabled:0===_e.length||0===ge.length||ue},void 0,G.default.Messages.NEXT),q(M.default,{size:M.default.Sizes.SIZE_12,color:M.default.Colors.HEADER_SECONDARY},void 0,G.default.Messages.MEMBER_VERIFICATION_CLAIM_ACCOUNT_INFO));case X.EMAIL_CONFIRMATION:return null;case X.VERIFICATION_FORM:return q(C.ModalFooter,{className:F.default.footer},void 0,q(_.default,{className:F.default.submitButton,type:"submit",submitting:ue,onClick:Fe,color:_.default.Colors.GREEN,disabled:null==g||ke||ue},void 0,G.default.Messages.SUBMIT),null!=fe?q(M.default,{size:M.default.Sizes.SIZE_12,color:M.default.Colors.STATUS_RED},void 0,fe):null)}}()))};t.default=ne},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=n(9595),i=l(n(15));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={},f=function(){d={guildAffinitiesByGuildId:{},guildAffinities:[],lastFetched:0}};f();var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a,o,l,f=r.prototype;return f.initialize=function(e){null!=e&&(d=e),this.waitFor(i.default)},f.getState=function(){return d},f.getGuildAffinity=function(e){return d.guildAffinitiesByGuildId[e]},a=r,(o=[{key:"affinities",get:function(){return d.guildAffinities}},{key:"hasRequestResolved",get:function(){return 0!==d.lastFetched}}])&&u(a.prototype,o),l&&u(a,l),r}(r.default.PersistedStore);c.persistKey="GuildAffinitiesStore";var p=new c(a.default,{CONNECTION_OPEN:function(e){return Date.now()-d.lastFetched>864e5&&(0,o.fetchGuildAffinities)(),!1},LOAD_GUILD_AFFINITIES_SUCCESS:function(e){var t=e.guildAffinities;d.guildAffinities=[],d.guildAffinitiesByGuildId={},d.lastFetched=Date.now(),t.forEach((function(e,t){var n=e.affinity,r=e.guild_id,a={score:n,guildId:r,index:t};d.guildAffinitiesByGuildId[r]=a,d.guildAffinities.push(a)}))},LOGOUT:function(e){f()}});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M3.494 16.768c.32-.258.794-.187 1.08.107.447.46.993.824 1.638 1.092.898.374 1.796.56 2.694.56.809 0 1.527-.142 2.156-.428.629-.286 1-.736 1.112-1.352.067-.351 0-.66-.202-.923a2.177 2.177 0 0 0-.842-.692 5.764 5.764 0 0 0-1.28-.429c-.472-.132-.944-.23-1.415-.296a9.625 9.625 0 0 1-2.695-.857c-.83-.44-1.55-1-2.156-1.682a6.19 6.19 0 0 1-1.313-2.373C2 8.57 1.967 7.56 2.17 6.462c.224-1.187.64-2.187 1.246-3A7.497 7.497 0 0 1 5.673 1.45 9.23 9.23 0 0 1 8.536.33 15.82 15.82 0 0 1 11.769 0c.719 0 1.426.055 2.123.165.696.11 1.37.308 2.02.593.652.286 1.27.67 1.853 1.154.429.355.839.775 1.231 1.26.241.298.16.73-.16.945L15.55 6.345c-.292.198-.686.146-.954-.083a4.584 4.584 0 0 0-1.41-.822 6.76 6.76 0 0 0-2.123-.429c-.763-.022-1.426.11-1.987.396-.562.285-.876.725-.943 1.318-.09.682.134 1.198.673 1.55.54.33 1.269.593 2.19.79a22.17 22.17 0 0 1 2.998.792c.988.308 1.819.77 2.492 1.385.696.593 1.202 1.373 1.516 2.34.314.945.337 2.143.067 3.594-.224 1.143-.64 2.143-1.246 3a7.925 7.925 0 0 1-2.19 2.11c-.875.571-1.886 1-3.031 1.285A14.575 14.575 0 0 1 7.997 24c-.719 0-1.471-.088-2.257-.264a11.036 11.036 0 0 1-2.257-.79 10.817 10.817 0 0 1-2.054-1.32 7.69 7.69 0 0 1-1.306-1.349c-.209-.277-.143-.66.128-.88l3.243-2.629zM29.31 8.579a.692.692 0 0 0 .694.784h8.053c.426 0 .753.368.695.78l-.547 3.869a.697.697 0 0 1-.695.592h-8.446a.697.697 0 0 0-.695.591l-.307 2.12a.692.692 0 0 0 .695.784h8.897c.426 0 .753.367.696.78l-.584 4.197a.697.697 0 0 1-.695.594H21.884a.692.692 0 0 1-.695-.782L24.328.921a.697.697 0 0 1 .695-.591H40.21c.427 0 .755.37.695.783l-.61 4.198a.697.697 0 0 1-.694.59h-9.292a.697.697 0 0 0-.695.59l-.304 2.088zM50.653 16.57a.706.706 0 0 0-.591-.317h-.082a.697.697 0 0 0-.695.593l-.878 6.231a.697.697 0 0 1-.695.593h-4.678a.692.692 0 0 1-.695-.782L45.477.921a.697.697 0 0 1 .695-.591h8.922c1.235 0 2.358.165 3.369.494 1.033.33 1.897.824 2.593 1.484.719.659 1.235 1.494 1.55 2.505.314 1.011.393 2.198.236 3.56-.158 1.078-.393 2-.708 2.77a7.315 7.315 0 0 1-1.179 1.945 8.12 8.12 0 0 1-1.684 1.418c-.444.27-.925.534-1.443.794a.696.696 0 0 0-.27 1.026l4.477 6.264c.326.455-.007 1.08-.574 1.08h-5.78a.706.706 0 0 1-.592-.316l-4.436-6.785zm2.993-5.394c.943 0 1.673-.275 2.19-.824.516-.572.819-1.198.909-1.88.09-.703-.056-1.318-.438-1.846-.36-.527-.988-.79-1.886-.79h-2.928a.697.697 0 0 0-.695.59l-.575 3.966a.692.692 0 0 0 .695.784h2.728zM81.555.694a.703.703 0 0 1 .637-.397h4.884c.522 0 .861.537.628.993l-11.223 22a.703.703 0 0 1-.628.38h-4.526a.699.699 0 0 1-.685-.539l-4.946-22a.69.69 0 0 1 .685-.834h5.009c.339 0 .63.237.69.563l2.017 10.843.335 5.535a.04.04 0 0 0 .04.037.04.04 0 0 0 .039-.028l1.81-5.51L81.555.693zM95.982 8.579a.692.692 0 0 0 .695.784h8.053c.425 0 .753.368.695.78l-.547 3.869a.697.697 0 0 1-.695.592h-8.447a.697.697 0 0 0-.695.591l-.306 2.12a.692.692 0 0 0 .695.784h8.897c.425 0 .753.367.696.78l-.584 4.197a.696.696 0 0 1-.695.594H88.557a.692.692 0 0 1-.695-.782L91 .921a.697.697 0 0 1 .695-.591h15.187c.427 0 .755.37.695.783l-.609 4.198a.697.697 0 0 1-.695.59h-9.291a.697.697 0 0 0-.695.59l-.305 2.088zM117.326 16.57a.706.706 0 0 0-.591-.317h-.083a.697.697 0 0 0-.695.593l-.877 6.231a.697.697 0 0 1-.695.593h-4.678a.692.692 0 0 1-.695-.782L112.15.921a.697.697 0 0 1 .695-.591h8.922c1.235 0 2.358.165 3.368.494 1.033.33 1.898.824 2.594 1.484.719.659 1.235 1.494 1.549 2.505.315 1.011.393 2.198.236 3.56-.157 1.078-.393 2-.707 2.77a7.295 7.295 0 0 1-1.179 1.945c-.472.527-1.033 1-1.684 1.418-.445.27-.926.534-1.443.794a.697.697 0 0 0-.27 1.026l4.477 6.264c.326.455-.007 1.08-.575 1.08h-5.78a.706.706 0 0 1-.591-.316l-4.436-6.785zm2.993-5.394c.943 0 1.673-.275 2.189-.824.517-.572.82-1.198.91-1.88.089-.703-.057-1.318-.438-1.846-.36-.527-.988-.79-1.887-.79h-2.927a.697.697 0 0 0-.695.59l-.576 3.966a.692.692 0 0 0 .695.784h2.729zM158.699 7.45a3.965 3.965 0 0 1-.303.924 4.234 4.234 0 0 1-.607 1.055c-.247.351-.55.692-.909 1.022l-.049.044c-.428.378-.443 1.14-.013 1.516.232.202.432.419.601.648.404.55.685 1.121.842 1.715a4.66 4.66 0 0 1 .135 1.747 7.08 7.08 0 0 1-.27 1.516c-.584 1.89-1.628 3.374-3.132 4.45-1.482 1.056-3.548 1.583-6.198 1.583h-8.928a.692.692 0 0 1-.695-.782L142.311.921a.697.697 0 0 1 .695-.591h8.956c1.145 0 2.167.165 3.065.494.921.33 1.685.802 2.291 1.418.606.593 1.033 1.33 1.28 2.209.269.879.303 1.879.101 3zm-8.051 2.012c.741 0 1.325-.21 1.752-.627.449-.44.707-.923.775-1.45.09-.528-.023-1-.337-1.418-.292-.44-.82-.66-1.583-.66h-2.895a.696.696 0 0 0-.694.59l-.406 2.78a.691.691 0 0 0 .694.785h2.694zm-1.28 9.032c.899 0 1.606-.241 2.123-.725.538-.505.842-1.055.909-1.648a2.07 2.07 0 0 0-.438-1.648c-.382-.506-1.022-.759-1.92-.759h-2.891a.698.698 0 0 0-.696.593l-.48 3.407c-.058.413.27.78.696.78h2.697zM163.079 8.011c.202-1.34.652-2.505 1.348-3.495a9.593 9.593 0 0 1 2.593-2.505 11.606 11.606 0 0 1 3.369-1.516c1.235-.33 2.47-.495 3.705-.495 1.235 0 2.425.165 3.57.495 1.146.33 2.134.835 2.965 1.516a6.245 6.245 0 0 1 1.886 2.505c.426.99.539 2.154.337 3.495l-1.179 7.978c-.202 1.34-.652 2.517-1.348 3.527a9.329 9.329 0 0 1-2.526 2.506 11.578 11.578 0 0 1-3.368 1.484c-1.235.33-2.504.494-3.807.494-1.235 0-2.425-.165-3.57-.494-1.123-.33-2.1-.825-2.931-1.484a6.56 6.56 0 0 1-1.886-2.505c-.426-1.011-.539-2.187-.337-3.528l1.179-7.978zm4.851 7.978c-.068.418-.011.791.168 1.12.18.309.427.572.741.792.315.198.685.352 1.112.462.449.11.898.165 1.347.165.494 0 .977-.055 1.449-.165.494-.11.943-.275 1.347-.495.404-.22.741-.494 1.01-.824.292-.352.472-.758.539-1.22l1.179-7.813c.068-.44.023-.824-.134-1.154a2.099 2.099 0 0 0-.708-.824 3.38 3.38 0 0 0-1.145-.495 5.526 5.526 0 0 0-1.381-.164c-.494 0-.988.055-1.482.164-.472.11-.91.275-1.314.495-.404.22-.752.494-1.044.824-.27.33-.438.714-.505 1.154l-1.179 7.978zM186.795 8.011c.202-1.34.651-2.505 1.347-3.495a9.597 9.597 0 0 1 2.594-2.505 11.6 11.6 0 0 1 3.368-1.516c1.235-.33 2.47-.495 3.705-.495 1.235 0 2.426.165 3.571.495 1.145.33 2.133.835 2.964 1.516a6.227 6.227 0 0 1 1.886 2.505c.427.99.539 2.154.337 3.495l-1.179 7.978c-.202 1.34-.651 2.517-1.347 3.527a9.357 9.357 0 0 1-2.526 2.506 11.596 11.596 0 0 1-3.369 1.484c-1.235.33-2.504.494-3.806.494a12.85 12.85 0 0 1-3.571-.494c-1.122-.33-2.099-.825-2.93-1.484a6.54 6.54 0 0 1-1.886-2.505c-.427-1.011-.539-2.187-.337-3.528l1.179-7.978zm4.85 7.978c-.067.418-.011.791.169 1.12.179.309.426.572.741.792a3.9 3.9 0 0 0 1.111.462c.449.11.898.165 1.348.165a6.36 6.36 0 0 0 1.448-.165c.494-.11.943-.275 1.347-.495.405-.22.741-.494 1.011-.824.292-.352.471-.758.539-1.22l1.179-7.813c.067-.44.022-.824-.135-1.154a2.096 2.096 0 0 0-.707-.824 3.394 3.394 0 0 0-1.146-.495 5.52 5.52 0 0 0-1.381-.164c-.494 0-.988.055-1.482.164-.471.11-.909.275-1.313.495-.405.22-.753.494-1.045.824a2.35 2.35 0 0 0-.505 1.154l-1.179 7.978zM211.767 16.768c.319-.258.794-.187 1.08.107.448.46.994.824 1.638 1.092.898.374 1.796.56 2.695.56.808 0 1.527-.142 2.155-.428.629-.286 1-.736 1.112-1.352.067-.351 0-.66-.202-.923a2.178 2.178 0 0 0-.842-.692 5.777 5.777 0 0 0-1.28-.429c-.472-.132-.943-.23-1.415-.296a9.636 9.636 0 0 1-2.695-.857 7.63 7.63 0 0 1-2.155-1.682 6.176 6.176 0 0 1-1.314-2.373c-.27-.924-.303-1.935-.101-3.033.224-1.187.64-2.187 1.246-3a7.498 7.498 0 0 1 2.257-2.011A9.23 9.23 0 0 1 216.809.33c1.055-.22 2.133-.33 3.234-.33.718 0 1.426.055 2.122.165.696.11 1.37.308 2.021.593.651.286 1.269.67 1.852 1.154a8.82 8.82 0 0 1 1.231 1.26c.241.298.16.73-.159.945l-3.288 2.228c-.292.198-.686.146-.953-.083a4.582 4.582 0 0 0-1.412-.822 6.756 6.756 0 0 0-2.122-.429c-.763-.022-1.426.11-1.987.396-.561.285-.876.725-.943 1.318-.09.682.135 1.198.674 1.55.538.33 1.268.593 2.189.79 1.033.199 2.032.462 2.998.792.988.308 1.819.77 2.492 1.385.697.593 1.202 1.373 1.516 2.34.315.945.337 2.143.068 3.594-.225 1.143-.64 2.143-1.247 3a7.922 7.922 0 0 1-2.189 2.11c-.876.571-1.886 1-3.032 1.285a14.575 14.575 0 0 1-3.604.429c-.718 0-1.471-.088-2.257-.264a11.068 11.068 0 0 1-2.257-.79 10.823 10.823 0 0 1-2.054-1.32c-.493-.399-.928-.849-1.306-1.349-.208-.277-.143-.66.128-.88l3.243-2.629zM243.571 5.703a.698.698 0 0 0-.696.593l-2.359 16.781a.697.697 0 0 1-.695.593h-4.68a.692.692 0 0 1-.695-.78l2.306-16.406a.692.692 0 0 0-.695-.78h-4.817a.692.692 0 0 1-.694-.787l.603-4.033a.698.698 0 0 1 .695-.587h17.545c.428 0 .756.371.694.786l-.603 4.033a.697.697 0 0 1-.694.587h-5.215z"});function f(e){var t=e.width,n=void 0===t?251:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 251 24"}),s("g",{fill:f,className:c},void 0,d))}f.displayName="PremiumGuildSubscriptionLogoCentered"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=M(n(0)),o=C(n(9)),i=n(3),l=n(42),u=C(n(40)),s=C(n(29)),d=C(n(61)),f=M(n(8293)),c=C(n(255)),p=C(n(8287)),v=C(n(47)),y=C(n(8265)),m=n(8657),_=n(392),h=n(1209),E=n(698),g=C(n(9612)),S=C(n(9614)),O=n(1),I=C(n(6)),T=C(n(7603));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A=N(c.default,{});function P(e){var t,n,r=e.channel,c=e.className,C=e.onClose,b=a.useState(m.StatusTab.Active),M=b[0],P=b[1],R=(0,i.useStateFromStores)([u.default],(function(){return u.default.can(O.Permissions.READ_MESSAGE_HISTORY,r)})),L=(0,h.useCanStartThread)(r),D=function(){C(),y.default.openThreadSidebarForCreating(r,void 0,"Thread Browser Empty State")},w=a.useCallback((function(e,t){C(),t?y.default.openThreadSidebarForViewing(e):(0,l.transitionToThread)(e.guild_id,e.id,_.OpenThreadAnalyticsLocations.BROWSER)}),[C]);return a.useEffect((function(){R||M===m.StatusTab.Active||P(m.StatusTab.Active)}),[R,M]),a.useEffect((function(){M===m.StatusTab.Active&&(0,E.trackThreadBrowserTab)("Active Threads")}),[M]),N("div",{className:(0,o.default)(c,T.default.container)},void 0,N("div",{className:T.default.header},void 0,N(p.default,{className:T.default.threadIcon}),N(v.default,{size:v.default.Sizes.SIZE_16,className:T.default.title},void 0,I.default.Messages.THREAD_BROWSER_TITLE),R?a.createElement(a.Fragment,null,N("div",{className:T.default.divider}),N(f.default,{selectedItem:M,type:f.Types.TOP_PILL,onItemSelect:P,className:T.default.tabBar},void 0,N(f.Item,{id:m.StatusTab.Active,className:(0,o.default)(T.default.tab,(t={},t[T.default.active]=M===m.StatusTab.Active,t))},void 0,I.default.Messages.THREAD_BROWSER_ACTIVE),N(f.Item,{id:m.StatusTab.Archived,className:(0,o.default)(T.default.tab,(n={},n[T.default.active]=M===m.StatusTab.Archived,n))},void 0,I.default.Messages.THREAD_BROWSER_ARCHIVED))):null,N("div",{className:T.default.spacer}),L?N(s.default,{size:s.default.Sizes.MIN,className:T.default.createButton,onClick:D},void 0,I.default.Messages.CREATE):null,N(d.default,{className:T.default.closeIcon,onClick:C,"aria-label":I.default.Messages.CLOSE},void 0,A)),M===m.StatusTab.Active?N(g.default,{channel:r,startThread:D,gotoThread:w}):N(S.default,{channel:r,startThread:D,gotoThread:w}))}P.displayName="ThreadBrowser"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchUserAffinities=function(e){void 0===e&&(e=!0);return o.default.needsRefresh()?(a.default.dirtyDispatch({type:i.ActionTypes.LOAD_USER_AFFINITIES}),r.default.get({url:i.Endpoints.USER_AFFINITIES,retries:e?3:0,oldFormErrors:!0}).then((function(e){var t=e.body;a.default.dispatch({type:i.ActionTypes.LOAD_USER_AFFINITIES_SUCCESS,affinities:t})}),(function(){a.default.dispatch({type:i.ActionTypes.LOAD_USER_AFFINITIES_FAILURE})}))):Promise.resolve()};var r=l(n(14)),a=l(n(2)),o=l(n(8415)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfettiCannon=t.ConfettiCanvas=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(8)),o=s(n(98)),i=n(57),l=n(483),u=s(n(7616));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){return e*(Math.PI/180)}var m=function(){function e(e){var t,n=e.sourceX,r=void 0===n?0:n,a=e.sourceY,i=void 0===a?0:a,l=e.sourceWidth,u=void 0===l?0:l,s=e.sourceHeight,d=void 0===s?0:s,f=e.size,c=e.x,p=e.y,v=e.color,m=e.rotation,_=void 0===m?0:m,h=e.rotationIncremental,E=void 0===h?0:h,g=e.angle,S=void 0===g?0:g,O=e.velocity,I=void 0===O?0:O,T=e.skew,C=void 0===T?0:T,b=e.skewAngleIncremental,M=void 0===b?0:b,N=e.gravity,A=void 0===N?0:N,P=e.dragCoefficient,R=void 0===P?0:P;this.id=o.default.v4(),this.creationTime=Date.now(),this.currentTime=Date.now(),this.rotationIncremental=E,this.rotation=_,this.velocityY=I*(t=S,Math.cos(y(t))),this.velocityX=I*function(e){return Math.sin(y(e))}(S),this.height=f,this.width=f,this.skewAngle=0,this.skew=0,this.skewCoefficient=C,this.skewAngleIncremental=M,this.position={x:c,y:p},this.color=v,this.gravity=A,this.dragCoefficient=R,this.sourceX=r,this.sourceY=i,this.sourceWidth=u,this.sourceHeight=d}e.drawSprite=function(e){var t=e.image,n=e.context,r=e.color,a=e.x,o=e.y,i=e.width,u=e.height;n.drawImage(t,a,o,i,u);for(var s=n.getImageData(a,o,i,u),d=(0,l.hexToRgb)(r),f=0;f<s.data.length;f+=4)s.data[f]=d.r,s.data[f+1]=d.g,s.data[f+2]=d.b;n.putImageData(s,a,o)};var t=e.prototype;return t.update=function(){var e=Date.now(),t=(e-this.currentTime)/100,n=this.gravity*t,r=this.velocityX>0?-1:1,a=this.velocityY>0?-1:1,o=Math.min(n,this.dragCoefficient*this.velocityX*this.velocityX)*r,i=Math.min(n,this.dragCoefficient*this.velocityY*this.velocityY)*a;this.velocityY+=n+i,this.velocityX+=o,this.position.x+=this.velocityX*t,this.position.y+=this.velocityY*t,this.rotation+=this.rotationIncremental*t,this.skewAngle+=this.skewAngleIncremental,this.skew=Math.sin(this.skewAngle)*this.skewCoefficient,this.currentTime=e},t.draw=function(e,t,n){t.save(),t.setTransform(1,this.skew/n,0,1,this.position.x,this.position.y),t.translate(this.width/2,this.height/2),t.rotate(this.rotation/n),t.translate(-this.width/2,-this.height/2),t.drawImage(e,this.sourceX*n,this.sourceY*n,this.sourceWidth*n,this.sourceHeight*n,0,0,this.width*n,this.width*n),t.restore()},e}(),_=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={canvas:null},t._confetti=new Map,t._animationFrameRequestId=null,t._isUnmounted=!1,t.setCanvasSize=function(){var e=t.state.canvas;if(null!=e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;e.width=r*t.devicePixelRatio,e.height=a*t.devicePixelRatio}},t.handleSetCanvas=function(e){t.setState({canvas:e})},t.handleTick=function(){if(!t._isUnmounted){var e=t.state.canvas;if(null!=e){var n=e.getContext("2d");null!=n&&(n.clearRect(0,0,e.width,e.height),t._confetti.forEach((function(e,r){e.confetti.update(),e.confetti.draw(e.spriteCanvas,n,t.devicePixelRatio),t.shouldDestroy(e.confetti)&&t._confetti.delete(r)})),t._confetti.size>0?t._animationFrameRequestId=window.requestAnimationFrame(t.handleTick):(n.clearRect(0,0,e.width,e.height),t._animationFrameRequestId=null))}}},t.handleAddConfetti=function(e,n){t._confetti.set(e.id,{confetti:e,spriteCanvas:n}),null==t._animationFrameRequestId&&t.handleTick()},t}p(t,e);var n=t.prototype;return n.componentDidMount=function(){window.addEventListener("resize",this.setCanvasSize)},n.componentWillUnmount=function(){this._isUnmounted=!0,window.removeEventListener("resize",this.setCanvasSize)},n.componentDidUpdate=function(e,t){null!=this.state.canvas&&null==t.canvas&&this.setCanvasSize()},n.shouldDestroy=function(e){var t=this.state.canvas;return null!=t&&(e.velocityY>0&&e.position.y-e.height*this.devicePixelRatio>t.height||e.velocityX>0&&e.position.x-e.width*this.devicePixelRatio>t.width||e.velocityX<0&&e.position.x+e.width*this.devicePixelRatio<0)},n.render=function(){var e=this.state.canvas;return r.createElement(r.Fragment,null,null!=e?this.props.children({canvas:e,setCanvasSize:this.setCanvasSize,addConfetti:this.handleAddConfetti}):null,r.createElement("canvas",{key:"canvas",className:this.props.className,ref:this.handleSetCanvas}))},c(t,[{key:"devicePixelRatio",get:function(){return window.devicePixelRatio||1}}]),t}(r.Component);t.ConfettiCanvas=_,_.displayName="ConfettiCanvas";var h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._spriteCanvas=null,t._interval=new i.Interval,t._spriteContext=null,t._fireCount=0,t._sprites=[],t._cachedDevicePixelRatio=window.devicePixelRatio||0,t.setSpriteCanvasSize=function(){if(null!=t._spriteCanvas){var e=t.props,n=e.size,r=e.sizeSpread,a=e.colors,o=e.sprites;t._spriteCanvas.width=(n+r+2)*a.length*t.devicePixelRatio,t._spriteCanvas.height=(n+r+2)*o.length*t.devicePixelRatio}},t.fireCannon=function(){var e=t.props,n=e.delay,r=e.setCanvasSize;t._fireCount>=n&&t.shouldFire()?(t.devicePixelRatio!==t._cachedDevicePixelRatio&&(r(),t.setSpriteCanvasSize(),t.drawSprites(),t._cachedDevicePixelRatio=t.devicePixelRatio),t.addConfetti(),t._fireCount++,t.shouldFire()||t.stopCannon()):t.stopCannon()},t.handleSetSpriteCanvas=function(e){t._spriteCanvas=e,t.setSpriteCanvasSize()},t}p(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;this._spriteContext=this.spriteCanvas.getContext("2d");var t=this.props.sprites.map((function(e){var t=new Image;t.src=e;var n=new Promise((function(e){t.onload=function(){return e()}}));return{image:t,loadPromise:n}}));this._sprites=t.map((function(e){return e.image})),Promise.all(t.map((function(e){return e.loadPromise}))).then((function(){return e.drawSprites()})),this.startCannon()},n.componentDidUpdate=function(e){e.firing!==this.props.firing&&(this.stopCannon(),this.startCannon())},n.componentWillUnmount=function(){this.stopCannon()},n.drawSprites=function(){var e=this,t=this._spriteContext;if(null!=t){var n=this.props,r=n.size,a=n.sizeSpread,o=n.colors,i=r+a;this._sprites.forEach((function(n,r){o.forEach((function(a,o){m.drawSprite({image:n,context:t,color:a,x:(i*o+2*o)*e.devicePixelRatio,y:(i*r+2*r)*e.devicePixelRatio,width:i*e.devicePixelRatio,height:i*e.devicePixelRatio})}))}))}},n.startCannon=function(){var e=this.props,t=e.firing,n=e.interval;this._fireCount=0,t&&(0===n&&this._fireCount?this.fireCannon():this._interval.start(n,this.fireCannon))},n.stopCannon=function(){this._interval.stop()},n.shouldFire=function(){var e=this.props,t=e.firing,n=e.fireCount,r=e.delay;return t&&(-1===n||this._fireCount<n+r)},n.createConfetti=function(){var e=this.props,t=e.canvas,n=e.position,r=e.angle,o=e.angleSpread,i=e.velocity,l=e.velocitySpread,u=e.size,s=e.minRotation,d=e.maxRotation,f=e.minRotationIncremental,c=e.maxRotationIncremental,p=e.skew,v=e.skewSpread,y=e.skewAngleIncremental,_=e.skewAngleIncrementalSpread,h=e.sizeSpread,E=e.gravity,g=e.dragCoefficient,S=e.colors,O=r-o/2,I=r+o/2,T=Math.max(E,i-l),C=i+l,b=Math.max(0,u-h),M=u+h,N=p-v,A=p+v,P=Math.max(0,y-_),R=y+_,L=t.width*(n.x/100),D=t.height*(n.y/100),w=a.default.random(s,d),j=a.default.random(f,c)*this.devicePixelRatio,k=S[a.default.random(S.length-1)],U=a.default.random(S.length-1),G=a.default.random(this._sprites.length-1),F={sourceWidth:M,sourceHeight:M,sourceX:U*M+2*U,sourceY:G*M+2*G,size:a.default.random(b,M),x:L,y:D,color:k,rotation:w,rotationIncremental:j,angle:a.default.random(O,I),velocity:a.default.random(T,C)*this.devicePixelRatio,skew:a.default.random(N,A)*this.devicePixelRatio,skewAngleIncremental:a.default.random(P,R)*this.devicePixelRatio,gravity:E*this.devicePixelRatio,dragCoefficient:g*this.devicePixelRatio};return new m(F)},n.addConfetti=function(){for(var e=this.props.addConfetti,t=0;t<this.props.count;t++){e(this.createConfetti(),this.spriteCanvas)}},n.render=function(){return r.createElement("canvas",{key:"sprite-canvas",className:u.default.spriteCanvas,ref:this.handleSetSpriteCanvas})},c(t,[{key:"spriteCanvas",get:function(){if(null==this._spriteCanvas)throw new Error("Unable to get sprite canvas");return this._spriteCanvas}},{key:"devicePixelRatio",get:function(){return window.devicePixelRatio||1}}]),t}(r.Component);t.ConfettiCannon=h,h.displayName="ConfettiCannon",h.defaultProps={count:50,position:{x:50,y:100},delay:0,fireCount:-1,firing:!0,angle:180,angleSpread:80,velocity:65,velocitySpread:50,size:12,sizeSpread:7,minRotation:0,maxRotation:359,minRotationIncremental:-.06,maxRotationIncremental:.06,skew:0,skewSpread:.5,skewAngleIncremental:.05,skewAngleIncrementalSpread:.01,gravity:9.8,dragCoefficient:.001,interval:1e3/60}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChatLayerProvider=t.ChatLayerContainer=void 0;var r=(0,n(423).createLayer)("Chat"),a=r.Layer,o=r.LayerContainer,i=r.LayerProvider,l=o;t.ChatLayerContainer=l;var u=i;t.ChatLayerProvider=u;var s=a;t.default=s},function(e,t,n){e.exports=n.p+"f78b68c74574f5aa4ddb092d24b9a2c0.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=null;var u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.initialize=function(e){var t;l=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null},a.getType=function(){return l},a.getState=function(){return{type:l}},r}(r.default.PersistedStore);u.persistKey="nuf";var s=new u(a.default,{NUF_NEW_USER:function(e){var t=e.newUserType;l=t},NUF_COMPLETE:function(e){l=null}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n;return e.type!==r.ParticipantTypes.ACTIVITY&&(e.type===r.ParticipantTypes.STREAM?null!=e.streamId:null!==(t=null===(n=e.voiceState)||void 0===n?void 0:n.selfVideo)&&void 0!==t&&t)};var r=n(691)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return i[e]};var r,a=n(34),o=n(691),i=Object.freeze(((r={})[o.ParticipantTypes.STREAM]=a.MediaEngineContextTypes.STREAM,r[o.ParticipantTypes.USER]=a.MediaEngineContextTypes.DEFAULT,r[o.ParticipantTypes.ACTIVITY]=a.MediaEngineContextTypes.DEFAULT,r))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VideoStreamFit=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=f(n(9)),l=n(252),u=f(n(8524)),s=f(n(151)),d=f(n(7939));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.VideoStreamFit=a,function(e){e.CONTAIN="contain",e.COVER="cover"}(a||(t.VideoStreamFit=a={}));var y=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleReady=function(){n.state.loading&&n.setState({loading:!1})},n.state={loading:!0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.renderPlaceholder=function(){var e=this.props.streamPreviewURL,t=null!=e?p("img",{src:e,alt:"",className:d.default.previewImage}):p(u.default,{aspectRatio:16/9,className:d.default.emptyPreviewWrapper},void 0,p("div",{className:d.default.emptyPreview}));return p(o.Fragment,{},void 0,t,p(s.default,{className:d.default.spinner}))},a.render=function(){var e,t,n=this.props,r=n.streamId,a=n.onResize,o=n.wrapperClassName,u=n.videoComponent,s=n.className,f=n.fit,c=n.mirror,v=n.paused,y=this.state.loading;return p("div",{className:(0,i.default)(d.default.wrapper,o)},void 0,null!=r&&p(u,{className:(0,i.default)(d.default.video,(0,l.getClass)(d.default,"video",f),(e={},e[d.default.mirror]=c,e),s),streamId:r,onResize:a,onReady:this.handleReady,paused:v}),v?null:p("div",{className:(0,i.default)(d.default.previewWrapper,(t={},t[d.default.loading]=y,t))},void 0,y&&this.renderPlaceholder()))},r}(o.PureComponent);y.displayName="VideoStream",y.Fit=a,y.defaultProps={fit:a.CONTAIN,mirror:!1,paused:!1};var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.74273 19H16C17.103 19 18 18.104 18 17V14.618L20.553 15.894C20.694 15.965 20.847 16 21 16C21.183 16 21.365 15.949 21.526 15.851C21.82 15.668 22 15.347 22 15V9C22 8.653 21.82 8.332 21.526 8.149C21.231 7.966 20.862 7.951 20.553 8.105L18 9.382V7.74273L6.74273 19ZM12.2574 5H4C2.897 5 2 5.897 2 7V15.2574L12.2574 5Z",fill:d}),s("rect",{y:"19.9623",width:"26",height:"2",transform:"rotate(-45 0 19.9623)",className:f,fill:d}))}d.displayName="CallVideoCameraDisabled"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=n(364),i=n(196),l=n(140);n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={},f={},c=new Set;function p(){d={},f={}}var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var u=r.prototype;return u.getPreviewURL=function(e,t,n){var r=(0,l.encodeStreamKey)({streamType:null!=e?i.StreamTypes.GUILD:i.StreamTypes.CALL,guildId:e,channelId:t,ownerId:n}),u=d[r];return null==u||Date.now()>u.expires?(c.has(r)||(c.add(r),a.default.wait((function(){(0,o.fetchStreamPreview)(e,t,n)}))),null):u.url},u.getPreviewURLForStreamKey=function(e){var t=(0,l.decodeStreamKey)(e),n=t.guildId,r=t.channelId,a=t.ownerId;return this.getPreviewURL(n,r,a)},u.getIsPreviewLoading=function(e,t,n){var r=(0,l.encodeStreamKey)({streamType:null!=e?i.StreamTypes.GUILD:i.StreamTypes.CALL,guildId:e,channelId:t,ownerId:n});return c.has(r)},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return p()},LOGOUT:function(e){return p()},STREAM_PREVIEW_FETCH_START:function(e){var t=e.streamKey;f[t]=(f[t]||0)+1,c.add(t)},STREAM_PREVIEW_FETCH_SUCCESS:function(e){var t=e.streamKey,n=e.previewURL;d[t]={url:n,expires:Date.now()+12e4},f[t]=0,c.delete(t)},STREAM_PREVIEW_FETCH_FAIL:function(e){var t=e.streamKey,n=e.retryAfter;d[t]={url:null,expires:Date.now()+(null!=n?n:1e4*f[t])},c.delete(t)},VOICE_STATE_UPDATE:function(e){var t=e.userId,n=e.guildId,r=e.channelId;if(e.selfStream)return!1;var a=(0,l.encodeStreamKey)({streamType:null!=n?i.StreamTypes.GUILD:i.StreamTypes.CALL,guildId:n,channelId:r,ownerId:t});delete d[a],delete f[a]}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(9)),o=s(n(8744)),i=s(n(8288)),l=s(n(6)),u=s(n(7957));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e){var t,n=e.popoutOpen,s=e.onClosePopout,d=e.onOpenPopout,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["popoutOpen","onClosePopout","onOpenPopout"]),p=n?l.default.Messages.POPOUT_RETURN:l.default.Messages.POPOUT_PLAYER;return r.createElement(i.default,f({label:p,onClick:n?s:d,iconComponent:o.default,iconClassName:(0,a.default)((t={},t[u.default.popIn]=n,t))},c))}c.displayName="PopoutButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=m(n(8273)),l=m(n(8264)),u=m(n(8268)),s=m(n(55)),d=m(n(278)),f=m(n(279)),c=m(n(24)),p=m(n(8300)),v=n(1),y=m(n(7621));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={popoutOpen:!1},t.handleClickUser=function(){var e=t.props.onPopoutOpen;t.setState({popoutOpen:!t.state.popoutOpen}),e&&e()},t.handleUserPopoutClose=function(){var e=t.props.onPopoutClose;t.setState({popoutOpen:!1}),e&&e()},t.renderUserPopout=function(e){var n,r=t.props,a=r.className,i=r.disablePopout,l=r.onContextMenu,u=r.user,d=r.status,v=r.textClassName,m=r.nick,_=r.guildId;return E(s.default,{align:s.default.Align.CENTER,className:(0,o.default)(y.default.memberListItem,a,(n={},n[y.default.popoutDisabled]=i,n)),onContextMenu:l,onMouseDown:e.onMouseDown,onKeyDown:e.onKeyDown,onClick:t.handleClickUser},void 0,E(f.default,{src:u.getAvatarURL(_),className:y.default.avatar,"aria-label":u.username,size:f.default.Sizes.SIZE_24,status:d}),E(c.default,{className:(0,o.default)(y.default.memberListItemTag,v)},void 0,E(p.default,{user:u,nick:m,usernameClass:y.default.username,hideDiscriminator:!0})))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n),r.prototype.render=function(){var e=this,t=this.state.popoutOpen,n=this.props,r=n.user,o=n.analyticsContext,i=n.disablePopout,s=n.guildId,f={location:h({},o.location,{object:v.AnalyticsObjects.LIST_ITEM})};return E(d.default,{preload:function(){return(0,l.default)(r.id,r.getAvatarURL(s))},renderPopout:function(e){return a.createElement(u.default,h({},e,{userId:r.id,analyticsParams:f}))},position:d.default.Positions.LEFT,onRequestClose:this.handleUserPopoutClose,shouldShow:!i&&t},void 0,(function(t){return e.renderUserPopout(t)}))},r}(a.Component);S.displayName="UserListItem",S.defaultProps={disablePopout:!1};var O=(0,i.default)(S);t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M20 11V13.5H4V4.5H13V2.5H4C3.46957 2.5 2.96086 2.71071 2.58579 3.08579C2.21071 3.46086 2 3.96957 2 4.5L2 15.5C2 16.0304 2.21071 16.5391 2.58579 16.9142C2.96086 17.2893 3.46957 17.5 4 17.5H11V19.5H7V21.5H17V19.5H13V17.5H20C20.5304 17.5 21.0391 17.2893 21.4142 16.9142C21.7893 16.5391 22 16.0304 22 15.5V11H20Z",fill:d}),s("path",{className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M23 2.45174L21.5483 1L19.0051 3.55341L16.4517 1L15 2.45174L17.5534 4.99485L15 7.54826L16.4517 9L19.0051 6.44659L21.5483 9L23 7.54826L20.4466 4.99485L23 2.45174Z",fill:d}))}d.displayName="StopWatchingStream"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickSelectPopout=T,t.default=void 0;var r,a=y(n(0)),o=p(n(9)),i=y(n(680)),l=p(n(61)),u=p(n(55)),s=n(721),d=n(85),f=p(n(272)),c=p(n(7637));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){m(o,r,a,i,l,"next",e)}function l(e){m(o,r,a,i,l,"throw",e)}i(void 0)}))}}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,S(e,t)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){function t(){return e.apply(this,arguments)||this}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.value,r=e.renderValue,a=e.className;return E(u.default,{className:(0,o.default)(c.default.quickSelect,a),align:u.default.Align.CENTER},void 0,E("div",{className:c.default.quickSelectLabel},void 0,t),E(u.default,{align:u.default.Align.CENTER,className:c.default.quickSelectClick},void 0,E("div",{className:c.default.quickSelectValue},void 0,r?r(n):n.label),E("div",{className:c.default.quickSelectArrow})))},t}(a.PureComponent);O.displayName="QuickSelect";var I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props,n=e.option,r=e.onChange;r&&r(n)},t}return g(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.selected,r=t.renderOption,u=t.option;return E(i.ListNavigatorItem,{id:u.key},void 0,(function(t){return a.createElement(l.default,h({focusProps:{enabled:!1},className:(0,o.default)(c.default.quickSelectPopoutOption,{selected:n}),onClick:e.handleClick},t,{role:"option"}),r(u,n))}))},t}(a.PureComponent);function T(e){var t,n=e.options,r=e.value,l=e.scroller,u=e.renderOption,p=e.onChange,v=e.className,y=(0,o.default)(c.default.quickSelectPopout,v,((t={})[c.default.quickSelectPopoutScroll]=l,t)),m=n.map((function(e){var t=null!=r&&e.value===r.value,n=t?void 0:p;return E(I,{className:c.default.quickSelectPopoutOption,renderOption:u,option:e,onChange:n,selected:t},e.key||e.value)})),g=(0,d.useUID)(),S=(0,i.default)({id:g,isEnabled:!0,wrap:!0,scrollToStart:function(){return _(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},scrollToEnd:function(){return _(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()}}),O=S.containerProps,T=O.ref,C=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(O,["ref"]);return(0,s.useFocusLock)(T),E(i.ListNavigatorProvider,{navigator:S},void 0,a.createElement("div",h({ref:T,className:y},C,{role:"listbox"}),l?E(f.default,{className:c.default.quickSelectScroller},void 0,m):m))}I.displayName="QuickSelectPopoutOption",T.displayName="QuickSelectPopout";var C=O;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RegionSelectModal=t.RegionName=t.RegionFlag=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(3),l=y(n(8664)),u=y(n(8665)),s=y(n(61)),d=y(n(151)),f=n(35),c=n(41),p=y(n(6)),v=y(n(7638));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t,r,a=e.region,i=e.className,l=void 0===i?v.default.regionSelectFlag:i;if("unknown"===a.id)r=n(8454);else{var u=a.id.replace(/^vip-/,"");try{r=n(8951)("./"+u+".png")}catch(e){r=n(8454)}}return h("div",{className:(0,o.default)(l,(t={},t[v.default.vip]=a.vip,t)),style:{backgroundImage:'url("'+r+'")'}})};t.RegionFlag=E,E.displayName="RegionFlag";var g=function(e){var t=e.region,n=e.className;return h("div",{className:void 0===n?v.default.regionSelectName:n},void 0,t.name.replace(/ \(VIP\)$/,""))};t.RegionName=g,g.displayName="RegionName";var S=function(e){var t=e.region,n=e.onClick;return h(s.default,{className:v.default.regionSelectModalOption,onClick:function(){return n(t)}},void 0,h(E,{region:t}),h(g,{region:t}))};S.displayName="RegionOption";var O=function(e){var t=e.onChange,n=e.onClose,r=e.regions,a=e.transitionState;function o(e){t(e),n&&n()}return h(f.ModalRoot,{transitionState:a,className:v.default.regionSelectModal,"aria-label":p.default.Messages.REGION_SELECT_HEADER},void 0,h("div",{className:v.default.regionSelectModalHeader},void 0,p.default.Messages.REGION_SELECT_HEADER),h("div",{className:v.default.regionSelectModalOptions},void 0,r.map((function(e,t){return h(S,{region:e,onClick:o},t)}))),h("div",{className:v.default.regionSelectModalFooter},void 0,p.default.Messages.REGION_SELECT_FOOTER))};t.RegionSelectModal=O,O.displayName="RegionSelectModal";var I=function(e){var t,n=e.guildId,r=void 0===n?null:n,f=e.id,y=e.onChange,m=e.value,S=e.disabled,I=void 0!==S&&S,T=e.changeRegionButtonText,C=void 0===T?p.default.Messages.CHANGE:T,b=(0,i.useStateFromStores)([u.default],(function(){return u.default.getRegions(r)}),[r]);function M(e){y(e.id)}if(a.useEffect((function(){null==b&&l.default.fetchRegions(r)}),[r,b]),null==b)return h("div",{className:(0,o.default)(v.default.regionSelect,v.default.regionSelectLoading)},void 0,h(d.default,{type:d.default.Type.CHASING_DOTS}));var N=b.find((function(e){return e.id===m}))||{id:"unknown",name:p.default.Messages.UNKNOWN_REGION,vip:!1,sample_hostname:"",sample_port:0,optimal:!1,deprecated:!1};return h(s.default,{className:(0,o.default)(v.default.regionSelect,(t={},t[v.default.disabled]=I,t)),onClick:function(){if(null!=b){var e=b.filter((function(e){return!e.deprecated}));(0,c.openModal)((function(t){return a.createElement(O,_({regions:e,onChange:M},t))}))}}},void 0,h("div",{id:f,className:v.default.regionSelectInner},void 0,h(E,{region:N}),h(g,{region:N})),h("button",{type:"button"},void 0,C))};I.displayName="RegionSelect";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M11 5V3C16.515 3 21 7.486 21 13H19C19 8.589 15.411 5 11 5ZM17 13H15C15 10.795 13.206 9 11 9V7C14.309 7 17 9.691 17 13ZM11 11V13H13C13 11.896 12.105 11 11 11ZM14 16H18C18.553 16 19 16.447 19 17V21C19 21.553 18.553 22 18 22H13C6.925 22 2 17.075 2 11V6C2 5.447 2.448 5 3 5H7C7.553 5 8 5.447 8 6V10C8 10.553 7.553 11 7 11H6C6.063 14.938 9 18 13 18V17C13 16.447 13.447 16 14 16Z"}))}d.displayName="CallJoin"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=y(n(23)),o=n(3),i=y(n(8283)),l=y(n(15)),u=y(n(40)),s=y(n(8368)),d=n(41),f=n(217),c=y(n(8288)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e){var t=e.stream,n=e.channel,y=e.exitFullScreen,m=e.appContext,h=e.analyticsLocation,E=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["stream","channel","exitFullScreen","appContext","analyticsLocation"]),g=null==n?void 0:n.getGuildId(),S=(0,o.useStateFromStores)([l.default],(function(){return null!=g?l.default.getGuild(g):null}),[g]);return function(e,t){return null!=e&&null!=t&&u.default.can(p.Permissions.CREATE_INSTANT_INVITE,t)}(S,n)?r.createElement(c.default,_({onClick:function(){(0,a.default)(null!=S,"guild cannot be null"),(0,a.default)(null!=n,"channel cannot be null"),function(e,t,n,a,o,l){null==o||o(),(0,d.openModal)((function(a){return r.createElement(i.default,_({},a,{guild:e,channel:t,streamUserId:n,analyticsLocation:l,source:p.InstantInviteSources.STREAM_INVITE}))}),{modalKey:"stream-invite-modal"},a===p.AppContext.POPOUT?f.POPOUT_MODAL_CONTEXT:f.DEFAULT_MODAL_CONTEXT)}(S,n,null==t?void 0:t.ownerId,m,y,h)},iconComponent:s.default,label:v.default.Messages.ACTIVITY_INVITE_MODAL_INVITE},E)):null}h.displayName="InviteButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M19 3H5V5H7V12H5V14H11V22H13V14H19V12H17V5H19V3Z"})))}d.displayName="PinLayer"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r},l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,u=e.color,f=void 0===u?"currentColor":u,c=e.foregroundColor,p=void 0===c?l.Colors.STATUS_RED:c,v=e.foreground,y=e.background,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foregroundColor","foreground","background"]);return o.createElement("svg",s({},(0,i.default)(m),{width:n,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),d("g",{fill:"none",fillRule:"evenodd"},void 0,d("path",{className:v,fill:p,d:"M21.47,3.39,20.14,2.05,2.53,19.66,3.86,21l4.41-4.4,1.3-1.31,1.75-1.74,3.83-3.83Z"})),d("g",{fill:"none"},void 0,d("polygon",{points:"17 11.14 16.55 11.59 14.14 14 19 14 19 12 17 12 17 11.14",className:y,fill:f}),d("polygon",{points:"16.91 3 5 3 5 5 7 5 7 12 5 12 5 14 5.91 14 16.91 3",className:y,fill:f}),d("polygon",{points:"12.72 15.42 11 17.14 11 22 13 22 13 15.14 12.72 15.42",className:y,fill:f})))}f.displayName="UnpinLayer"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=E(n(0)),o=_(n(28)),i=_(n(282)),l=_(n(278)),u=_(n(8952)),s=n(8282),d=n(121),f=_(n(9706)),c=_(n(9711)),p=E(n(8963)),v=_(n(9713)),y=n(1),m=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=S(c.default,{});function I(e){var t=e.onOpen,n=e.onClose,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onOpen","onClose"]),c=a.useState(!1),_=c[0],h=c[1],E=function(){var e=a.useState((function(){return o.default.get("recentsButtonTab2")||p.Tab.Unreads})),t=e[0],n=e[1];return t!==p.Tab.Mentions&&t!==p.Tab.Unreads&&(t=p.Tab.Unreads),[t,a.useCallback((function(e){n(e),o.default.set("recentsButtonTab2",e)}),[])]}(),I=E[0],T=E[1],C=function(e){var t=a.useState((function(){return o.default.get("seenInboxTutorial",!1)})),n=t[0],r=t[1],i=a.useCallback((function(){r(!0),o.default.set("seenInboxTutorial",!0)}),[]);return{showTutorial:!n&&e===p.Tab.Unreads,setSeenTutorial:i}}(I),b=C.showTutorial,M=C.setSeenTutorial,N=a.useCallback((function(){h(!1),_&&(null==n||n())}),[n,_]),A=a.useCallback((function(){h(!_),_?null==n||n():null==t||t()}),[n,t,_]),P=a.useCallback((function(){A(),T(p.Tab.Unreads)}),[T,A]);a.useEffect((function(){return d.ComponentDispatch.subscribe(y.ComponentActions.TOGGLE_INBOX_UNREADS_TAB,P),function(){d.ComponentDispatch.unsubscribe(y.ComponentActions.TOGGLE_INBOX_UNREADS_TAB,P)}}),[P]);var R=a.useCallback((function(e){e.shiftKey||N()}),[N]),L=S(f.default,{onJump:R,header:S(p.default,{tab:I,setTab:T},void 0,O)}),D=S(v.default,{onJump:R,setTab:T,showTutorial:b,setSeenTutorial:M,closePopout:N});return S(l.default,{animation:l.default.Animation.NONE,position:l.default.Positions.BOTTOM,align:l.default.Align.RIGHT,autoInvert:!1,shouldShow:_,onRequestClose:N,renderPopout:function(){return S(i.default,{},void 0,I===p.Tab.Mentions?L:D)}},void 0,(function(e,t){return a.createElement(s.Icon,g({},r,e,{onClick:A,icon:u.default,"aria-label":m.default.Messages.INBOX,tooltip:t?null:m.default.Messages.INBOX,selected:t}))}))}I.displayName="RecentsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(10)),i=u(n(400)),l=u(n(201));n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=null;var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(o.default,i.default,l.default)},a.getApps=function(){return d},r}(r.default.Store))(a.default,{USER_AUTHORIZED_APPS_UPDATE:function(e){d=e.apps}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(3)),a=d(n(28)),o=d(n(2)),i=n(1209),l=d(n(15)),u=d(n(107)),s=d(n(12));n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=new Date(Date.UTC(2021,6,30)),p=!1;function v(){if(Date.now()>0)return!1;var e=s.default.getCurrentUser(),t=u.default.getGuildId();if(!t||!e)return!1;if(a.default.get("seenThreadsWelcome")||!1)return!1;if(!(0,i.computeCanSeeThreadsInGuild)(t))return!1;var n=e.createdAt;return Date.now()-n.getTime()>=6048e5&&n<c&&(p=!0,a.default.set("seenThreadsWelcome",!0),!0)}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(l.default,u.default,s.default)},a.getWillShow=function(){return p},r}(r.default.Store))(o.default,{CONNECTION_OPEN:function(e){return v()},CHANNEL_SELECT:function(e){return v()}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=null,s=[o.DispatchErrorCodes.REDISTRIBUTABLE_INSTALL_FAILED,o.DispatchErrorCodes.POST_INSTALL_FAILED,o.DispatchErrorCodes.POST_INSTALL_CANCELLED],d=[o.DispatchErrorCodes.APPLICATION_NOT_FOUND,o.DispatchErrorCodes.APPLICATION_LOAD_FAILED,o.DispatchErrorCodes.INTERRUPTED,o.DispatchErrorCodes.DESERIALIZATION_FAILED];var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r.prototype.getLastError=function(){return u},r}(r.default.Store))(a.default,{DISPATCH_APPLICATION_LAUNCH_SETUP_START:function(e){null!=u&&null!=u.code&&s.includes(u.code)&&(u=null)},DISPATCH_APPLICATION_ERROR:function(e){var t=e.error;u=null!=t.code&&d.includes(t.code)?null:t}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(28)),o=l(n(2)),i=l(n(8956));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=null,d=null,f=null;var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var o=r.prototype;return o.initialize=function(){f=a.default.get("MaintenanceStore")},o.getIncident=function(){return s},o.getScheduledMaintenance=function(){return null!=d&&d.id!==f?d:null},r}(r.default.Store))(o.default,{CONNECTION_OPEN:function(e){return s=null,void i.default.checkScheduledMaintenances()},STATUS_PAGE_INCIDENT:function(e){s=e.incident},STATUS_PAGE_SCHEDULED_MAINTENANCE:function(e){d=e.maintenance},STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK:function(e){return function(){if(null==d)return!1;f=d.id,a.default.set("MaintenanceStore",f)}()}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.surveyHide=function(e,t){a.default.dispatch({type:u.ActionTypes.SURVEY_HIDE,key:e}),t?o.default.track(u.AnalyticEvents.APP_NOTICE_CLOSED,{notice_type:u.NoticeTypes.SURVEY,survey_id:e,dismissed:t}):o.default.track(u.AnalyticEvents.APP_NOTICE_PRIMARY_CTA_OPENED,{notice_type:u.NoticeTypes.SURVEY})},t.surveyFetch=function(){return i.default.get({url:u.Endpoints.USER_SURVEY,trackedActionData:{event:r.NetworkActionNames.USER_SURVEY_FETCH,metadata:function(e){var t,n=null==e||null===(t=e.body)||void 0===t?void 0:t.survey;return(0,l.exact)({key:null==n?void 0:n.key})}}}).then((function(e){var t;a.default.dispatch({type:u.ActionTypes.SURVEY_FETCHED,survey:null==e||null===(t=e.body)||void 0===t?void 0:t.survey})}),(function(){a.default.dispatch({type:u.ActionTypes.SURVEY_FETCHED,survey:null})}))};var r=n(95),a=s(n(2)),o=s(n(13)),i=s(n(482)),l=n(1274),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(98)),i=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,l=void 0===r?24:r,u=e.color,f=void 0===u?"currentColor":u,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]),v=a.useRef(o.default.v4());return a.createElement("svg",s({},(0,i.default)(p),{width:n,height:l,viewBox:"0 0 24 24"}),d("g",{"clip-path":"url(#"+v.current+")"},void 0,d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.92871 13.4149L10.5857 19.0709L18.3639 11.2927C19.7781 9.87859 22.6066 6.48376 21.1923 2.80748C17.5153 1.3932 14.1213 4.22173 12.7074 5.63625L4.92871 13.4149ZM16.064 9.93309C17.1686 9.93309 18.064 9.03766 18.064 7.93309C18.064 6.82852 17.1686 5.93309 16.064 5.93309C14.9594 5.93309 14.064 6.82852 14.064 7.93309C14.064 9.03766 14.9594 9.93309 16.064 9.93309Z",fill:f,className:c}),d("path",{d:"M3.41357 16.7844C2.34946 17.8496 2.00004 22 2.00004 22C2.00004 22 6.15125 21.6521 7.21627 20.5869C7.71243 20.0915 7.96638 19.4494 8 18.8004L5.21285 18.7866L5.19829 16C4.54947 16.0336 3.90973 16.2881 3.41357 16.7844Z",fill:f,className:c}),d("path",{d:"M9.17144 9.17151H3.51459L1.74684 10.9393L6.34302 11.9999L9.17144 9.17151Z",fill:f,className:c}),d("path",{d:"M14.8283 14.8283V20.4852L13.0606 22.2529L11.9999 17.6568L14.8283 14.8283Z",fill:f,className:c})),d("defs",{},void 0,d("clipPath",{id:v.current},void 0,d("rect",{width:"24",height:"24",fill:c}))))}f.displayName="Rocket"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.className,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{className:f,width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:c,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M16.781 2.27293L14.081 5.7126H9.919L7.219 2.27293L8.781 1L12 5.10008L15.219 1L16.781 2.27293ZM4 6.73175H20C21.1 6.73175 22 7.649 22 8.77007V18.9617C22 20.0828 21.1 21 20 21H4C2.9 21 2 20.0828 2 18.9617V8.77007C2 7.649 2.9 6.73175 4 6.73175ZM4 18.9617H16V8.77007H4V18.9617ZM18 16.4138C18 16.9764 18.448 17.4329 19 17.4329C19.552 17.4329 20 16.9764 20 16.4138C20 15.8512 19.552 15.3946 19 15.3946C18.448 15.3946 18 15.8512 18 16.4138ZM18 11.318C18 11.8806 18.448 12.3371 19 12.3371C19.552 12.3371 20 11.8806 20 11.318C20 10.7554 19.552 10.2988 19 10.2988C18.448 10.2988 18 10.7554 18 11.318Z"}))}d.displayName="Television"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.useStateFromStores)([o.default,a.default],(function(){var t=a.default.getId();return o.default.getPermissionsForUser(t,e)}),[e])};var r=n(3),a=i(n(11)),o=i(n(205));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"guild",id:"2021-07_live_stage_notifications",label:"Control and receive live stage notifications.",defaultConfig:{showNotificationSurfaces:!1},treatments:[{id:1,label:"Show live stage notification surfaces.",config:{showNotificationSurfaces:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=h(n(8479)),l=h(n(308)),u=h(n(764)),s=h(n(15)),d=n(85),f=h(n(291)),c=n(35),p=h(n(47)),v=h(n(24)),y=h(n(9727)),m=h(n(6)),_=h(n(7657));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var S=g(f.default,{width:32,height:32});function O(e){var t=e.transitionState,n=e.onClose,r=e.channel,f=(0,d.useUID)(),h=a.useContext(i.default),E=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuild(r.guild_id)})),O=(0,y.default)(r,n),I=O.loading,T=O.error,C=O.onSave;return null==E?null:g(c.ModalRoot,{transitionState:t,"aria-labelledby":f},void 0,g("div",{className:_.default.header},void 0,g(l.default,{},void 0,g("div",{className:_.default.icon},void 0,S)),g(p.default,{size:p.default.Sizes.SIZE_24,className:_.default.text},void 0,m.default.Messages.START_STAGE_CHANNEL_EVENT_MODAL_TITLE),g(v.default,{color:v.default.Colors.HEADER_SECONDARY,className:_.default.text},void 0,m.default.Messages.START_STAGE_CHANNEL_EVENT_MODAL_SUBTITLE)),g(u.default,{guild:E,channel:r,onEventSave:C,error:T,loading:I,onClose:n,appContext:h,isEvent:!0}))}O.displayName="ScheduleEventModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(9)),o=d(n(61)),i=d(n(5950)),l=d(n(47)),u=d(n(24)),s=d(n(7991));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.className,n=e.iconContainerClassName,r=e.icon,d=e.color,f=e.title,p=e.description,v=e.onClick;return c(o.default,{className:(0,a.default)(s.default.container,t),onClick:v},void 0,c("div",{style:{backgroundColor:d},className:(0,a.default)(s.default.icon,n)},void 0,r),c("div",{className:s.default.textContainer},void 0,c(l.default,{size:u.default.Sizes.SIZE_16},void 0,f),c(u.default,{size:u.default.Sizes.SIZE_12,color:u.default.Colors.HEADER_SECONDARY},void 0,p)),c(i.default,{height:16,width:16,className:s.default.caret}))}p.displayName="GuildEventPrompt"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=j;var r,a=A(n(0)),o=M(n(8)),i=M(n(3)),l=n(34),u=M(n(288)),s=M(n(8766)),d=M(n(5841)),f=M(n(51)),c=M(n(55)),p=M(n(1162)),v=M(n(1159)),y=M(n(8360)),m=M(n(8522)),_=n(85),h=M(n(476)),E=A(n(159)),g=n(35),S=M(n(24)),O=n(8425),I=n(1),T=M(n(6)),C=M(n(7659)),b=M(n(370));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleAutoThresholdChange=function(e){var n=t.props,r=n.onThresholdChange,a=n.threshold;r&&r(a,e)},t.handleSensitivityChange=function(e){var n=t.props,r=n.onThresholdChange,a=n.autoThreshold;r&&r(-1*(100-e),a)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var a=r.prototype;return a.handleValueRender=function(e){return(-1*(100-e)).toFixed(0)+"dB"},a.renderAutomaticVADToggle=function(){var e=this,t=this.props.autoThreshold;return P(_.UID,{},void 0,(function(n){return P(c.default,{className:b.default.marginBottom4},void 0,P(E.default,{tag:E.Tags.H3},void 0,P("label",{htmlFor:n},void 0,T.default.Messages.FORM_LABEL_AUTOMATIC_VAD)),P(m.default,{id:n,checked:t,onChange:e.handleAutoThresholdChange}))}))},a.renderSlider=function(){var e=this.props,t=e.autoThreshold,n=e.threshold;if(!t)return P(y.default,{initialValue:n+100,onValueRender:this.handleValueRender,onValueChange:this.handleSensitivityChange})},a.render=function(){return P(h.default,{title:T.default.Messages.FORM_LABEL_INPUT_SENSITIVTY,className:b.default.marginBottom8},void 0,this.renderAutomaticVADToggle(),this.renderSlider())},r}(a.PureComponent);L.displayName="VoiceSensitivity";var D=function(e){var t,n=e.mediaEngineContext,r=e.inputMode,i=e.shortcut,l=e.delay,d=e.vadThreshold,f=e.vadAutoThreshold,c=e.inputDevices,m=e.inputDeviceId,_=e.inputVolume,E=e.outputDeviceId,g=e.outputDevices,S=e.outputVolume,C=e.speaking,M=void 0!==C&&C,N=o.default.first(c),A=null!=N&&N.disabled,R=o.default.first(g),D=null!=R&&R.disabled,w=[{value:I.InputModes.VOICE_ACTIVITY,name:T.default.Messages.INPUT_MODE_VAD},{value:I.InputModes.PUSH_TO_TALK,name:T.default.Messages.INPUT_MODE_PTT}];return t=r===I.InputModes.PUSH_TO_TALK?P(a.Fragment,{},void 0,P(h.default,{title:T.default.Messages.FORM_LABEL_SHORTCUT,className:b.default.marginBottom20},void 0,P(s.default,{defaultValue:i,onChange:function(e){return u.default.setMode(r,{shortcut:e},n)}})),P(h.default,{title:T.default.Messages.INPUT_MODE_PTT_RELEASE_DELAY,className:b.default.marginBottom8},void 0,P(y.default,{initialValue:l,onValueChange:function(e){return u.default.setMode(r,{delay:e},n)},onValueRender:function(e){return e>=1e3?(e/=1e3).toFixed(2)+"s":e.toFixed(0)+"ms"},maxValue:I.MAX_PTT_RELEASE_DELAY}))):P(L,{speaking:M,inputMode:r,threshold:d,autoThreshold:f,onThresholdChange:function(e,t){return u.default.setMode(r,{threshold:e,autoThreshold:t},n)}}),P(a.Fragment,{},void 0,P(h.default,{title:T.default.Messages.FORM_LABEL_INPUT_DEVICE,className:b.default.marginBottom20},void 0,P(v.default,{value:m,clearable:!1,searchable:!1,onChange:function(e){var t=e.value;return u.default.setInputDevice(t,"Voice Settings")},options:o.default.map(c,(function(e){return{value:e.id,label:e.name}})),disabled:A})),P(h.default,{title:T.default.Messages.FORM_LABEL_INPUT_VOLUME,className:b.default.marginBottom20},void 0,P(y.default,{initialValue:(0,O.amplitudeToPerceptual)(_),asValueChanges:function(e){return u.default.setInputVolume((0,O.perceptualToAmplitude)(e))}})),P(h.default,{title:T.default.Messages.FORM_LABEL_OUTPUT_DEVICE,className:b.default.marginBottom20},void 0,P(v.default,{value:E,clearable:!1,searchable:!1,onChange:function(e){var t=e.value;return u.default.setOutputDevice(t,"Voice Settings")},options:o.default.map(g,(function(e){return{value:e.id,label:e.name}})),disabled:D})),P(h.default,{title:T.default.Messages.FORM_LABEL_OUTPUT_VOLUME,className:b.default.marginBottom20},void 0,P(y.default,{initialValue:(0,O.amplitudeToPerceptual)(S),maxValue:200,asValueChanges:function(e){return u.default.setOutputVolume((0,O.perceptualToAmplitude)(e))}})),P(h.default,{title:T.default.Messages.FORM_LABEL_INPUT_MODE,className:b.default.marginBottom20},void 0,P(p.default,{onChange:function(e){var t=e.value;return u.default.setMode(t,{},n)},options:w,value:r})),t)};D.displayName="Content";var w=i.default.connectStores([f.default],(function(e){var t=e.mediaEngineContext;return{inputVolume:f.default.getInputVolume(),outputVolume:f.default.getOutputVolume(),inputDeviceId:f.default.getInputDeviceId(),inputDevices:f.default.getInputDevices(),outputDevices:f.default.getOutputDevices(),outputDeviceId:f.default.getOutputDeviceId(),inputMode:f.default.getMode(t),shortcut:f.default.getModeOptions(t).shortcut,vadThreshold:f.default.getModeOptions(t).threshold,vadAutoThreshold:f.default.getModeOptions(t).autoThreshold,delay:f.default.getModeOptions(t).delay}}))(D);function j(e){var t;return(0,d.default)((function(){null!=I.CURRENT_APP_CONTEXT&&e.onClose()})),P(g.ModalRoot,{transitionState:e.transitionState,"aria-label":T.default.Messages.VOICE_SETTINGS},void 0,P(g.ModalHeader,{},void 0,P(c.default.Child,{},void 0,P(E.default,{tag:E.default.Tags.H1,className:b.default.marginReset},void 0,T.default.Messages.VOICE_SETTINGS),P(S.default,{size:S.default.Sizes.SIZE_12,className:C.default.title},void 0,e.title)),P(c.default.Child,{grow:0},void 0,P(g.ModalCloseButton,{onClick:e.onClose}))),P(g.ModalContent,{},void 0,P(w,{mediaEngineContext:null!==(t=e.mediaEngineContext)&&void 0!==t?t:l.MediaEngineContextTypes.DEFAULT})))}j.displayName="VoiceSettingsModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=de;var r,a,o=Q(n(0)),i=X(n(8)),l=X(n(5)),u=n(67),s=n(3),d=X(n(8477)),f=X(n(8416)),c=X(n(1282)),p=X(n(8489)),v=n(180),y=n(1271),m=X(n(8512)),_=n(31),h=X(n(10)),E=X(n(1252)),g=X(n(684)),S=X(n(15)),O=X(n(70)),I=Q(n(181)),T=X(n(12)),C=X(n(29)),b=X(n(467)),M=X(n(1160)),N=X(n(55)),A=X(n(1162)),P=X(n(8267)),R=X(n(149)),L=X(n(1165)),D=X(n(476)),w=X(n(474)),j=X(n(159)),k=X(n(8672)),U=X(n(9733)),G=X(n(8307)),F=X(n(8374)),B=X(n(8490)),H=n(35),x=X(n(47)),V=X(n(9734)),W=n(374),Y=X(n(24)),z=n(48),K=n(1),$=X(n(6)),Z=X(n(7662)),q=X(n(370));function X(e){return e&&e.__esModule?e:{default:e}}function J(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return J=function(){return e},e}function Q(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=J();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ee(){return(ee=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}).apply(this,arguments)}function te(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ne(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,re(e,t)}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(e){return[{name:$.default.Messages.FORM_LABEL_ALL_MESSAGES,value:K.UserNotificationSettings.ALL_MESSAGES,desc:null!=e&&e>=K.MAX_MEMBERS_NOTIFY_ALL_MESSAGES?$.default.Messages.LARGE_GUILD_NOTIFY_ALL_MESSAGES_DESCRIPTION:null},{name:$.default.Messages.FORM_LABEL_ONLY_MENTIONS.format(),value:K.UserNotificationSettings.ONLY_MENTIONS},{name:$.default.Messages.FORM_LABEL_NOTHING,value:K.UserNotificationSettings.NO_MESSAGES}]}function oe(e){return e.type===K.ChannelTypes.GUILD_CATEGORY?U.default:e.isNSFW()?B.default:(0,p.default)(e)?F.default:G.default}!function(e){e.MUTED="muted",e.MESSAGE_NOTIFICATIONS="message_notifications",e.SUPPRESS_EVERYONE="suppress_everyone",e.SUPPRESS_ROLES="suppress_roles",e.MOBILE_PUSH="mobile_push"}(a||(a={}));var ie=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={highlight:!1},t.unhighlight=function(){t.setState({highlight:!1})},t.handleMute=function(e,n){var r=t.props.messageNotifications;t.setMessageNotification(r||K.UserNotificationSettings.NULL,n)},t.handleDelete=function(){var e=t.props,n=e.onDelete,r=e.channel;t.setMessageNotification(K.UserNotificationSettings.NULL,!1),n(r.id)},t}ne(t,e);var n=t.prototype;return n.highlight=function(){var e=this;this.setState({highlight:!0},(function(){null!=e._timeout&&clearTimeout(e._timeout),e._timeout=setTimeout(e.unhighlight,1e3)}))},n.componentWillUnmount=function(){null!=this._timeout&&clearTimeout(this._timeout)},n.setMessageNotification=function(e,t){void 0===t&&(t=!1);var n=this.props.channel,r=n.getGuildId();null!=r&&d.default.updateChannelOverrideSettings(r,n.id,{message_notifications:e,muted:t})},n.handleRadioChange=function(e){this.setMessageNotification(e)},n.messageNotificationsRadioOption=function(e){var t=this.props,n=t.messageNotifications,r=t.guildMuted,a=t.muted,o=t.guildMessageNotifications,i=n===e;null!=n&&n!==K.UserNotificationSettings.NULL||e!==o||(i=!0);var l=M.default.Types.INVERTED;return(a||n===K.UserNotificationSettings.NULL||null==n)&&(l=M.default.Types.GHOST),te(M.default,{value:!r&&i,disabled:r,shape:M.default.Shapes.ROUND,color:K.Colors.STATUS_GREEN_600,type:l,onChange:this.handleRadioChange.bind(this,e)})},n.renderName=function(){var e,t=this.props.channel;t.parent_id&&(e=h.default.getChannel(t.parent_id));var n,r=oe(t);if(t.type===K.ChannelTypes.GUILD_CATEGORY&&t.guild_id){var a=E.default.getCategories(t.guild_id);n=$.default.Messages.NUM_CHANNELS.format({num:a[t.id]?a[t.id].length:0})}else n=null!=e?$.default.Messages.IN_CATEGORY.format({categoryName:(0,v.computeChannelName)(e,T.default,O.default)}):$.default.Messages.NO_CATEGORY;return te(N.default,{align:N.default.Align.START},void 0,te(N.default,{grow:0,shrink:0,className:Z.default.iconContainer,align:N.default.Align.CENTER},void 0,te(r,{className:Z.default.icon})),te(N.default.Child,{grow:1,shrink:1,className:q.default.marginReset},void 0,te(Y.default,{size:Y.default.Sizes.SIZE_16,className:Z.default.channelName},void 0,(0,v.computeChannelName)(t,T.default,O.default)),te(Y.default,{size:Y.default.Sizes.SIZE_12,className:Z.default.channelNameByline},void 0,n)))},n.renderOptions=function(){var e=this.props,t=e.muted,n=e.guildMuted;return te(N.default,{grow:0,shrink:0,className:Z.default.checkboxGroup,justify:N.default.Justify.AROUND,align:N.default.Align.CENTER},void 0,te(N.default.Child,{wrap:!0,grow:0,shrink:0,className:n?Z.default.checkboxContainerMuted:Z.default.checkboxContainer},void 0,this.messageNotificationsRadioOption(K.UserNotificationSettings.ALL_MESSAGES)),te(N.default.Child,{wrap:!0,grow:0,shrink:0,className:n?Z.default.checkboxContainerMuted:Z.default.checkboxContainer},void 0,this.messageNotificationsRadioOption(K.UserNotificationSettings.ONLY_MENTIONS)),te(N.default.Child,{wrap:!0,grow:0,shrink:0,className:n?Z.default.checkboxContainerMuted:Z.default.checkboxContainer},void 0,this.messageNotificationsRadioOption(K.UserNotificationSettings.NO_MESSAGES)),te(N.default.Child,{wrap:!0,grow:0,shrink:0,className:Z.default.checkboxMute},void 0,te(M.default,{value:t,shape:M.default.Shapes.BOX,type:M.default.Types.INVERTED,onChange:this.handleMute})))},n.render=function(){var e=this.state.highlight;return te(b.default,{outline:!0,editable:!0,className:e?Z.default.overrideHighlight:Z.default.override},void 0,this.renderName(),this.renderOptions(),te(f.default,{className:Z.default.removeOverride,onClick:this.handleDelete}))},t}(o.PureComponent);function le(e){return Object.keys(e).filter((function(t){return!(!(0,I.computeIsMuted)(e[t])&&e[t].message_notifications===K.UserNotificationSettings.NULL)}))}ie.displayName="ChannelNotificationSettings";var ue=te(L.default,{}),se=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._scroller=null,t._channelRefs={},t.state={overrides:new Set(le(t.props.channelOverrides)),channelOverridesProp:t.props.channelOverrides,lastSelected:null},t.setScrollerRef=function(e){t._scroller=e},t.handleSelectChange=function(e){if(null!=e){var n=t.state.overrides;(n=new Set(n)).add(e),t.setState({overrides:n,lastSelected:e})}},t.handleSelectMuteTime=function(e){var n=e>0?(0,l.default)().add(e,"second").toISOString():null;d.default.updateGuildNotificationSettings(t.props.guildId,{muted:!0,mute_config:{selected_time_window:e,end_time:n}})},t.handleDeleteOverride=function(e){var n=t.state.overrides;(n=new Set(n)).delete(e),t.setState({overrides:n})},t.renderOptionLabel=function(e){var t=h.default.getChannel(e.value);if(null==t)return e.label;var n=h.default.getChannel(t.parent_id),r=null!=n?n.name:null;return te(k.default,{icon:oe(t),title:e.label,subtitle:r})},t}ne(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.overrides,r=t.channelOverridesProp;return e.channelOverrides!==r?(n=new Set(n),le(e.channelOverrides).forEach((function(e){return n.add(e)})),{overrides:n,channelOverridesProp:e.channelOverrides}):null};var n=t.prototype;return n.componentDidUpdate=function(e,t){var n=this,r=this.state.lastSelected,a=null!=r?this._channelRefs[r]:null;if(null!=this._scroller&&null!=a&&r!==t.lastSelected){var o,i=(0,u.findDOMNode)(a);if(null!=this._scroller&&null!=i&&i instanceof HTMLElement)null===(o=this._scroller)||void 0===o||o.scrollIntoViewNode({node:i,animate:!0,padding:20,callback:function(){return n.setState({lastSelected:null})}}),a.highlight()}if(this.props.channelOverrides!==e.channelOverrides){var l=this.state.overrides;l=new Set(l),le(this.props.channelOverrides).forEach((function(e){return l.add(e)})),this.setState({overrides:l})}},n.handleCheckboxChange=function(e,t){var n;d.default.updateGuildNotificationSettings(this.props.guildId,((n={})[e]=t,n))},n.handleRadioChange=function(e,t){var n,r=t.value;d.default.updateGuildNotificationSettings(this.props.guildId,((n={})[e]=r,n))},n.renderHeader=function(){var e=this.props.guild;return null==e?null:te(H.ModalHeader,{},void 0,te(N.default.Child,{},void 0,te(x.default,{size:x.default.Sizes.SIZE_20},void 0,$.default.Messages.NOTIFICATION_SETTINGS),te(Y.default,{size:Y.default.Sizes.SIZE_16,className:Z.default.guildName},void 0,e.name)),te(N.default.Child,{grow:0},void 0,te(H.ModalCloseButton,{onClick:this.props.onClose})))},n.renderFooter=function(){return te(H.ModalFooter,{},void 0,te(C.default,{onClick:this.props.onClose},void 0,$.default.Messages.DONE))},n.renderMute=function(){var e=this.props,t=e.muted,n=e.muteConfig,r=e.guild,o=(null==n?void 0:n.selected_time_window)||y.MuteUntilSeconds.ALWAYS;return null==r?null:te(D.default,{className:Z.default.largeSpacing},void 0,te(P.default,{hideBorder:!0,value:t,onChange:this.handleCheckboxChange.bind(this,a.MUTED),note:$.default.Messages.FORM_LABEL_MUTE_SERVER_DESCRIPTION},void 0,$.default.Messages.FORM_LABEL_MUTE_SERVER.format({name:r.name})),t?te(N.default,{className:Z.default.spacing,align:N.default.Align.CENTER},void 0,te(N.default,{direction:N.default.Direction.VERTICAL,className:Z.default.muteUntilTextWrapper},void 0,te(j.default,{tag:j.default.Tags.H3,className:Z.default.muteUntilTitle},void 0,$.default.Messages.MUTE_UNTIL),te(m.default,{className:Z.default.muteUntilText,muteConfig:n})),te(W.SingleSelect,{className:Z.default.muteTimeSelector,options:[{label:$.default.Messages.MUTE_DURATION_15_MINUTES,value:y.MuteUntilSeconds.MINUTES_15},{label:$.default.Messages.MUTE_DURATION_1_HOUR,value:y.MuteUntilSeconds.HOURS_1},{label:$.default.Messages.MUTE_DURATION_8_HOURS,value:y.MuteUntilSeconds.HOURS_8},{label:$.default.Messages.MUTE_DURATION_24_HOURS,value:y.MuteUntilSeconds.HOURS_24},{label:$.default.Messages.MUTE_DURATION_ALWAYS,value:y.MuteUntilSeconds.ALWAYS}],value:o,onChange:this.handleSelectMuteTime})):null,ue)},n.renderServerSettings=function(){var e=this.props,t=e.messageNotifications,n=e.muted,r=e.memberCount;return te(D.default,{title:$.default.Messages.FORM_LABEL_SERVER_NOTIFICATION_SETTINGS,className:Z.default.spacing},void 0,te(A.default,{disabled:n,value:t,onChange:this.handleRadioChange.bind(this,a.MESSAGE_NOTIFICATIONS),options:ae(r)}))},n.renderNotificationOptions=function(){var e=this.props,t=e.suppressEveryone,n=e.suppressRoles,r=e.mobilePush,o=e.muted;return te(D.default,{className:Z.default.largeSpacing},void 0,te(P.default,{onChange:this.handleCheckboxChange.bind(this,a.SUPPRESS_EVERYONE),value:t},void 0,$.default.Messages.FORM_LABEL_SUPPRESS_EVERYONE.format()),te(P.default,{onChange:this.handleCheckboxChange.bind(this,a.SUPPRESS_ROLES),value:n},void 0,$.default.Messages.FORM_LABEL_SUPPRESS_ROLES),te(P.default,{value:!o&&r,disabled:o,onChange:this.handleCheckboxChange.bind(this,a.MOBILE_PUSH)},void 0,$.default.Messages.FORM_LABEL_MOBILE_PUSH_NOTIFICATIONS))},n.renderOverrideSelect=function(){var e=this.props,t=e.channels,n=e.categories,r=(0,i.default)(t).filter((function(e){var t=e.channel;return t.type!==K.ChannelTypes.GUILD_CATEGORY||null!=n[t.id]&&n[t.id].length>0})).map((function(e){var t=e.channel;return{value:t.id,label:(0,v.computeChannelName)(t,T.default,O.default)}})).value();return te(D.default,{title:$.default.Messages.NOTIFICATION_OVERRIDES,className:Z.default.largeSpacing},void 0,te(w.default,{type:w.default.Types.DESCRIPTION,className:Z.default.smallSpacing},void 0,$.default.Messages.ADD_CHANNEL_TO_OVERRIDE),te(V.default,{value:"",placeholder:$.default.Messages.SELECT_CHANNEL_OR_CATEGORY,renderOptionLabel:this.renderOptionLabel,options:r,onChange:this.handleSelectChange}))},n.renderChannelNotifications=function(){var e=this,t=this.props,n=t.channelOverrides,r=t.muted,a=t.channels,i=t.messageNotifications,l=t.categories,u=this.state.overrides,s=a.map((function(t){var a=t.channel;if(!u.has(a.id)||null!=l[a.id]&&0===l[a.id].length)return null;var s=n[a.id];return o.createElement(ie,{key:a.id,ref:function(t){e._channelRefs[a.id]=t},channel:a,guildMuted:r,muted:null!=s&&(0,I.computeIsMuted)(s),messageNotifications:null!=s?s.message_notifications:null,guildMessageNotifications:i,onDelete:e.handleDeleteOverride})})).filter(z.isNotNullish);return 0!==u.size&&0!==s.length||s.push(te("div",{className:Z.default.overridePlaceholder},"placeholder",te(Y.default,{className:Z.default.overrideHeader},void 0,$.default.Messages.ADD_CHANNEL_TO_OVERRIDE))),te("div",{className:Z.default.overrideList},void 0,te(N.default,{},void 0,te(x.default,{size:x.default.Sizes.SIZE_12,uppercase:!0,className:Z.default.headerName},void 0,$.default.Messages.CHANNEL_OR_CATEGORY),te(x.default,{size:x.default.Sizes.SIZE_12,uppercase:!0,className:Z.default.headerOption},void 0,$.default.Messages.FORM_LABEL_ALL),te(x.default,{size:x.default.Sizes.SIZE_12,uppercase:!0,className:Z.default.headerOption},void 0,$.default.Messages.FORM_LABEL_MENTIONS),te(x.default,{size:x.default.Sizes.SIZE_12,uppercase:!0,className:Z.default.headerOption},void 0,$.default.Messages.FORM_LABEL_NOTHING),te(x.default,{size:x.default.Sizes.SIZE_12,uppercase:!0,className:Z.default.headerOption},void 0,te(R.default,{text:$.default.Messages.FORM_LABEL_MUTE_SERVER_DESCRIPTION,position:R.default.Positions.BOTTOM},void 0,(function(e){return o.createElement("span",e,$.default.Messages.SOUND_MUTE)})))),s)},n.render=function(){return te(H.ModalRoot,{"aria-label":"Lol",size:H.ModalSize.MEDIUM,transitionState:this.props.transitionState},void 0,this.renderHeader(),te(H.ModalContent,{scrollerRef:this.setScrollerRef},void 0,this.renderMute(),this.renderServerSettings(),this.renderNotificationOptions(),this.renderOverrideSelect(),this.renderChannelNotifications()),this.renderFooter())},t}(o.PureComponent);function de(e){var t=e.guildId,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["guildId"]),r=(0,s.useStateFromStoresObject)([E.default,S.default,g.default,I.default],(function(){var e=E.default.getCategories(t);return{guildId:t,categories:e,guild:S.default.getGuild(t),memberCount:g.default.getMemberCount(t),suppressEveryone:I.default.isSuppressEveryoneEnabled(t),suppressRoles:I.default.isSuppressRolesEnabled(t),mobilePush:I.default.isMobilePushEnabled(t),muted:I.default.isMuted(t),muteConfig:I.default.getMuteConfig(t),messageNotifications:I.default.getMessageNotifications(t),channelOverrides:I.default.getChannelOverrides(t),channels:(0,c.default)(e._categories,e,(function(e){var t=e.channel.type;return(0,_.isGuildSelectableChannelType)(t)||t===K.ChannelTypes.GUILD_CATEGORY}))}}));return o.createElement(se,ee({},r,n))}se.displayName="NotificationSettings",de.displayName="ConnectedNotificationSettings"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=m(n(274)),i=m(n(39)),l=m(n(29)),u=m(n(8267)),s=m(n(476)),d=m(n(159)),f=n(35),c=m(n(47)),p=n(9166),v=m(n(6)),y=m(n(7663));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.guild,n=e.transitionState,r=e.onClose,m=t.id,_=(0,a.useStateFromStores)([i.default],(function(){return i.default.isGuildRestricted(m)}),[m]);var E=v.default.Messages.PRIVACY_SETTINGS+"—"+(null!=t?t.toString():"??");return h(f.ModalRoot,{transitionState:n,size:f.ModalSize.SMALL,"aria-label":E},void 0,h(f.ModalHeader,{},void 0,h(c.default,{tag:c.default.Tags.H2,size:c.default.Sizes.SIZE_20},void 0,E)),h(f.ModalContent,{className:y.default.content},void 0,h(s.default,{},void 0,h(d.default,{tag:d.default.Tags.H5,style:{marginBottom:4}},void 0,v.default.Messages.DIRECT_MESSAGES),h(u.default,{value:!_,onChange:function(e){var t=new Set((0,p.getSanitizedRestrictedGuilds)());e?t.delete(m):t.add(m),o.default.updateRemoteSettings({restrictedGuilds:Array.from(t)})},hideBorder:!0},void 0,v.default.Messages.ALLOW_SERVER_DMS))),h(f.ModalFooter,{},void 0,h(l.default,{onClick:function(){return r()}},void 0,v.default.Messages.DONE)))}E.displayName="GuildContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSanitizedRestrictedGuilds=function(){var e=o.default.restrictedGuilds;0===r.default.totalUnavailableGuilds&&(e=e.filter((function(e){return null!=a.default.getGuild(e)})));return e},t.computeFlags=function(){var e,t,n=o.default.friendSourceFlags;return n[l.FriendSourceFlagKeys.ALL]?((t={})[l.FriendSourceFlagKeys.ALL]=!0,t[l.FriendSourceFlagKeys.FRIENDS]=!0,t[l.FriendSourceFlagKeys.GUILDS]=!0,t):((e={})[l.FriendSourceFlagKeys.ALL]=!1,e[l.FriendSourceFlagKeys.FRIENDS]=!!n[l.FriendSourceFlagKeys.FRIENDS],e[l.FriendSourceFlagKeys.GUILDS]=!!n[l.FriendSourceFlagKeys.GUILDS],e)},t.harvestDisabled=function(e,t){if(!t.verified)return!0;if(null==e)return!1;return s>Date.now()-new Date(e.created_at).getTime()},t.trackPaneViewed=function(e){i.default.track(l.AnalyticEvents.SETTINGS_PANE_VIEWED,{settings_type:"user",destination_pane:e})};var r=u(n(298)),a=u(n(15)),o=u(n(39)),i=u(n(13)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s=864e5*l.REQUEST_DATA_LIMIT_DAYS},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,o.useStateFromStores)([u.default],(function(){return u.default.can(d.Permissions.MANAGE_CHANNELS,e)}));if(__OVERLAY__)return null;return t?[v(l.MenuItem,{id:"create-channel",label:f.default.Messages.CREATE_CHANNEL,action:function(){return(0,s.openModal)((function(t){return a.createElement(i.default,y({},t,{channelType:d.ChannelTypes.GUILD_TEXT,guildId:e.id}))}))}}),v(l.MenuItem,{id:"create-category",label:f.default.Messages.CREATE_CATEGORY,action:function(){return(0,s.openModal)((function(t){return a.createElement(i.default,y({},t,{channelType:d.ChannelTypes.GUILD_CATEGORY,guildId:e.id}))}))}})]:null};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(8458)),l=n(8253),u=c(n(40)),s=n(41),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(95),a=s(n(2)),o=s(n(727)),i=s(n(482)),l=n(1274),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}var d={open:function(e,t,n,r){a.default.dispatch({type:u.ActionTypes.CREATE_CHANNEL_MODAL_OPEN,channelType:e,guildId:t,categoryId:n,cloneChannelId:r})},close:function(){a.default.dispatch({type:u.ActionTypes.CREATE_CHANNEL_MODAL_CLOSE})},createChannel:function(e,t,n,s,d,f,c,p,v){var y=this;void 0===s&&(s=[]),a.default.dispatch({type:u.ActionTypes.CREATE_CHANNEL_MODAL_SUBMIT});var m={type:t,name:n,permission_overwrites:s};if(null!=d&&d!==u.BITRATE_DEFAULT&&(m.bitrate=d),null!=f&&f>0&&(m.user_limit=f),null!=c&&(m.parent_id=c),t===u.ChannelTypes.GUILD_STORE){if(null==p)throw new Error("Unexpected missing SKU");m.sku_id=p,m.branch_id=v}return i.default.post({url:u.Endpoints.GUILD_CHANNELS(e),body:m,oldFormErrors:!0,trackedActionData:{event:r.NetworkActionNames.CHANNEL_CREATE,metadata:function(e){var t,n;return(0,l.exact)({is_private:!!s.length,channel_id:null==e||null===(t=e.body)||void 0===t?void 0:t.id,channel_type:null==e||null===(n=e.body)||void 0===n?void 0:n.type})}}}).then((function(t){return y.close(),o.default.checkGuildTemplateDirty(e),t}),(function(e){throw a.default.dispatch({type:u.ActionTypes.CREATE_CHANNEL_MODAL_SUBMIT_FAILURE,errors:e.body}),e}))}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createModeratorOverwrite=N,t.default=P;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(8481),l=n(275),u=n(286),s=n(1229),d=n(8482),f=T(n(10)),c=T(n(15)),p=T(n(29)),v=T(n(55)),y=n(85),m=T(n(291)),_=n(35),h=T(n(47)),E=T(n(24)),g=T(n(78)),S=n(203),O=T(n(6)),I=T(n(7667));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function N(e,t){return{id:e,type:t,deny:g.default.NONE,allow:S.MODERATE_STAGE_CHANNEL_PERMISSIONS}}function A(e,t){var n=Object.values(t).filter((function(e){return null!=e.row.id})).map((function(e){var t=e.row;return t.rowType===s.RowType.ROLE?N(t.id,u.PermissionOverwriteType.ROLE):N(t.id,u.PermissionOverwriteType.MEMBER)}));return(0,i.savePermissionUpdates)(e.id,n,!0)}function P(e){var t=e.transitionState,n=e.onClose,r=e.channelId,i=(0,y.useUID)(),u=(0,o.useStateFromStores)([f.default],(function(){return f.default.getChannel(r)})),s=(0,o.useStateFromStores)([c.default],(function(){return c.default.getGuild(null==u?void 0:u.getGuildId())})),g=a.useState({}),T=g[0],C=g[1],N=a.useState(!1),P=N[0],R=N[1],L=a.useState(null),D=L[0],w=L[1];if(null==u||null==s)return null;var j=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),e.prev=1,e.next=4,A(u,T);case 4:n(),e.next=12;break;case 7:e.prev=7,e.t0=e.catch(1),t=new l.APIError(e.t0),R(!1),w(t);case 12:case"end":return e.stop()}}),e,null,[[1,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){M(o,r,a,i,l,"next",e)}function l(e){M(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return b(_.ModalRoot,{transitionState:t,"aria-labelledby":i,size:_.ModalSize.SMALL,className:I.default.modalRoot},void 0,b(_.ModalHeader,{separator:!1,direction:v.default.Direction.VERTICAL,align:v.default.Align.CENTER,className:I.default.header},void 0,b(h.default,{tag:h.default.Tags.H2,size:h.default.Sizes.SIZE_24},void 0,O.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE),b(E.default,{size:E.default.Sizes.SIZE_16,color:E.default.Colors.HEADER_SECONDARY,className:I.default.headerSubtitle},void 0,b(m.default,{height:16,width:16,className:I.default.headerSubtitleIcon}),u.name)),b(d.AddMembersBody,{guild:s,channel:u,permission:S.MODERATE_STAGE_CHANNEL_PERMISSIONS,pendingAdditions:T,setPendingAdditions:C}),null!=D?b(E.default,{className:I.default.error,size:E.default.Sizes.SIZE_12,color:E.default.Colors.STATUS_RED},void 0,D.getAnyErrorMessage()):null,b(_.ModalFooter,{},void 0,b(p.default,{onClick:j,submitting:P},void 0,O.default.Messages.ADD),b(p.default,{look:p.default.Looks.LINK,color:p.default.Colors.PRIMARY,onClick:n},void 0,O.default.Messages.CANCEL)))}P.displayName="AddModeratorsModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuildSettingsSections=function(e,t){return he(me({channels:t,showDirtyGuildTemplateIndicator:!1},w.default.getGuildPermissionProps(e))).filter((function(e){var t=e.section;return t!==d.SectionTypes.HEADER&&t!==d.SectionTypes.DIVIDER})).filter((function(e){return null==e.predicate||e.predicate()}))},t.default=Oe;var r,a=ve(n(0)),o=n(95),i=n(3),l=ce(n(8254)),u=n(687),s=ce(n(8575)),d=n(8305),f=ce(n(9742)),c=ce(n(9743)),p=ce(n(105)),v=ce(n(106)),y=ce(n(9744)),m=ce(n(9748)),_=ve(n(9769)),h=ce(n(1178)),E=ce(n(1176)),g=n(395),S=ce(n(702)),O=n(8474),I=ce(n(8492)),T=n(1209),C=n(9174),b=ce(n(8679)),M=ce(n(9795)),N=ce(n(86)),A=ce(n(684)),P=ce(n(8982)),R=ce(n(8355)),L=ce(n(8255)),D=ce(n(8983)),w=ce(n(40)),j=ce(n(39)),k=ce(n(12)),U=ce(n(466)),G=n(41),F=ce(n(24)),B=n(121),H=ce(n(9796)),x=ce(n(9802)),V=ce(n(9809)),W=ve(n(9813)),Y=ce(n(9829)),z=ve(n(9832)),K=ce(n(9847)),$=ve(n(9852)),Z=ce(n(9867)),q=ce(n(9868)),X=ce(n(9874)),J=ve(n(9876)),Q=ce(n(9879)),ee=ce(n(9897)),te=ce(n(9902)),ne=ce(n(9903)),re=ve(n(9908)),ae=ce(n(9910)),oe=ce(n(9911)),ie=ve(n(9913)),le=ce(n(9916)),ue=ce(n(9918)),se=n(1),de=ce(n(6)),fe=ce(n(7762));function ce(e){return e&&e.__esModule?e:{default:e}}function pe(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return pe=function(){return e},e}function ve(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=pe();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ye(e,t){return(ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function me(){return(me=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}).apply(this,arguments)}function _e(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function he(e){var t=e.guild,n=e.canManageGuild,r=e.canViewAuditLog,i=e.canManageRoles,s=e.canManageEmoji,p=e.canManageWebhooks,v=e.canManageBans,h=e.canViewGuildAnalytics,E=e.isOwnerWithRequiredMfaLevel,T=e.showDirtyGuildTemplateIndicator,C=e.memberCount,N=e.threadsOptInConfig;return[{section:d.SectionTypes.HEADER,label:t.toString()||de.default.Messages.SERVER_SETTINGS},{section:se.GuildSettingsSections.OVERVIEW,impressionName:o.ImpressionNames.GUILD_SETTINGS_OVERVIEW,label:de.default.Messages.OVERVIEW,element:J.default,notice:{store:L.default,element:J.GuildSettingsOverviewNotice}},{section:se.GuildSettingsSections.ROLES,impressionName:o.ImpressionNames.GUILD_SETTINGS_ROLES,label:de.default.Messages.ROLES,element:_.default,type:d.ContentTypes.MINIMAL,notice:{store:R.default,element:_.GuildSettingsRolesNotice},predicate:function(){return i}},{section:se.GuildSettingsSections.EMOJI,impressionName:o.ImpressionNames.GUILD_SETTINGS_EMOJI,label:de.default.Messages.EMOJI,element:K.default,predicate:function(){return s}},{section:se.GuildSettingsSections.STICKERS,impressionName:o.ImpressionNames.GUILD_SETTINGS_STICKERS,label:de.default.Messages.GUILD_SETTINGS_STICKERS,ariaLabel:de.default.Messages.GUILD_SETTINGS_STICKERS,element:ne.default,newIndicator:S.default.hasHotspot(g.HotspotLocations.GUILD_STICKERS_GUILD_SETTINGS_MENU),predicate:function(){return s}},{section:se.GuildSettingsSections.MODERATION,impressionName:o.ImpressionNames.GUILD_SETTINGS_MODERATION,label:de.default.Messages.MODERATION,element:X.default,notice:{store:L.default,element:J.GuildSettingsOverviewNotice},predicate:function(){return n}},{section:se.GuildSettingsSections.AUDIT_LOG,impressionName:o.ImpressionNames.GUILD_SETTINGS_AUDIT_LOG,label:de.default.Messages.GUILD_SETTINGS_LABEL_AUDIT_LOG,element:x.default,type:d.ContentTypes.CUSTOM,predicate:function(){return r}},{section:se.GuildSettingsSections.INTEGRATIONS,impressionName:o.ImpressionNames.GUILD_SETTINGS_INTEGRATION,label:de.default.Messages.INTEGRATIONS_OVERVIEW,ariaLabel:de.default.Messages.INTEGRATIONS_OVERVIEW,element:$.default,notice:{store:P.default,element:$.GuildSettingsIntegrationsNotice},predicate:function(){return n||p}},{section:se.GuildSettingsSections.WIDGET,impressionName:o.ImpressionNames.GUILD_SETTINGS_WIDGET,label:de.default.Messages.WIDGET,element:le.default,predicate:function(){return n}},{section:se.GuildSettingsSections.GUILD_TEMPLATES,impressionName:o.ImpressionNames.GUILD_SETTINGS_TEMPLATE,label:_e(ae.default,{showDirtyIndicator:T}),ariaLabel:de.default.Messages.GUILD_TEMPLATES,element:re.default,notice:{store:re.GuildSettingsTemplateMetadataStore,element:re.GuildSettingsTemplateNotice},predicate:function(){return n}},{section:se.GuildSettingsSections.VANITY_URL,impressionName:o.ImpressionNames.GUILD_SETTINGS_VANITY_URL,label:de.default.Messages.VANITY_URL,element:ie.default,notice:{store:D.default,element:ie.GuildSettingsVanityURLNotice},predicate:function(){return n&&t.hasFeature(se.GuildFeatures.VANITY_URL)}},{section:d.SectionTypes.DIVIDER,predicate:function(){return n}},{section:d.SectionTypes.HEADER,label:de.default.Messages.COMMUNITY,predicate:function(){return n}},{section:se.GuildSettingsSections.COMMUNITY,impressionName:t.hasFeature(se.GuildFeatures.COMMUNITY)?o.ImpressionNames.GUILD_SETTINGS_COMMUNITY_OVERVIEW:o.ImpressionNames.GUILD_SETTINGS_ENABLE_COMMUNITY,label:t.hasFeature(se.GuildFeatures.COMMUNITY)?de.default.Messages.OVERVIEW:de.default.Messages.GUILD_SETTINGS_COMMUNITY_ENABLE_COMMUNITY,element:W.default,ariaLabel:t.hasFeature(se.GuildFeatures.COMMUNITY)?de.default.Messages.OVERVIEW:de.default.Messages.GUILD_SETTINGS_COMMUNITY_ENABLE_COMMUNITY,newIndicator:!t.hasFeature(se.GuildFeatures.COMMUNITY)&&null!=C&&C>=O.COMMUNITY_UPSELL_MINIMUM_GUILD_SIZE&&S.default.hasHotspot(g.HotspotLocations.GUILD_SETTINGS_COMMUNITY_GUILD_UPSELL),notice:{store:L.default,element:W.GuildSettingsCommunityOverviewNotice},predicate:function(){return n}},{section:se.GuildSettingsSections.ANALYTICS,impressionName:o.ImpressionNames.GUILD_SETTINGS_ANALYTICS,label:de.default.Messages.SERVER_INSIGHTS,ariaLabel:de.default.Messages.SERVER_INSIGHTS,element:H.default,newIndicator:S.default.hasHotspot(g.HotspotLocations.GUILD_ANALYTICS_GUILD_SETTINGS_MENU),predicate:function(){return h&&t.hasFeature(se.GuildFeatures.COMMUNITY)}},{section:se.GuildSettingsSections.PARTNER,impressionName:o.ImpressionNames.GUILD_SETTINGS_PARTNER,label:de.default.Messages.PARTNER_PROGRAM,element:Q.default,predicate:function(){return n&&t.hasFeature(se.GuildFeatures.COMMUNITY)&&!t.hasFeature(se.GuildFeatures.PARTNERED)},ariaLabel:de.default.Messages.PARTNER_PROGRAM},{section:se.GuildSettingsSections.DISCOVERY,impressionName:o.ImpressionNames.GUILD_SETTINGS_DISCOVERY,label:de.default.Messages.DISCOVERY,element:z.default,notice:{store:L.default,element:z.GuildSettingsDiscoveryNotice},predicate:function(){return n&&t.hasFeature(se.GuildFeatures.COMMUNITY)},ariaLabel:t.hasFeature(se.GuildFeatures.DISCOVERABLE)?de.default.Messages.DISCOVERY:de.default.Messages.GUILD_SETTINGS_ENABLE_DISCOVERABLE},{section:se.GuildSettingsSections.MEMBER_VERIFICATION,impressionName:o.ImpressionNames.GUILD_SETTINGS_MEMBER_VERIFICATION,label:de.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION,element:m.default,predicate:function(){return n&&t.hasFeature(se.GuildFeatures.COMMUNITY)}},{section:se.GuildSettingsSections.COMMUNITY_WELCOME,impressionName:o.ImpressionNames.GUILD_SETTINGS_COMMUNITY_WELCOME,label:de.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME,ariaLabel:de.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME,element:Y.default,notice:{store:b.default,element:M.default},predicate:function(){return n&&t.hasFeature(se.GuildFeatures.COMMUNITY)}},{section:se.GuildSettingsSections.TICKETED_EVENTS,label:t.hasFeature(se.GuildFeatures.TICKETED_EVENTS_ENABLED)?de.default.Messages.GUILD_MONETIZATION_TICKETING_SETTINGS_PAGE_TITLE:de.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_SETTINGS_PAGE_TITLE,ariaLabel:t.hasFeature(se.GuildFeatures.TICKETED_EVENTS_ENABLED)?de.default.Messages.GUILD_MONETIZATION_TICKETING_SETTINGS_PAGE_TITLE:de.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_SETTINGS_PAGE_TITLE,element:ue.default,predicate:function(){return!!I.default.getCurrentConfig({guildId:t.id}).enabled&&(!!t.hasFeature(se.GuildFeatures.COMMUNITY)&&(t.hasFeature(se.GuildFeatures.MONETIZATION_ENABLED)?n:E))}},{section:se.GuildSettingsSections.THREADS,label:de.default.Messages.THREADS,ariaLabel:de.default.Messages.THREADS,element:oe.default,predicate:function(){return null==N?void 0:N.viewBots}},{section:d.SectionTypes.DIVIDER},{section:se.GuildSettingsSections.GUILD_PREMIUM,impressionName:o.ImpressionNames.GUILD_SETTINGS_BOOST_STATUS,label:de.default.Messages.GUILD_PREMIUM,ariaLabel:de.default.Messages.GUILD_PREMIUM,element:ee.default,className:fe.default.serverBoostTabItem,icon:_e(te.default,{className:fe.default.icon})},{section:d.SectionTypes.DIVIDER},{section:d.SectionTypes.HEADER,label:de.default.Messages.USER_MANAGEMENT},{section:se.GuildSettingsSections.MEMBERS,impressionName:o.ImpressionNames.GUILD_SETTINGS_MEMBERS,label:de.default.Messages.MEMBERS,element:q.default,type:d.ContentTypes.CUSTOM},{section:se.GuildSettingsSections.INSTANT_INVITES,impressionName:o.ImpressionNames.GUILD_SETTINGS_INVITES,label:de.default.Messages.INVITES,element:Z.default,type:d.ContentTypes.CUSTOM,predicate:function(){return n}},{section:se.GuildSettingsSections.BANS,impressionName:o.ImpressionNames.GUILD_SETTINGS_BANS,label:de.default.Messages.BANS,element:V.default,type:d.ContentTypes.CUSTOM,predicate:function(){return v}},{section:d.SectionTypes.DIVIDER,predicate:function(){return E}},{section:se.GuildSettingsSections.DELETE,onClick:function(){var e=k.default.getCurrentUser(),n=t.toString(),r={header:de.default.Messages.DELETE_SERVER_TITLE.format({name:n}),confirmText:de.default.Messages.DELETE_SERVER,cancelText:de.default.Messages.CANCEL,onConfirm:function(){B.ComponentDispatch.subscribeOnce(se.ComponentActions.LAYER_POP_COMPLETE,(function(){l.default.deleteGuild(t.id,n).then((function(){S.default.hasHotspot(g.HotspotLocations.GUILD_DELETE_FEEDBACK)&&(c.default.trackExposure({}),c.default.getCurrentConfig({}).showFeedback&&(0,G.openModal)((function(e){return a.createElement(y.default,me({},e,{guildId:t.id}))})))}))})),(0,u.popLayer)()}};e.mfaEnabled?(0,G.openModal)((function(e){return a.createElement(U.default,me({},e,r),_e(F.default,{size:F.default.Sizes.SIZE_16},void 0,de.default.Messages.DELETE_SERVER_BODY.format({name:n})))})):(0,G.openModal)((function(e){return a.createElement(f.default,me({},e,r,{validationText:n,instructionText:de.default.Messages.DELETE_SERVER_ENTER_NAME,errorText:de.default.Messages.DELETE_SERVER_INCORRECT_NAME}),de.default.Messages.DELETE_SERVER_BODY.format({name:n}))}))},label:de.default.Messages.DELETE_SERVER,color:se.Colors.STATUS_RED,predicate:function(){return E}}]}function Ee(e,t,n){void 0===t&&(t=null),v.default.trackWithMetadata(se.AnalyticEvents.SETTINGS_PANE_VIEWED,{settings_type:"guild",origin_pane:t,destination_pane:e,location:n})}var ge={canManageGuild:!1,canManageChannels:!1,canManageRoles:!1,canManageBans:!1,canManageNicknames:!1,canManageEmoji:!1,canViewAuditLog:!1,canManageWebhooks:!1,canViewGuildAnalytics:!1,isOwnerWithRequiredMfaLevel:!1},Se=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ye(t,n);var a=r.prototype;return a.componentDidMount=function(){Ee(this.props.section,null,this.props.analyticsLocation)},a.componentWillUnmount=function(){l.default.close()},a.componentDidUpdate=function(e){var t=e.section,n=this.props,r=n.section,a=n.canManageGuild,o=n.canManageRoles,i=n.canManageBans,l=n.canManageNicknames,s=n.canManageEmoji,d=n.canViewAuditLog,f=n.canManageWebhooks,c=n.canViewGuildAnalytics;r!==t&&Ee(r,t),(a||o||i||l||s||d||f)&&(d||r!==se.GuildSettingsSections.AUDIT_LOG)&&(o||r!==se.GuildSettingsSections.ROLES)&&(s||r!==se.GuildSettingsSections.EMOJI)&&(i||r!==se.GuildSettingsSections.BANS)&&(c||r!==se.GuildSettingsSections.ANALYTICS)||(0,u.popLayer)()},a.render=function(){var e=this.props,t=e.theme,n=e.sidebarTheme,r=e.section,a=e.guild,o=e.channels,i=e.canManageGuild,d=e.canViewAuditLog,f=e.canManageRoles,c=e.canManageEmoji,p=e.canManageWebhooks,v=e.canManageBans,y=e.canViewGuildAnalytics,m=e.isOwnerWithRequiredMfaLevel,_=e.showDirtyGuildTemplateIndicator,h=e.memberCount,E=e.threadsOptInConfig;return null==a?null:_e("div",{},void 0,_e(s.default,{theme:t,sidebarTheme:n,section:r,onSetSection:l.default.setSection,onClose:u.popLayer,sections:he({guild:a,channels:o,canManageGuild:i,canViewAuditLog:d,canManageRoles:f,canManageEmoji:c,canManageWebhooks:p,canManageBans:v,canViewGuildAnalytics:y,isOwnerWithRequiredMfaLevel:m,showDirtyGuildTemplateIndicator:_,memberCount:h,threadsOptInConfig:E})}),_e(C.ViewingRolesSettingsNotice,{guildId:a.id}))},r}(a.PureComponent);function Oe(){var e=(0,i.useStateFromStores)([L.default],(function(){return L.default.getProps()}),[]),t=e.guild,n=e.section,r=e.analyticsLocation,o=(0,i.useStateFromStores)([j.default],(function(){return j.default.theme}),[]),u=(0,i.useStateFromStores)([p.default],(function(){return p.default.darkSidebar?se.ThemeTypes.DARK:void 0}),[]),s=(0,i.useStateFromStores)([N.default],(function(){return null!=t?N.default.getChannels(t.id).SELECTABLE:null}),[t]),d=(0,i.useStateFromStores)([w.default],(function(){return null!=t?w.default.getGuildPermissionProps(t):ge})),f=(0,i.useStateFromStores)([w.default],(function(){return null!=t&&w.default.canAccessGuildSettings(t)})),c=(0,i.useStateFromStores)([E.default],(function(){var e;return null!=(null==t?void 0:t.id)&&!0===(null===(e=E.default.getForGuild(t.id))||void 0===e?void 0:e.isDirty)}),[t]),v=(0,i.useStateFromStores)([A.default],(function(){return A.default.getMemberCount(null==t?void 0:t.id)}),[t]),y=(0,T.useThreadsOptInConfig)(t),m=null==t?void 0:t.id;return a.useEffect((function(){null!=m&&d.canManageGuild&&h.default.loadTemplatesForGuild(m)}),[m,d.canManageGuild]),a.useEffect((function(){f||l.default.close()}),[f]),a.createElement(Se,me({guild:t,section:n,theme:o,sidebarTheme:u,channels:s,showDirtyGuildTemplateIndicator:c,analyticsLocation:r,memberCount:v,threadsOptInConfig:y},d))}Se.displayName="GuildSettings",Oe.displayName="ConnectedGuildSettings"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=h(n(0)),o=m(n(9)),i=m(n(63)),l=m(n(9781)),u=m(n(8267)),s=m(n(149)),d=m(n(681)),f=h(n(159)),c=m(n(8978)),p=m(n(78)),v=m(n(7687)),y=m(n(370));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var m=r.prototype;return m.getOverwriteValue=function(e){var t=this.props,n=t.allow,r=t.deny;if(null==n||null==r)throw new Error("PermissionsForm.getOverwriteValue: Invalid allow or deny props");return i.default.has(n,e)?p.default.ALLOW:i.default.has(r,e)?p.default.DENY:p.default.PASSTHROUGH},m.getPermissionValue=function(e,t){return i.default.has(t,e)},m.handleChange=function(e,t){(0,this.props.onChange)(e,t)},m.renderDisabledIndicator=function(e){return E(s.default,{text:e,position:s.default.Positions.TOP,color:s.default.Colors.RED},void 0,(function(e){return a.createElement("span",e,E(c.default,{className:v.default.icon,width:18,height:18}))}))},m.renderComponent=function(e){var t,n=this,r=e.title,a=e.description,i=e.flag,s=this.props,d=s.permissions,f=s.locked,c=s.permissionRender,p=null==c?void 0:c(i),y=Boolean(f||p),m="string"==typeof p?this.renderDisabledIndicator(p):null,_=(0,o.default)(((t={})[v.default.title]=null!=m,t));return null==d?E(l.default,{disabled:y,value:this.getOverwriteValue(i),onChange:function(e){return n.handleChange(i,e)},note:a},String(i),m,E("span",{className:_},void 0,r)):E(u.default,{disabled:y,value:this.getPermissionValue(i,d),onChange:function(e){return n.handleChange(i,e)},note:a},String(i),m,E("span",{className:_},void 0,r))},m.render=function(){var e=this.props,t=e.spec,n=e.className;return E(d.default,{className:n},void 0,E(f.default,{tag:f.Tags.H5,className:y.default.marginBottom20},void 0,t.title),t.permissions.map(this.renderComponent,this))},r}(a.PureComponent);S.displayName="PermissionsForm";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10379)),a=c(n(473)),o=n(1229),i=c(n(1280)),l=c(n(8492)),u=n(8971),s=n(1209),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e){return r.generateGuildPermissionSpec(f.default.Messages,function(e){var t=(0,u.isGuildEligibleForStageChannels)(e),n=l.default.getCurrentConfig({guildId:e}),r=i.default.getCurrentConfig({guildId:e});return{PRIORITY_SPEAKER_DESCRIPTION:f.default.Messages.ROLE_PERMISSIONS_PRIORITY_SPEAKER_DESCRIPTION_APP.format({keybind:f.default.Messages.KEYBIND_PUSH_TO_TALK_PRIORITY,onClick:function(){a.default.open(d.UserSettingsSections.KEYBINDS)}}),showStageChannelPermissions:t,showGuildEventsPermissions:n.enabled||r.enabled,showThreadPermissions:(0,s.computeCanSeeThreadsInGuild)(e),showExperimental:!0}}(e))}var m={generateChannelPermissionSpec:function(e,t,n){var a=(0,o.getChannelPermissionSpecMap)(t,n);switch(t){case d.ChannelTypes.GUILD_CATEGORY:var i=[r.generateChannelGeneralSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_GENERAL_CATEGORY),r.generateChannelMembershipSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_MEMBERSHIP),r.generateChannelTextSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_TEXT,{showThreadPermissions:(0,s.computeCanSeeThreadsInGuild)(e),showPrivateThreads:!0}),r.generateChannelVoiceSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_VOICE)];return(0,u.isGuildEligibleForStageChannels)(e)&&i.push(r.generateChannelStageSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_STAGE)),i;case d.ChannelTypes.GUILD_VOICE:return[r.generateChannelGeneralSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_GENERAL_CHANNEL,{showManageWebhooks:!1}),r.generateChannelMembershipSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_MEMBERSHIP),r.generateChannelVoiceSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_VOICE)];case d.ChannelTypes.GUILD_STAGE_VOICE:return[r.generateChannelGeneralSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_GENERAL_CHANNEL,{showManageWebhooks:!1}),r.generateChannelMembershipSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_MEMBERSHIP),r.generateChannelStageVoiceSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_VOICE),r.generateChannelStageSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_STAGE)];default:return[r.generateChannelGeneralSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_GENERAL_CHANNEL),r.generateChannelMembershipSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_MEMBERSHIP),r.generateChannelTextSection(a,f.default.Messages.ROLE_PERMISSIONS_SECTION_TEXT,{showThreadPermissions:(0,s.computeCanSeeThreadsInGuild)(e),showPrivateThreads:t!==d.ChannelTypes.GUILD_ANNOUNCEMENT})]}},generateGuildPermissionSpec:function(e){var t=new Set;return e.hasFeature(d.GuildFeatures.COMMUNITY)||t.add(d.Permissions.VIEW_GUILD_ANALYTICS.toString()),function(e,t){return 0===t.size?e:e.map((function(e){return v({},e,{permissions:e.permissions.filter((function(e){return!t.has(e.flag.toString())}))})}))}(y(e.id),t)}};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Content=t.Sidebar=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(55)),l=s(n(272)),u=s(n(7689));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function v(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this.props,t=e.scrollable,n=p(e,["scrollable"]);return t?f("aside",{className:u.default.sidebarScrollable},void 0,f(l.default,{fade:!0,className:u.default.scroller},void 0,a.createElement(i.default.Child,c({},n,{wrap:!0})))):a.createElement(i.default.Child,c({},n,{wrap:!0}))},t}(a.PureComponent);t.Sidebar=m,m.displayName="Sidebar",m.defaultProps={basis:232,grow:0,shrink:0,className:u.default.sidebar};var _=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=p(e,["className"]);return a.createElement(i.default.Child,c({className:(0,o.default)(u.default.content,t),wrap:!0},n))},t}(a.PureComponent);t.Content=_,_.displayName="Content";var h=function(e){function t(){return e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){return a.createElement(i.default,this.props)},t}(a.PureComponent);h.displayName="Layout",h.defaultProps={className:u.default.layout,direction:i.default.Direction.HORIZONTAL,justify:i.default.Justify.START,align:i.default.Align.START,wrap:i.default.Wrap.NO_WRAP,shrink:1,grow:1,basis:"auto"},h.Direction=i.default.Direction,h.Justify=i.default.Justify,h.Align=i.default.Align,h.Wrap=i.default.Wrap,h.Sidebar=m,h.Content=_;var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=C,t.ViewingRolesSettingsNotice=function(e){var t,n=e.guildId;return(0,o.useStateFromStores)([y.default],(function(){return y.default.isViewingRoles(n)}))?I("div",{className:(0,a.default)(E.default.settingsWrapper,(t={},t[E.default.windows]=p.default.isWindows(),t[E.default.osx]=p.default.isOSX(),t))},void 0,b):null};O(n(0));var r,a=g(n(9)),o=n(3),i=g(n(8254)),l=g(n(107)),u=g(n(29)),s=g(n(278)),d=g(n(8354)),f=g(n(683)),c=O(n(8678)),p=g(n(16)),v=n(8532),y=g(n(712)),m=g(n(9794)),_=n(1),h=g(n(6)),E=g(n(7699));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t=e.className,n=e.onClick,r=e.children;return I(u.default,{className:(0,a.default)(E.default.button,t),innerClassName:E.default.buttonInner,look:u.default.Looks.OUTLINED,color:u.default.Colors.WHITE,size:u.default.Sizes.NONE,onClick:n},void 0,r)}function C(){var e=(0,o.useStateFromStores)([l.default],(function(){return l.default.getGuildId()})),t=(0,o.useStateFromStores)([y.default],(function(){return null!=e?y.default.getViewingRoles(e):null}));if(null==t||null==e)return null;var n=I(m.default,{guildId:e});return I(c.default,{color:c.NoticeColors.BRAND,className:E.default.notice},void 0,I(T,{onClick:function(){null!=e&&((0,v.viewAsRolesStop)(e),i.default.open(e,_.GuildSettingsSections.ROLES))},className:E.default.backButton},void 0,I(d.default,{width:16,height:16,direction:d.default.Directions.LEFT,className:E.default.backArrow}),h.default.Messages.VIEWING_AS_ROLES_BACK),I("div",{className:E.default.noticeContents},void 0,I("div",{className:E.default.noticeText},void 0,h.default.Messages.VIEWING_AS_ROLES.format({numRoles:Object.keys(t).length})),I(s.default,{position:s.default.Positions.BOTTOM,renderPopout:function(){return n}},void 0,(function(e){return I(T,{onClick:e.onClick},void 0,h.default.Messages.VIEWING_AS_ROLES_SELECT,I(f.default,{width:16,height:16,direction:f.default.Directions.DOWN,className:E.default.selectCaret}))}))),I(T,{onClick:function(){return(0,v.viewAsRolesStop)(e)}},void 0,h.default.Messages.DISABLE))}T.displayName="NoticeButton",C.displayName="ViewingRolesNotice";var b=I(C,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(8)),a=l(n(3)),o=l(n(2)),i=l(n(8369));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d,f={},c={};function p(e,t){return null==t&&(t="guild"),e+":"+t}function v(e){return null!=f[e]||(f[e]={}),f[e]}function y(e){var t=e.guildId,n=e.webhook;v(t)[n.id]=n}var m=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var o,i,l,f=a.prototype;return f.isFetching=function(e,t){return null!=c[p(e,t)]},f.getWebhooksForGuild=function(e){return r.default.values(v(e))},f.getWebhooksForChannel=function(e,t){return(0,r.default)(v(e)).values().filter((function(e){return e.channel_id===t})).value()},o=a,(i=[{key:"error",get:function(){return d}}])&&u(o.prototype,i),l&&u(o,l),a}(a.default.Store))(o.default,{WEBHOOKS_UPDATE:function(e){var t=e.guildId,n=e.channelId,a=e.webhooks,o=e.error;if(a){d=null;var l=[];n&&(l=(0,r.default)(v(t)).values().filter((function(e){return e.channel_id!==n})).value());var u=f[t]={};l.concat(a).forEach((function(e){return u[e.id]=e})),delete c[p(t,n)]}else null!=o?(d=o,delete c[p(t,n)]):null!=n&&null!=f[t]&&(d=null,i.default.fetchForChannel(t,n))},WEBHOOKS_FETCHING:function(e){var t=e.guildId,n=e.channelId;c[p(t,n)]=!0},WEBHOOK_CREATE:y,WEBHOOK_UPDATE:y,WEBHOOK_DELETE:function(e){var t=e.guildId,n=e.webhookId;delete v(t)[n]}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 18 18"}),s("path",{fill:d,className:f,d:"M4.5,16.5v-3H3A1.5,1.5,0,0,1,1.5,12V3A1.5,1.5,0,0,1,3,1.5H15A1.5,1.5,0,0,1,16.5,3v9A1.5,1.5,0,0,1,15,13.5H8.5ZM3,3v9H6v1.5L8,12h7V3Z"}),s("path",{fill:d,className:f,d:"M6.75,4.5H5.25v6h1.5Z"}),s("path",{fill:d,className:f,d:"M9.75,7.5H8.25v3h1.5Z"}),s("path",{fill:d,className:f,d:"M12.75,6h-1.5v4.5h1.5Z"}))}d.displayName="AnalyticsBubble"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(8)),i=n(3),l=C(n(8317)),u=n(8575),s=C(n(8377)),d=C(n(86)),f=C(n(40)),c=C(n(5690)),p=C(n(55)),v=n(131),y=n(121),m=C(n(93)),_=C(n(9853)),h=C(n(9857)),E=C(n(9860)),g=C(n(9861)),S=C(n(9866)),O=n(1),I=C(n(6)),T=C(n(7735));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){switch(e){case O.IntegrationSettingsSections.APPLICATION:return(null==t?void 0:t.application.name)||"";case O.IntegrationSettingsSections.OVERVIEW:return I.default.Messages.INTEGRATIONS_OVERVIEW;case O.IntegrationSettingsSections.CHANNEL_FOLLOWING:return I.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING;case O.IntegrationSettingsSections.TWITCH:return I.default.Messages.INTEGRATIONS_TWITCH;case O.IntegrationSettingsSections.WEBHOOKS:return I.default.Messages.INTEGRATIONS_WEBHOOKS;case O.IntegrationSettingsSections.YOUTUBE:return I.default.Messages.INTEGRATIONS_YOUTUBE;default:return""}}var R=a.memo((function(e){var t=e.section,n=e.guild,r=e.channel,C=e.integrations,b=e.editedIntegration,A=e.webhooks,R=e.editedWebhook,L=e.isFetching,D=e.refToScroller,w=e.errors,j=e.hasChanges,k=(0,i.useStateFromStores)([d.default],(function(){return null!=n?d.default.getDefaultChannel(n.id):null}),[n]),U=(0,i.useStateFromStores)([d.default,f.default],(function(){return null!=n?o.default.keyBy(d.default.getChannels(n.id).SELECTABLE.map((function(e){return e.channel})).filter((function(e){return f.default.can(O.Permissions.MANAGE_WEBHOOKS,e)})),"id"):{}}),[n]),G=r||k,F=a.useState(null),B=F[0],H=F[1],x=a.useState(u.SHAKE_INTENSITY_DEFAULT),V=x[0],W=x[1],Y=a.useCallback((function(){return j()?(y.ComponentDispatch.dispatch(O.ComponentActions.SHAKE_APP,{duration:300,intensity:V}),W(Math.min(V+u.SHAKE_INTENSITY_INCREMENT,u.SHAKE_INTENSITY_MAX)),y.ComponentDispatch.dispatch(O.ComponentActions.EMPHASIZE_NOTICE),!1):(W(u.SHAKE_INTENSITY_DEFAULT),!0)}),[j,V]),z=a.useCallback((function(e){return!!Y()&&(l.default.setSection(e),!0)}),[Y]),K=a.useMemo((function(){var e={},t={},n=[],r=[];if(null!=C)for(var a,o=N(C);!(a=o()).done;){var i=a.value;if("discord"===i.type){if(null!=i.application)e[i.application.id]={application:i.application,integration:i,webhooks:[]}}else i.type in t||(t[i.type]=[]),t[i.type].push(i)}for(var l,u=N(A);!(l=u()).done;){var s=l.value;s.channel_id in U&&(null!=s.application_id&&s.application_id in e?e[s.application_id].webhooks.push(s):s.type===O.WebhookTypes.CHANNEL_FOLLOWER?r.push(s):n.push(s))}return{applicationIntegrations:e,builtInIntegrations:t,customWebhooks:n,followedChannelWebhooks:r}}),[C,U,A]),$=K.applicationIntegrations,Z=K.builtInIntegrations,q=K.customWebhooks,X=K.followedChannelWebhooks;a.useEffect((function(){switch(t){case O.IntegrationSettingsSections.TWITCH:null==Z[O.PlatformTypes.TWITCH]&&l.default.setSection(O.IntegrationSettingsSections.OVERVIEW);break;case O.IntegrationSettingsSections.YOUTUBE:null==Z[O.PlatformTypes.YOUTUBE]&&l.default.setSection(O.IntegrationSettingsSections.OVERVIEW);break;case O.IntegrationSettingsSections.APPLICATION:null!=B&&B in $||l.default.setSection(O.IntegrationSettingsSections.OVERVIEW)}}),[$,Z,B,t]);var J=null;switch(t){case O.IntegrationSettingsSections.TWITCH:null!=Z[O.PlatformTypes.TWITCH]&&(J=M(h.default,{guild:n,integrations:Z[O.PlatformTypes.TWITCH],editedIntegration:b,labelText:I.default.Messages.INTEGRATIONS_TWITCH,platformType:O.PlatformTypes.TWITCH,descriptionText:I.default.Messages.INTEGRATIONS_TWITCH_DESCRIPTION,helpText:I.default.Messages.INTEGRATIONS_TWITCH_HELP.format({connectAction:function(){return(0,s.default)(O.PlatformTypes.TWITCH)},helpdeskArticle:m.default.getArticleURL(O.HelpdeskArticles.TWITCH_INTEGRATION)}),canNavigate:Y}));break;case O.IntegrationSettingsSections.YOUTUBE:null!=Z[O.PlatformTypes.YOUTUBE]&&(J=M(h.default,{guild:n,integrations:Z[O.PlatformTypes.YOUTUBE],editedIntegration:b,labelText:I.default.Messages.INTEGRATIONS_YOUTUBE,platformType:O.PlatformTypes.YOUTUBE,descriptionText:I.default.Messages.INTEGRATIONS_YOUTUBE_DESCRIPTION,helpText:I.default.Messages.INTEGRATIONS_YOUTUBE_HELP.format({connectAction:function(){return(0,s.default)(O.PlatformTypes.YOUTUBE)},helpdeskArticle:m.default.getArticleURL(O.HelpdeskArticles.YOUTUBE_INTEGRATION)}),canNavigate:Y}));break;case O.IntegrationSettingsSections.APPLICATION:var Q=null!=B?$[B]:null;null!=Q&&(J=M(_.default,{guild:n,applicationIntegration:Q,editedWebhook:R,selectableWebhookChannels:U,errors:w,canNavigate:Y}));break;case O.IntegrationSettingsSections.CHANNEL_FOLLOWING:J=M(E.default,{followedChannelWebhooks:X,editedWebhook:R,selectableWebhookChannels:U,canNavigate:Y,errors:w});break;case O.IntegrationSettingsSections.WEBHOOKS:J=M(S.default,{guild:n,channel:r,customWebhooks:q,editedWebhook:R,selectableWebhookChannels:U,canNavigate:Y,refToScroller:D,errors:w});break;default:J=M(g.default,{guild:n,channel:r,applicationIntegrations:$,builtInIntegrations:Z,customWebhooks:q,followedChannelWebhooks:X,isLoading:L||null==n,canCreateWebhook:null!=G,onManageCustomWebhooks:function(){l.default.setSection(O.IntegrationSettingsSections.WEBHOOKS)},onManageFollowedChannels:function(){l.default.setSection(O.IntegrationSettingsSections.CHANNEL_FOLLOWING)},onManageApplication:function(e){H(e),l.default.setSection(O.IntegrationSettingsSections.APPLICATION)},onManageBuiltIn:function(e){switch(e){case O.PlatformTypes.TWITCH:l.default.setSection(O.IntegrationSettingsSections.TWITCH);break;case O.PlatformTypes.YOUTUBE:l.default.setSection(O.IntegrationSettingsSections.YOUTUBE)}}})}return a.createElement(a.Fragment,null,M(p.default,{align:p.default.Align.CENTER,className:T.default.breadcrumbs},void 0,t===O.IntegrationSettingsSections.OVERVIEW?M(v.FormTitle,{tag:v.FormTitle.Tags.H1},void 0,P(O.IntegrationSettingsSections.OVERVIEW)):M(c.default,{activeId:t.toString(),breadcrumbs:[O.IntegrationSettingsSections.OVERVIEW,t].map((function(e){return{id:e.toString(),label:P(e,$[B])}})),onBreadcrumbClick:function(e){z(parseInt(e.id))},renderCustomBreadcrumb:function(e,t){return M(v.FormTitle,{tag:v.FormTitle.Tags.H1,className:t?T.default.breadcrumbActive:T.default.breadcrumbInactive},void 0,e.label)}})),J)}));t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(9)),i=A(n(8)),l=A(n(1211)),u=A(n(8416)),s=A(n(8283)),d=n(180),f=A(n(70)),c=A(n(12)),p=A(n(8685)),v=R(n(8302)),y=A(n(55)),m=A(n(151)),_=n(131),h=n(41),E=A(n(24)),g=n(393),S=n(8305),O=A(n(8300)),I=R(n(8332)),T=n(1),C=A(n(6)),b=A(n(7736)),M=A(n(7347)),N=A(n(370));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,j(e,t)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var k=3,U=3,G=1,F=2,B=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRevokeInvite=function(){l.default.revokeInvite(t.props.invite)},t}w(t,e);var n=t.prototype;return n.renderChannel=function(){var e=this.props,t=e.showChannel,n=e.invite;return t?D(E.default,{size:E.default.Sizes.SIZE_12,color:E.default.Colors.HEADER_SECONDARY},void 0,(0,d.computeChannelName)(n.channel,c.default,f.default,!0)):null},n.renderUser=function(){var e=this.props.invite.inviter;return null==e?null:D("div",{className:b.default.user},void 0,D(I.default,{user:e,size:I.Sizes.SIZE_24,className:b.default.avatar}),D(O.default,{className:b.default.username,discriminatorClass:b.default.discriminator,user:e}))},n.render=function(){var e=this.props,t=e.invite,n=e.hide,r=t.uses;return t.maxUses>0&&(r=t.uses+"/"+t.maxUses),D(y.default,{className:(0,o.default)(b.default.inviteSettingsInviteRow,M.default.card)},void 0,D(y.default,{grow:k,basis:0,align:y.default.Align.CENTER,className:(0,o.default)(b.default.text)},void 0,D(y.default.Child,{},void 0,this.renderUser(),this.renderChannel())),D(y.default,{grow:U,shrink:1,basis:0,align:y.default.Align.CENTER,className:b.default.text},void 0,D(E.default,{className:b.default.inviteCode},void 0,n?"...":t.code)),D(y.default,{grow:G,basis:0,justify:y.default.Justify.END,align:y.default.Align.CENTER,className:(0,o.default)(b.default.text)},void 0,D(E.default,{className:b.default.uses},void 0,r)),D(y.default,{grow:F,basis:0,align:y.default.Align.CENTER,justify:y.default.Justify.END,className:(0,o.default)(b.default.text,b.default.countdownColumn)},void 0,D(E.default,{className:b.default.countdown},void 0,D(p.default,{deadline:t.getExpiresAt()}))),D(u.default,{className:b.default.revokeInvite,onClick:this.handleRevokeInvite}))},t}(a.PureComponent);B.displayName="InviteRow";var H=function(e){function t(){for(var t,r=arguments.length,o=new Array(r),l=0;l<r;l++)o[l]=arguments[l];return(t=e.call.apply(e,[this].concat(o))||this).handleShowInviteModal=function(){var e=t.props,n=e.guild,r=e.channel;(0,h.openModal)((function(e){return a.createElement(s.default,L({},e,{channel:r,guild:n,source:T.InstantInviteSources.SETTINGS_INVITE}))}))},t.memoizedGetInvites=(0,g.cachedFunction)((function(e,t){return null==e||t?[]:(0,i.default)(e).sortBy((function(e){return(e.inviter&&e.inviter.username||"").toLowerCase()})).value()})),t.getRowHeight=function(e,n){var r=t.props,a=r.invites,o=r.loading,i=t.memoizedGetInvites(a,!!o);return e>0?0:0===i.length&&0===n&&o||null!=i[n]?62:0},t.renderRow=function(e){var n=e.section,r=e.row,a=t.props,o=a.loading,i=a.invites,l=a.showChannel,u=a.hide,s=t.memoizedGetInvites(i,!!o);if(0===s.length&&0===r&&o)return D(m.default,{className:N.default.marginTop20,type:m.default.Type.SPINNING_CIRCLE},"spinner");if(n>0)return null;var d=s[r];return null==d?null:D(B,{hide:u,invite:d,showChannel:l},d.code)},t.renderSection=function(){var e,r=t.props,a=r.invites,o=r.loading,i=r.theme,l=r.canCreateInvites;return e=0!==t.memoizedGetInvites(a,!!o).length||o?D(y.default,{},void 0,D(y.default.Child,{grow:k,basis:0,className:N.default.marginReset},void 0,D(_.FormTitle,{},void 0,C.default.Messages.INSTANT_INVITE_INVITER)),D(y.default.Child,{basis:0,grow:U,className:N.default.marginReset},void 0,D(_.FormTitle,{},void 0,C.default.Messages.INSTANT_INVITE_INVITE_CODE)),D(y.default.Child,{grow:G,basis:0,className:b.default.textAlignRight},void 0,D(_.FormTitle,{},void 0,C.default.Messages.INSTANT_INVITE_USES)),D(y.default.Child,{grow:F,basis:0,className:b.default.textAlignRight},void 0,D(_.FormTitle,{},void 0,C.default.Messages.INSTANT_INVITE_EXPIRES))):D(v.default,{theme:i},void 0,D(v.EmptyStateImage,{darkSrc:n(8997),lightSrc:n(8998),width:256,height:130}),D(v.EmptyStateText,{note:C.default.Messages.NO_INVITES_BODY},void 0,C.default.Messages.NO_INVITES_LABEL)),D(_.FormSection,{className:b.default.headerSection},"header",D(_.FormTitle,{tag:_.FormTitleTags.H1},void 0,C.default.Messages.INVITES),D(_.FormText,{className:N.default.marginBottom20,type:_.FormTextTypes.DESCRIPTION},void 0,l?C.default.Messages.SETTINGS_INVITE_TIP.format({onCreateInvite:t.handleShowInviteModal}):C.default.Messages.SETTINGS_INVITE_TIP_WITHOUT_CREATE),D(_.FormDivider,{className:b.default.headerDivider}),e)},t.getSectionHeight=function(){var e=t.props,n=e.invites,r=e.loading;return 0!==t.memoizedGetInvites(n,!!r).length||r?120:344},t}return w(t,e),t.prototype.render=function(){var e=this.props,t=e.invites,n=e.loading,r=this.memoizedGetInvites(t,!!n);return D(S.ListContentScroller,{sections:[Math.max(1,r.length)],renderSection:this.renderSection,renderRow:this.renderRow,rowHeight:this.getRowHeight,sectionHeight:this.getSectionHeight})},t}(a.PureComponent);H.displayName="SettingsInvites";var x=H;t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateVerificationLevelOptions=function(e){void 0===e&&(e=!1);return[{name:o.default.Messages.VERIFICATION_LEVEL_NONE,desc:o.default.Messages.VERIFICATION_LEVEL_NONE_CRITERIA,value:a.VerificationLevels.NONE,disabled:e,tooltipText:e?o.default.Messages.TOOLTIP_COMMUNITY_FEATURE_DISABLED:null},{name:o.default.Messages.VERIFICATION_LEVEL_LOW,desc:o.default.Messages.VERIFICATION_LEVEL_LOW_CRITERIA,value:a.VerificationLevels.LOW,color:a.Colors.STATUS_GREEN_600},{name:o.default.Messages.VERIFICATION_LEVEL_MEDIUM,desc:o.default.Messages.VERIFICATION_LEVEL_MEDIUM_CRITERIA.format({min:a.VerificationCriteria.ACCOUNT_AGE}),value:a.VerificationLevels.MEDIUM,color:a.Colors.STATUS_YELLOW},{name:o.default.Messages.VERIFICATION_LEVEL_HIGH,desc:o.default.Messages.VERIFICATION_LEVEL_HIGH_CRITERIA.format({min:a.VerificationCriteria.MEMBER_AGE}),value:a.VerificationLevels.HIGH,color:a.Colors.STATUS_ORANGE},{name:o.default.Messages.VERIFICATION_LEVEL_VERY_HIGH,desc:o.default.Messages.VERIFICATION_LEVEL_VERY_HIGH_CRITERIA,value:a.VerificationLevels.VERY_HIGH,color:a.Colors.STATUS_RED}]},t.generateContentFilterOptions=function(e){void 0===e&&(e=!1);return[{name:o.default.Messages.EXPLICIT_CONTENT_FILTER_DISABLED,desc:o.default.Messages.EXPLICIT_CONTENT_FILTER_DISABLED_DESCRIPTION,value:a.GuildExplicitContentFilterTypes.DISABLED,disabled:e,tooltipText:e?o.default.Messages.TOOLTIP_COMMUNITY_FEATURE_DISABLED:null},{name:o.default.Messages.EXPLICIT_CONTENT_FILTER_MEDIUM,desc:o.default.Messages.EXPLICIT_CONTENT_FILTER_MEDIUM_DESCRIPTION,value:a.GuildExplicitContentFilterTypes.MEMBERS_WITHOUT_ROLES,disabled:e,tooltipText:e?o.default.Messages.TOOLTIP_COMMUNITY_FEATURE_DISABLED:null},{name:o.default.Messages.EXPLICIT_CONTENT_FILTER_HIGH,desc:o.default.Messages.EXPLICIT_CONTENT_FILTER_HIGH_DESCRIPTION,value:a.GuildExplicitContentFilterTypes.ALL_MEMBERS}]},t.generateDMSafetyOptions=function(){return[{name:o.default.Messages.USER_EXPLICIT_CONTENT_FILTER_FRIENDS_AND_NON_FRIENDS,desc:o.default.Messages.USER_EXPLICIT_CONTENT_FILTER_FRIENDS_AND_NON_FRIENDS_HELP,value:a.ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS,color:a.Colors.STATUS_GREEN_600},{name:o.default.Messages.USER_EXPLICIT_CONTENT_FILTER_NON_FRIENDS,desc:o.default.Messages.USER_EXPLICIT_CONTENT_FILTER_NON_FRIENDS_HELP,value:a.ExplicitContentFilterTypes.NON_FRIENDS,color:a.Colors.STATUS_YELLOW_560},{name:o.default.Messages.USER_EXPLICIT_CONTENT_FILTER_DISABLED,desc:o.default.Messages.USER_EXPLICIT_CONTENT_FILTER_DISABLED_HELP,value:a.ExplicitContentFilterTypes.DISABLED,color:a.Colors.STATUS_RED}]};var r,a=n(1),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(9)),o=c(n(183)),i=c(n(8377)),l=c(n(88)),u=c(n(149)),s=c(n(13)),d=n(1),f=c(n(7744));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.disabled,n=void 0!==t&&t,r=e.type,c=e.className,p=e.innerClassName,y=e.onConnect;var m=o.default.get(r);return v(u.default,{text:m.name},void 0,(function(e){var t=e.onMouseEnter,u=e.onMouseLeave;return v("div",{className:(0,a.default)(f.default.wrapper,c)},void 0,v(l.default,{},void 0,v("button",{onMouseEnter:t,onMouseLeave:u,className:(0,a.default)(f.default.inner,p),type:"button",disabled:n,style:{backgroundImage:"url('"+m.icon.color+"')"},onClick:null!=y?y:function(){return function(e){var t=o.default.get(e);(0,i.default)(t.type,"Friends List"),s.default.track(d.AnalyticEvents.ACCOUNT_LINK_STEP,{previous_step:"desktop connections",current_step:"desktop oauth",platform_type:t.type})}(r)},"aria-label":m.name})))}))};y.displayName="ConnectAccountButton";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(9)),o=u(n(7760)),i=u(n(9923)),l=u(n(9924));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.Icon,n=e.className;return d("div",{className:(0,a.default)(o.default.container,n)},void 0,d("div",{className:o.default.innerContainer},void 0,d("img",{src:l.default,alt:"",className:o.default.star}),d("div",{className:o.default.iconWrapper},void 0,d(t,{width:40,height:40})),d("img",{src:i.default,alt:"",className:o.default.sparkle})))}f.displayName="SparklyIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M23 10V4H1V10C2.1 10 3 10.9 3 12C3 13.1 2.1 14 1 14V20H23V14C21.9 14 21 13.1 21 12C21 10.9 21.9 10 23 10ZM13 16V18H11V16H9V14H13C13.27 14 13.5 13.83 13.5 13.62C13.5 12.58 8.5 13.62 8.5 10.37C8.5 9.07 9.62 8 11 8V6H13V8H15V10H11C10.73 10 10.5 10.17 10.5 10.38C10.5 11.42 15.5 10.38 15.5 13.63C15.5 14.93 14.38 16 13 16Z"}))}d.displayName="Ticket"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=s(n(8768)),i=n(8253),l=s(n(181)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.isGuildCollapsed(e)}),[e]);return f(i.MenuCheckboxItem,{id:"hide-muted-channels",label:u.default.Messages.HIDE_MUTED_CHANNELS,action:function(){return o.default.toggleCollapseGuild(e)},checked:t})}c.displayName="useHideMutedChannelsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=v(n(8283)),l=n(8253),u=n(8256),s=v(n(40)),d=n(41),f=n(8286),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}function h(e,t){var n=(0,o.useStateFromStores)([s.default],(function(){return(0,f.canViewInviteModal)(s.default,e,t)}));return null!=t&&n?m(l.MenuItem,{id:"invite-people",label:p.default.Messages.INVITE_PEOPLE,color:u.MenuItemColor.BRAND,action:function(){return(0,d.openModal)((function(n){return a.createElement(i.default,_({},n,{guild:e,channel:t,source:c.InstantInviteSources.GUILD_CONTEXT_MENU}))}))}}):null}h.displayName="useInvitePeopleItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){return(l=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}).apply(this,arguments)}var u=null;var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.getCurrentPath=function(){return null!=u?u.pathname:null},a.getCurrentRoute=function(){return function(e){var t=null!=e&&null!=e.search?e.search:"";return null!=e?""+e.pathname+t:null}(u)},a.reset=function(){throw new Error("Should not reset the store this way outside of a test environment")},r}(r.default.Store))(a.default,{APPLICATION_STORE_LOCATION_CHANGE:function(e){var t=e.location;u=l({},t)},APPLICATION_STORE_RESET_NAVIGATION:function(e){u=null}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={toggleMembersSection:function(){a.default.dispatch({type:o.ActionTypes.CHANNEL_TOGGLE_MEMBERS_SECTION})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(29)),i=p(n(55)),l=p(n(371)),u=p(n(47)),s=p(n(24)),d=p(n(6)),f=p(n(7350)),c=p(n(9944));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.reapplyText,n=e.onReapply,r=e.confirmText,p=e.onConfirm,v=e.rejectionReason,m=void 0===v?null:v,_=e.guild,h=void 0===_?null:_;return y(i.default,{direction:i.default.Direction.VERTICAL,align:i.default.Align.CENTER,className:f.default.confirmation},void 0,y("div",{className:f.default.confirmationContent},void 0,null!==h?y(l.default,{size:l.default.Sizes.LARGER,guild:h,className:f.default.guildIcon}):y("img",{alt:d.default.Messages.MEMBER_VERIFICATION_APPLICATION_REJECTED_ICON,src:c.default,className:f.default.verificationStateIcon}),y(u.default,{size:u.default.Sizes.SIZE_24,className:f.default.header},void 0,(null==h?void 0:h.name)?d.default.Messages.MEMBER_VERIFICATION_APPLICATION_REJECTED_TITLE_WITH_GUILD_NAME.format({guildName:null==h?void 0:h.name}):d.default.Messages.MEMBER_VERIFICATION_APPLICATION_REJECTED_TITLE),m&&a.createElement(a.Fragment,null,y(s.default,{size:s.default.Sizes.SIZE_14},void 0,y("span",{className:f.default.rejectionReasonLabel},void 0,d.default.Messages.MEMBER_VERIFICATION_APPLICATION_REJECTED_REASON),y("span",{className:f.default.rejectionReason},void 0,m)))),y("div",{className:f.default.confirmationButtonRow},void 0,y(o.default,{onClick:n,color:o.default.Colors.GREY,className:f.default.confirmationButton},void 0,t),y(o.default,{onClick:p,color:o.default.Colors.GREY,className:f.default.confirmationButton},void 0,r)))};m.displayName="MemberVerificationApplicationRejected";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t=!1);var n=(0,r.default)(e,!0);if(null==e||null==n)return"";if(t)return o.default.Messages.READ_ONLY_CHANNEL;switch(e.type){case a.ChannelTypes.DM:return o.default.Messages.DM_TEXTAREA_PLACEHOLDER.format({channel:n});default:return o.default.Messages.TEXTAREA_PLACEHOLDER.format({channel:n})}};var r=i(n(180)),a=n(1),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TutorialIndicator=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=g(n(8)),l=n(67),u=g(n(3)),s=g(n(8691)),d=g(n(11)),f=g(n(694)),c=g(n(1238)),p=g(n(8692)),v=g(n(161)),y=g(n(9947)),m=n(9948),_=n(9952),h=n(1),E=g(n(7768));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C(e,t)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=Object.freeze({x:0,y:0}),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={offsetX:null,offsetY:null,popoutOffsetX:0,popoutOffsetY:0},t.handleDismiss=function(){s.default.dismiss(t.props.tutorialId)},t}T(t,e);var n=t.prototype;return n.componentDidMount=function(){this.updateCache()},n.componentDidUpdate=function(e){var t=e.tutorialId,n=e.x,r=e.y,a=e.targetWidth,o=e.targetHeight,i=e.position,l=e.offset;this.props.tutorialId===t&&this.props.x===n&&this.props.y===r&&this.props.targetWidth===a&&this.props.targetHeight===o&&this.props.position===i&&this.props.offset.x===l.x&&this.props.offset.y===l.y||this.updateCache()},n.getPopoutOffset=function(){var e=this.props,t=e.popoutOffset,n=e.tutorialDefinition;return null!=t?t:null!=n.popoutOffset?n.popoutOffset:b},n.updateCache=function(){var e=(0,l.findDOMNode)(this);if(e&&e instanceof HTMLElement){var t=this.getPopoutOffset(),n=e.offsetWidth,r=e.offsetHeight,a={offsetX:(this.props.targetWidth-n)/2,offsetY:(this.props.targetHeight-r)/2,popoutOffsetX:0,popoutOffsetY:0};switch(this.props.position){case"left":a.offsetX=-n,a.popoutOffsetX=n;break;case"right":a.offsetX=this.props.targetWidth,a.popoutOffsetX=-n;break;case"bottom":a.offsetY=this.props.targetHeight,a.popoutOffsetY=-r;break;case"top":default:a.offsetY=-r,a.popoutOffsetY=r}a.popoutOffsetX+=t.x,a.popoutOffsetY+=t.y,a.offsetX+=this.props.offset.x?this.props.offset.x:0,a.offsetY+=this.props.offset.y?this.props.offset.y:0,this.setState(a)}},n.handleSkipTips=function(){s.default.suppressAll()},n.getTutorialPopoutText=function(){var e=this.props.tutorialId;return(0,_.getTutorialPopoutText)(e)},n.render=function(){var e,t,n,r=this.props,i=r.tutorialId,l=r.preventInvert,u=(0,m.getTutorialPopoutAttributes)(i);if(null==u)return null;var s=u.media,d=u.textAlign,f=u.isLongText,c=u.arrowAlignment,p=u.highPriority,v=u.popoutPosition,_={left:null!=this.state.offsetX?this.props.x+this.state.offsetX:void 0,top:null!=this.state.offsetY?this.props.y+this.state.offsetY:void 0},g=this.props.visible,S=!0!==p?null:I("div",{},void 0,I("div",{className:(0,o.default)(E.default.top,(e={},e[E.default.animating]=g,e[E.default.notAnimating]=!g,e))}),I("div",{className:(0,o.default)(E.default.bottom,(t={},t[E.default.animating]=g,t[E.default.notAnimating]=!g,t))})),T=((n={})[E.default.animating]=g,n[E.default.notAnimating]=!g,n[E.default.highPriority]=p,n),C=this.getTutorialPopoutText(),b=this.state,M=b.popoutOffsetX,N=b.popoutOffsetY;return a.createElement(y.default,O({position:v,renderMedia:s,textAlign:d,isLongText:f,arrowAlignment:c,uniqueId:i,showArrow:!0,preventInvert:l,forceTheme:h.ThemeTypes.LIGHT,onSkipAll:this.handleSkipTips,onComplete:this.handleDismiss,offsetX:M,offsetY:N},C),I("div",{className:E.default.indicator,style:_,"data-tutorial-id":i},void 0,I("div",{className:(0,o.default)(E.default.animationContainer,T)},void 0,S,I("div",{className:(0,o.default)(E.default.innerCircle,T)}),I("div",{className:(0,o.default)(E.default.outerCircle,T)}))))},t}(a.PureComponent);t.TutorialIndicator=M,M.displayName="TutorialIndicator";var N=u.default.connectStores([p.default,f.default,v.default,d.default],(function(){return{indicators:p.default.getIndicators(),tutorialData:p.default.getData(),shouldShowAny:p.default.shouldShowAnyIndicators()&&!f.default.hasLayers()&&!d.default.isGuest(),isFocused:v.default.isFocused()}}))(function(e){function t(){return e.apply(this,arguments)||this}return T(t,e),t.prototype.render=function(){var e=this.props,t=e.indicators,n=e.shouldShowAny,r=e.isFocused,o=e.tutorialData;return n?i.default.map(t,(function(e,t){var n=o[t];return null==n?null:a.createElement(M,O({key:t,tutorialId:t,tutorialDefinition:n,visible:r&&!c.default.isOpen(t)},e))})):null},t}(a.Component));t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHubGuildTemplatesMap=function(){var e;return(e={})[o.CREATE]={id:o.CREATE,code:"2TffvPucqHkN",label:s.default.Messages.GUILD_TEMPLATE_HEADER_CREATE,channels:[],system_channel_id:null},e[o.HUB_SCHOOL_CLUB]={id:o.HUB_SCHOOL_CLUB,code:"UMUbvRpRZhS6",label:s.default.Messages.GUILD_TEMPLATE_HEADER_SCHOOL_CLUB,channels:[{id:"00",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFORMATION,type:u.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_WELCOME_AND_RULES,type:u.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_ANNOUNCEMENTS,type:u.ChannelTypes.GUILD_TEXT},{id:"03",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_RESOURCES,type:u.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_TEXT,type:u.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_INTRODUCTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:u.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:u.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:u.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:u.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MEETING_ROOM_1,type:u.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MEETING_ROOM_2,type:u.ChannelTypes.GUILD_VOICE}],roles:[{id:"00",name:"@everyone",permissions:l.default.DEFAULT},{id:"01",name:"officers (example)",mentionable:!0,hoist:!0,permissions:i.default.combine(l.default.DEFAULT,u.Permissions.MANAGE_ROLES,u.Permissions.MANAGE_CHANNELS,u.Permissions.KICK_MEMBERS,u.Permissions.BAN_MEMBERS,u.Permissions.MANAGE_NICKNAMES,u.Permissions.MANAGE_EMOJIS,u.Permissions.MANAGE_MESSAGES,u.Permissions.SEND_TTS_MESSAGES),color:3066993}],system_channel_id:"12"},e[o.HUB_STUDY]={id:o.HUB_STUDY,code:"2JBhzzca2vfT",label:s.default.Messages.GUILD_TEMPLATE_HEADER_STUDY,channels:[{id:"00",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFO,type:u.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_NOTES_RESOURCES,type:u.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_HELP_QUESTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_CHAT,type:u.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_INTRODUCTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:u.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:u.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:u.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:u.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:1}),type:u.ChannelTypes.GUILD_VOICE},{id:"23",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:2}),type:u.ChannelTypes.GUILD_VOICE}],system_channel_id:"12"},e[o.HUB_CLASS]={id:o.HUB_CLASS,code:"r86WWBwTGspb",label:s.default.Messages.GUILD_TEMPLATE_HEADER_CLASS,channels:[{id:"00",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFO,type:u.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_ASSIGNMENTS,type:u.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_HELP_QUESTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_CHAT,type:u.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_INTRODUCTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:u.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:u.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:u.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:u.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:1}),type:u.ChannelTypes.GUILD_VOICE},{id:"23",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:2}),type:u.ChannelTypes.GUILD_VOICE}],system_channel_id:"12"},e[o.HUB_SOCIAL]={id:o.HUB_SOCIAL,code:"AvvtXE3mfbCR",label:s.default.Messages.GUILD_TEMPLATE_HEADER_SOCIAL,channels:[{id:"00",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_CHAT,type:u.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_INTRODUCTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:u.ChannelTypes.GUILD_TEXT},{id:"03",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:u.ChannelTypes.GUILD_TEXT},{id:"04",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_MEETUPS,type:u.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:u.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_COUCHES,type:u.ChannelTypes.GUILD_VOICE},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MOVIE_ROOM,type:u.ChannelTypes.GUILD_VOICE},{id:"13",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_UNNUMBERED_STUDY_ROOM,type:u.ChannelTypes.GUILD_VOICE}],system_channel_id:"02"},e[o.HUB_MAJOR]={id:o.HUB_MAJOR,code:"FhmfDR6Arvsc",label:s.default.Messages.GUILD_TEMPLATE_HEADER_MAJOR,channels:[{id:"00",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFO,type:u.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_RESOURCES,type:u.ChannelTypes.GUILD_TEXT},{id:"02",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_HELP_QUESTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_CHAT,type:u.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_INTRODUCTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:u.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:u.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:u.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:u.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:1}),type:u.ChannelTypes.GUILD_VOICE},{id:"23",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_STUDY_ROOM.format({number:2}),type:u.ChannelTypes.GUILD_VOICE}],system_channel_id:"12"},e[o.HUB_DORM]={id:o.HUB_DORM,code:"fkq8xHfrGE58",label:s.default.Messages.GUILD_TEMPLATE_HEADER_DORM,channels:[{id:"00",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_INFO,type:u.ChannelTypes.GUILD_CATEGORY},{id:"01",parent_id:"00",name:s.default.Messages.GUILD_TEMPLATE_NAME_DORM_NEWS,type:u.ChannelTypes.GUILD_TEXT},{id:"10",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_CHAT,type:u.ChannelTypes.GUILD_CATEGORY},{id:"11",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_INTRODUCTIONS,type:u.ChannelTypes.GUILD_TEXT},{id:"12",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_GENERAL,type:u.ChannelTypes.GUILD_TEXT},{id:"13",parent_id:"10",name:s.default.Messages.GUILD_TEMPLATE_NAME_OFF_TOPIC,type:u.ChannelTypes.GUILD_TEXT},{id:"20",parent_id:null,name:s.default.Messages.GUILD_TEMPLATE_NAME_CATEGORY_VOICE,type:u.ChannelTypes.GUILD_CATEGORY},{id:"21",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_LOUNGE,type:u.ChannelTypes.GUILD_VOICE},{id:"22",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_MOVIE_ROOM,type:u.ChannelTypes.GUILD_VOICE},{id:"23",parent_id:"20",name:s.default.Messages.GUILD_TEMPLATE_NAME_VOICE_COUCHES,type:u.ChannelTypes.GUILD_VOICE}],system_channel_id:"12"},e},t.HubGuildTemplateId=t.CreateOrAddGuildSlideTypes=t.DirectoryEntryTypes=void 0;var r,a,o,i=d(n(63)),l=d(n(78)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}t.DirectoryEntryTypes=r,function(e){e[e.GUILD=0]="GUILD"}(r||(t.DirectoryEntryTypes=r={})),t.CreateOrAddGuildSlideTypes=a,function(e){e.GUILD_TEMPLATES="guild-templates",e.CUSTOMIZE_NEW_GUILD="customize-new-guild",e.CHOOSE_GUILD="choose-guild",e.CUSTOMIZE_EXISTING_GUILD="customize-existing-guild",e.CONFIRMATION="confirmation"}(a||(t.CreateOrAddGuildSlideTypes=a={})),t.HubGuildTemplateId=o,function(e){e.CREATE="CREATE",e.HUB_SCHOOL_CLUB="HUB_SCHOOL_CLUB",e.HUB_STUDY="HUB_STUDY",e.HUB_CLASS="HUB_CLASS",e.HUB_SOCIAL="HUB_SOCIAL",e.HUB_MAJOR="HUB_MAJOR",e.HUB_DORM="HUB_DORM"}(o||(t.HubGuildTemplateId=o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(180)),i=f(n(29)),l=f(n(466)),u=f(n(24)),s=f(n(6)),d=f(n(7769));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.channel,n=e.category,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channel","category"]),f=(0,o.default)(t,!0),c=(0,o.default)(n);return a.createElement(l.default,p({header:s.default.Messages.CONFIRM_CHANNEL_DRAG_TITLE,confirmText:s.default.Messages.SYNC_PERMISSIONS,cancelText:s.default.Messages.KEEP_PERMISSIONS,confirmButtonColor:i.default.Colors.BRAND},r),v(u.default,{size:u.default.Sizes.SIZE_16,className:d.default.message,selectable:!1},void 0,s.default.Messages.SYNC_PERMISSIONS_EXPLANATION.format({channelName:f,categoryName:c})))}y.displayName="ConfirmChannelDrag"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C5.93 2 1 6.93 1 13C1 15 1.55 16.88 2.48 18.49L3.77 17.74C2.97 16.35 2.5 14.73 2.5 13C2.5 7.75 6.75 3.5 12 3.5C17.25 3.5 21.5 7.75 21.5 13H23C23 6.93 18.07 2 12 2ZM5.5 13C5.5 9.42 8.42 6.5 12 6.5C15.58 6.5 18.5 9.42 18.5 13H17C17 10.24 14.76 8 12 8C9.24 8 7 10.24 7 13C7 13.91 7.26 14.75 7.69 15.49L6.38 16.25C5.82 15.29 5.5 14.18 5.5 13ZM12 15C13.1046 15 14 14.1046 14 13C14 11.8954 13.1046 11 12 11C10.8954 11 10 11.8954 10 13C10 14.1046 10.8954 15 12 15ZM12 16.5C9.94 16.5 8.5 17.8 8.5 19.5V20H13V16.62C12.69 16.55 12.36 16.5 12 16.5ZM17 15H22C23.1 15 24 15.9 24 17V22C24 23.1 23.1 24 22 24H17C15.9 24 15 23.1 15 22V17C15 15.9 15.9 15 17 15ZM17 22H22V21H17V22ZM17 20H22V19H17V20ZM17 18H22V17H17V18Z",fill:d}))}d.displayName="StageEvents"},,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(9)),i=l(n(7797));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=Object.freeze({SMALL:1,MEDIUM:2,LARGE:4}),c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.renderCircle=function(){var e=this.props,t=e.strokeSize,n=e.percent,r=e.colorOverride,a=e.background,l=Math.min(Math.max(n,0),100),u=(20-t)/2,d=u*Math.PI*2;return s("svg",{viewBox:"0 0 20 20",className:i.default.circle},void 0,s("circle",{className:i.default.circleBackgroundAlt,cx:10,cy:10,r:10}),s("circle",{className:(0,o.default)(i.default.circleBackground,a),cx:10,cy:10,r:(20-2*t)/2}),s("circle",{className:i.default.circleProgress,cx:10,cy:10,r:u,strokeWidth:t+"px",strokeLinecap:"round",transform:"rotate(-90 10 10)",stroke:null!=r?r:"currentColor",style:{strokeDasharray:d,strokeDashoffset:(1-l/100)*d}}))},a.render=function(){var e=this.props,t=e.className,n=e.children;return s("div",{className:(0,o.default)(i.default.progressCircle,t)},void 0,this.renderCircle(),null!=n?s("div",{className:i.default.circleOverlay},void 0,n):null)},r}(a.Component);c.displayName="ProgressCircle",c.StrokeSizes=f,c.defaultProps={strokeSize:f.MEDIUM};var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.25 18L13.25 6L11.75 6L11.75 18L13.25 18Z",fill:d}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 12.75C6.30964 12.75 5.75 13.3096 5.75 14V18H4.25V14C4.25 12.4812 5.48122 11.25 7 11.25H18C19.5188 11.25 20.75 12.4812 20.75 14V18H19.25V14C19.25 13.3096 18.6904 12.75 18 12.75H7Z",fill:d}),s("path",{d:"M12.5 7C11.1193 7 10 5.88071 10 4.5C10 3.11929 11.1193 2 12.5 2C13.8807 2 15 3.11929 15 4.5C15 5.88071 13.8807 7 12.5 7Z",fill:d}),s("path",{d:"M20 22C18.6193 22 17.5 20.8807 17.5 19.5C17.5 18.1193 18.6193 17 20 17C21.3807 17 22.5 18.1193 22.5 19.5C22.5 20.8807 21.3807 22 20 22Z",fill:d}),s("path",{d:"M12.5 22C11.1193 22 10 20.8807 10 19.5C10 18.1193 11.1193 17 12.5 17C13.8807 17 15 18.1193 15 19.5C15 20.8807 13.8807 22 12.5 22Z",fill:d}),s("path",{d:"M5 22C3.61929 22 2.5 20.8807 2.5 19.5C2.5 18.1193 3.61929 17 5 17C6.38071 17 7.5 18.1193 7.5 19.5C7.5 20.8807 6.38071 22 5 22Z",fill:d}))}d.displayName="Hub"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={};var u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.initialize=function(e){var t=e;null!=t&&Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(l[e]=t[e])}))},a.getState=function(){return l},a.hasViewed=function(e){return null!=l[e]},r}(r.default.PersistedStore);u.persistKey="ViewHistoryStore";var s=new u(a.default,{VIEW_HISTORY_MARK_VIEW:function(e){var t=e.key;l[t]=Date.now()}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=function(e,t){m.default.track(_.AnalyticEvents.OPEN_MODAL,{type:"Guest Mode - Login Modal",location:e}),T=(0,v.openModal)((function(e){return a.createElement(b,I({},e,{openRegister:t}))}))},t.close=C,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(2)),l=g(n(199)),u=g(n(5702)),s=n(42),d=g(n(413)),f=g(n(36)),c=g(n(107)),p=n(35),v=n(41),y=g(n(24)),m=g(n(13)),_=n(1),h=g(n(6)),E=g(n(7390));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}var T=null;function C(){null!=T&&(0,v.closeModal)(T),T=null}var b=function(e){var t=e.transitionState,r=e.openRegister,a=(0,o.useStateFromStores)([c.default],(function(){return c.default.getGuildId()}),[]),v=(0,o.useStateFromStores)([f.default],(function(){return f.default.getChannelId()})),m=(0,o.useStateFromStores)([d.default],(function(){return d.default.getGuildId()}),[]);return O(p.ModalRoot,{transitionState:t,className:E.default.modal,size:p.ModalSize.MEDIUM,"aria-label":h.default.Messages.LOGIN_TITLE},void 0,O("div",{className:E.default.information},void 0,O(y.default,{size:y.default.Sizes.SIZE_24},void 0,h.default.Messages.LOGIN_TITLE),O(y.default,{className:E.default.body},void 0,h.default.Messages.AUTH_LOGIN_BODY),O("img",{alt:"",src:n(8772),className:E.default.image})),O(u.default,{transitionTo:function(e){i.default.wait((function(){var t=[];null!=a&&void 0!==a&&t.push(l.default.joinGuild(a,!1,_.JoinGuildSources.CHAT_INPUT_BLOCKER)),null!=m&&m!==a&&t.push(l.default.joinGuild(m,!1,_.JoinGuildSources.CHAT_INPUT_BLOCKER)),Promise.all(t).then((function(){(0,s.transitionTo)(e)}))}))},redirectTo:_.Routes.CHANNEL(a,v),isGuest:!0,authBoxClassName:E.default.card,closeLogin:C,openRegister:r}))};b.displayName="Login";var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=function(e,t){m.default.track(_.AnalyticEvents.OPEN_MODAL,{type:"Guest Mode - Register Modal",location:e}),T=(0,v.openModal)((function(e){return a.createElement(b,I({},e,{openLogin:t}))}))},t.close=C,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(2)),l=g(n(199)),u=g(n(8704)),s=n(42),d=g(n(413)),f=g(n(36)),c=g(n(107)),p=n(35),v=n(41),y=g(n(24)),m=g(n(13)),_=n(1),h=g(n(6)),E=g(n(7390));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}var T=null;function C(){null!=T&&(0,v.closeModal)(T),T=null}var b=function(e){var t=e.transitionState,r=e.openLogin,a=(0,o.useStateFromStores)([c.default],(function(){return c.default.getGuildId()}),[]),v=(0,o.useStateFromStores)([f.default],(function(){return f.default.getChannelId()})),m=(0,o.useStateFromStores)([d.default],(function(){return d.default.getGuildId()}),[]);return O(p.ModalRoot,{transitionState:t,size:p.ModalSize.MEDIUM,className:E.default.modal,"aria-label":h.default.Messages.GUEST_LURKER_MODE_CHAT_INPUT_HEADER},void 0,O("div",{className:E.default.information},void 0,O(y.default,{size:y.default.Sizes.SIZE_24},void 0,h.default.Messages.GUEST_LURKER_MODE_CHAT_INPUT_HEADER),O(y.default,{className:E.default.body},void 0,h.default.Messages.GUEST_LURKER_MODE_CHAT_INPUT_BODY),O("img",{alt:"",src:n(8772),className:E.default.image})),O(u.default,{transitionTo:function(e){i.default.wait((function(){var t=[];null!=a&&t.push(l.default.joinGuild(a,!1,_.JoinGuildSources.CHAT_INPUT_BLOCKER)),null!=m&&m!==a&&t.push(l.default.joinGuild(m,!1,_.JoinGuildSources.CHAT_INPUT_BLOCKER)),Promise.all(t).then((function(){(0,s.transitionTo)(e)}))}))},redirectTo:_.Routes.CHANNEL(a,v),isGuest:!0,closeRegister:C,openLogin:r,authBoxClassName:E.default.card}))};b.displayName="Register";var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(1153)),a=u(n(3)),o=u(n(2)),i=u(n(16)),l=n(742);n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=null;var f=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),a.prototype.isUnderageAnonymous=function(){return i.default.embedded?null!=d&&d+l.AGE_GATE_REGISTER_TIMEOUT_MS>Date.now():null!=r.default.parse(document.cookie).underage},a}(a.default.Store))(o.default,{AGE_GATE_PREVENT_UNDERAGE_REGISTRATION:function(e){return!0,d=Date.now(),void(document.cookie="underage=1;path=/")},LOGIN_SUCCESS:function(e){return!1,d=null,void(document.cookie="underage=1;path=/;max-age=0")}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.isOnXbox)(e))return i.XBOX_APPLICATION_ID_PREFIX+e.name;if((0,r.isListeningOnSpotify)(e)&&null!=e.party&&null!=e.party.id)return a.SpotifyApplication.id;if((0,r.isStreaming)(e)&&null!=e.url)return o.TWITCH_APPLICATION_ID_PREFIX+e.url;if(null!=e.application_id)return e.application_id;return null};var r=n(1214),a=n(1264),o=n(9213),i=n(9214)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TWITCH_APPLICATION_ID_PREFIX=void 0;var r=i(n(183)),a=i(n(379)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.TWITCH_APPLICATION_ID_PREFIX="twitch:";var u=function(e){var t,n;function a(t){var n;return(n=e.call(this,t)||this).id="twitch:"+t.url,n.name=o.default.Messages.GAME_FEED_ACTIVITY_STREAMING_TWITCH,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),a.prototype.getIconURL=function(){return r.default.get("twitch").icon.svg},a}(a.default);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.XBOX_APPLICATION_ID_PREFIX=void 0;var r=o(n(183)),a=o(n(379));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.XBOX_APPLICATION_ID_PREFIX="xbox:";var l=function(e){var t,n;function a(t){var n;return(n=e.call(this,t)||this).id="xbox:"+t.name,n.name=t.name,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),a.prototype.getIconURL=function(){return r.default.get("xbox").icon.svg},a}(a.default);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M12 2C6.485 2 2 6.485 2 12H5.33333C5.33333 8.32333 8.32333 5.33333 12 5.33333C15.6767 5.33333 18.6667 8.32333 18.6667 12C18.6667 15.6767 15.6767 18.6667 12 18.6667C10.2033 18.6667 8.55833 17.9333 7.315 16.6867L10.3333 13.6667H2V22L4.935 19.065C6.79833 20.94 9.30167 22 12 22C17.515 22 22 17.515 22 12C22 6.48667 17.515 2 12 2Z"}))}d.displayName="Retry"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=c(n(0)),o=d(n(9)),i=d(n(55)),l=n(85),u=c(n(35)),s=d(n(7813));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).headerId=(0,l.uid)(),t.scrollerRef=a.createRef(),t.handleScroll=function(){var e,n,r=t.scrollerRef.current;null!=r&&(null===(e=(n=t.props).onScroll)||void 0===e||e.call(n,r))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.prototype.render=function(){var e,t=this,n=this.props,r=n.renderFooter,l=n.selectable,d=n.renderHeader,f=n.className,c=n.onClose,y=n.children;return r&&(e=v(u.ModalFooter,{direction:i.default.Direction.HORIZONTAL},void 0,r())),v(u.default,{onCloseRequest:c,renderModal:function(n){var r=n.onClose,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(n,["onClose"]);return a.createElement(u.ModalRoot,p({className:s.default.modal},m,{"aria-labelledby":t.headerId}),v(u.ModalHeader,{align:i.default.Justify.BETWEEN,separator:!1,id:t.headerId},void 0,d(),v(i.default.Child,{grow:0},void 0,v(u.ModalCloseButton,{onClick:function(){null!=c&&c(),r()}}))),v(u.ModalContent,{className:(0,o.default)(f,s.default.content,{selectable:l}),scrollerRef:t.scrollerRef,onScroll:t.handleScroll},void 0,y),e)}})},r}(a.PureComponent);m.displayName="Markdown",m.defaultProps={selectable:!1};var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;g(n(0));var r,a=n(389),o=h(n(8258)),i=g(n(8253)),l=h(n(11)),u=h(n(8579)),s=h(n(10067)),d=h(n(8484)),f=h(n(8329)),c=h(n(8370)),p=h(n(8485)),v=h(n(8399)),y=h(n(8571)),m=n(1),_=h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.channel,n=e.guild,r=e.includeTopic,h=void 0!==r&&r,E=e.onSelect,g=(0,v.default)(t),O=(0,y.default)(t),I=(0,s.default)(t),T=(0,c.default)(t),C=(0,p.default)(t,n),b=(0,u.default)(t,n),M=(0,d.default)(t,n,m.ChannelTypes.GUILD_TEXT),N=(0,d.default)(t,n,m.ChannelTypes.GUILD_VOICE),A=(0,f.default)(t),P=(0,o.default)(t.id);return l.default.isGuest()?null:S(i.default,{navId:"channel-context",onClose:a.closeContextMenu,"aria-label":_.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:E},void 0,S(i.MenuGroup,{},void 0,g),S(i.MenuGroup,{},void 0,h?I:O,T),S(i.MenuGroup,{},void 0,C,b,M,N),S(i.MenuGroup,{},void 0,A),S(i.MenuGroup,{},void 0,P))}O.displayName="ChannelListTextChannelContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeMessageCTA=G,t.default=F;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=w(n(9)),i=n(276),l=w(n(273)),u=n(3),s=n(206),d=w(n(8254)),f=w(n(8283)),c=n(1228),p=w(n(763)),v=w(n(106)),y=n(8769),m=n(10068),_=w(n(11)),h=w(n(15)),E=w(n(12)),g=w(n(61)),S=w(n(683)),O=w(n(372)),I=n(41),T=w(n(47)),C=w(n(24)),b=n(121),M=w(n(93)),N=w(n(16)),A=w(n(97)),P=w(n(8373)),R=n(1),L=w(n(6)),D=w(n(7815));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function G(e){var t,n,r=e.className,i=e.iconUrl,l=e.icon,u=e.header,s=e.completed,d=e.onClick,f=a.useState(!1),c=f[0],v=f[1],y=(0,p.default)(s);return a.useEffect((function(){null!=y&&s!==y&&(v(!0),setTimeout((function(){return v(!1)}),1e3))}),[s,y]),U(g.default,{className:(0,o.default)(r,D.default.card,(t={},t[D.default.completed]=s,t)),onClick:d},void 0,l||U("div",{className:D.default.icon,style:{backgroundImage:"url('"+i+"')"}}),U(C.default,{color:C.default.Colors.HEADER_PRIMARY,className:D.default.cardHeader},void 0,u),s?U(O.default,{className:(0,o.default)(D.default.checkmark,(n={},n[D.default.animate]=c,n))}):U(S.default,{className:D.default.arrow,direction:S.default.Directions.RIGHT}))}function F(e){var t,r=e.channel,p=(0,u.useStateFromStores)([h.default],(function(){return null!=r?h.default.getGuild(r.getGuildId()):null}),[r]),g=null!=p&&A.default.extractTimestamp(p.id)<(0,s.now)()-R.WELCOME_OLD_GUILD_AGE_THRESHOLD,S=(0,u.useStateFromStores)([_.default],(function(){return(null==p?void 0:p.ownerId)===_.default.getId()}),[p]),O=(0,m.usePermissions)(r,p),w=O.canInvite,j=O.canCustomize,F=O.canMessage,B=(0,u.useStateFromStores)([E.default],(function(){var e,t;return!0===(null===(e=E.default.getNullableCurrentUser())||void 0===e?void 0:e.desktop)||!0===(null===(t=E.default.getNullableCurrentUser())||void 0===t?void 0:t.mobile)})),H=(0,m.useCompletedStates)(r,p),x=H.guildPopulated,V=H.guildMessaged,W=H.guildPersonalized,Y=function(e){return{handleInvite:a.useCallback((function(){v.default.trackWithMetadata(R.AnalyticEvents.SERVER_SETUP_CTA_CLICKED,{setup_type:y.AnalyticsSetupTypes.CHANNEL_WELCOME,action:y.AnalyticsActions.INVITE}),null!=e&&(0,I.openModal)((function(t){return a.createElement(f.default,k({},t,{guild:e,source:R.InstantInviteSources.CHANNEL_WELCOME,analyticsLocation:{section:R.AnalyticsSections.CHANNEL_WELCOME_CTA}}))}))}),[e]),handleMessage:a.useCallback((function(){v.default.trackWithMetadata(R.AnalyticEvents.SERVER_SETUP_CTA_CLICKED,{setup_type:y.AnalyticsSetupTypes.CHANNEL_WELCOME,action:y.AnalyticsActions.SEND_MESSAGE}),b.ComponentDispatch.dispatch(R.ComponentActions.TEXTAREA_FOCUS,{highlight:!0})}),[]),handlePersonalize:a.useCallback((function(){v.default.trackWithMetadata(R.AnalyticEvents.SERVER_SETUP_CTA_CLICKED,{setup_type:y.AnalyticsSetupTypes.CHANNEL_WELCOME,action:y.AnalyticsActions.PERSONALIZE_SERVER}),null!=e&&d.default.open(e.id,R.GuildSettingsSections.OVERVIEW,{section:R.AnalyticsSections.CHANNEL_WELCOME_CTA})}),[e]),handleDownload:a.useCallback((function(){v.default.trackWithMetadata(R.AnalyticEvents.SERVER_SETUP_CTA_CLICKED,{setup_type:y.AnalyticsSetupTypes.CHANNEL_WELCOME,action:y.AnalyticsActions.DOWNLOAD}),(0,c.showAppDownloadModal)(R.AnalyticsSections.CHANNEL_WELCOME_CTA)}),[])}}(p),z=Y.handleInvite,K=Y.handleMessage,$=Y.handlePersonalize,Z=Y.handleDownload,q=!(B||x||V||W),X=function(e){var t=(0,i.useLazyValue)((function(){return new l.default.Value(0)})),n=(0,i.useLazyValue)((function(){return new l.default.Value(0)})),r=[];return r.push((0,i.useLazyValue)((function(){return new l.default.Value(0)}))),r.push((0,i.useLazyValue)((function(){return new l.default.Value(0)}))),r.push((0,i.useLazyValue)((function(){return new l.default.Value(0)}))),r.push((0,i.useLazyValue)((function(){return new l.default.Value(0)}))),a.useEffect((function(){l.default.stagger(300,[l.default.parallel([l.default.timing(n,{toValue:1,duration:450}),l.default.timing(t,{toValue:1,duration:450})]),l.default.stagger(100,[l.default.timing(r[0],{toValue:1,duration:300}),l.default.timing(r[1],{toValue:1,duration:300}),l.default.timing(r[2],{toValue:1,duration:300}),l.default.timing(r[3],{toValue:1,duration:300})])]).start()}),[n,t,r]),{titleAnimatedStyle:e?{transform:[{translateY:t.interpolate({inputRange:[0,1],outputRange:["-20px","0px"]})}],opacity:n}:{},opacities:r}}(q),J=X.titleAnimatedStyle,Q=X.opacities;if(null==p)return null;var ee=[];g||(w&&ee.push(U(l.default.div,{className:D.default.cardWrapper,style:q?{opacity:Q[ee.length]}:{}},"invite",U(G,{iconUrl:n(9219),header:L.default.Messages.WELCOME_CTA_INVITE_TITLE,completed:x,onClick:z}))),j&&ee.push(U(l.default.div,{className:D.default.cardWrapper,style:q?{opacity:Q[ee.length]}:{}},"customize",U(G,{iconUrl:n(10069),header:L.default.Messages.WELCOME_CTA_PERSONALIZE_TITLE,completed:W,onClick:$}))),F&&ee.push(U(l.default.div,{className:D.default.cardWrapper,style:q?{opacity:Q[ee.length]}:{}},"message",U(G,{iconUrl:n(10070),header:L.default.Messages.WELCOME_CTA_MESSAGE_TITLE,completed:V,onClick:K}))),N.default.isWeb()&&ee.push(U(l.default.div,{className:D.default.cardWrapper,style:q?{opacity:Q[ee.length]}:{}},"download",U(G,{iconUrl:n(10071),header:L.default.Messages.WELCOME_CTA_DOWNLOAD_TITLE,completed:B,onClick:Z}))));var te=S?L.default.Messages.WELCOME_CTA_SUBTITLE_OWNER:L.default.Messages.WELCOME_CTA_SUBTITLE_MEMBER;g&&(te=L.default.Messages.WELCOME_CTA_SUBTITLE_EXISTING_SERVER);var ne=M.default.getArticleURL(R.HelpdeskArticles.GUILD_GETTING_STARTED)+"?utm_source=discord&utm_medium=blog&utm_campaign=2020-06_help-new-user&utm_content=--t%3Apm";return U(P.default,{channelId:r.id},void 0,U("div",{className:D.default.container},void 0,U("div",{className:D.default.inner},void 0,U(l.default.div,{style:J},void 0,U(T.default,{className:D.default.titleName,size:T.default.Sizes.SIZE_32},void 0,L.default.Messages.WELCOME_CTA_TITLE.format({guildName:p.name})),U(C.default,{color:C.default.Colors.HEADER_SECONDARY,className:(0,o.default)((t={},t[D.default.subtitle]=!0,t[D.default.noChildren]=0===ee.length,t))},void 0,te," ",ee.length>0?L.default.Messages.WELCOME_CTA_SUBTITLE_ACTION_WITH_GUIDE.format({guideURL:ne}):null)),ee)))}G.displayName="WelcomeMessageCTA",F.displayName="WelcomeArea"},function(e,t,n){e.exports=n.p+"e7b5ebef60788733060075b99faed415.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(e){case r.SpoilerRenderSetting.ALWAYS:return!0;case r.SpoilerRenderSetting.IF_MODERATOR:return t;case r.SpoilerRenderSetting.ON_CLICK:default:return!1}};var r=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(8)),a=v(n(3)),o=v(n(2)),i=n(297),l=v(n(10)),u=v(n(56)),s=v(n(15)),d=v(n(201)),f=v(n(70)),c=v(n(39)),p=v(n(12));n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m={};function _(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1);var a=l.default.getChannel(e),o=null!=a?a.getGuildId():null;return{id:e,messages:t.map((function(e){return(0,i.createMessageRecord)(e)})),guildId:o,loaded:n,loading:r}}function h(e){var t=e.channel;delete m[t.id]}function E(){r.default.forEach(m,(function(e){r.default.forEach(e.messages,(function(e){e.timestamp.locale(c.default.locale)}))}))}function g(){r.default.forEach(m,(function(e){e.messages=e.messages.map((function(e){return e.set("blocked",f.default.isBlocked(e.author.id))}))}))}var S=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(l.default,s.default,u.default,d.default,p.default,c.default)},a.getPinnedMessages=function(e){return m[e]&&m[e]||null},a.loaded=function(e){return null!=m[e]&&m[e].loaded},r}(a.default.Store))(o.default,{CONNECTION_OPEN:function(e){m={}},GUILD_DELETE:function(e){var t=e.guild;m=(0,r.default)(m).filter((function(e){return e.guildId!==t.id})).keyBy("id").value()},MESSAGE_UPDATE:function(e){var t=e.message.id,n=e.message.channel_id;if(null!=n){var a=m[n];if(null!=e.message.author)if(e.message.pinned){if(!a)return a=_(n,[e.message],!1),void(m[n]=a);a.messages=a.messages.slice();var o=r.default.findIndex(a.messages,(function(e){return e.id===t}));-1===o?a.messages.unshift((0,i.createMessageRecord)(e.message)):a.messages[o]=(0,i.updateMessageRecord)(a.messages[o],e.message),m[n]=a}else{if(!a)return;var l=r.default.findIndex(a.messages,(function(e){return e.id===t}));if(-1===l)return;a.messages=a.messages.slice(),a.messages.splice(l,1),m[n]=a}else if(a){var u=r.default.findIndex(a.messages,(function(e){return e.id===t}));if(u>=0){var s=a.messages[u],d=(0,i.updateMessageRecord)(s,e.message);if(d!==s){var f=a.messages.slice();f[u]=d,m[n].messages=f}}}}},MESSAGE_DELETE:function(e){var t=e.id,n=e.channelId,a=m[n];a&&0!==r.default.remove(a.messages,(function(e){return e.id===t})).length&&(a.messages=a.messages.slice(),m[n]=a)},MESSAGE_DELETE_BULK:function(e){var t=e.ids,n=e.channelId,r=m[n];r&&(r.messages=r.messages.filter((function(e){return-1===t.indexOf(e.id)})))},LOAD_PINNED_MESSAGES:function(e){var t=e.channelId;m[t]=_(t,[],!1,!0)},LOAD_PINNED_MESSAGES_SUCCESS:function(e){var t=e.channelId,n=e.messages;m[t]=_(t,n,!0)},LOAD_PINNED_MESSAGES_FAILURE:function(e){var t=e.channelId;delete m[t]},USER_SETTINGS_UPDATE:function(e){return E()},I18N_LOAD_SUCCESS:function(e){return E()},CHANNEL_DELETE:h,THREAD_DELETE:h,RELATIONSHIP_ADD:function(e){return g()},RELATIONSHIP_REMOVE:function(e){return g()}});t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.useStateFromStores)([u.default],(function(){return u.default.can(s.Permissions.MANAGE_MESSAGES,t)}),[t]);if(e.state===s.MessageStates.SEND_FAILED)return null;if(!n&&!t.isPrivate()||t.isArchivedThread())return null;return!1===e.pinned?p(l.MenuItem,{id:"pin",action:function(n){n.shiftKey?o.default.pinMessage(t,e.id):i.default.confirmPin(t,e)},label:d.default.Messages.PIN_MESSAGE}):p(l.MenuItem,{id:"unpin",action:function(n){n.shiftKey?o.default.unpinMessage(t,e.id):i.default.confirmUnpin(t,e)},label:d.default.Messages.UNPIN_MESSAGE})};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(8581)),i=f(n(8487)),l=n(8253),u=f(n(40)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=F(n(0)),o=U(n(9)),i=U(n(8)),l=U(n(5)),u=U(n(273)),s=n(202),d=U(n(3)),f=U(n(10074)),c=U(n(1366)),p=U(n(10075)),v=n(8342),y=U(n(10078)),m=U(n(71)),_=U(n(15)),h=U(n(40)),E=U(n(70)),g=U(n(107)),S=U(n(479)),O=F(n(1242)),I=U(n(8582)),T=U(n(39)),C=U(n(12)),b=U(n(161)),M=U(n(149)),N=U(n(10079)),A=U(n(1251)),P=U(n(13)),R=n(121),L=n(48),D=U(n(258)),w=n(1),j=U(n(6)),k=U(n(7817));function U(e){return e&&e.__esModule?e:{default:e}}function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function F(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function B(){return(B=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}).apply(this,arguments)}function H(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function x(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V(e,t)}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var W=[],Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={fadeIn:!1},t.timeout=null,t.handleDismissInviteEducation=function(){var e=t.props.activity;null!=e&&null!=e.application_id&&f.default.dismissForApplicationId(e.application_id)},t}x(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;this.timeout=setTimeout((function(){e.setState({fadeIn:!0}),e.timeout=null,e.logShownEventIfNeeded()}),100)},n.componentDidUpdate=function(){this.logShownEventIfNeeded()},n.logShownEventIfNeeded=function(){var e=this.props.activity.application_id;null!=e&&-1===W.indexOf(e)&&(P.default.track(w.AnalyticEvents.SHOW_TUTORIAL,{tutorial:"activity-invite-nux-inline",application_id:e}),W.push(e))},n.componentWillUnmount=function(){null!==this.timeout&&clearTimeout(this.timeout)},n.render=function(){var e,t=this.props.activity;return H("div",{className:(0,o.default)(k.default.activityInviteEducation,(e={},e[k.default.activityInviteEducationFadeIn]=this.state.fadeIn,e))},void 0,H("div",{className:k.default.activityInviteEducationArrow}),H("span",{},void 0,j.default.Messages.USER_ACTIVITY_CHAT_INVITE_EDUCATION.format({game:t.name,dismissOnClick:this.handleDismissInviteEducation})))},t}(a.PureComponent);Y.displayName="ActivityInviteEducation";var z=H(p.default,{}),K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={color:new u.default.Value(0)},t.emphasizeSlowmodeCooldown=function(){var e=t.state.color;u.default.sequence([u.default.timing(e,{toValue:1,duration:100,easing:u.default.Easing.quad}),u.default.timing(e,{delay:250,toValue:0,duration:100,easing:u.default.Easing.quad})]).start()},t}x(t,e);var n=t.prototype;return n.componentDidMount=function(){R.ComponentDispatch.subscribe(w.ComponentActions.EMPHASIZE_SLOWMODE_COOLDOWN,this.emphasizeSlowmodeCooldown)},n.componentWillUnmount=function(){R.ComponentDispatch.unsubscribe(w.ComponentActions.EMPHASIZE_SLOWMODE_COOLDOWN,this.emphasizeSlowmodeCooldown)},n.getCooldownTextStyle=function(){var e=this.props.theme,t=this.state.color,n=w.HEXColors.WHITE;return e===w.ThemeTypes.LIGHT&&(n=w.HEXColors.PRIMARY_DARK_500),{color:t.interpolate({inputRange:[0,1],outputRange:[n,(0,s.hex2rgb)(w.HEXColors.STATUS_RED_500,.9)]})}},n.render=function(){var e=this,t=this.props,n=t.guildId,r=t.activity,s=t.showInviteEducation,d=t.isFocused,f=t.typingUsers,c=t.className,p=t.slowmodeCooldownGuess,y=t.isBypassSlowmode,m=t.channel,h=t.isThreadCreation,g=m.rateLimitPerUser,S=C.default.getNullableCurrentUser(),O=_.default.getGuild(n),I=g>0,T=h?[]:(0,i.default)(f).keys().filter((function(e){return e!==(null==S?void 0:S.id)})).reject(E.default.isBlocked).map((function(e){return C.default.getUser(e)})).filter(L.isNotNullish).map((function(t){return D.default.getName(n,e.props.channel.id,t)})).value();if(0===T.length&&!I)return s&&null!=r?H(Y,{activity:r,isFocused:d}):(0,v.isChannelAvailableForCallout)(m,O)?z:null;var b="",P=null,R="";if(I){if(P=H(N.default,{className:k.default.slowModeIcon}),g>=w.Durations.HOUR){var U=Math.floor(g/w.Durations.HOUR),G=Math.floor((g-U*w.Durations.HOUR)/w.Durations.MINUTE),F=g-U*w.Durations.HOUR-G*w.Durations.MINUTE;R=j.default.Messages.CHANNEL_SLOWMODE_DESC_HOURS.format({hours:U,minutes:G,seconds:F})}else if(g>=60){var x=Math.floor(g/60),V=g-60*x;R=j.default.Messages.CHANNEL_SLOWMODE_DESC_MINUTES.format({minutes:x,seconds:V})}else R=j.default.Messages.CHANNEL_SLOWMODE_DESC.format({seconds:g});if(!y&&p>0){var W=l.default.duration(p);if(p>1e3*w.Durations.HOUR){var K=(""+W.minutes()).padStart(2,"0"),$=(""+W.seconds()).padStart(2,"0");b=W.hours()+":"+K+":"+$}else{var Z=(""+W.seconds()).padStart(2,"0");b=W.minutes()+":"+Z}}else 0===T.length&&(b=y?j.default.Messages.CHANNEL_SLOWMODE_DESC_IMMUNE:j.default.Messages.CHANNEL_SLOWMODE_DESC_SHORT)}var q,X=T[0],J=T[1],Q=T[2];return q=0===T.length?"":1===T.length?j.default.Messages.ONE_USER_TYPING.format({a:X}):2===T.length?j.default.Messages.TWO_USERS_TYPING.format({a:X,b:J}):3===T.length?j.default.Messages.THREE_USERS_TYPING.format({a:X,b:J,c:Q}):j.default.Messages.SEVERAL_USERS_TYPING,H("div",{className:(0,o.default)(k.default.typing,{"stop-animation":!d},c)},void 0,T.length>0&&H(A.default,{className:k.default.ellipsis,dotRadius:3.5,themed:!0}),H("span",{className:k.default.text,"aria-live":"polite","aria-atomic":!0},void 0,q),I&&H(M.default,{text:R},void 0,(function(t){return a.createElement(u.default.div,B({style:e.getCooldownTextStyle(),className:k.default.cooldownWrapper},t),b,P)})))},t}(a.PureComponent);K.displayName="TypingUsers";var $=d.default.connectStores([y.default,m.default,S.default,T.default,I.default,b.default,O.default,g.default,h.default],(function(e){var t=e.channel,n=e.isThreadCreation,r=S.default.findActivity((function(e){return null!=e.application_id}));return{showInviteEducation:(0,c.default)(t,r,y.default,m.default),activity:r,typingUsers:I.default.getTypingUsers(t.id),isFocused:b.default.isFocused(),guildId:g.default.getGuildId(),slowmodeCooldownGuess:O.default.getSlowmodeCooldownGuess(t.id,n?O.SlowmodeType.CreateThread:O.SlowmodeType.SendMessage),theme:T.default.theme,isBypassSlowmode:n?h.default.can(w.Permissions.MANAGE_THREADS,t):h.default.can(w.Permissions.MANAGE_CHANNELS,t)||h.default.can(w.Permissions.MANAGE_MESSAGES,t)}}))(K);t.default=$},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var a,o;if(null!=e.execute)return u.default.trackWithMetadata(h.AnalyticEvents.APPLICATION_COMMAND_USED,{command_id:e.id,application_id:e.applicationId}),e.execute(t,n);if(e.type===m.ApplicationCommandType.BUILT_IN||e.type===m.ApplicationCommandType.BUILT_IN_TEXT||e.type===m.ApplicationCommandType.BUILT_IN_INTEGRATION)return;var i=[];if(null!=e.options)for(var l,s=O(e.options);!(l=s()).done;){var d=l.value;if(d.type!==m.ApplicationCommandOptionType.SUB_COMMAND&&d.type!==m.ApplicationCommandOptionType.SUB_COMMAND_GROUP&&d.name in t){var f=null;if(d.type!==m.ApplicationCommandOptionType.STRING){var c=y.filterEmpty(t[d.name]);(0,r.default)(1===c.length,'Option "'+d.name+'" expects a single option type');var p=c[0];switch(d.type){case m.ApplicationCommandOptionType.CHANNEL:"channelMention"===p.type?f=p.channelId:"text"===p.type&&(f=p.text.trim());break;case m.ApplicationCommandOptionType.ROLE:if("roleMention"===p.type)f=p.roleId;else if("text"===p.type)f=p.text.trim();else if("textMention"===p.type&&"@everyone"===p.text){var v;f=null===(v=n.guild)||void 0===v?void 0:v.id}break;case m.ApplicationCommandOptionType.USER:"userMention"===p.type?f=p.userId:"text"===p.type&&(f=p.text.trim());break;case m.ApplicationCommandOptionType.MENTIONABLE:if("userMention"===p.type)f=p.userId;else if("roleMention"===p.type)f=p.roleId;else if("text"===p.type)f=p.text.trim();else if("textMention"===p.type&&"@everyone"===p.text){var _;f=null===(_=n.guild)||void 0===_?void 0:_.id}break;case m.ApplicationCommandOptionType.BOOLEAN:"text"===p.type&&(f=C(p.text.trim()));break;case m.ApplicationCommandOptionType.INTEGER:"text"===p.type&&(f=null!=d.choices?Number(T(d.choices,p.text.trim())):Number(p.text.trim()));break;default:(0,r.default)("Unsupported option type: "+d.type);continue}(0,r.default)(null!==f,'Unexpected value for option "'+d.name+'"'),i.push({type:d.type,name:d.name,value:f})}else{var E,g,S=null!==(E=null===(g=y.getOptionalString(t,d.name))||void 0===g?void 0:g.trim())&&void 0!==E?E:"";f=null!=d.choices?T(d.choices,S):S,i.push({type:d.type,name:d.name,value:f})}}}if(null!=e.subCommandPath)for(var I,M=O(e.subCommandPath.reverse());!(I=M()).done;){var N=I.value,A=N.name,P=N.type;i=[{type:P,name:A,options:i}]}var R={version:e.version,id:null!==(a=e.rootId)&&void 0!==a?a:e.id,guild_id:e.guildId,name:null!==(o=e.rootName)&&void 0!==o?o:e.name,options:i};b(e.applicationId,R,n)},t.retryCommandMessage=void 0;var r=S(n(23)),a=S(n(2)),o=S(n(390)),i=n(286),l=g(n(1324)),u=S(n(106)),s=g(n(8612)),d=n(8506),f=g(n(1263)),c=S(n(15)),p=S(n(12)),v=n(8290),y=g(n(8434)),m=n(8260),_=n(8279),h=n(1);function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e,t){var n,a=null==e||null===(n=e.find((function(e){return e.name===t})))||void 0===n?void 0:n.value;return(0,r.default)(null!=a,"Failed to find value for choice: "+t),a},C=function(e){var t=e.toLowerCase()===v.TRUE_OPTION_NAME.toLowerCase(),n=e.toLowerCase()===v.FALSE_OPTION_NAME.toLowerCase();return(0,r.default)(t||n,"Failed to find value for boolean: "+e),t};t.retryCommandMessage=function(e,t,n){if(e.type===h.MessageTypes.APPLICATION_COMMAND){var r=t.guild_id;e.interactionData&&b(n,e.interactionData,{channel:t,guild:null!=r?c.default.getGuild(r):null})}};var b=function(e,t,n){var r=n.channel,u=n.guild,c=r.id,v=null==u?void 0:u.id,y=(0,_.getInteractionAuthor)(n,e),m=y[0],E=y[1],g=(0,f.default)(c,"",!1,h.MessageTypes.APPLICATION_COMMAND,void 0,void 0,m);g.application=null!=E?E:void 0,g.interaction={id:t.id,name:t.name,type:i.InteractionTypes.APPLICATION_COMMAND,user:(0,f.userRecordToServer)(p.default.getCurrentUser())},g.interaction_data=t;var S={applicationId:e,channelId:c,guildId:v,data:t,nonce:g.id};o.default.receiveMessage(c,g,!0,{applicationId:e}),s.addQueued(S.nonce,g.id,{onCreate:function(e){null!=g.interaction&&(g.interaction.id=e)},onFailure:function(e,t){return function(e,t){null==t&&null!=e&&o.default.sendClydeError(c,e),a.default.dirtyDispatch({type:h.ActionTypes.MESSAGE_SEND_FAILED,messageId:g.id,channelId:c,reason:t})}(e,t)},data:{interactionType:i.InteractionTypes.APPLICATION_COMMAND}}),l.default.enqueue({type:l.MessageDataType.COMMAND,message:S},(function(e){return(0,d.handleInteractionResponse)(S.nonce,e)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,d:"M22 12L12.101 2.10101L10.686 3.51401L12.101 4.92901L7.15096 9.87801V9.88001L5.73596 8.46501L4.32196 9.88001L8.56496 14.122L2.90796 19.778L4.32196 21.192L9.97896 15.536L14.222 19.778L15.636 18.364L14.222 16.95L19.171 12H19.172L20.586 13.414L22 12Z"}))}d.displayName="Pin"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;L(n(0));var r,a=n(389),o=P(n(8257)),i=n(286),l=P(n(8323)),u=P(n(8258)),s=P(n(8405)),d=L(n(8253)),f=P(n(8430)),c=P(n(11)),p=n(717),v=P(n(8378)),y=P(n(8379)),m=P(n(8380)),_=P(n(8340)),h=P(n(8384)),E=P(n(8385)),g=P(n(8386)),S=P(n(8505)),O=P(n(8343)),I=P(n(8608)),T=P(n(10131)),C=P(n(8324)),b=P(n(8435)),M=P(n(8388)),N=n(1),A=P(n(6));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w(e){var t=e.user,n=e.guildId,r=e.channelId,P=e.popoutPosition,R=void 0===P?p.PopoutPositions.RIGHT:P,L=e.target,w=e.analyticsContext,j=e.context,k=e.onSelect,U=(0,C.default)(t.id,n,j),G=(0,S.default)(t,n,j),F=(0,O.default)(t.id,j),B=(0,M.default)(t.id),H=(0,E.default)(t,j),x=(0,m.default)({user:t,guildId:n,channelId:r,target:L,popoutPosition:R,context:j}),V=(0,y.default)(t),W=(0,s.default)(n,t.id,{page:N.AnalyticsPages.GUILD_CHANNEL,section:N.AnalyticsSections.CHAT_USERNAME,object:N.AnalyticsObjects.CONTEXT_MENU_ITEM},j),Y=(0,g.default)(t,n),z=(0,l.default)(null,t),K=(0,v.default)(t),$=(0,h.default)(t),Z=(0,T.default)(t,n,r),q=(0,b.default)(t.id,n),X=(0,I.default)(t,n),J=(0,u.default)(t.id),Q=(0,f.default)(t),ee=(0,_.default)(i.ApplicationCommandTarget.USER,r,n);return c.default.isGuest()||t.isNonUserBot()?null:D(o.default,{context:w,object:N.AnalyticsObjects.CONTEXT_MENU},void 0,D(d.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":A.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:k},void 0,D(d.MenuGroup,{},void 0,Q),D(d.MenuGroup,{},void 0,U,G,F,H,x,V,B),D(d.MenuGroup,{},void 0,z),D(d.MenuGroup,{},void 0,W,ee,Y,K,$),D(d.MenuGroup,{},void 0,Z),D(d.MenuGroup,{},void 0,q,X),D(d.MenuGroup,{},void 0,J)))}w.displayName="ThreadUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PendingGuildMemberModal=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=m(n(15)),l=n(85),u=n(35),s=m(n(8294)),d=m(n(1233)),f=m(n(10139)),c=m(n(8398)),p=m(n(9187)),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}function g(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var S=function(e){var t=e.guildId,n=e.transitionState,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["guildId","transitionState"]),m=(0,l.useUID)(),_=(0,o.useStateFromStores)([d.default],(function(){return d.default.getRequest(t)}),[t]),S=(0,o.useStateFromStores)([i.default],(function(){return i.default.getGuild(t)}),[t]),O=function(){var e,n=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S||!S.hasFeature(v.GuildFeatures.PREVIEW_ENABLED)){e.next=13;break}return e.prev=1,e.next=4,s.default.removeGuildJoinRequest(t);case 4:e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(1),e.t0;case 9:r.onClose(),(0,c.default)(t),e.next=14;break;case 13:s.default.resetGuildJoinRequest(t);case 14:case"end":return e.stop()}}),e,null,[[1,6]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){g(o,r,a,i,l,"next",e)}function l(e){g(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return n.apply(this,arguments)}}();return h(u.ModalRoot,{size:u.ModalSize.DYNAMIC,transitionState:n,"aria-labelledby":m},void 0,a.createElement(p.default,E({},r,{reapplyText:y.default.Messages.MEMBER_VERIFICATION_APPLICATION_REAPPLY,onReapply:O,confirmText:y.default.Messages.OKAY,onConfirm:function(){r.onClose(),(0,f.default)()},rejectionReason:null==_?void 0:_.rejectionReason,guild:S})))};t.PendingGuildMemberModal=S,S.displayName="PendingGuildMemberModal";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=w(n(9)),i=w(n(3)),l=w(n(2)),u=w(n(8514)),s=n(180),d=n(8328),f=w(n(10)),c=w(n(86)),p=w(n(15)),v=w(n(40)),y=w(n(70)),m=w(n(36)),_=w(n(12)),h=w(n(29)),E=w(n(371)),g=w(n(1159)),S=n(85),O=w(n(476)),I=w(n(8672)),T=w(n(8345)),C=n(35),b=n(41),M=w(n(47)),N=w(n(24)),A=w(n(13)),P=w(n(10143)),R=n(1),L=w(n(6)),D=w(n(7843));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function G(e){var t=e.label,n=e.guild;return U("div",{className:D.default.guildOption},void 0,U(E.default,{className:D.default.icon,guild:n,size:E.default.Sizes.MINI}),U(N.default,{size:N.default.Sizes.SIZE_16},void 0,t))}function F(e){var t=e.label,n=e.channel,r=e.category,a=(0,d.getChannelIconComponent)(n);return U(I.default,{title:t,icon:a,subtitle:r})}G.displayName="renderGuildOption",F.displayName="renderChannelOption";var B=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).handleGuildSelect=function(e){var t=e.value,r=n.props.guilds,a=n.state.selectedGuildId,o=r[t].channels,i=n.getDefaultChannelId(o);a!==t&&n.setState({selectedGuildId:t,selectedChannelId:i,channels:o})},n.handleChannelSelect=function(e){var t=e.value;n.setState({selectedChannelId:t})},n.handleFollow=function(){var e=n.props,t=e.channel,r=e.onClose,o=n.state,i=o.selectedChannelId,s=o.selectedGuildId;null!=i&&(n.setState({submitting:!0}),u.default.createChannelFollower(i,t.id).then((function(){l.default.dispatch({type:R.ActionTypes.CHANNEL_FOLLOWER_CREATED,channelId:i,guildId:s}),r(),(0,b.openModal)((function(e){return a.createElement(P.default,e)}))})).catch((function(e){e.body.code===R.AbortCodes.TOO_MANY_WEBHOOKS?n.setState({errorMessage:L.default.Messages.FOLLOW_MODAL_TOO_MANY_WEBHOOKS,submitting:!1}):n.setState({errorMessage:L.default.Messages.FOLLOW_MODAL_FAIL,submitting:!1})})))};var r=t.guilds,o=t.lastChannelFollowingDestination,i=o.guildId,s=o.channelId;return n.state={selectedGuildId:i,selectedChannelId:s,channels:null!=i&&null!=r[i]?r[i].channels:[],errorMessage:null,submitting:!1,headerId:(0,S.uid)("modal")},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,k(t,n);var i=r.prototype;return i.componentDidMount=function(){A.default.track(R.AnalyticEvents.OPEN_MODAL,{type:"Follow Channel Modal",num_guild_permissions:Object.keys(this.props.guilds).length,location:"Chat Input Blocker - Follow Channel"})},i.getDefaultChannelId=function(e){var t=e.find((function(e){var t=e.channel;return"general"===(0,s.computeChannelName)(t,_.default,y.default)})),n=null!=t?t:e[0];return null!=n?n.channel.id:null},i.renderFooter=function(){var e=this.state,t=e.selectedGuildId,n=e.selectedChannelId,r=e.submitting,o=this.props.onClose;return U(a.Fragment,{},void 0,U(h.default,{submitting:r,onClick:this.handleFollow,disabled:null==t||null==n},void 0,L.default.Messages.FOLLOW),U(h.default,{look:h.default.Looks.LINK,color:h.default.Colors.PRIMARY,onClick:o},void 0,L.default.Messages.CANCEL))},i.renderForm=function(){var e=this.props.guilds,t=this.state,n=t.channels,r=t.selectedGuildId,o=t.selectedChannelId,i=t.errorMessage,l=Object.keys(e).map((function(t){var n=e[t].guild;return{value:t,label:n.toString(),guild:n}})),u=n.map((function(e){var t=e.channel,n=e.category;return{value:t.id,label:(0,s.computeChannelName)(t,_.default,y.default),channel:t,category:n}})),d=0===l.length,f=d?L.default.Messages.FOLLOW_MODAL_HINT_NO_PERMS:L.default.Messages.FOLLOW_MODAL_HINT;return U(a.Fragment,{},void 0,U(O.default,{className:D.default.bottomMargin,title:L.default.Messages.FORM_LABEL_SEND_TO},void 0,U(g.default,{value:r,clearable:!1,searchable:!0,options:l,disabled:d,optionRenderer:G,valueRenderer:G,onChange:this.handleGuildSelect})),U(O.default,{className:D.default.bottomMargin,title:L.default.Messages.FORM_LABEL_SELECT_CHANNEL},void 0,U(g.default,{value:o,clearable:!1,searchable:!0,options:u,disabled:0===u.length,optionRenderer:F,valueRenderer:F,onChange:this.handleChannelSelect})),U(N.default,{className:D.default.bottomMargin,color:d||null!=i?N.default.Colors.ERROR:N.default.Colors.MUTED},void 0,null!=i?i:f))},i.renderBody=function(){var e,t=this.props.channel.nsfw;return U("div",{className:D.default.body},void 0,U(M.default,{size:M.default.Sizes.SIZE_20,id:this.state.headerId},void 0,L.default.Messages.FOLLOW_MODAL_TITLE),U(N.default,{color:N.default.Colors.MUTED,className:(0,o.default)(D.default.topMargin,(e={},e[D.default.formMargin]=!t,e)),size:N.default.Sizes.SIZE_14},void 0,L.default.Messages.FOLLOW_MODAL_BODY),t?U(N.default,{className:(0,o.default)(D.default.formMargin,D.default.topMargin),color:N.default.Colors.ERROR},void 0,L.default.Messages.FOLLOW_MODAL_WARNING):null)},i.renderHeader=function(){var e=this.props,t=e.guildToFollow,n=e.channelNameToFollow,r=e.channel,a=(0,d.getChannelIconComponent)(r)||T.default;return U(C.ModalHeader,{className:D.default.header},void 0,U(E.default,{guild:t,size:E.default.Sizes.LARGE}),U("div",{className:D.default.channelContainer},void 0,U("div",{className:D.default.channel},void 0,U(a,{width:20,height:20,className:D.default.channelIcon}),U(N.default,{size:N.default.Sizes.SIZE_16,className:D.default.channelName},void 0,n))))},i.render=function(){var e=this.props.transitionState;return U(C.ModalRoot,{transitionState:e,"aria-labelledby":this.state.headerId},void 0,this.renderHeader(),U(C.ModalContent,{className:D.default.content},void 0,this.renderBody(),this.renderForm()),U(C.ModalFooter,{},void 0,this.renderFooter()))},r}(a.PureComponent);B.displayName="FollowModal";var H=i.default.connectStores([p.default,f.default,c.default,v.default,m.default],(function(e){var t=e.channel,n=p.default.getGuild(t.guild_id),r=Object.values(p.default.getGuilds()).reduce((function(e,t){var n=c.default.getChannels(t.id).SELECTABLE.map((function(e){return e.channel})).filter((function(e){return e.type===R.ChannelTypes.GUILD_TEXT&&v.default.can(R.Permissions.MANAGE_WEBHOOKS,e)})).map((function(e){var t=f.default.getChannel(e.parent_id);return{channel:e,category:null!=t?t.name:null}}));return n.length>0&&(e[t.id]={guild:t,channels:n}),e}),{}),a=m.default.getLastChannelFollowingDestination();return{guildToFollow:n,channelNameToFollow:t.name,guilds:r,lastChannelFollowingDestination:null!=a?a:{}}}),{forwardRef:!0})(B);t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTitle=function(e){var t,n,r=e.channel,p=e.channelName,y=e.parentChannel,g=e.guild,S=e.isMobile,T=void 0!==S&&S,C=e.inSidebar,b=void 0!==C&&C,M=e.handleClick,N=e.handleContextMenu,A=e.handleParentClick,P=e.handleParentContextMenu,R=e.renderFollowButton,L=p,D=(0,u.default)(r,g);switch(r.type){case _.ChannelTypes.DM:var w=r.getRecipientId(),j=r.isSystemDM(),k=null!=s.default.getNickname(w)?null===(t=d.default.getUser(w))||void 0===t?void 0:t.tag:null,U=O(m.default.Title,{onContextMenu:N,onClick:M,className:E.default.cursorPointer},void 0,L);return a.createElement(a.Fragment,null,null!==D?O(m.default.Icon,{icon:D,disabled:!0,"aria-label":h.default.Messages.DIRECT_MESSAGE}):null,null!=k?O(f.TooltipContainer,{text:k,position:c.Positions.BOTTOM},void 0,U):U,j?null:O(i.default,{size:10,userId:w,className:E.default.status,isMobile:T,position:c.Positions.BOTTOM},w));case _.ChannelTypes.GROUP_DM:return r.isManaged()?L:O(a.Fragment,{},void 0,null!==D?O(m.default.Icon,{icon:D,disabled:!0,"aria-label":h.default.Messages.GROUP_DM}):null,O(v.default,{channel:r},"channel-"+r.id));case _.ChannelTypes.GUILD_ANNOUNCEMENT:case _.ChannelTypes.GUILD_TEXT:return O(a.Fragment,{},void 0,null!==D?O(m.default.Icon,{icon:D,disabled:!0,"aria-label":r.type===_.ChannelTypes.GUILD_ANNOUNCEMENT?h.default.Messages.NEWS_CHANNEL:h.default.Messages.TEXT_CHANNEL}):null,O(m.default.Title,{onContextMenu:N,onClick:M},void 0,L),null!=R?R():null);case _.ChannelTypes.GUILD_VOICE:return O(a.Fragment,{},void 0,null!==D?O(m.default.Icon,{icon:D,disabled:!0,"aria-label":h.default.Messages.VOICE_CHANNEL}):null,O(m.default.Title,{onContextMenu:N,onClick:M},void 0,L));case _.ChannelTypes.ANNOUNCEMENT_THREAD:case _.ChannelTypes.PUBLIC_THREAD:case _.ChannelTypes.PRIVATE_THREAD:var G=null;if(!b&&y){var F=(0,u.default)(y,g);G=O(a.Fragment,{},void 0,null!==F?O(m.default.Icon,{icon:F,disabled:!0,"aria-label":h.default.Messages.TEXT_CHANNEL}):null,O(m.default.Title,{onContextMenu:P,onClick:A,className:(0,o.default)(E.default.parentChannelName,E.default.cursorPointer)},void 0,(0,l.computeChannelName)(y,d.default,s.default)),I)}return O(a.Fragment,{},void 0,G,null!==D?O(m.default.Icon,{icon:D,disabled:!0,"aria-label":h.default.Messages.THREAD}):null,O(m.default.Title,{onContextMenu:N,onClick:M,className:(0,o.default)((n={},n[E.default.cursorPointer]=b,n))},void 0,L));case _.ChannelTypes.GUILD_DIRECTORY:return O(a.Fragment,{},void 0,null!==D?O(m.default.Icon,{icon:D,disabled:!0,"aria-label":""}):null,O(m.default.Title,{onContextMenu:N,onClick:M},void 0,h.default.Messages.HUB_DIRECTORY_CHANNEL_TITLE.format({guildName:null==g?void 0:g.name})));default:return null}},t.renderTopic=function(e,t){switch(e.type){case _.ChannelTypes.DM:return O(p.default,{channel:e},e.id);case _.ChannelTypes.GUILD_ANNOUNCEMENT:case _.ChannelTypes.GUILD_TEXT:case _.ChannelTypes.GUILD_VOICE:case _.ChannelTypes.GROUP_DM:return null!=t?O(y.default,{channel:e,guild:t},e.id):null;default:return null}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=g(n(10154)),l=n(180),u=g(n(8449)),s=g(n(70)),d=g(n(12)),f=n(149),c=n(250),p=g(n(10155)),v=g(n(10156)),y=g(n(10158)),m=g(n(8318)),_=n(1),h=g(n(6)),E=g(n(7391));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=O(m.default.Caret,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n,o;return o=n=function(n){var o,u;function s(){for(var e,t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))||this)._subscriptions=null,e.handleSetRef=function(t){e._ref=t},e}u=n,(o=s).prototype=Object.create(u.prototype),o.prototype.constructor=o,l(o,u);var d=s.prototype;return d.componentDidMount=function(){for(var t in this._subscriptions=e(this.props,this._ref),this._subscriptions)null!=this._subscriptions&&this._subscriptions.hasOwnProperty(t)&&a.ComponentDispatch.subscribe(t,this._subscriptions[t])},d.componentWillUnmount=function(){for(var e in this._subscriptions)null!=this._subscriptions&&this._subscriptions.hasOwnProperty(e)&&a.ComponentDispatch.unsubscribe(e,this._subscriptions[e])},d.render=function(){return r.createElement(t,i({ref:this.handleSetRef},this.props))},s}(r.Component),n.displayName="componentDispatchSubscriber("+(t.displayName||t.name||"Component")+")",o}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(121);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(){return(i=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}).apply(this,arguments)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=$(n(0)),o=z(n(9)),i=n(122),l=n(3),u=z(n(2)),s=$(n(287)),d=n(5946),f=z(n(473)),c=n(8839),p=z(n(8316)),v=z(n(9058)),y=z(n(9059)),m=z(n(10168)),_=z(n(9061)),h=z(n(8687)),E=n(123),g=z(n(10169)),S=z(n(160)),O=z(n(39)),I=z(n(5833)),T=z(n(693)),C=z(n(1147)),b=z(n(151)),M=n(131),N=z(n(372)),A=z(n(255)),P=z(n(10170)),R=z(n(5686)),L=z(n(24)),D=z(n(96)),w=n(281),j=n(280),k=n(5689),U=z(n(10171)),G=z(n(10173)),F=n(9062),B=z(n(5948)),H=n(9232),x=n(1),V=z(n(6)),W=z(n(7392)),Y=z(n(370));function z(e){return e&&e.__esModule?e:{default:e}}function K(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return K=function(){return e},e}function $(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=K();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var q={page:x.AnalyticsPages.USER_SETTINGS,section:x.AnalyticsSections.SETTINGS_PREMIUM};function X(e){var t=e.perkText,n=e.hasPerk;return Z("div",{className:W.default.perkListItem},void 0,n?Z(N.default,{className:(0,o.default)(W.default.perkListItemIcon,W.default.hasPerkIcon)}):Z(A.default,{className:W.default.perkListItemIcon}),Z(L.default,{size:L.default.Sizes.SIZE_14},void 0,t))}function J(e){var t=e.perkList;return Z("div",{className:W.default.perkList},void 0,t.map((function(e){var t=e.perkText;return Z(X,{perkText:t,hasPerk:e.hasPerk},t)})))}X.displayName="PerkListItem",J.displayName="ClassicPerkList";var Q=Z(F.PremiumTier1Buttons,{premiumModalAnalyticsLocation:q});function ee(){var e=O.default.locale,t=(0,w.formatPercent)(e,j.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100),r=D.default.getPrice(x.SubscriptionPlans.PREMIUM_MONTH_TIER_1),a=D.default.getPrice(x.SubscriptionPlans.PREMIUM_YEAR_TIER_1),o=V.default.Messages.MARKETING_REFRESH_PREMIUM_TIER_1_CTA_DESCRIPTION_WITH_PRICE_NO_INFO_HOOK.format({discountPercentage:t,monthlyPrice:(0,w.formatPrice)(r.amount,r.currency),yearlyPrice:(0,w.formatPrice)(a.amount,a.currency)});return Z("section",{className:W.default.marketingRefreshSectionTier1},void 0,Z("img",{alt:"",className:W.default.marketingRefreshTier1Graphic,src:n(10187)}),Z("div",{className:W.default.marketingRefreshPlanInfo},void 0,Z(P.default,{className:W.default.marketingRefreshTier1Logo}),Z("p",{className:W.default.marketingRefreshDescription},void 0,o),Z("div",{className:W.default.classicPerkGrid},void 0,Z(J,{perkList:[{perkText:V.default.Messages.MARKETING_TIER_1_PERK_LIST_CUSTOM_EMOJI,hasPerk:!0},{perkText:V.default.Messages.MARKETING_TIER_1_PERK_LIST_UPLOAD_SIZE,hasPerk:!0},{perkText:V.default.Messages.MARKETING_TIER_1_PERK_LIST_STREAM_QUALITY,hasPerk:!0},{perkText:V.default.Messages.MARKETING_TIER_1_PERK_LIST_BOOST_DISCOUNT,hasPerk:!0}]}),Z(J,{perkList:[{perkText:V.default.Messages.GUILD_SETTINGS_PREMIUM_UPSELL_BODY_PERK_NO_FREE_GUILD_SUBSCRIPTIONS.format({numFreeGuildSubscriptions:j.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM}),hasPerk:!1},{perkText:V.default.Messages.MARKETING_PREMIUM_TIER_1_PERK_LIST_OMIT_MESSAGE_LENGTH,hasPerk:!1},{perkText:V.default.Messages.MARKETING_PREMIUM_TIER_1_PERK_LIST_OMIT_GUILD_CAP,hasPerk:!1},{perkText:V.default.Messages.MARKETING_PREMIUM_TIER_1_PERK_LIST_OMIT_PROFILE_CUSTOMIZATION,hasPerk:!1},{perkText:V.default.Messages.MARKETING_TIER_1_PERK_OMIT_STICKERS,hasPerk:!1}]})),Q))}ee.displayName="PremiumTier1Subscription";var te=Z("br",{});function ne(e){var t=e.isTrial;return Z("div",{className:W.default.marketingRefreshTier2Cta},void 0,Z("p",{className:W.default.marketingRefreshTitle},void 0,t?V.default.Messages.PREMIUM_TIER_2_TRIAL_CTA_TITLE:V.default.Messages.MARKETING_REFRESH_PREMIUM_TIER_2_CTA_TITLE),Z("p",{className:W.default.marketingRefreshSubtitle},void 0,t?a.createElement(a.Fragment,null,V.default.Messages.PREMIUM_TIER_2_TRIAL_CTA_SUBTITLE,te,V.default.Messages.PREMIUM_TIER_2_TRIAL_CTA_NOTE):V.default.Messages.MARKETING_REFRESH_PREMIUM_TIER_2_CTA_SUBTITLE),Z(F.PremiumTier2Buttons,{className:W.default.tier2Buttons,premiumModalAnalyticsLocation:q}))}function re(e){var t=e.userTrialOffer,n=a.useContext(E.AccessibilityPreferencesContext).reducedMotion,r=a.useRef(null==t.expires_at),o=!n.enabled&&r.current,l=(0,i.useSpring)({from:{transform:"translateX(-40px)",opacity:0},to:{transform:"translateX(0px)",opacity:1},delay:550,config:i.config.stiff,onRest:function(){return(0,c.userTrialOfferViewed)(t)}});a.useEffect((function(){o||(0,c.userTrialOfferViewed)(t)}),[t,o]);var u=(0,h.default)(null!=t.expires_at?Date.parse(t.expires_at):0);return null!=t.expires_at&&Object.values(u).every((function(e){return 0===e}))?null:Z(i.animated.div,{className:W.default.trialBanner,style:o?l:{}},void 0,Z(R.default,{className:W.default.trialIcon}),Z(L.default,{size:L.default.Sizes.SIZE_14,className:W.default.trialDescription},void 0,null==t.expires_at?V.default.Messages.PREMIUM_TRIAL_CTA_DESCRIPTION:u.days>0?V.default.Messages.PREMIUM_TRIAL_CTA_DESCRIPTION_EXPIRING_DAYS.format({days:u.days}):u.hours>0?V.default.Messages.PREMIUM_TRIAL_CTA_DESCRIPTION_EXPIRING_HOURS.format({hours:u.hours}):V.default.Messages.PREMIUM_TRIAL_CTA_DESCRIPTION_EXPIRING_MINUTES.format({minutes:Math.max(u.minutes,1)})),Z(B.default,{subscriptionTier:x.PremiumSubscriptionSKUs.TIER_2,trialId:t.trial_id,premiumModalAnalyticsLocation:q,className:W.default.trialButton,isTrialCTA:!0}))}function ae(e){var t=e.premiumSubscription,n=e.useStandaloneSubscriptionsTab,r=(0,l.useStateFromStores)([T.default],(function(){return null!=t&&null!=t.paymentSourceId?T.default.getPaymentSource(t.paymentSourceId):null}),[t]),i=(0,l.useStateFromStores)([I.default],(function(){return I.default.isBusy}));return null===t?null:n?a.createElement(a.Fragment,null,Z(L.default,{size:L.default.Sizes.SIZE_16,className:Y.default.marginTop10},void 0,V.default.Messages.PREMIUM_SUBSCRIPTION_SUBSCRIPTIONS_LINK.format({onSubscriptionsClick:function(){f.default.open(x.UserSettingsSections.SUBSCRIPTIONS)}})),Z(M.FormDivider,{className:(0,o.default)(Y.default.marginTop20,Y.default.marginBottom20)})):Z(y.default,{className:W.default.subscriptionDetails,subscription:t,paymentSource:r,busy:i,useStandaloneSubscriptionsTab:n})}ne.displayName="SecondaryTier2Subscription",re.displayName="PremiumTrialsBanner",ae.displayName="PremiumSubscriptionDetails";var oe=Z(p.default,{}),ie=Z(b.default,{}),le=Z(g.default,{}),ue=Z(G.default,{}),se=Z(ee,{}),de=Z(U.default,{});function fe(){var e=(0,l.useStateFromStores)([C.default],(function(){return C.default.getPremiumTypeSubscription()})),t=(0,l.useStateFromStores)([C.default],(function(){return C.default.hasFetchedSubscriptions()})),n=(0,k.usePremiumTrialOffer)(),r=m.default.useExperiment({})[0].enableTestPage;a.useEffect((function(){u.default.wait((function(){s.fetchSubscriptions(),(0,d.fetchUserPremiumGuildSubscriptionSlots)(),s.fetchPaymentSources()}))}),[]);var i=_.default.useExperiment({})[0].useStandaloneSubscriptionsTab;return S.default.enabled?oe:t?Z("div",{className:W.default.container},void 0,Z("div",{className:W.default.content},void 0,Z(ae,{premiumSubscription:e,useStandaloneSubscriptionsTab:i}),le,null==e&&null!=n?Z(re,{userTrialOffer:n}):null,i?null:Z(H.AccountCredit,{useStandaloneSubscriptionsTab:i}),ue,Z(ne,{isTrial:null!=n}),se,i||null==e?null:Z(v.default,{subscription:e,withOverheadSeparator:!0}),r?de:null)):Z("div",{className:(0,o.default)(W.default.container,W.default.loading)},void 0,ie)}fe.displayName="PremiumMarketing";var ce=fe;t.default=ce},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountCredit=j,t.default=void 0;var r,a=R(n(0)),o=A(n(9)),i=n(3),l=A(n(2)),u=R(n(287)),s=n(5829),d=n(5946),f=A(n(8316)),c=A(n(9058)),p=R(n(9059)),v=A(n(160)),y=A(n(5833)),m=A(n(693)),_=A(n(1147)),h=A(n(5826)),E=A(n(467)),g=A(n(55)),S=A(n(477)),O=A(n(151)),I=n(131),T=A(n(96)),C=A(n(10186)),b=n(1),M=A(n(6)),N=A(n(7863));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return L(E.default,{className:N.default.noItemsCard,type:E.default.Types.CUSTOM},void 0,L(g.default,{align:g.default.Align.CENTER},void 0,L(S.default,{game:null,size:S.default.Sizes.SMALL,className:N.default.noItemsIcon}),L("span",{className:N.default.cardText},void 0,M.default.Messages.USER_SETTINGS_NO_SUBSCRIPTION_CREDIT)))}D.displayName="NoAccountCredit";var w=L(D,{});function j(e){var t=e.useStandaloneSubscriptionsTab,n=(0,i.useStateFromStores)([h.default],(function(){return h.default.getForApplication(b.PREMIUM_SUBSCRIPTION_APPLICATION)}));a.useEffect((function(){(0,s.fetchUserEntitlementsForApplication)(b.PREMIUM_SUBSCRIPTION_APPLICATION)}),[]);var r=null==n||!T.default.hasAccountCredit(n);if(!t&&r)return null;var o=I.FormTitleTags.H1,l=M.default.Messages.BILLING_SUBSCRIPTION_CREDIT;return t||(o=I.FormTitleTags.H5,l=M.default.Messages.BILLING_ACCOUNT_CREDIT),L("section",{className:N.default.sectionAccountCredit},void 0,L(I.FormTitle,{className:N.default.accountCreditTitle,tag:o},void 0,l),L("p",{className:N.default.accountCreditDescription},void 0,M.default.Messages.BILLING_ACCOUNT_CREDIT_DESCRIPTION),null!=n&&T.default.hasAccountCredit(n)?L(C.default,{className:N.default.accountCredit,entitlements:n}):w)}j.displayName="AccountCredit";var k=L(f.default,{}),U=L(O.default,{}),G=L(j,{useStandaloneSubscriptionsTab:!0});function F(){var e=(0,i.useStateFromStores)([_.default],(function(){return _.default.getPremiumTypeSubscription()})),t=(0,i.useStateFromStores)([m.default],(function(){return null!=e&&null!=e.paymentSourceId?m.default.getPaymentSource(e.paymentSourceId):null}),[e]),n=(0,i.useStateFromStores)([_.default],(function(){return _.default.hasFetchedSubscriptions()})),r=(0,i.useStateFromStores)([y.default],(function(){return y.default.isBusy}));return a.useEffect((function(){l.default.wait((function(){u.fetchSubscriptions(),(0,d.fetchUserPremiumGuildSubscriptionSlots)(),u.fetchPaymentSources()}))}),[]),v.default.enabled?k:n?L("div",{className:N.default.container},void 0,L("div",{className:N.default.content},void 0,null!=e?L(p.default,{className:N.default.subscriptionDetails,subscription:e,paymentSource:t,busy:r,useStandaloneSubscriptionsTab:!0}):L(p.SubscriptionDetailsEmpty,{className:N.default.subscriptionDetails}),G,null!=e?L(c.default,{subscription:e,withOverheadSeparator:!1}):null)):L("div",{className:(0,o.default)(N.default.container,N.default.loading)},void 0,U)}F.displayName="Subscriptions";var B=F;t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=he(n(0)),o=me(n(9)),i=n(8),l=me(n(67)),u=n(262),s=me(n(3)),d=n(57),f=me(n(2)),c=n(10189),p=n(5829),v=n(8344),y=me(n(8257)),m=me(n(8470)),_=me(n(10190)),h=me(n(8318)),E=me(n(8283)),g=me(n(8273)),S=me(n(8543)),O=me(n(1177)),I=me(n(8440)),T=n(42),C=me(n(71)),b=me(n(15)),M=me(n(40)),N=me(n(39)),A=me(n(161)),P=me(n(9063)),R=me(n(8895)),L=me(n(5826)),D=me(n(373)),w=me(n(8364)),j=me(n(1167)),k=me(n(29)),U=me(n(1227)),G=me(n(55)),F=me(n(10191)),B=me(n(151)),H=me(n(149)),x=me(n(736)),V=me(n(5686)),W=me(n(8620)),Y=n(41),z=n(468),K=me(n(13)),$=n(99),Z=n(281),q=n(289),X=n(1163),J=n(9234),Q=me(n(10192)),ee=me(n(10194)),te=me(n(10195)),ne=me(n(10198)),re=me(n(10199)),ae=me(n(10205)),oe=he(n(9067)),ie=me(n(10206)),le=me(n(10212)),ue=me(n(10218)),se=me(n(10219)),de=he(n(10220)),fe=me(n(10221)),ce=n(8403),pe=n(1),ve=me(n(6)),ye=me(n(7893));function me(e){return e&&e.__esModule?e:{default:e}}function _e(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _e=function(){return e},e}function he(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_e();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Ee(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ge(){return(ge=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}).apply(this,arguments)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e){return location.protocol+"//"+location.host+e}var Te=Ee(B.default,{}),Ce=Ee(_.default,{}),be=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];return(t=e.call.apply(e,[this].concat(r))||this).showCopyLinkTextTimeout=new d.Timeout,t._purchaseRef=a.createRef(),t._trackedViewed=!1,t._analyticsSource=null,t._extraAnalyticsProperties=null,t.state={showHeaderPurchaseUnit:!1,showLinkCopied:!1},t.trackCarouselScroll=function(e,n,r){var a=t.props.sku;null!=a&&K.default.track(pe.AnalyticEvents.STORE_LISTING_MEDIA_SCROLLED,ge({},(0,O.default)(a),{card_index:r,card_type:e.type===pe.CarouselMediaTypes.IMG?"image":"video"}))},t.copyCurrentUrl=function(){var e=t.props.location;(0,X.copy)(Ie(e.pathname)),t.setState({showLinkCopied:!0},(function(){t.showCopyLinkTextTimeout.start(1500,(function(){t.setState({showLinkCopied:!1})}))}))},t.handleCreateInstantInvite=function(){var e=t.props,n=e.channel,r=e.guild;null!=n&&null!=r&&(0,Y.openModal)((function(e){return a.createElement(E.default,ge({},e,{guild:r,channel:n,source:pe.InstantInviteSources.GUILD_CHANNELS}))}))},t.renderInviteLink=function(){var e=t.props,n=e.channel,r=e.guild;return null==n||null==r?null:M.default.can(pe.Permissions.CREATE_INSTANT_INVITE,r)||null!=r.vanityURLCode?Ee(k.default,{"aria-label":ve.default.Messages.CREATE_INSTANT_INVITE,look:k.default.Looks.BLANK,size:k.default.Sizes.NONE,onClick:t.handleCreateInstantInvite,className:ye.default.link},void 0,Ee(x.default,{className:ye.default.linkIcon})):null},t.renderCopyLink=function(){var e=t.state.showLinkCopied;return t.isChannelType?t.renderInviteLink():Ee(H.default,{text:e?ve.default.Messages.APPLICATION_STORE_LINK_COPIED:null,position:H.default.Positions.LEFT,forceOpen:e},void 0,(function(n){var r=n.onMouseEnter,a=n.onMouseLeave;return Ee(k.default,{"aria-label":e?ve.default.Messages.APPLICATION_STORE_LINK_COPIED:ve.default.Messages.COPY_LINK,look:k.default.Looks.BLANK,size:k.default.Sizes.NONE,onClick:t.copyCurrentUrl,onMouseEnter:r,onMouseLeave:a,className:ye.default.link},void 0,Ee(x.default,{className:ye.default.linkIcon}))}))},t.renderHeaderToolbar=function(e,n){var r,a=t.props,i=a.isInTestMode,l=a.slug,u=a.storeListing,s=a.channel,d=a.analyticsContext.location,f=t.state.showHeaderPurchaseUnit;return Ee("div",{className:ye.default.headerBarListing},void 0,Ee("div",{className:ye.default.headerSection},void 0,i&&null!=n?Ee(de.default,{size:de.TestModeStoreListingButtonEnums.Sizes.MIN,dropdownSize:de.TestModeStoreListingButtonEnums.DropdownSizes.MEDIUM,look:de.TestModeStoreListingButtonEnums.Looks.OUTLINED,color:de.TestModeStoreListingButtonEnums.Colors.YELLOW,skuId:n.id,className:ye.default.testModeSelectButton,currentStoreListingId:null!=u?u.id:null,onStoreListingSelect:function(e){null!=n&&(0,v.goToSKUStoreListing)(n.id,{slug:l,analyticsSource:{page:d.page,section:pe.AnalyticsSections.NAVIGATION,object:null},storeListingId:e.id})}}):null),Ee("div",{className:ye.default.headerSection},void 0,Ee("div",{className:(0,o.default)(ye.default.headerPurchase,(r={},r[ye.default.active]=f,r))},void 0,null!=n?(0,I.default)(n):null,null!=e&&null!=n?Ee(m.default,{wrapperClassName:ye.default.headerActionButton,applicationId:e.id,skuId:n.id,color:k.default.Colors.GREEN,size:k.default.Sizes.SMALL,tooltipPosition:H.default.Positions.BOTTOM,entitlementBranchId:null!=u?u.entitlementBranchId:null,channelId:null!=s?s.id:null,onStoreListing:!0}):null,Ee(oe.default,{messageStyle:oe.MessageStyles.SHORT,className:ye.default.purchaseError}))),t.renderCopyLink())},t.renderCarousel=function(e,n){if(0===n.carouselItems.length)return null;var r=t.props,a=r.pageSize,o=r.isFocused;return Ee(y.default,{section:pe.AnalyticsSections.HERO},void 0,Ee(re.default,{pageSize:a,items:n.carouselItems.map((function(r){return t.parseMediaItems(e,r,n.assets)})),autoplayInterval:8e3,paused:!o,onIntentionalChange:t.trackCarouselScroll}))},t.handleScroll=(0,i.debounce)((function(){if(null!=t._purchaseRef.current){var e=l.default.findDOMNode(t._purchaseRef.current.getApplicationBuyButton());if(e instanceof HTMLElement){var n=e.getBoundingClientRect().top,r=n<0||n>window.innerHeight;t.state.showHeaderPurchaseUnit!==r&&t.setState({showHeaderPurchaseUnit:r})}}}),50),t.renderListing=function(){var e=t.props,n=e.application,r=e.storeListing,a=e.sku,o=e.pageSize;return null==n||null==a||null==r||r.isSlimDirectoryVersion()?Ee(G.default,{align:G.default.Align.CENTER,justify:G.default.Justify.CENTER},void 0,Te):o===ce.PageSizes.SMALL?t.renderSmall(n,r,a):t.renderLarge(n,r,a)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Oe(t,n);var s,_,g,S=r.prototype;return S.componentDidMount=function(){var e=this.props,t=e.sku,n=e.storeListing,r=e.isFetchingEntitlements,a=e.shouldFetchStatistics,o=e.didFetchEntitlements,i=e.location,l=e.fetchStoreListing;if(null!=i.state){var u=i.state,s=u.analyticsSource,d=u.analyticsProperties;this._analyticsSource=s,this._extraAnalyticsProperties=d}else this._analyticsSource=pe.DIRECT_ANALYTICS_LOCATION;(null==n||n.isSlimDirectoryVersion())&&l(),null!=t&&(r||o||(0,p.fetchUserEntitlementsForApplication)(t.applicationId),a&&f.default.wait((function(){return(0,c.fetchStatisticsForApplication)(t.applicationId)}))),this.handleScroll(),this.trackViewed(),this.replaceUrlWithSlug()},S.componentDidUpdate=function(e){var t=this.props,n=t.locale,r=t.sku,a=t.shouldFetchStatistics,o=t.skuId,i=t.storeListingId,l=t.slug,u=t.storeListing,s=t.fetchStoreListing;if(u!==e.storeListing&&null!=u&&(0,J.deepLinkRouteIfLandedAndNotAuthed)(pe.RPCDeepLinks.STORE_LISTING,{skuId:o,slug:l}),n===e.locale&&o===e.skuId||s(),a&&!e.shouldFetchStatistics){if(null==r)throw new Error("Unexpected missing sku");f.default.wait((function(){return(0,c.fetchStatisticsForApplication)(r.applicationId)}))}o===e.skuId&&i===e.storeListingId||(this._trackedViewed=!1),this.trackViewed(),this.replaceUrlWithSlug()},S.componentWillUnmount=function(){this.showCopyLinkTextTimeout.stop();var e=this.props.analyticsContext,t=e.loadId,n=e.loadDate;null!=n&&K.default.track(pe.AnalyticEvents.STORE_LISTING_EXITED,{load_id:t,duration_ms:Date.now()-n})},S.replaceUrlWithSlug=function(){var e=this.props,t=e.sku,n=e.application,r=e.channel,a=e.skuId,o=e.applicationId,i=e.slug;null==r&&(null!=a&&null!=t&&i!==t.slug&&(0,T.replaceWith)({pathname:pe.Routes.APPLICATION_STORE_LISTING_SKU(t.id,t.slug),search:location.search}),null!=o&&null!=n&&null!=n.slug&&i!==n.slug&&(0,T.replaceWith)({pathname:pe.Routes.APPLICATION_STORE_LISTING_APPLICATION(n.id,n.slug),search:location.search}))},S.trackViewed=function(){var e=this.props,t=e.sku,n=e.storeListing,r=e.hasFetchedNews,a=e.analyticsContext;if(!this._trackedViewed&&null!=t&&null!=n&&null!=n.description&&(this.isChannelType||r)){var o=n.carouselItems.reduce((function(e,t){return null!=t.assetId?e.images++:e.videos++,e}),{images:0,videos:0});K.default.track(pe.AnalyticEvents.STORE_LISTING_VIEWED,ge({},this._extraAnalyticsProperties,{load_id:a.loadId,has_description:null!=n.description&&n.description.length>0,has_staff_review:null!=n.staffNotes,carousel_image_count:o.images,carousel_video_count:o.videos,location:a.location.page,source:this._analyticsSource},(0,O.default)(t,!0))),this._trackedViewed=!0}},S.renderHeader=function(e,t){var n=this.props,r=n.channel,o=n.isAuthenticated;return Ee(h.default,{isAuthenticated:o,toolbar:this.renderHeaderToolbar(e,t)},void 0,null!=r?Ee(a.Fragment,{},void 0,Ee(h.default.Icon,{icon:W.default,"aria-label":ve.default.Messages.STORE_CHANNEL}),Ee(h.default.Title,{},void 0,r.name)):null!=t&&t.premium?Ee(a.Fragment,{},void 0,Ee(h.default.Icon,{icon:V.default,"aria-label":ve.default.Messages.PREMIUM}),Ee(ue.default,{sku:t})):null!=t?Ee(a.Fragment,{},void 0,Ee(h.default.Icon,{icon:W.default,"aria-label":ve.default.Messages.STORE_CHANNEL}),Ee(h.default.Title,{},void 0,t.name)):null)},S.parseMediaItems=function(e,t,n){var r=t.assetId,a=t.youtubeVideoId;if(null!=r){var o=n.find((function(e){return e.id===r}));if(null!=o){var i=o.width,l=o.height;if(null==i||null==l)throw new Error("ApplicationStoreListing.parseMediaItems: Video and Image assets must have a width and height defined");return o.mimeType.startsWith("video/")?{type:pe.CarouselMediaTypes.VIDEO,thumbnailSrc:(0,q.getAssetURL)(e.id,o,1024,"webp"),src:(0,q.getAssetURL)(e.id,o),height:l,width:i}:{type:pe.CarouselMediaTypes.IMG,src:(0,q.getAssetURL)(e.id,o,1024),height:l,width:i}}}if(null!=a)return{type:pe.CarouselMediaTypes.YOUTUBE_VIDEO,youtubeVideoId:a};throw new Error("Store carousel item must have one of assetId or youtubeVideoId")},S.renderHeaderAssets=function(e,t,n){var r=this.props.theme,a=t.headerBackground,o=r===pe.ThemeTypes.LIGHT?t.headerLogoLightTheme:t.headerLogoDarkTheme;return null==a||null==o?Ee("div",{className:ye.default.noHeaderSpacer}):Ee("div",{className:ye.default.headerAssets},void 0,Ee("div",{className:ye.default.headerBackground,style:{backgroundImage:"url("+(0,q.getAssetURL)(e.id,a,1024,"png")+")"}}),Ee("img",{className:ye.default.headerLogo,src:(0,q.getAssetURL)(e.id,o,1024,"png"),alt:n.name}))},S.renderPurchaseSection=function(e,t,n){var r=this.props,o=r.channel,i=r.isFocused,l=r.fetchStoreListing;return Ee(y.default,{section:pe.AnalyticsSections.STORE_LISTING_BUY_GAME},void 0,a.createElement(ie.default,{storeListing:e,fetchStoreListing:l,game:t,sku:n,guildId:null!=o?o.guild_id:null,channelId:null!=o?o.id:null,isFocused:i,className:ye.default.purchaseUnit,ref:this._purchaseRef}))},S.renderWhyYouMightLikeThis=function(e,t){return Ee(le.default,{sku:e,storeListing:t,className:ye.default.whyYouMightLikeIt})},S.renderVerifiedGuildInvite=function(e,t){if(null==e.guild)return null;var n=this.props,r=n.channel,a=n.pageSize;return Ee(fe.default,{skuId:t.id,guild:e.guild,className:ye.default.guildInvite,inChannel:null!=r,pageSize:a})},S.renderFeatures=function(e){return Ee(te.default,{sku:e})},S.renderSystemRequirements=function(e){return null==e.systemRequirements||0===Object.keys(e.systemRequirements).length?null:Ee(se.default,{className:ye.default.systemRequirements,systemRequirements:e.systemRequirements,pageSize:this.props.pageSize})},S.renderDescription=function(e,t,n){var r=t.description;if(null==r)throw new Error("Rendering ApplicationStoreListing without description");return Ee(a.Fragment,{},void 0,Ee(U.default,{tag:"h1"},void 0,ve.default.Messages.APPLICATION_STORE_ABOUT_HEADER.format({name:n.name})),Ce,Ee(ee.default,{applicationId:e.id,blurb:t.summary,description:r,className:ye.default.description,assets:t.assets}))},S.renderApplicationContentRating=function(e){return Ee(Q.default,{sku:e,className:ye.default.contentRating})},S.renderApplicationLegalInfo=function(e){return Ee(ne.default,{sku:e,className:ye.default.legalInfo})},S.renderJsonLD=function(){var e=this.props,t=e.sku,n=e.storeListing,r=e.application;if(null==t||null==n||null==r)return null;var a=[],o=r.getSplashURL(1024);null!=o&&a.push(o),null!=n.headerLogoLightTheme&&a.unshift((0,q.getAssetURL)(r.id,n.headerLogoLightTheme,1024,"jpg"));var i=F.default.Product({name:t.name,description:t.summary||n.tagline,image:F.default.Product.Image(a),sku:t.id}),l=t.getPrice();if(null!=l){var u=l.amount,s=l.currency;i.offers=F.default.Offer({priceCurrency:s.toUpperCase(),price:(0,Z.formatPrice)(u,s,{style:"decimal"})})}var d=F.default.ItemPage({mainEntity:i});return Ee(F.default,{data:d})},S.renderSmall=function(e,t,n){return Ee("div",{className:(0,o.default)(ye.default.listing,ye.default.listingSmall)},void 0,this.renderHeaderAssets(e,t,n),this.renderCarousel(e,t),this.renderPurchaseSection(t,e,n),this.renderWhyYouMightLikeThis(n,t),this.renderDescription(e,t,n),this.renderVerifiedGuildInvite(t,n),this.renderFeatures(n),this.renderSystemRequirements(n),this.renderApplicationContentRating(n),this.renderApplicationLegalInfo(n))},S.renderLarge=function(e,t,n){return Ee("div",{className:ye.default.listing},void 0,this.renderHeaderAssets(e,t,n),this.renderCarousel(e,t),Ee("div",{className:ye.default.listingLarge},void 0,Ee("div",{className:ye.default.body},void 0,Ee("div",{className:ye.default.leftColumn},void 0,this.renderWhyYouMightLikeThis(n,t),this.renderDescription(e,t,n),this.renderSystemRequirements(n),this.renderApplicationContentRating(n),this.renderApplicationLegalInfo(n)),Ee("div",{className:ye.default.rightColumn},void 0,this.renderPurchaseSection(t,e,n),this.renderVerifiedGuildInvite(t,n),this.renderFeatures(n)))))},S.render=function(){var e=this.props,t=e.application,n=e.sku,r=e.storeListing,o=e.matureAgree,i=e.isAuthenticated;if(null==t||null==n||null==r||r.isSlimDirectoryVersion())return Ee(a.Fragment,{},void 0,this.renderHeader(t,n),Ee(G.default,{align:G.default.Align.CENTER,justify:G.default.Justify.CENTER},void 0,Ee(B.default,{className:ye.default.spinner})));if(!o&&n.showAgeGate){var l=i?null:Ee("div",{className:ye.default.gatedListing},void 0,this.renderListing());return Ee(a.Fragment,{},void 0,Ee(u.Helmet,{title:t.name}),this.renderJsonLD(),this.renderHeader(t,n),Ee(ae.default,{game:t}),l)}return i?Ee("div",{className:ye.default.listingWrapper},void 0,Ee(u.Helmet,{title:t.name}),this.renderJsonLD(),Ee(y.default,{section:pe.AnalyticsSections.NAVIGATION},void 0,this.renderHeader(t,n)),Ee(z.AdvancedScrollerAuto,{onScroll:this.handleScroll,className:ye.default.scroller},void 0,Ee(y.default,{section:pe.AnalyticsSections.BODY},void 0,this.renderListing()))):Ee("div",{},void 0,Ee(u.Helmet,{title:t.name}),this.renderJsonLD(),this.renderHeader(t,n),this.renderListing())},s=r,(_=[{key:"isChannelType",get:function(){return null!=this.props.channel}}])&&Se(s.prototype,_),g&&Se(s,g),r}(a.PureComponent);be.displayName="ApplicationStoreListing";var Me=(0,g.default)((0,S.default)(s.default.connectStores([R.default,N.default,j.default,A.default,w.default,D.default,C.default,P.default,b.default,L.default],(function(e){var t,n,r,a,o=e.inputSkuId,i=e.applicationId,l=e.storeListingId,u=e.isAuthenticated,s=e.channel;if(null==i){if(null==o)throw new Error("Needs applicationId or skuId");n=o,null!=(i=null!=(r=D.default.get(o))?r.applicationId:null)&&(a=C.default.getGame(i))}else if(null==o){if(null==i)throw new Error("Needs applicationId or skuId");null!=(a=C.default.getGame(i))&&(n=a.destinationSkuId),r=null!=n?D.default.get(n):null}null!=(null===(t=r)||void 0===t?void 0:t.flags)&&(0,$.hasFlag)(r.flags,pe.SKUFlags.STICKER_PACK)&&(r=null);var d=null!=i&&j.default.inTestModeForApplication(i);return{skuId:n,application:null!=i?C.default.getGame(i):null,isFetchingEntitlements:null!=i&&L.default.applicationIdsFetching.has(i),didFetchEntitlements:null!=i&&L.default.applicationIdsFetched.has(i),shouldFetchStatistics:u&&null!=i&&P.default.shouldFetchStatisticsForApplication(i),sku:r,isFocused:A.default.isFocused(),storeListing:w.default.getStoreListing({storeListingId:l,skuId:n,channelId:null!=s?s.id:null,isTestMode:d}),isInTestMode:null!=i&&d,matureAgree:R.default.didMatureAgree,theme:N.default.theme,locale:N.default.locale,guild:null!=s?b.default.getGuild(s.getGuildId()):null}}))(be)));t.default=Me},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepLinkRouteIfLandedAndNotAuthed=t.deepLinkRouteIfLanded=void 0;var r=u(n(740)),a=n(42),o=u(n(11)),i=u(n(16)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}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}).apply(this,arguments)}var d=i.default.embedded?l.NOOP:function(e,t){i.default.isDesktop&&!(0,a.hasNavigated)()&&r.default.requestOnce(l.RPCCommands.DEEP_LINK,{type:e,params:t})};t.deepLinkRouteIfLanded=d;var f=i.default.embedded?l.NOOP:function(e,t){if(!o.default.isAuthenticated()&&!o.default.isGuest())return d(e,s({},t||{},{fingerprint:o.default.getFingerprint()}))};t.deepLinkRouteIfLandedAndNotAuthed=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"}),d))}f.displayName="Cloud"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,i=e.color,l=void 0===i?"currentColor":i,u=e.foreground;return o("svg",{width:n,height:a,className:e.className,viewBox:"0 0 18 18"},void 0,o("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},void 0,o("path",{d:"M9,3 L9,0.75 L6,3.75 L9,6.75 L9,4.5 C11.4825,4.5 13.5,6.5175 13.5,9 C13.5,9.7575 13.3125,10.4775 12.975,11.1 L14.07,12.195 C14.655,11.2725 15,10.1775 15,9 C15,5.685 12.315,3 9,3 Z M9,13.5 C6.5175,13.5 4.5,11.4825 4.5,9 C4.5,8.2425 4.6875,7.5225 5.025,6.9 L3.93,5.805 C3.345,6.7275 3,7.8225 3,9 C3,12.315 5.685,15 9,15 L9,17.25 L12,14.25 L9,11.25 L9,13.5 Z",fill:l,className:u,fillRule:"nonzero"})))}i.displayName="Synced"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(8354))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}function u(e){return a.createElement(o.default,l({},e,{direction:o.default.Directions.UP}))}u.displayName="ArrowUp"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=c(n(133)),l=c(n(29)),u=c(n(61)),s=c(n(55)),d=c(n(1266)),f=c(n(7891));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=(0,i.default)({SMALL:null,MEDIUM:null,LARGE:null}),m=((r={})[y.SMALL]=f.default.dropdownSmall,r[y.MEDIUM]=f.default.dropdownMedium,r[y.LARGE]=f.default.dropdownLarge,r),_=function(e){var t=e.onDropdownClick,n=e.children,r=e.contentClassName,a=e.dropdownSize,i=void 0===a?y.MEDIUM:a,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onDropdownClick","children","contentClassName","dropdownSize"]);return o.createElement(l.default,c,v(s.default,{align:s.default.Align.CENTER},void 0,v(s.default.Child,{className:r},void 0,n),null!=t?v(u.default,{className:m[i],onClick:function(e){e.stopPropagation(),null!=t&&t(e)}},void 0,v("div",{className:f.default.arrowSeparator}),v(d.default,{className:f.default.dropdownArrow})):null))};_.displayName="DropdownButton",_.DropdownSizes=y,_.Sizes=l.default.Sizes,_.Colors=l.default.Colors,_.Looks=l.default.Looks;var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GroupDM=t.DirectMessage=t.LinkButton=void 0;var r,a=U(n(0)),o=j(n(23)),i=n(3),l=j(n(391)),u=n(389),s=j(n(707)),d=j(n(8694)),f=n(5937),c=j(n(180)),p=j(n(8703)),v=j(n(8476)),y=j(n(163)),m=j(n(256)),_=j(n(200)),h=j(n(8582)),E=j(n(181)),g=j(n(12)),S=j(n(1222)),O=j(n(61)),I=j(n(8319)),T=j(n(255)),C=j(n(466)),b=n(41),M=U(n(279)),N=j(n(8553)),A=j(n(24)),P=j(n(43)),R=j(n(8468)),L=n(1),D=j(n(6)),w=j(n(7895));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(){return(G=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}).apply(this,arguments)}function F(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function B(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,H(e,t)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var V=P.default.getEnableHardwareAcceleration()?M.AnimatedAvatar:M.default,W={offset:{top:2,bottom:2,right:4}},Y=function(e){var t=e.onClick;return x(O.default,{onClick:t,className:w.default.closeButton},void 0,x(T.default,{className:w.default.closeIcon}))};Y.displayName="CloseButton";var z=function(e){function t(){return e.apply(this,arguments)||this}return B(t,e),t.prototype.render=function(){var e=this.props,t=e.route,n=e.selected,r=e.icon,o=e.text,i=e.children,l=e.locationState,u=e.onClick,s=F(e,["route","selected","icon","text","children","locationState","onClick"]);return a.createElement(N.default,G({selected:n,className:w.default.channel,to:{pathname:t,state:l},onClick:u,avatar:x(r,{className:w.default.linkButtonIcon}),name:o,focusProps:W},s),i)},t}(a.Component);t.LinkButton=z,z.displayName="LinkButton";var K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={hovered:!1},t.handleMouseEnter=function(){t.setState({hovered:!0})},t.handleMouseLeave=function(){t.setState({hovered:!1})},t.handleClose=function(e){null!=e&&(e.preventDefault(),e.stopPropagation());var n=t.props.channel;l.default.closePrivateChannel(n.id,t.props.selected)},t.handleContextMenu=function(e){var n=t.props,r=n.channel,o=n.selected,i=n.user;r.isMultiUserDM()?(0,u.openContextMenu)(e,(function(e){return a.createElement(p.default,G({},e,{channel:r,selected:o}))}),{noBlurEvent:!0}):(0,u.openContextMenu)(e,(function(e){return a.createElement(v.default,G({},e,{user:i,channel:r,channelSelected:o}))}))},t.handleLeaveGroup=function(e){e.preventDefault(),e.stopPropagation();var n=t.props,r=n.channel,o=n.channelName,i=D.default.Messages.LEAVE_GROUP_DM_TITLE.format({name:o}),l=D.default.Messages.LEAVE_GROUP_DM_BODY.format({name:o});r.isManaged()&&(i=D.default.Messages.LEAVE_GROUP_DM_MANAGED_TITLE.format({name:o}),l=D.default.Messages.LEAVE_GROUP_DM_MANAGED_BODY.format({name:o})),(0,b.openModal)((function(e){return a.createElement(C.default,G({header:i,confirmText:D.default.Messages.LEAVE_GROUP_DM,cancelText:D.default.Messages.CANCEL,onConfirm:t.handleClose},e),x(A.default,{size:A.default.Sizes.SIZE_16},void 0,l))}))},t.handleMouseDown=function(){l.default.preload(L.ME,t.props.channel.id)},t}B(t,e);var n=t.prototype;return n.renderSubtitle=function(){var e=this.props,t=e.channel,n=e.activities,r=e.applicationStream,o={className:w.default.activity,textClassName:w.default.activityText,emojiClassName:w.default.activityEmoji};return t.isSystemDM()?x("div",{className:w.default.subtext},void 0,D.default.Messages.SYSTEM_DM_ACTIVITY_TEXT):t.isMultiUserDM()?x("div",{className:w.default.subtext},void 0,D.default.Messages.MEMBERS_HEADER.format({members:t.recipients.length+1})):null!=n?a.createElement(R.default,G({},o,{activities:n,applicationStream:r,animate:this.state.hovered,hideTooltip:!0})):null},n.renderAvatar=function(){var e=this.props,t=e.channel,n=e.user,r=e.status,a=e.activities,i=e.isTyping,l=e.isMobile;if(t.isMultiUserDM())return x(V,{src:(0,f.getChannelIconURL)(t),"aria-hidden":!0,className:w.default.avatar,size:M.Sizes.SIZE_32});(0,o.default)(null!=n,"PrivateChannel.renderAvatar: Invalid prop configuration - no user or channel");var u=null;return n.isSystemUser()||(u=(0,s.default)(a)?L.StatusTypes.STREAMING:r),x(V,{size:M.Sizes.SIZE_32,src:n.getAvatarURL(void 0),status:u,isMobile:l,isTyping:i,className:w.default.avatar,"aria-label":n.username,statusTooltip:!0})},n.render=function(){var e=this.props,t=e.channel,n=e.channelName,r=e.selected,a=e.muted,o=e.onClick,i=e.onFocus,l=e.tabIndex,u=e.id,s=e.hasUnreadMessages;return x(N.default,{className:w.default.channel,avatar:this.renderAvatar(),selected:r,highlighted:s,muted:a,name:x(I.default,{},void 0,n),decorators:t.isSystemDM()?x(S.default,{className:w.default.decorator,type:S.default.Types.SYSTEM_DM,verified:!0}):null,to:L.Routes.CHANNEL(L.ME,t.id),onContextMenu:this.handleContextMenu,onClick:o,onFocus:i,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,subText:this.renderSubtitle(),"aria-label":(0,d.default)(t,s),"aria-setsize":this.props["aria-setsize"],"aria-posinset":this.props["aria-posinset"],id:u,tabIndex:l,focusProps:W},void 0,x(Y,{onClick:t.isMultiUserDM()?this.handleLeaveGroup:this.handleClose}))},t}(a.PureComponent);K.displayName="PrivateChannel",K.defaultProps={selected:!1};var $=function(e){var t=e.channel,n=e.selected,r=F(e,["channel","selected"]),o=(0,i.useStateFromStores)([g.default],(function(){return g.default.getUser(t.getRecipientId())})),l=(0,i.useStateFromStoresObject)([m.default,y.default],(function(){return{status:null!=o?m.default.getStatus(o.id):null,activities:null!=o?m.default.getActivities(o.id):null,applicationStream:null!=o?y.default.getStreamForUser(o.id):null,isMobile:null!=o&&m.default.isMobileOnline(o.id)}}),[null==o?void 0:o.id]),u=(0,i.useStateFromStores)([h.default],(function(){return null!=o?h.default.isTyping(t.id,t.getRecipientId()):void 0})),s=(0,i.useStateFromStores)([E.default],(function(){return E.default.isChannelMuted(t.getGuildId(),t.id)})),d=(0,i.useStateFromStores)([_.default],(function(){return _.default.getMentionCount(t.id)>0})),f=(0,c.default)(t);return a.createElement(K,G({channel:t,channelName:f,selected:n},l,{user:o,isTyping:u,muted:s,hasUnreadMessages:d},r))};t.DirectMessage=$,$.displayName="DirectMessage";var Z=function(e){var t=e.channel,n=e.selected,r=F(e,["channel","selected"]),o=(0,i.useStateFromStores)([E.default],(function(){return E.default.isChannelMuted(t.getGuildId(),t.id)})),l=(0,i.useStateFromStores)([_.default],(function(){return _.default.getMentionCount(t.id)>0})),u=(0,c.default)(t);return a.createElement(K,G({channel:t,channelName:u,selected:n,muted:o,hasUnreadMessages:l},r))};t.GroupDM=Z,Z.displayName="GroupDM";var q=K;t.default=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_IMAGE_UPLOAD_FILESIZE_BYTES=t.BIO_MAX_LENGTH=void 0;t.BIO_MAX_LENGTH=190;t.MAX_IMAGE_UPLOAD_FILESIZE_BYTES=10485760},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var i=o("path",{d:"M-4-4h24v24H-4z"});function l(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,u=void 0===l?"currentColor":l,s=e.className,d=e.foreground;return o("svg",{className:s,width:n,height:a,viewBox:"0 0 16 16"},void 0,o("g",{fill:"none"},void 0,i,o("path",{className:d,fill:u,d:"M14.994 1.006C13.858-.257 11.904-.3 10.72.89L8.637 2.975l-.696-.697-1.387 1.388 5.557 5.557 1.387-1.388-.697-.697 1.964-1.964c1.13-1.13 1.3-2.985.23-4.168zm-13.25 10.25c-.225.224-.408.48-.55.764L.02 14.37l1.39 1.39 2.35-1.174c.283-.14.54-.33.765-.55l4.808-4.808-2.776-2.776-4.813 4.803z"})))}l.displayName="Dropper"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(14)),a=u(n(2)),o=u(n(755)),i=n(1),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e,t){return a.default.dispatch({type:i.ActionTypes.MFA_SMS_TOGGLE}),r.default.post({url:e,body:{password:t},oldFormErrors:!0}).then((function(e){return a.default.dispatch({type:i.ActionTypes.MFA_SMS_TOGGLE_COMPLETE}),e}),(function(e){throw a.default.dispatch({type:i.ActionTypes.MFA_SMS_TOGGLE_COMPLETE}),e}))}var f={enableMFAStart:function(e){return(t=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.default.post({url:i.Endpoints.MFA_TOTP_ENABLE,body:{password:e},oldFormErrors:!0});case 2:return n=t.sent,t.abrupt("return",n.body);case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))})();var t},enable:function(e){var t=e.password,n=e.code,o=e.secret;return r.default.post({url:i.Endpoints.MFA_TOTP_ENABLE,body:{code:n,secret:o,password:t},oldFormErrors:!0}).then((function(e){return a.default.dispatch({type:i.ActionTypes.MFA_ENABLE_SUCCESS,token:e.body.token,codes:e.body.backup_codes})}))},disable:function(){(0,o.default)({title:l.default.Messages.TWO_FA_DISABLE,actionText:l.default.Messages.TWO_FA_REMOVE},(function(e){return r.default.post({url:i.Endpoints.MFA_TOTP_DISABLE,body:e,oldFormErrors:!0})}),{checkEnabled:!0}).then((function(e){var t=e.body.token;return a.default.dispatch({type:i.ActionTypes.MFA_DISABLE_SUCCESS,token:t})}))},enableSMS:function(e){return d(i.Endpoints.MFA_SMS_ENABLE,e)},disableSMS:function(e){return d(i.Endpoints.MFA_SMS_DISABLE,e)},viewBackupCodes:function(e,t){return void 0===t&&(t=!1),r.default.post({url:i.Endpoints.MFA_CODES,body:{password:e,regenerate:t},oldFormErrors:!0}).then((function(e){return a.default.dispatch({type:i.ActionTypes.MFA_VIEW_BACKUP_CODES,codes:e.body.backup_codes})}))},clearBackupCodes:function(){a.default.dirtyDispatch({type:i.ActionTypes.MFA_CLEAR_BACKUP_CODES})}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=z(n(0)),o=W(n(9)),i=W(n(23)),l=W(n(3)),u=W(n(10236)),s=W(n(8273)),d=W(n(399)),f=z(n(484)),c=W(n(1273)),p=W(n(9244)),v=W(n(9245)),y=W(n(1248)),m=W(n(8756)),_=W(n(5966)),h=W(n(163)),E=W(n(11)),g=W(n(10)),S=W(n(71)),O=W(n(86)),I=W(n(15)),T=W(n(51)),C=W(n(40)),b=W(n(256)),M=W(n(79)),N=W(n(36)),A=W(n(710)),P=W(n(477)),R=W(n(8313)),L=W(n(8368)),D=W(n(8520)),w=W(n(5955)),j=n(41),k=W(n(8710)),U=W(n(9070)),G=W(n(8414)),F=W(n(13)),B=W(n(16)),H=n(1),x=W(n(6)),V=W(n(7911));function W(e){return e&&e.__esModule?e:{default:e}}function Y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Y=function(){return e},e}function z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function K(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $(){return($=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}).apply(this,arguments)}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var q=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleClickGoLiveButton=function(){var e=t.props,n=e.guildId,r=e.voiceChannel,o=null!=r?r.getGuildId():n;t.modalKey=(0,j.openModal)((function(e){return a.createElement(m.default,$({},e,{selectSource:!1,guildId:o,analyticsLocation:H.AnalyticsLocations.ACTIVITY_PANEL}))}))},t.handleClickStopStreamingButton=function(){var e=t.props.stream;(0,_.default)(e)},t.handleClickInviteButton=function(){var e=t.props,n=e.activity,r=e.analyticsContext;(0,i.default)(null!=n,"Received null activity"),F.default.track(H.AnalyticEvents.OPEN_MODAL,{type:"Send Join Invite",application_id:n.application_id,location:r.location}),(0,j.openModal)((function(e){return a.createElement(u.default,$({activity:n},e))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Z(t,n);var l=r.prototype;return l.isJoinableActivity=function(){var e=this.props,t=e.application,n=e.activity;return null!=t&&null!=n&&n.application_id===t.id&&n.type===H.ActivityTypes.PLAYING&&(0,d.default)(n,H.ActivityFlags.JOIN)},l.renderGoLiveButton=function(){var e,t,n,r,a=this.props,o=a.canGoLive,i=a.guildId,l=a.isStreaming,u=a.voiceChannel,s=a.canStream,d=a.runningGame;return l||o?(l?(e=!1,t=this.handleClickStopStreamingButton,n=D.default,r=x.default.Messages.STOP_STREAMING):s?(e=!1,t=this.handleClickGoLiveButton,n=w.default,r=null!=d?x.default.Messages.ACTIVITY_PANEL_GO_LIVE_STREAM_GAME.format({game:d.name}):x.default.Messages.ACTIVITY_PANEL_GO_LIVE):(e=!0,t=null,n=w.default,r=null!=u?x.default.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_VOICE:null!=i?x.default.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_GUILD:x.default.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NOT_IN_GUILD),K(k.default,{tooltipText:r,disabled:e,onClick:t,icon:n,iconForeground:V.default.actionIcon})):null},l.renderInviteButton=function(){return this.isJoinableActivity()?K(k.default,{tooltipText:x.default.Messages.INVITE_EMBED_INVITE_TO_JOIN,onClick:this.handleClickInviteButton,icon:L.default,iconForeground:V.default.actionIcon}):null},l.renderActions=function(){var e=this.renderGoLiveButton(),t=this.renderInviteButton();return null==e&&null==t?null:K("div",{className:V.default.actions},void 0,e,t)},l.getGameName=function(){var e=this.props,t=e.runningGame,n=e.application;return null!=n?n.name:null!=t?t.name:x.default.Messages.STATUS_UNKNOWN},l.renderGame=function(){var e,t=this.props,n=t.isStreaming,r=t.application,a=this.getGameName();return K("div",{className:(0,o.default)(V.default.gameWrapper,(e={},e[V.default.clickableGameWrapper]=null!=r,e))},void 0,K("div",{className:V.default.gameIconWrapper},void 0,K(P.default,{className:V.default.gameIcon,game:r}),n?K(R.default,{className:V.default.liveBadge}):null),K("div",{className:V.default.info},void 0,null!=a?K(U.default,{},void 0,a):null))},l.renderScreenshare=function(){var e=this.props,t=e.isStreaming,n=e.streamMetadata,r=(0,p.default)(n),a=r.title,o=r.sanitizedTitle;return K("div",{className:V.default.gameWrapper},void 0,t?K(v.default,{title:o}):K(G.default,{look:G.default.Looks.GRAY,size:G.default.Sizes.SMALL,className:V.default.liveIndicator}),K("div",{className:V.default.info},void 0,K(U.default,{},void 0,a)))},l.render=function(){var e=this.props,t=e.canGoLive,n=e.runningGame,r=e.isStreaming,a=e.streamMetadata,i=e.className;if(!r){if(!this.isJoinableActivity()&&!t)return null;if(null==n)return null}return K("div",{className:(0,o.default)(V.default.panel,i)},void 0,K("div",{className:V.default.body},void 0,null==n||r&&null==(null==a?void 0:a.pid)?this.renderScreenshare():this.renderGame(),this.renderActions()))},r}(a.PureComponent);q.displayName="ActivityPanelGameCard";var X=(0,s.default)(l.default.connectStores([M.default,A.default,E.default,g.default,h.default,N.default,I.default,T.default,S.default,b.default,O.default,C.default],(function(e){var t=e.guildId,n=E.default.getId(),r=(0,y.default)(M.default,A.default),a=g.default.getChannel(N.default.getVoiceChannelId()),o=h.default.getActiveStreamForUser(n),i=h.default.getStreamerActiveStreamMetadata(),l=!1;if(null!=a)l=f.canStreamInChannel(a,I.default,C.default,!1);else if(null!=t){l=f.getStreamEligibleChannels(O.default.getChannels(t),I.default,C.default).length>0}var u=null;return null!=i&&null!=i.id?u=S.default.getGame(i.id):null!=r&&(u=S.default.getGameBySettingGame(r)),{canGoLive:(0,c.default)(T.default)&&B.default.isWindows(),activity:null!=n?b.default.findActivity(n,(function(e){return e.type===H.ActivityTypes.PLAYING})):null,runningGame:r,application:u,isStreaming:null!=o&&o.ownerId===n&&o.state!==H.ApplicationStreamStates.ENDED,voiceChannel:a,canStream:l,stream:o,streamMetadata:i}}))(q));t.default=X},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a.default.Messages.ACTIVITY_PANEL_GO_LIVE;null!=e&&null!=e.sourceName&&e.sourceName.length>0&&(t=e.sourceName);return{sanitizedTitle:t.replace(o,""),title:t}};var r,a=(r=n(6))&&r.__esModule?r:{default:r};var o=/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,t.SCREEN_ICON_COLORS=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=n(202),l=s(n(8313)),u=s(n(7910));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=[1752220,3066993,3447003,10181046,15277667,15844367];function p(e){return(0,i.int2hex)(c[function(e){var t=5381,n=0;for(;n<e.length;)t=33*t^e.charCodeAt(n++);return t>>>0}(e)%c.length])}function v(e){var t=e.title,n=e.className,r=a.useState(p(t)),i=r[0],s=r[1];return a.useEffect((function(){s(p(t))}),[t]),f("div",{className:(0,o.default)(u.default.icon,n),style:{backgroundColor:i}},void 0,t[0]||"?",f(l.default,{className:u.default.badge}))}t.SCREEN_ICON_COLORS=c,v.displayName="ScreenshareIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=E(n(0)),o=n(10241),i=n(34),l=E(n(744)),u=_(n(51)),s=_(n(271)),d=_(n(47)),f=_(n(13)),c=_(n(93)),p=_(n(8778)),v=n(1),y=_(n(6)),m=_(n(7912));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=g("hr",{}),I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._graphView=null,t._dataSeries=new o.TimelineDataSeries,t.openDebugPanel=function(){var e=t.props.closePopout;null!=e&&e(),l.open()},t.handleSetCanvas=function(e){null!=e&&(t._graphView=new o.TimelineGraphView(e),t.setThemeColors(),t._graphView.addDataSeries(t._dataSeries),t._dataSeries.addPoint(Date.now(),0),t._dataSeries.setColor(v.HEXColors.BRAND),t._graphView.updateEndDate())},t.renderVoiceConnected=function(){var e=t.props,n=e.hostname,r=e.averagePing,o=e.lastPing,i=e.outboundLossRate,l=null!=i?y.default.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_LOSS_RATE:y.default.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED;return g(a.Fragment,{},void 0,a.createElement("canvas",{width:210,height:80,ref:t.handleSetCanvas}),l.format({hostname:p.default.getShortHostname(n),badPing:250,averagePing:r.toFixed(0),lastPing:(o||0).toFixed(0),outboundLossRate:(i||0).toFixed(1),badLossRate:10}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var _=r.prototype;return _.componentDidMount=function(){f.default.track(v.AnalyticEvents.OPEN_POPOUT,{type:"RTC Connection"})},_.componentDidUpdate=function(e){var t=this.props,n=t.theme,r=t.lastPing;t.averagePing===e.averagePing&&n===e.theme||null==this._graphView||(this.setThemeColors(),this._dataSeries.addPoint(Date.now(),r||0),this._graphView.updateEndDate())},_.setThemeColors=function(){var e=this.props.theme;null!=this._graphView&&(this._graphView.backgroundColor=e===v.ThemeTypes.LIGHT?v.HEXColors.WHITE:v.HEXColors.PRIMARY_DARK_600,this._graphView.textColor=e===v.ThemeTypes.LIGHT?v.HEXColors.BLACK:v.HEXColors.WHITE,this._graphView.gridColor=this.props.theme===v.ThemeTypes.LIGHT?v.HEXColors.BLACK_100:v.HEXColors.WHITE_800)},_.render=function(){var e,t=this.props.connectionState,n=(e={},e[v.RTCConnectionStates.AWAITING_ENDPOINT]=y.default.Messages.RTC_CONNECTION_STATE_AWAITING_ENDPOINT.format({url:v.Links.STATUS}),e[v.RTCConnectionStates.CONNECTING]=y.default.Messages.RTC_CONNECTION_STATE_CONNECTING,e[v.RTCConnectionStates.AUTHENTICATING]=y.default.Messages.RTC_CONNECTION_STATE_AUTHENTICATING,e[v.RTCConnectionStates.DISCONNECTED]=y.default.Messages.RTC_CONNECTION_STATE_DISCONNECTED,e[v.RTCConnectionStates.RTC_CONNECTING]=y.default.Messages.RTC_CONNECTION_STATE_RTC_CONNECTING,e[v.RTCConnectionStates.ICE_CHECKING]=y.default.Messages.RTC_CONNECTION_STATE_ICE_CHECKING.format({url:c.default.getArticleURL(v.HelpdeskArticles.VOICE_CONNECTION_ERRORS)}),e[v.RTCConnectionStates.RTC_CONNECTED]=this.renderVoiceConnected,e[v.RTCConnectionStates.NO_ROUTE]=y.default.Messages.RTC_CONNECTION_STATE_NO_ROUTE.format({url:c.default.getArticleURL(v.HelpdeskArticles.VOICE_CONNECTION_ERRORS)}),e[v.RTCConnectionStates.RTC_DISCONNECTED]=y.default.Messages.RTC_CONNECTION_STATE_DISCONNECTED,e)[t];return g("div",{className:m.default.container},void 0,g(d.default,{tag:d.default.Tags.H3,className:m.default.header},void 0,y.default.Messages.RTC_CONNECTION),g("section",{},void 0,"function"==typeof n?n():g("p",{},void 0,n),O,g("div",{className:m.default.popoutBottom},void 0,g("span",{className:m.default.secured},void 0,y.default.Messages.IP_ADDRESS_SECURED),u.default.supports(i.Features.DIAGNOSTICS)&&!__OVERLAY__&&g(s.default,{className:m.default.debugButton,onClick:this.openDebugPanel},void 0,y.default.Messages.DEBUG))))},r}(a.PureComponent);I.displayName="RTCConnectionPopout";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(8)),a=c(n(3)),o=c(n(28)),i=c(n(2)),l=n(1229),u=c(n(78)),s=c(n(8711)),d=c(n(10)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(){return(_=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}).apply(this,arguments)}var h,E,g=new Set,S=f.FormStates.CLOSED,O=!1,I=null,T=null,C=null,b=null,M=null,N=null,A=o.default.get(l.ADVANCED_MODE_ON_KEY)||!1;function P(){if(C=s.default.getChannel(),b=s.default.getCategory(),null==C)return!1;var e=C.getGuildId();T=I=function(e){var t=e.getGuildId(),n=_({},e.permissionOverwrites);return null!=t&&null==n[t]&&(n[t]=u.default.makeEveryoneOverwrite(t)),n}(C),null==I[M]&&(M=e),E=null!=b,h=u.default.areChannelsLocked(C,b),N=null,O=!1,S=f.FormStates.CLOSED,g.clear()}function R(e){if(null==C||C.id!==e)return!1;if(null==(C=d.default.getChannel(e)))return!1;b=s.default.getCategory();var t=C.getGuildId();if(null==t)return!1;var n={};g.forEach((function(e){null!=I&&(n[e]=I[e])})),null==n[t]&&null==C.permissionOverwrites[t]&&(n[t]=u.default.makeEveryoneOverwrite(t)),null==(I=_({},C.permissionOverwrites,{},n))[M]?M=t:N&&I[N]&&(M=N,N=null),h=u.default.areChannelsLocked(C,b)}var L=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a,o,i,l=r.prototype;return l.initialize=function(){this.waitFor(s.default,d.default)},l.hasChanges=function(){return O},l.showNotice=function(){return this.hasChanges()},l.getPermissionOverwrite=function(e){return I&&I[e]},a=r,(o=[{key:"editedPermissionIds",get:function(){return Array.from(g)}},{key:"permissionOverwrites",get:function(){return I}},{key:"selectedOverwriteId",get:function(){return M}},{key:"formState",get:function(){return S}},{key:"isLockable",get:function(){return E}},{key:"locked",get:function(){return h}},{key:"channel",get:function(){return C}},{key:"category",get:function(){return b}},{key:"advancedMode",get:function(){return A}}])&&p(a.prototype,o),i&&p(a,i),r}(a.default.Store))(i.default,{CHANNEL_SETTINGS_SET_SECTION:function(e){var t=e.section;if(null!=C||t!==f.ChannelSettingsSections.PERMISSIONS)return!1;P()},CHANNEL_SETTINGS_PERMISSIONS_INIT:function(e){return P()},CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION:function(e){var t,n=e.id,a=e.allow,o=e.deny,i=I&&I[n];if(null==i||null==C)return!1;i=_({},i,{allow:a,deny:o}),I=_({},I,((t={})[n]=i,t)),g.add(n),S=f.FormStates.OPEN,O=!r.default.isEqual(I,T),h=u.default.areChannelsLocked(C,b)},CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION:function(e){var t=e.id;if(null!=I&&null!=I[t])M=t;else{if(null==C)return!1;N=t}},CHANNEL_SETTINGS_CLOSE:function(e){return S=f.FormStates.CLOSED,I=null,T=null,C=null,b=null,O=!1,g.clear(),M=null,void(N=null)},CHANNEL_UPDATES:function(e){var t=e.updates;if(null==C)return!1;for(var n,r=!1,a=y(t);!(n=a()).done;){!1!==R(n.value.channel.id)&&(r=!0)}return r},CHANNEL_SETTINGS_PERMISSIONS_SUBMITTING:function(e){S=f.FormStates.SUBMITTING},CHANNEL_SETTINGS_PERMISSIONS_SAVE_SUCCESS:function(e){e.silent?S=f.FormStates.OPEN:(S=f.FormStates.CLOSED,P())},CHANNEL_SETTINGS_PERMISSIONS_SET_ADVANCED_MODE:function(e){var t=e.advancedMode;A=t,o.default.set(l.ADVANCED_MODE_ON_KEY,t)}});t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTwoColumns=m,t.renderStreams=function(e,t,n,r){return e.map((function(e){for(var i,c=[],p=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(function(e){return Object.keys(e).sort((function(e,t){var n=_[e],r=_[t];return n!==r?void 0===n?1:void 0===r?-1:n-r:s.graphs[e]!==s.graphs[t]?s.graphs[e]?1:-1:e>t?1:-1}))}(e));!(i=p()).done;){var h=i.value,E=e[h];s.hidden[h]||void 0===E||c.push(y(s.Item,{section:n,label:h,value:E},h))}return y(u.default,{className:f.default.marginBottom40,title:e.type},e.type+" + "+e.ssrc,"video"===e.type&&null!=t&&null!=n&&null!=r&&function(e,t,n,r){var i=r.get(t,n,e.ssrc);return null!=i?y("div",{className:(0,a.default)(d.default.videoWrapper,f.default.marginBottom40)},void 0,y(l.default,{streamId:i,videoComponent:o.default.getMediaEngine().Video,paused:!1})):null}(e,t,n,r),m(c))}))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(9)),o=c(n(51)),i=c(n(55)),l=c(n(9139)),u=c(n(681)),s=n(10242),d=c(n(7394)),f=c(n(370));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=[],n=0;for(e.length%2!=0&&e.push(y(i.default,{basis:"50%",grow:0},n++));e.length>0;)t.push(y(i.default,{basis:"50%",grow:0},n++,e.splice(0,2)));return t}var _={ssrc:1,codec:2}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOverlayLayoutContent=function(){return[{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_SERVERS,binds:C(I.KeybindActions.SERVER_PREV,I.KeybindActions.SERVER_NEXT)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_CHANNELS,binds:C(I.KeybindActions.CHANNEL_PREV,I.KeybindActions.CHANNEL_NEXT)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_BACK_FORWARD,binds:C(I.KeybindActions.NAVIGATE_BACK,I.KeybindActions.NAVIGATE_FORWARD)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_UNREAD_CHANNELS,binds:C(I.KeybindActions.UNREAD_PREV,I.KeybindActions.UNREAD_NEXT)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_UNREAD_MENTION_CHANNELS,binds:C(I.KeybindActions.MENTION_CHANNEL_PREV,I.KeybindActions.MENTION_CHANNEL_NEXT),groupEnd:!0},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_PREVIOUS_GUILD,binds:C(I.KeybindActions.TOGGLE_PREVIOUS_GUILD)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_SERVER_READ,binds:C(I.KeybindActions.MARK_SERVER_READ)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_CHANNEL_READ,binds:C(I.KeybindActions.MARK_CHANNEL_READ)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_SEARCH_EMOJIS,binds:C(I.KeybindActions.SEARCH_EMOJIS),groupEnd:!0},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_MUTE,binds:C(I.KeybindActions.TOGGLE_MUTE)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_DEAFEN,binds:C(I.KeybindActions.TOGGLE_DEAFEN)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_ACCEPT,binds:C(I.KeybindActions.CALL_ACCEPT)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_DECLINE,binds:C(I.KeybindActions.MARK_CHANNEL_READ)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_START,binds:C(I.KeybindActions.CALL_START),groupEnd:!0},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_SCROLL_CHAT,binds:C(I.KeybindActions.SCROLL_UP,I.KeybindActions.SCROLL_DOWN)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_JUMP_TO_FIRST_UNREAD,binds:C(I.KeybindActions.JUMP_TO_FIRST_UNREAD)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_FOCUS_TEXT_AREA,binds:C(I.KeybindActions.TEXTAREA_FOCUS)},{description:T.default.Messages.KEYBIND_DESCRIPTION_MODAL_QUICKSWITCHER,binds:C(I.KeybindActions.QUICKSWITCHER_SHOW)}]},t.default=t.OVERLAY_LOCKED_LAYOUT=t.OVERLAY_LAYOUT=void 0;var r,a,o,i=n(9002),l=n(9003),u=n(1322),s=n(9006),d=n(9007),f=n(9008),c=n(10244),p=n(9009),v=n(9010),y=n(9011),m=n(9012),_=n(9013),h=n(9014),E=n(9015),g=n(9016),S=n(1298),O=n(9017),I=n(1),T=(r=n(6))&&r.__esModule?r:{default:r};function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e){var t=b[e];if(null==t)throw new Error("getBindsFor(...): No bind for "+t);return t.binds[0]}))}var b=((a={})[I.KeybindActions.SERVER_NEXT]=m.SERVER_NEXT,a[I.KeybindActions.SERVER_PREV]=m.SERVER_PREV,a[I.KeybindActions.CHANNEL_NEXT]=l.CHANNEL_NEXT,a[I.KeybindActions.CHANNEL_PREV]=l.CHANNEL_PREV,a[I.KeybindActions.NAVIGATE_BACK]=l.NAVIGATE_BACK,a[I.KeybindActions.NAVIGATE_FORWARD]=l.NAVIGATE_FORWARD,a[I.KeybindActions.UNREAD_NEXT]=O.UNREAD_NEXT,a[I.KeybindActions.UNREAD_PREV]=O.UNREAD_PREV,a[I.KeybindActions.MENTION_CHANNEL_NEXT]=O.MENTION_NEXT,a[I.KeybindActions.MENTION_CHANNEL_PREV]=O.MENTION_PREV,a[I.KeybindActions.TOGGLE_PREVIOUS_GUILD]=l.TOGGLE_PREVIOUS_GUILD,a[I.KeybindActions.JUMP_TO_GUILD]=u.JUMP_TO_GUILD,a[I.KeybindActions.SUBMIT]=_.SUBMIT,a[I.KeybindActions.TEXTAREA_FOCUS]=h.TEXTAREA_FOCUS,a[I.KeybindActions.MARK_CHANNEL_READ]=s.MARK_CHANNEL_READ,a[I.KeybindActions.MARK_SERVER_READ]=d.MARK_SERVER_READ,a[I.KeybindActions.TOGGLE_MUTE]=E.TOGGLE_MUTE,a[I.KeybindActions.TOGGLE_DEAFEN]=E.TOGGLE_DEAFEN,a[I.KeybindActions.TOGGLE_CATEGORY_COLLAPSED]=g.TOGGLE_CATEGORY_COLLAPSED,a[I.KeybindActions.SCROLL_UP]=v.SCROLL_UP,a[I.KeybindActions.SCROLL_DOWN]=v.SCROLL_DOWN,a[I.KeybindActions.SEARCH_EMOJIS]=y.SEARCH_EMOJIS,a[I.KeybindActions.TOGGLE_HOTKEYS]=S.TOGGLE_HOTKEYS,a[I.KeybindActions.JUMP_TO_FIRST_UNREAD]=f.JUMP_TO_FIRST_UNREAD,a[I.KeybindActions.RETURN_TO_AUDIO_CHANNEL]=p.RETURN_TO_AUDIO_CHANNEL,a[I.KeybindActions.CALL_ACCEPT]=i.CALL_ACCEPT,a[I.KeybindActions.CALL_START]=i.CALL_START,a[I.KeybindActions.QUICKSWITCHER_SHOW]=c.QUICKSWITCHER_SHOW,a);t.OVERLAY_LAYOUT=b;var M=((o={})[I.KeybindActions.QUICKSWITCHER_SHOW]=c.QUICKSWITCHER_SHOW,o);t.OVERLAY_LOCKED_LAYOUT=M;var N=b;t.default=N},,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=f(n(2)),o=f(n(9262)),i=f(n(218)),l=f(n(216)),u=n(41),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y="ActivityInviteManager",m=function(){a.default.dirtyDispatch({type:s.ActionTypes.ACTIVITY_INVITE_MODAL_CLOSE})},_=new(function(e){var t,n;function l(){return e.apply(this,arguments)||this}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var f=l.prototype;return f._initialize=function(){a.default.subscribe(s.ActionTypes.ACTIVITY_INVITE_MODAL_OPEN,this.handleModalOpen),a.default.subscribe(s.ActionTypes.ACTIVITY_INVITE_MODAL_CLOSE,this.handleModalClose)},f._terminate=function(){a.default.unsubscribe(s.ActionTypes.ACTIVITY_INVITE_MODAL_OPEN,this.handleModalOpen),a.default.unsubscribe(s.ActionTypes.ACTIVITY_INVITE_MODAL_CLOSE,this.handleModalClose)},f.handleModalOpen=function(e){var t=e.activity;e.isPrivate?(0,u.openModal)((function(e){return r.createElement(i.default,p({title:d.default.Messages.ACTIVITY_INVITE_MODAL_HEADER.format({name:t.name}),body:d.default.Messages.ACTIVITY_INVITE_PRIVATE,confirmText:d.default.Messages.OKAY},e))}),{onCloseCallback:m,modalKey:y}):(0,u.openModal)((function(e){return r.createElement(o.default,e)}),{onCloseCallback:m,modalKey:y})},f.handleModalClose=function(e){(0,u.closeModal)(y)},l}(l.default));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(9)),i=n(3),l=n(8787),u=b(n(8297)),s=n(714),d=n(5937),f=b(n(8489)),c=b(n(180)),p=b(n(9263)),v=b(n(29)),y=b(n(159)),m=b(n(8307)),_=b(n(8374)),h=b(n(8490)),E=n(35),g=b(n(279)),S=n(121),O=n(1),I=b(n(6)),T=b(n(7412)),C=b(n(370));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P=function(e){var t=e.channel,n=e.categoryName,r=e.guildName,a=m.default;return(0,f.default)(t)?a=_.default:t.isNSFW()&&(a=h.default),A("div",{className:T.default.result},void 0,A(a,{className:T.default.resultIcon,background:T.default.resultIconBackground,width:16,height:16}),A("div",{className:T.default.resultText},void 0,A("span",{},void 0,t.name),A("span",{className:T.default.resultCategoryName},void 0,n)),A("div",{className:T.default.resultGuildName},void 0,r))};P.displayName="ResultTextChannel";var R=function(e){var t=e.channel,n=(0,c.default)(t);return A("div",{className:T.default.result},void 0,A(g.default,{src:(0,d.getChannelIconURL)(t),"aria-label":null!=n?n:"",className:T.default.resultAvatar,size:g.default.Sizes.SIZE_32}),A("div",{className:T.default.resultText},void 0,n))};R.displayName="ResultGroupDM";var L=function(e){var t,n=e.user,r=e.comparator,a=e.status;if(null!=r&&r===n.tag){var o=r.split("#");o.pop(),t=o.join("#")}else t=r||n.username;return A("div",{className:T.default.result},void 0,A(g.default,{src:n.getAvatarURL(void 0),"aria-label":n.username,className:T.default.resultAvatar,size:g.default.Sizes.SIZE_32,status:a}),A("div",{className:T.default.resultText},void 0,A("span",{},void 0,t),A("span",{className:T.default.resultUsername},void 0,n.tag)))};L.displayName="ResultUser";var D=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props;(0,e.onInvite)(e.row)},t.handleMouseEnter=function(){var e=t.props;(0,e.onMouseEnter)(e.row)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n),r.prototype.render=function(){var e,t,n,r=this.props,a=r.result,i=r.selected,l=r.sending;switch(a.type){case s.AutocompleterResultTypes.GROUP_DM:t=A(R,{channel:a.data.record});break;case s.AutocompleterResultTypes.TEXT_CHANNEL:var u=a.categoryName,d=a.guildName;t=A(P,{channel:a.data.record,categoryName:u,guildName:d});break;case s.AutocompleterResultTypes.USER:var f=a.data,c=f.comparator,p=f.record,y=a.status;t=A(L,{comparator:c,user:p,status:y})}return n=a.sent?A(v.default,{className:T.default.inviteButton,look:v.default.Looks.LINK,size:v.default.Sizes.SMALL,disabled:!0,color:v.default.Colors.GREY},void 0,I.default.Messages.ACTIVITY_INVITE_MODAL_SENT):A(v.default,{color:v.default.Colors.GREEN,look:i?v.default.Looks.FILLED:v.default.Looks.OUTLINED,className:T.default.inviteButton,size:v.default.Sizes.SMALL,submitting:l,onClick:this.handleClick},void 0,I.default.Messages.ACTIVITY_INVITE_MODAL_INVITE),A("div",{className:(0,o.default)(T.default.resultWrapper,(e={},e[T.default.resultWrapperSelected]=i,e)),onMouseEnter:this.handleMouseEnter},void 0,t,n)},r}(a.Component);function w(e){var t=e.transitionState,n=e.onClose,r=e.renderFooter,o=(0,i.useStateFromStoresObject)([p.default],(function(){return{results:p.default.getResults(),query:p.default.getQuery(),activity:p.default.getActivity()}}),[]),d=o.results,f=o.query,c=o.activity,v=a.useState(f),m=v[0],_=v[1],h=a.useState(0),g=h[0],b=h[1],M=a.useState([]),N=M[0],P=M[1],R=a.useRef(null),L=a.useCallback((function(){var e;null===(e=R.current)||void 0===e||e.scrollPageUp({animate:!0})}),[R]),w=a.useCallback((function(){var e;null===(e=R.current)||void 0===e||e.scrollPageDown({animate:!0})}),[R]);a.useEffect((function(){return S.ComponentDispatch.subscribe(O.ComponentActions.SCROLL_PAGE_UP,L),function(){S.ComponentDispatch.unsubscribe(O.ComponentActions.SCROLL_PAGE_UP,L)}}),[L]),a.useEffect((function(){return S.ComponentDispatch.subscribe(O.ComponentActions.SCROLL_PAGE_DOWN,w),function(){S.ComponentDispatch.unsubscribe(O.ComponentActions.SCROLL_PAGE_DOWN,w)}}),[w]),a.useEffect((function(){c||n()}),[n,c]);var j=a.useCallback((function(e){var t=d[e],n=t.data,r=t.data.record.id;if(null!=r&&!N.includes(r))switch(P([].concat(N,[r])),n.type){case s.AutocompleterResultTypes.GROUP_DM:case s.AutocompleterResultTypes.TEXT_CHANNEL:(0,l.inviteChannel)(n.record.id);break;case s.AutocompleterResultTypes.USER:(0,l.inviteUser)(n.record.id)}}),[d,N]),k=a.useCallback((function(e){b(e)}),[b]),U=function(){b(0),_(""),(0,l.updateQuery)(m)};return c?A(E.ModalRoot,{transitionState:t,size:E.ModalSize.SMALL,"aria-label":I.default.Messages.ACTIVITY_INVITE_MODAL_HEADER.format({name:c.name})},void 0,A(E.ModalHeader,{},void 0,A(E.ModalCloseButton,{className:T.default.closeButton,onClick:n}),A("div",{className:T.default.header},void 0,A(y.default,{tag:y.default.Tags.H2,className:C.default.marginBottom8},void 0,I.default.Messages.ACTIVITY_INVITE_MODAL_HEADER.format({name:c.name})),A(u.default,{size:u.default.Sizes.MEDIUM,query:m,selectedSection:0,selectedRow:g,sections:[d.length],className:C.default.marginTop4,onSelect:function(e,t){null==t?U():j(t)},onSelectionChange:function(e,t){var n;b(t),null===(n=R.current)||void 0===n||n.scrollIntoViewRect({start:44*t,end:44*t+44})},onQueryChange:function(e){b(0),_(e),(0,l.updateQuery)(e)},placeholder:I.default.Messages.ACTIVITY_INVITE_MODAL_SEARCH_PLACEHOLDER,autoFocus:!0,onClear:U}))),A(E.ModalContent,{},void 0,0===d.length?A("div",{className:T.default.noResults}):A(E.ModalListContent,{scrollerRef:R,className:T.default.results,paddingBottom:14,sections:[d.length],sectionHeight:0,renderSection:O.NOOP_NULL,rowHeight:function(e,t){return e>0?0:d[t]?44:0},renderRow:function(e){var t=e.section,n=e.row;if(t>0)return null;var r=d[n];return null==r?null:A(D,{row:n,result:r,sending:null!=r.data.record.id&&N.includes(r.data.record.id),selected:n===g,onMouseEnter:k,onInvite:j},r.data.record.id)}}),r&&r())):null}D.displayName="Result",w.displayName="ActivityInviteModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_(n(3)),a=_(n(2)),o=_(n(1234)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(714)),l=n(180),u=_(n(10)),s=_(n(15)),d=_(n(1255)),f=_(n(256)),c=_(n(70)),p=_(n(12)),v=_(n(699)),y=n(1);function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(){return(E=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}).apply(this,arguments)}var g,S=[i.AutocompleterResultTypes.TEXT_CHANNEL,i.AutocompleterResultTypes.GROUP_DM,i.AutocompleterResultTypes.USER],O=null,I=null,T=[],C=[];function b(e){T=[].concat(T,[e]),C=C.map((function(e){return E({},e,{sent:T.includes(e.data.record.id)})})),P.emitChange()}function M(e,t){C=(""===t.trim()?function(){var e=[];return v.default.getPrivateChannelIds().forEach((function(t){var n=u.default.getChannel(t);if(null!=n)if(n.type===y.ChannelTypes.DM){var r=n.getRecipientId(),a=null!=r?p.default.getUser(r):null;null!=a&&e.push({type:i.AutocompleterResultTypes.USER,record:a,score:0})}else n.isMultiUserDM()&&e.push({type:i.AutocompleterResultTypes.GROUP_DM,record:n,score:0})})),e}():e).map((function(e){switch(e.type){case i.AutocompleterResultTypes.USER:var t=e.record;return{type:i.AutocompleterResultTypes.USER,sent:T.includes(t.id),status:f.default.getStatus(t.id),data:e};case i.AutocompleterResultTypes.TEXT_CHANNEL:var n=e.record,r=u.default.getChannel(n.parent_id),a=s.default.getGuild(n.guild_id);return{type:i.AutocompleterResultTypes.TEXT_CHANNEL,sent:T.includes(n.id),categoryName:null!=r?(0,l.computeChannelName)(r,p.default,c.default):"",guildName:null!=a?a.toString():"",data:e};case i.AutocompleterResultTypes.GROUP_DM:var o=e.record;return{type:i.AutocompleterResultTypes.GROUP_DM,sent:T.includes(o.id),data:e};default:throw new Error("Unknown Result Type: "+e.type)}})),P.emitChange()}function N(){O=null,null!=g&&(g.destroy(),g=null),null!=I&&I()}function A(){var e=null!=O&&null!=O.application_id?d.default.getApplicationActivity(O.application_id):null;if(null!=O&&(null==e||null==e.party||null==e.party.id))return N()}var P=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(d.default)},a.getActivity=function(){return O},a.getQuery=function(){var e;return(null===(e=g)||void 0===e?void 0:e.query)||""},a.getResults=function(){return C},r}(r.default.Store))(a.default,{ACTIVITY_INVITE_MODAL_OPEN:function(e){O=e.activity,I=e.resolve,T=[],null==g&&(g=new i.default((function(e,t){return M(e,t)}),S,100)),g.search("")},ACTIVITY_INVITE_MODAL_QUERY:function(e){var t=e.query;null!=g&&g.search(t)},ACTIVITY_INVITE_MODAL_SEND:function(e){if(null!=O){var t=e.channelId,n=e.userId;null!=t?o.default.sendActivityInvite({channelId:t,type:y.ActivityActionTypes.JOIN,activity:O,location:"Channel Text Area - Invite to Join Modal"}).then((function(){return b(t)})):null!=n&&o.default.sendActivityInviteUser({userId:n,type:y.ActivityActionTypes.JOIN,activity:O,location:"Channel Text Area - Invite to Join Modal"}).then((function(){return b(n)}))}},ACTIVITY_INVITE_MODAL_CLOSE:function(e){return N()},OVERLAY_SET_INPUT_LOCKED:function(e){return!(!e.locked||null==O)&&(N(),!0)},LOCAL_ACTIVITY_UPDATE:function(e){return A()},RPC_APP_DISCONNECTED:function(e){return A()}}),R=P;t.default=R},function(e,t,n){e.exports=n.p+"c83861b2303b7ee40c419e9590d57f11.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(95),o=n(275),i=(r=n(482))&&r.__esModule?r:{default:r},l=n(1);function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}function d(){return(d=s(regeneratorRuntime.mark((function e(t,n,r,u){var s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.default.post({url:l.Endpoints.GUILDS,body:{name:t,icon:n,channels:r.channels,system_channel_id:r.system_channel_id,roles:r.roles,guild_template_code:r.code},trackedActionData:{event:a.NetworkActionNames.GUILD_CREATE,metadata:{template_name:r.id,is_community_intent:u}}});case 3:return s=e.sent,e.abrupt("return",s.body);case 7:throw e.prev=7,e.t0=e.catch(0),new o.APIError(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}var f={createGuildFromTemplate:function(e,t,n,r){return d.apply(this,arguments)}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2020-09_guild_template_reorder",label:"Reorder guild templates for school use cases",defaultConfig:{reorderTemplates:!1},treatments:[{id:1,label:"Reorder templates to prioritize school-related templates",config:{reorderTemplates:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GUILD_TEMPLATE_ICONS=void 0;var r=d(n(8718)),a=d(n(9091)),o=d(n(9092)),i=d(n(9093)),l=d(n(9094)),u=d(n(8719)),s=d(n(9095));function d(e){return e&&e.__esModule?e:{default:e}}var f={CREATE:o.default,GAMING:l.default,FRIENDS:i.default,STUDY:s.default,CLUBS:a.default,CREATORS:r.default,LOCAL_COMMUNITY:u.default,SCHOOL_CLUB:a.default};t.GUILD_TEMPLATE_ICONS=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(9)),i=S(n(1211)),l=S(n(195)),u=S(n(29)),s=S(n(61)),d=S(n(55)),f=S(n(153)),c=n(85),p=n(131),v=n(35),y=S(n(47)),m=S(n(24)),_=n(8491),h=n(1),E=S(n(6)),g=S(n(7421));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var T,C,b=(T=window.GLOBAL_ENV.INVITE_HOST,C="",null==T&&(T=location.host,C=h.Routes.INVITE("")),location.protocol+"//"+T+C+"/"),M=["hTKzmak",b+"hTKzmak",b+"cool-people"];function N(e){var t,n=e.onBack,r=e.onClose,h=e.isSlideReady,S=(0,c.useUID)(),O=a.useState(""),T=O[0],C=O[1],N=a.useState(!1),A=N[0],P=N[1],R=a.useState(null),L=R[0],D=R[1],w=a.useRef(null);a.useEffect((function(){var e;h&&(null===(e=w.current)||void 0===e||e.focus())}),[h]);var j=function(e){e.preventDefault();var t=T.trim();if(""!==t){D(null),P(!0);var n=t.split("/"),a=n[n.length-1];i.default.resolveInvite(a,"Join Guild",{inputValue:t}).then((function(e){var t=e.invite;if(P(!1),null!=t){if(null!=t.channel){var n=i.default.getInviteContext("Join Guild",t);i.default.acceptInvite(t.code,n,(function(e){r(),i.default.transitionToInvite(e)})).catch((function(e){if(e instanceof l.default){var t=(0,_.getInviteError)(e.code);D(t)}else D(E.default.Messages.INVITE_MODAL_ERROR_DEFAULT)}))}}else D(E.default.Messages.INSTANT_INVITE_EXPIRED)}),(function(e){P(!1);var t=new l.default(e),n=(0,_.getInviteError)(t.code);D(n)}))}else D(E.default.Messages.INVALID_INVITE_LINK_ERROR)};return I("div",{},void 0,I(v.ModalHeader,{className:g.default.header,direction:d.default.Direction.VERTICAL,separator:!1,id:S},void 0,I(y.default,{className:g.default.title,size:y.default.Sizes.SIZE_24},void 0,E.default.Messages.JOIN_SERVER_TITLE),I(m.default,{color:m.default.Colors.HEADER_SECONDARY},void 0,E.default.Messages.JOIN_SERVER_DESCRIPTION_NUF),I(v.ModalCloseButton,{className:g.default.closeButton,onClick:r})),I(v.ModalContent,{className:g.default.content},void 0,I("form",{onSubmit:j,className:g.default.inputForm},void 0,I(p.FormItem,{title:E.default.Messages.FORM_LABEL_INVITE_LINK,error:L,titleClassName:(0,o.default)(g.default.formTitle,(t={},t[g.default.error]=null!=L,t)),required:!0},void 0,I(f.default,{value:T,onChange:C,className:g.default.input,inputClassName:g.default.inputInner,placeholder:b+"hTKzmak",inputRef:w}))),I(p.FormItem,{title:E.default.Messages.JOIN_SERVER_INVITE_EXAMPLES_HEADER,titleClassName:g.default.formTitle,className:g.default.examplesForm},void 0,M.map((function(e){return I(s.default,{className:g.default.sampleLink,onClick:function(){return C(e)}},e,e)})))),I(v.ModalFooter,{className:g.default.footer},void 0,I(u.default,{color:u.default.Colors.BRAND,submitting:A,onClick:j},void 0,E.default.Messages.NUF_JOIN_SERVER_BUTTON),I(u.default,{color:u.default.Colors.PRIMARY,look:u.default.Looks.LINK,size:u.default.Sizes.MIN,onClick:n},void 0,E.default.Messages.BACK)))}N.displayName="JoinGuildSlide"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=C(n(8)),l=C(n(1296)),u=C(n(8551)),s=C(n(1259)),d=C(n(29)),f=C(n(9096)),c=C(n(61)),p=C(n(55)),v=C(n(8272)),y=n(85),m=n(131),_=C(n(1336)),h=n(35),E=C(n(24)),g=C(n(93)),S=n(9097),O=n(8795),I=C(n(6)),T=C(n(7396));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=[{className:T.default.emojiSad,rating:O.FeedbackRating.BAD},{className:T.default.emojiNeutral,rating:O.FeedbackRating.NEUTRAL},{className:T.default.emojiHappy,rating:O.FeedbackRating.GOOD}];function A(e){var t=e.selectedRating,n=e.onChangeRating;return M(p.default,{justify:p.default.Justify.BETWEEN,align:p.default.Align.CENTER,className:T.default.emojis},void 0,N.map((function(e){var r=e.rating,a=e.className;return M(c.default,{onClick:function(){return n(r)},"aria-label":r},r,M("div",{className:(0,o.default)(a,t===r?T.default.selected:null)}))})))}function P(){return M(E.default,{className:T.default.helpdeskLink,size:E.default.Sizes.SIZE_12,color:E.default.Colors.MUTED},void 0,I.default.Messages.FEEDBACK_NEED_MORE_HELP.format({helpdeskURL:g.default.getSubmitRequestURL()}))}A.displayName="RatingsSelector",P.displayName="HelpdeskLink";var R=M(u.default,{}),L=M(P,{});function D(e){var t=e.header,n=e.body,r=e.problemTitle,o=e.problems,u=e.transitionState,c=e.feedbackProblems,g=void 0===c?[]:c,C=e.otherKey,b=e.onSubmit,N=e.onClose,P=(0,s.default)(o),D=a.useState(!1),w=D[0],j=D[1],k=a.useState(null),U=k[0],G=k[1],F=a.useState(null),B=F[0],H=F[1],x=a.useState(i.default.shuffle(o)),V=x[0],W=x[1],Y=a.useState(""),z=Y[0],K=Y[1],$=(0,y.useUID)(),Z=(0,_.default)(U),q=(0,_.default)(w),X=(0,_.default)(B),J=(0,_.default)(b),Q=(0,_.default)(z),ee=null!=B&&g.includes(B);return a.useEffect((function(){i.default.isEqual(P,o)||W((0,S.shuffleProblems)(o,C))}),[o,P,C]),a.useEffect((function(){return function(){J.current({rating:Z.current,problem:X.current,dontShowAgain:q.current,feedback:Q.current})}}),[]),M(h.ModalRoot,{transitionState:u,className:T.default.modalRoot,"aria-labelledby":$},void 0,R,M(h.ModalHeader,{separator:!1,className:T.default.headerContainer},void 0,M(E.default,{id:$,className:T.default.header,color:E.default.Colors.CUSTOM,size:E.default.Sizes.SIZE_24},void 0,t),M(E.default,{size:E.default.Sizes.SIZE_16,color:E.default.Colors.CUSTOM,className:T.default.ratingBody},void 0,n),ee?null:M(A,{selectedRating:U,onChangeRating:function(e){G(e),e===O.FeedbackRating.GOOD&&N()}})),M(h.ModalContent,{className:T.default.content},void 0,null==U||U===O.FeedbackRating.GOOD||ee?null:M(m.FormItem,{title:r,className:T.default.problemInfo},void 0,M(f.default,{options:V,onClick:function(e){var t=e.value;H(t),g.includes(t)||N()}})),ee?M(m.FormItem,{title:I.default.Messages.FEEDBACK_DESCRIBE_ISSUE,className:T.default.problemInfo},void 0,M(v.default,{value:z,maxLength:O.FEEDBACK_FREEFORM_LENGTH,onChange:K}),L):null),M(h.ModalFooter,{className:T.default.footer,direction:p.default.Direction.HORIZONTAL},void 0,ee?a.createElement(a.Fragment,null,M(d.default,{size:d.default.Sizes.SMALL,look:d.default.Looks.LINK,color:d.default.Colors.PRIMARY,onClick:function(){H(null),K("")}},void 0,I.default.Messages.BACK),M(d.default,{size:d.default.Sizes.SMALL,onClick:N},void 0,I.default.Messages.SUBMIT)):M(l.default,{checked:w,onChange:function(){return j(!w)}},void 0,M(E.default,{},void 0,I.default.Messages.DONT_SHOW_AGAIN))))}D.displayName="FeedbackModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(8)),l=y(n(8721)),u=y(n(29)),s=y(n(47)),d=y(n(24)),f=n(8494),c=y(n(9271)),p=y(n(6)),v=y(n(7425));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(e){var t=e.setStep,n=e.email,r=e.onClose;a.useEffect((function(){return c.default.initialize(r),function(){c.default.terminate()}}),[r]);var y=i.default.throttle((function(){l.default.sendVerificationEmail(n)}),1e3);return _("div",{className:v.default.container},void 0,_("div",{className:v.default.topImage}),_(s.default,{className:(0,o.default)(v.default.centerText,v.default.header),size:d.default.Sizes.SIZE_24},void 0,p.default.Messages.HUB_EMAIL_CONFIRMATION_HEADER.format({email:n})),_("div",{className:v.default.descriptionWidth},void 0,_(d.default,{className:v.default.centerText,size:d.default.Sizes.SIZE_14,color:d.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.HUB_EMAIL_CONFIRMATION_DESCRIPTION)),_(u.default,{onClick:y,look:u.default.Looks.LINK,size:u.default.Sizes.SMALL,color:u.default.Colors.LINK},void 0,p.default.Messages.HUB_EMAIL_CONFIRMATION_RESEND),_(u.default,{look:u.default.Looks.LINK,size:u.default.Sizes.SMALL,color:u.default.Colors.LINK,onClick:function(){t(f.HubEmailConnectionSteps.VERIFY_EMAIL)},className:v.default.resendLink},void 0,p.default.Messages.HUB_EMAIL_CONFIRMATION_DIFFERENT_EMAIL))};h.displayName="HubEmailConnectionConfirmation";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(216)),o=n(42),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=new(function(e){var t,n;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleGuildCreate=function(e){var n,r,a,l=e.guild;null!=l&&(null===(n=l.features)||void 0===n?void 0:n.includes(i.GuildFeatures.HUB))&&(null===(r=(a=t).onClose)||void 0===r||r.call(a),(0,o.transitionTo)(i.Routes.CHANNEL(l.id)))},t}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var l=a.prototype;return l._initialize=function(e){this.onClose=e,r.default.subscribe(i.ActionTypes.GUILD_CREATE,this.handleGuildCreate)},l._terminate=function(){r.default.unsubscribe(i.ActionTypes.GUILD_CREATE,this.handleGuildCreate)},a}(a.default));t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=m(n(8721)),l=n(275),u=m(n(29)),s=m(n(153)),d=n(131),f=m(n(47)),c=m(n(24)),p=n(8494),v=m(n(6)),y=m(n(7362));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var g=function(e){var t=e.setStep,n=e.email,r=e.setEmail,m=e.invite,_=a.useState(null),g=_[0],S=_[1],O=function(){var e,r=(e=regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.preventDefault(),S(null),e.prev=2,e.next=5,i.default.sendVerificationEmail(n);case 5:if(!e.sent.has_matching_guild){e.next=11;break}t(p.HubEmailConnectionSteps.EMAIL_CONFIRMATION),e.next=15;break;case 11:return e.next=13,i.default.signup(n);case 13:e.sent&&t(p.HubEmailConnectionSteps.EMAIL_WAITLIST);case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(2),S(new l.APIError(e.t0));case 20:case"end":return e.stop()}}),e,null,[[2,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){E(o,r,a,i,l,"next",e)}function l(e){E(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return r.apply(this,arguments)}}(),I=v.default.Messages.HUB_EMAIL_CONNECTION_CONTENT_HEADER;if(null!=(null==m?void 0:m.guild)){var T=m.guild.name;I=v.default.Messages.HUB_EMAIL_CONNECTION_INVITE_HEADER.format({guildName:T,count:m.approximate_member_count||0})}return h("div",{className:y.default.container},void 0,h("div",{className:y.default.topImage}),h(f.default,{className:(0,o.default)(y.default.centerText,y.default.header),size:c.default.Sizes.SIZE_24},void 0,I),h("div",{className:y.default.descriptionWidth},void 0,h(c.default,{className:y.default.centerText,size:c.default.Sizes.SIZE_14,color:c.default.Colors.HEADER_SECONDARY},void 0,v.default.Messages.HUB_EMAIL_CONNECTION_CONTENT_DESCRIPTION)),h("form",{className:y.default.formContent,onSubmit:O},void 0,h(d.FormItem,{title:v.default.Messages.HUB_EMAIL_CONNECTION_CONTENT_INPUT_HEADER},void 0,h(s.default,{placeholder:v.default.Messages.HUB_EMAIL_CONNECTION_CONTENT_INPUT_PLACEHOLDER,onChange:function(e){r(e)},error:null==g?void 0:g.getAnyErrorMessage()})),h(c.default,{color:c.default.Colors.HEADER_SECONDARY,className:y.default.formDescription,size:c.default.Sizes.SIZE_14},void 0,v.default.Messages.HUB_EMAIL_CONNECTION_CONTENT_INPUT_DESCRIPTION),h(u.default,{type:"submit",size:u.default.Sizes.LARGE,color:u.default.Colors.BRAND,className:y.default.submitButton},void 0,h(c.default,{className:y.default.submitText,size:c.default.Sizes.SIZE_14},void 0,v.default.Messages.HUB_EMAIL_CONNECTION_CONTENT_BUTTON))))};g.displayName="HubEmailConnectionContent";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(29)),i=f(n(47)),l=f(n(24)),u=n(8494),s=f(n(6)),d=f(n(7362));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t=e.setStep;return p("div",{className:d.default.container},void 0,p("div",{className:d.default.topImage}),p(i.default,{className:(0,a.default)(d.default.centerText,d.default.header),size:l.default.Sizes.SIZE_24},void 0,s.default.Messages.HUB_WAITLIST_MODAL_JOINED_HEADER),p(o.default,{look:o.default.Looks.LINK,size:o.default.Sizes.SMALL,color:o.default.Colors.LINK,onClick:function(){t(u.HubEmailConnectionSteps.VERIFY_EMAIL)},className:d.default.resendLink},void 0,s.default.Messages.HUB_EMAIL_CONFIRMATION_DIFFERENT_EMAIL))};v.displayName="HubEmailConnectionWaitlist";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(54),a=_(n(2)),o=_(n(154)),i=_(n(390)),l=n(1362),u=_(n(762)),s=_(n(10)),d=_(n(709)),f=_(n(715)),c=_(n(15)),p=_(n(36)),v=_(n(1263)),y=n(1),m=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function h(e){var t=e.guildId,n=e.channelId,r=e.messageId,a=e.forceFetch,o=e.isPreload,p=e.jumpType;if(null!=n){var v=s.default.getChannel(n);if(null==v||v.type!==y.ChannelTypes.GUILD_STORE){var m=u.default.getOrCreate(n);m.jumpTargetId&&null==r&&(m=m.mutate({jumpTargetId:null,jumped:!1,jumpType:l.JumpTypes.ANIMATED}),u.default.commit(m));var _=a;if(!o||d.default.isConnected()||m.loadingMore)if(!d.default.isConnectedOrOverlay()||m.loadingMore||m.ready&&!m.cached){if(d.default.isConnectedOrOverlay()&&r)_=!0;else if(!_&&f.default.isAtBottom(n))return void u.default.commit(m.truncateTop(y.MAX_MESSAGES_PER_CHANNEL))}else(null==t||c.default.getGuild(t))&&(_=!0,u.default.commit(m.mutate({loadingMore:!0})));else _=!0,u.default.commit(m.mutate({loadingMore:!0}));_&&(o=o&&!d.default.isConnected(),r?i.default.jumpToMessage({channelId:n,messageId:r,flash:!0,isPreload:o,jumpType:p}):i.default.fetchMessages({channelId:n,limit:y.MAX_MESSAGES_PER_CHANNEL,isPreload:o}))}}}function E(){var e=p.default.getChannelId();if(null!=e){var t=s.default.getChannel(e);if(null!=t){var n,a=(0,r.matchPath)(location.pathname,{path:y.Routes.CHANNEL(":guild",":channel",":message"),exact:!0});h({guildId:t.getGuildId(),channelId:t.id,messageId:null==a||null===(n=a.params)||void 0===n?void 0:n.message})}}}function g(e){e.guild}function S(e){h({guildId:e.guildId,channelId:e.channelId,messageId:e.messageId,jumpType:e.jumpType})}function O(e){var t=e.guildId,n=e.channelId;e.context===y.CURRENT_APP_CONTEXT&&h({guildId:t,channelId:n})}function I(e){var t=e.channel,n=t.guild_id;null!=n&&p.default.getChannelId(n)===t.id&&h({guildId:n,channelId:t.id})}function T(e){var t=e.channelId;i.default.fetchMessages({channelId:t,limit:y.MAX_MESSAGES_PER_CHANNEL})}function C(e){var t=e.response;if(null==t||null==t.body)return null;if(t.body.code===y.AbortCodes.CHANNEL_FOLLOWING_EDIT_RATE_LIMITED){var n=t.body.retry_after;null!=n&&o.default.show({title:m.default.Messages.RATE_LIMITED,body:m.default.Messages.ANNOUNCEMENT_EDIT_RATE_LIMIT.format({retryAfterMinutes:Math.ceil(n/60)})})}}var b={};function M(e){var t=e.channelId,n=e.jump,r=e.isStale,a=b[t]||0;Date.now()-a<1e4||(b[t]=Date.now(),r&&d.default.isConnected()&&i.default.fetchMessages({channelId:t,limit:y.MAX_MESSAGES_PER_CHANNEL,jump:n}))}function N(e){var t=e.channelId,n=e.messageRecord;if(null!=n){var r=(0,v.default)(t,n.content,!0);r.id=n.id,r.nonce=n.nonce,a.default.dispatch({type:y.ActionTypes.MESSAGE_CREATE,channelId:t,message:r,isPushNotification:!1,optimistic:!0}),a.default.dispatch({type:y.ActionTypes.MESSAGE_SEND_FAILED,channelId:t,messageId:r.id})}}var A={fetchMessages:h,init:function(){a.default.subscribe(y.ActionTypes.CONNECTION_OPEN,E),a.default.subscribe(y.ActionTypes.OVERLAY_INITIALIZE,E),a.default.subscribe(y.ActionTypes.CHANNEL_SELECT,S),a.default.subscribe(y.ActionTypes.THREAD_CREATE,I),a.default.subscribe(y.ActionTypes.CHANNEL_CREATE,I),a.default.subscribe(y.ActionTypes.CHANNEL_PRELOAD,O),a.default.subscribe(y.ActionTypes.THREAD_CREATE_LOCAL,T),a.default.subscribe(y.ActionTypes.GUILD_CREATE,g),a.default.subscribe(y.ActionTypes.MESSAGE_END_EDIT,C),a.default.subscribe(y.ActionTypes.LOAD_MESSAGES_SUCCESS,M),a.default.subscribe(y.ActionTypes.UPLOAD_FAIL,N)}};t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageCustomEmoji=t.MessageStandardEmoji=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(5938)),i=p(n(9276)),l=p(n(61)),u=p(n(278)),s=p(n(149)),d=n(8591),f=n(8308),c=p(n(7440));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}var _=function(e){var t=e.node,n=e.tooltipPosition,r=void 0===n?f.EXPRESSION_TOOLTIP_PROPS.position:n;i.default.trackExposure({});var p=i.default.useExperiment({})[0].popoutEnabled,v=function(e){return a.createElement(o.default,m({},e,{emojiName:t.name,jumboable:t.jumboable,src:t.src,animated:!1}))};if(!p)return a.createElement(s.default,m({text:t.name},f.EXPRESSION_TOOLTIP_PROPS,{position:r}),(function(e){return v(e)}));return y(u.default,{animation:u.default.Animation.TRANSLATE,align:u.default.Align.CENTER,autoInvert:!0,nudgeAlignIntoViewport:!0,position:u.default.Positions.RIGHT,renderPopout:function(e){return a.createElement(d.MessageStandardEmojiPopout,m({},e,{node:t}))}},void 0,(function(e){var n=e.onClick;return a.createElement(s.default,m({text:(0,f.renderClickableTooltipNode)(t.name),"aria-label":t.name},f.EXPRESSION_TOOLTIP_PROPS,{position:r}),(function(e){return y(l.default,{tag:"span",className:c.default.emojiContainer,onClick:n},void 0,v(e))}))}))};t.MessageStandardEmoji=_,_.displayName="MessageStandardEmoji";var h=function(e){var t=e.node,n=e.isInteracting,r=e.tooltipPosition,p=void 0===r?f.EXPRESSION_TOOLTIP_PROPS.position:r;i.default.trackExposure({});var v=a.useState(String(Date.now())),_=v[0],h=v[1],E=i.default.useExperiment({})[0].popoutEnabled,g=function(e){return a.createElement(o.default,m({},e,{emojiName:t.name,jumboable:t.jumboable,emojiId:t.emojiId,animated:t.animated,isInteracting:n}))};if(!E)return a.createElement(s.default,m({text:t.name},f.EXPRESSION_TOOLTIP_PROPS,{position:p}),(function(e){return g(e)}));return y(u.default,{animation:u.default.Animation.TRANSLATE,align:u.default.Align.CENTER,autoInvert:!0,nudgeAlignIntoViewport:!0,position:u.default.Positions.RIGHT,renderPopout:function(e){return a.createElement(d.MessageCustomEmojiPopout,m({},e,{node:t,refreshPositionKey:function(){return h(String(Date.now()))}}))},positionKey:_},void 0,(function(e){var n=e.onClick;return a.createElement(s.default,m({text:(0,f.renderClickableTooltipNode)(t.name),"aria-label":t.name},f.EXPRESSION_TOOLTIP_PROPS,{position:p}),(function(e){return y(l.default,{tag:"span",className:c.default.emojiContainer,onClick:n},void 0,g(e))}))}))};t.MessageCustomEmoji=h,h.displayName="MessageCustomEmoji"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2020-06_emoji_upsell_popout",label:"Emoji Upsell Popout",defaultConfig:{popoutEnabled:!1},treatments:[{id:1,label:"Popout enabled",config:{popoutEnabled:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDiscoverableGuildType=void 0;var r,a=(r=n(162))&&r.__esModule?r:{default:r};t.isDiscoverableGuildType=function(e){return!(e instanceof a.default)&&null!=e.presenceCount}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(14))&&r.__esModule?r:{default:r},o=n(701),i=n(1);var l=function(e){return a.default.get({url:i.Endpoints.EMOJI_GUILD_DATA(e),oldFormErrors:!0}).then((function(e){return null!=(null==e?void 0:e.body)?(0,o.makeDiscoverableGuild)(e.body):null})).catch((function(){return null}))};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=c(n(161)),o=c(n(9280)),i=c(n(8337)),l=n(35),u=n(41),s=n(1239),d=c(n(6)),f=c(n(7432));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function c(){for(var t,n=arguments.length,i=new Array(n),c=0;c<n;c++)i[c]=arguments[c];return(t=e.call.apply(e,[this].concat(i))||this)._isListeningToWindow=!1,t.state={isWindowFocused:a.default.isFocused()},t.addWindowListeners=function(){t._isListeningToWindow=!0,a.default.addChangeListener(t.onChangeWindowStore),t.onChangeWindowStore()},t.removeWindowListeners=function(){t._isListeningToWindow=!1,a.default.removeChangeListener(t.onChangeWindowStore)},t.onChangeWindowStore=function(){var e=a.default.isFocused();e!==t.state.isWindowFocused&&t.setState({isWindowFocused:e})},t.onMouseEnter=function(e,n){var r=n.preloadImage,a=t.props,o=a.width,i=a.height;r((0,s.zoomFit)(o,i))},t.onZoom=function(e,n){var a=n.placeholder;e.preventDefault();var i=t.props,s=i.src,c={src:s,original:i.original||s,width:i.width,height:i.height,animated:i.animated,children:i.children,placeholder:a,renderLinkComponent:i.renderLinkComponent};e.currentTarget instanceof HTMLElement&&e.currentTarget.blur(),(0,u.openModal)((function(e){return r.createElement(l.ModalRoot,v({className:f.default.modal},e,{size:l.ModalSize.DYNAMIC,"aria-label":d.default.Messages.IMAGE}),r.createElement(o.default,v({},c,{className:f.default.image,shouldAnimate:t.state.isWindowFocused})))}))},t}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var p=c.prototype;return p.componentDidMount=function(){i.default.isAnimated(this.props)&&!this._isListeningToWindow&&this.addWindowListeners()},p.componentDidUpdate=function(){var e=i.default.isAnimated(this.props);e&&!this._isListeningToWindow?this.addWindowListeners():!e&&this._isListeningToWindow&&this.removeWindowListeners()},p.componentWillUnmount=function(){this._isListeningToWindow&&this.removeWindowListeners()},p.render=function(){return r.createElement(i.default,v({},this.props,{onZoom:this.onZoom,onMouseEnter:this.onMouseEnter,shouldAnimate:this.state.isWindowFocused}))},c}(r.PureComponent);t.default=m,m.displayName="LazyImageZoomable",m.defaultProps={alt:"",shouldLink:!0,autoPlay:!1,animated:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(1239),i=s(n(8337)),l=s(n(6)),u=s(n(7431));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.render=function(){var e=this.props,t=e.src,n=e.original,r=e.placeholder,s=e.width,d=e.height,p=e.animated,v=e.children,y=e.renderLinkComponent,m=(e.maxWidth,e.maxHeight,e.shouldAnimate,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["src","original","placeholder","width","height","animated","children","renderLinkComponent","maxWidth","maxHeight","shouldAnimate"])),_=(0,o.zoomFit)(s,d),h=_.width,E=_.height;return f("div",{className:u.default.wrapper},void 0,a.createElement(i.default,c({src:t,placeholder:r,shouldLink:!1,width:s,height:d,maxWidth:h,maxHeight:E,children:v,animated:p,autoPlay:!0},m)),null!=n&&y({href:n,target:"_blank",rel:"noreferrer noopener",className:u.default.downloadLink,children:l.default.Messages.OPEN_ORIGINAL_IMAGE}))},r}(a.PureComponent);t.default=v,v.displayName="ImageModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ImageReadyStates=void 0;var r,a=p(n(0)),o=f(n(9)),i=f(n(133)),l=n(1239),u=f(n(271)),s=p(n(151)),d=f(n(7430));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=(0,i.default)({LOADING:null,ERROR:null,READY:null});t.ImageReadyStates=_;var h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e,t=this.props,n=t.className,r=t.imageClassName,i=t.readyState,f=t.src,c=t.alt,p=t.width,m=t.height,h=t.maxWidth,E=void 0===h?p:h,g=t.maxHeight,S=void 0===g?m:g,O=t.minWidth,I=t.minHeight,T=t.accessory,C=t.zoomable,b=t.original,M=t.children,N=t.renderItem,A=t.renderAccessory,P=t.tabIndex,R=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["className","imageClassName","readyState","src","alt","width","height","maxWidth","maxHeight","minWidth","minHeight","accessory","zoomable","original","children","renderItem","renderAccessory","tabIndex"]);if(1===p&&1===m)return null;var L,D=(0,l.fit)(p,m,E,S,O,I),w={},j="div";null!=b&&(j=u.default,w.href=b,w.tabIndex=P),L=null!=f&&i===_.READY&&"function"==typeof M?null!=N?N():M({src:f,size:D,alt:c,className:r}):i===_.LOADING?y("div",{className:d.default.imageWrapperInner},void 0,f?y("img",{alt:c,className:d.default.imagePlaceholder,src:f,style:D}):null,f?y("div",{className:d.default.imagePlaceholderOverlay}):null,y(s.default,{type:s.SpinnerTypes.WANDERING_CUBES})):y("div",{className:d.default.imageWrapperInner},void 0,y("div",{className:d.default.imageError}));var k=null!=A?A():null;return k=k||T,a.createElement(j,v({className:(0,o.default)(d.default.imageWrapper,(e={},e[d.default.imageZoom]=C,e[d.default.imageWrapperBackground]=i!==_.READY,e[d.default.clickable]=null!=R.onClick,e),n),style:null!=N?null:D},w,R),k?y("div",{className:d.default.imageAccessory},void 0,k):null,L)},r}(a.PureComponent);t.default=h,h.displayName="Image",h.defaultProps={readyState:_.READY,zoomable:!0,alt:"",children:function(e){var t=e.src,n=e.size,r=e.alt;return y("img",{className:e.className||void 0,alt:r,src:t,style:n})},minWidth:0,minHeight:0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(8289),l=(r=n(8799))&&r.__esModule?r:{default:r};function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),r.prototype.render=function(){var e=this.props,t=e.src,n=e.fileSize,r=e.fileName,a=e.className,o=e.playable,u=e.volume,d=e.renderLinkComponent,f=e.onVolumeChange,c=e.autoMute,p=e.onMute;return s(l.default,{src:t,fileName:r,fileSize:(0,i.sizeString)(n),type:l.default.Types.AUDIO,className:a,playable:o,volume:u,onMute:p,autoMute:c,onVolumeChange:f,renderLinkComponent:d})},r}(o.PureComponent);t.default=f,f.displayName="LazyAudio"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,transform:"translate(3.000000, 4.000000)",d:"M16 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4v-2H2V4h14v10h-4v2h4c1.1 0 2-.9 2-2V2a2 2 0 0 0-2-2zM9 6l-4 4h3v6h2v-6h3L9 6z"}))}d.displayName="OpenExternal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M10.293 3.29604C10.579 3.01004 11.009 2.92504 11.383 3.07904C11.757 3.23204 12 3.59904 12 4.00204V20.002C12 20.407 11.757 20.772 11.383 20.927C11.009 21.082 10.579 20.996 10.293 20.71L6 16.002H3C2.45 16.002 2 15.552 2 15.002V9.00204C2 8.45304 2.45 8.00204 3 8.00204H6L10.293 3.29604ZM14 9.00195C15.654 9.00195 17 10.349 17 12.002C17 13.657 15.654 15.002 14 15.002V13.002C14.551 13.002 15 12.553 15 12.002C15 11.451 14.551 11.002 14 11.002V9.00195Z"}))}d.displayName="SpeakerQuiet"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M12,5 L12,1 L7,6 L12,11 L12,7 C15.31,7 18,9.69 18,13 C18,16.31 15.31,19 12,19 C8.69,19 6,16.31 6,13 L4,13 C4,17.42 7.58,21 12,21 C16.42,21 20,17.42 20,13 C20,8.58 16.42,5 12,5 L12,5 Z"}))}d.displayName="Replay"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{className:f,fill:d,d:"M1.93956 14.6668H6.18203C6.51658 14.6668 6.7881 14.3953 6.7881 14.0607C6.7881 13.7262 6.51658 13.4547 6.18203 13.4547H3.40261L7.21658 9.64069C7.45325 9.40402 7.45325 9.02038 7.21658 8.78371C7.0984 8.66522 6.94325 8.60613 6.7881 8.60613C6.63294 8.60613 6.47779 8.66522 6.35961 8.78371L2.54563 12.5977V9.81826C2.54563 9.48372 2.27411 9.2122 1.93956 9.2122C1.60501 9.2122 1.3335 9.48372 1.3335 9.81826V14.0607C1.3335 14.3953 1.60501 14.6668 1.93956 14.6668Z"}),s("path",{className:f,fill:d,d:"M8.78374 7.21643C9.02041 7.4531 9.40405 7.4531 9.64072 7.21643L13.4547 3.40245V6.18188C13.4547 6.51643 13.7262 6.78794 14.0608 6.78794C14.3953 6.78794 14.6668 6.51643 14.6668 6.18188V1.93941C14.6668 1.60486 14.3953 1.33334 14.0608 1.33334L9.8183 1.33334C9.48375 1.33334 9.21223 1.60486 9.21223 1.93941C9.21223 2.27396 9.48375 2.54548 9.8183 2.54548H12.5977L8.78374 6.35945C8.54707 6.59612 8.54707 6.97976 8.78374 7.21643Z"}))}d.displayName="ExpandIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M12.291 5.70697L15.998 9.41397L21.705 3.70697L20.291 2.29297L15.998 6.58597L13.705 4.29297L12.291 5.70697ZM1.99805 7H11.088C11.564 9.837 14.025 12 16.998 12V18C16.998 19.103 16.102 20 14.998 20H8.33205L2.99805 24V20H1.99805C0.894047 20 -0.00195312 19.103 -0.00195312 18V9C-0.00195312 7.897 0.894047 7 1.99805 7Z"}))}d.displayName="ChatCheck"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVolume=o,t.setVolume=function(e){a.default.set("MediaPlayerVolume",{volume:e,muted:i()})},t.getMuted=i,t.setMuted=function(e){a.default.set("MediaPlayerVolume",{volume:o(),muted:e})};var r,a=(r=n(28))&&r.__esModule?r:{default:r};function o(){var e=(a.default.get("MediaPlayerVolume")||{}).volume;return"number"!=typeof e&&(e=1),e=Math.min(1,Math.max(0,e))}function i(){var e=(a.default.get("MediaPlayerVolume")||{}).muted;return"boolean"!=typeof e&&(e=!1),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.smartOutput=function(e,t,n){return"string"==typeof e.content||void 0===e.content?e.content:t(e.content,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(389),i=s(n(9291)),l=s(n(9369)),u=s(n(8322));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}var p={handleUserContextMenu:function(e,t,n,r){(0,o.openContextMenu)(r,(function(r){return a.createElement(u.default,c({},r,{user:e,channelId:t,guildId:n}))}))},react:function(e,t,n){var r=e.userId,o=e.channelId;return null==r?a.createElement(i.default,c({key:n.key},e),t(e.content,n)):f(l.default,{className:"mention",userId:r,channelId:o},n.key)}};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(8)),i=n(389),l=I(n(8725)),u=n(50),s=I(n(8322)),d=I(n(8264)),f=I(n(8268)),c=I(n(10)),p=I(n(56)),v=I(n(15)),y=I(n(12)),m=I(n(55)),_=I(n(8426)),h=I(n(278)),E=I(n(8436)),g=I(n(272)),S=I(n(6)),O=I(n(7342));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(){return(b=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}).apply(this,arguments)}var M=(0,u.createExperiment)({kind:"user",id:"2021-07_role_popout",label:"Role Popout",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enable Popout",config:{enabled:!0}}]});function N(e){var t=e.color,n=e.roleId,r=e.channelId,u=e.roleName,I=e.guildId,T=e.children,N=function(e){return a.createElement(_.default,b({className:O.default.roleMention,color:0===t?null:t},e),T)};return M.getCurrentConfig({}).enabled&&r&&I&&(null!=n||"@everyone"===u)?C(h.default,{renderPopout:function(e){var t=c.default.getChannel(r),_=v.default.getGuild(I),T=p.default.getMembers(_.id),M=null==n?_.roles[_.id]:_.roles[n],N=(0,o.default)(T).filter((function(e){return!("@everyone"!==u&&!e.roles.includes(n))&&null!=y.default.getUser(e.userId)})).sortBy((function(e){var t=y.default.getUser(e.userId);return(null!=t?e.nick||t.username:"").toLocaleLowerCase()})).map((function(e){var n=y.default.getUser(e.userId);return C(h.default,{preload:function(){return(0,d.default)(n.id,n.getAvatarURL(t.guild_id))},renderPopout:function(n){return a.createElement(f.default,b({},n,{userId:e.userId,guildId:_.id,channelId:t.id}))},spacing:14},void 0,(function(r,o){return a.createElement(l.default,b({key:e.userId,selected:o,colorString:e.colorString,user:n,isOwner:e.userId===_.ownerId,nick:e.nick,premiumSince:null==e.premiumSince?null:new Date(e.premiumSince),channel:t,guildId:_.id,onContextMenu:function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(s.default,b({},e,{user:n,guildId:_.id,channelId:t.id,showMediaItems:!0,popoutPosition:h.default.Positions.LEFT}))}))}},r))}))})).value();return a.createElement(m.default,b({className:O.default.rolePopout},e),C(g.default,{className:O.default.roleScroller},void 0,C(E.default,{className:O.default.roleHeader,"aria-label":S.default.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:M.name,count:N.length})},void 0,C("span",{"aria-hidden":!0},void 0,M.name," — ",N.length)),N))},position:h.default.Positions.RIGHT},void 0,N):N()}N.displayName="RoleMention"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e.type!==i.ActivityTypes.CUSTOM_STATUS||null==e.emoji)return!1;var l=e.emoji;if(null==l.id||null==n||!(0,r.isGuildTextChannelType)(n.type))return!0;var u=a.default.getUsableCustomEmojiById(l.id),s=null==u||u.guildId!==n.getGuildId(),d=o.default.can(i.Permissions.USE_EXTERNAL_EMOJIS,t,n);return!s||d};var r=n(31),a=l(n(249)),o=l(n(78)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=f(n(9)),u=f(n(55)),s=n(279),d=f(n(7443));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.SINGLE_AVATAR="1",e.MULTIPLE_AVATAR="2"}(o||(o={}));var y=((r={})[s.Sizes.SIZE_32]=d.default.avatarSmall,r[s.Sizes.SIZE_40]=d.default.avatarLarge,r),m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).placeholderMaxWidth=Math.floor(40*Math.random())+40+"%",t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){var e=this.props,t=e.type,n=e.avatarSize,r=e.className;return t===o.MULTIPLE_AVATAR?p("div",{className:(0,l.default)(d.default.multiplePlaceholder,r)},void 0,p(u.default,{},void 0,p("div",{className:(0,l.default)(d.default.placeholderAvatar,y[n],d.default.avatarMasked)}),p("div",{className:(0,l.default)(d.default.placeholderAvatar,y[n],d.default.avatarMasked)}),p("div",{className:(0,l.default)(d.default.placeholderAvatar,y[n])})),p(u.default,{grow:1,className:d.default.mulitplePlaceholderUsername,style:{maxWidth:this.placeholderMaxWidth}})):p(u.default,{className:(0,l.default)(d.default.placeholder,r)},void 0,p("div",{className:(0,l.default)(d.default.placeholderAvatar,y[n])}),p(u.default,{grow:1,className:d.default.placeholderUsername,style:{maxWidth:this.placeholderMaxWidth}}))},r}(i.Component);m.displayName="PlaceholderAvatarWithMessage",m.defaultProps={type:o.SINGLE_AVATAR},m.Types=o;var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=p(n(29)),o=p(n(55)),i=n(85),l=n(35),u=p(n(47)),s=p(n(24)),d=n(8596),f=p(n(6)),c=p(n(7447));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.transitionState,n=e.onClose,r=(0,i.useUID)();return y(l.ModalRoot,{"aria-labelledby":r,transitionState:t,size:l.ModalSize.SMALL},void 0,y(l.ModalHeader,{separator:!1},void 0,y(u.default,{id:r,tag:u.default.Tags.H2,size:u.default.Sizes.SIZE_20},void 0,f.default.Messages.SPOTIFY_PREMIUM_UPGRADE_HEADER)),y(l.ModalContent,{},void 0,y(o.default,{justify:o.default.Justify.CENTER},void 0,y("div",{className:c.default.image})),y(s.default,{className:c.default.text},void 0,f.default.Messages.SPOTIFY_PREMIUM_UPGRADE_BODY)),y(l.ModalFooter,{},void 0,y(a.default,{onClick:function(){(0,d.openPremiumSite)(),n()}},void 0,f.default.Messages.SPOTIFY_PREMIUM_UPGRADE_BUTTON),y(a.default,{look:a.default.Looks.LINK,color:a.default.Colors.PRIMARY,onClick:n},void 0,f.default.Messages.CANCEL)))}m.displayName="SpotifyPremiumUpgrade"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,o,i,l){var u,s=null===(u=o.getVoiceStateForSession(e.id,null==t?void 0:t.session_id))||void 0===u?void 0:u.channelId;if(null==s)return!1;var d=n.getChannel(s);if(null==d)return!1;var f=o.getCurrentClientVoiceChannelId(d.getGuildId())===s,c=(0,r.isChannelFull)(d,o,l),p=i.can(a.Permissions.CONNECT,d);return!!(f||!c&&p)};var r=n(292),a=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=v(n(10)),l=v(n(15)),u=v(n(40)),s=v(n(12)),d=n(301),f=v(n(205)),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t,n,r){var v=i.default.getChannel(n),y=(0,a.useStateFromStores)([l.default],(function(){return l.default.getGuild(t)}),[t]),_=(0,a.useStateFromStores)([f.default],(function(){return f.default.getPermissionsForUser(e.id,n)}),[n,e.id]),h=s.default.getCurrentUser().id===e.id,E=(0,a.useStateFromStores)([u.default],(function(){return null!=n&&u.default.canWithPartialContext(c.Permissions.MUTE_MEMBERS,{channelId:n})}),[n]);if(null==v||null==y||r===c.AppContext.POPOUT)return null;if(!E&&!h)return null;if(!_.speaker)return null;return m(o.MenuItem,{id:"audience",label:p.default.Messages.STAGE_CHANNEL_USER_MOVE_TO_AUDIENCE,action:function(){h?(0,d.moveSelfToAudience)(v):(0,d.moveUserToAudience)(e,v)}})}_.displayName="useMoveToAudienceItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStores)([i.default],(function(){return i.default.getCurrentUser()})),t=null==e?void 0:e.isStaff();t||l.trackExposure({});var n=l.useExperiment({},{disable:t})[0];return t||n.enabled},t.FriendNicknamesExperiment=void 0;var r,a=n(3),o=n(50),i=(r=n(12))&&r.__esModule?r:{default:r};var l=(0,o.createExperiment)({kind:"user",id:"2021-04_friend_nicknames",label:"Friend nicknames",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enable friend nicknames",config:{enabled:!0}}]});t.FriendNicknamesExperiment=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(1217)),i=y(n(29)),l=y(n(153)),u=n(85),s=n(131),d=n(35),f=y(n(47)),c=y(n(24)),p=y(n(6)),v=y(n(7452));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function E(e){var t=e.user,n=e.nickname,r=e.transitionState,y=e.onClose,m=(0,u.useUID)(),E=a.useState(!1),g=E[0],S=E[1],O=a.useState(n),I=O[0],T=O[1],C=a.useRef(null),b=function(){var e,n=(e=regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),S(!0),e.prev=2,e.next=5,o.default.updateRelationship(t.id,I);case 5:y(),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(2);case 10:return e.prev=10,S(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[2,8,10,13]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){h(o,r,a,i,l,"next",e)}function l(e){h(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),M=null==n?p.default.Messages.ADD_FRIEND_NICKNAME:p.default.Messages.CHANGE_FRIEND_NICKNAME;return _(d.ModalRoot,{transitionState:r,size:d.ModalSize.SMALL,"aria-labelledby":m},void 0,_("form",{onSubmit:b},void 0,_(d.ModalHeader,{separator:!1},void 0,_(f.default,{tag:f.default.Tags.H2,size:f.default.Sizes.SIZE_20},void 0,M)),_(d.ModalContent,{},void 0,_(c.default,{size:c.default.Sizes.SIZE_16,className:v.default.description},void 0,p.default.Messages.FRIEND_NICKNAME_DESCRIPTION),_(s.FormItem,{title:p.default.Messages.FRIEND_NICKNAME},void 0,_(l.default,{inputRef:C,value:null!=I?I:"",placeholder:t.toString(),onChange:T,className:v.default.input,autoFocus:!0})),_(i.default,{look:i.default.Looks.LINK,color:i.default.Colors.LINK,size:i.default.Sizes.NONE,onClick:function(){var e;T(null),null===(e=C.current)||void 0===e||e.focus()},className:v.default.reset},void 0,p.default.Messages.RESET_FRIEND_NICKNAME)),_(d.ModalFooter,{},void 0,_(i.default,{type:"submit",disabled:g},void 0,p.default.Messages.SAVE),_(i.default,{onClick:y,look:i.default.Looks.LINK,color:i.default.Colors.PRIMARY},void 0,p.default.Messages.CANCEL))))}E.displayName="AddFriendNicknameModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.preloadUserBannerImage=void 0;var r=n(1);function a(){return(a=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}).apply(this,arguments)}var o={};o=n(9300).default;var i=r.NOOP;t.preloadUserBannerImage=i;var l=a({preloadUserBannerImage:i},o);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(105)),a=o(n(150));function o(e){return e&&e.__esModule?e:{default:e}}var i={preloadUserBannerImage:function(e){var t=e.user,n=t.id,o=t.banner,i=r.default.useReducedMotion,l=a.default.getUserBannerURL({id:n,banner:o},!i);null!=l&&((new Image).src=l)}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={};function u(){l={}}var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getNote=function(e){return l[e]},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return u()},OVERLAY_INITIALIZE:function(e){return u()},USER_NOTE_UPDATE:function(e){l[e.id]={loading:!1,note:e.note}},USER_NOTE_LOAD_START:function(e){var t=e.userId;l[t]={loading:!0,note:null}},USER_NOTE_LOADED:function(e){var t=e.userId,n=e.note;l[t]={loading:!1,note:null==n?void 0:n.note}}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=u.default.getCurrentUser().id===e,s=(0,r.useStateFromStores)([a.default],(function(){return null!=t&&a.default.isLurking(t)}));return(0,r.useStateFromStores)([i.default,o.default,l.default],(function(){return!n&&!s&&(i.default.isFriend(e)||null!=o.default.memberOf(e).find((function(e){return!l.default.isGuildRestricted(e)})))}))};var r=n(3),a=s(n(182)),o=s(n(56)),i=s(n(70)),l=s(n(39)),u=s(n(12));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=n.p+"bc5b30202ee8144be31e24302871cc1c.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=y(n(0)),o=p(n(9)),i=p(n(8501)),l=p(n(9108)),u=y(n(8556)),s=p(n(47)),d=n(1),f=p(n(6)),c=p(n(7464));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.activity,n=e.customStatusActivity,r=e.user,p=e.guild,v=e.guildMember,y=e.channelId,_=e.onClose,h=e.setNote,E=e.canDM,g=e.hidePersonalInformation;return r.isNonUserBot()?null:m("div",{className:c.default.bodyInnerWrapper},void 0,m(u.default,{type:u.UserActivityTypes.USER_POPOUT,activity:null!=t?t:n,className:(0,o.default)(c.default.activity,"newPopoutActivityStyles"),user:r,guildId:null==p?void 0:p.id,channelId:y,source:d.AnalyticsLocations.PROFILE_POPOUT,onOpenGameProfile:_,onOpenConnections:_,onAction:_}),null!=p&&null!=v?a.createElement(a.Fragment,null,m(s.default,{size:s.default.Sizes.SIZE_12,className:c.default.bodyTitle,muted:!0,uppercase:!0},void 0,f.default.Messages.ROLES_LIST.format({numRoles:v.roles.length})),m(i.default,{className:c.default.rolesList,guild:p,user:r,userRoles:v.roles},"roles")):null,!g&&a.createElement(a.Fragment,null,m(s.default,{size:s.default.Sizes.SIZE_12,className:c.default.bodyTitle,muted:!0,uppercase:!0},void 0,f.default.Messages.NOTE),m(l.default,{className:c.default.note,userId:r.id,autoFocus:h||!E},"note")))}_.displayName="UserPopoutBody"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(14))&&r.__esModule?r:{default:r},o=n(1);var i={updateNote:function(e,t){a.default.put({url:o.Endpoints.NOTE(e),body:{note:t},oldFormErrors:!0})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=n(57),l=s(n(55)),u=s(n(7457));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.percentage;return c("div",{className:u.default.bar},void 0,c("div",{className:u.default.barInner,style:{width:100*Math.max(Math.min(t,1),0)+"%"}}))}function v(e){return String(e).padStart(2,"0")}function y(e){var t=Math.floor(e)%60,n=Math.floor(e/60)%60,r=Math.floor(e/3600);return 0===r?n+":"+v(t):r+":"+v(n)+":"+v(t)}p.displayName="Bar";var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).timer=new i.Interval,t.state={now:Date.now()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this;this.timer.start(500,(function(){e.setState({now:Date.now()})}))},a.componentWillUnmount=function(){this.timer.stop()},a.render=function(){var e,t=this.props,n=t.start,r=t.end,a=t.className,i=t.themed,s=this.state.now,d=(r-n)/1e3,f=Math.max(Math.min((s-n)/1e3,d),0);return c("div",{className:(0,o.default)(a,(e={},e[u.default.themed]=i,e))},void 0,c(p,{percentage:f/d}),c(l.default,{},void 0,c(l.default.Child,{grow:1,className:u.default.textLeft},void 0,y(f)),c(l.default.Child,{grow:0,className:u.default.textRight},void 0,y(d))))},r}(a.PureComponent);m.displayName="ActivityTimeBar",m.defaultProps={themed:!1};var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),s("path",{d:"M10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 7.34784 18.9464 4.8043 17.0711 2.92893C15.1957 1.05357 12.6522 0 10 0ZM14.5625 14.4375C14.3791 14.7161 14.0145 14.8107 13.7188 14.6562C11.375 13.2188 8.40625 12.9062 4.9375 13.6875C4.71979 13.7377 4.49182 13.668 4.33945 13.5046C4.18709 13.3412 4.13348 13.1089 4.19883 12.8952C4.26417 12.6816 4.43854 12.519 4.65625 12.4688C8.46875 11.5938 11.7188 11.9688 14.375 13.5938C14.5149 13.6781 14.6141 13.816 14.6495 13.9755C14.685 14.1349 14.6535 14.3019 14.5625 14.4375ZM15.8125 11.6875C15.7053 11.8622 15.5328 11.9869 15.3333 12.0338C15.1338 12.0807 14.9238 12.0461 14.75 11.9375C12.0625 10.2812 7.96875 9.8125 4.78125 10.7812C4.5133 10.8594 4.22401 10.7887 4.02236 10.5957C3.8207 10.4027 3.73731 10.1168 3.80361 9.84569C3.8699 9.57457 4.0758 9.3594 4.34375 9.28125C7.96875 8.1875 12.5 8.71875 15.5625 10.625C15.9134 10.8575 16.0229 11.3229 15.8125 11.6875ZM15.9062 8.875C12.6875 6.96875 7.375 6.78125 4.28125 7.71875C3.81691 7.79284 3.36952 7.5115 3.23513 7.0609C3.10074 6.61031 3.32093 6.12986 3.75 5.9375C7.28125 4.875 13.1562 5.0625 16.875 7.28125C17.0893 7.40709 17.2434 7.61436 17.3023 7.85577C17.3612 8.09717 17.3198 8.35214 17.1875 8.5625C16.9054 8.98221 16.3499 9.1177 15.9062 8.875Z",fill:d}))}d.displayName="Spotify"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.activity,n=e.color,r=e.user,s=e.look;if(null==(null==t?void 0:t.buttons)||t.buttons.length<1)return null;function d(){return(d=p(regeneratorRuntime.mark((function e(t,n,r){var a,u,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,o.getMetadata)(t,n);case 3:if(null!=(a=e.sent)&&Array.isArray(a.button_urls)){e.next=6;break}return e.abrupt("return");case 6:if("string"==typeof(u=a.button_urls[r])){e.next=9;break}return e.abrupt("return");case 9:if(null!=(s=l.default.safeParseWithQuery(u))&&null!=s.protocol&&null!=s.hostname){e.next=12;break}return e.abrupt("return");case 12:(0,i.handleClick)({href:l.default.format(s),trusted:!1}),e.next=17;break;case 15:e.prev=15,e.t0=e.catch(0);case 17:case"end":return e.stop()}}),e,null,[[0,15]])})))).apply(this,arguments)}return a.createElement(a.Fragment,null,t.buttons.map((function(e,a){return f(u.default,{color:n,look:s,onClick:function(){return function(e,t,n){return d.apply(this,arguments)}(t,r.id,a)}},"customButton-"+a,e)})))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8428),i=n(730),l=s(n(186)),u=s(n(8339));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=G;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=w(n(1234)),l=w(n(478)),u=w(n(132)),s=w(n(1245)),d=n(42),f=w(n(10)),c=w(n(400)),p=w(n(155)),v=w(n(684)),y=w(n(15)),m=w(n(120)),_=w(n(40)),h=w(n(70)),E=w(n(36)),g=w(n(80)),S=w(n(8429)),O=w(n(149)),I=n(263),T=w(n(16)),C=w(n(294)),b=n(1214),M=w(n(8597)),N=w(n(8598)),A=w(n(8499)),P=w(n(8339)),R=n(156),L=n(1),D=w(n(6));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function U(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function G(e){var t=e.activity,n=e.isCurrentUser,r=e.color,w=e.look,j=e.hover,G=e.user,F=a.useState(!1),B=F[0],H=F[1],x=(0,N.default)(t),V=(0,o.useStateFromStores)([m.default,s.default,p.default,c.default],(function(){return x||null!=(null==t?void 0:t.application_id)&&(0,I.isLaunchable)(m.default,s.default,p.default,c.default,t.application_id)})),W=(0,o.useStateFromStores)([C.default],(function(){return Array.from(C.default.getSelfEmbeddedActivities().values()).some((function(e){return e.applicationId===(null==t?void 0:t.application_id)}))})),Y=(0,o.useStateFromStores)([S.default],(function(){return null!=t&&null!=t.application_id&&S.default.getState(t.application_id,L.ActivityActionTypes.JOIN)===L.ActivityActionStates.LOADING})),z=(0,o.useStateFromStores)([f.default,y.default,v.default,h.default,E.default,g.default,_.default],(function(){return(0,M.default)(G,t,f.default,y.default,v.default,h.default,E.default,g.default,_.default)})),K=!T.default.embedded;if(null==t||!(0,b.hasFlag)(t,L.ActivityFlags.JOIN)||null==t.application_id)return null;var $=!n&&(K||V)&&!B&&!W&&(!x||z),Z=null;n?Z=D.default.Messages.USER_ACTIVITY_CANNOT_JOIN_SELF:K||V||(Z=D.default.Messages.USER_ACTIVITY_NOT_DETECTED.format({name:t.name}));var q=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n,r,a,o,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,N.default)(t),null==t.session_id||null==t.application_id){e.next=16;break}if(n&&z&&(a=null===(r=g.default.getVoiceStateForSession(G.id,t.session_id))||void 0===r?void 0:r.channelId,null!=(o=f.default.getChannel(a))&&(u.default.selectVoiceChannel(o.id),(0,d.transitionTo)(L.Routes.CHANNEL(null!==(s=o.getGuildId())&&void 0!==s?s:L.ME,o.id)))),e.t0=z,!e.t0){e.next=8;break}return e.next=7,l.default.join(G.id,t.session_id,t.application_id,E.default.getVoiceChannelId(),null,R.ActivityIntent.PLAY,n);case 7:e.t0=e.sent;case 8:if(!e.t0){e.next=11;break}return(0,A.default)(L.AnalyticsGameOpenTypes.JOIN,L.AnalyticsLocations.USER_ACTIVITY_ACTIONS,G.id,t),e.abrupt("return");case 11:return H(!0),e.next=14,i.default.sendActivityInviteUser({type:L.ActivityActionTypes.JOIN_REQUEST,userId:G.id,activity:t,location:L.AnalyticsLocations.PROFILE_POPOUT});case 14:null!=(c=e.sent)&&u.default.selectPrivateChannel(c.id);case 16:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){U(o,r,a,i,l,"next",e)}function l(e){U(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return n.apply(this,arguments)}}(),X=z?D.default.Messages.JOIN:D.default.Messages.USER_ACTIVITY_ACTION_ASK_TO_JOIN;return x&&(X=D.default.Messages.EMBEDDED_ACTIVITIES_JOIN_ACTIVITY),k(O.default,{text:Z},"join",(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return k(P.default,{onClick:q,onMouseEnter:t,onMouseLeave:n,color:r,look:w,hover:j,disabled:!$,submitting:Y,fullWidth:!0},void 0,X)}))}G.displayName="JoinActivityButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;p(n(0));var r,a=f(n(9)),o=n(3),i=p(n(1232)),l=f(n(80)),u=f(n(8339)),s=f(n(6)),d=f(n(7459));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t,n=e.guildId,r=e.channelId,f=e.color,c=e.look,p=e.isProfile,y=(0,o.useStateFromStores)([l.default],(function(){return l.default.isInChannel(r)}),[r]);return v(u.default,{className:(0,a.default)(d.default.button,(t={},t[d.default.popout]=!p,t)),color:f,look:c,disabled:y,onClick:function(){return i.connectOrLurkStage(n,r)},fullWidth:!0},"stage",s.default.Messages.STAGE_CHANNEL_JOIN_BUTTON)};y.displayName="ListenStageButton";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(26)),o=n(1214),i=s(n(8339)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.activity,n=e.user,r=e.look,s=e.color;if(!(0,o.hasFlag)(t,l.ActivityFlags.INSTANCE))return null;return f(i.default,{look:r,color:s,onClick:function(){new a.default("UserActivityActions").log("notify",n.id,t)},fullWidth:!0},"notify",u.default.Messages.USER_ACTIVITY_ACTION_NOTIFY_ME)}c.displayName="NotifyActivityButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=L(n(478)),i=L(n(132)),l=L(n(1245)),u=n(42),s=L(n(10)),d=L(n(400)),f=L(n(155)),c=L(n(684)),p=L(n(15)),v=L(n(120)),y=L(n(40)),m=L(n(70)),_=L(n(36)),h=L(n(80)),E=L(n(8429)),g=L(n(149)),S=n(263),O=L(n(16)),I=L(n(294)),T=n(1214),C=L(n(8597)),b=L(n(8598)),M=L(n(8499)),N=L(n(8339)),A=n(156),P=n(1),R=L(n(6));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function k(e){var t=e.activity,n=e.isCurrentUser,r=e.color,L=e.look,D=e.hover,k=e.user,U=(0,b.default)(t),G=(0,a.useStateFromStores)([v.default,l.default,f.default,d.default],(function(){return(0,b.default)(t)||null!=(null==t?void 0:t.application_id)&&(0,S.isLaunchable)(v.default,l.default,f.default,d.default,t.application_id)})),F=(0,a.useStateFromStores)([I.default],(function(){return Array.from(I.default.getSelfEmbeddedActivities().values()).some((function(e){return e.applicationId===(null==t?void 0:t.application_id)}))})),B=(0,a.useStateFromStores)([E.default],(function(){return null!=t&&null!=t.application_id&&E.default.getState(t.application_id,P.ActivityActionTypes.JOIN)===P.ActivityActionStates.LOADING})),H=(0,a.useStateFromStores)([s.default,p.default,c.default,m.default,_.default,h.default,y.default],(function(){return(0,C.default)(k,t,s.default,p.default,c.default,m.default,_.default,h.default,y.default)})),x=!O.default.embedded;if(null==t||t.application_id!==A.POKER_NIGHT_APPLICATION_ID||!U||!(0,T.hasFlag)(t,P.ActivityFlags.JOIN)||null==t.application_id)return null;var V=!n&&(x||G)&&H&&!F,W=null;n?W=R.default.Messages.USER_ACTIVITY_CANNOT_JOIN_SELF:x||G||(W=R.default.Messages.USER_ACTIVITY_NOT_DETECTED.format({name:t.name}));var Y=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n,r,a,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t.session_id||null==t.application_id){e.next=9;break}if(U&&H&&(r=null===(n=t.party)||void 0===n?void 0:n.id,null!=(a=s.default.getChannel(r))&&(i.default.selectVoiceChannel(a.id),(0,u.transitionTo)(P.Routes.CHANNEL(null!==(l=a.getGuildId())&&void 0!==l?l:P.ME,a.id)))),e.t0=H,!e.t0){e.next=7;break}return e.next=6,o.default.join(k.id,t.session_id,t.application_id,_.default.getVoiceChannelId(),null,A.ActivityIntent.SPECTATE,U);case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=9;break}(0,M.default)(P.AnalyticsGameOpenTypes.SPECTATE,P.AnalyticsLocations.USER_ACTIVITY_ACTIONS,k.id,t);case 9:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){j(o,r,a,i,l,"next",e)}function l(e){j(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return n.apply(this,arguments)}}();return w(g.default,{text:W},"spectate",(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return w(N.default,{onClick:Y,onMouseEnter:t,onMouseLeave:n,color:r,look:L,hover:D,disabled:!V,submitting:B,fullWidth:!0},void 0,R.default.Messages.SPECTATE)}))}k.displayName="SpectateActivityButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9314)),o=n(1214),i=n(1),l=u(n(7351));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.activity,n=e.user,u=e.color,s=e.look,f=e.guildId,c=e.channelId,p=e.source;if(null==t||!(0,o.hasFlag)(t,i.ActivityFlags.PLAY))return null;if(!(0,o.isListeningOnSpotify)(t))return null;var v={key:"play",className:l.default.button,size:l.default.buttonSize,color:u,look:s,activity:t,user:n,fullWidth:!0};return r.createElement(a.default,d({guildId:null!=f?f:void 0,channelId:c,source:p},v))}f.displayName="SpotifyActivityPlayButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(29)),i=f(n(55)),l=f(n(149)),u=f(n(8825)),s=n(8601),d=f(n(7365));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.activity,n=e.user,r=e.source,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["activity","user","source"]),c=(0,s.useSpotifyPlayAction)(t,n,r),y=c.label,m=c.tooltip,_=c.loading,h=c.disabled,E=c.onClick;return v(l.default,{text:m},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return a.createElement(o.default,p({},f,{onClick:E,onMouseEnter:t,onMouseLeave:n,disabled:h,submitting:_}),v(i.default,{align:i.default.Align.CENTER},void 0,v(u.default,{className:d.default.spotifyButtonLogo}),y))}))}y.displayName="SpotifyPlayButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9316)),o=n(1214),i=n(1),l=u(n(7351));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.activity,n=e.user,u=e.color,s=e.look,f=e.guildId,c=e.channelId,p=e.source;if(null==t||!(0,o.hasFlag)(t,i.ActivityFlags.SYNC))return null;var v={key:"sync",className:l.default.button,size:l.default.buttonSize,color:u,look:s,user:n,activity:t};return(0,o.isListeningOnSpotify)(t)?r.createElement(a.default,d({guildId:null!=f?f:void 0,channelId:c,source:p},v)):null}f.displayName="SpotifyActivitySyncButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(29)),l=c(n(149)),u=c(n(8826)),s=c(n(258)),d=n(8601),f=c(n(7365));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.activity,n=e.user,r=e.channelId,c=e.guildId,p=e.source,m=e.size,_=e.className,h=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["activity","user","channelId","guildId","source","size","className"]),E=(0,d.useSpotifySyncAction)(t,n,p,s.default.getNickname(c,r,n)),g=E.tooltip,S=E.loading,O=E.disabled,I=E.onClick;return y(l.default,{text:g},void 0,(function(e){var n=e.onMouseEnter,r=e.onMouseLeave;return a.createElement(i.default,v({},h,{size:(0,o.default)(m,f.default.iconButtonSize),className:(0,o.default)(_,f.default.iconButton),onClick:I,onMouseEnter:n,onMouseLeave:r,disabled:O,submitting:S,"aria-label":g||t.name}),y(u.default,{className:f.default.listenAlongIcon}))}))}m.displayName="SpotifySyncButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(1214),o=l(n(8339)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e){var t=e.activity,n=e.color,l=e.look;if(!(0,a.isStreaming)(t))return null;var u={color:n,look:l};return r.createElement(o.default,s({key:"play-activity",onClick:function(){var e=(0,a.getStreamURL)(t);return window.open(null!=e?e:void 0)}},u,{fullWidth:!0}),i.default.Messages.WATCH)}d.displayName="WatchActivityButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.isCurrentUser,n=e.color,r=e.look,I=e.applicationStream,T=(0,o.useStateFromStoresObject)([d.default],(function(){return{activeStream:d.default.getActiveStreamForApplicationStream(I),watchingOtherStream:null!=I&&d.default.getAllActiveStreamsForChannel(I.channelId).filter((function(e){return e.ownerId!==I.ownerId})).length>0}})),M=T.activeStream,N=T.watchingOtherStream,A=(0,o.useStateFromStores)([f.default],(function(){return f.default.getChannel(null==I?void 0:I.channelId)})),P=(0,o.useStateFromStores)([v.default,c.default,p.default],(function(){return null!=A&&(0,s.canWatchStream)(A,v.default,c.default,p.default)}),[A]),R=null!=M&&null!=I&&M.state!==g.ApplicationStreamStates.ENDED&&M.ownerId===I.ownerId,L=function(e){null!=I&&(l.default.selectVoiceChannel(I.channelId),R||(0,u.watchStreamAndTransitionToStream)(I,{forceMultiple:e}),h.ComponentDispatch.dispatch(g.ComponentActions.POPOUT_CLOSE),h.ComponentDispatch.dispatch(g.ComponentActions.MODAL_CLOSE),i.default.popAll())};if(null==I)return null;var D=S.default.Messages.WATCH_STREAM;t?D=S.default.Messages.WATCH_STREAM_STREAMING:R&&(D=S.default.Messages.WATCH_STREAM_WATCHING);var w={color:n,look:r};return a.createElement(a.Fragment,null,a.createElement(E.default,C({key:"play",disabled:t||R||!P,onClick:function(){return L(!1)}},w,{fullWidth:!0}),b(_.default,{className:O.default.streamIcon}),D),N&&!R?b(y.default,{text:S.default.Messages.STREAM_WATCH_MULTIPLE_TOOLTIP},void 0,(function(e){return a.createElement(E.default,C({},e,{onClick:function(){var t;null===(t=e.onClick)||void 0===t||t.call(e),L(!0)}},w,{className:O.default.iconButton,size:O.default.iconButtonSize}),b(m.default,{className:O.default.iconSize}))})):null)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=I(n(397)),l=I(n(132)),u=n(364),s=n(484),d=I(n(163)),f=I(n(10)),c=I(n(15)),p=I(n(40)),v=I(n(80)),y=I(n(149)),m=I(n(9110)),_=I(n(5955)),h=n(121),E=I(n(8339)),g=n(1),S=I(n(6)),O=I(n(7460));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=d(n(9320)),i=d(n(183)),l=d(n(725)),u=n(1),s=d(n(7351));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e){var t=e.color,n=e.look,d=e.onOpenConnections;if((0,a.useStateFromStores)([l.default],(function(){return l.default.getAccounts().some((function(e){return e.type===i.default.get(u.PlatformTypes.XBOX).type}))})))return null;var f={className:s.default.button,size:s.default.buttonSize,color:t,look:n,fullWidth:!0};return r.createElement(o.default,c({onOpenConnections:d},f))}p.displayName="XboxActivityButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(473)),i=p(n(183)),l=p(n(29)),u=p(n(55)),s=p(n(9111)),d=n(1),f=p(n(6)),c=p(n(7461));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=i.default.get(d.PlatformTypes.XBOX).name,h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props.onOpenConnections;e&&e(),o.default.open(d.UserSettingsSections.CONNECTIONS)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.className,n=e.look,r=e.size,a=e.color;return y(l.default,{size:r,look:n,color:a,className:t,onClick:this.handleClick},void 0,y(u.default,{align:u.default.Align.CENTER},void 0,y(s.default,{className:c.default.xboxButtonLogo}),f.default.Messages.USER_ACTIVITY_CONNECT_PLATFORM.format({platform:_})))},r}(a.Component);t.default=h,h.displayName="XboxButton",h.defaultProps={look:l.default.Looks.OUTLINED,color:l.default.Colors.WHITE,size:l.default.Sizes.MAX}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=m(n(9322)),l=n(716),u=m(n(6)),s=m(n(7467)),d=m(n(9326)),f=m(n(9327)),c=m(n(9328)),p=m(n(9329)),v=m(n(9330)),y=m(n(9331));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=[m(n(9332)).default,d.default,p.default,c.default,v.default,f.default,y.default];function g(e){var t,n,r=e.userId,i=a.useState(!1),l=i[0],d=i[1];return a.useLayoutEffect((function(){l||d(!0)}),[l]),h("div",{className:s.default.wumpusWrapper},void 0,h("div",{className:(0,o.default)(s.default.wumpus,(t={},t[s.default.wumpusShown]=l,t))},void 0,h("img",{className:s.default.wumpusImage,alt:u.default.Messages.IMG_ALT_ICON.format({name:u.default.Messages.WUMPUS}),src:(n=parseInt(r.slice(-6),10),E[n%E.length])}),h("span",{className:s.default.wumpusTooltip},void 0,u.default.Messages.USER_POPOUT_WUMPUS_TOOLTIP)))}function S(e){var t=e.user,n=e.setNote,r=e.canDM,a=e.onClose;if(t.isNonUserBot()||!r)return null;var o=r&&(0,l.isNewUser)(t)&&!t.bot;return h("div",{className:s.default.footer},void 0,o&&r?h(g,{userId:t.id}):null,r?h(i.default,{user:t,onClose:function(){return null==a?void 0:a()},autoFocus:!n}):null)}g.displayName="BouncyWumpus",S.displayName="UserPopoutFooter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(23)),i=n(3),l=_(n(391)),u=n(687),s=_(n(390)),d=_(n(1216)),f=_(n(10)),c=_(n(70)),p=_(n(153)),v=n(8381),y=_(n(6)),m=_(n(7466));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.user,n=e.autoFocus,r=void 0!==n&&n,_=e.onClose,h=e.className,g=a.useRef(null),S=(0,i.useStateFromStores)([c.default],(function(){return c.default.isBlocked(t.id)})),O=a.useCallback((function(e){if("Enter"===e.key){e.preventDefault(),(0,o.default)(null!=g.current,"Keypress on Input when not mounted");var n=g.current.value.trim();return(0,v.applyChatRestrictions)({target:null,type:null,content:n,channel:null}).then((function(e){e.valid&&(l.default.openPrivateChannel(t.id).then((function(e){var t=f.default.getChannel(e);(0,o.default)(null!=t,"Newly created PrivateChannel is null"),s.default.sendMessage(t.id,d.default.parse(t,n)),(0,u.popLayer)()})),null==_||_())})),!0}}),[_,t]);return E(p.default,{className:h,inputClassName:m.default.input,inputRef:g,autoFocus:r,placeholder:S?y.default.Messages.QUICK_DM_BLOCKED:y.default.Messages.QUICK_DM_USER.format({name:t.username}),onKeyPress:O,disabled:S})}g.displayName="QuickMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T,t.showPopout=function(e,t,n,r,o,i,l,u,s){var d=t===y.TextareaTypes.FORM;(0,f.openPopout)(e,{onClose:r,closeOnScroll:!1,backdrop:!0,shadow:!1,position:f.default.Positions.TOP_LEFT,animationType:f.default.Animations.NONE,zIndexBoost:d?1e3:0,render:function(e){return a.createElement(T,I({},e,{channel:n,onConfirm:o,onCancel:i,analyticsType:l,popoutText:u,animation:s}))}},"popout-channel-text-area-shouting")};var r,a=S(n(0)),o=E(n(5962)),i=E(n(8309)),l=n(106),u=E(n(39)),s=E(n(29)),d=E(n(282)),f=S(n(8382)),c=E(n(8602)),p=E(n(24)),v=E(n(13)),y=n(1),m=E(n(6)),_=E(n(7465)),h=E(n(7342));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}function T(e){var t=e.onConfirm,n=e.onCancel,r=e.popoutKey,f=e.channel,E=e.analyticsType,g=e.popoutText,S=e.animation;a.useEffect((function(){v.default.track(y.AnalyticEvents.OPEN_POPOUT,I({type:E},(0,l.collectChannelAnalyticsMetadata)(f)))}),[E,f]);var T=a.useCallback((function(){i.default.close(r)}),[r]),C=a.useCallback((function(){null==t||t(),T()}),[t,T]),b=a.useCallback((function(){null==n||n(),T()}),[n,T]),M=a.useRef(null);return a.useEffect((function(){var e,t=u.default.theme;if(S){var n=t===y.ThemeTypes.DARK?S.dark:S.light;e=o.default.loadAnimation({container:M.current,renderer:"svg",loop:!0,autoplay:!0,animationData:n})}return function(){null!=e&&(e.destroy(),e=void 0)}}),[S]),O(d.default,{"aria-labelledby":"content-warning-popout-label"},void 0,O("form",{className:_.default.contentWarningPopout,onSubmit:C},void 0,O("div",{className:_.default.body},void 0,S&&a.createElement("div",{className:_.default.animation,ref:M}),O("div",{className:_.default.content},void 0,O("div",{className:_.default.header},void 0,m.default.Messages.SELF_XSS_HEADER),O(p.default,{id:"content-warning-popout-label",className:h.default.markup},void 0,g.body),O("div",{className:_.default.buttonWrapper},void 0,O("div",{className:_.default.buttonContainer},void 0,O(s.default,{className:_.default.button,color:s.default.Colors.GREY,onClick:b},void 0,m.default.Messages.EDIT_MESSAGE),O(p.default,{size:p.default.Sizes.SIZE_12,className:_.default.buttonHint},void 0,m.default.Messages.EVERYONE_POPOUT_ESC.format())),O("div",{className:_.default.buttonContainer},void 0,O(s.default,{className:_.default.button,onClick:C,type:"submit",autoFocus:!0},void 0,m.default.Messages.EVERYONE_POPOUT_SEND_NOW),O(p.default,{size:p.default.Sizes.SIZE_12,className:_.default.buttonHint},void 0,m.default.Messages.EVERYONE_POPOUT_ENTER.format()))))),g.footer&&O("div",{className:_.default.footer},void 0,O(c.default,{color:y.Colors.PRIMARY_DARK_400,className:_.default.icon}),O(p.default,{},void 0,g.footer))))}T.displayName="ContentWarningPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RESTRICTIONS=void 0;var r=i(n(9325)),a=n(1),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}var l=[{check:function(e,t,n){if(!n)return!1;if(!t.getGuildId())return!1;var a=r.default.extractEveryoneRole(e,t);if(null==a)return!1;if(!r.default.shouldShowEveryoneGuard(a,t))return!1;var i=r.default.everyoneMemberCount(a,t),l=i>100?100:10;return{body:(t.isThread()?o.default.Messages.EVERYONE_POPOUT_BODY_THREAD:o.default.Messages.EVERYONE_POPOUT_BODY).format({role:a,count:(parseInt(i/l,10)*l).toLocaleString()}),footer:o.default.Messages.EVERYONE_POPOUT_FOOTER}},analyticsType:"@Everyone Warning",animation:{dark:n(10315),light:n(10316)}},{check:function(e){return!!a.TOKEN_REGEX.test(e)&&{body:o.default.Messages.TOKEN_POPOUT_BODY}},analyticsType:"API Token Warning"}];t.RESTRICTIONS=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(23)),a=u(n(1216)),o=u(n(8731)),i=u(n(40)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=new RegExp(/@(:?everyone|here)/);function c(e,t){var n,r=0;return t.isThread()?null!==(n=t.memberCount)&&void 0!==n?n:0:(o.default.getProps(t.getGuildId(),t.id).groups.forEach((function(t){"@everyone"!==e&&t.id===l.StatusTypes.OFFLINE||(r+=t.count)})),r)}function p(e){if("string"==typeof e.content){var t;if("inlineCode"===e.type||"codeBlock"===e.type)return null;var n=null===(t=e.content)||void 0===t?void 0:t.match(f);if(n)return n[0]}else if(Array.isArray(e.content)){for(var r,a=s(e.content);!(r=a()).done;){var o=p(r.value);if(null!=o)return o}return null}return null}var v={shouldShowEveryoneGuard:function(e,t){var n=t.getGuildId();return(0,r.default)(n,"isGuildChannel with null guildId"),c(e,t)>30&&i.default.can(l.Permissions.MENTION_EVERYONE,t)},everyoneMemberCount:c,extractEveryoneRole:function(e,t){for(var n,r=s(a.default.parsePreprocessor(t,e));!(n=r()).done;){var o=p(n.value);if(null!=o)return o}return null}};t.default=v},function(e,t,n){e.exports=n.p+"14ce1e8528e32f1a13659e476a3c0716.svg"},function(e,t,n){e.exports=n.p+"273ec1aee7edca70e8038dfcb26436b1.svg"},function(e,t,n){e.exports=n.p+"006ca0d19c6267812c15ff9611d4e6d5.svg"},function(e,t,n){e.exports=n.p+"69599bf4774238ea687b769da6a9595e.svg"},function(e,t,n){e.exports=n.p+"b3bbdcadbdb67b466e9330da22ed0221.svg"},function(e,t,n){e.exports=n.p+"5947547ef2316bb7db5650751f2ccb2f.svg"},function(e,t,n){e.exports=n.p+"c613a8513d53c5b2a4d5941419100a11.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BotTypes",{enumerable:!0,get:function(){return o.BotTagTypes}}),t.default=void 0;s(n(0));var r,a=l(n(9)),o=s(n(1222)),i=l(n(7468));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=function(e){var t=e.name,n=e.discriminator,r=e.invertBotTagColor,l=e.nameColor,u=e.className,s=e.botType,f=e.usernameClass,c=e.discriminatorClass,p=e.botClass,v=e.botVerified,y=void 0!==v&&v,m=e.style,_=e.useRemSizes,h=void 0!==_&&_,E=e.usernameIcon;return d("div",{className:(0,a.default)(u,i.default.nameTag),style:m},void 0,d("span",{className:(0,a.default)(i.default.username,f),style:null!=l?{color:l}:void 0},void 0,E,t),null!=n?d("span",{className:null!=c?c:void 0},void 0,"#",n):null,null!=s?d(o.default,{type:s,invertColor:r,className:(0,a.default)(p,i.default.bot),verified:y,useRemSizes:h}):null)};f.displayName="NameTag";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseBioReact=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(718)),a=i(n(8798)),o=i(n(1284));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var u=(0,i(n(1285)).default)([o.default.BIO_RULES,(0,a.default)({enableBuildOverrides:!1})]),s=r.reactParserFor(u);t.parseBioReact=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.user,n=e.premiumSince,r=e.premiumGuildSince,f=e.openPremiumSettings,v=[];function y(){o.ComponentDispatch.dispatch(s.ComponentActions.POPOUT_CLOSE),(0,l.closeUserProfileModal)(),a.default.open(s.UserSettingsSections.HYPESQUAD_ONLINE)}t.hasFlag(s.UserFlags.STAFF)&&v.push({tooltip:d.default.Messages.STAFF_BADGE_TOOLTIP,onClick:function(){return window.open(s.MarketingURLs.COMPANY,"_blank")},key:u.BadgeKeys.STAFF});t.hasFlag(s.UserFlags.PARTNER)&&v.push({tooltip:d.default.Messages.PARTNER_BADGE_TOOLTIP,onClick:function(){return window.open(s.MarketingURLs.PARTNERS,"_blank")},key:u.BadgeKeys.PARTNER});t.hasFlag(s.UserFlags.CERTIFIED_MODERATOR)&&v.push({tooltip:d.default.Messages.CERTIFIED_MODERATOR_BADGE_TOOLTIP,onClick:function(){return window.open("https://discord.com/moderation","_blank")},key:u.BadgeKeys.CERTIFIED_MODERATOR});t.hasFlag(s.UserFlags.HYPESQUAD)&&v.push({tooltip:d.default.Messages.HYPESQUAD_BADGE_TOOLTIP,onClick:y,key:u.BadgeKeys.HYPESQUAD});t.hasFlag(s.UserFlags.HYPESQUAD_ONLINE_HOUSE_1)&&v.push({tooltip:d.default.Messages.HYPESQUAD_ONLINE_BADGE_TOOLTIP.format({houseName:d.default.Messages.HYPESQUAD_HOUSE_1}),onClick:y,key:u.BadgeKeys.HYPESQUAD_ONLINE_HOUSE_1});t.hasFlag(s.UserFlags.HYPESQUAD_ONLINE_HOUSE_2)&&v.push({tooltip:d.default.Messages.HYPESQUAD_ONLINE_BADGE_TOOLTIP.format({houseName:d.default.Messages.HYPESQUAD_HOUSE_2}),onClick:y,key:u.BadgeKeys.HYPESQUAD_ONLINE_HOUSE_2});t.hasFlag(s.UserFlags.HYPESQUAD_ONLINE_HOUSE_3)&&v.push({tooltip:d.default.Messages.HYPESQUAD_ONLINE_BADGE_TOOLTIP.format({houseName:d.default.Messages.HYPESQUAD_HOUSE_3}),onClick:y,key:u.BadgeKeys.HYPESQUAD_ONLINE_HOUSE_3});t.hasFlag(s.UserFlags.BUG_HUNTER_LEVEL_1)&&v.push({tooltip:d.default.Messages.BUG_HUNTER_BADGE_TOOLTIP,onClick:function(){return window.open(c,"_blank")},key:u.BadgeKeys.BUG_HUNTER_LEVEL_1});t.hasFlag(s.UserFlags.BUG_HUNTER_LEVEL_2)&&v.push({tooltip:d.default.Messages.BUG_HUNTER_BADGE_TOOLTIP,onClick:function(){return window.open(c,"_blank")},key:u.BadgeKeys.BUG_HUNTER_LEVEL_2});t.hasFlag(s.UserFlags.VERIFIED_DEVELOPER)&&v.push({tooltip:d.default.Messages.VERIFIED_DEVELOPER_BADGE_TOOLTIP,key:u.BadgeKeys.EARLY_VERIFIED_DEVELOPER});t.hasFlag(s.UserFlags.PREMIUM_EARLY_SUPPORTER)&&v.push({tooltip:d.default.Messages.EARLY_SUPPORTER_TOOLTIP,onClick:f,key:u.BadgeKeys.EARLY_SUPPORTER});null!=n&&v.push({tooltip:d.default.Messages.PREMIUM_BADGE_TOOLTIP.format({date:n}),onClick:f,key:u.BadgeKeys.PREMIUM});null!=r&&v.push({tooltip:d.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP.format({date:r}),onClick:f,key:p[(0,i.getUserLevel)(r)]});return v};var r,a=f(n(473)),o=n(121),i=n(5935),l=n(8310),u=n(8433),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}var c=s.INVITE_ENDPOINT+"/discord-testers",p=((r={})[s.UserPremiumGuildSubscriptionLevels.LEVEL_1]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_1,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_2]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_2,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_3]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_3,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_4]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_4,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_5]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_5,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_6]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_6,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_7]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_7,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_8]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_8,r[s.UserPremiumGuildSubscriptionLevels.LEVEL_9]=u.BadgeKeys.PREMIUM_GUILD_SUBSCRIPTION_LEVEL_9,r)},function(e,t,n){e.exports=n.p+"1d3c9e1123aee11a325af328609d1274.svg"},function(e,t,n){e.exports=n.p+"dd50d32cf4fee241b2fa022d8c0435ae.svg"},function(e,t,n){e.exports=n.p+"7294cc730410a1caeceeca736f800b42.svg"},function(e,t,n){e.exports=n.p+"496aa1174817ec391612f745dc8e0725.svg"},function(e,t,n){e.exports=n.p+"ce54a4f8c0e133a6f2d60336e7acac7d.svg"},function(e,t,n){e.exports=n.p+"c0c9db2de008e61a1a720581ca175fa1.svg"},function(e,t,n){e.exports=n.p+"556158300f0dca136d3c902586ff1316.svg"},function(e,t,n){e.exports=n.p+"ba38c1c57dfccb94127e53b7ac502a90.svg"},function(e,t,n){e.exports=n.p+"42ecb902decfc8e83a7446a0904b1e18.svg"},function(e,t,n){e.exports=n.p+"46f6a28f462889f1a36cfca2591fcade.svg"},function(e,t,n){e.exports=n.p+"5c6bb5c4640972078fc993f1b5f503ce.svg"},function(e,t,n){e.exports=n.p+"2af69d4f9d2ff38a7cf76fab0907ea7a.svg"},function(e,t,n){e.exports=n.p+"d66ce47c4ab7817190af9544f97e98cc.svg"},function(e,t,n){e.exports=n.p+"f5354673c9cff61c1dcc70081ef774e5.svg"},function(e,t,n){e.exports=n.p+"995ecfdbdf94ad84dd4d802c104e4630.svg"},function(e,t,n){e.exports=n.p+"473dadec13ab7e90e209cc60fccb31c5.svg"},function(e,t,n){e.exports=n.p+"58f11abcf3c13812bff969baaeb84d82.svg"},function(e,t,n){e.exports=n.p+"53828e0c0fb6676440ad11b5d2586241.svg"},function(e,t,n){e.exports=n.p+"e04ce699dcd2fd50d352a384511687a9.svg"},function(e,t,n){e.exports=n.p+"f62be1ec9bdd82d3d77158ad81830e68.svg"},function(e,t,n){e.exports=n.p+"877dc8bece1590e63fac6d5a0cd2a225.svg"},function(e,t,n){e.exports=n.p+"62ac6016dc438a1fe4926ed43d3fe280.webm"},function(e,t,n){e.exports=n.p+"6b3cc6ff5c09de83cc37561a43304dee.mp4"},function(e,t,n){e.exports=n.p+"1923b5f96b83785235595042bd7f5a0d.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_context_menu_commands",label:"Context Menu Commands",defaultConfig:{allowCommands:!1},treatments:[{id:1,label:"Enables the commands in context menu",config:{allowCommands:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(150),o=n(8290),i=n(8260),l=(r=n(6))&&r.__esModule?r:{default:r};var u=[{id:o.SECTION_BUILT_IN,type:i.ApplicationCommandSectionType.BUILT_IN,name:l.default.Messages.COMMAND_SECTION_BUILT_IN_NAME,icon:a.DEFAULT_AVATARS[0]}];t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(8)),a=n(286),o=n(8290),i=n(8260),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(e){switch(e){case l.ChannelTextAreaIntegrations.GIPHY.title:case l.ChannelTextAreaIntegrations.TENOR.title:return u.default.Messages.COMMAND_GIPHY_DESCRIPTION;default:return""}}var f=[].concat((0,r.default)(l.ChannelTextAreaIntegrations).values().map((function(e){return{id:e.commandId,name:e.command,target:a.ApplicationCommandTarget.CHAT,type:i.ApplicationCommandType.BUILT_IN_INTEGRATION,applicationId:o.SECTION_BUILT_IN,description:d(e.title),options:e.type===l.ChannelTextAreaIntegrationTypes.GIF?[{name:"query",type:i.ApplicationCommandOptionType.STRING,description:u.default.Messages.COMMAND_GIPHY_QUERY_DESCRIPTION,required:!0}]:[],integrationType:e.type,integrationTitle:e.title}})).value());t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l=f(n(3)),u=f(n(2)),s=f(n(8341)),d=f(n(9364));n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){o=null,a=null,r=null,i=null}function v(e){var t=e.guildId;if(o!==t)return!1;y()}function y(){var e;a=null===(e=a)||void 0===e?void 0:e.markStale()}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=r.prototype;return o.initialize=function(){this.waitFor(s.default)},o.getGuildCommands=function(e,t){var n,r;return(null===(n=a)||void 0===n?void 0:n.guildId)===e&&(null===(r=a)||void 0===r?void 0:r.commandTarget)===t?a:null},r}(l.default.Store))(u.default,{LOGOUT:function(e){return p()},CLEAR_GUILD_DISCOVERY_COMMANDS:function(e){return p()},CHANNEL_SELECT:function(e){var t=e.guildId;if(o===t)return!1;o=t,a=null,r=null,i=null},GUILD_APPLICATION_COMMANDS_UPDATE:function(e){var t,n=e.nonce,o=e.applicationCommands;n===r&&null!=i&&(a=null===(t=a)||void 0===t?void 0:t.loadComplete(o,i.isBefore,i.offset,i.commandTarget,i.jumpDescriptor),i=null)},INTEGRATION_DELETE:function(e){var t=e.guildId,n=e.applicationId;if(o!==t)return!1;null!=n&&y()},APPLICATION_COMMAND_DISCOVERY_REQUEST:function(e){var t=e.guildId,n=e.offset,o=e.isBefore,l=e.jumpDescriptor,u=e.nonce,s=e.commandTarget;r=u,i={guildId:t,offset:n,isBefore:o,jumpDescriptor:l,commandTarget:s},null!=a&&a.guildId===t||(a=new d.default(t)),a=a.loadStart()},APPLICATIONS_REQUEST:function(e){var t=e.nonce,n=e.guildId,o=e.commandTarget;r=t,i={guildId:n,offset:0,isBefore:!1,commandTarget:o},(null==a||a.guildId!==n||a.isStale)&&(a=new d.default(n))},APPLICATION_COMMAND_CREATE:v,APPLICATION_COMMAND_DELETE:v,APPLICATION_COMMAND_UPDATE:v});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(8279);t.default=function e(t){var n=this;this.commandTarget=null,this.commandsArray=[],this._map={},this._commandIds=new Set,this.topOffset=-1,this.bottomOffset=-1,this.jumpDescriptor=null,this.jumpSequenceId=1,this.loadingMore=!1,this.isStale=!1,this.mutate=function(t){var r=new e(n.guildId);return r.commandTarget=n.commandTarget,r.commandsArray=n.commandsArray,r._map=n._map,r._commandIds=n._commandIds,r.topOffset=n.topOffset,r.bottomOffset=n.bottomOffset,r.jumpDescriptor=n.jumpDescriptor,r.loadingMore=n.loadingMore,r.jumpSequenceId=n.jumpSequenceId,r.isStale=n.isStale,t(r),r},this.loadStart=function(){return n.mutate((function(e){e.loadingMore=!0,e.jumpDescriptor=null}))},this.loadComplete=function(e,t,r,a,o){return(null!=o?n.reset(e,r):n.merge(e,t)).mutate((function(e){e.jumpDescriptor=o,e.loadingMore=!1,e.commandTarget=a,o&&(e.jumpSequenceId=n.jumpSequenceId+1)}))},this.reset=function(e,t){return n.mutate((function(n){n.commandsArray=(0,r.buildApplicationCommands)(e),n._map={},n.commandsArray.forEach((function(e){return n._map[e.id]=e})),n._commandIds.clear(),e.forEach((function(e){return e.id&&n._commandIds.add(e.id)})),n.topOffset=t,n.bottomOffset=Math.max(t+e.length-1,t),n.isStale=!1}))},this.merge=function(e,t){return n.mutate((function(n){var a=e.filter((function(e){return null!=e.id&&(!n._commandIds.has(e.id)&&(n._commandIds.add(e.id),!0))})).length,o=(0,r.buildApplicationCommands)(e).filter((function(e){var t=n._map[e.id];return n._map[e.id]=e,null==t||(n.commandsArray[n.commandsArray.indexOf(t)]=e,!1)}));n.commandsArray=t?[].concat(o,n.commandsArray):[].concat(n.commandsArray,o),a>0&&(t?n.topOffset-=a:n.bottomOffset+=a,n.topOffset=-1===n.topOffset?0:n.topOffset,n.bottomOffset=-1===n.bottomOffset?0:n.bottomOffset,n.isStale=!1)}))},this.markStale=function(){return n.mutate((function(e){e.isStale=!0}))},this.guildId=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a,o=f(n(0)),i=f(n(248)),l=f(n(150)),u=n(8260),s=(r=n(7476))&&r.__esModule?r:{default:r};function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.section,n=e.isSelected,r=e.width,a=e.height,d=e.className,f=o.useState(!1),p=f[0],v=f[1],y=o.useCallback((function(){return v(!0)}),[]),m=o.useCallback((function(){return v(!1)}),[]),_=o.useMemo((function(){switch(t.type){case u.ApplicationCommandSectionType.GUILD:return l.default.getApplicationIconURL({id:t.id,icon:t.icon,bot:t.bot});case u.ApplicationCommandSectionType.DM:return l.default.getUserAvatarURL({id:t.id,avatar:t.icon,discriminator:"0",bot:!0})}return l.DEFAULT_AVATARS[0]}),[t]);return c("div",{className:d,onFocus:y,onBlur:m,onMouseOver:y,onMouseLeave:m},void 0,c(i.default,{className:s.default.mask,mask:n||p?i.MaskIDs.SQUIRCLE:i.MaskIDs.AVATAR_DEFAULT,width:r,height:a},void 0,c("img",{alt:"",className:s.default.icon,style:{width:r,height:a},src:_})))}p.displayName="ApplicationCommandDiscoveryApplicationIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(8606)),l=n(8260),u=s(n(7477));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e){var t,n=e.section,r=e.className,s=e.width,d=e.height,p=e.padding,v=e.isSelected,y=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["section","className","width","height","padding","isSelected"]),m=function(e){if(e.type===l.ApplicationCommandSectionType.BUILT_IN)return i.default}(n);return f("div",{className:(0,o.default)(u.default.wrapper,r,(t={},t[u.default.selected]=v,t)),style:{width:s,height:d,padding:null!=p?p:0}},void 0,null!=m?a.createElement(m,c({className:u.default.icon,width:s,height:d},y)):null)}p.displayName="ApplicationCommandDiscoverySectionIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(1251)),o=i(n(7478));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=u(a.default,{dotRadius:4,themed:!0}),d=function(){return u("div",{className:o.default.loadingWrapper},void 0,s)};d.displayName="ApplicationCommandLoadingMenuItem";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_AGE_OPTIONS=t.INVITE_OPTIONS_FOREVER=t.INVITE_OPTIONS_7_DAYS=t.INVITE_OPTIONS_1_DAY=t.INVITE_OPTIONS_12_HOURS=t.INVITE_OPTIONS_6_HOURS=t.INVITE_OPTIONS_1_HOUR=t.INVITE_OPTIONS_30_MINUTES=t.MAX_USES_OPTIONS=t.INVITE_OPTIONS_100_TIMES=t.INVITE_OPTIONS_50_TIMES=t.INVITE_OPTIONS_25_TIMES=t.INVITE_OPTIONS_10_TIMES=t.INVITE_OPTIONS_5_TIMES=t.INVITE_OPTIONS_ONCE=t.INVITE_OPTIONS_UNLIMITED=void 0;var r,a=(r=n(6))&&r.__esModule?r:{default:r};function o(e,t){return{value:e,get label(){return t()}}}var i=o(0,(function(){return a.default.Messages.MAX_USES.format({maxUses:0})}));t.INVITE_OPTIONS_UNLIMITED=i;var l=o(1,(function(){return a.default.Messages.MAX_USES.format({maxUses:1})}));t.INVITE_OPTIONS_ONCE=l;var u=o(5,(function(){return a.default.Messages.MAX_USES.format({maxUses:5})}));t.INVITE_OPTIONS_5_TIMES=u;var s=o(10,(function(){return a.default.Messages.MAX_USES.format({maxUses:10})}));t.INVITE_OPTIONS_10_TIMES=s;var d=o(25,(function(){return a.default.Messages.MAX_USES.format({maxUses:25})}));t.INVITE_OPTIONS_25_TIMES=d;var f=o(50,(function(){return a.default.Messages.MAX_USES.format({maxUses:50})}));t.INVITE_OPTIONS_50_TIMES=f;var c=o(100,(function(){return a.default.Messages.MAX_USES.format({maxUses:100})}));t.INVITE_OPTIONS_100_TIMES=c;var p=[i,l,u,s,d,f,c];t.MAX_USES_OPTIONS=p;var v=o(1800,(function(){return a.default.Messages.DURATION_MINUTES.format({minutes:30})}));t.INVITE_OPTIONS_30_MINUTES=v;var y=o(3600,(function(){return a.default.Messages.DURATION_HOURS.format({hours:1})}));t.INVITE_OPTIONS_1_HOUR=y;var m=o(21600,(function(){return a.default.Messages.DURATION_HOURS.format({hours:6})}));t.INVITE_OPTIONS_6_HOURS=m;var _=o(43200,(function(){return a.default.Messages.DURATION_HOURS.format({hours:12})}));t.INVITE_OPTIONS_12_HOURS=_;var h=o(86400,(function(){return a.default.Messages.DURATION_DAYS.format({days:1})}));t.INVITE_OPTIONS_1_DAY=h;var E=o(604800,(function(){return a.default.Messages.DURATION_DAYS.format({days:7})}));t.INVITE_OPTIONS_7_DAYS=E;var g=o(0,(function(){return a.default.Messages.MAX_AGE_NEVER}));t.INVITE_OPTIONS_FOREVER=g;var S=[v,y,m,_,h,E,g];t.MAX_AGE_OPTIONS=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(23)),i=n(3),l=n(389),u=h(n(8322)),s=h(n(8264)),d=h(n(8268)),f=h(n(10)),c=h(n(56)),p=h(n(70)),v=h(n(12)),y=h(n(8426)),m=h(n(278)),_=h(n(258));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function O(e){var t=e.className,n=e.userId,r=e.channelId,h=(0,i.useStateFromStores)([v.default],(function(){return v.default.getUser(n)})),E=(0,i.useStateFromStores)([f.default],(function(){return f.default.getChannel(r)})),O=E?E.getGuildId():null,I=null!=h&&null!=O&&null!=r?function(e){(0,l.openContextMenu)(e,(function(e){return a.createElement(u.default,S({},e,{user:h,channelId:r,guildId:O}))}))}:void 0,T=(0,i.useStateFromStores)([f.default,c.default,p.default],(function(){return _.default.getName(O,r,h)}));return g(m.default,{preload:null==h?void 0:function(){return(0,s.default)(h.id,h.getAvatarURL(O||void 0))},renderPopout:function(e){return(0,o.default)(null!=h,"Unexpected missing user"),a.createElement(d.default,S({userId:h.id,guildId:null!=O?O:void 0,channelId:r},e))},position:m.default.Positions.RIGHT},void 0,(function(e){return a.createElement(y.default,S({className:t,onContextMenu:I},e),"@"+T)}))}O.displayName="UserMention"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{content:l(o.default,{message:e}),hasSpoilerEmbeds:!1}};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(8609))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateAnalyticsMetadata=function(e,t,n){var a,o=null!=t?((a={})[t]=1,a):{},i=null!=n?n:{},l=i.offset,u=i.limit,s=i.results,d=i.totalResults;return{search_type:r.SearchTypes.GIF,load_id:e,limit:u,offset:l,page:null!=u&&null!=l?Math.floor(l/u)+1:1,total_results:d,page_results:s?s.length:null,num_modifiers:Object.keys(o).length,modifiers:o}};var r=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=D(n(0)),o=R(n(9)),i=R(n(5)),l=R(n(3)),u=R(n(473)),s=n(8614),d=R(n(8273)),f=R(n(8299)),c=n(42),p=R(n(11)),v=R(n(8557)),y=R(n(120)),m=R(n(12)),_=R(n(257)),h=R(n(373)),E=R(n(29)),g=R(n(61)),S=R(n(55)),O=R(n(8508)),I=n(41),T=R(n(13)),C=D(n(402)),b=R(n(8834)),M=n(8835),N=n(1),A=R(n(6)),P=R(n(7556));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(){return(w=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}).apply(this,arguments)}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),e}function U(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,G(e,t)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(e){var t=e.onClick,n=e.libraryApplication;return F(g.default,{className:P.default.libraryLink,onClick:t},void 0,F(O.default,{className:P.default.libraryIcon}),F("div",{},void 0,n.isHidden()?A.default.Messages.APPLICATION_STORE_PURCHASE_IN_LIBRARY_HIDDEN:A.default.Messages.APPLICATION_STORE_PURCHASE_IN_LIBRARY))}B.displayName="LibraryLink";var H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderMedia=function(){var e;return F("div",{className:(0,o.default)(P.default.invalidPoop,(e={},e[P.default.invalidPoopHorizontal]=t.isHorizontal,e))})},t.renderTitle=function(){return t.props.isSelfGift?A.default.Messages.GIFT_EMBED_INVALID_TITLE_SELF:A.default.Messages.GIFT_EMBED_INVALID_TITLE_OTHER},t.renderActions=function(){return t.props.isSelfGift?F(E.default,{size:E.default.Sizes.SMALL,onClick:t.handleViewInventory},void 0,A.default.Messages.GIFT_INVENTORY):F(E.default,{disabled:!0,size:E.default.Sizes.SMALL},void 0,A.default.Messages.GIFT_EMBED_BUTTON_ACCEPT)},t.renderTagline=function(){return t.props.isSelfGift?A.default.Messages.GIFT_EMBED_INVALID_TAGLINE_SELF:A.default.Messages.GIFT_EMBED_INVALID_TAGLINE_OTHER},t}U(t,e);var n=t.prototype;return n.handleViewInventory=function(){u.default.open(N.UserSettingsSections.INVENTORY)},n.render=function(){return F(s.ResponsiveEmbedTile,{isHorizontal:this.isHorizontal,renderTitle:this.renderTitle,renderTagline:this.renderTagline,renderMedia:this.renderMedia,renderActions:this.renderActions})},k(t,[{key:"isHorizontal",get:function(){return this.props.width>=s.HORIZONTAL_EMBED_BREAKPOINT}}]),t}(a.PureComponent);H.displayName="InvalidGift";var x=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleViewLibrary=function(e){var n=t.props.libraryApplication;e.preventDefault(),null!=n&&n.isHidden()?(0,c.transitionTo)(N.Routes.APPLICATION_LIBRARY_SETTINGS):(0,c.transitionTo)(N.Routes.APPLICATION_LIBRARY,{state:{applicationId:null!=n?n.id:null}})},t.handleVerificationClick=function(e){e.preventDefault(),u.default.open(N.UserSettingsSections.ACCOUNT)},t.handleAccept=function(e){var n=t.props,r=n.channelId,o=n.code;e.preventDefault(),e.stopPropagation(),T.default.track(N.AnalyticEvents.OPEN_MODAL,{type:"gift_accept",location:w({},t.analyticsLocation,{object:N.AnalyticsObjects.BUTTON_CTA})}),(0,I.openModal)((function(e){return a.createElement(b.default,w({code:o,channelContext:r},e))}))},t.handleEmbedClick=function(e){var n=t.props.giftCode;null!=n&&n.isSubscription&&(e.preventDefault(),u.default.open(N.UserSettingsSections.PREMIUM))},t}U(t,e);var n=t.prototype;return n.renderActions=function(e){var t=this.props.libraryApplication;return F(S.default,{justify:S.default.Justify.BETWEEN},void 0,F(S.default,{},void 0,this.renderButton(e),null==t||e.isSubscription?null:F(B,{onClick:this.handleViewLibrary,libraryApplication:t})),F(S.default,{align:S.default.Align.END,justify:S.default.Justify.END,className:P.default.metadata,direction:S.default.Direction.VERTICAL},void 0,e.hasMultipleCopies?F("div",{},void 0,this.renderGiftCodeCopiesLeft(e)):null,e.redeemed||e.isClaimed||null!=t||null==e.expiresAt?null:F("div",{},void 0,A.default.Messages.GIFT_EMBED_EXPIRATION.format({hours:e.expiresAt.diff((0,i.default)(),"h")}))))},n.renderGiftCodeCopiesLeft=function(e){return(e.isSubscription?A.default.Messages.GIFT_EMBED_SUBSCRIPTIONS_LEFT:A.default.Messages.GIFT_EMBED_COPIES_LEFT).format({remaining:e.remainingUses,total:e.maxUses})},n.renderButton=function(e){var t=this.props,n=t.libraryApplication,r=t.currentUser,o=t.isSelfGift,i={onClick:this.handleAccept,color:E.default.Colors.GREEN},l=!e.isSubscription&&null!=n||!e.isSelfRedeemable&&o||e.isExistingPremiumSubscriptionDisallowed&&r.hasPremiumPerks;return(e.redeemed||l||e.isClaimed||!r.verified)&&(i.color=E.default.Colors.PRIMARY,i.disabled=!0),a.createElement(E.default,w({},i,{size:E.default.Sizes.SMALL}),e.redeemed?A.default.Messages.GIFT_EMBED_BUTTON_CLAIMED:A.default.Messages.GIFT_EMBED_BUTTON_ACCEPT)},n.renderTitle=function(e){var t=this.props,n=t.isSelfGift;return null==t.sku?null:e.isSubscription?n?A.default.Messages.GIFT_EMBED_TITLE_SUBSCRIPTION_SELF:A.default.Messages.GIFT_EMBED_TITLE_SUBSCRIPTION:n?A.default.Messages.GIFT_EMBED_TITLE_SELF:A.default.Messages.GIFT_EMBED_TITLE},n.renderBody=function(e){var t=this.props,n=t.libraryApplication,r=t.isSelfGift,a=t.sku,o=t.gifter,i=t.subscriptionPlan,l=t.currentUser;if(null==a)return A.default.Messages.LOADING;var u=a.isPreorder()?A.default.Messages.PREORDER_SKU_NAME.format({name:a.name}):a.name;if(e.redeemed)return e.isSubscription?A.default.Messages.GIFT_EMBED_BODY_CLAIMED_SELF_SUBSCRIPTION:A.default.Messages.GIFT_EMBED_BODY_CLAIMED_SELF.format({skuName:u,onViewInLibrary:this.handleViewLibrary});if(!e.isSubscription&&null!=n)return A.default.Messages.GIFT_EMBED_BODY_OWNED.format({skuName:u,onViewInLibrary:this.handleViewLibrary});if(e.isClaimed)return A.default.Messages.GIFT_EMBED_BODY_CLAIMED_OTHER;if(!l.verified)return A.default.Messages.GIFT_EMBED_BODY_REQUIRES_VERIFICATION.format({onClick:this.handleVerificationClick});if(r)return e.isSelfRedeemable?A.default.Messages.GIFT_EMBED_BODY_SELF:A.default.Messages.GIFT_EMBED_BODY_SELF_NOT_REDEEMABLE.format({skuName:u});if(e.isExistingPremiumSubscriptionDisallowed)return A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_ALREADY_ACTIVE;if(e.hasMultipleCopies)return null!=o?e.isSubscription?A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_GIVEAWAY.format({username:o.tag,maxUses:e.maxUses,skuName:u}):A.default.Messages.GIFT_EMBED_BODY_GIVEAWAY.format({username:o.tag,totalCopies:e.maxUses,skuName:u}):e.isSubscription?A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_NO_USER_GIVEAWAY.format({maxUses:e.maxUses,skuName:u}):A.default.Messages.GIFT_EMBED_BODY_NO_USER_GIVEAWAY.format({totalCopies:e.maxUses,skuName:u});if(e.isSubscription){if(null==i)throw new Error("How could you let this happen??");return null!=o?(i.interval===N.SubscriptionIntervalTypes.MONTH?A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_DEFAULT_MONTHS:A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_DEFAULT_YEARS).format({username:o.tag,skuName:u,intervalCount:i.intervalCount}):(i.interval===N.SubscriptionIntervalTypes.MONTH?A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_NO_USER_DEFAULT_MONTHS:A.default.Messages.GIFT_EMBED_BODY_SUBSCRIPTION_NO_USER_DEFAULT_YEARS).format({skuName:u,intervalCount:i.intervalCount})}return null!=o?A.default.Messages.GIFT_EMBED_BODY_DEFAULT.format({username:o.tag}):A.default.Messages.GIFT_EMBED_BODY_NO_USER_DEFAULT},n.render=function(){var e=this,t=this.props,n=t.giftCode,r=t.resolved,a=t.width,o=t.isSelfGift;return null==n||n.revoked?r?F(H,{isSelfGift:o,width:a}):F(s.ResponsiveLoadingEmbedTile,{isHorizontal:a>=s.HORIZONTAL_EMBED_BREAKPOINT}):F(M.StoreEmbedWithoutDimensions,{skuId:n.skuId,onEmbedClick:this.handleEmbedClick,analyticsSection:N.AnalyticsSections.GIFT_CODE_EMBED,renderCustomActions:function(){return e.renderActions(n)},renderCustomTitle:function(){return e.renderTitle(n)},renderCustomTagline:function(){return e.renderBody(n)},width:a})},k(t,[{key:"analyticsLocation",get:function(){return w({},this.props.analyticsContext.location,{section:N.AnalyticsSections.GIFT_CODE_EMBED})}}]),t}(a.Component);x.displayName="GiftCodeEmbed";var V=(0,f.default)((0,d.default)(x));var W=l.default.connectStores([v.default,h.default,m.default,y.default,_.default,p.default],(function(e){var t=e.code,n=e.author,r=v.default.get(t),a=null!=r?h.default.get(r.skuId):null;return{sku:a,giftCode:r,gifter:null!=r&&null!=r.userId?m.default.getUser(r.userId):null,subscriptionPlan:null!=r&&null!=r.subscriptionPlanId?_.default.get(r.subscriptionPlanId):null,isSelfGift:null!=r?p.default.getId()===r.userId:p.default.getId()===n.id,currentUser:m.default.getCurrentUser(),resolved:v.default.getIsResolved(t),libraryApplication:null!=a&&null!=r?C.firstLibraryApplicationForGiftCode(r,a,y.default):null}}))(V);t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(62)),a=n(9374),o=i(n(89));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).id=t.id,n.skuId=t.skuId,n.summary=t.summary,n.tagline=t.tagline,n.flavorText=t.flavorText,n.description=t.description,n.carouselItems=t.carouselItems||[],n.childSkuIds=t.childSkuIds||[],n.alternativeSkuIds=t.alternativeSkuIds||[],n.assets=t.assets||[],n.staffNotes=t.staffNotes,n.guild=t.guild,n.thumbnail=t.thumbnail||null,n.boxArt=t.boxArt||null,n.previewVideo=t.previewVideo||null,n.headerBackground=t.headerBackground||null,n.headerLogoDarkTheme=t.headerLogoDarkTheme||null,n.headerLogoLightTheme=t.headerLogoLightTheme||null,n.heroBackground=t.heroBackground||null,n.heroVideo=t.heroVideo||null,n.entitlementBranchId=t.entitlementBranchId||null,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r.createFromServer=function(e){var t=e.staff_notes;return new r({id:e.id,skuId:e.sku.id,summary:e.summary,tagline:e.tagline,flavorText:e.flavor_text,description:e.description,childSkuIds:null!=e.child_skus?e.child_skus.map((function(e){return e.id})):null,alternativeSkuIds:null!=e.alternative_skus?e.alternative_skus.map((function(e){return e.id})):null,carouselItems:null!=e.carousel_items?e.carousel_items.map((function(e){return{assetId:e.asset_id,youtubeVideoId:e.youtube_video_id}})):null,assets:null!=e.assets?e.assets.map(a.transformStoreAssetFromServer):null,staffNotes:null!=t?{content:t.content,user:null!=t.user?new o.default(t.user):null}:null,guild:null!=e.guild?{id:e.guild.id,name:e.guild.name,icon:e.guild.icon,approximateMemberCount:e.guild.approximate_member_count,approximatePresenceCount:e.guild.approximate_presence_count}:null,thumbnail:null!=e.thumbnail?(0,a.transformStoreAssetFromServer)(e.thumbnail):null,previewVideo:null!=e.preview_video?(0,a.transformStoreAssetFromServer)(e.preview_video):null,headerBackground:null!=e.header_background?(0,a.transformStoreAssetFromServer)(e.header_background):null,headerLogoDarkTheme:null!=e.header_logo_dark_theme?(0,a.transformStoreAssetFromServer)(e.header_logo_dark_theme):null,headerLogoLightTheme:null!=e.header_logo_light_theme?(0,a.transformStoreAssetFromServer)(e.header_logo_light_theme):null,boxArt:null!=e.box_art?(0,a.transformStoreAssetFromServer)(e.box_art):null,heroBackground:null!=e.hero_background?(0,a.transformStoreAssetFromServer)(e.hero_background):null,heroVideo:null!=e.hero_video?(0,a.transformStoreAssetFromServer)(e.hero_video):null,entitlementBranchId:e.entitlement_branch_id})},r.prototype.isSlimDirectoryVersion=function(){return null==this.description},r}(r.default);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformStoreAssetFromServer=function(e){return{id:e.id,filename:e.filename,size:e.size,width:e.width,height:e.height,mimeType:e.mime_type}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=c(n(473)),o=c(n(8735)),i=n(1225),l=n(8289),u=n(280),s=c(n(5953)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e){return null!=(null==e?void 0:e.getGuildId())?d.AnalyticsPages.GUILD_CHANNEL:(null==e?void 0:e.isGroupDM())||(null==e?void 0:e.isPrivate())?d.AnalyticsPages.DM_CHANNEL:null}function m(e){var t=e.channel,c=e.onClose,p=e.content,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channel","onClose","content"]);return r.createElement(s.default,v({artURL:n(8887),type:u.PremiumUpsellTypes.MESSAGE_LENGTH_UPSELL,title:f.default.Messages.PREMIUM_MESSAGE_LENGTH_ROADBLOCK_MODAL_HEADER,body:f.default.Messages.PREMIUM_MESSAGE_LENGTH_ROADBLOCK_MODAL_BODY.format({maxLength:d.MAX_MESSAGE_LENGTH,onLearnMore:function(){c(),a.default.open(d.UserSettingsSections.PREMIUM,null,{openWithoutBackstack:!0})}}),premiumType:d.PremiumTypes.TIER_2,analyticsSource:{page:y(t)},analyticsLocation:{section:d.AnalyticsSections.MESSAGE_LENGTH_UPSELL_MODAL,object:d.AnalyticsObjects.BUTTON_CTA},onClose:c,secondaryCTA:f.default.Messages.PREMIUM_MESSAGE_LENGTH_UPSELL_MODAL_UPLOAD,onSecondaryClick:function(){c();var e=new Blob([p],{type:"text/plain"});(0,o.default)([(0,l.makeFile)(e,"message.txt")],t,i.DraftType.ChannelMessage,!1,!0,!0,!0)}},m))}m.displayName="PremiumMessageLengthRoadblockUpsell"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(23)),a=l(n(419)),o=l(n(9377)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._handleXHRProgress=function(e){t._handleProgress(e.loaded,e.total)},t}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),o.prototype.upload=function(t,n){var o=this;void 0===n&&(n={});var l=n,u=l.hasSpoiler,s=l.filename,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(l,["hasSpoiler","filename"]);e.prototype.upload.call(this,t,d);var f=a.default.post(this._url),c=u?i.SPOILER_ATTACHMENT_PREFIX:"";f.attach("file",t,""+c+(null!=s?s:t.name)),f.field("payload_json",JSON.stringify(d)),f.end((function(e,t){var n;null!=t&&t.ok?o._handleComplete():o._handleError(null==t||null===(n=t.body)||void 0===n?void 0:n.code)}));var p=f.xhr;(0,r.default)(null!=p,"Unexpected null XHR"),p.upload?p.upload.onprogress=this._handleXHRProgress:p.addEventListener("progress",this._handleXHRProgress,!1),this._handleStart((function(){return f.abort()}))},o}(o.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(64)),a=o(n(8));function o(e){return e&&e.__esModule?e:{default:e}}function i(){return(i=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}).apply(this,arguments)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._lastUpdate=0,n._loaded=0,n._aborted=!1,n._handleStart=function(e){n._cancel=e,n.emit("start",n._file)},n._handleProgress=function(e,t){var r=Date.now(),a=Math.min(Math.floor(e/t*100),100),o=Math.floor((e-n._loaded)/((r-n._lastUpdate)/1e3));n._lastUpdate=r,n._loaded=e,n._file=i({},n._file,{size:t,progress:a,rate:o}),n.emit("progress",n._file)},n._handleError=function(e){n._aborted||(n.emit("error",n._file,e),n.removeAllListeners())},n._handleComplete=function(){n.emit("complete",n._file),n.removeAllListeners()},n._url=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var o=r.prototype;return o.cancel=function(){null!=this._cancel&&(this._aborted=!0,this._cancel()),this._handleComplete()},o.upload=function(e,t,n){if(null!=this._cancel)throw new Error("Uploader.upload(...): An upload is already in progress.");this._lastUpdate=Date.now(),this._loaded=0,this._file={id:a.default.uniqueId("Uploader"),name:e.name,size:0,progress:0,rate:0,hasImage:!1,hasVideo:!1,attachmentsCount:0,uris:n}},r}(r.default);t.default=u},,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=L(n(0)),o=P(n(9)),i=P(n(8)),l=n(3),u=n(286),s=n(106),d=n(8392),f=P(n(8618)),c=n(8277),p=P(n(15)),v=P(n(12)),y=P(n(8291)),m=P(n(8362)),_=P(n(13)),h=L(n(8311)),E=n(8290),g=P(n(8383)),S=P(n(8341)),O=n(8260),I=n(8279),T=n(8829),C=P(n(9400)),b=P(n(9401)),M=n(8342),N=n(1),A=P(n(7494));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var w=[8,8,0,8],j=i.default.debounce((function(e,t,n,r,a){h.getApplicationDiscoveryCommands(e,t,r,n,u.ApplicationCommandTarget.CHAT,a)}),100,{maxWait:100}),k=i.default.debounce((function(){_.default.track(N.AnalyticEvents.APPLICATION_COMMAND_BROWSER_SCROLLED)}),300),U=a.forwardRef((function(e,t){var n=e.channel,r=e.canOnlyUseTextCommands,i=a.useRef(!1),P=a.useRef(null),R=a.useRef(0),L=a.useRef(0),U=a.useRef(null),G=a.useRef(0),F=a.useRef(0),B=a.useRef(null),H=a.useState(0),x=H[0],V=H[1],W=a.useState(0),Y=W[0],z=W[1],K=a.useState(!1),$=K[0],Z=K[1],q=a.useMemo((function(){return{channel:n,guild:null!=n.guild_id?p.default.getGuild(n.guild_id):null}}),[n]),X=(0,T.useApplicationCommandsDiscoveryState)(q,7,u.ApplicationCommandTarget.CHAT,r),J=X.discoverySections,Q=X.applicationCommandSections,ee=X.commands,te=X.guildCommands,ne=X.hasMoreBefore,re=X.hasMoreAfter,ae=X.sectionsOffset;a.useEffect((function(){Q.length>1&&(0,c.hideHotspot)(c.HotspotLocations.APPLICATION_COMMAND_TOOLTIP)}),[Q.length]);var oe=a.useMemo((function(){return J.map((function(e){return e.data.length}))}),[J]);a.useLayoutEffect((function(){if(null!=te){var e=!1,t=te.jumpDescriptor;if(null!=t&&te.jumpSequenceId!==G.current){if(null==t.sectionId)window.requestAnimationFrame((function(){var e,n;return null===(e=B.current)||void 0===e?void 0:e.scrollTo(null!==(n=t.offset)&&void 0!==n?n:0)}));else{var n=J.findIndex((function(e){return e.section.id===t.sectionId}));if(n>=0){for(var r,a=0,o=0;o<n;o++)a+=J[o].data.length;z(a),null===(r=B.current)||void 0===r||r.scrollToSectionTop(n,{offset:t.offset})}}G.current=te.jumpSequenceId,e=!0,_.default.track(N.AnalyticEvents.APPLICATION_COMMAND_BROWSER_JUMPED,{target_application_id:null==t?void 0:t.sectionId})}if(ee.length>0&&ee[0].id!==P.current){if(!e&&null!=P.current){var i=ee.findIndex((function(e){return e.id===P.current})),l=R.current,u=i;if(ne||(u-=7),0!==u){z(Y+u);var s=B.current;if(!$&&null!=l&&null!=s){var d=l+u,f=s.getRowDescriptors()[d>=0?d:0];null!=f&&window.requestAnimationFrame((function(){var e;null===(e=B.current)||void 0===e||e.scrollTo(f.offset.top+L.current)}))}}}P.current=ee[0].id}}}),[ee,J,te,ne,$,oe,Y]);var ie=(0,l.useStateFromStores)([S.default],(function(){return null==n.guild_id?null:S.default.getRemoteGuildApplications(n.guild_id)}),[n.guild_id]),le=a.useCallback((function(e,t,r,a){void 0===r&&(r=E.DISCOVERY_COMMANDS_QUERY_LIMIT),null!=n.guild_id&&j(n.guild_id,e,t,r,a)}),[n.guild_id]);a.useEffect((function(){if((0,s.trackWithMetadata)(N.AnalyticEvents.APPLICATION_COMMAND_BROWSER_OPENED),null!=n.guild_id)h.queryGuildApplications(n.guild_id,E.DISCOVERY_COMMANDS_QUERY_LIMIT,u.ApplicationCommandTarget.CHAT);else if(n.type===N.ChannelTypes.DM){var e=v.default.getUser(n.getRecipientId());!0===(null==e?void 0:e.bot)&&null==g.default.getCommands(e.id,u.ApplicationCommandTarget.CHAT)&&h.queryDmApplicationCommands(e.id,u.ApplicationCommandTarget.CHAT)}return function(){return h.clearGuildDiscoveryCommands()}}),[n]),a.useEffect((function(){null!=te&&te.isStale&&le(0,!1,E.DISCOVERY_COMMANDS_QUERY_LIMIT,{sectionId:null,offset:0})}),[n.guild_id]),a.useEffect((function(){null!=B.current&&$&&B.current.scrollRowIntoView(Y)}),[$,Y]);var ue=a.useCallback((function(e){return e===J.length-1&&!re?0:16}),[J.length,re]),se=a.useCallback((function(e){var t;(h.setActiveCommand(e),(null==e?void 0:e.id)&&e.id!==U.current)&&((0,s.trackWithMetadata)(N.AnalyticEvents.APPLICATION_COMMAND_SELECTED,{command_id:null!==(t=e.rootId)&&void 0!==t?t:e.id,application_id:e.applicationId}),U.current=e.id)}),[U]),de=a.useCallback((function(e){var t=J.findIndex((function(t){return t.section.id===e.id}));if(t>=0){var n;null===(n=B.current)||void 0===n||n.scrollToSectionTop(t)}else{var r=Q.findIndex((function(t){return t.id===e.id})),a=Math.max(ae[r]-E.DISCOVERY_COMMANDS_QUERY_LIMIT,0);le(a,!1,2*E.DISCOVERY_COMMANDS_QUERY_LIMIT,{sectionId:Q[r].id})}}),[Q,J,le,ae]);a.useImperativeHandle(t,(function(){return{onTabOrEnter:function(){var e=ee[Y-(ne?7:0)];return null!=e&&se(e),!0},onMoveSelection:function(e){if(0===ee.length)return!0;var t=ne?7:0,n=re?7:0,r=ee.length+t+n,a=Y+e;return a>=r?a=r-1:a<0&&(a=0),z(a),Z(!0),!0}}}),[ee,re,ne,se,Y]);var fe=a.useCallback((function(e,t){var r=J[t.sectionIndex],a=null==r?void 0:r.data[t.sectionRowIndex];return null==a||r.section.id!==a.applicationId||a.type===O.ApplicationCommandType.PLACEHOLDER?D(b.default,{},a.id):D(y.default.NewCommand,{index:e,command:a,channel:n,className:A.default.itemWrapper,selected:Y===e,onClick:function(){return se(a)},onHover:function(){z(e),Z(!1)}},a.id)}),[n,J,se,Y]),ce=a.useCallback((function(e){var t=J[e].section;if(null==t)return null;var n=D((0,M.getIconComponent)(t),{section:t,width:16,height:16,padding:0});return D(f.default,{className:A.default.categoryHeader,icon:n},e,(0,I.getApplicationCommandSectionName)(t))}),[J]),pe=a.useCallback((function(e,t){var r;if(null==ie&&null!=n.guild_id)return null;var a=e===J.length-1;return D("div",{className:(0,o.default)(A.default.categorySection,(r={},r[A.default.categorySectionLast]=a,r))},e,t)}),[n.guild_id,J.length,ie]),ve=(0,d.useSynchronizedActiveCategoryIndexForScrollPosition)({activeCategoryIndex:x,isScrolling:i,listRef:B,onActiveCategoryIndexChange:function(e){var t,n,r=null===(t=B.current)||void 0===t?void 0:t.getRowDescriptors(),a=null==r||null===(n=r[0])||void 0===n?void 0:n.sectionIndex,o=Q.findIndex((function(e){var t;return e.id===(null===(t=J[null!=a?a:0])||void 0===t?void 0:t.section.id)}));o<0||V(e+o)},scrollOffset:20,searchQuery:""});return D(y.default,{className:A.default.outerWrapper,innerClassName:A.default.wrapper,onMouseDown:function(e){e.preventDefault()}},void 0,D(C.default,{className:A.default.rail,sections:Q,activeSectionIndex:x,onSectionClick:de}),a.createElement(m.default,{className:A.default.list,listPadding:w,onScroll:function(e){var t,r;if(null!=te&&null!=n.guild_id&&!te.loadingMore){var a=48*Q.length+56*ee.length-56*(ne?7:0)-56*(re?7:0)-512;if(te.isStale&&(e<512||e+420>a)){var o,i=(null!==(o=R.current)&&void 0!==o?o:0)+te.topOffset,l=L.current+32,s=Math.ceil(388/56),d=Math.max(S.default.getTotalGuildCommands(n.guild_id,u.ApplicationCommandTarget.CHAT)-s,0);i>d&&(l-=56*((i=d)-d)),i<0&&(i=0),l<0&&(l=0),ne||0===i?ne&&0===i&&(l-=392):l+=392,le(i,!1,E.DISCOVERY_COMMANDS_QUERY_LIMIT,{sectionId:null,offset:l})}else ne&&e<512?le(Math.max(te.topOffset-E.DISCOVERY_COMMANDS_QUERY_LIMIT,0),!0):re&&e+420>a&&le(te.bottomOffset,!1)}ve(e),F.current=e;var f=function(e){var t,n=null===(t=B.current)||void 0===t?void 0:t.getRowDescriptors();if(null==n||0===n.length)return null;for(var r=1;r<n.length;r++)if(e<=n[r].offset.top)return r-1;return n.length-1}(e);R.current=f;var c=null!=f&&null!==(t=null===(r=B.current)||void 0===r?void 0:r.getRowDescriptors()[f].offset.top)&&void 0!==t?t:0;L.current=e-c,k()},renderRow:fe,renderSection:pe,renderSectionHeader:ce,rowCount:J.length,rowCountBySection:oe,rowHeight:56,sectionHeaderHeight:32,sectionMarginBottom:ue,ref:B,stickyHeaders:!0}))}));t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(9)),o=u(n(61)),i=u(n(24)),l=u(n(7488));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t,n,r=e.name,u=e.className,s=e.state,f=e.isInline,c=e.onClick,p=r+(f?":":""),v=null,y=i.default.Colors.HEADER_PRIMARY;(null==s?void 0:s.isActive)&&!f?v=l.default.active:!1===(null==s||null===(t=s.lastValidationResult)||void 0===t?void 0:t.success)?v=l.default.error:(null==s?void 0:s.hasValue)&&!f&&(v=l.default.set);var m=d(i.default,{size:f?i.default.Sizes.SIZE_16:i.default.Sizes.SIZE_14,color:y,className:(0,a.default)(l.default.option,(n={},n[l.default.inline]=f,n),v,u)},void 0,p);return null==c?m:d(o.default,{className:l.default.clickable,onClick:function(){return c(r)}},void 0,m)}f.displayName="ApplicationCommandItemOption"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,d:"M19.0999 3.99994V5.12653L4.84988 8.26441V18.1176C4.84988 18.5496 5.14628 18.9251 5.56998 19.0315L9.36998 19.9726C9.44598 19.9905 9.52388 19.9999 9.59988 19.9999C9.89533 19.9999 10.1775 19.8635 10.3599 19.6235L10.5599 19.3593V16.2214L9.21798 17.9943L6.74988 17.3825V15.2112L10.5599 16.0509V13.92C10.5599 12.3294 11.8493 11.04 13.4399 11.04H20.9999V3.99994H19.0999Z"}),s("path",{className:f,fill:d,d:"M3.89988 8.25994H1.99988V15.2941H3.89988V8.25994Z"}),s("path",{className:f,fill:d,d:"M12.48 13.92C12.48 13.3898 12.9098 12.96 13.44 12.96H22.56C23.0901 12.96 23.52 13.3898 23.52 13.92V20.2213C23.52 20.7514 23.0901 21.1813 22.56 21.1813H18.1294C17.8916 21.1813 17.6623 21.2695 17.4858 21.4289L15.0408 23.6378C14.8865 23.7772 14.64 23.6677 14.64 23.4597V21.4213C14.64 21.2887 14.5325 21.1813 14.4 21.1813H13.44C12.9098 21.1813 12.48 20.7514 12.48 20.2213V13.92Z"}))}d.displayName="AnnouncementThreadIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground;return o("svg",{className:u,width:n,height:a,viewBox:"0 0 16 16"},void 0,o("g",{fill:"none",fillRule:"evenodd"},void 0,o("path",{className:e.background,fill:l,d:"M14,8.99751269 L14,11.6666667 L11.3333333,9 L11.3333333,11.3333333 C11.3333333,11.7 11.0333333,12 10.6666667,12 L2.66666667,12 C2.3,12 2,11.7 2,11.3333333 L2,4.66666667 C2,4.3 2.3,4 2.66666667,4 L9.01132709,4 L9.00227441,7.99603187 L9.00227328,7.9999947 C9.00321074,8.55227865 9.4516853,8.9992333 10.0039693,8.99829584 L11.96,8.99497564 L14,8.99751269 Z",opacity:".6"}),o("path",{className:s,fill:l,fillRule:"nonzero",d:"M15.1,3.2 L15.1,2 C15.1,0.88 14.05,0 13,0 C11.95,0 10.9,0.88 10.9,2 L10.9,3.2 C10.45,3.2 10,3.68 10,4.16 L10,6.96 C10,7.52 10.45,8 10.9,8 L15.025,8 C15.55,8 16,7.52 16,7.04 L16,4.24 C16,3.68 15.55,3.2 15.1,3.2 Z M14,3 L12,3 L12,1.92857143 C12,1.35714286 12.4666667,1 13,1 C13.5333333,1 14,1.35714286 14,1.92857143 L14,3 Z"})))}i.displayName="CallVideoCameraLimited"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M20.4681 4.76205L22.8092 9.51655C23.1365 10.1812 22.6552 10.96 21.9172 10.96L17.2103 10.96C16.4705 10.96 15.9893 10.1777 16.3201 9.5128L18.686 4.75829C19.0536 4.01951 20.1036 4.02173 20.4681 4.76205ZM19.0832 5.96001H20.0785V8.46001H19.0832L19.0832 5.96001ZM19.0832 9.45888C19.0832 9.7359 19.3061 9.96001 19.5808 9.96001C19.8555 9.96001 20.0784 9.7359 20.0784 9.45888C20.0784 9.18225 19.8555 8.95774 19.5808 8.95774C19.3061 8.95774 19.0832 9.18225 19.0832 9.45888Z"}),s("path",{className:f,fill:d,d:"M16.6811 5.6591L4.84988 8.26437V18.1175C4.84988 18.5495 5.14628 18.9251 5.56998 19.0314L9.36998 19.9726C9.44598 19.9905 9.52388 19.9999 9.59988 19.9999C9.89533 19.9999 10.1775 19.8634 10.3599 19.6234L10.5599 19.3592V16.2214L9.21798 17.9943L6.74988 17.3825V15.2112L10.5599 16.0508V13.9199C10.5599 12.3294 11.8493 11.0399 13.4399 11.0399H13.92L16.6811 5.6591Z"}),s("path",{className:f,fill:d,d:"M3.89988 8.2599H1.99988V15.294H3.89988V8.2599Z"}),s("path",{className:f,fill:d,d:"M13.44 12.96C12.9098 12.96 12.48 13.3898 12.48 13.92V20.2213C12.48 20.7515 12.9098 21.1813 13.44 21.1813H14.4C14.5325 21.1813 14.64 21.2887 14.64 21.4213V23.4597C14.64 23.6677 14.8865 23.7773 15.0408 23.6378L17.4858 21.4289C17.6623 21.2695 17.8916 21.1813 18.1294 21.1813H22.56C23.0901 21.1813 23.52 20.7515 23.52 20.2213V13.92C23.52 13.3898 23.0901 12.96 22.56 12.96H13.44Z"}))}d.displayName="NSFWAnnouncementThreadIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M22.545 4.88V5.88H23.28C23.4126 5.88 23.52 5.98746 23.52 6.12001V10.64C23.52 10.7726 23.4126 10.88 23.28 10.88H17.76C17.6275 10.88 17.52 10.7726 17.52 10.64V6.12C17.52 5.98746 17.6275 5.88 17.76 5.88H18.52V4.88C18.52 3.76 19.47 2.88 20.52 2.88C21.57 2.88 22.545 3.76 22.545 4.88ZM19.52 5.88H21.52V4.88C21.52 4.30858 21.0534 3.88 20.52 3.88C19.9867 3.88 19.52 4.30858 19.52 4.88V5.88Z"}),s("path",{className:f,fill:d,d:"M15.84 5.84438L4.85 8.26441V18.1176C4.85 18.5496 5.1464 18.9251 5.5701 19.0315L9.3701 19.9726C9.4461 19.9905 9.524 19.9999 9.6 19.9999C9.89545 19.9999 10.1776 19.8635 10.36 19.6235L10.56 19.3593V16.2214L9.2181 17.9943L6.75 17.3825V15.2112L10.56 16.0509V13.92C10.56 12.3294 11.8494 11.04 13.44 11.04H15.84V5.84438Z"}),s("path",{className:f,fill:d,d:"M3.9 8.25994H2V15.2941H3.9V8.25994Z"}),s("path",{className:f,fill:d,d:"M13.44 12.96C12.9098 12.96 12.48 13.3898 12.48 13.92V20.2213C12.48 20.7515 12.9098 21.1813 13.44 21.1813H14.4C14.5326 21.1813 14.64 21.2887 14.64 21.4213V23.4597C14.64 23.6677 14.8866 23.7773 15.0409 23.6378L17.4859 21.4289C17.6623 21.2695 17.8917 21.1813 18.1294 21.1813H22.56C23.0902 21.1813 23.52 20.7515 23.52 20.2213V13.92C23.52 13.3898 23.0902 12.96 22.56 12.96H13.44Z"}))}d.displayName="PrivateAnnouncementThreadIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?32:t,r=e.height,a=void 0===r?32:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.025 2V3C22.5635 3 23 3.43652 23 3.975V7C23 7.55228 22.5523 8 22 8H18C17.4477 8 17 7.55228 17 7V4C17 3.44772 17.4477 3 18 3V2C18 0.88 18.95 0 20 0C21.05 0 22.025 0.88 22.025 2ZM19 3H21V2C21 1.42857 20.5333 1 20 1C19.4667 1 19 1.42857 19 2V3Z",fill:d}),s("path",{d:"M15 2.41495C14.0462 2.14467 13.0398 2 12 2C5.93 2 1 6.93 1 13C1 15 1.55 16.88 2.48 18.49L3.77 17.74C2.97 16.35 2.5 14.73 2.5 13C2.5 7.75 6.75 3.5 12 3.5C13.0485 3.5 14.0571 3.66952 15 3.98267V2.41495Z",fill:d}),s("path",{d:"M21.0173 10C21.3305 10.9429 21.5 11.9515 21.5 13C21.5 14.73 21.03 16.35 20.22 17.75L21.51 18.5C22.45 16.88 23 15 23 13C23 11.9602 22.8553 10.9538 22.585 10H21.0173Z",fill:d}),s("path",{d:"M14 13C14 14.1 13.1 15 12 15C10.9 15 10 14.1 10 13C10 11.9 10.9 11 12 11C13.1 11 14 11.9 14 13Z",fill:d}),s("path",{d:"M8.5 19.5V20H15.5V19.5C15.5 17.8 14.06 16.5 12 16.5C9.94 16.5 8.5 17.8 8.5 19.5Z",fill:d}),s("path",{d:"M7 13C7 10.24 9.24 8 12 8C14.76 8 17 10.24 17 13C17 13.91 16.74 14.75 16.31 15.49L17.62 16.25C18.17 15.29 18.5 14.19 18.5 13C18.5 9.42 15.58 6.5 12 6.5C8.42 6.5 5.5 9.42 5.5 13C5.5 14.18 5.82 15.29 6.38 16.25L7.69 15.49C7.26 14.75 7 13.91 7 13Z",fill:d}))}d.displayName="StageLimited"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(280),i=n(8619),l=c(n(248)),u=c(n(13)),s=n(1),d=c(n(6)),f=c(n(7490));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.emojis;a.useEffect((function(){u.default.track(s.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:o.PremiumUpsellTypes.EMOJI_AUTOCOMPLETE_INLINE})}),[]);var n=v("div",{className:f.default.emojis},void 0,t.slice(0,3).map((function(e,n){if(null==e.url)return null;var r=n===t.length-1,a=v("div",{className:f.default.emojiBackground},e.id,v("img",{alt:e.name,className:f.default.emoji,src:e.url}));return r?a:v(l.default,{className:f.default.emojiMask,mask:l.default.Masks.AUTOCOMPLETE_EMOJI_UPSELL_EMOJI},e.id,a)})));return v(i.AutocompleteRowContent,{className:f.default.upsell},void 0,v(i.AutocompleteRowContentPrimary,{},void 0,v(i.AutocompleteRowHeading,{},void 0,d.default.Messages.AUTOCOMPLETE_EMOJI_UPSELL.format({count:t.length}))),v(i.AutocompleteRowContentSecondary,{},void 0,n))};y.displayName="ChannelAutocompleteEmojiUpsell";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=v(n(8621)),l=v(n(61)),u=n(8319),s=v(n(149)),d=n(8260),f=n(8279),c=n(8342),p=v(n(7492));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=[16,12,8,12];function E(e){var t=e.className,n=e.sections,r=e.activeSectionIndex,v=e.onSectionClick,y=a.useCallback((function(e){var t,r;return 32+((null===(t=n[e])||void 0===t?void 0:t.type)===d.ApplicationCommandSectionType.BUILT_IN?0:(null===(r=n[e+1])||void 0===r?void 0:r.type)===d.ApplicationCommandSectionType.BUILT_IN?24:8)}),[n]),E=a.useCallback((function(e){var t=n[e];if(null!=t){var o=(0,c.getIconComponent)(t),i=t.type===d.ApplicationCommandSectionType.BUILT_IN?4:0,y=32-2*i,h=_(o,{section:t,isSelected:r===e,padding:i,width:y,height:y}),E=t.type!==d.ApplicationCommandSectionType.BUILT_IN&&e<n.length-1&&n[e+1].type===d.ApplicationCommandSectionType.BUILT_IN;return _("div",{className:p.default.section},t.id,_(s.default,{text:(0,f.getApplicationCommandSectionName)(t),position:u.Positions.RIGHT},void 0,(function(e){var n=e.onClick,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick"]);return a.createElement(l.default,m({"aria-label":t.name,onClick:function(){v(t),null==n||n()}},r),h)})),E?_("hr",{className:p.default.builtInSeparator}):null)}}),[r,v,n]);return 0===n.length?null:_("div",{className:(0,o.default)(t,p.default.wrapper)},void 0,_(i.default,{activeIndex:r,className:p.default.list,renderCategoryListItem:E,rowCount:n.length,rowHeight:y,listPadding:h}))}E.displayName="ApplicationCommandDiscoverySectionList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8)),o=n(8342),i=l(n(7493));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.showImage,n=a.default.random(60,120),r=a.default.random(200,600),l=a.default.random(45,90);return s("div",{className:i.default.wrapper},void 0,t?s("div",{className:i.default.image}):null,s("div",{className:i.default.infoWrapper},void 0,s("div",{style:{maxWidth:(0,o.pxToRem)(n)},className:i.default.usageWrapper}),s("div",{style:{maxWidth:(0,o.pxToRem)(r)},className:i.default.description})),s("div",{style:{width:(0,o.pxToRem)(l)},className:i.default.source}))};d.displayName="ApplicationCommandLoadingItem";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(680),i=n(3),l=y(n(15)),u=y(n(8291)),s=y(n(165)),d=y(n(468)),f=n(8281),c=n(9403),p=y(n(9404)),v=y(n(7497));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}var E=a.forwardRef((function(e,t){var n,r=e.type,y=e.channel,m=(0,i.useStateFromStores)([l.default],(function(){var e;return null!==(e=l.default.getGuild(y.guild_id))&&void 0!==e?e:null}),[y.guild_id]),E=a.useRef(),g=(0,p.default)(h({},e,{guild:m}),t,E),S=g[0],O=g[1],I=g[2],T=(0,c.useChannelAutocompleteLayerPosition)(r,S);if(!S.isVisible||null==S.query)return null;var C=null!==(n=S.query.typeInfo.renderResults(S.query.results,S.selectedIndex,y,m,S.query.queryText,S.query.options,(function(e){return O.onResultHover(e)}),(function(e){return O.onResultClick(e)})))&&void 0!==n?n:null;if(null==C)return null;var b=_(u.default,{className:v.default.autocomplete,innerClassName:v.default.autocompleteInner,onMouseDown:function(e){return e.preventDefault()}},void 0,_(o.ListNavigatorProvider,{navigator:I},void 0,_(o.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement(d.default,h({ref:function(e){var n;t.current=null!==(n=null==e?void 0:e.getScrollerNode())&&void 0!==n?n:null,E.current=e}},n,{className:v.default.scroller,style:{maxHeight:null!=T?f.LAYER_MAX_HEIGHT:f.DEFAULT_MAX_HEIGHT},role:"listbox"}),C)}))));if(null!=T){var M=T.left,N=T.bottom,A=T.top,P={left:M};return null!=N?P.bottom=N:null!=A&&(P.top=A),_(s.default,{},void 0,_("div",{className:v.default.autocompleteLayer,style:P},void 0,b))}return b}));t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useChannelAutocompleteLayerPosition=function(e,t){return r.useMemo((function(){var n=window.getSelection();if(!(u.includes(e)&&n&&n.anchorNode&&n.isCollapsed&&null!=t.query))return null;var r,o,i=n.anchorNode,s=n.anchorOffset;i.nodeType===Node.TEXT_NODE&&((s-=t.query.queryText.length+(null!==(r=null===(o=t.query.typeInfo.sentinel)||void 0===o?void 0:o.length)&&void 0!==r?r:0))<0&&(s=0));var d=document.createRange();d.setStart(i,s),d.setEnd(i,s);var f=d.getBoundingClientRect(),c=f.y>a.LAYER_MAX_HEIGHT?{bottom:window.innerHeight-f.y}:{top:f.y+a.LAYER_VERTICAL_BUFFER};return l({left:f.x},c)}),[t,e])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(8281),o=n(1);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}var u=[o.TextareaTypes.RULES_INPUT,o.TextareaTypes.FORM]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var y,m,_,E,S,O,I,T=e.channel,C=e.type,b=r.useState((function(){return(0,c.createInitialState)()})),M=b[0],N=b[1],A=(0,a.useStateFromStores)([u.default,f.default],(function(){var e,t,n=f.default.getCurrentUser();return null!==(e=null!=T.guild_id&&null!=n?null===(t=u.default.getMember(T.guild_id,n.id))||void 0===t?void 0:t.isPending:null)&&void 0!==e&&e})),P=(0,a.useStateFromStoresObject)([s.default,d.default],(function(){return{canMentionEveryone:T.isPrivate()||A||C===v.TextareaTypes.RULES_INPUT||s.default.can(v.Permissions.MENTION_EVERYONE,T),hidePersonalInformation:d.default.hidePersonalInformation}}),[T,C,A]),R=P.canMentionEveryone,L=P.hidePersonalInformation,D=(0,a.useStateFromStoresObject)([i.default],(function(){return{activeCommand:i.default.getActiveCommand(),activeCommandOption:i.default.getActiveOption()}})),w=D.activeCommand,j=D.activeCommandOption,k=(0,p.default)({navId:"channel-autocomplete",scrollerRef:n,state:M,onFocus:function(e){return F.setSelectedIndex(e)}}),U=null===(y=e.editorRef.current)||void 0===y?void 0:y.getCurrentWord(),G=g({},e,{navigator:k,activeCommand:w,activeCommandOption:j,canMentionUsers:C!==v.TextareaTypes.RULES_INPUT,canMentionEveryone:R,hidePersonalInformation:L,hideMentionDescription:C===v.TextareaTypes.RULES_INPUT,emojiIntention:C===v.TextareaTypes.RULES_INPUT?v.EmojiIntention.COMMUNITY_CONTENT:v.EmojiIntention.CHAT,currentWord:null!==(m=null==U?void 0:U.word)&&void 0!==m?m:"",currentWordIsAtStart:!0===(null==U?void 0:U.isAtStart),firstText:null!==(_=null===(E=e.editorRef.current)||void 0===E?void 0:E.getFirstText())&&void 0!==_?_:"",optionText:(null==w?void 0:w.type)===l.ApplicationCommandType.BUILT_IN_INTEGRATION&&"query"===(null==j?void 0:j.name)?(0,o.getString)({query:null!==(S=null===(O=e.editorRef.current)||void 0===O?void 0:O.getCurrentCommandOptionValue())&&void 0!==S?S:[]},"query"):""}),F=r.useState((function(){return new c.default(G)}))[0];return r.useEffect((function(){F.updateProps(G)})),r.useImperativeHandle(t,(function(){return F}),[F]),r.useEffect((function(){var e=function(e){return N(e)};return F.on("change",e),function(){F.off("change",e)}}),[F]),r.useEffect((function(){var e,t=null===(e=M.query)||void 0===e?void 0:e.typeInfo.stores;if(null!=t){for(var n,r=function(){return F.queryResults()},a=h(t);!(n=a()).done;){n.value.addChangeListener(r)}return function(){for(var e,n=h(t);!(e=n()).done;){e.value.removeChangeListener(r)}}}}),[F,null===(I=M.query)||void 0===I?void 0:I.typeInfo]),[M,F,k]};var r=_(n(0)),a=n(3),o=n(8434),i=y(n(8280)),l=n(8260),u=y(n(56)),s=y(n(40)),d=y(n(160)),f=y(n(12)),c=_(n(9405)),p=y(n(9417)),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(){return(g=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInitialState=c,t.default=void 0;var r,a=(r=n(64))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8311)),i=n(8849),l=n(8281),u=n(9406);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){return{query:null,selectedIndex:null,isVisible:!1}}var p=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).props=t,n.state={query:null,selectedIndex:null,isVisible:!1},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.updateProps=function(e){var t=this.props.focused!==e.focused,n=this.props.currentWord!==e.currentWord||this.props.currentWordIsAtStart!==e.currentWordIsAtStart||this.props.firstText!==e.firstText||this.props.optionText!==e.optionText||this.props.channel.id!==e.channel.id||this.props.activeCommandOption!==e.activeCommandOption;this.props=e,n?this.updateResults(!0):t&&this.setState({isVisible:this.canShow()&&this.hasResults()})},a.setSelectedIndex=function(e){this.setState({selectedIndex:e})},a.onTabOrEnter=function(e){return null!=this.state.selectedIndex&&this.selectResult(this.state.selectedIndex,e)},a.onMoveSelection=function(e){var t;if(!this.state.isVisible)return!1;if(e<0?this.props.navigator.focusPreviousItem():e>0&&this.props.navigator.focusNextItem(),null!=this.state.selectedIndex&&(null===(t=this.state.query)||void 0===t?void 0:t.type)===l.AutocompleteOptionTypes.COMMANDS){var n,r=null===(n=this.state.query.results.commands)||void 0===n?void 0:n[this.state.selectedIndex];null!=r&&o.setPreferredCommandId(r.id)}return!0},a.onMaybeShowAutocomplete=function(){this.updateResults(!1)},a.onResultHover=function(e){this.props.navigator.setFocus(""+e),this.setSelectedIndex(e)},a.onResultClick=function(e){this.selectResult(e,!0)},a.clearQuery=function(){this.setState({query:null,isVisible:!1,selectedIndex:null})},a.queryResults=function(){this.updateResults(!1)},a.isVisible=function(){return this.state.isVisible},a.updateResults=function(e){var t;if(null!=this.props.editorRef.current){var n=(0,u.getOptions)(this.props),r=(0,u.findMatchingAutocompleteType)(this.props.channel,this.props.guild,n,this.props.currentWord,this.props.currentWordIsAtStart,this.props.firstText,this.props.optionText),a=(0,u.findCommandOptionAutcompleteType)(this.props.activeCommandOption,this.props.currentWord);if(null==r&&null!=a)r=a;else if(null==r||null!=a&&r.type!==a.type)return void this.clearQuery();var o=r,l=o.type,s=o.typeInfo,d=o.query;e=e||(null===(t=this.state.query)||void 0===t?void 0:t.typeInfo)!==r.typeInfo;for(var f=s.queryResults(this.props.channel,this.props.guild,d,n,e),c=f.results,p=f.metadata,v=0,y=0,m=Object.values(c);y<m.length;y++){var _=m[y];Array.isArray(_)&&(v+=_.length)}var h=!0===c.isLoading,E=this.canShow()&&(v>0||h),g=this.state.selectedIndex;!E||h?g=null:null!=g&&g>=v&&(g=v-1),E&&!this.state.isVisible&&(0,i.trackAutocompleteOpen)(l,this.props.channel,p),this.setState({query:{type:l,typeInfo:s,queryText:d,results:c,resultCount:v,options:n,isLoading:h},isVisible:E,selectedIndex:g})}},a.hasResults=function(){return null!=this.state.query&&this.state.query.resultCount>0},a.canShow=function(){return this.props.focused&&null==this.props.expressionPickerView},a.selectResult=function(e,t){var n,r;if(!this.state.isVisible)return!1;var a=this.state.query,o=a.type,u=a.typeInfo,s=a.results,d=a.resultCount,f=a.options;if(e>=d)return!1;var c=null===(n=u.onSelect)||void 0===n?void 0:n.call(u,s,e,t?l.SelectType.SEND:l.SelectType.INSERT,f);return(0,i.trackAutocompleteSelect)(o,null!==(r=null==c?void 0:c.type)&&void 0!==r?r:null,this.props.channel,null==c?void 0:c.metadata),this.clearQuery(),!0},a.setState=function(e){for(var t in e)if(e[t]!==this.state[t])return this.state=d({},this.state,{},e),void this.emit("change",this.state)},r}(a.default);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOptions=function(e){var t=e.activeCommand,n=e.activeCommandOption,o=e.canMentionUsers,l=void 0===o||o,u=e.canMentionRoles,s=void 0===u||u,d=e.canMentionChannels,f=void 0===d||d,c=e.canMentionEveryone,p=e.canExecuteCommands,v=e.useNewSlashCommands,y=e.canOnlyUseTextCommands,m=e.canSendStickers,_=e.hideMentionDescription,h=e.hidePersonalInformation,E=e.type,g=e.emojiIntention,S=e.editorRef,O=e.onSendMessage,I=e.onSendSticker,T={mentions:{channel:i.ChannelMentionMode.DENY,global:i.GlobalMentionMode.DENY,role:i.RoleMentionMode.DENY,user:i.UserMentionMode.DENY},commands:i.CommandMode.DISABLED,allowStickers:!0===m,forNonStringCommandOption:null!=n&&n.type!==r.ApplicationCommandOptionType.STRING,hideMentionDescription:!0===_,hidePersonalInformation:!0===h,textareaType:E,emojiIntention:g,sendMessage:O,sendSticker:I,insertText:function(e,t){var n;null===(n=S.current)||void 0===n||n.insertAutocomplete(e,null!=t?t:e)}};if(null!=n){var C=(0,a.getApplicationCommandOptionQueryOptions)(n);C.canMentionChannels&&(T.mentions.channel=i.ChannelMentionMode.ALLOW_SELECTABLE),C.canMentionEveryone&&(T.mentions.global=C.canMentionHere?i.GlobalMentionMode.ALLOW_EVERYONE_OR_HERE:i.GlobalMentionMode.ALLOW_EVERYONE),C.canMentionRoles&&(T.mentions.role=C.canMentionNonMentionableRoles?i.RoleMentionMode.ALLOW_ALL:i.RoleMentionMode.ALLOW_MENTIONABLE),C.canMentionUsers&&(T.mentions.user=C.canMentionAnyGuildUser?i.UserMentionMode.ALLOW_GUILD:i.UserMentionMode.ALLOW_CHANNEL)}else f&&(T.mentions.channel=i.ChannelMentionMode.ALLOW_SELECTABLE),s&&(T.mentions.role=i.RoleMentionMode.ALLOW_MENTIONABLE),l&&(T.mentions.user=i.UserMentionMode.ALLOW_CHANNEL),c&&(T.mentions.global=i.GlobalMentionMode.ALLOW_EVERYONE_OR_HERE);if(p)if(v){T.commands=y?i.CommandMode.NEW_TEXT_ONLY:i.CommandMode.NEW;var b=T.insertText;T.insertText=function(e,a){var o;(b(e,a),null==t||t.type===r.ApplicationCommandType.BUILT_IN_INTEGRATION||null==n||n.type===r.ApplicationCommandOptionType.STRING&&null==n.choices)||(null===(o=S.current)||void 0===o||o.completeCurrentCommandOption())}}else T.commands=i.CommandMode.OLD_BUILT_INS;return T},t.matchesType=u,t.findMatchingAutocompleteType=function(e,t,n,r,a,s,d){for(var f,c=null,p=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(o.AUTOCOMPLETE_PRIORITY);!(f=p()).done;){var v=f.value,y=o.AUTOCOMPLETE_OPTIONS[v];if(v===i.AutocompleteOptionTypes.GIFS){if(u(v,e,t,d,!1,n)){c={type:v,typeInfo:y,query:d};break}}else if(v===i.AutocompleteOptionTypes.COMMANDS){if(u(v,e,t,s,!0,n)){var m,_;c={type:v,typeInfo:y,query:s.substring(null!==(m=null===(_=y.sentinel)||void 0===_?void 0:_.length)&&void 0!==m?m:0)};break}}else if(u(v,e,t,r,a,n)){var h,E;c={type:v,typeInfo:y,query:r.substring(null!==(h=null===(E=y.sentinel)||void 0===E?void 0:E.length)&&void 0!==h?h:0)};break}}if(null==c)return null;return c.query=c.query.toLocaleLowerCase(),c},t.findCommandOptionAutcompleteType=function(e,t){if(null==e)return null;var n;if(null!=e.choices)n=i.AutocompleteOptionTypes.CHOICES;else switch(e.type){case r.ApplicationCommandOptionType.BOOLEAN:n=i.AutocompleteOptionTypes.CHOICES;break;case r.ApplicationCommandOptionType.CHANNEL:n=i.AutocompleteOptionTypes.CHANNELS;break;case r.ApplicationCommandOptionType.ROLE:case r.ApplicationCommandOptionType.USER:case r.ApplicationCommandOptionType.MENTIONABLE:n=i.AutocompleteOptionTypes.MENTIONS;break;default:return null}var a=o.AUTOCOMPLETE_OPTIONS[n];return{type:n,typeInfo:a,query:t}},t.getDefaultSelectionType=function(e){switch(e){case i.AutocompleteOptionTypes.CHANNELS:return i.AutocompleteSelectionTypes.CHANNEL;case i.AutocompleteOptionTypes.CHOICES:return i.AutocompleteSelectionTypes.CHOICE;case i.AutocompleteOptionTypes.COMMANDS:return i.AutocompleteSelectionTypes.COMMAND;case i.AutocompleteOptionTypes.GIFS:return i.AutocompleteSelectionTypes.GIF;case i.AutocompleteOptionTypes.MENTIONS:return i.AutocompleteSelectionTypes.MENTION;case i.AutocompleteOptionTypes.REACTIONS:return i.AutocompleteSelectionTypes.REACTION;default:throw new Error("Cannot determine selection type")}};var r=n(8260),a=n(8279),o=n(9407),i=n(8281);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,a,i){var l=o.AUTOCOMPLETE_OPTIONS[e];if(null!=l.sentinel){if(!r.startsWith(l.sentinel))return!1;r=r.substring(l.sentinel.length)}return!(null!=l.matches&&!l.matches(t,n,r,a,i))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AUTOCOMPLETE_OPTIONS=t.AUTOCOMPLETE_PRIORITY=void 0;var r,a=n(8281),o=p(n(9408)),i=p(n(8850)),l=p(n(9409)),u=p(n(9410)),s=p(n(9412)),d=p(n(8852)),f=p(n(9415)),c=p(n(9416));function p(e){return e&&e.__esModule?e:{default:e}}var v=[a.AutocompleteOptionTypes.CHOICES,a.AutocompleteOptionTypes.GIFS,a.AutocompleteOptionTypes.COMMANDS,a.AutocompleteOptionTypes.EMOJIS_AND_STICKERS,a.AutocompleteOptionTypes.REACTIONS,a.AutocompleteOptionTypes.CHANNELS,a.AutocompleteOptionTypes.MENTIONS,a.AutocompleteOptionTypes.LEGACY_COMMANDS];t.AUTOCOMPLETE_PRIORITY=v;var y=((r={})[a.AutocompleteOptionTypes.CHANNELS]=o.default,r[a.AutocompleteOptionTypes.COMMANDS]=i.default,r[a.AutocompleteOptionTypes.CHOICES]=l.default,r[a.AutocompleteOptionTypes.EMOJIS_AND_STICKERS]=u.default,r[a.AutocompleteOptionTypes.GIFS]=s.default,r[a.AutocompleteOptionTypes.LEGACY_COMMANDS]=d.default,r[a.AutocompleteOptionTypes.MENTIONS]=f.default,r[a.AutocompleteOptionTypes.REACTIONS]=c.default,r);t.AUTOCOMPLETE_OPTIONS=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(714),a=p(n(10)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(86)),i=p(n(8291)),l=p(n(697)),u=n(8278),s=n(8346),d=n(8281),f=p(n(6));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}var v={sentinel:u.CHANNEL_SENTINEL,matches:function(e,t,n,r,a){return a.mentions.channel!==d.ChannelMentionMode.DENY&&!e.isPrivate()},queryResults:function(e,t,n,a,i){var u=o.GUILD_SELECTABLE_CHANNELS_KEY;return n.charAt(0)===r.AutocompleterQuerySymbols.VOICE_CHANNEL&&(u=o.GUILD_VOCAL_CHANNELS_KEY,n=n.substring(1)),{results:a.forNonStringCommandOption?l.default.queryApplicationCommandChannelResults(n,e):l.default.queryChannelResults(n,e,u)}},renderResults:function(e,t,n,o,l,d,c,p){var v,y,m=e.channels,_=l.charAt(0)===r.AutocompleterQuerySymbols.VOICE_CHANNEL;return _?(v=f.default.Messages.VOICE_CHANNELS_MATCHING,y=f.default.Messages.VOICE_CHANNELS,l=l.substring(1)):d.forNonStringCommandOption?(v=f.default.Messages.CHANNELS_MATCHING,y=f.default.Messages.CHANNELS):(v=f.default.Messages.TEXT_CHANNELS_MATCHING,y=f.default.Messages.TEXT_CHANNELS),(0,s.renderAutocompleteGroup)(l,t,m,c,p,v,y,i.default.Channel,(function(e){return{channel:e,key:e.id,category:a.default.getChannel(e.parent_id)}}),(function(e){return _?""+u.CHANNEL_SENTINEL+r.AutocompleterQuerySymbols.VOICE_CHANNEL+e:""+u.CHANNEL_SENTINEL+e}),"channels")},onSelect:function(e,t,n,r){var a=e.channels[t];return r.insertText(function(e){var t=o.default.getTextChannelNameDisambiguations(e.guild_id)[e.id];return"#"+(null!=t?t.name:e.name)}(a),function(e){return"<#"+e.id+">"}(a)),{type:d.AutocompleteSelectionTypes.CHANNEL}}};t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(8290),a=f(n(8280)),o=n(8260),i=f(n(8291)),l=f(n(697)),u=n(8346),s=n(8281),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}var c={results:{choices:[]}};var p={stores:[a.default],matches:function(e,t,n,r,i){var l=a.default.getActiveOption();return null!=l&&(l.type===o.ApplicationCommandOptionType.BOOLEAN||null!=(null==l?void 0:l.choices)&&l.choices.length>0)},queryResults:function(e,t,n,i,u){var s,d=a.default.getActiveOption();return null==d?c:{results:l.default.queryChoiceResults(n,d.type===o.ApplicationCommandOptionType.BOOLEAN?r.BOOLEAN_CHOICES:null!==(s=d.choices)&&void 0!==s?s:[])}},renderResults:function(e,t,n,r,a,o,l,s){var f=e.choices;return(0,u.renderAutocompleteGroup)(a,t,f,l,s,d.default.Messages.OPTIONS_MATCHING,d.default.Messages.OPTIONS,i.default.Option,(function(e,t){return{key:t.toString(),name:e.name}}),(function(e){return e}),"choice")},onSelect:function(e,t,n,r){var a=e.choices[t];return r.insertText(function(e){return e.name}(a)),{type:s.AutocompleteSelectionTypes.CHOICE}}};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9411)),i=n(1172),l=n(5940),u=g(n(362)),s=n(366),d=g(n(5936)),f=g(n(15)),c=g(n(8291)),p=g(n(697)),v=n(8278),y=n(8346),m=n(8281),_=n(1),h=g(n(6)),E=g(n(7495));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return O(d.default,{sticker:e,isInteracting:t,size:40})}I.displayName="renderSticker";var T={sentinel:v.EMOJI_SENTINEL,stores:[u.default],matches:function(e,t,n,r,a){return n.length>1},queryResults:function(e,t,n,r,a){var u=o.default.getCurrentConfig({}).emojiAutocompleteUpsellEnabled,s=p.default.queryEmojiResults(n,e,r.emojiIntention),d=[];if(r.allowStickers){(0,l.fetchStickerPacks)();var f=p.default.queryStickers([n],!0,[e,function(e,t){return t===i.StickerSendability.SENDABLE}]),c=Math.max(4,8-s.emojis.unlocked.length);d=f.stickers.slice(0,c)}var v=s.emojis.unlocked.slice(0,_.MAX_AUTOCOMPLETE_RESULTS-d.length),y=v.length+d.length<_.MAX_AUTOCOMPLETE_RESULTS&&s.emojis.locked.length>0?[{emojis:s.emojis.locked}]:[];return y.length>0&&o.default.trackExposure({}),{results:{emojis:v,emojisLocked:u?y:[],stickers:d},metadata:{numEmojiResults:v.length,numStickerResults:d.length}}},renderResults:function(e,t,n,r,o,i,l,u){var s=e.emojis,d=e.stickers,p=e.emojisLocked;return a.createElement(a.Fragment,null,(0,y.renderAutocompleteGroup)(o,t,s,l,u,h.default.Messages.EMOJI_MATCHING,h.default.Messages.EMOJI,c.default.Emoji,(function(e){return{emoji:e,key:e.id||e.uniqueName||e.name,sentinel:v.EMOJI_SENTINEL,guild:null!=e.guildId?f.default.getGuild(e.guildId):null}}),(function(e){return""+v.EMOJI_SENTINEL+e}),"emoji"),p.length>0?(0,y.renderAutocompleteGroup)(o,t,p,l,u,0===s.length?h.default.Messages.EMOJI_MATCHING:null,0===s.length?h.default.Messages.EMOJI:null,c.default.EmojiUpsell,(function(e){return{key:"emoji-upsell",emojis:e.emojis}}),(function(e){return""+v.EMOJI_SENTINEL+e}),"emoji-upsell",s.length):null,(s.length>0||p.length>0)&&d.length>0&&O(c.default.Divider,{className:E.default.emojiStickersDivider}),(0,y.renderAutocompleteGroup)(o,t,d,l,u,h.default.Messages.STICKERS_MATCHING,h.default.Messages.STICKER,c.default.Sticker,(function(e){var t=e.comparator,n=e.sticker;return{renderSticker:I,queryMatch:t!==n.name.toLocaleLowerCase()?t:void 0,sticker:n,key:n.id}}),(function(e){return e}),"stickers",s.length+p.length,s.length>0?E.default.stickersHeaderWithEmojiResults:void 0))},onSelect:function(e,t,n,r){var a=e.emojis,o=e.emojisLocked,i=e.stickers;if(t<a.length){var l=a[t];return r.insertText(function(e){return""+v.EMOJI_SENTINEL+e.name+v.EMOJI_SENTINEL}(l),function(e){var t=e.animated?"a":"";return e.managed||null==e.id?""+v.EMOJI_SENTINEL+e.name+v.EMOJI_SENTINEL:"<"+t+":"+(e.originalName||e.name)+":"+e.id+">"}(l)),{type:m.AutocompleteSelectionTypes.EMOJI,metadata:{numEmojiResults:a.length,numStickerResults:i.length}}}if((t-=a.length)<o.length)return{type:null};if((t-=o.length)<i.length){var u=i[t];return r.insertText(""),r.sendSticker(u.sticker,s.StickerSelectLocation.AUTOCOMPLETE),{type:m.AutocompleteSelectionTypes.STICKER,metadata:{numEmojiResults:a.length,numStickerResults:i.length,stickerId:u.sticker.id}}}return{type:null}}};t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEmojiAutocompleteUpsellIOSExperiment=t.EmojiAutocompleteUpsellIOSExperiment=t.default=t.useEmojiAutocompleteUpsellExperiment=t.EmojiAutocompleteUpsellExperiment=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(50);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}var i=(0,a.createExperiment)({kind:"user",id:"2021-03_nitro_emoji_autocomplete_upsell",label:"Emoji Autocomplete Upsell",defaultConfig:{emojiAutocompleteUpsellEnabled:!1},treatments:[{id:1,label:"Show emoji autocomplete upsell",config:{emojiAutocompleteUpsellEnabled:!0}}]});t.EmojiAutocompleteUpsellExperiment=i;t.useEmojiAutocompleteUpsellExperiment=function(e){return r.useEffect((function(){e&&i.trackExposure({})}),[e]),i.useExperiment({})};var l=i;t.default=l;var u=(0,a.createExperiment)({kind:"user",id:"2021-04_nitro_emoji_autocomplete_upsell_ios",label:"Emoji Autocomplete Upsell iOS",defaultConfig:{emojiAutocompleteUpsellEnabled:!1},treatments:[{id:1,label:"Show emoji autocomplete upsell",config:{emojiAutocompleteUpsellEnabled:!0}}]});t.EmojiAutocompleteUpsellIOSExperiment=u;t.useEmojiAutocompleteUpsellIOSExperiment=function(){return u.useExperiment({})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(8)),i=E(n(9413)),l=E(n(106)),u=E(n(8280)),s=n(8260),d=E(n(8851)),f=E(n(8291)),c=E(n(55)),p=E(n(151)),v=n(8278),y=n(8281),m=n(1),_=E(n(6)),h=E(n(7496));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O={results:{command:null,integrations:[],isLoading:!1}};function I(e,t){var n,r,a;t.commands===y.CommandMode.OLD_BUILT_INS?(n=e.split(" ")[0].substring(v.COMMAND_SENTINEL.length),e=e.substring((null!==(r=n.length)&&void 0!==r?r:0)+v.COMMAND_SENTINEL.length)):n=null===(a=u.default.getActiveCommand())||void 0===a?void 0:a.name;return{command:n,query:e.trim()}}function T(e){return e.meta.url}var C={stores:[u.default,d.default],matches:function(e,t,n,r,a){var o;return a.commands!==y.CommandMode.DISABLED&&(a.commands===y.CommandMode.OLD_BUILT_INS?r&&n.startsWith(v.COMMAND_SENTINEL+"giphy")||n.startsWith(v.COMMAND_SENTINEL+"tenor"):(null===(o=u.default.getActiveCommand())||void 0===o?void 0:o.integrationType)===m.ChannelTextAreaIntegrationTypes.GIF&&u.default.getOptionStates().query.hasValue)},queryResults:function(e,t,n,r,a){var l=I(n,r),u=l.command,s=l.query;if(null==u)return O;var f=o.default.findKey(m.ChannelTextAreaIntegrations,(function(e){return e.command===u}));a&&null!=f&&s.length>0&&i.default.search(f,s);var c=d.default.getResults(f,s);return null==c?O:{results:{command:u,integrations:c.results,isLoading:c.loading}}},renderResults:function(e,t,n,r,o,i,l,s){var d=e.integrations,v=e.isLoading,E=I(o,i),g=E.command,O=E.query;if(null==g||0===O.length)return null;if(v)return S(p.default,{className:h.default.spinner,type:p.default.Type.SPINNING_CIRCLE});if(null!=d){var T,C,b=!1,M=d.map((function(e,n){switch(e.type){case m.ChannelTextAreaIntegrationTypes.GIF:return b=!0,S(f.default.GIFIntegration,{className:h.default.horizontalAutocomplete,onClick:s,onHover:l,selected:t===n,index:n,width:e.meta.width||0,height:e.meta.height||0,src:e.meta.src||"",url:e.meta.url},""+e.meta.url+e.meta.src)}})),N=i.commands===y.CommandMode.OLD_BUILT_INS?g:null!==(T=null===(C=u.default.getActiveCommand())||void 0===C?void 0:C.integrationTitle)&&void 0!==T?T:g,A=O.length>0&&null!=N?_.default.Messages.CONTENT_MATCHING.format({query:O,command:N}):null!=N?N:g;return S(a.Fragment,{},"gifs",S(f.default.Title,{title:A}),b?S(c.default,{className:h.default.horizontalAutocompletes},void 0,M):M)}},onSelect:function(e,t,n,r){var a=e.command,o=e.integrations;if(null==a)return{type:null};var i=o[t];if(n===y.SelectType.INSERT?r.insertText(T(i)):r.sendMessage(T(i)),l.default.trackWithMetadata(m.AnalyticEvents.SEARCH_RESULT_SELECTED,{search_type:m.SearchTypes.GIF,index_num:t,source_object:"/"+a}),r.commands!==y.CommandMode.OLD_BUILT_INS){var d=u.default.getActiveCommand();(null==d?void 0:d.type)===s.ApplicationCommandType.BUILT_IN_INTEGRATION&&l.default.trackWithMetadata(m.AnalyticEvents.APPLICATION_COMMAND_USED,{command_id:d.id,application_id:d.applicationId})}return{type:y.AutocompleteSelectionTypes.GIF}}};t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(14)),a=l(n(2)),o=l(n(8851)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u={search:function(e,t){null==o.default.getResults(e,t)&&(a.default.dirtyDispatch({type:i.ActionTypes.INTEGRATION_QUERY,integration:e,query:t}),r.default.get({url:i.Endpoints.INTEGRATION_SEARCH(i.ChannelTextAreaIntegrations[e].command),query:{q:t},oldFormErrors:!0}).then((function(n){a.default.dispatch({type:i.ActionTypes.INTEGRATION_QUERY_SUCCESS,integration:e,query:t,results:n.body})}),(function(){return a.default.dispatch({type:i.ActionTypes.INTEGRATION_QUERY_FAILURE,integration:e,query:t})})))}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-05_application_command_suggestions",label:"Application Command Suggestion experiment",defaultConfig:{showApplicationCommandSuggestions:!1},treatments:[{id:1,label:"Show suggestions",config:{showApplicationCommandSuggestions:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(8291)),i=f(n(697)),l=n(8278),u=n(8346),s=n(8281),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=p(o.default.Divider,{}),y=p(o.default.Divider,{});var m={sentinel:l.MENTION_SENTINEL,matches:function(e,t,n,r,a){return a.mentions.user!==s.UserMentionMode.DENY||a.mentions.role!==s.RoleMentionMode.DENY||a.mentions.global!==s.GlobalMentionMode.DENY},queryResults:function(e,t,n,r,a){var o=r.mentions.global===s.GlobalMentionMode.ALLOW_EVERYONE||r.mentions.global===s.GlobalMentionMode.ALLOW_EVERYONE_OR_HERE,l=r.mentions.global===s.GlobalMentionMode.ALLOW_EVERYONE_OR_HERE,u=r.mentions.user!==s.UserMentionMode.DENY,d=r.mentions.role!==s.RoleMentionMode.DENY,f=r.mentions.user===s.UserMentionMode.ALLOW_GUILD,c=r.mentions.role===s.RoleMentionMode.ALLOW_ALL;return{results:i.default.queryMentionResults(n,e,o,l,u,d,f,c)}},renderResults:function(e,t,n,r,i,f,c,m){var _,h,E=e.users,g=e.globals,S=e.roles,O=E.map((function(e,r){return p(o.default.User,{guildId:n.guild_id,onClick:m,onHover:c,selected:t===r,index:r,user:e.user,nick:e.nick,status:e.status,hidePersonalInformation:f.hidePersonalInformation},e.user.id)})),I=g.map((function(e,n){return p(o.default.Generic,{onClick:m,onHover:c,selected:t===n+E.length,index:E.length+n,text:e.text,description:f.hideMentionDescription?null:e.description,"aria-label":e.text},e.text)})),T=S.map((function(e,n){return p(o.default.Role,{onClick:m,onHover:c,selected:t===n+E.length+g.length,index:E.length+g.length+n,role:e,hideDescription:f.hideMentionDescription},e.id)}));return f.mentions.user===s.UserMentionMode.DENY?(_=d.default.Messages.ROLES_MATCHING,h=d.default.Messages.ROLES):(_=d.default.Messages.MEMBERS_MATCHING,h=d.default.Messages.MEMBERS),p(a.Fragment,{},"mentions",(0,u.renderHeader)(_,h,i,(function(e){return""+l.MENTION_SENTINEL+e})),O,E.length>0&&g.length>0?v:null,I,E.length>0&&S.length>0||g.length>0&&S.length>0?y:null,T)},onSelect:function(e,t,n,r){var a=e.users,o=e.globals,i=e.roles,u=a[t],d=o[t-a.length],f=i[t-a.length-o.length];return null!=u?r.insertText(function(e,t){return t?""+l.MENTION_SENTINEL+e.username:""+l.MENTION_SENTINEL+e.tag}(u.user,r.hidePersonalInformation),function(e){return"<@!"+e.id+">"}(u.user)):null!=d?r.insertText(function(e){return e.text}(d)):null!=f&&r.insertText(function(e){return""+l.MENTION_SENTINEL+e.name}(f),function(e){return"<@&"+e.id+">"}(f)),{type:s.AutocompleteSelectionTypes.MENTION}}};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(40)),a=f(n(8291)),o=f(n(697)),i=n(8278),l=n(8346),u=n(8281),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}var c={sentinel:i.REACTION_START_SENTINEL,matches:function(e,t,n,a,o){return a&&(o.textareaType===s.TextareaTypes.NORMAL||o.textareaType===s.TextareaTypes.SIDEBAR)&&(r.default.can(s.Permissions.ADD_REACTIONS,e)||e.isPrivate())},queryResults:function(e,t,n,r,a){return{results:{emojis:o.default.queryEmojiResults(n,e,s.EmojiIntention.REACTION).emojis.unlocked}}},renderResults:function(e,t,n,r,o,u,s,f){var c=e.emojis;return(0,l.renderAutocompleteGroup)(o,t,c,s,f,d.default.Messages.REACTIONS_MATCHING,d.default.Messages.EMOJI,a.default.Emoji,(function(e){return{emoji:e,key:e.id||e.uniqueName||e.name,sentinel:i.EMOJI_SENTINEL}}),(function(e){return""+i.REACTION_START_SENTINEL+e}),"reactions")},onSelect:function(e,t,n,r){var a=e.emojis[t];return r.sendMessage(function(e){return""+i.REACTION_START_SENTINEL+e.name+i.REACTION_END_SENTINEL}(a)),{type:u.AutocompleteSelectionTypes.REACTION}}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r,l=e.navId,u=e.scrollerRef,s=e.state,d=e.onFocus,f=function(e,t){var n;null===(n=u.current)||void 0===n||n.scrollToTop(),e&&null!=s.query&&(!s.isVisible||!0===t&&!1===s.query.typeInfo.autoFocus?(p.setFocus(null),null==d||d(null)):(p.setFocus("0"),null==d||d(0)))},c=function(e){var t;if(null===(t=u.current)||void 0===t||t.scrollToBottom(),e&&null!=s.query&&s.query.resultCount>0){var n=s.query.resultCount-1;p.setFocus(n.toString()),null==d||d(n)}},p=(0,o.default)({id:l,isEnabled:s.isVisible,orientation:i.Orientations.VERTICAL,useVirtualFocus:!0,setFocus:function(e,t){var n,r=document.querySelector(e);null!=r&&(null===(n=u.current)||void 0===n||n.scrollIntoViewNode({node:r}));null==d||d(+t)},onNavigateNextAtEnd:function(){return f(!0)},onNavigatePreviousAtStart:function(){return c(!0)},scrollToStart:function(){return f(!1,!1),Promise.resolve()},scrollToEnd:function(){return c(!1),Promise.resolve()}});return a.useEffect((function(){f(!0,!0)}),[null===(t=s.query)||void 0===t?void 0:t.type,null===(n=s.query)||void 0===n?void 0:n.queryText,null===(r=s.query)||void 0===r?void 0:r.isLoading,s.isVisible]),p};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(680))&&r.__esModule?r:{default:r},i=n(704);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(9)),i=A(n(8)),l=n(3),u=A(n(274)),s=A(n(9419)),d=A(n(8257)),f=R(n(9124)),c=n(1168),p=A(n(8408)),v=n(398),y=A(n(9461)),m=A(n(39)),_=A(n(29)),h=n(721),E=n(250),g=n(165),S=n(41),O=A(n(13)),I=n(121),T=n(1218),C=n(8365),b=n(1),M=A(n(6)),N=A(n(7531));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return(D=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}).apply(this,arguments)}var w=T.MIN_EXPRESSION_PICKER_WIDTH+c.EmojiSize.MEDIUM,j=a.memo((function(e){var t,n=e.isActive,r=e.className,i=e.viewType,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["isActive","className","viewType"]);return a.createElement(_.default,D({},l,{onClick:function(){O.default.track(b.AnalyticEvents.EXPRESSION_PICKER_TAB_CLICKED,{tab:i,badged:!1}),(0,C.setExpressionPickerView)(i)},"aria-current":n?"page":void 0,className:(0,o.default)(r,N.default.navButton,(t={},t[N.default.navButtonActive]=n,t)),look:_.default.Looks.BLANK,size:_.default.Sizes.NONE}))}));function k(e){var t=e.positionTargetRef,n=e.onSelectGIF,r=e.onSelectEmoji,_=e.onSelectSticker,A=e.channel,P=e.gifButtonRef,R=e.stickerButtonRef,D=e.emojiButtonRef,k=e.isEditingMessage,U=e.canAddGIFs,G=e.canAttachStickers,F=a.useRef(null),B=a.useRef(!1),H=a.useRef(null),x=function(e){var t=e.positionContainerRef,n=e.drawerRef,r=(0,l.useStateFromStores)([m.default],(function(){return m.default.expressionPickerWidth})),o=a.useState(window.innerWidth),s=o[0],d=o[1],c=a.useState(null!=r?r:T.ExpressionPickerWidths.MIN),p=c[0],v=c[1],y=a.useMemo((function(){switch(p){case T.ExpressionPickerWidths.MIN:return T.MIN_EXPRESSION_PICKER_WIDTH;case T.ExpressionPickerWidths.MAX:return null;default:return p}}),[p]),_=a.useCallback((function(e){var t=e>=s?T.ExpressionPickerWidths.MAX:e<=T.MIN_EXPRESSION_PICKER_WIDTH?T.ExpressionPickerWidths.MIN:e;null==t&&null!=n.current&&(n.current.style.width=""),u.default.updateLocalSettings({expressionPickerWidth:t}),v(t)}),[n,s]),h=(0,f.default)({initialElementDimension:y,maxDimension:s,minDimension:T.MIN_EXPRESSION_PICKER_WIDTH,resizableDomNodeRef:n,onElementResize:_,orientation:f.ResizeOrientation.HORIZONTAL});return a.useEffect((function(){var e=i.default.debounce((function(){null!=t.current&&d(t.current.offsetWidth)}),500);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[t]),a.useLayoutEffect((function(){null!=t.current&&d(t.current.offsetWidth)}),[t]),{drawerWidth:y,handleDrawerResizeHandleMouseDown:a.useCallback((function(e){e.stopPropagation(),null!=t.current&&d(t.current.offsetWidth),h(e)}),[t,h])}}({positionContainerRef:F,drawerRef:H}),V=x.drawerWidth,W=x.handleDrawerResizeHandleMouseDown,Y=(0,C.useExpressionPickerStore)((function(e){return e.activeView})),z=a.useCallback((function(e){if(!(0,S.hasAnyModalOpen)()){for(var t=e.target;t instanceof Element;){if(t===H.current)return;if(t===P.current||t===D.current||t===R.current)return;t=t.parentNode}(0,C.closeExpressionPicker)(),null!=document.activeElement&&"BODY"!==document.activeElement.tagName||I.ComponentDispatch.dispatchToLastSubscribed(b.ComponentActions.TEXTAREA_FOCUS)}}),[D,R,P]),K=a.useCallback((function(){(0,C.closeExpressionPicker)()}),[]);a.useLayoutEffect((function(){var e=function(){Y===T.ExpressionPickerViewType.GIF&&(0,C.closeExpressionPicker)()};return window.addEventListener("mousedown",z),window.addEventListener("contextmenu",z),I.ComponentDispatch.subscribe(b.ComponentActions.POPOUT_CLOSE,K),I.ComponentDispatch.subscribe(b.ComponentActions.CLOSE_GIF_PICKER,e),function(){window.removeEventListener("mousedown",z),window.removeEventListener("contextmenu",z),I.ComponentDispatch.unsubscribe(b.ComponentActions.POPOUT_CLOSE,K),I.ComponentDispatch.unsubscribe(b.ComponentActions.CLOSE_GIF_PICKER,e)}}),[Y,K,z]),(0,h.useFocusLock)(F),a.useEffect((function(){null==H.current||B.current||(O.default.track(b.AnalyticEvents.EXPRESSION_PICKER_OPENED,{width:H.current.offsetWidth,tab:Y,badged:!1}),B.current=!0)}));var $=!k&&(U||G),Z=L(y.default,{channel:A,onSelectSticker:_,containerWidth:V,closePopout:K}),q=L(s.default,{onSelectGIF:n});return L(d.default,{section:b.AnalyticsSections.EXPRESSION_PICKER},void 0,L(g.AppReferencePositionLayer,{className:N.default.positionLayer,reference:t,position:E.Positions.TOP,align:E.Align.RIGHT,spacing:8,autoInvert:!0},void 0,(function(e){var t,n=e.isPositioned;return a.createElement("section",{className:(0,o.default)(N.default.positionContainer,(t={},t[N.default.positionContainerOnlyEmoji]=!$,t)),ref:F},n?a.createElement("div",{className:N.default.drawerSizingWrapper,style:{width:null==V?void 0:V},ref:H},L("div",{className:N.default.resizeHandle,onMouseDown:W}),L("div",{className:N.default.contentWrapper},void 0,$?L("nav",{className:N.default.nav},void 0,L("div",{className:N.default.navList,role:"tablist","aria-label":"Expression Picker"},void 0,U&&L("div",{className:N.default.navItem,role:"tab",id:c.GIF_PICKER_TAB_ID,"aria-controls":c.GIF_PICKER_TAB_PANEL_ID,"aria-selected":Y===T.ExpressionPickerViewType.GIF},void 0,L(j,{isActive:Y===T.ExpressionPickerViewType.GIF,viewType:T.ExpressionPickerViewType.GIF},void 0,M.default.Messages.EXPRESSION_PICKER_GIF)),G?L("div",{className:N.default.navItem,role:"tab",id:v.STICKER_PICKER_TAB_ID,"aria-controls":v.STICKER_PICKER_TAB_PANEL_ID,"aria-selected":Y===T.ExpressionPickerViewType.STICKER},void 0,L(j,{isActive:Y===T.ExpressionPickerViewType.STICKER,viewType:T.ExpressionPickerViewType.STICKER},void 0,L("div",{className:N.default.stickersNavItem},void 0,M.default.Messages.EXPRESSION_PICKER_STICKER))):null,L("div",{className:N.default.navItem,role:"tab",id:c.EMOJI_PICKER_TAB_ID,"aria-controls":c.EMOJI_PICKER_TAB_PANEL_ID,"aria-selected":Y===T.ExpressionPickerViewType.EMOJI},void 0,L(j,{isActive:Y===T.ExpressionPickerViewType.EMOJI,viewType:T.ExpressionPickerViewType.EMOJI},void 0,M.default.Messages.EXPRESSION_PICKER_EMOJI)))):null,Y!==T.ExpressionPickerViewType.STICKER||k?null:Z,Y!==T.ExpressionPickerViewType.GIF||k?null:q,Y===T.ExpressionPickerViewType.EMOJI?L(p.default,{inExpressionPicker:!0,channel:A,closePopout:K,onSelectEmoji:r,containerWidth:V,emojiSize:null!=V&&V<w?c.EmojiSize.MEDIUM:c.EmojiSize.LARGE,pickerIntention:b.EmojiIntention.CHAT}):null)):null)})))}k.displayName="ExpressionPicker";var U=a.memo(k);t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=T(n(0)),o=O(n(9)),i=n(3),l=O(n(2)),u=T(n(8507)),s=n(1168),d=O(n(8438)),f=O(n(8613)),c=O(n(61)),p=O(n(55)),v=O(n(5942)),y=n(131),m=O(n(8853)),_=O(n(9420)),h=O(n(8857)),E=n(1),g=O(n(6)),S=O(n(7503));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var N=function(e){return e.stopPropagation()},A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={resultType:null},t.searchBarRef=a.createRef(),t.backToFrontPage=function(e){var n=t.state.resultType;e.keyCode===E.KeyboardKeys.ESCAPE&&null!=n&&(e.stopPropagation(),e.preventDefault(),t.handleClearQuery())},t.handleChangeQuery=function(e){t.search(e,E.GIFPickerResultTypes.SEARCH)},t.handleSelectSuggestion=function(e){u.resetSearch(),t.search(e,E.GIFPickerResultTypes.SEARCH_SUGGESTION,!0)},t.handleClearQuery=function(){var e=t.searchBarRef.current;u.resetSearch(),t.setState({resultType:null}),null!=e&&e.focus()},t.handleSelectGIF=function(e){var n=t.props.onSelectGIF;null!=n&&n(e)},t.handleSelectItem=function(e,n){var r=t.searchBarRef.current;switch(e){case E.GIFPickerResultTypes.TRENDING_CATEGORY:u.search(n,E.GIFPickerResultTypes.TRENDING_CATEGORY,!0),null!=r&&r.focus();break;case E.GIFPickerResultTypes.TRENDING_GIFS:u.fetchTrendingGIFs()}t.setState({resultType:e})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var i=r.prototype;return i.componentDidMount=function(){u.initializeSearch(),document.addEventListener("keydown",this.backToFrontPage)},i.componentWillUnmount=function(){l.default.wait((function(){return u.resetSearch()})),document.removeEventListener("keydown",this.backToFrontPage)},i.search=function(e,t,n){u.search(e,t,n),""===e?this.setState({resultType:null}):this.state.resultType!==E.GIFPickerResultTypes.SEARCH&&this.setState({resultType:E.GIFPickerResultTypes.SEARCH})},i.renderHeaderContent=function(){var e=this.props.query;switch(this.state.resultType){case E.GIFPickerResultTypes.FAVORITES:return b(y.FormTitle,{tag:y.FormTitle.Tags.H5,className:S.default.searchHeader},void 0,g.default.Messages.GIF_PICKER_FAVORITES);case E.GIFPickerResultTypes.TRENDING_GIFS:return b(y.FormTitle,{tag:y.FormTitle.Tags.H5,className:S.default.searchHeader},void 0,g.default.Messages.GIF_PICKER_RESULT_TYPE_TRENDING_GIFS);default:return a.createElement(v.default,{className:S.default.searchBar,size:v.default.Sizes.MEDIUM,query:e,onChange:this.handleChangeQuery,onClear:this.handleClearQuery,placeholder:g.default.Messages.SEARCH_TENOR,ref:this.searchBarRef,autoFocus:!0})}},i.renderHeader=function(){var e=null;return null!=this.state.resultType&&(e=b(c.default,{onClick:this.handleClearQuery,className:S.default.backButton},void 0,b(m.default,{title:g.default.Messages.BACK}))),b(p.default,{align:p.default.Align.CENTER},void 0,e,this.renderHeaderContent())},i.renderContent=function(){var e=this.props,t=e.resultItems,n=e.resultQuery,r=e.query,a=e.favorites,o=e.searchOffset,i=e.searchLimit,l=e.searchTotalResults,u=e.suggestions,s=this.state.resultType;return null==s?b(_.default,{onSelectItem:this.handleSelectItem}):b(h.default,{data:s===E.GIFPickerResultTypes.FAVORITES?a:t,onSelectGIF:this.handleSelectGIF,resultType:s,resultQuery:n,query:r,searchOffset:o,searchLimit:i,searchTotalResults:l,suggestions:u,onSelectSuggestion:this.handleSelectSuggestion})},i.render=function(){var e=this.props,t=e.className,n=e.forwardedRef;return a.createElement("div",{id:s.GIF_PICKER_TAB_PANEL_ID,role:"tabpanel","aria-labelledby":s.GIF_PICKER_TAB_ID,className:(0,o.default)(S.default.container,t),onClick:N,ref:n},b("div",{className:S.default.header},void 0,this.renderHeader()),b("div",{className:S.default.content},void 0,this.renderContent()))},r}(a.PureComponent);A.displayName="GIFPicker";var P=a.forwardRef((function(e,t){var n=(0,i.useStateFromStoresObject)([f.default],(function(){return{query:f.default.getQuery(),resultQuery:f.default.getResultQuery(),resultItems:f.default.getResultItems(),suggestions:f.default.getSuggestions()}})),r=n.query,o=n.resultQuery,l=n.resultItems,u=n.suggestions,s=(0,i.useStateFromStores)([d.default],(function(){return d.default.getFavorites()}));return a.createElement(A,C({},e,{forwardedRef:t,query:r,resultQuery:o,resultItems:l,suggestions:u,favorites:s,searchOffset:0,searchTotalResults:f.default.getResultItems().length,searchLimit:null}))}));t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(3)),i=n(8507),l=E(n(8854)),u=E(n(8438)),s=E(n(8613)),d=E(n(8623)),f=E(n(8855)),c=n(393),p=E(n(8856)),v=n(9422),y=n(8857),m=n(1),_=E(n(6)),h=E(n(7502));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e,t){return O(v.CategoryColumn,{columns:e},t)};function T(){var e=u.default.getRandomFavorite();return{type:m.GIFPickerResultTypes.FAVORITES,name:_.default.Messages.GIF_PICKER_FAVORITES,icon:d.default,src:null!=e?e.src:"https://media.giphy.com/media/1TOSaJsWtnhe0/giphy.gif",format:null!=e?e.format:m.GIFResultFormat.IMAGE}}I.displayName="renderColumn";var C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._masonryRef=a.createRef(),t.state={favoritesTile:T(),selectedIndex:{column:0,row:0},focusedId:null},t.handleFocus=function(e){var n=t._masonryRef.current;if(null!=n){var r=n.getCoordsMap()[e];null!=r&&(n.scrollIntoViewRect({start:r.top-10,end:r.top+r.height+10}),t.setState({focusedId:e}))}},t.handleSelect=function(e){var n=t.props.onSelectItem,r=t.getData().find((function(t){return t.name===e}));null!=r&&null!=n&&n(r.type,r.name)},t.getItemKey=function(e,n){if(e>0)return null;var r=t.getData()[n];return null!=r?r.name:null},t.memoizedData=(0,c.cachedFunction)((function(e,t){return[e].concat(t)})),t.renderItem=function(e,n,r,a){if(e>0)return null;var o=t.getData()[n];if(null!=o){var i=t.props.onSelectItem,l=t.state.focusedId;return O(y.GIFPickerSearchItem,{format:o.format,color:m.Colors.PRIMARY_DARK_800,src:o.src,item:o,index:n,coords:r,onClick:function(){return i(o.type,o.name)},renderExtras:t.renderCategoryExtras,focused:o.name===l},a)}},t.renderContent=function(e,n,r){return 0===t.props.trendingCategories.length?O(v.ResultsLoader,{columns:e,width:n,renderColumn:I}):a.createElement(f.default,{ref:t._masonryRef,fade:!0,className:h.default.container,itemGutter:12,getItemKey:t.getItemKey,columns:e,getItemHeight:function(){return 110},renderItem:t.renderItem,sections:[t.getData().length],chunkSize:50})},t.getItemGrid=function(){var e=t._masonryRef.current;return null!=e?e.getItemGrid():[]},t.getCoordsMap=function(){var e=t._masonryRef.current;return null!=e?e.getCoordsMap():{}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var o=r.prototype;return o.componentDidMount=function(){0===this.props.trendingCategories.length&&(0,i.fetchTrending)()},o.getData=function(){return this.memoizedData(this.state.favoritesTile,this.props.trendingCategories)},o.renderCategoryExtras=function(e){var t=e.name,n=e.icon,r=e.type;return O(a.Fragment,{},void 0,O("div",{className:r===m.GIFPickerResultTypes.FAVORITES?h.default.categoryFadeBlurple:h.default.categoryFade}),O("div",{className:h.default.categoryText},void 0,null!=n?O(n,{className:h.default.categoryIcon}):null,O("span",{className:h.default.categoryName},void 0,t)))},o.render=function(){return O(l.default,{getItemGrid:this.getItemGrid,getCoordsMap:this.getCoordsMap,onFocus:this.handleFocus,onSelect:this.handleSelect},void 0,O(p.default,{desiredItemWidth:200,maxColumns:6},void 0,this.renderContent))},r}(a.PureComponent);C.displayName="GIFPickerFrontPage";var b=o.default.connectStores([s.default],(function(){return{trendingCategories:s.default.getTrendingCategories()}}))(C);t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=(0,l.getScrollbarSpecs)(e),s=new Map,d=new n((function(e){e.forEach((function(e){var t,n=e.target;null===(t=s.get(n))||void 0===t||t(e)}))}));return(0,a.forwardRef)((function(n,p){var v,y=n.onScroll,m=n.dir,_=void 0===m?"ltr":m,h=n.sections,E=n.columns,g=n.getItemKey,S=n.getItemHeight,O=n.getSectionHeight,I=n.chunkSize,T=n.renderSection,C=n.renderItem,b=n.itemGutter,M=n.sectionGutter,N=n.padding,A=n.fade,P=void 0!==A&&A,R=n.className,L=n.style,D=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(n,["onScroll","dir","sections","columns","getItemKey","getItemHeight","getSectionHeight","chunkSize","renderSection","renderItem","itemGutter","sectionGutter","padding","fade","className","style"]),w=a.default.useRef(null),j=a.default.useRef(null),k=a.default.useState(!1),U=k[0],G=k[1],F=(0,l.useCachedScrollerState)(),B=F.scrollerRef,H=F.scrollerState,x=F.getScrollerState;(0,l.usePaddingFixes)({scrollerRef:B,className:R,specs:r,orientation:"vertical",dir:_});var V=(0,l.useVirtualizedMasonryState)({sections:h,columns:E,getItemKey:g,getItemHeight:S,getSectionHeight:O,chunkSize:I,itemGutter:b,sectionGutter:M,padding:N,getScrollerState:x,dir:_}),W=V.forceUpdateOnChunkChange,Y=V.coordsMap,z=V.visibleSections,K=V.totalHeight,$=V.forceUpdate,Z=V.masonryComputer,q=(0,a.useCallback)((function(e){void 0===e&&(e=2),e>H.current.dirty&&(H.current.dirty=e,2===e?$():W(1))}),[W,H,$]),X=(0,l.useScrollSpring)(B),J=(0,a.useCallback)((function(){return Z.itemGrid}),[Z]),Q=(0,a.useCallback)((function(){return Z.coordsMap}),[Z]),ee=a.default.useCallback((function(){return q()}),[q]);(0,l.useResizeObserverSubscription)({ref:B,key:"container",onUpdate:ee,resizeObserver:d,listenerMap:s}),(0,a.useImperativeHandle)(p,(function(){return c({getScrollerNode:function(){return B.current},getItemGrid:J,getCoordsMap:Q,getScrollerState:x},(0,l.getAnimatedScrollHelpers)(B,x,X))}),[B,x,J,X,Q]);var te=(0,a.useCallback)((function(e){q(1),null==w.current?G(!0):clearTimeout(w.current),w.current=setTimeout((function(){w.current=null,G(!1)}),200),null!=y&&y(e)}),[y,q]);return a.default.createElement("div",c({ref:B,onScroll:te,className:(0,o.default)(R,(v={},v[e]=!0,v[t]=P,v[u.default.scrolling]=U,v)),style:(0,l.getMergedOrientationStyles)(L)},D),(0,a.useMemo)((function(){return f(i.FocusRingScope,{containerRef:j},void 0,a.default.createElement("div",{style:{height:K},className:u.default.content,ref:j},Object.keys(z).map((function(e){var t=(0,l.getMasonryListSectionIndex)(e),n=Y[e],r=z[e],a=Y[(0,l.getMasonryListSectionHeaderKey)(t)];return null!=n&&null!=r?f("div",{style:n},e,null!=T&&null!=a&&T(t,a,e),r.map((function(e){var t=e[0],n=e[1],r=e[2],a=Y[t];return null!=a?C(n,r,a,t):null}))):null}))))}),[z,C,T,Y,K]))}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=n(88),l=n(414),u=s(n(381));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResultsLoader=t.CategoryColumn=t.AnimatedColumn=t.Block=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(8)),i=s(n(273)),l=n(1),u=s(n(7498));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=[l.Colors.PREMIUM_TIER_1_PURPLE,l.Colors.PREMIUM_TIER_1_BLUE,"#929AFA"],y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={backgroundColor:o.default.sample(v)},t}return c(t,e),t.prototype.render=function(){return f("div",{style:{height:this.props.height,backgroundColor:this.state.backgroundColor},className:u.default.gif})},t}(a.PureComponent);t.Block=y,y.displayName="Block";var m=function(e){function t(t){var n;(n=e.call(this,t)||this).animateSlide=function(){var e=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),t=e.props.direction,r=e.state,a=r.translateY,o=r.height,l=t>0?0:-o/2+12,u=t>0?-o/2+12:0;a.setValue(l),i.default.timing(a,{toValue:u,duration:800,easing:i.default.Easing.linear}).start(n.animateSlide)};var r=new Array(10).fill(null).map((function(){return o.default.random(40,150)}));return n.state={blocks:r,height:2*r.reduce((function(e,t){return e+t+12}),12),translateY:new i.default.Value(0)},n}c(t,e);var n=t.prototype;return n.componentDidMount=function(){this.animateSlide()},n.getAnimatedStyle=function(){return{width:100/this.props.columns+"%",transform:[{translateY:this.state.translateY.interpolate({inputRange:[0,1],outputRange:["0px","1px"]})}]}},n.render=function(){var e=this.state.blocks;return f(i.default.div,{className:u.default.column,style:this.getAnimatedStyle()},void 0,e.map((function(e,t){return f(y,{height:e},t)})),e.map((function(e,t){return f(y,{height:e},"alt"+t)})))},t}(a.Component);t.AnimatedColumn=m,m.displayName="AnimatedColumn",m.defaultProps={direction:-1};var _=function(e){var t=e.columns;return f("div",{className:u.default.column,style:{width:100/t+"%"}},void 0,new Array(4).fill(null).map((function(e,t){return f("div",{className:u.default.categoryLoader},t)})))};t.CategoryColumn=_,_.displayName="CategoryColumn";var h=function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this.props,t=e.columns,n=e.renderColumn;return f("div",{className:u.default.container},void 0,new Array(t).fill(null).map((function(e,r){return n(t,r)})))},t}(a.PureComponent);t.ResultsLoader=h,h.displayName="ResultsLoader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M19.6,9l-4.2-0.4c-0.4,0-0.7-0.3-0.8-0.6l-1.6-3.9c-0.3-0.8-1.5-0.8-1.8,0L9.4,8.1C9.3,8.4,9,8.6,8.6,8.7L4.4,9 c-0.9,0.1-1.2,1.2-0.6,1.8L7,13.6c0.3,0.2,0.4,0.6,0.3,1l-1,4.1c-0.2,0.9,0.7,1.5,1.5,1.1l3.6-2.2c0.3-0.2,0.7-0.2,1,0l3.6,2.2 c0.8,0.5,1.7-0.2,1.5-1.1l-1-4.1c-0.1-0.4,0-0.7,0.3-1l3.2-2.8C20.9,10.2,20.5,9.1,19.6,9z M12,15.4l-3.8,2.3l1-4.3l-3.3-2.9 l4.4-0.4l1.7-4l1.7,4l4.4,0.4l-3.3,2.9l1,4.3L12,15.4z"}))}d.displayName="Favorite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=M(n(8)),l=n(3),u=n(8296),s=M(n(105)),d=n(1218),f=M(n(8621)),c=M(n(8859)),p=M(n(161)),v=M(n(61)),y=M(n(5954)),m=M(n(13)),_=n(139),h=n(1168),E=n(8347),g=n(5949),S=M(n(8860)),O=M(n(8394)),I=n(8861),T=n(1),C=M(n(7507)),b=M(n(7352));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P=(0,_.cssValueToNumber)(b.default.guildCategoryIconSize),R=(0,_.cssValueToNumber)(b.default.guildCategoryIconMarginVerical),L=(0,_.cssValueToNumber)(b.default.unicodeCategoryIconSize),D=(0,_.cssValueToNumber)(b.default.unicodeCategoryIconMarginVertical),w=(0,_.cssValueToNumber)(b.default.unicodeCategoryIconPadding),j=(0,_.cssValueToNumber)(C.default.unicodeCategoryShortcutHeight),k=(0,_.cssValueToNumber)(b.default.categorySeparatorSize),U=(0,_.cssValueToNumber)(b.default.categorySeparatorMarginVertical),G=L+R+2*w,F=P+R,B=F+(k+2*U),H=L+D+2*w,x=A(y.default,{height:L,width:L}),V=function(e){var t,n=e.className,r=e.emojiListRef,y=e.sectionDescriptors,_=e.intention,b=e.channel,M=(0,E.useEmojiPickerStore)((function(e){return e.activeCategoryIndex})),N=(0,I.useCategorySelectHandler)({sectionDescriptors:y,emojiListRef:r}),P=(0,u.useAnalyticsContext)(),w=(0,g.useEmojiCategories)(_,b),V=a.useRef(null),W=(0,l.useStateFromStores)([p.default],(function(){return p.default.isFocused()})),Y=(0,l.useStateFromStores)([s.default],(function(){return s.default.useReducedMotion}),[]),z=a.useMemo((function(){return i.default.memoize((function(e){var t,n=w[e];if(null!=n){var r=n.type!==h.EmojiCategoryTypes.GUILD?n.id:null,i=M===e,l=n.type===h.EmojiCategoryTypes.GUILD?n.guild:null,u=A(v.default,{"aria-label":n.type===h.EmojiCategoryTypes.GUILD?null==l?void 0:l.toString():n.id,className:(0,o.default)((t={},t[C.default.categoryItemGuildCategory]=null!=l,t[C.default.categoryItemDefaultCategory]=null==l,t[C.default.categoryItemDefaultCategorySelected]=null==l&&i,t[C.default.categoryItemRecentEmoji]=n.type===h.EmojiCategoryTypes.RECENT,t)),onClick:function(){null!=l&&m.default.track(T.AnalyticEvents.EXPRESSION_PICKER_CATEGORY_SELECTED,{location:null==P?void 0:P.location,tab:d.ExpressionPickerViewType.EMOJI,guild_id:l.id}),N(e)}},e,null!=l?A(O.default,{guild:l,isSelected:i,shouldAnimate:!Y&&W}):null,null==l&&null!=r?A(S.default,{categoryId:r,className:C.default.categoryIcon,height:L,width:L}):null),s=w[e+1],f=null!=s&&n.type===h.EmojiCategoryTypes.GUILD&&s.type!==h.EmojiCategoryTypes.GUILD;return null==l?u:A(a.Fragment,{},e,A(c.default,{guild:l,includeActivity:!1},void 0,A("div",{},void 0,u)),f?A("hr",{className:C.default.guildCategorySeparator},"separator"):null)}}))}),[M,P,w,N,W,Y]),K=a.useMemo((function(){return[8,8,0,8]}),[]),$=a.useCallback((function(e){var t=w[e];if(t.type===h.EmojiCategoryTypes.RECENT)return G;if(t.type===h.EmojiCategoryTypes.GUILD){var n=w[e+1];return null!=n&&n.type!==h.EmojiCategoryTypes.GUILD?B:F}return H}),[w]),Z=a.useMemo((function(){var e=w.reduce((function(e,t){return t.type===h.EmojiCategoryTypes.GUILD||t.type===h.EmojiCategoryTypes.FAVORITES?e+1:e}),0);return{guildCategoryCount:e,firstUnicodeCategoryIndex:e+1,firstUnicodeCategoryOffsetTop:G+e*F+B}}),[w]),q=Z.guildCategoryCount,X=Z.firstUnicodeCategoryIndex,J=Z.firstUnicodeCategoryOffsetTop,Q=a.useState(!0),ee=Q[0],te=Q[1];a.useLayoutEffect((function(){te(q>=7)}),[q]);var ne=a.useCallback((function(e){var t,n=null===(t=V.current)||void 0===t?void 0:t.getListDimensions();if(null!=n){var r=e+n.height;te(!(r-k>=J))}}),[J]),re=a.useCallback((function(){var e;N(X),null===(e=V.current)||void 0===e||e.scrollTo(J)}),[J,X,N]),ae=a.useCallback((function(e,t){var n=w[e];if(null==n)return 0;var r=ee?j:0;if(n.type===h.EmojiCategoryTypes.RECENT)return t?0:D;if(n.type===h.EmojiCategoryTypes.GUILD){var a=w[e+1];return null!=a&&a.type!==h.EmojiCategoryTypes.GUILD?t?k+-2*U+R+r:R:t?r:R}return t?R+r:2*R}),[w,ee]);return a.createElement(f.default,{ref:V,activeIndex:M,className:n,listPadding:K,onScroll:ne,renderCategoryListItem:z,rowCount:w.length,rowHeight:$,getScrollOffsetForIndex:ae},q>=7&&A(v.default,{"aria-hidden":!ee,className:(0,o.default)(C.default.unicodeShortcut,(t={},t[C.default.unicodeShortcutInvisible]=!ee,t)),onClick:re},void 0,x))};V.displayName="EmojiCategoryList";var W=V;t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M5.66487 5H18.3351C19.9078 5 21.2136 6.21463 21.3272 7.78329L21.9931 16.9774C22.0684 18.0165 21.287 18.9198 20.248 18.9951C20.2026 18.9984 20.1572 19 20.1117 19C18.919 19 17.8785 18.1904 17.5855 17.0342L17.0698 15H6.93015L6.41449 17.0342C6.12142 18.1904 5.08094 19 3.88826 19C2.84645 19 2.00189 18.1554 2.00189 17.1136C2.00189 17.0682 2.00354 17.0227 2.00682 16.9774L2.67271 7.78329C2.78632 6.21463 4.0921 5 5.66487 5ZM14.5 10C15.3284 10 16 9.32843 16 8.5C16 7.67157 15.3284 7 14.5 7C13.6716 7 13 7.67157 13 8.5C13 9.32843 13.6716 10 14.5 10ZM18.5 13C19.3284 13 20 12.3284 20 11.5C20 10.6716 19.3284 10 18.5 10C17.6716 10 17 10.6716 17 11.5C17 12.3284 17.6716 13 18.5 13ZM6.00001 9H4.00001V11H6.00001V13H8.00001V11H10V9H8.00001V7H6.00001V9Z",fill:d,className:f}))}d.displayName="EmojiActivityCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M20 6.002H14V3.002C14 2.45 13.553 2.002 13 2.002H4C3.447 2.002 3 2.45 3 3.002V22.002H5V14.002H10.586L8.293 16.295C8.007 16.581 7.922 17.011 8.076 17.385C8.23 17.759 8.596 18.002 9 18.002H20C20.553 18.002 21 17.554 21 17.002V7.002C21 6.45 20.553 6.002 20 6.002Z",fill:d,className:f}))}d.displayName="EmojiFlagsCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M11 18H13V22H11V18Z",fill:d,className:f}),s("path",{d:"M12 2C8.822 2 7 4.187 7 8V16C7 16.552 7.447 17 8 17H16C16.553 17 17 16.552 17 16V8C17 4.187 15.178 2 12 2ZM11 14.001H10V5.001H11V14.001ZM14 14.001H13V5.001H14V14.001Z",fill:d,className:f}))}d.displayName="EmojiFoodCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M6.814 8.982C4.539 11.674 4.656 15.591 6.931 18.153L4.034 21.579L5.561 22.87L8.463 19.437C9.569 20.127 10.846 20.513 12.161 20.513C14.231 20.513 16.183 19.607 17.516 18.027C20.069 15.01 20.771 6.945 21 3C17.765 3.876 9.032 6.356 6.814 8.982V8.982ZM8.935 17.331C6.826 15.548 6.56 12.382 8.342 10.272C9.592 8.793 14.904 6.845 18.764 5.698L8.935 17.331V17.331Z",fill:d,className:f}))}d.displayName="EmojiNatureCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M18 5.999H17V4.999C17 4.448 16.553 3.999 16 3.999H4C3.447 3.999 3 4.448 3 4.999V12.999C3 14.488 3.47 15.865 4.265 16.999H15.722C16.335 16.122 16.761 15.105 16.92 13.999H18C20.205 13.999 22 12.205 22 9.999C22 7.794 20.205 5.999 18 5.999V5.999ZM18 12H17V8H18C19.104 8 20 8.897 20 10C20 11.102 19.104 12 18 12Z",fill:d,className:f}),s("path",{d:"M2 18H18V20H2V18Z",fill:d,className:f}))}d.displayName="EmojiObjectsCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M12 2C6.477 2 2 6.477 2 12C2 17.522 6.477 22 12 22C17.523 22 22 17.522 22 12C22 6.477 17.522 2 12 2ZM16.293 6.293L17.707 7.706L16.414 9L17.707 10.293L16.293 11.706L13.586 9L16.293 6.293ZM6.293 7.707L7.707 6.294L10.414 9L7.707 11.707L6.293 10.294L7.586 9L6.293 7.707ZM12 19C9.609 19 7.412 17.868 6 16.043L7.559 14.486C8.555 15.92 10.196 16.831 12 16.831C13.809 16.831 15.447 15.92 16.443 14.481L18 16.04C16.59 17.867 14.396 19 12 19Z",fill:d,className:f}))}d.displayName="EmojiPeopleCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M16 4.001C14.406 4.001 12.93 4.838 12 6.081C11.07 4.838 9.594 4.001 8 4.001C5.243 4.001 3 6.244 3 9.001C3 14.492 11.124 19.633 11.471 19.849C11.633 19.95 11.817 20.001 12 20.001C12.183 20.001 12.367 19.95 12.529 19.849C12.876 19.633 21 14.492 21 9.001C21 6.244 18.757 4.001 16 4.001V4.001Z",fill:d,className:f}))}d.displayName="EmojiSymbolsCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M22 17H19.725C19.892 16.529 20 16.029 20 15.5C20 13.015 17.985 11 15.5 11H13.5L12.276 8.553C12.107 8.214 11.761 8 11.382 8H7C6.448 8 6 8.447 6 9V11.051C3.753 11.302 2 13.186 2 15.5C2 17.986 4.015 20 6.5 20H15.5C16.563 20 17.527 19.616 18.297 19H22V17ZM6.5 16.75C5.81 16.75 5.25 16.19 5.25 15.5C5.25 14.81 5.81 14.25 6.5 14.25C7.19 14.25 7.75 14.81 7.75 15.5C7.75 16.19 7.19 16.75 6.5 16.75ZM11.5 16.75C10.81 16.75 10.25 16.19 10.25 15.5C10.25 14.81 10.81 14.25 11.5 14.25C12.19 14.25 12.75 14.81 12.75 15.5C12.75 16.19 12.19 16.75 11.5 16.75ZM16.5 16.75C15.81 16.75 15.25 16.19 15.25 15.5C15.25 14.81 15.81 14.25 16.5 14.25C17.19 14.25 17.75 14.81 17.75 15.5C17.75 16.19 17.19 16.75 16.5 16.75Z",fill:d,className:f}),s("path",{d:"M8 7H10C10 5.346 8.654 4 7 4H6V6H7C7.551 6 8 6.449 8 7Z",fill:d,className:f}))}d.displayName="EmojiTravelCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(488)),i=E(n(9)),l=E(n(8)),u=n(122),s=n(680),d=E(n(8511)),f=E(n(9434)),c=E(n(61)),p=E(n(261)),v=n(139),y=n(1),m=E(n(6)),_=E(n(7352)),h=E(n(7508));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var I=o.default.convert.fromCodePoint("1f44f"),T=(0,v.cssValueToNumber)(_.default.emojiContainerPaddingVertical),C=(0,v.cssValueToNumber)(_.default.diversityEmojiSize);function b(e){switch(o.default.convert.toCodePoint(e)){case"1f3fb":return m.default.Messages.EMOJI_MODIFIER_LIGHT_SKIN_TONE;case"1f3fc":return m.default.Messages.EMOJI_MODIFIER_MEDIUM_LIGHT_SKIN_TONE;case"1f3fd":return m.default.Messages.EMOJI_MODIFIER_MEDIUM_SKIN_TONE;case"1f3fe":return m.default.Messages.EMOJI_MODIFIER_MEDIUM_DARK_SKIN_TONE;case"1f3ff":return m.default.Messages.EMOJI_MODIFIER_DARK_SKIN_TONE;default:return m.default.Messages.EMOJI_MODIFIER_NONE}}var M=function(e){var t=e.fade,n=e.surrogate,r=e.onClick,o=e.delay,i=e.index,l=(0,s.useListItem)("item-"+i),d=p.default.getURL(I+n),f=(0,u.useSpring)({opacity:1,from:{opacity:t?0:1},delay:o});return a.createElement(c.default,O({},l,{onClick:function(){return r(n)},className:h.default.diversityEmojiItem,role:"option"}),S(u.animated.div,{"aria-label":b(n),className:h.default.diversityEmojiItemImage,style:O({backgroundImage:'url("'+d+'")'},f)}))};M.displayName="DiversityOption";var N=function(e){var t=e.selectedSurrogate,n=e.onClick,r=e.inExpressionPicker,o=(0,f.default)("diversity"),d=(0,u.useSpring)({height:(C+2*T)*(y.DIVERSITY_SURROGATES.length+1),from:{height:C},config:{duration:125}});a.useEffect((function(){o.focusFirstVisibleItem()}),[o]);var c=[""].concat(y.DIVERSITY_SURROGATES);return l.default.remove(c,(function(e){return e===t})),c.unshift(t),S(s.ListNavigatorProvider,{navigator:o},void 0,S(s.ListNavigatorContainer,{},void 0,(function(e){var t,o=e.ref,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement(u.animated.div,O({},l,{ref:o,className:(0,i.default)(h.default.diversitySelectorOptions,(t={},t[h.default.diversitySelectorOptionsInExpressionPicker]=r,t)),style:d,role:"listbox"}),c.map((function(e,t){return S(M,{index:t,fade:0!==t,delay:20*t,surrogate:e,onClick:n},t)})))})))};N.displayName="DiversityOptions";var A=function(e){var t=e.searchBarRef,n=e.selectedSurrogate,r=e.className,o=e.inExpressionPicker,i=p.default.getURL(I+n),l=a.useState(!1),u=l[0],s=l[1],f=a.useRef(null),v=a.useCallback((function(e){var t;(null==e?void 0:e.target)instanceof Node&&(null===(t=f.current)||void 0===t?void 0:t.contains(null==e?void 0:e.target))||s(!1)}),[]);return a.useEffect((function(){return document.addEventListener("click",v,!0),function(){return document.removeEventListener("click",v,!0)}}),[v]),a.createElement("div",{ref:f,className:r},S(c.default,{className:h.default.diversitySelectorButton,onClick:function(){s(!0)},"aria-haspopup":!0,"aria-expanded":u,tabIndex:u?-1:0},void 0,S("div",{className:h.default.diversityEmojiItemImage,style:{backgroundImage:'url("'+i+'")'}})),u?S(N,{inExpressionPicker:o,selectedSurrogate:n,onClick:function(e){var n;d.default.setDiversityColor(e),v(),null===(n=t.current)||void 0===n||n.focus()}}):null)};A.displayName="DiversitySelector";var P=A;t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,a.useStateFromStores)([o.default],(function(){return o.default.keyboardModeEnabled}));return(0,r.default)({id:e,isEnabled:t,setFocus:u,scrollToStart:l,scrollToEnd:l})};var r=i(n(680)),a=n(3),o=i(n(105));function i(e){return e&&e.__esModule?e:{default:e}}function l(){return Promise.resolve()}function u(e){var t=document.querySelector(e);null!=t&&t.focus()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=_(n(105)),l=_(n(8862)),u=_(n(249)),s=_(n(15)),d=_(n(161)),f=_(n(24)),c=_(n(150)),p=n(8347),v=_(n(8394)),y=_(n(6)),m=_(n(7510));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=a.memo((function(e){var t,n=e.className,r=e.emojiGrid,_=(0,p.useEmojiPickerStore)((function(e){return e.inspectedEmojiPosition})),h=a.useMemo((function(){var e,t=_.rowIndex,n=_.columnIndex;return null===(e=r[t])||void 0===e?void 0:e[n]}),[r,_]),g=null==h?void 0:h.emoji,S=(0,o.useStateFromStores)([s.default],(function(){return null==g?null:s.default.getGuild(g.guildId)}),[g]),O=(0,o.useStateFromStores)([d.default],(function(){return d.default.isFocused()})),I=(0,o.useStateFromStores)([i.default],(function(){return i.default.useReducedMotion}),[]),T=(0,o.useStateFromStores)([u.default],(function(){return u.default.getDisambiguatedEmojiContext(null==S?void 0:S.id).isFavoriteEmoji(g)}),[S,g]);if(null==g)return null;var C=null!=g.id?c.default.getEmojiURL({id:g.id,animated:g.animated}):g.url,b=""===C?E(f.default,{size:f.default.Sizes.SIZE_16,className:m.default.glyphEmoji},void 0,"surrogates"in g?g.surrogates:null):E("img",{alt:null!==(t=g.allNamesString)&&void 0!==t?t:"",src:C,className:m.default.emoji}),M=null==S?null:E(v.default,{className:m.default.guildIcon,guild:S,shouldAnimate:!I&&O});return E(l.default,{className:n,graphicPrimary:b,graphicSecondary:M,titlePrimary:g.allNamesString,titleSecondary:null==S?null:y.default.Messages.EMOJI_FROM_GUILD.format({guildName:S.name}),isFavorite:T})}));t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=L(n(488)),i=L(n(9)),l=L(n(8)),u=n(3),s=L(n(8624)),d=n(8296),f=L(n(105)),c=n(1218),p=n(8392),v=L(n(8618)),y=n(8277),m=n(280),_=L(n(8362)),h=L(n(13)),E=n(139),g=n(1168),S=n(8347),O=n(5949),I=L(n(8860)),T=L(n(8394)),C=L(n(9437)),b=L(n(9438)),M=n(1),N=L(n(6)),A=L(n(7352)),P=L(n(7515)),R=L(n(7353));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var j=(0,E.cssValueToNumber)(A.default.emojiListPaddingTop),k=(0,E.cssValueToNumber)(A.default.emojiListPaddingRight),U=(0,E.cssValueToNumber)(A.default.emojiListPaddingBottom),G=(0,E.cssValueToNumber)(A.default.emojiListPaddingLeft),F=(0,E.cssValueToNumber)(A.default.emojiListSearchResultsPaddingTop),B=(0,E.cssValueToNumber)(R.default.expressionPickerListSectionHeadingHeight),H=(0,E.cssValueToNumber)(A.default.emojiSectionMarginBottom),x=(0,E.cssValueToNumber)(A.default.emojiPremiumUpsellHeight)+(0,E.cssValueToNumber)(A.default.emojiPremiumUpsellMarginTop),V=a.memo((function(e){var t=e.diversitySurrogate,n=e.emojiGrid,r=e.emojiListRef,E=e.emojiSize,A=e.onEmojiSelect,R=e.sectionDescriptors,L=e.rowCountBySection,D=e.collapsedSections,V=e.setCollapsedSections,W=e.getEmojiItemProps,Y=e.getEmojiRowProps,z=e.rowCount,K=e.emojiRowHeight,$=e.isUsingKeyboardNavigation,Z=a.useRef(!1),q=(0,S.useEmojiPickerStore)((function(e){return e.activeCategoryIndex})),X=(0,S.useEmojiPickerStore)((function(e){return e.searchQuery})),J=function(e){var t=e.collapsedSections,n=e.diversitySurrogate,r=e.emojiGrid,s=e.emojiSize,f=e.onEmojiSelect,p=e.searchQuery,_=e.sectionDescriptors,E=e.setCollapsedSections,N=e.getEmojiItemProps,A=e.getEmojiRowProps,R=e.isScrolling,L=e.isUsingKeyboardNavigation,D=e.useReducedMotion,V=(0,d.useAnalyticsContext)(),W=a.useRef(M.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID),Y=a.useMemo((function(){return""!==n?o.default.convert.toCodePoint(n):""}),[n]),z=a.useCallback((function(e,n){void 0===n&&(n=null);var r=new Set(t),a=t.has(e);a?r.delete(e):r.add(e),null!=n&&h.default.track(M.AnalyticEvents.EXPRESSION_PICKER_CATEGORY_COLLAPSE_TOGGLED,{location:V.location,tab:c.ExpressionPickerViewType.EMOJI,collapsed:!a,guild_id:n.id}),E(r)}),[V,t,E]),K=a.useCallback((function(e){var t=e.emoji,n=e.visibleRowIndex,r=e.columnIndex;W.current!==M.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID&&window.cancelAnimationFrame(W.current),W.current=window.requestAnimationFrame((function(){(0,S.setInspectedEmojiPosition)(r,n,S.InspectedEmojiChangeSource.MOUSE_EVENT),(0,S.setSearchPlaceholder)(t.allNamesString),W.current=M.UNREACHABLE_REQUEST_ANIMATION_FRAME_ID}))}),[]),$=(0,u.useStateFromStores)([y.HotspotStore],(function(){return y.HotspotStore.hasHotspot(y.HotspotLocations.FAVORITE_EMOJI_TOOLTIP)}),[]),Z=a.useMemo((function(){return l.default.memoize((function(e){var t=r[e];return w(b.default,{emojiDescriptors:t,emojiSize:s,surrogateCodePoint:Y,onInspect:K,onSelect:f,getEmojiItemProps:N,getEmojiRowProps:A,isScrolling:R,isUsingKeyboardNavigation:L,rowIndex:e,useReducedMotion:D,showEmojiFavoriteTooltip:$},e)}))}),[r,s,Y,K,f,N,A,R,L,D,$]),q=a.useMemo((function(){return l.default.memoize((function(e){var n=_[e];if(null!=n){var r=n.guild,a=n.categoryId,o=n.type,i=n.sectionId;if(o!==g.EmojiCategoryTypes.SEARCH_RESULTS){var l=null==r?null!=a?w(I.default,{categoryId:a,height:16,width:16}):null:w(T.default,{guild:r,height:16,width:16});return w(v.default,{className:P.default.header,icon:l,isCollapsed:t.has(i),onClick:function(){return z(i,r)},onVisible:function(){a===g.EmojiCategories.PREMIUM_UPSELL&&h.default.track(M.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:m.PremiumUpsellTypes.EMOJI_PICKER_SEARCH,location:V.location})}},i,null==r?null==a?null:(0,O.getStringForEmojiCategory)(a):r.toString())}}}))}),[t,_,z,V.location]),X=a.useCallback((function(e,n){var r,a=_[e];return w("div",{className:(0,i.default)(P.default.categorySection,(r={},r[P.default.categorySectionLast]=e===_.length-1,r[P.default.categorySectionCollapsed]=t.has(a.sectionId),r))},e,n)}),[t,_]),J=a.useCallback((function(e){var n=_[e];return n.sectionId!==g.EmojiCategoryTypes.PREMIUM_UPSELL||t.has(n.sectionId)?null:w(C.default,{className:P.default.premiumUpsell},"emoji-picker-inline-upsell")}),[_,t]),Q=a.useCallback((function(e){var n=_[e];return n.sectionId!==g.EmojiCategoryTypes.PREMIUM_UPSELL||t.has(n.sectionId)?0:x}),[_,t]),ee=a.useCallback((function(e){var n;return e===_.length-1||t.has(null===(n=_[e])||void 0===n?void 0:n.sectionId)?0:H}),[t,_]);return{listPadding:a.useMemo((function(){return[""!==p?F:j,k,U,G]}),[p]),renderRow:Z,renderSection:X,renderSectionHeader:q,renderSectionFooter:J,sectionMarginBottom:ee,sectionHeaderHeight:a.useCallback((function(e){return _[e].type===g.EmojiCategoryTypes.SEARCH_RESULTS?0:B}),[_]),sectionFooterHeight:Q}}({collapsedSections:D,diversitySurrogate:t,emojiGrid:n,emojiSize:E,onEmojiSelect:A,searchQuery:X,sectionDescriptors:R,setCollapsedSections:V,getEmojiItemProps:W,getEmojiRowProps:Y,isScrolling:Z,isUsingKeyboardNavigation:$,useReducedMotion:(0,u.useStateFromStores)([f.default],(function(){return f.default.useReducedMotion}),[])}),Q=J.listPadding,ee=J.renderRow,te=J.renderSection,ne=J.renderSectionHeader,re=J.renderSectionFooter,ae=J.sectionMarginBottom,oe=J.sectionHeaderHeight,ie=J.sectionFooterHeight,le=(0,p.useSynchronizedActiveCategoryIndexForScrollPosition)({activeCategoryIndex:q,isScrolling:Z,listRef:r,onActiveCategoryIndexChange:S.setActiveCategoryIndex,scrollOffset:20,searchQuery:X});(0,p.useSynchronizedScrollPositionForActiveCategoryIndex)({searchQuery:X,activeCategoryIndex:q,listRef:r});var ue=R.length>0;return w("div",{className:P.default.listWrapper},void 0,ue?a.createElement(_.default,{className:P.default.list,listPadding:Q,onScroll:le,renderRow:ee,renderSection:te,renderSectionHeader:ne,renderSectionFooter:re,rowCount:z,rowCountBySection:L,rowHeight:K,sectionHeaderHeight:oe,sectionMarginBottom:ae,sectionFooterHeight:ie,stickyHeaders:!0,ref:r}):w(s.default,{message:N.default.Messages.NO_EMOJI_SEARCH_RESULTS,className:P.default.noSearchResultsContainer}))}));t.default=V},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(8296),l=n(5688),u=y(n(29)),s=n(1149),d=y(n(5686)),f=y(n(24)),c=n(1),p=y(n(6)),v=y(n(7511));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}var E=function(e){var t=e.className,n=(0,i.useAnalyticsContext)().location,r=a.useCallback((function(){(0,l.openPremiumSelectPlanModal)({subscriptionTier:c.PremiumSubscriptionSKUs.TIER_2,analyticsLocation:h({},n,{object:c.AnalyticsObjects.BUTTON_CTA,objectType:c.AnalyticsObjectTypes.TIER_2})})}),[n]);return _("div",{className:(0,o.default)(v.default.upsell,t)},void 0,_(d.default,{color:s.GradientCssUrls.PREMIUM_TIER_2,className:v.default.premiumIcon}),_(f.default,{color:f.default.Colors.INTERACTIVE_NORMAL,className:v.default.body},void 0,p.default.Messages.EMOJI_PICKER_PREMIUM_UPSELL_BODY),_(u.default,{look:u.default.Looks.LINK,color:u.default.Colors.LINK,onClick:r},void 0,p.default.Messages.EMOJI_PICKER_PREMIUM_UPSELL_CTA))};E.displayName="EmojiPickerInlinePremiumUpsell";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=E(n(9)),u=E(n(66)),s=n(3),d=E(n(5675)),f=n(8277),c=E(n(249)),p=E(n(149)),v=n(1168),y=n(8347),m=E(n(9439)),_=E(n(6)),h=E(n(7514));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=/Darwin|OS X/.test(null!==(r=null===(a=u.default.os)||void 0===a?void 0:a.family)&&void 0!==r?r:""),T=function(e){var t,n=e.emojiDescriptors,r=e.emojiSize,a=e.onSelect,o=e.onInspect,u=e.surrogateCodePoint,E=e.getEmojiItemProps,g=e.getEmojiRowProps,T=e.isScrolling,C=e.isUsingKeyboardNavigation,b=e.rowIndex,M=e.useReducedMotion,N=e.showEmojiFavoriteTooltip,A=y.useEmojiPickerStore.getState(),P=i.useState(A.inspectedEmojiPosition),R=P[0],L=P[1],D=(0,d.default)(null,300),w=D[0],j=D[1],k=(0,s.useStateFromStores)([c.default],(function(){return c.default.getDisambiguatedEmojiContext()}),[]);i.useEffect((function(){return y.useEmojiPickerStore.subscribe((function(e){return L(e)}),(function(e){return e.inspectedEmojiPosition}))}),[]);var U=r===v.EmojiSize.LARGE,G=r===v.EmojiSize.MEDIUM;return i.createElement("ul",S({},g(b),{className:(0,l.default)(h.default.emojiListRow,(t={},t[h.default.emojiListRowLargeSize]=U,t[h.default.emojiListRowMediumSize]=G,t))}),n.map((function(e){var t=e.rowIndex+"c"+e.columnIndex,n=e.emoji,r=e.size,s=e.isDisabled,d=e.visibleRowIndex,v=e.columnIndex,y=R.rowIndex===d&&R.columnIndex===v,g=function(r){if(!T.current&&!C.current){var o=r.altKey;o&&!c.default.getDisambiguatedEmojiContext().isFavoriteEmoji(n)&&j(t),(0,f.hideHotspot)(f.HotspotLocations.FAVORITE_EMOJI_TOOLTIP),a(e,{isFinalSelection:!r.shiftKey,toggleFavorite:o})}},A=function(){T.current||C.current||o(e)},P=function(e){var a,o=void 0===e?{}:e,d=o.onMouseEnter,f=o.onMouseLeave;return i.createElement("li",S({},E(v,b),{key:t,className:(0,l.default)(h.default.emojiItem,(a={},a[h.default.emojiItemLarge]=U,a[h.default.emojiItemMedium]=G,a[h.default.emojiItemSelected]=y,a[h.default.emojiItemDisabled]=s,a[h.default.showPulse]=w===t,a)),onMouseEnter:d,onMouseLeave:f,onMouseOver:A,onClick:g}),O(m.default,{"aria-label":k.isFavoriteEmoji(n)?_.default.Messages.EMOJI_NAMES_WITH_FAVORITED.format({names:n.allNamesString}):n.allNamesString,columnIndex:v,rowIndex:b,emoji:n,size:r,surrogateCodePoint:u,useReducedMotion:M}))};return N?O(p.default,{text:_.default.Messages.EMOJI_FAVORITE_TOOLTIP.format({key:I?"Opt":"Alt"}),position:p.default.Positions.TOP,delay:200},t,(function(e){return P(e)})):P()})))};T.displayName="EmojiPickerListRow";var C=T;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(8)),i=f(n(185)),l=f(n(9440)),u=f(n(150)),s=n(1),d=f(n(7513));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=o.default.memoize((function(e){return e*s.EmojiSprites.NonDiversityPerRow+"px "+e*Math.ceil(i.default.numNonDiversitySprites/s.EmojiSprites.NonDiversityPerRow)+"px"})),y=o.default.memoize((function(e){return e*s.EmojiSprites.DiversityPerRow+"px "+e*Math.ceil(i.default.numDiversitySprites/s.EmojiSprites.DiversityPerRow)+"px"})),m=function(e,t,r){if(e.useSpriteSheet){var a,o,i,l=null!=e.index?e.index:0;return e.hasDiversity?(a=n(9441)("./spritesheet-"+t+"-"+r+".png"),o=y(r),i=s.EmojiSprites.DiversityPerRow):(a=n(9455)("./spritesheet-emoji-"+r+".png"),o=v(r),i=s.EmojiSprites.NonDiversityPerRow),{backgroundImage:"url('"+a+"')",backgroundPosition:-l%i*r+"px "+-Math.floor(l/i)*r+"px",backgroundSize:o,height:r,width:r}}},_=a.memo((function(e){var t,n=e.emoji,r=e.size,o=e.surrogateCodePoint,i=e.useReducedMotion,s=e["aria-label"];if(!n.useSpriteSheet){var f=null==n.id?n.url:u.default.getEmojiURL({id:n.id,animated:!i&&n.animated});return null!=f?p(l.default,{"aria-label":s,src:f,size:r,alt:n.allNamesString||""}):null}var c="emoji-picker-list-row-item-"+(null!==(t=n.id)&&void 0!==t?t:n.name);return a.createElement(a.Fragment,null,p("div",{"aria-describedby":c,className:d.default.emojiSpriteImage,style:m(n,o,r)}),p("span",{style:{position:"absolute",top:-999999},id:c},void 0,s))}));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(7512))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var l=function(e){var t=e.src,n=e.alt,r=e.size,i=e["aria-label"],l=a.useRef(null),u=a.useRef(!1);return a.createElement("img",{className:u.current?o.default.image:o.default.imageLoading,alt:n,src:t,ref:l,"aria-label":i,style:{backgroundSize:r,height:r,width:r},onLoad:u.current?void 0:function(){window.requestAnimationFrame((function(){null!=l.current&&(u.current=!0,l.current.classList.remove(o.default.imageLoading),l.current.classList.add(o.default.image))}))}})};l.displayName="ExpressionPickerListItemImage";var u=l;t.default=u},function(e,t,n){var r={"./spritesheet--32.png":9442,"./spritesheet--48.png":9443,"./spritesheet-1f3fb-32.png":9444,"./spritesheet-1f3fb-48.png":9445,"./spritesheet-1f3fc-32.png":9446,"./spritesheet-1f3fc-48.png":9447,"./spritesheet-1f3fd-32.png":9448,"./spritesheet-1f3fd-48.png":9449,"./spritesheet-1f3fe-32.png":9450,"./spritesheet-1f3fe-48.png":9451,"./spritesheet-1f3ff-32.png":9452,"./spritesheet-1f3ff-48.png":9453,"./spritesheet-emoji-32.png":8863,"./spritesheet-emoji-48.png":8864,"./spritesheet-picker-22.png":9454};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=9441},function(e,t,n){e.exports=n.p+"28b51c7a7a5cf0f7690d36408f7646e1.png"},function(e,t,n){e.exports=n.p+"8cadc8badb226d9b5da5efbb060c9331.png"},function(e,t,n){e.exports=n.p+"b69c83cab6023848edc9bbcc336a2c20.png"},function(e,t,n){e.exports=n.p+"da12bf7fb7f27251ea31f551461128da.png"},function(e,t,n){e.exports=n.p+"b80dd412b0ff44e03adbc7c3576c0069.png"},function(e,t,n){e.exports=n.p+"14417b3f0dcdd9c94ab68e1ccedbc79f.png"},function(e,t,n){e.exports=n.p+"cccf9c9b84c8f187a0661b1cedaa10b0.png"},function(e,t,n){e.exports=n.p+"513268e8df31f87c8fc4df907a2ac60f.png"},function(e,t,n){e.exports=n.p+"001c14ae5cc33a5b753e98c36e835b60.png"},function(e,t,n){e.exports=n.p+"5ebc560cfa0291df74f75ba447c0afec.png"},function(e,t,n){e.exports=n.p+"b4f9a122a083fd298c089a6476bdb1dc.png"},function(e,t,n){e.exports=n.p+"27ace143e2b1e377b1e4a322d300a5c7.png"},function(e,t,n){e.exports=n.p+"7e5013a9afc1404b0b89d99aaec0b398.png"},function(e,t,n){var r={"./spritesheet-emoji-32.png":8863,"./spritesheet-emoji-48.png":8864};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=9455},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=T(n(5)),i=n(3),l=T(n(28)),u=n(287),s=T(n(473)),d=n(1148),f=n(280),c=T(n(1147)),p=T(n(271)),v=T(n(61)),y=n(1149),m=T(n(255)),_=T(n(5686)),h=T(n(24)),E=b(n(96)),g=n(5949),S=n(1),O=T(n(6)),I=T(n(7516));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=l.default.get("premiumRetentionEmojiPickerNotice"),A=(0,d.registerUserExperiment)({id:d.Experiments.PREMIUM_RETENTION_EMOJI_PICKER,title:"Nitro Retention: Emoji Picker",description:["Treatment 1: Users see the notice"],buckets:[d.ExperimentBuckets.CONTROL,d.ExperimentBuckets.TREATMENT_1],clientFilter:(0,d.createFluxStoreExperimentClientFilter)([c.default],(function(){var e=c.default.getPremiumSubscription();return null!=e&&(0,E.isSubscriptionStatusFailedPayment)(e.status)}))}),P=function(e){var t=e.closePopout,n=e.channel,r=(0,d.useAndTrackExposureToUserExperiment)(A),T=a.useState(!1),C=T[0],b=T[1],P=(0,i.useStateFromStoresObject)([c.default],(function(){return{subscription:c.default.getPremiumSubscription(),hasFetchedSubscriptions:c.default.hasFetchedSubscriptions()}})),R=P.subscription,L=P.hasFetchedSubscriptions;if(a.useEffect((function(){L||(0,u.fetchSubscriptions)()}),[L]),r!==d.ExperimentBuckets.TREATMENT_1||null==R||!(0,E.isSubscriptionStatusFailedPayment)(R.status)||C)return null;var D=R.status===S.SubscriptionStatusTypes.PAST_DUE?f.MAX_INVOICE_PAYMENT_DAYS:f.MAX_ACCOUNT_HOLD_DAYS,w=(0,o.default)(R.currentPeriodStart).add(D,"days"),j=R.id+":"+w.toISOString();return N===j?null:M("div",{className:I.default.premiumRetentionNotice},void 0,M(_.default,{className:I.default.premiumRetentionNoticeIcon,color:E.default.getPremiumType(R.planId)===S.PremiumTypes.TIER_1?y.GradientCssUrls.PREMIUM_TIER_1:y.GradientCssUrls.PREMIUM_TIER_2}),M("div",{className:I.default.premiumRetentionNoticeContent},void 0,M(h.default,{size:h.default.Sizes.SIZE_12},void 0,O.default.Messages.PREMIUM_RETENTION_EMOJI_PICKER_DESCRIPTION.format({planName:E.default.getDisplayPremiumType(R.planId),endsAt:w})),M("div",{},void 0,M(p.default,{onClick:function(){(0,g.trackPremiumSettingsPaneOpened)(n),t(),s.default.open(S.UserSettingsSections.PREMIUM)}},void 0,O.default.Messages.PREMIUM_RETENTION_EMOJI_PICKER_UPDATE_PAYMENT_INFORMATION))),M(v.default,{onClick:function(){l.default.set("premiumRetentionEmojiPickerNotice",j),N=j,b(!0)}},void 0,M(m.default,{className:I.default.premiumRetentionNoticeClose})))};P.displayName="EmojiPickerPremiumRetentionNotice";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(473)),i=v(n(1166)),l=v(n(5948)),u=v(n(29)),s=v(n(61)),d=n(5949),f=n(1),c=v(n(6)),p=v(n(7517));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.onLearnMore,r=e.onClose,v=e.channel,y=(0,i.default)(),_=a.useState(!1),h=_[0],E=_[1],g=y===f.ThemeTypes.LIGHT?n(9458):n(9459);return m("div",{className:p.default.premiumPromo},void 0,m(s.default,{className:p.default.premiumPromoClose,onClick:r},void 0,c.default.Messages.CLOSE),m("img",{alt:"",className:p.default.premiumPromoImage,src:g}),m("div",{className:p.default.premiumPromoTitle},void 0,c.default.Messages.PREMIUM_PROMO_TITLE_SEARCH_UPSELL),m("div",{className:p.default.premiumPromoDescription},void 0,c.default.Messages.PREMIUM_PROMO_DESCRIPTION_SEARCH_UPSELL.format({onClick:function(){(0,d.trackPremiumSettingsPaneOpened)(v),o.default.open(f.UserSettingsSections.PREMIUM),t()}})),m(l.default,{subscriptionTier:f.PremiumSubscriptionSKUs.TIER_2,submitting:h,premiumModalAnalyticsLocation:{section:f.AnalyticsSections.EMOJI_PICKER_POPOUT,object:f.AnalyticsObjects.BUTTON_CTA},size:u.default.Sizes.SMALL,color:u.default.Colors.GREEN,onClick:function(){E(!0)},onSubscribeModalClose:function(e){E(!1),e&&r()},buttonText:c.default.Messages.PREMIUM_REQUIRED_GET_NITRO}))};_.displayName="EmojiPickerPremiumUpsell";var h=_;t.default=h},function(e,t,n){e.exports=n.p+"9cbfe5105fc5f29ef4e659059ee01a46.svg"},function(e,t,n){e.exports=n.p+"222e7361d9f298ecb525cb9d9d9d7312.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=d(n(8312)),o=d(n(8297)),i=n(1168),l=n(8347),u=d(n(6)),s=d(n(7368));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}var c=r.forwardRef((function(e,t){var n=e.emojiListRef,d=e.gridNavigatorId,f=e.onKeyDown,c=r.useRef(null),p=(0,l.useEmojiPickerStore)((function(e){return{searchQuery:e.searchQuery,searchPlaceholder:e.searchPlaceholder,inspectedEmojiPosition:e.inspectedEmojiPosition}}),a.default),v=p.searchQuery,y=p.searchPlaceholder,m=p.inspectedEmojiPosition,_=r.useCallback((function(e){var t;(0,l.setActiveCategoryIndex)(""===e?0:i.INACTIVE_CATEGORY_INDEX),(0,l.setInspectedEmojiPosition)(0,0),(0,l.setSearchPlaceholder)(null),(0,l.setSearchQuery)(e),null===(t=n.current)||void 0===t||t.scrollTo(0)}),[n]),h=r.useCallback((function(){(0,l.setSearchQuery)("")}),[]);return r.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=c.current)||void 0===e?void 0:e.focus()}}})),r.createElement(o.default,{"aria-activedescendant":d+"-"+m.columnIndex+"-"+m.rowIndex,autoFocus:!0,query:v,ref:c,size:o.default.Sizes.MEDIUM,placeholder:null==y?u.default.Messages.SEARCH_FOR_EMOJI:y,onClear:h,onKeyDown:f,onQueryChange:_,className:s.default.searchBar,preventEscapePropagation:!1,useKeyboardNavigation:!1})})),p=r.memo(c);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=L(n(378)),i=L(n(8312)),l=n(3),u=L(n(473)),s=n(8392),d=L(n(39)),f=L(n(12)),c=L(n(151)),p=L(n(13)),v=n(139),y=n(8348),m=n(1172),_=n(9462),h=n(5944),E=L(n(362)),g=n(366),S=n(9463),O=n(8513),I=L(n(9468)),T=L(n(9469)),C=L(n(9470)),b=L(n(9473)),M=n(9474),N=n(9476),A=n(1),P=L(n(7530)),R=L(n(7349));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var k=(0,v.cssValueToNumber)(R.default.stickerPickerBreakpointSmall),U=(0,v.cssValueToNumber)(R.default.stickersListPaddingLeft),G=(0,v.cssValueToNumber)(R.default.stickersListPaddingRight),F=(0,v.cssValueToNumber)(R.default.stickerPickerPreviewMargin),B=(0,v.cssValueToNumber)(R.default.stickerPickerPreviewMarginSmall),H=(0,v.cssValueToNumber)(R.default.stickerPickerPreviewDimensions),x=(0,v.cssValueToNumber)(R.default.stickerPickerPreviewDimensionsSmall),V=(0,v.cssValueToNumber)(R.default.stickerPickerPreviewPadding),W=H+2*V,Y=x+2*V,z=(0,o.default)(_.trackStickerSearchEmpty,200),K=(0,o.default)(_.trackStickerSearchResultsViewed,200),$=function(e){var t=e.containerWidth,n=e.channel,r=e.onSelectSticker,o=e.closePopout,c=a.useRef(null),v=a.useRef(null),R=a.useRef(null),L=(0,y.useStickerPickerStore)((function(e){return[e.searchQuery,e.isSearchSuggestion,e.showPremiumUpsell]}),i.default),D=L[0],H=L[1],x=L[2],V=a.useRef(""),$=(0,h.useFilteredStickerPackCategories)(n),Z=0===$.length,q=(0,s.useExpressionPickerGridWidth)({gridWrapperRef:c,containerWidth:t,showingEmptyState:Z,listPaddingLeft:U,listScrollbarWidth:8}),X=(0,l.useStateFromStores)([d.default],(function(){return d.default.stickerPickerCollapsedSections})),J=a.useMemo((function(){return new Set(X)}),[X]),Q=(0,l.useStateFromStores)([f.default],(function(){return f.default.getNullableCurrentUser()})),ee=a.useMemo((function(){return(0,N.getFilteredStickers)(D,Q,n)}),[D,Q,n]),te=null!=ee?ee:{},ne=te.sendable,re=void 0===ne?[]:ne,ae=te.sendableWithPremium,oe=void 0===ae?[]:ae,ie=re.length+oe.length,le=a.useCallback((function(e){(0,_.trackStickerSearchSelect)(e,D,ie),r(e,g.StickerSelectLocation.STICKER_PICKER)}),[r,D,ie]),ue=null!=q&&q>k,se=(0,h.useStickersGrid)({filteredStickers:ee,stickersCategories:$,collapsedStickersCategories:J,listWidth:q,listPaddingRight:G,stickerNodeMargin:ue?F:B,stickerNodeWidth:ue?W:Y}),de=se.rowCount,fe=se.rowCountBySection,ce=se.stickersGrid,pe=se.gutterWidth,ve=se.columnCounts,ye=a.useCallback((function(e,t){var r=e.sticker,a=e.type,o=e.packId;t.location;if(a===g.StickerGridItemTypes.VIEW_ALL||null!=r&&!(0,m.isSendableSticker)(r,Q,n)){var i=E.default.getStickerPack(o);null!=i&&(0,O.openStickerPackViewAllModal)({stickerPack:i})}else null!=r&&le(r)}),[le,Q,n]),me=(0,S.useKeyboardNavigation)({columnCounts:ve,stickersListRef:v,stickersGrid:ce,onGridItemSelect:ye,store:y.useStickerPickerStore,setInspectedStickerPosition:y.setInspectedStickerPosition,gridNavigatorId:"sticker-picker-grid"}),_e=me.getItemProps,he=me.getRowProps,Ee=me.gridContainerProps,ge=me.handleGridContainerKeyDown,Se=me.isUsingKeyboardNavigation;a.useEffect((function(){return y.resetStoreState}),[]),a.useEffect((function(){""===V.current&&""!==D&&(0,_.trackStickerSearchStart)(),V.current=D}),[D]),a.useEffect((function(){0===ie?z(D):K(D,ie,H)}),[D,ie,H]),a.useLayoutEffect((function(){var e;null===(e=R.current)||void 0===e||e.focus()}),[]);var Oe=a.useCallback((function(){o(),p.default.track(A.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_section:A.AnalyticsSections.STICKER_PICKER_UPSELL}),u.default.open(A.UserSettingsSections.PREMIUM)}),[o]);return a.createElement(a.Fragment,null,j("div",{className:P.default.header},void 0,a.createElement(b.default,{ref:R,onKeyDown:ge,stickersListRef:v,channel:n})),Z?j(T.default,{className:P.default.emptyState}):a.createElement(a.Fragment,null,j(I.default,{stickersListRef:v,channel:n}),a.createElement("div",w({ref:c,className:P.default.listWrapper,id:"sticker-picker-grid"},Ee),null!=q?a.createElement(C.default,{ref:v,collapsedStickersCategories:J,filteredStickers:ee,getStickerItemProps:_e,getStickerRowProps:he,gridWidth:q,gutterWidth:pe,isUsingKeyboardNavigation:Se,onSelectSticker:le,rowCount:de,rowCountBySection:fe,stickersCategories:$,stickersGrid:ce,channel:n}):null)),x&&j(M.StickersPremiumUpsell,{onLearnMore:Oe}))},Z=function(e){var t=(0,l.useStateFromStores)([E.default],(function(){return!E.default.hasLoadedStickerPacks}));return(0,h.useFetchStickerPacks)(),j("div",{className:P.default.wrapper},void 0,t?j(c.default,{className:P.default.loadingIndicator}):a.createElement($,e))};Z.displayName="StickerPickerLoader";var q=Z;t.default=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackStickerSearchEmpty=t.trackStickerSearchSelect=t.trackStickerSearchResultsViewed=t.trackStickerSearchStart=void 0;var r=i(n(106)),a=i(n(13)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}t.trackStickerSearchStart=function(){a.default.track(o.AnalyticEvents.SEARCH_STARTED,{search_type:o.SearchTypes.STICKER})};t.trackStickerSearchResultsViewed=function(e,t,n){r.default.trackWithMetadata(o.AnalyticEvents.SEARCH_RESULT_VIEWED,{search_type:o.SearchTypes.STICKER,total_results:t,query:e,is_suggestion:n})};t.trackStickerSearchSelect=function(e,t,n){null!=t&&""!==t&&r.default.trackWithMetadata(o.AnalyticEvents.SEARCH_RESULT_SELECTED,{load_id:e.id,search_type:o.SearchTypes.STICKER,source_object:"Sticker Picker",total_results:n,query:t})};t.trackStickerSearchEmpty=function(e){null!=e&&""!==e&&r.default.trackWithMetadata(o.AnalyticEvents.SEARCH_RESULT_EMPTY,{query:e,search_type:o.SearchTypes.STICKER,source_object:"Sticker Picker"})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useKeyboardNavigation=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(8404),o=n(8296),i=n(8392),l=n(398);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}t.useKeyboardNavigation=function(e){var t=e.columnCounts,n=e.stickersGrid,u=e.stickersListRef,s=e.store,d=e.gridNavigatorId,f=e.setInspectedStickerPosition,c=e.onGridItemSelect,p=(0,o.useAnalyticsContext)(),v=r.useCallback((function(e){c(e,p)}),[c,p]),y=r.useCallback((function(e,t){f(e,t,l.InspectedStickerChangeSource.GRID_NAVIGATOR_EVENT)}),[f]),m=(0,i.useExpressionPickerGridKeyboardNavigation)({columnCounts:t,gridNavigatorId:d,itemGrid:n,itemList:u,onGridNavigatorItemSelect:v,onGridNavigatorPositionChange:y}),_=m.gridDispatch,h=m.getItemProps,E=m.getRowProps,g=m.gridContainerProps,S=m.handleGridContainerKeyDown,O=m.isUsingKeyboardNavigation;return r.useEffect((function(){return s.subscribe((function(e){if(null!=e){var t=e.columnIndex,n=e.rowIndex;e.source!==l.InspectedStickerChangeSource.GRID_NAVIGATOR_EVENT&&_({type:a.GridActionType.SET_FOCUSED_POSITION,x:t,y:n})}}),(function(e){return e.inspectedStickerPosition}))}),[_,s]),{getItemProps:h,getRowProps:E,gridContainerProps:g,handleGridContainerKeyDown:S,isUsingKeyboardNavigation:O}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetStoreState=t.resetInspectedStickerPosition=t.setInspectedStickerPosition=t.useStickerViewAllStore=void 0;var r,a=(r=n(251))&&r.__esModule?r:{default:r};var o=Object.freeze({inspectedStickerPosition:{rowIndex:-1,columnIndex:-1}}),i=(0,a.default)((function(e){return o})),l=i;t.useStickerViewAllStore=l;var u=function(e,t,n){i.setState({inspectedStickerPosition:{rowIndex:t,columnIndex:e,source:n}})};t.setInspectedStickerPosition=u;t.resetInspectedStickerPosition=function(){u(-1,-1)};t.resetStoreState=function(){i.setState(o)}},function(e,t,n){e.exports=n.p+"ae971fcbf3bbca191a19e338c38f0917.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(149)),l=p(n(9467)),u=p(n(47)),s=p(n(24)),d=n(290),f=p(n(6)),c=p(n(7522));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}var _=function(e){var t=e.stickerPack;return y("div",{className:c.default.features},void 0,(0,d.isStickerPackAnimated)(t)?y(i.default,{tooltipClassName:c.default.featuresTooltip,position:i.default.Positions.TOP,text:f.default.Messages.STICKER_PICKER_PACK_DETAILS_ANIMATED},void 0,(function(e){return a.createElement(l.default,m({},e,{className:c.default.featureIcon}))})):null)};_.displayName="StickerPickerShopListHeaderFeatures";var h=function(e){var t=e.className,n=e.stickerPack,r=e.withDescription,a=void 0!==r&&r;return y("div",{className:(0,o.default)(c.default.header,t)},void 0,y("div",{className:c.default.title},void 0,y(u.default,{className:c.default.heading},void 0,n.name),y(_,{stickerPack:n})),a&&null!=n.description&&y(s.default,{className:c.default.description},void 0,n.description),y("div",{className:c.default.count},void 0,f.default.Messages.STICKER_PACK_STICKER_COUNT.format({numStickers:n.stickers.length})))};h.displayName="StickerPickerShopListHeader";var E=a.memo(h);t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 12 12"}),s("path",{d:"M2.5 1.50146V10.5015L10 6.00146L2.5 1.50146Z",fill:d,className:f}))}d.displayName="PlayIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=n(8296),l=M(n(8394)),u=n(1218),s=M(n(8621)),d=M(n(15)),f=M(n(61)),c=M(n(149)),p=M(n(1224)),v=M(n(5686)),y=M(n(13)),m=n(139),_=n(8348),h=n(5944),E=M(n(362)),g=n(366),S=n(290),O=M(n(5936)),I=n(1),T=M(n(6)),C=M(n(7524)),b=M(n(7349));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var R=(0,m.cssValueToNumber)(b.default.stickerCategoryListPadding),L=(0,m.cssValueToNumber)(b.default.stickerCategoryIconSize),D=(0,m.cssValueToNumber)(b.default.stickerCategoryIconMargin),w=(0,m.cssValueToNumber)(b.default.stickerCategoryUnicodeIconSize),j=(0,m.cssValueToNumber)(b.default.categorySeparatorSize),k=(0,m.cssValueToNumber)(b.default.categorySeparatorMarginVertical),U=[R,R,R,R],G=2*(L+D)+R,F=j+2*k,B=P(v.default,{height:24,width:24}),H=function(e){var t,n=e.stickersListRef,r=e.channel,v=a.useRef(null),m=a.useState(!0),b=m[0],M=m[1],N=(0,_.useStickerPickerStore)((function(e){return e.activeCategoryIndex})),R=a.useCallback((function(e){var t,r=_.useStickerPickerStore.getState().searchQuery;((0,_.setActiveCategoryIndex)(e),""!==r)?(0,_.setSearchQuery)(""):null===(t=n.current)||void 0===t||t.scrollToSectionTop(e)}),[n]),k=(0,h.useFilteredStickerPackCategories)(r),H=a.useMemo((function(){var e,t=k.filter((function(e){return e.type===g.StickerCategoryTypes.GUILD})).length,n=t+((null===(e=k[0])||void 0===e?void 0:e.type)===g.StickerCategoryTypes.RECENT?1:0);return{firstStandardStickerCategoryIndex:n+1,firstStandardStickerCategoryOffsetTop:n*(L+D)-D+F,guildCategoryCount:t}}),[k]),x=H.firstStandardStickerCategoryIndex,V=H.firstStandardStickerCategoryOffsetTop,W=H.guildCategoryCount;a.useLayoutEffect((function(){M(W>=7)}),[W]);var Y=function(e){var t=e.activeIndex,n=e.handleCategorySelect,r=e.stickerPickerCategories,s=e.categoryListRef,v=e.firstStandardStickerCategoryOffsetTop,m=e.setShouldRenderShortcut,h=(0,i.useAnalyticsContext)(),b=(0,_.useStickerPickerStore)((function(e){return""!==e.searchQuery})),M=a.useCallback((function(e){var i,s,v=(null===(i=r[0])||void 0===i?void 0:i.type)===g.StickerCategoryTypes.RECENT,m=r.length>0;if(0===e&&v)return P(f.default,{"aria-label":T.default.Messages.STICKER_PICKER_CATEGORIES_RECENT,className:(0,o.default)(C.default.stickerCategory,C.default.stickerCategoryRecent,(s={},s[C.default.stickerCategoryRecentDisabled]=m&&!v,s[C.default.stickerCategoryRecentSelected]=!b&&v&&0===t,s)),onClick:function(){n(0)}},"recent",P(p.default,{className:C.default.stickerCategoryRecentIcon,height:w,width:w}));var _=t===e,M=r[e],N=r[e+1],R=null!=N&&M.type===g.StickerCategoryTypes.GUILD&&N.type!==g.StickerCategoryTypes.GUILD,D=M.type===g.StickerCategoryTypes.PACK,j="",k=null;if(M.type===g.StickerCategoryTypes.GUILD){var U=d.default.getGuild(M.id);null!=U&&(j=U.name,k=P(l.default,{guild:U,isSelected:_}))}else if(D){var G=E.default.getStickerPack(M.id);null!=G&&(j=G.name,k=P(O.default,{disableAnimation:!_||b,size:L,sticker:(0,S.getStickerPackPreviewSticker)(G)}))}return P(a.Fragment,{},M.id,P(c.default,{position:c.default.Positions.RIGHT,text:j,tooltipContentClassName:C.default.tooltip},void 0,(function(t){var r;return a.createElement(f.default,A({},t,{"aria-label":j,className:(0,o.default)(C.default.stickerCategory,(r={},r[C.default.premiumCategory]=D,r[C.default.premiumCategorySelected]=!b&&_&&D,r)),onClick:function(){M.type===g.StickerCategoryTypes.PACK&&y.default.track(I.AnalyticEvents.EXPRESSION_PICKER_CATEGORY_SELECTED,{location:null==h?void 0:h.location,tab:u.ExpressionPickerViewType.STICKER,sticker_pack_id:M.id}),n(e)}}),k)})),R?P("hr",{className:C.default.guildCategorySeparator},"separator"):null)}),[t,h,n,b,r]);return{getScrollOffsetForIndex:a.useCallback((function(e,t){return t?G:0}),[]),renderCategoryListItem:M,rowHeight:a.useCallback((function(e){var t=r[e],n=r[e+1],a=null!=n&&t.type===g.StickerCategoryTypes.GUILD&&n.type!==g.StickerCategoryTypes.GUILD;return L+(a?F:D)}),[r]),onScroll:a.useCallback((function(e){var t,n=null===(t=s.current)||void 0===t?void 0:t.getListDimensions();if(null!=n){var r=e+n.height;m(r-j<v)}}),[v])}}({activeIndex:N,stickerPickerCategories:k,categoryListRef:v,firstStandardStickerCategoryOffsetTop:V,handleCategorySelect:R,setShouldRenderShortcut:M}),z=Y.renderCategoryListItem,K=Y.rowHeight,$=Y.onScroll,Z=a.useCallback((function(){var e;R(x),null===(e=v.current)||void 0===e||e.scrollTo(V)}),[R,x,V]);return a.createElement(s.default,{activeIndex:N,className:C.default.categoryListWithSearch,listPadding:U,onScroll:$,ref:v,renderCategoryListItem:z,rowCount:k.length,rowHeight:K},W>=7&&P(f.default,{"aria-hidden":!b,className:(0,o.default)(C.default.standardStickerShortcut,(t={},t[C.default.invisibleShortcut]=!b,t)),onClick:Z},void 0,B))};H.displayName="StickerPickerCategoryList";var x=H;t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=n(3),l=n(280),u=E(n(47)),s=E(n(24)),d=E(n(13)),f=n(398),c=n(5944),p=E(n(362)),v=E(n(5936)),y=E(n(8868)),m=n(1),_=E(n(6)),h=E(n(7526));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.className;(0,c.useFetchStickerPacks)();var n=(0,i.useStateFromStores)([p.default],(function(){return f.EMPTY_STATE_STICKERS.map((function(e){return p.default.getStickerById(e)}))}));return a.useEffect((function(){d.default.track(m.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:l.PremiumUpsellTypes.EMPTY_STICKER_PICKER_UPSELL,source:{section:m.AnalyticsSections.EMPTY_STICKER_PICKER_UPSELL}})}),[]),S("div",{className:(0,o.default)(h.default.emptyState,t)},void 0,S(u.default,{className:h.default.header,size:u.default.Sizes.SIZE_24},void 0,_.default.Messages.STICKER_PICKER_PREMIUM_EMPTY_STATE_TITLE),S(s.default,{className:h.default.subtitle,color:s.default.Colors.HEADER_SECONDARY,size:s.default.Sizes.SIZE_16},void 0,_.default.Messages.STICKER_PICKER_PREMIUM_EMPTY_STATE_SUBTITLE),S("div",{className:h.default.stickersRow},void 0,n.map((function(e){return S(v.default,{sticker:e,className:h.default.sticker,size:80},null==e?void 0:e.id)}))),S(y.default,{analyticsSection:m.AnalyticsSections.EXPRESSION_PICKER}))}O.displayName="StickerPickerEmptyState"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=B();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=F(n(8312)),i=n(3),l=F(n(274)),u=F(n(8624)),s=n(8296),d=F(n(8394)),f=n(1218),c=n(8392),p=F(n(8618)),v=F(n(15)),y=F(n(12)),m=F(n(61)),_=F(n(8362)),h=n(131),E=F(n(1224)),g=F(n(24)),S=F(n(13)),O=n(139),I=n(8348),T=n(1172),C=n(398),b=F(n(362)),M=n(366),N=n(290),A=F(n(5936)),P=n(8513),R=F(n(9471)),L=F(n(8866)),D=n(1),w=F(n(6)),j=F(n(7527)),k=F(n(7349)),U=F(n(7353)),G=F(n(9472));function F(e){return e&&e.__esModule?e:{default:e}}function B(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return B=function(){return e},e}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var V=(0,O.cssValueToNumber)(k.default.stickerPickerBreakpointSmall),W=(0,O.cssValueToNumber)(k.default.stickerPickerBreakpointMedium),Y=(0,O.cssValueToNumber)(k.default.stickersListPaddingTop),z=(0,O.cssValueToNumber)(k.default.stickersListPaddingTopSearchResults),K=(0,O.cssValueToNumber)(k.default.stickersListPaddingRight),$=(0,O.cssValueToNumber)(k.default.stickersListPaddingBottom),Z=(0,O.cssValueToNumber)(k.default.stickersListPaddingLeft),q=(0,O.cssValueToNumber)(k.default.stickersListDividerHeight),X=(0,O.cssValueToNumber)(U.default.expressionPickerListSectionHeadingHeight),J=(0,O.cssValueToNumber)(k.default.stickerPickerPreviewDimensions),Q=(0,O.cssValueToNumber)(k.default.stickerPickerPreviewDimensionsSmall),ee=(0,O.cssValueToNumber)(k.default.stickerPickerPreviewPadding),te=(0,O.cssValueToNumber)(k.default.stickerPickerPreviewMargin),ne=J+2*ee+te,re=Q+2*ee+te,ae=[Y,K,$,Z],oe=[z,K,$,Z],ie=["laugh","wave","yes","dance","sad","no","hi","bye","cry","ok"],le=function(e){var t=e.onSuggestionClick;return x("div",{className:j.default.searchSuggestions},void 0,ie.map((function(e){return x(m.default,{className:j.default.searchSuggestion,onClick:function(){return t(e)}},e,x(g.default,{size:g.default.Sizes.SIZE_14,color:g.default.Colors.STANDARD},void 0,e))})))};le.displayName="StickerPickerSearchSuggestions";var ue=x(h.FormDivider,{}),se=x(E.default,{}),de=function(e){var t=e.collapsedStickersCategories,n=e.gridWidth,r=e.onSelectSticker,o=e.getStickerItemProps,u=e.getStickerRowProps,c=e.gutterWidth,m=e.inspectedStickerPosition,_=e.isScrolling,h=e.isUsingKeyboardNavigation,E=e.stickersGrid,g=e.stickersCategories,O=e.filteredStickers,R=e.ownedStickerPacks,k=e.channel,U=(0,s.useAnalyticsContext)(),G=(0,i.useStateFromStores)([y.default],(function(){return y.default.getNullableCurrentUser()})),F=function(e){var t=e.onSelectSticker,n=e.channel,r=e.currentUser,o=(0,s.useAnalyticsContext)(),i=(0,I.useStickerPickerStore)((function(e){return e.searchQuery}));return{handleStickerInspect:a.useCallback((function(e){var t=e.visibleRowIndex,n=e.columnIndex,r=e.gridSectionIndex;(0,I.setActiveCategoryIndex)(r),(0,I.setInspectedStickerPosition)(n,t,C.InspectedStickerChangeSource.MOUSE_EVENT),e.type===M.StickerGridItemTypes.STICKER&&(0,I.setSearchPlaceholder)(e.sticker.name)}),[]),handleSelect:a.useCallback((function(e){var a=e.packId,l=e.sticker,u=e.type,s=H({},o.location,{object:""===i?D.AnalyticsObjects.STICKER_PICKER_VIEW_ALL:D.AnalyticsObjects.STICKER_SEARCH_VIEW_ALL});if(null!=l&&!(0,T.isSendableSticker)(l,r,n)){var d=b.default.getStickerPack(a);null!=d&&(S.default.track(D.AnalyticEvents.STICKER_PACK_VIEW_ALL,{sticker_id:l.id,sticker_pack_id:a,location:s}),(0,P.openStickerPackViewAllModal)({stickerPack:d}));var f=(0,N.isGuildSticker)(l),c=(0,T.getStickerSendability)(l,r,n);return c===T.StickerSendability.SENDABLE_WITH_PREMIUM&&(0,I.setShowPremiumUpsell)(!0),void(f&&T.StickerSendability.SENDABLE_WITH_PREMIUM_GUILD)}u===M.StickerGridItemTypes.STICKER&&null!=l&&t(l)}),[o.location,t,i,r,n])}}({onSelectSticker:r,channel:k,currentUser:G}),B=F.handleStickerInspect,Y=F.handleSelect,z=a.useCallback((function(e){l.default.updateLocalSettings({stickerPickerCollapsedSections:Array.from(e)})}),[]),K=a.useCallback((function(e){var t=E[e];return null!=t?x(L.default,{getStickerItemProps:o,getStickerRowProps:u,gutterWidth:c,inspectedStickerPosition:m,isScrolling:_,isUsingKeyboardNavigation:h,onInspect:B,onSelect:Y,rowIndex:e,stickerClassName:j.default.sticker,stickerDescriptors:t,stickerSize:n>V?J:Q,preferAnimation:n<=W,ownedStickerPacks:R,isDisplayingIndividualStickers:!0,channel:k,currentUser:G},e):null}),[E,o,u,c,m,_,h,B,Y,n,R,k,G]),$=a.useCallback((function(e,t){return x("div",{},e,t)}),[]),Z=a.useCallback((function(e,n){var r=(void 0===n?{}:n).isStickerPack,a=void 0===r||r,o=new Set(t),i=t.has(e);i?o.delete(e):o.add(e),S.default.track(D.AnalyticEvents.EXPRESSION_PICKER_CATEGORY_COLLAPSE_TOGGLED,{location:null==U?void 0:U.location,tab:f.ExpressionPickerViewType.STICKER,collapsed:!i,sticker_pack_id:a?e:null}),z(o)}),[U,t,z]);return{renderRow:K,renderSection:$,renderSectionHeader:a.useCallback((function(e){var n=g[e];if(null!=O){var r=O.sendable,o=O.sendableWithPremium;if(0===e&&r.length>0)return null;var i=r.length>0&&o.length>0;return a.createElement(a.Fragment,null,i?x("div",{className:j.default.divider},void 0,ue):null,x(p.default,{className:j.default.packHeader,"aria-label":w.default.Messages.STICKERS_YOU_MIGHT_LIKE_A11Y},"stickers-you-might-like-header",w.default.Messages.STICKERS_YOU_MIGHT_LIKE))}switch(n.type){case M.StickerCategoryTypes.RECENT:return x(p.default,{className:j.default.packHeader,"aria-label":w.default.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:n.name}),icon:se,isCollapsed:t.has(n.id),onClick:function(){return Z(n.id,{isStickerPack:!1})}},"header-"+n.id,n.name);case M.StickerCategoryTypes.GUILD:var l=v.default.getGuild(n.id);return null==l?null:x(p.default,{className:j.default.packHeader,"aria-label":w.default.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:l.name}),icon:x(d.default,{guild:l,height:16,width:16}),isCollapsed:t.has(l.id),onClick:function(){return Z(l.id)}},"h"+l.id,l.name);case M.StickerCategoryTypes.PACK:var u=b.default.getStickerPack(n.id);return null==u?null:x(p.default,{className:j.default.packHeader,"aria-label":w.default.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:u.name}),icon:x(A.default,{disableAnimation:!0,size:12,sticker:(0,N.getStickerPackPreviewSticker)(u)}),isCollapsed:t.has(u.id),onClick:function(){return Z(u.id)}},"h"+u.id,u.name)}}),[t,g,Z,O]),sectionHeaderHeight:a.useCallback((function(e){if(null!=O){var t=O.sendable,n=O.sendableWithPremium;if(0===e&&t.length>0)return 0;var r=t.length>0&&n.length>0?q:0;return X+r}return X}),[O])}},fe=a.forwardRef((function(e,t){var n=e.collapsedStickersCategories,r=e.gridWidth,l=e.filteredStickers,s=e.getStickerItemProps,d=e.getStickerRowProps,f=e.gutterWidth,p=e.isUsingKeyboardNavigation,v=e.onSelectSticker,y=e.rowCount,m=e.rowCountBySection,h=e.stickersCategories,E=e.stickersGrid,g=e.channel,S=a.useRef(!1),O=a.useRef(null),T=(0,I.useStickerPickerStore)((function(e){return[e.searchQuery,e.activeCategoryIndex,e.inspectedStickerPosition]}),o.default),C=T[0],M=T[1],N=T[2],A=(0,i.useStateFromStores)([b.default],(function(){return b.default.getPremiumPacks()})),P=a.useMemo((function(){return new Set(A.map((function(e){return e.id})))}),[A]),L=de({collapsedStickersCategories:n,gridWidth:r,stickersCategories:h,stickersGrid:E,isScrolling:S,isUsingKeyboardNavigation:p,onSelectSticker:v,getStickerItemProps:s,getStickerRowProps:d,gutterWidth:f,inspectedStickerPosition:N,filteredStickers:l,ownedStickerPacks:P,channel:g}),D=L.renderRow,k=L.renderSection,U=L.renderSectionHeader,F=L.sectionHeaderHeight,B=(0,c.useSynchronizedActiveCategoryIndexForScrollPosition)({activeCategoryIndex:M,isScrolling:S,listRef:O,onActiveCategoryIndexChange:I.setActiveCategoryIndex,scrollOffset:20,searchQuery:C});return(0,c.useSynchronizedScrollPositionForActiveCategoryIndex)({searchQuery:C,activeCategoryIndex:M,listRef:O}),a.useImperativeHandle(t,(function(){return{scrollTo:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=O.current)||void 0===e?void 0:e.scrollTo.apply(e,n)},getRowDescriptors:function(){var e,t;return null!==(e=null===(t=O.current)||void 0===t?void 0:t.getRowDescriptors())&&void 0!==e?e:[]},getSectionDescriptors:function(){var e,t;return null!==(e=null===(t=O.current)||void 0===t?void 0:t.getSectionDescriptors())&&void 0!==e?e:[]},scrollToSectionTop:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=O.current)||void 0===e?void 0:e.scrollToSectionTop.apply(e,n)},scrollRowIntoView:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=O.current)||void 0===e?void 0:e.scrollRowIntoView.apply(e,n)},getScrollerNode:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=O.current)||void 0===e?void 0:e.getScrollerNode.apply(e,n)},scrollIntoViewNode:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=O.current)||void 0===e?void 0:e.scrollIntoViewNode.apply(e,n)},getListDimensions:function(){for(var e,t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return null!==(e=null===(t=O.current)||void 0===t?void 0:t.getListDimensions.apply(t,r))&&void 0!==e?e:{height:-1,totalHeight:-1}}}}),[]),x("div",{className:j.default.wrapper},void 0,null!=l&&0===l.sendable.length&&0===l.sendableWithPremium.length?x(u.default,{message:w.default.Messages.NO_STICKER_SEARCH_RESULTS_WITH_SUGGESTIONS,className:j.default.noSearchResultsContainer,noResultsImageURL:G.default,suggestions:x(le,{onSuggestionClick:function(e){return(0,I.setSearchQuery)(e,!0)}})}):a.createElement(_.default,{listPadding:null!=l?oe:ae,onScroll:B,renderRow:D,renderSection:null==l?k:void 0,renderSectionHeader:U,rowCount:y,rowCountBySection:m,rowHeight:r>V?ne:re,sectionHeaderHeight:F,stickyHeaders:!0,ref:O}),x(R.default,{stickersGrid:E}))}));t.default=fe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(8394)),i=m(n(8862)),l=m(n(15)),u=n(139),s=n(8348),d=m(n(362)),f=n(366),c=n(290),p=m(n(5936)),v=m(n(6)),y=m(n(7353));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=(0,u.cssValueToNumber)(y.default.expressionPickerInspectorBarGraphicPrimaryDimensions),g=(0,u.cssValueToNumber)(y.default.expressionPickerInspectorBarGraphicSecondaryDimensions),S=a.memo((function(e){var t=e.stickersGrid,n=(0,s.useStickerPickerStore)((function(e){return e.inspectedStickerPosition})),r=a.useMemo((function(){var e,r=n.rowIndex,a=n.columnIndex,o=null===(e=t[r])||void 0===e?void 0:e[a];return(null==o?void 0:o.type)!==f.StickerGridItemTypes.STICKER?null:o.sticker}),[t,n]);if(null==r)return null;var u=function(e){var t=null,n=null;if((0,c.isGuildSticker)(e)){var r=l.default.getGuild(e.guild_id);null!=r&&(t=v.default.Messages.STICKER_FROM_SOURCE.format({source:r.name}),n=h(o.default,{guild:r}))}else if((0,c.isStandardSticker)(e)){var a=d.default.getStickerPack(e.pack_id);null!=a&&(t=v.default.Messages.STICKER_FROM_SOURCE.format({source:a.name}),n=h(p.default,{size:g,sticker:(0,c.getStickerPackPreviewSticker)(a),disableAnimation:!0}))}return{title:t,graphic:n}}(r),y=u.graphic,m=u.title;return h(i.default,{graphicPrimary:h(p.default,{isInteracting:!0,size:E,sticker:r,disableAnimation:!0}),graphicSecondary:y,titlePrimary:r.name,titleSecondary:m})}));t.default=S},function(e,t,n){e.exports=n.p+"7445c3003909a83b8f7ace3ff361fc98.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(8312)),i=c(n(8297)),l=n(8348),u=n(398),s=n(5944),d=c(n(6)),f=c(n(7528));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=a.forwardRef((function(e,t){var n=e.onKeyDown,r=e.stickersListRef,c=e.channel,p=(0,s.useHasSendableSticker)(c),y=a.useRef(null),m=(0,l.useStickerPickerStore)((function(e){return{searchQuery:e.searchQuery,searchPlaceholder:e.searchPlaceholder,isSearchSuggestion:e.isSearchSuggestion}}),o.default),_=m.searchQuery,h=m.searchPlaceholder,E=m.isSearchSuggestion,g=a.useCallback((function(e){var t;(0,l.setActiveCategoryIndex)(""===e?0:u.INACTIVE_CATEGORY_INDEX),(0,l.setInspectedStickerPosition)(0,0),(0,l.setSearchPlaceholder)(null),(0,l.setSearchQuery)(e),null===(t=r.current)||void 0===t||t.scrollTo(0)}),[r]),S=a.useCallback((function(){(0,l.setSearchQuery)("")}),[]);return a.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=y.current)||void 0===e?void 0:e.focus()}}})),a.useLayoutEffect((function(){var e;E&&(null===(e=y.current)||void 0===e||e.focus())}),[E]),v("div",{className:f.default.wrapper},void 0,a.createElement(i.default,{autoFocus:!0,disabled:!p,query:_,ref:y,size:i.default.Sizes.MEDIUM,placeholder:null!=h?h:p?d.default.Messages.SEARCH_FOR_STICKERS:d.default.Messages.NO_STICKERS_TO_SEARCH_THROUGH,onClear:S,onKeyDown:n,onQueryChange:g,className:f.default.searchBar,preventEscapePropagation:!1,useKeyboardNavigation:!1}))}));t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StickersPremiumUpsell=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(280),i=m(n(61)),l=m(n(255)),u=m(n(24)),s=m(n(13)),d=n(8348),f=m(n(8868)),c=n(1),p=m(n(6)),v=m(n(7529)),y=m(n(9475));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=h(l.default,{}),g=function(e){var t=e.onLearnMore;a.useEffect((function(){s.default.track(c.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{location_section:c.AnalyticsSections.STICKER_PICKER_UPSELL,type:o.PremiumUpsellTypes.STICKER_PICKER_UPSELL})}),[]);return h("div",{className:v.default.upsellWrapper},void 0,h("div",{className:v.default.upsellBackground}),h("div",{className:v.default.upsellContent},void 0,h("img",{className:v.default.upsellImage,src:y.default,alt:p.default.Messages.STICKER_PICKER_PREMIUM_UPSELL_ALT}),h(u.default,{className:v.default.upsellTitle,color:u.default.Colors.HEADER_PRIMARY,size:u.default.Sizes.SIZE_20,strong:!0},void 0,p.default.Messages.STICKER_PICKER_PREMIUM_UPSELL_TITLE),h(u.default,{className:v.default.upsellDescription,size:u.default.Sizes.SIZE_16},void 0,p.default.Messages.STICKER_PICKER_PREMIUM_UPSELL_DESCRIPTION.format({onClick:t})),h(f.default,{analyticsSection:c.AnalyticsSections.EXPRESSION_PICKER})),h(i.default,{className:v.default.upsellClose,onClick:function(){return(0,d.setShowPremiumUpsell)(!1)}},void 0,E))};t.StickersPremiumUpsell=g,g.displayName="StickersPremiumUpsell"},function(e,t,n){e.exports=n.p+"a375de187c8d70afb21e426ffa95453d.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilteredStickers=void 0;var r=n(1172),a=n(9477);t.getFilteredStickers=function(e,t,n){if(""===e)return null;var o=[],i=[];return(0,a.searchAllStickers)(e).forEach((function(e){var a=(0,r.getStickerSendability)(e,t,n);a===r.StickerSendability.SENDABLE?o.push(e):a===r.StickerSendability.SENDABLE_WITH_PREMIUM&&i.push(e)})),{sendable:o,sendableWithPremium:i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchUnsendableStickers=t.searchSendableStickers=t.searchAllStickers=void 0;var r,a=(r=n(697))&&r.__esModule?r:{default:r},o=n(1172);t.searchAllStickers=function(e){return a.default.queryStickers([e],!0).stickers.map((function(e){return e.sticker}))};t.searchSendableStickers=function(e,t){return a.default.queryStickers([e],!0,[t,function(e,t){return t===o.StickerSendability.SENDABLE}]).stickers.map((function(e){return e.sticker}))};t.searchUnsendableStickers=function(e,t){return a.default.queryStickers([e],!0,[t,function(e,t){return t!==o.StickerSendability.SENDABLE}]).stickers.map((function(e){return e.sticker}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=N(n(9)),i=P(n(680)),l=n(704),u=n(1250),s=N(n(1257)),d=N(n(8622)),f=n(8365),c=n(1172),p=N(n(362)),v=n(366),y=n(290),m=N(n(5936)),_=N(n(8867)),h=n(8513),E=N(n(61)),g=N(n(248)),S=N(n(24)),O=N(n(13)),I=n(9479),T=n(1306),C=n(1),b=N(n(6)),M=N(n(7532));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var w,j=(0,u.cssValueToNumber)(M.default.containerPadding),k=(0,u.cssValueToNumber)(M.default.stickerSuggestionSize),U=(0,u.cssValueToNumber)(M.default.stickerSuggestionMargin),G=2*k+U+2*j,F=function(){return Promise.resolve()};!function(e){e[e.STICKER=0]="STICKER"}(w||(w={}));var B=L(_.default,{size:14});function H(e){var t,n=e.isFocused,r=e.isHidden,l=e.sendability,u=e.listIndex,s=e.sticker,d=e.onMouseOver,f=e.onSelectSticker,p=(0,i.useListItem)(""+u),v=p.tabIndex,y=D(p,["tabIndex"]);return a.createElement(E.default,R({},y,{tabIndex:r?-1:v,className:(0,o.default)(M.default.suggestedExpression,(t={},t[M.default.suggestedExpressionFocused]=n,t)),focusProps:{enabled:!1},onClick:function(){return f(s,l)},onMouseOver:d}),L(g.default,{mask:g.default.Masks.STICKER_ROUNDED_RECT,width:k+4,height:k+4,className:M.default.mask},void 0,L("div",{className:M.default.maskBackground})),L(m.default,{maskAsset:!0,size:k,sticker:s,className:M.default.sticker}),l!==c.StickerSendability.SENDABLE&&B)}H.displayName="ExpressionSuggestionSticker";var x=a.memo((function(e){var t,n,r=e.editorRef,u=e.channel,m=e.isEditorFocused,_=e.onSelectSticker,g=a.useContext(d.default),N=a.useState(null),A=N[0],P=N[1],j=a.useState(!1),k=j[0],U=j[1],B=a.useState(null),x=B[0],V=B[1],W=(0,f.useExpressionPickerStore)((function(e){return null!=e.activeView})),Y=a.useRef(null),z=a.useState(""),K=z[0],$=z[1],Z=a.useState(!1),q=Z[0],X=Z[1],J=a.useState(!1),Q=J[0],ee=J[1],te=(0,I.useStickerSuggestionResults)(K,k,u),ne=(0,I.useTextChangeHandler)({setTextInputValue:$,setHasDismissed:U,setHasSelection:ee,setFocusedSuggestionType:P}),re=ne.handleTextChange,ae=ne.debouncedSetTextInputValue;a.useEffect((function(){var e=function(e){X(e)},t=function(e){var t,n=""!==e&&null!=e;(ee(n),n)&&(P(null),null===(t=r.current)||void 0===t||t.focus())};return g.addListener("text-changed",re),g.addListener("autocomplete-visibility-change",e),g.addListener("selection-changed",t),function(){g.removeListener("text-changed",re),g.removeListener("autocomplete-visibility-change",e),g.removeListener("selection-changed",t)}}),[re,r,g]),a.useLayoutEffect((function(){null==A&&V(null)}),[A]);var oe=a.useState(!1),ie=oe[0],le=oe[1];a.useLayoutEffect((function(){requestAnimationFrame((function(){var e;le(m||!0===(null===(e=Y.current)||void 0===e?void 0:e.contains(document.activeElement)))}))}),[m]);var ue=te.length>0,se=ie&&!W&&!q&&!k&&!Q&&ue,de=function(e){var t=e.editorRef,n=e.hasStickerResults,r=e.shouldRenderSuggestions,o=e.focusedSuggestionType,u=e.setFocusedStickerListItem,s=e.setFocusedSuggestionType,d=e.setHasDismissed,f=e.setTextInputValue,c=a.useCallback((function(e,t){u(t)}),[u]),p=(0,i.default)({id:"expression-suggestions-stickers",isEnabled:!0,scrollToStart:F,scrollToEnd:F,orientation:l.Orientations.HORIZONTAL,setFocus:c,useVirtualFocus:!0});return a.useEffect((function(){var e=function(e){var a,i;if(!(!r||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){switch(e.key){case"ArrowUp":e.preventDefault(),null==o&&n&&(p.focusFirstVisibleItem(),s(w.STICKER));break;case"ArrowDown":s(null),null===(a=t.current)||void 0===a||a.focus();break;case"Escape":s(null),d(!0),f(""),null===(i=t.current)||void 0===i||i.focus()}o===w.STICKER&&p.containerProps.onKeyDown(e)}};return window.addEventListener("keydown",e,{capture:!0}),function(){return window.removeEventListener("keydown",e,{capture:!0})}}),[p,r,o,s,n,t,d,u,f]),{stickersNavigator:p}}({editorRef:r,hasStickerResults:ue,shouldRenderSuggestions:se,focusedSuggestionType:A,setFocusedSuggestionType:P,setHasDismissed:U,setFocusedStickerListItem:V,setTextInputValue:$}).stickersNavigator,fe=function(e,t){if(se){if(O.default.track(C.AnalyticEvents.AUTO_SUGGEST_EXPRESSION_SELECTED,{sticker_id:e.id}),t===c.StickerSendability.SENDABLE)U(!0),_(e,v.StickerSelectLocation.EXPRESSION_SUGGESTIONS),ae.cancel(),$("");else if((0,y.isStandardSticker)(e)){var n=p.default.getStickerPack(e.pack_id);null!=n&&(0,h.openStickerPackViewAllModal)({stickerPack:n})}g.emit("sticker-suggestions-hidden")}},ce=a.useRef([]),pe=a.useRef(!1);a.useEffect((function(){se&&(ce.current=te),se!==pe.current&&(g.emit(se?"sticker-suggestions-shown":"sticker-suggestions-hidden"),se&&(0,T.throttledTrackExpressionSuggestionDisplayed)()),pe.current=se}),[g,se,te]);var ve=!se,ye=se?te:ce.current;return L(E.default,{tabIndex:ve?-1:0,"aria-hidden":ve,className:(0,o.default)(M.default.container,(t={},t[M.default.hidden]=ve,t)),innerRef:Y,style:{minWidth:G},onClick:function(){var e;return null===(e=r.current)||void 0===e?void 0:e.focus()}},void 0,a.createElement(a.Fragment,null,L(i.ListNavigatorProvider,{navigator:de},void 0,L(i.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,n=e.tabIndex,r=D(e,["ref","tabIndex"]);return a.createElement("div",R({className:M.default.stickerResults,ref:function(e){t.current=e},onMouseLeave:function(){null==A&&V(null)},tabIndex:ve?-1:n},r),ye.map((function(e,t){var n=e.sticker,r=e.sendability;return L(H,{isFocused:x===""+t,isHidden:ve,sendability:r,listIndex:t,onMouseOver:function(){de.setFocus(""+t),V(""+t)},onSelectSticker:fe,sticker:n},n.id)})))}))),L("div",{className:M.default.bottomInformationTextContainer},void 0,L("div",{className:M.default.textDivider}),L(S.default,{className:M.default.descriptionText,style:{maxWidth:G}},void 0,null!=x?b.default.Messages.EXPRESSION_SUGGESTIONS_STICKER_NAME.format({stickerName:null===(n=te[+x])||void 0===n?void 0:n.sticker.name}):b.default.Messages.EXPRESSION_SUGGESTIONS_STICKER_SHORT_NAV_PROMPT.format({upHook:function(e,t){return L(s.default,{shortcut:"up",className:M.default.keybind},t)}})))),L("div",{className:M.default.containerBackground}))}));t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTextChangeHandler=t.useStickerSuggestionResults=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=y(n(378)),o=n(3),i=n(1172),l=n(5940),u=n(5944),s=y(n(362)),d=y(n(12)),f=y(n(697)),c=n(393),p=n(1361),v=n(1306);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var h=(0,c.promiseThrottle)(l.fetchStickerPacks,p.REQUEST_THROTTLE_DURATION_MS);t.useStickerSuggestionResults=function(e,t,n){var a=(0,u.useHasSendableSticker)(n),l=(0,o.useStateFromStores)([d.default],(function(){return d.default.getNullableCurrentUser()}));return r.useMemo((function(){var r=(0,v.getQueriesFromUserInput)(e);if(t||null==e||r.length>p.MAX_NUM_USER_INPUT_WORDS||!a)return[];var o=[],u=[],s=(0,v.removePunctuation)(e),d=s===r[0]?r:[s].concat(r);f.default.queryStickers(d,!1).stickers.forEach((function(e){var t=e.sticker,r=(0,i.getStickerSendability)(t,l,n),a={sticker:t,sendability:r};r===i.StickerSendability.SENDABLE?o.push(a):r===i.StickerSendability.SENDABLE_WITH_PREMIUM&&u.push(a)}));var c=[];return o.length>0&&(c=o.slice(0,p.MAX_NUM_SUGGESTED_STICKERS),0!==u.length&&(c.length===p.MAX_NUM_SUGGESTED_STICKERS&&c.pop(),c.push(u[0]))),c}),[e,n,a,t,l])};t.useTextChangeHandler=function(e){var t=e.setTextInputValue,n=e.setHasDismissed,o=e.setHasSelection,i=e.setFocusedSuggestionType,l=e.delayBeforeSuggestions,u=r.useRef(null),d=r.useRef(!1),f=r.useRef(!1),c=r.useMemo((function(){return(0,a.default)(t,null!=l?l:p.DELAY_BEFORE_SUGGESTIONS_MS)}),[t,l]);return{handleTextChange:function(){var e,r=(e=regeneratorRuntime.mark((function e(r){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=r&&""!==r){e.next=10;break}c.cancel(),null==t||t(""),null==n||n(!1),null==o||o(!1),null==i||i(null),u.current=null,d.current=!1,e.next=25;break;case 10:if(d.current||r.trim()===(null===(a=u.current)||void 0===a?void 0:a.trim())){e.next=25;break}if(u.current=r,!((0,v.getQueriesFromUserInput)(r).length>p.MAX_NUM_USER_INPUT_WORDS)){e.next=17;break}return d.current=!0,c.cancel(),t(""),e.abrupt("return");case 17:if(!0!==f.current){e.next=19;break}return e.abrupt("return");case 19:if(s.default.hasLoadedStickerPacks){e.next=24;break}return f.current=!0,e.next=23,h();case 23:f.current=!1;case 24:c(u.current);case 25:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){_(o,r,a,i,l,"next",e)}function l(e){_(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return r.apply(this,arguments)}}(),debouncedSetTextInputValue:c}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=I(n(0)),o=S(n(9)),i=S(n(8)),l=S(n(10341)),u=S(n(8325)),s=S(n(142)),d=S(n(8389)),f=S(n(1216)),c=n(8349),p=n(8289),v=I(n(9481)),y=S(n(9482)),m=S(n(9483)),_=S(n(9494)),h=n(1),E=S(n(6)),g=S(n(7344));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(){return(T=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}).apply(this,arguments)}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var M={12:g.default.fontSize12Padding,14:g.default.fontSize14Padding,15:g.default.fontSize15Padding,16:g.default.fontSize16Padding,18:g.default.fontSize18Padding,20:g.default.fontSize20Padding,24:g.default.fontSize24Padding},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).ref=a.createRef(),n._focusBlurQueue=Promise.resolve(),n.handleSelectionChange=function(){var e,t,r;n.props.focused&&n.props.onSelectionChanged(null===(e=(t=document).getSelection)||void 0===e||null===(r=e.call(t))||void 0===r?void 0:r.toString())},n.focus=function(){var e;null===(e=n._focusBlurQueue)||void 0===e||e.then((function(){n.setState({focused:!0},(function(){var e=n.ref.current;null!=e&&e.focus()}))}))},n.handlePrependText=function(e){var t=e.text,r=n.ref.current;null!=r&&(t&&r.prependText(t),r.focus())},n.saveCurrentText=function(e){void 0===e&&(e=!0);var t=n.props,r=t.type,a=t.channel;r===h.TextareaTypes.NORMAL&&(e&&n.saveCurrentTextThrottled.cancel(),n.handleSaveCurrentText(a.id))},n.handleBeforeUnload=function(){return n.saveCurrentText()},n.saveCurrentTextThrottled=i.default.throttle(n.saveCurrentText.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),!1),500),n.handleEnter=function(e){var t,r;return null===(t=(r=n.props).onEnter)||void 0===t?void 0:t.call(r,e)},n.handleTab=function(){var e,t;return null===(e=(t=n.props).onTab)||void 0===e?void 0:e.call(t)},n.handleMoveSelection=function(e){var t,r;return null===(t=(r=n.props).onMoveSelection)||void 0===t?void 0:t.call(r,e)},n.maybeShowAutocomplete=function(){var e,t;return null===(e=(t=n.props).onMaybeShowAutocomplete)||void 0===e?void 0:e.call(t)},n.handleSaveCurrentText=function(e){d.default.saveDraft(e,n.props.textValue,n.props.draftType)},n.handleInsertText=function(e){var t=e.content,r=e.addSpace,a=void 0!==r&&r;n.appendText(t,a),n.focus()},n.handleFocus=function(e){var t=n.props.onFocus,r=n.state.focused;null==t||t(e),r||n.setState({focused:!0})},n.handleBlur=function(e){var t=n.props.onBlur,r=n.state.focused;null==t||t(e),r&&n.setState({focused:!1})},n.handlePasteItem=function(e,t){var r=n.props,a=r.channel,o=r.canPasteFiles,i=r.uploadPromptCharacterCount,l=r.shouldUploadLongMessages,u=r.promptToUpload,s=r.maxCharacterCount,d=r.draftType;if(null==u||!a.isPrivate()&&!o||a.isPrivate()&&a.isManaged())return!1;var f=function(e,t){return u(e,a,d,!1,!0,t)};switch(t.type){case"image/png":e.preventDefault();var c=t.getAsFile();return null!=c&&(n.saveCurrentText(),2===e.clipboardData.items.length?e.clipboardData.items[0].getAsString((function(e){f([(0,p.makeFile)(c,n.extractFileName(e))])})):f([(0,p.makeFile)(c)]),!0);case"text/plain":if(!0===l){var v=e.clipboardData.getData("text/plain");if(v.length>(null!=i?i:s)){e.preventDefault();var y=new Blob([v],{type:"text/plain"});return f([(0,p.makeFile)(y,"message.txt")],!0),!0}}return!1}return!1},n.preprocessInsertedText=function(e){var t=n.props,r=t.channel,a=t.type;return f.default.parse(r,e,a===h.TextareaTypes.EDIT,!1).content},n.renderers={renderEmoji:function(e){return C(v.Emoji,{emoji:e,channel:n.props.channel})},renderCustomEmoji:function(e){return C(v.CustomEmoji,{emoji:e,channel:n.props.channel})},renderTextMention:function(e){return C(v.TextMention,{text:e,channel:n.props.channel})},renderUserMention:function(e){return C(v.UserMention,{id:e,channel:n.props.channel})},renderRoleMention:function(e){return C(v.RoleMention,{id:e,channel:n.props.channel})},renderChannelMention:function(e){return C(v.ChannelMention,{id:e,channel:n.props.channel})}},n.resolvePlaintextMention=function(e){return(0,_.default)(e,n.props.channel)},n.state={focused:!1,submitting:!1},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n);var S=r.prototype;return S.componentDidMount=function(){var e=this;this.props.focused&&requestAnimationFrame((function(){return e.focus()})),document.addEventListener("selectionchange",this.handleSelectionChange),window.addEventListener("beforeunload",this.handleBeforeUnload)},S.componentDidUpdate=function(e){this.fixFocus(e),this.props.textValue!==e.textValue&&this.saveCurrentTextThrottled()},S.componentWillUnmount=function(){this.saveCurrentText(),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("selectionchange",this.handleSelectionChange),this._focusBlurQueue=null},S.blur=function(){var e=this.ref.current;null!=e&&e.blur()},S.insertEmoji=function(e,t,n){void 0===n&&(n=!1);var r=this.props.textValue,a=this.ref.current;null!=e&&null!=a&&(n&&!r.endsWith(" ")&&a.insertText(" ",!1),a.insertEmoji(e,t),t&&this.focus())},S.insertCommandOption=function(e){var t=this.ref.current;null!=t&&t instanceof m.default&&t.insertCommandOption(e)},S.handleOuterClick=function(){this.focus()},S.clearValue=function(){var e=this.props,t=e.channel,n=e.draftType;this.setState({focused:!0,submitting:!1}),d.default.saveDraft(t.id,"",n)},S.getCurrentWord=function(){var e,t=this.ref.current;return null!==(e=null==t?void 0:t.getCurrentWord())&&void 0!==e?e:{word:null,isAtStart:!1}},S.doesSelectionStartOnOrAfterLastWord=function(){return this.ref.current.doesSelectionStartOnOrAfterLastWord()},S.insertAutocomplete=function(e,t,n){var r=this.ref.current;return null==r?void 0:r.insertAutocomplete(e,t,n)},S.getCurrentCommandOption=function(){var e=this.ref.current;return null!=e&&e instanceof m.default?e.getCurrentCommandOption():null},S.getCurrentCommandOptionValue=function(){var e=this.ref.current;return null!=e&&e instanceof m.default?e.getCurrentCommandOptionValue():[]},S.getFirstText=function(){var e,t=this.ref.current;return null!==(e=null==t?void 0:t.getFirstText())&&void 0!==e?e:null},S.completeCurrentCommandOption=function(){var e=this.ref.current;null!=e&&e instanceof m.default&&e.completeCurrentCommandOption()},S.toggleMarkdownStyle=function(e){var t=this.ref.current;null!=t&&t instanceof m.default&&t.toggleMarkdownStyle(e)},S.setSelectionLineType=function(e){var t=this.ref.current;null!=t&&t instanceof m.default&&t.setSelectionLineType(e)},S.selectCommandOption=function(e){var t=this.ref.current;null!=t&&t instanceof m.default&&t.selectCommandOption(e)},S.insertNextCommandOption=function(e){var t=this.ref.current;null!=t&&t instanceof m.default&&t.insertNextCommandOption(e)},S.fixFocus=function(e){e.focused&&!this.props.focused?this.blur():!e.focused&&this.props.focused&&this.focus()},S.appendText=function(e,t){var n;void 0===t&&(t=!0),null===(n=this.ref.current)||void 0===n||n.insertText(e,t)},S.getPlaceholder=function(){var e=this.props,t=e.disabled,n=e.placeholder,r=e.isPreviewing;return t&&!r?E.default.Messages.NO_SEND_MESSAGES_PERMISSION_PLACEHOLDER:n},S.render=function(){var e,t,n=this.props,r=n.textValue,i=n.richValue,l=n.disabled,s=n.onChange,d=n.onKeyDown,f=n.onResize,p=n.onSubmit,v=n.channel,_=n.type,E=n.fontSize,S=n.useSlate,O=n.spellcheckEnabled,I=n.canUseCommands,b=n.useNewSlashCommands,N=n.canOnlyUseTextCommands,A=n.disableAutoFocus,P=n.className,R=this.state.submitting,L={className:(0,o.default)(P,g.default.textArea,(e={},e[g.default.textAreaSlate]=S,e[g.default.textAreaDisabled]=l||R,e)),placeholder:this.getPlaceholder(),disabled:l||!1,submitting:R,isEdit:_===h.TextareaTypes.EDIT,onFocus:this.handleFocus,onBlur:this.handleBlur,onPasteItem:this.handlePasteItem,onTab:this.handleTab,onEnter:this.handleEnter,moveSelection:this.handleMoveSelection,maybeShowAutocomplete:this.maybeShowAutocomplete,onChange:s,onResize:f,onKeyDown:d,onSubmit:p,textAreaPaddingClassName:(0,o.default)(M[E],(t={},t[g.default.textAreaWithoutAttachmentButton]=_!==h.TextareaTypes.NORMAL&&_!==h.TextareaTypes.THREAD_CREATION&&_!==h.TextareaTypes.SIDEBAR,t)),spellcheckEnabled:O,useNewSlashCommands:b,disableAutoFocus:A},D=l?u.default.deserialize(""):i,w=S?a.createElement(m.default,T({},L,{ref:this.ref,key:l?"disabled":"enabled",renderers:this.renderers,preprocessInsertedText:this.preprocessInsertedText,resolvePlaintextMention:this.resolvePlaintextMention,channelId:v.id,guildId:v.guild_id,value:D,canUseCommands:I,canOnlyUseTextCommands:N})):a.createElement(y.default,T({ref:this.ref},L,{value:l?"":r}));return a.createElement(a.Fragment,null,C(c.ComponentAction,{event:h.ComponentActions.INSERT_TEXT,handler:this.handleInsertText}),C(c.ComponentAction,{event:h.ComponentActions.PREPEND_TEXT,handler:this.handlePrependText}),w)},S.extractFileName=function(e){var t=(new DOMParser).parseFromString(e,"text/html").querySelector("img");if(t instanceof HTMLImageElement){var n;try{var r=s.default.parse(t.src).pathname;null!=r&&r.length>0&&(n=l.default.basename(r).split(".")[0])}catch(e){}if(null!=n&&n.length>0)return n+".png"}},r}(a.Component);t.default=N,N.displayName="ChannelEditorContainer"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emoji=C,t.CustomEmoji=b,t.TextMention=M,t.UserMention=N,t.RoleMention=P,t.ChannelMention=function(e){var t,n=e.id,r=(0,i.useStateFromStores)([s.default],(function(){return s.default.getChannel(n)})),a=(0,m.shouldDisplayChannelIconPrefix)(null==r?void 0:r.type);return null==r?R:I(p.default,{className:(0,o.default)((t={mention:!0},t[E.default.iconMention]=a,t))},void 0,a&&I(y.default,{className:E.default.channelIcon,"aria-label":h.default.Messages.VOICE_CHANNEL}),(0,m.getChannelPrefix)(null==r?void 0:r.type),r.name)};var r,a=O(n(0)),o=g(n(9)),i=n(3),l=g(n(5938)),u=O(n(5957)),s=g(n(10)),d=g(n(15)),f=g(n(160)),c=g(n(12)),p=g(n(8426)),v=g(n(149)),y=g(n(8276)),m=n(292),_=g(n(258)),h=g(n(6)),E=g(n(7533));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(){return(T=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}).apply(this,arguments)}function C(e){var t=e.emoji;return I(v.default,{text:t.name,delay:750,position:v.default.Positions.TOP},void 0,(function(e){return a.createElement(l.default,T({src:t.src,emojiName:t.name,jumboable:t.jumboable,animated:!1},e))}))}function b(e){var t=e.emoji;return I(v.default,{text:t.name,delay:750,position:v.default.Positions.TOP},void 0,(function(e){return a.createElement(l.default,T({emojiId:t.emojiId,emojiName:t.name,animated:t.animated,jumboable:t.jumboable},e))}))}function M(e){var t=e.text;return I(p.default,{className:"mention"},void 0,t)}function N(e){var t=e.id,n=e.channel,r=(0,i.useStateFromStores)([c.default],(function(){return c.default.getUser(t)})),o=(0,i.useStateFromStores)([f.default],(function(){return f.default.hidePersonalInformation})),l=_.default.useName(n.guild_id,n.id,r);if(null!=r){var s=o?null:"#"+r.discriminator;return I(v.default,{text:I("div",{className:E.default.userTooltip},void 0,I(u.default,{user:r,animate:!0,size:u.Sizes.SIZE_16,className:E.default.avatar}),r.username,I("span",{className:E.default.discriminator},void 0,s)),hideOnClick:!0,"aria-label":r.tag},void 0,(function(e){return a.createElement(p.default,T({className:"mention"},e),null==l?"<@!"+t+">":"@"+l)}))}return I(p.default,{className:"mention"},void 0,null==l?"<@!"+t+">":"@"+l)}C.displayName="Emoji",b.displayName="CustomEmoji",M.displayName="TextMention",N.displayName="UserMention";var A=I("span",{},void 0,"@deleted-role");function P(e){var t=e.id,n=e.channel,r=(0,i.useStateFromStores)([d.default],(function(){var e=d.default.getGuild(n.guild_id);return null==e?null:e.roles[t]}));return null==r?A:I(p.default,{className:"mention",color:0===r.color?null:r.color},void 0,"@",r.name)}P.displayName="RoleMention";var R=I("span",{},void 0,"#deleted-channel")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(8325)),l=n(389),u=y(n(8550)),s=n(250),d=n(8349),f=y(n(16)),c=n(5859),p=y(n(8629)),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=/(\t|\s)/,O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={nextSelection:-1},t.focus=function(){var e=E(t)._ref;null!=e&&e.focus()},t.handleSetRef=function(e){t._ref=e},t.handleKeyPress=function(e){switch(e.which){case v.KeyboardKeys.ENTER:if(!e.shiftKey&&!e.ctrlKey&&!t.hasOpenCodeBlock())return e.preventDefault(),t.props.onSubmit(t.props.value)}},t.handleKeyDown=function(e){switch(e.which){case v.KeyboardKeys.ARROW_DOWN:t.props.moveSelection(1)&&e.preventDefault();break;case v.KeyboardKeys.N:e.ctrlKey&&t.props.moveSelection(1)&&e.preventDefault();break;case v.KeyboardKeys.ARROW_UP:t.props.moveSelection(-1)&&e.preventDefault();break;case v.KeyboardKeys.P:e.ctrlKey&&t.props.moveSelection(-1)&&e.preventDefault();break;case v.KeyboardKeys.TAB:case v.KeyboardKeys.ENTER:t.handleTabOrEnterDown(e)}var n=t.props.onKeyDown;n&&n(e)},t.handleKeyUp=function(e){switch(e.which){case v.KeyboardKeys.ARROW_RIGHT:case v.KeyboardKeys.ARROW_LEFT:case v.KeyboardKeys.HOME:case v.KeyboardKeys.END:t.props.maybeShowAutocomplete()}var n=t.props.onKeyUp;n&&n(e)},t.handleGlobalPaste=function(e){var n=e.event;t.handlePaste(n)||t.focus()},t.handlePaste=function(e){if(null==e.clipboardData||null==e.clipboardData.items||0===e.clipboardData.items.length)return!1;for(var n=!1,r=0;r<e.clipboardData.items.length;r++)n=t.props.onPasteItem(e,e.clipboardData.items[r])||n;return n},t.handleClick=function(){t.props.maybeShowAutocomplete()},t.handleContextMenu=function(e){f.default.embedded&&(0,l.openContextMenu)(e,(function(e){return a.createElement(p.default,h({},e,{text:(0,c.getSelectionText)()}))}),{align:s.Align.BOTTOM})},t.handleOnChange=function(e){var n=t.props.onChange,r=e.currentTarget.value;n&&n(e,r,i.default.deserialize(r))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var y=r.prototype;return y.componentDidMount=function(){var e=this;this.props.disableAutoFocus||(Promise.resolve().then((function(){var t=e.props.value;e._ref&&e._ref.setSelection(t.length,t.length)})),this.focus())},y.componentDidUpdate=function(e,t){this.state.nextSelection!==t.nextSelection&&null!=this._ref&&this._ref.setSelection(this.state.nextSelection,this.state.nextSelection)},y.getCurrentWord=function(){var e=this._ref;if(null==e)return{word:null,isAtStart:!1};var t=this.props,n=t.value,r=t.useNewSlashCommands;if(0===n.trim().length)return{word:null,isAtStart:!1};if(!r&&(n.startsWith("/giphy ")||n.startsWith("/tenor ")))return{word:n,isAtStart:!0};for(var a=e.selectionStart,o=e.selectionEnd;a>0;){if(S.test(n[a-1]))break;a--}return{word:n.slice(a,o),isAtStart:0===a}},y.doesSelectionStartOnOrAfterLastWord=function(){return!1},y.blur=function(){var e=this._ref;null!=e&&e.blur()},y.insertAutocomplete=function(e,t,n){void 0===n&&(n=!0);var r=this.getCurrentWord().word;if(null==r)this.insertText(e,n);else{var a=this._ref;if(null==a)return;var o=a.value.slice(0,a.selectionStart-r.length),i=a.value.slice(a.selectionEnd);this._insertText(e,o,i,n)}},y.insertText=function(e,t){void 0===t&&(t=!0);var n=this._ref;if(null!=n){var r=n.value.slice(0,n.selectionStart),a=n.value.slice(n.selectionEnd);this._insertText(e,r,a,t)}},y._insertText=function(e,t,n,r){var a=this;if(null!=this._ref){r&&(e+=" ");var o=t+e+n,l=this.props.onChange;l&&l(null,o,i.default.deserialize(o));var u=t.length+e.length;this.setState({nextSelection:u},(function(){a.props.maybeShowAutocomplete()}))}},y.prependText=function(e,t){void 0===t&&(t=!0);var n=this._ref;null!=n&&this._insertText("",e,n.value,t)},y.hasOpenCodeBlock=function(){var e=this._ref;if(null==e)return!1;var t=this.props.value.slice(0,e.selectionStart).match(/```/g);return null!=t&&t.length>0&&t.length%2!=0},y.render=function(){var e=this.props,t=e.value,n=e.disabled,r=e.placeholder,i=e.onResize,l=e.className,s=e.submitting,f=e.textAreaPaddingClassName,c=e.spellcheckEnabled;return a.createElement(a.Fragment,null,_(d.ComponentAction,{event:v.ComponentActions.GLOBAL_CLIPBOARD_PASTE,handler:this.handleGlobalPaste}),a.createElement(u.default,{ref:this.handleSetRef,className:(0,o.default)(l,f),rows:1,fontWidthEstimate:6,placeholder:r,disabled:n||s,onChange:this.handleOnChange,onResize:i,onKeyPress:this.handleKeyPress,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onPaste:this.handlePaste,onClick:this.handleClick,onContextMenu:this.handleContextMenu,value:n?"":t,tabIndex:0,spellCheck:c}))},y.handleTabOrEnterDown=function(e){e.which===v.KeyboardKeys.TAB&&this.props.onTab()||e.which===v.KeyboardKeys.ENTER&&this.props.onEnter(e)?(e.preventDefault(),e.stopPropagation()):e.which===v.KeyboardKeys.TAB&&this.hasOpenCodeBlock()&&(e.preventDefault(),e.stopPropagation(),this.insertText("\t",!1))},y.insertEmoji=function(e,t){this.insertText(":"+e.name+":",t)},y.getFirstText=function(){return this.props.value},r}(a.PureComponent);O.displayName="PlainTextArea";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=F(n(0)),o=U(n(9)),i=U(n(23)),l=n(8315),u=n(10582),s=n(389),d=F(n(8311)),f=U(n(8280)),c=n(8260),p=n(250),v=U(n(13)),y=n(8349),m=n(121),_=U(n(16)),h=U(n(9484)),E=U(n(9485)),g=U(n(9486)),S=U(n(9489)),O=U(n(9490)),I=U(n(9491)),T=F(n(8396)),C=F(n(8878)),b=F(n(8350)),M=n(8879),N=F(n(8880)),A=U(n(9492)),P=n(8882),R=U(n(8439)),L=U(n(9493)),D=n(8326),w=n(1),j=U(n(7535)),k=U(n(7342));function U(e){return e&&e.__esModule?e:{default:e}}function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function F(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function B(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function H(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(){return(V=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}).apply(this,arguments)}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var z=window.ResizeObserver,K=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).lastEditorHeight=null,n.containerRef=a.createRef(),n.editorRef=null,n.resizeObserver=null,n.hasExternalUpdate=!1,n.setValue=function(e){var t=n.props.onChange;t&&t(null,R.default.serialize(e.document,"raw"),e)},n.setRef=function(e){n.editorRef=e},n.updateResizeObserver=function(e){null!=z&&(null==n.resizeObserver&&(n.resizeObserver=new z((function(){var e=W(n).editorRef;if(null!=e){var t=e.el.offsetHeight;if(n.lastEditorHeight!==t){null!=n.containerRef.current&&(n.containerRef.current.style.height=t+"px"),n.lastEditorHeight=t;var r=n.props.onResize;r&&r(t)}}}))),n.resizeObserver.disconnect(),null!=e&&(n.lastEditorHeight=e.offsetHeight,n.resizeObserver.observe(e)))},n.handleChange=function(e){var t=e.value;n.setValue(t)},n.handleCompositionStart=function(e,t,r){n.isSlateEmpty(t.value)&&n.forceUpdate(),r()},n.handleFocus=function(e,t,r){var a=n.props.onFocus;return a&&a(e),r()},n.handleBlur=function(e,t,r){var a=n.props.onBlur;return a&&a(e),r()},n.handleKeyDown=function(e,t,r){var a="MacIntel"===navigator.platform,o=a?e.metaKey:e.ctrlKey,i=!0;switch(e.which){case w.KeyboardKeys.ARROW_DOWN:n.props.moveSelection(1)&&e.preventDefault();break;case w.KeyboardKeys.N:e.ctrlKey&&n.props.moveSelection(1)&&e.preventDefault();break;case w.KeyboardKeys.ARROW_UP:n.props.moveSelection(-1)&&e.preventDefault();break;case w.KeyboardKeys.P:e.ctrlKey&&n.props.moveSelection(-1)&&e.preventDefault();break;case w.KeyboardKeys.TAB:case w.KeyboardKeys.ENTER:i=!n.handleTabOrEnterDown(e);break;case w.KeyboardKeys.A:e.ctrlKey&&a&&n.withEditor((function(e){var t=n.getSelectedLine(e),r=null==t?null:t.getFirstText();if(null!=r){var a={key:r.key,offset:0};e.select(l.Range.create({anchor:a,focus:a}))}}));break;case w.KeyboardKeys.E:e.ctrlKey&&a&&n.withEditor((function(e){var t=n.getSelectedLine(e),r=null==t?null:t.getLastText();if(null!=r){var a={key:r.key,offset:r.text.length};e.select(l.Range.create({anchor:a,focus:a}))}}));break;case w.KeyboardKeys.B:!o||e.shiftKey||e.altKey||n.isSlateEmpty(n.props.value)||(n.toggleMarkdownStyle("bold"),e.stopPropagation());break;case w.KeyboardKeys.I:!o||e.shiftKey||e.altKey||n.isSlateEmpty(n.props.value)||(n.toggleMarkdownStyle("italics"),e.stopPropagation());break;case w.KeyboardKeys.U:!o||e.shiftKey||e.altKey||n.isSlateEmpty(n.props.value)||(n.toggleMarkdownStyle("underline"),e.stopPropagation());break;case w.KeyboardKeys.S:o&&!e.shiftKey&&e.altKey&&!n.isSlateEmpty(n.props.value)&&(n.toggleMarkdownStyle("strikethrough"),e.stopPropagation())}var u=n.props.onKeyDown;return u&&u(e),i?r():void 0},n.handleCommandStoreChange=function(){n.props.canUseCommands&&n.withEditor((function(e){e.run("onChange")}))},n.handleKeyUp=function(e,t,r){var a=n.props.onKeyUp;return a&&a(e),r()},n.handleGlobalPaste=function(e){var t=e.event;n.withEditor((function(e){e.run("onPaste",t),n.focus()}))},n.handlePaste=function(e,t,r){if(!0!==e.defaultPrevented){if(null==e.clipboardData||null==e.clipboardData.items||0===e.clipboardData.items.length)return r();for(var a=!1,o=0;o<e.clipboardData.items.length;o++)a=n.props.onPasteItem(e,e.clipboardData.items[o])||a;return a?void 0:r()}},n.handleClick=function(e,t,r){return n.props.maybeShowAutocomplete(),r()},n.handleContextMenu=function(e){_.default.embedded?(0,s.openContextMenu)(e,(function(e){return a.createElement(h.default,V({},e,{editor:W(n)}))}),{align:p.Align.BOTTOM}):null!=n.editorRef&&n.isSlateEmpty(n.editorRef.value)&&n.blur()},n.resolveCommandOption=function(e,t){return n.props.canUseCommands?(0,E.default)(e,t):null},n.getCommandState=function(){var e=n.props;return{canUseCommands:!0===e.canUseCommands,canOnlyUseTextCommands:!0===e.canOnlyUseTextCommands}},n.plugins=n.createPlugins(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Y(t,n);var U=r.prototype;return U.isSlateEmpty=function(e){var t=e.document,n=t.nodes.size>0?t.nodes.get(0):null;return null!==n&&"block"===n.object&&"line"===n.type&&1===n.nodes.size&&(n=n.nodes.get(0)),"document"===t.object&&""===t.text&&t.nodes.size<=1&&null!=n&&("text"===n.object||"blockQuote"!==n.type)},U.withEditor=function(e){var t=this.editorRef;return t&&e(t)},U.focus=function(){this.withEditor((function(e){return e.focus()}))},U.blur=function(){this.withEditor((function(e){return e.blur()}))},U.insertText=function(e,t){var n=this;void 0===t&&(t=!0),this.withEditor((function(r){r.ensureSelection();var a=n.props,o=a.preprocessInsertedText,i=a.canUseCommands;if(e=(0,D.areStylesDisabledInEditor)(r)?e:o(e),(0,D.insertText)(r,e+(t?" ":""),"line"),null!=(i?f.default.getActiveCommand():null)){var l=b.getOptionContents(r.value.document);C.validateAllOptionContents(l)}}))},U.prependText=function(e,t){var n=this;void 0===t&&(t=!0),this.withEditor((function(r){r.ensureSelection();var a=n.props,o=a.preprocessInsertedText,i=a.canUseCommands;if(e=(0,D.areStylesDisabledInEditor)(r)?e:o(e),(0,D.prependText)(r,e+(t?" ":"")),null!=(i?f.default.getActiveCommand():null)){var l=b.getOptionContents(r.value.document);C.validateAllOptionContents(l)}}))},U.getCurrentWord=function(){var e=this.editorRef;if(null==e)return{word:null,isAtStart:!1};var t=e.value,n=t.selection,r=t.document;if(!n.isCollapsed)return{word:null,isAtStart:!1};if(this.hasOpenPlainTextCodeBlock())return{word:null,isAtStart:!1};var a=r.text;if(0===a.trim().length)return{word:null,isAtStart:!1};if(!this.props.useNewSlashCommands&&(a.startsWith("/giphy ")||a.startsWith("/tenor "))){var o=r.getNode(n.start.key);if(null!=o)return{word:o.text.substring(0,n.start.offset),isAtStart:!0}}var l=r.getNode(n.start.key);if(null==l)return{word:null,isAtStart:!1};var u="",s=!1,d=n.start.offset,f=r.getClosestBlock(l.key);for((0,i.default)(null!=f,"selected line should not be null at this point");;){if(--d<0){if(null==(l=f.getPreviousNode(l.key))){s=!0;break}if("text"!==l.object)break;d=l.text.length-1}if("text"!==l.object)break;var c=l.text[d];if(M.WHITESPACE_RE.test(c))break;u=c+u}return{word:""===u?null:u,isAtStart:s&&"line"===f.type&&r.nodes.get(0)===f}},U.getSelectedText=function(){var e=this.editorRef;if(null==e)return"";for(var t,n=e.value,r=n.document,a=n.selection,o="",i=H(r.getTextsAtRange(a));!(t=i()).done;){var l=t.value,u=l.key===a.start.key?a.start.offset:0,s=l.key===a.end.key?a.end.offset:0;o+=l.text.substring(u,s)}return o},U.doesSelectionStartOnOrAfterLastWord=function(){var e=this.editorRef;if(null==e)return!1;var t=e.value,n=t.document,r=t.selection,a=n.getNode(r.start.key);if(null==a||"text"!==a.object)return!1;if(this.hasOpenPlainTextCodeBlock())return!1;var o=n.getClosestBlock(a.key);return(0,i.default)(null!=o,"selected line should not be null at this point"),null==n.getNextBlock(o.key)&&(null==o.getNextNode(a.key)&&!M.WHITESPACE_RE.test(a.text.slice(r.start.offset).replace(/(\s|\t)+$/,"")))},U.toggleMarkdownStyle=function(e){this.withEditor((function(t){(0,P.toggleMarkdownStyle)(t,e)}))},U.setSelectionLineType=function(e){this.withEditor((function(t){var n=t.value,r=n.document,a=n.selection,o=(0,D.pointToLineChar)(r,a.start),i=(0,D.pointToLineChar)(r,a.end);if(null!=o&&null!=i)for(var l=o.line;l<=i.line;l++)t.setNodeByKey(r.nodes.get(l).key,e)}))},U.insertAutocomplete=function(e,t,n){var r=this;void 0===n&&(n=!0),this.withEditor((function(a){var o,i,l=r.props,u=l.preprocessInsertedText,s=l.canUseCommands;a.ensureSelection();var d=s?f.default.getActiveCommand():null,p=s?f.default.getActiveOption():null;if((null==d?void 0:d.type)===c.ApplicationCommandType.BUILT_IN_INTEGRATION)C.clear(a);else if(null!=p&&(p.type!==c.ApplicationCommandOptionType.STRING||(null!==(o=null===(i=p.choices)||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0))C.removeCurrentOptionValues(a);else{var v=r.getCurrentWord().word;null!=v&&a.deleteBackward(v.length)}var y=null!=(null==p?void 0:p.choices)||(0,D.areStylesDisabledInEditor)(a)?e:u(t);(0,D.insertText)(a,n?y+" ":y,"line")}))},U.insertEmoji=function(e,t){var n=this;this.withEditor((function(r){var a=e.animated?"a":"",o=e.originalName||e.name||"",i=null==e.id||(0,D.areStylesDisabledInEditor)(r)?":"+e.name+":":"<"+a+":"+o.replace(/:/g,"")+":"+e.id+">";n.insertText(i,t)}))},U.insertCommandOption=function(e){this.props.canUseCommands&&this.withEditor((function(t){return C.insertCommandOption(t,e)}))},U.insertNextCommandOption=function(e){this.props.canUseCommands&&this.withEditor((function(t){return C.insertNextCommandOption(t,e)}))},U.selectCommandOption=function(e){this.props.canUseCommands&&this.withEditor((function(t){return C.selectCommandOption(t,e)}))},U.completeCurrentCommandOption=function(){var e=this;this.props.canUseCommands&&this.withEditor((function(t){for(;(0,N.runOnce)(t,e.props.guildId,e.props.resolvePlaintextMention,E.default););C.completeCurrentCommandOption(t)}))},U.getFirstText=function(){var e;return null!==(e=this.withEditor((function(e){var t;return null===(t=e.value.document.getFirstText())||void 0===t?void 0:t.text})))&&void 0!==e?e:null},U.getCurrentCommandOption=function(){var e;return this.props.canUseCommands&&null!==(e=this.withEditor((function(e){var t=e.value,n=t.document,r=t.selection,a=b.getPreviousOptionNode(n,r.start.path);return null==a||b.hasValueNodes(a)?null:a.data.get("name")})))&&void 0!==e?e:null},U.getCurrentCommandOptionValue=function(){var e;return this.props.canUseCommands&&null!==(e=this.withEditor((function(e){var t=e.value,n=t.document,r=t.selection,a=b.getPreviousOptionNode(n,r.start.path);if(null===a||b.hasValueNodes(a))return[];var o=b.getNextOptionNode(n,r.start.path),l=n.getClosestBlock(a.key);return(0,i.default)(null!=l,"Failed to find parent block when getting current option value"),b.getContentBetweenNodes({parent:l,startNode:a,endNode:o})})))&&void 0!==e?e:[]},U.componentDidMount=function(){var e=this;this.withEditor((function(t){if(e.props.disableAutoFocus)t.run("onChange");else{t.focus();var n=t.value.document.getLastText();if(null!=n){var r={key:n.key,offset:n.text.length};t.select(l.Range.create({anchor:r,focus:r}))}}})),this.props.canUseCommands&&f.default.addChangeListener(this.handleCommandStoreChange)},U.componentWillUnmount=function(){null!=this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),f.default.removeChangeListener(this.handleCommandStoreChange)},U.componentDidUpdate=function(){var e=this;this.withEditor((function(t){e.hasExternalUpdate&&(e.hasExternalUpdate=!1,t.run("onChange"))}))},U.render=function(){var e,t=this.props,n=t.className,r=t.disabled,i=t.submitting,l=t.placeholder,s=t.value,d=t.textAreaPaddingClassName,f=t.spellcheckEnabled,c=this.isSlateEmpty(s),p=(null==this.editorRef||null==this.editorRef.isComposing||!this.editorRef.isComposing())&&c,v=null==this.lastEditorHeight||c?void 0:{height:this.lastEditorHeight};return(null===(e=this.editorRef)||void 0===e?void 0:e.value)!==s&&(this.hasExternalUpdate=!0),a.createElement(a.Fragment,null,B(y.ComponentAction,{event:w.ComponentActions.GLOBAL_CLIPBOARD_PASTE,handler:this.handleGlobalPaste}),a.createElement("div",{className:(0,o.default)(n,j.default.slateContainer),style:v,ref:this.containerRef},p&&null!=l?B("div",{className:(0,o.default)(j.default.placeholder,d),"aria-hidden":!0},void 0,l):null,a.createElement(u.Editor,{value:s,plugins:this.plugins,ref:this.setRef,domRef:this.updateResizeObserver,className:(0,o.default)(k.default.markup,j.default.slateTextArea,d),onChange:this.handleChange,readOnly:r||i,placeholder:null,onFocus:this.handleFocus,onCompositionStart:this.handleCompositionStart,onContextMenu:this.handleContextMenu,onBlur:this.handleBlur,onClick:this.handleClick,onPaste:this.handlePaste,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,autoCorrect:!1,spellCheck:f,"aria-label":l,"aria-multiline":!0,"data-can-focus":!r})))},U.getSelectedLine=function(e){var t=e.value,n=t.document,r=t.selection;return r.isCollapsed?n.getClosestBlock(r.start.key):null},U.handleTabOrEnterDown=function(e){if(e.which===w.KeyboardKeys.TAB&&this.props.onTab())return e.preventDefault(),e.stopPropagation(),!0;if(e.which===w.KeyboardKeys.ENTER&&this.props.onEnter(e))return e.preventDefault(),e.stopPropagation(),!0;if(e.which===w.KeyboardKeys.TAB)this.hasOpenPlainTextCodeBlock()&&(e.preventDefault(),e.stopPropagation(),this.insertText("  ",!1));else if(e.which===w.KeyboardKeys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!this.hasOpenPlainTextCodeBlock()){var t;e.preventDefault(),e.stopPropagation();var n=null!==(t=f.default.getActiveCommand())&&void 0!==t?t:null,r=null;if(null!==n){var a=this.withEditor((function(e){var t=e.value.document;if(r=b.getOptionContents(t),null!=n.options){var a,o=C.validateAllOptionContents(r),i=n.options.find((function(e){return!o[e.name].success}));if(null!=i)return C.selectCommandOption(e,i.name),m.ComponentDispatch.dispatch(w.ComponentActions.SHAKE_APP,{duration:200,intensity:2}),v.default.track(w.AnalyticEvents.APPLICATION_COMMAND_VALIDATION_FAILED,{application_id:null==n?void 0:n.applicationId,command_id:null==n?void 0:n.rootId,argument_type:c.ApplicationCommandOptionType[null!==(a=null==i?void 0:i.type)&&void 0!==a?a:3],is_required:null==i?void 0:i.required}),!0}}));if(a)return a;d.setActiveCommand(null)}return this.props.onSubmit(R.default.serialize(this.props.value.document,"raw"),n,r),!0}},U.hasOpenPlainTextCodeBlock=function(){var e=this.editorRef;return null!=e&&(0,T.isPointInCodeBlock)(e,e.value.selection.start)},U.createPlugins=function(){var e=this.props,t=e.renderers,n=e.channelId,r=e.guildId,a=e.preprocessInsertedText,o=e.resolvePlaintextMention;return[(0,T.default)(),(0,O.default)(),(0,S.default)(),(0,N.default)(t,r,o,this.resolveCommandOption),(0,g.default)(n,r,this.getCommandState,o,this.resolveCommandOption),(0,A.default)(r),(0,I.default)(a),(0,L.default)(this.setValue)]},r}(a.PureComponent);t.default=K,K.displayName="SlateChannelTextArea"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=v(n(0)),o=n(389),i=v(n(8253)),l=c(n(8630)),u=c(n(8631)),s=c(n(16)),d=c(n(43)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.editor,n=e.onHeightUpdate,r=e.target,c=e.onSelect,p=t.getSelectedText(),v=a.useCallback((function(){(0,o.closeContextMenu)(),t.focus()}),[t]),m=(0,u.default)({text:p,target:r,onHeightUpdate:n}),_=m[0],h=m[1],E=(0,l.default)();if(!s.default.embedded)return null;var g=""!==p?[y(i.MenuItem,{id:"copy",label:f.default.Messages.COPY,hint:s.default.isOSX()?"⌘C":"Ctrl+C",action:function(){return d.default.copy()}}),y(i.MenuItem,{id:"cut",label:f.default.Messages.CUT,hint:s.default.isOSX()?"⌘X":"Ctrl+X",action:function(){return d.default.cut()}})]:null;return y(i.default,{navId:"textarea-context",onClose:v,"aria-label":f.default.Messages.TEXTAREA_ACTIONS_MENU_LABEL,onSelect:c},void 0,y(i.MenuGroup,{},void 0,E),y(i.MenuGroup,{},void 0,_),y(i.MenuGroup,{},void 0,h),y(i.MenuGroup,{},void 0,g,y(i.MenuItem,{id:"paste",label:f.default.Messages.PASTE,hint:s.default.isOSX()?"⌘V":"Ctrl+V",action:function(){return d.default.paste()}})))}m.displayName="SlateTextAreaContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r=a.default.getActiveCommand();if(null==r)return null;var i=l.exec(e);if(null==i)return null;var u=i[1];if(null==(null===(n=r.options)||void 0===n?void 0:n.find((function(e){return e.name===u}))))return null;var s=t.value.document;if(!o.getOptionNames(s).has(u))return{type:"commandOption",data:{name:u}};return null};var r,a=(r=n(8280))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8350));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var l=/((?:[\x2D0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])+):/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,a){return{renderBlock:U,renderInline:G,onChange:O.catchAndLogExceptions((function(o,i){if(!v.default.isInExperiment())return i();var u=n();return u.canUseCommands?function(e,t,n,r,a,o,i){var u,s=o.value.document,d=v.default.getActiveCommand();if(!s.data.has("commandId")){if(!o.readOnly){var p=s.data.toObject();p.commandId=null,p.commandName=null,o.setNodeByKey(s.key,{data:p})}return null!=d&&c.setActiveCommand(null),i()}if((null!==(u=null==d?void 0:d.id)&&void 0!==u?u:null)!==s.data.get("commandId",null))return function(e,t,n,r,a){var o,i;null!=t&&E.replaceCommandName(e,t);var l=e.value.document,u=l.data.toObject();u.commandId=null!==(o=null==t?void 0:t.id)&&void 0!==o?o:null,u.commandName=null!==(i=null==t?void 0:t.name)&&void 0!==i?i:null,e.setNodeByKey(l.key,{data:u}),(0,S.stripAllBlocks)(e);for(;(0,S.runOnce)(e,n,r,a););if(null!=t){var s;if(0===g.getOptionNames(l).size){var d,c=1===(null===(d=t.options)||void 0===d?void 0:d.length)&&e.value.document.text.length>t.name.length+2;E.insertNextCommandOption(e,c,c)}else E.completeAllCommandOptions(e);(0,f.trackWithMetadata)(I.AnalyticEvents.APPLICATION_COMMAND_SELECTED,{command_id:null!==(s=t.rootId)&&void 0!==s?s:t.id,application_id:t.applicationId})}}(o,d,t,r,a),null!=d&&F(o,d),i();var y=function(e,t,n,r,a){var o,i=n.value.document,u=null===(o=i.getFirstText())||void 0===o?void 0:o.text;if((0,l.default)(null!=u,"Failed to find first text in document"),null!=r){var s=""+_.COMMAND_SENTINEL+r.name;if(!u.startsWith(s))return null;if(u.length===s.length){if(null==g.findMatchingCommand(u,e,t,!0,a))return null}else if(" "!==u[s.length])return null}else if(u.startsWith(_.COMMAND_SENTINEL)){var d=g.findMatchingCommand(u,e,t,!0,a);if(null!=d)return d}return r}(e,t,o,d,n);if((null==y?void 0:y.id)!==(null==d?void 0:d.id))return c.setActiveCommand(y),i();if(null!=d)return F(o,d),i();return i()}(e,t,u.canOnlyUseTextCommands,r,a,o,i):i()})),onKeyDown:O.catchAndLogExceptions((function(e,t,r){return v.default.isInExperiment()&&n().canUseCommands?function(e,t,n){var r=!1;switch(e.which){case I.KeyboardKeys.BACKSPACE:r=function(e){var t=e.value.selection;if(!t.isCollapsed||0!==t.anchor.offset)return!1;return E.unwrapPreviousCommandOption(e)}(t);break;case I.KeyboardKeys.TAB:r=function(e){var t,n=e.value.document,r=null===(t=n.getFirstText())||void 0===t?void 0:t.text;if(null==r||!r.startsWith("/"))return!1;var a=r.substring(1),o=null!=n.data.get("commandId");if(!o&&!p.default.hasResults(a,s.ApplicationCommandTarget.CHAT))return!0;if(!o)return!1;E.completeCurrentCommandOption(e)||E.insertNextCommandOption(e,!0);return!0}(t);break;case I.KeyboardKeys.ENTER:r=function(e,t){if(null==t.value.document.data.get("commandId"))return!1;return e.shiftKey}(e,t)}if(r)return e.preventDefault(),e.stopPropagation(),!0;return n()}(e,t,r):r()}))}};var r,a,o=M(n(0)),i=C(n(9)),l=C(n(23)),u=n(3),s=n(286),d=C(n(1166)),f=n(106),c=M(n(8311)),p=C(n(8469)),v=C(n(8280)),y=n(8260),m=n(8877),_=n(8278),h=C(n(9488)),E=M(n(8878)),g=M(n(8350)),S=n(8880),O=M(n(8326)),I=n(1),T=C(n(7534));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(){return(R=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}).apply(this,arguments)}var L=new Set(["line"]),D=((r={})[I.ThemeTypes.DARK]={buttonFill:"#4F545C",buttonSideFill:"#36393F"},r[I.ThemeTypes.LIGHT]={buttonFill:"#747F8D",buttonSideFill:"#4F5660"},r);function w(){var e=(0,d.default)(),t=D[e];return o.createElement(h.default,R({className:T.default.tabButton},t))}w.displayName="TabButtonWriteahead";var j=o.forwardRef((function(e,t){var n,r,a=e.editor,l=e.optionName,s=e.isComplete,d=e.children,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["editor","optionName","isComplete","children"]),c=(0,u.useStateFromStores)([v.default],(function(){return v.default.getOptionState(l)}),[l]),p=o.useCallback((function(){var e=a.value.document,t=g.getOptionNode(e,l);null!=t&&g.unwrapOptionValueNodes(a,t,!0)}),[a,l]);return o.createElement("span",R({ref:t},f,{contentEditable:!1}),"​",P("span",{className:(0,i.default)(T.default.pill,(r={},r[T.default.completePill]=s,r[T.default.erroredPill]=!1===(null==c||null===(n=c.lastValidationResult)||void 0===n?void 0:n.success),r)),onClick:p},void 0,P("span",{className:T.default.optionKey},void 0,l,":"),s&&null!==d?P("span",{className:T.default.optionValue},void 0,d):null)," ")}));var k=P(w,{});function U(e,t,n){var r=e.attributes,a=e.children,i=e.node,l=t.value,u=l.document,s=l.selection,d=v.default.getActiveCommand();if(!L.has(i.type)||null==d||u.data.get("commandId",null)!==d.id)return n();var f=null;if(null!=d.options){var c=g.getPreviousOptionNode(u,s.start.path),p=g.getOptionNames(u),y=d.options.length>p.size,m=!1;if(null!=c&&!g.hasValueNodes(c)){var _=u.getClosestBlock(c.key);if(null!=_){var h=g.getNextOptionNode(u,s.start.path);m=0===g.getContentBetweenNodes({parent:_,startNode:c,endNode:h}).length}}s.isFocused&&y&&!m&&(f=k)}return o.createElement("div",R({},r,{className:T.default.commandBlock}),a,f)}function G(e,t,n){var r=e.attributes,a=e.children,i=e.node;if(!g.isOptionNode(i))return n();var l=i.data.get("name"),u=g.hasValueNodes(i);return o.createElement(j,R({editor:t,optionName:l,isComplete:u},r),a)}function F(e,t){var n,r,a=null===(n=e.value.document.getFirstText())||void 0===n?void 0:n.text;(0,l.default)(null!=a,"Failed to find first text in document"),null!=t.options&&1===t.options.length&&!0!==t.options[0].required&&a.length===t.name.length+3&&a.startsWith(""+_.COMMAND_SENTINEL+t.name+" ")&&0===Object.values(v.default.getOptionStates()).filter((function(e){return e.hasValue})).length&&E.insertNextCommandOption(e,!0,!0);var o=e.value,i=o.document,u=o.selection,s=v.default.getActiveOptionName(),d=u.isFocused?g.getPreviousOptionNode(i,u.start.path):null,f=null==d||g.hasValueNodes(d)?null:null!==(r=d.data.get("name"))&&void 0!==r?r:null;if(s!==f){for(var p,h=g.getOptionNames(i),S={},I=N(null!==(T=t.options)&&void 0!==T?T:[]);!(p=I()).done;){var T,C=p.value;S[C.name]={hasValue:h.has(C.name),isActive:C.name===f}}if(null!=s){var b=g.getOptionNode(i,s);if(null!=b&&!g.hasValueNodes(b)){var M=g.getOptionContent(i,s);null!=M&&(M.length>0&&t.type!==y.ApplicationCommandType.BUILT_IN_INTEGRATION&&O.restoringExactSelection(e,(function(){g.wrapOptionValueNodes(e,b)})),S[s].lastValidationResult=(0,m.validateOptionNameContent)(s,M))}}c.updateOptionStates(S)}}U.displayName="renderBlock",G.displayName="renderInline"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(8290),o=n(8260),i=n(8279),l=((r={})[o.ApplicationCommandOptionType.SUB_COMMAND]=function(){return{success:!1}},r[o.ApplicationCommandOptionType.SUB_COMMAND_GROUP]=function(){return{success:!1}},r[o.ApplicationCommandOptionType.STRING]=function(e,t){return null==t.choices||"text"===e.type&&t.choices.map((function(e){return e.name})).includes(e.text)?{success:!0}:{success:!1}},r[o.ApplicationCommandOptionType.BOOLEAN]=function(e){if("text"!==e.type)return{success:!1};var t=e.text.trim();return{success:a.BOOLEAN_CHOICES.map((function(e){return e.name.toLowerCase()})).includes(t.toLowerCase())}},r[o.ApplicationCommandOptionType.INTEGER]=function(e,t){if("text"!==e.type)return{success:!1};var n=e.text.trim();if(0===n.length)return{success:!1};if(null!=t.choices)return t.choices.map((function(e){return e.name})).includes(n)?{success:!0}:{success:!1};var r=Number(n);return isNaN(r)||!Number.isInteger(r)||r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER?{success:!1}:{success:!0}},r[o.ApplicationCommandOptionType.USER]=function(e){return"text"===e.type?{success:(0,i.isSnowflake)(e.text)}:{success:"userMention"===e.type}},r[o.ApplicationCommandOptionType.CHANNEL]=function(e){return"text"===e.type?{success:(0,i.isSnowflake)(e.text)}:{success:"channelMention"===e.type}},r[o.ApplicationCommandOptionType.ROLE]=function(e){return"text"===e.type?{success:(0,i.isSnowflake)(e.text)}:{success:u(e)}},r[o.ApplicationCommandOptionType.MENTIONABLE]=function(e){return"text"===e.type?{success:(0,i.isSnowflake)(e.text)}:{success:"userMention"===e.type||u(e)}},r),u=function(e){return"roleMention"===e.type||"textMention"===e.type&&"@everyone"===e.text},s=l;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?30:t,r=e.height,a=void 0===r?20:r,i=e.color,l=void 0===i?"currentColor":i,u=e.buttonFill,s=e.buttonSideFill,d=e.foreground,f=e.background;return o("svg",{width:n,height:a,className:e.className,viewBox:"0 0 30 20",fill:"none"},void 0,o("path",{className:f,d:"M0 12h30v4a4 4 0 01-4 4H4a4 4 0 01-4-4v-4z",fill:s}),o("rect",{className:f,width:"30",height:"16",rx:"4",fill:u}),o("path",{className:d,d:"M11.1 5.5L11 3.7H4.3v1.8h2.3V12h2.1V5.5h2.4zm5.4 6.6l2.1-.4-2.9-8h-2.2l-3 8.3h2l.6-1.7h2.8l.6 1.8zm-2-6.3l1 2.9h-2l1-2.9zm11 3.8c0-1.1-.6-1.7-1.5-2 .6-.3 1.2-.8 1.2-1.7 0-1.4-1-2.2-2.8-2.2h-2.9V12h2.8c2 0 3.2-.8 3.2-2.4zm-2.2-3.5c0 .6-.4 1-1.1 1h-.7V5.2h.7c.8 0 1.1.3 1.1.9zm.2 3.4c0 .7-.4 1-1.3 1h-.7V8.4h.7c.9 0 1.3.4 1.3 1z",fill:l}))}i.displayName="TabButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{renderBlock:c}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(7369)),l=u(n(7342));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t,n){var r=e.attributes,u=e.children,s=e.node,c=null==s.data.get("lineType")?null:JSON.parse(s.data.get("lineType")),p=null!=c&&c.isInCodeBlock,v="blockQuote"===s.type;if(!p&&!v)return n();var y=(0,o.default)(null==c?void 0:c.lang,i.default.codeLine),m=(0,o.default)(l.default.blockquoteContainer,l.default.slateBlockquoteContainer),_=p?f("span",{className:y,spellCheck:null==c||null==c.lang},void 0,u):u;return v?a.createElement("div",d({},r,{className:m}),f("div",{contentEditable:!1,className:l.default.blockquoteDivider}),f("blockquote",{},void 0,_)):a.createElement("div",r,_)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{onChange:l.catchAndLogExceptions(p),onKeyDown:l.catchAndLogExceptions(y),onKeyUp:l.catchAndLogExceptions(m)}};var r,a=(r=n(23))&&r.__esModule?r:{default:r},o=n(8315),i=n(8396),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8326)),u=n(1);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=new Set(["paragraph","line"]);function p(e,t){if(e.value.document.text.indexOf(">")>=0)for(var n,r=!1,o=d(e.value.document.nodes);!(n=o()).done;){var i=n.value;(0,a.default)("block"===i.object,"Slate: Invalid block type: "+i.object+" "+i.type),c.has(i.type)&&(r=v(e,i,r)||r)}return t()}function v(e,t,n){(0,a.default)("text"!==t.object,"Slate: block may not be a text node");var r=t.nodes.first();if(null==r)return!1;var l="text"===r.object?r.text.match(/^\s*>>> /):null,u="text"===r.object?r.text.match(/^\s*> /):null;if(null==u&&null==l&&!n)return!1;var s=Array.from(t.texts())[0],d=s[0],f=s[1];if(!n&&(0,i.isPointInCodeBlock)(e,{key:d.key,offset:0}))return!1;if(e.setNodeByKey(t.key,"blockQuote"),!n){var c=null==u?null==l?0:l[0].length:u[0].length;e.deleteAtRange(o.Range.create({anchor:{key:d.key,path:f,offset:0},focus:{key:d.key,path:f,offset:c}}))}return null!=l}function y(e,t,n){switch(e.which){case u.KeyboardKeys.BACKSPACE:if(function(e){var t=e.value,n=t.document,r=t.selection;if(!r.isCollapsed)return!1;var a=n.getClosestBlock(r.anchor.key);if(null==a||"blockQuote"!==a.type)return!1;var i=a.getFirstText();if(null!=i&&r.anchor.key===i.key&&0===r.anchor.offset){var u=n.nodes.indexOf(a),s=o.Block.create({type:"line",nodes:[o.Text.create({text:a.text})]});return l.restoringExactSelection(e,(function(){e.removeNodeByKey(a.key).insertNodeByKey(n.key,u,s)})),!0}return!1}(t))return void e.preventDefault()}return n()}function m(e,t,n){switch(e.which){case u.KeyboardKeys.ENTER:if(function(e){var t=e.value,n=t.selection,r=t.document;if(!n.isCollapsed)return!1;var a=r.getClosestBlock(n.anchor.key);if(null==a||"blockQuote"!==a.type)return!1;var o=r.getPreviousSibling(a.key);if(null==o||"text"===o.object||"blockQuote"!==o.type)return!1;var i=r.getPreviousSibling(o.key);if(null==i||"text"===i.object||"blockQuote"!==i.type)return!1;if(""===a.text.trim()&&""===o.text.trim()&&""===i.text.trim())return e.removeNodeByKey(i.key).removeNodeByKey(o.key).setBlocks("line"),!0;return!1}(t))return void e.preventDefault()}return n()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{onCopy:l,onCut:u,onPaste:function(t,n,r){return function(e,t,n,r){if(n.ensureSelection(),null==t.clipboardData)return r();if(null==t.clipboardData.types)return r();if(null==t.clipboardData.types.indexOf)return r();if(-1===t.clipboardData.types.indexOf("text/plain"))return r();var o=t.clipboardData.getData("text/plain");if(null==o||""===o)return r();var l=n.value,u=l.startBlock,s=l.selection;if(n.isVoid(u))return r();t.preventDefault();var d=(0,a.isPointInCodeBlock)(n,s.start)?o:e(o),f=(null==u?void 0:u.type)||"line";(0,i.insertText)(n,d,f)}(e,t,n,r)}}};var r,a=n(8396),o=(r=n(8439))&&r.__esModule?r:{default:r},i=n(8326);function l(e,t,n){if(!s(e,t))return n();e.preventDefault();var r=t.value,a=r.document,i=r.selection;if(null==e.clipboardData)return n();e.clipboardData.setData("text/plain",o.default.serializeSelection(a,i,"plain"))}function u(e,t,n){if(!s(e,t))return n();l(e,t,n),t.delete()}function s(e,t){return!t.value.selection.isCollapsed&&null!=e.clipboardData&&null!=e.clipboardData.setData}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{decorateNode:u.catchAndLogExceptions((function(t,n,r){return function(e,t,n,r){var a;if("block"!==t.object||!y.has(t.type))return r()||[];for(var o=!0===(null===(a=(0,l.getLineState)(t))||void 0===a?void 0:a.wasInCodeBlock),s=i.parse(t.text,e,o,!0),d=[],f=0;f<s.length;f++){var c=s[f],p=c.text,v=c.attributes,m=c.start;if(v.length>0){var _=s[f-1],h=s[f+1],E=v.join(":");if("syntaxBefore"===E&&null!=h){var g=h.attributes.map((function(e){return"before_"+e})).join(":");""!==g&&(E=E+":"+g)}if("syntaxAfter"===E&&null!=_){var S=_.attributes.map((function(e){return"after_"+e})).join(":");""!==S&&(E=E+":"+S)}d.push({type:"SlateMarkdown:"+E,anchor:u.findPointInBlockNode(t,m,!0),focus:u.findPointInBlockNode(t,m+p.length,!0)})}}return[].concat(r(),d)}(e,t,0,r)})),renderDecoration:_}};var r=p(n(0)),a=f(n(9)),o=f(n(23)),i=p(n(8881)),l=n(8396),u=p(n(8326)),s=f(n(7369)),d=f(n(7364));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(){return(v=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}).apply(this,arguments)}var y=new Set(["paragraph","line","blockQuote"]),m={strong:s.default.bold,em:s.default.italics,u:s.default.underline,s:s.default.strikethrough,inlineCode:s.default.inlineCode,link:s.default.fakeLink,url:s.default.fakeLink,autolink:s.default.fakeLink,spoiler:(0,a.default)(d.default.spoilerText,s.default.spoiler),syntaxBefore:s.default.syntaxBefore,syntaxAfter:s.default.syntaxAfter,codeBlockText:s.default.codeBlockText,codeBlockSyntax:s.default.codeBlockSyntax,codeBlockLang:s.default.codeBlockLang};function _(e,t,n){var i=e.children,l=e.decoration,u=e.attributes,d=e.text;if(""===d)return n();if(l.type.startsWith("SlateMarkdown:")){var f,c,p=l.type.split(":").slice(1).map((function(e){return"codeBlockLang"!==e&&"codeBlockSyntax"!==e||(c=!1),e.startsWith("before_")||e.startsWith("after_")?s.default[e]:((0,o.default)(e in m,"Slate: Invalid markdown decoration: "+e),m[e])})).join(" "),y=(0,a.default)(p,((f={})[s.default.syntaxOverride]="||"===d||"\\"===d,f));return r.createElement("span",v({},u,{className:y,spellCheck:c}),i)}return n()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={index:0,stack:[],lastKey:null};return{onConstruct:function(e,n){return function(e,t,n){null!=t.value&&(e.stack=[{type:"other",textLength:-1,mergeable:!1,createdAt:Date.now(),value:t.value}]);return n()}(t,e,n)},onChange:function(e,n){return a(t,e,n)},onKeyUp:function(e,n,o){e.which===r.KeyboardKeys.SPACE&&t.lastKey!==r.KeyboardKeys.SPACE&&a(t,n,o,!0),t.lastKey=e.which,o()},commands:{undo:function(){return function(e,t){var n=Math.max(0,e.index-1);e.index=n,t(e.stack[n].value)}(t,e)},redo:function(){return function(e,t){var n=Math.min(e.index+1,e.stack.length-1);e.index=n,t(e.stack[n].value)}(t,e)}}}};var r=n(1);function a(e,t,n,r){if(void 0===r&&(r=!1),null==t.value)return n();0===e.stack.length&&(e.index=0,e.stack=[{type:"other",textLength:-1,mergeable:!1,createdAt:Date.now(),value:t.value}]);var a,o,i=t.value,l=e.stack[e.index],u=l.textLength,s=i.document.text.length,d=s-u,f=1===d||0===d?"insert":-1===d?"delete":"other",c="other"!==f,p=Date.now();if(c&&(o=f,(a=l).mergeable&&a.type===o&&!(Date.now()-a.createdAt>=4e3))||i.document===l.value.document)return l.value=i,l.textLength=s,void(r&&(l.mergeable=!1));for(l.mergeable=!1,e.stack.length=e.index+1;e.stack.length>=250;)e.stack.shift();return e.index=e.stack.length,e.stack.push({type:f,textLength:s,mergeable:c,createdAt:p,value:i}),n()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(e[0]){case"@":return function(e,t){var n=e.slice(1).split("#"),r=n[0],a=n[1];if(t.isPrivate())for(var o,l=s(t.recipients);!(o=l()).done;){var u=o.value;if(f(r,a,u))return{type:"mention",data:{id:u}}}else for(var d,c=s(i.default.getMembers(t.guild_id));!(d=c()).done;){var p=d.value.userId;if(f(r,a,p))return{type:"mention",data:{id:p}}}return null}(e,t);case":":return function(e,t){var n=r.default.EMOJI_NAME_RE.exec(e);if(null==n)return null;var o=n[1],i=a.default.getDisambiguatedEmojiContext(t.guild_id).getCustomEmoji();if(null!=i&&o in i){var l=i[o];return{type:"customEmoji",data:{data:{emojiId:l.id,name:l.require_colons?":"+l.name+":":l.name,animated:l.animated}}}}return null}(e,t);case"#":return function(e,t){if(t.isPrivate())return null;var n=e.slice(1),r=o.default.getTextChannelNameDisambiguations(t.guild_id);for(var a in r){if(r[a].name===n)return{type:"channel",data:{id:a}}}return null}(e,t)}return null};var r=u(n(185)),a=u(n(249)),o=u(n(86)),i=u(n(56)),l=u(n(12));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n){var r=l.default.getUser(n);return null!=r&&(r.username===e&&r.discriminator===t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(8312)),i=n(1218),l=n(8365),u=d(n(8564)),s=d(n(7344));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){var n=e.disabled,r=e.type,d=(0,l.useExpressionPickerStore)((function(e){return[e.activeView,e.activeViewType]}),o.default),f=d[0],p=d[1],v=a.useCallback((function(){(0,l.toggleExpressionPicker)(i.ExpressionPickerViewType.EMOJI,r)}),[r]);return n?null:a.createElement("div",{className:s.default.buttonContainer,ref:t},c(u.default,{className:s.default.emojiButton,onClick:v,active:f===i.ExpressionPickerViewType.EMOJI&&p===r,tabIndex:0,focusProps:{offset:{top:4,bottom:4,left:-4,right:-4}}}))}p.displayName="ChannelEmojiPicker";var v=a.memo(a.forwardRef(p));t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(8312)),i=n(3),l=n(1218),u=n(8365),s=_(n(8438)),d=_(n(8633)),f=_(n(149)),c=_(n(8885)),p=n(8349),v=n(1),y=_(n(6)),m=_(n(7344));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(){return(E=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}).apply(this,arguments)}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){var n=e.disabled,r=e.type,_=a.useState(!1),h=_[0],S=_[1],O=(0,i.useStateFromStores)([s.default],(function(){return s.default.shouldShowTooltipOnFavorite()})),I=(0,u.useExpressionPickerStore)((function(e){return[e.activeView,e.activeViewType]}),o.default),T=I[0],C=I[1],b=a.useRef(0),M=a.useCallback((function(){S(!0),clearTimeout(b.current),b.current=setTimeout((function(){S(!1)}),1500)}),[]);a.useEffect((function(){return function(){clearTimeout(b.current)}})),(0,p.useComponentAction)({event:v.ComponentActions.FAVORITE_GIF,handler:M});var N=a.useCallback((function(){(0,u.toggleExpressionPicker)(l.ExpressionPickerViewType.GIF,r)}),[r]);return n?null:g(f.default,{text:h&&O?y.default.Messages.GIF_TOOLTIP_FAVORITED_PICKER_BUTTON:null,forceOpen:!0},void 0,(function(e){return a.createElement("div",E({ref:t,className:m.default.buttonContainer},e),g(d.default,{className:m.default.button,tabIndex:0,icon:c.default,onClick:N,isActive:T===l.ExpressionPickerViewType.GIF&&C===r,pulse:h,label:y.default.Messages.GIF_BUTTON_LABEL}))}))}S.displayName="ChannelGIFPickerButton";var O=a.memo(a.forwardRef(S));t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(5697),i=c(n(8633)),l=c(n(149)),u=c(n(5694)),s=n(1),d=c(n(6)),f=c(n(7344));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=v(u.default,{});function m(e){var t=e.disabled,n=e.channel;if(t)return null;var r=function(){return(0,o.openPremiumSubscriptionNewPlanModal)({planId:s.SubscriptionPlans.PREMIUM_MONTH_TIER_2,isGift:!0,analyticsLocation:{page:n.isPrivate()?s.AnalyticsPages.DM_CHANNEL:s.AnalyticsPages.GUILD_CHANNEL,section:s.AnalyticsSections.CHANNEL_TEXT_AREA,object:s.AnalyticsObjects.BUTTON_ICON,objectType:s.AnalyticsObjectTypes.GIFT}})};return v(l.default,{text:d.default.Messages.PREMIUM_GIFT_BUTTON_TOOLTIP},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave,a=e.onFocus,o=e.onBlur;return v(i.default,{className:f.default.button,tabIndex:0,onClick:r,isActive:!1,label:d.default.Messages.PREMIUM_GIFT_BUTTON_LABEL,onMouseEnter:t,onMouseLeave:n,onFocus:a,onBlur:o},void 0,y)}))}m.displayName="ChannelPremiumGiftButton";var _=a.memo(m);t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=y(n(0)),o=p(n(9)),i=p(n(8622)),l=n(1218),u=n(8365),s=y(n(8633)),d=p(n(8627)),f=(p(n(9499)),p(n(6))),c=p(n(7344));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){var n,r,p=e.disabled,v=e.type,y=(0,u.useExpressionPickerStore)((function(e){return e.activeView})),_=a.useContext(i.default),h=a.useState(!1),E=h[0],g=h[1],S=y===l.ExpressionPickerViewType.STICKER,O=a.useCallback((function(){(0,u.toggleExpressionPicker)(l.ExpressionPickerViewType.STICKER,v)}),[v]);if(a.useEffect((function(){var e=function(){requestAnimationFrame((function(){g(!0)}))},t=function(){requestAnimationFrame((function(){g(!1)}))};return _.addListener("sticker-suggestions-shown",e),_.addListener("sticker-suggestions-hidden",t),function(){_.removeListener("sticker-suggestions-shown",e),_.removeListener("sticker-suggestions-hidden",t)}}),[_]),p)return null;var I=E;return r=m(d.default,{className:c.default.stickerIcon,winking:I}),a.createElement("div",{className:c.default.buttonContainer,ref:t},m(s.default,{className:(0,o.default)(c.default.button,c.default.stickerButton,(n={},n[c.default.stickerButtonWithNotification]=!1,n[c.default.stickerButtonTilted]=I&&!S,n)),tabIndex:0,onClick:O,isActive:S,label:f.default.Messages.STICKER_BUTTON_LABEL,sparkle:!1,notification:null},void 0,r))}_.displayName="ChannelStickerPickerButton";var h=a.memo(a.forwardRef(_));t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({width:n,height:a},(0,i.default)(c),{viewBox:"0 0 20 20"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M10,5.42V.06H2a2,2,0,0,0-2,2V18a2,2,0,0,0,2,2H18a2,2,0,0,0,2-2V10H14.58A4.61,4.61,0,0,1,10,5.42Zm-6.64,9a1.11,1.11,0,1,1,1.12-1.11A1.11,1.11,0,0,1,3.33,14.44ZM10,15.55a3.33,3.33,0,0,1-3.33-3.33H8a2,2,0,0,0,4,0h1.33A3.33,3.33,0,0,1,10,15.55ZM12,5.4V.66A.65.65,0,0,1,13.12.2l6.69,6.68A.66.66,0,0,1,19.34,8H14.6A2.59,2.59,0,0,1,12,5.4Z"}))}d.displayName="Sticker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=p(n(1276)),l=n(5940),u=p(n(5936)),s=p(n(61)),d=p(n(686)),f=p(n(8472)),c=p(n(7539));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.channelId,n=a.useState(null),r=n[0],p=n[1],v=(0,o.useStateFromStores)([i.default],(function(){return i.default.getStickerPreview(t)}));return null==v||0===v.length?null:a.createElement(a.Fragment,null,y("div",{className:c.default.stickerPreviews},void 0,v.map((function(e){return y("div",{className:c.default.stickerPreviewContainer},e.id,y(s.default,{onFocus:function(){return p(e.id)},onBlur:function(){return p(null)},className:c.default.closeButton,onClick:function(){return(0,l.clearStickerPreview)(t)}},void 0,y("div",{className:c.default.closeIconContainer},void 0,y(d.default,{className:c.default.closeIcon}))),y(u.default,{isInteracting:r===e.id,className:c.default.stickerPreview,size:48,sticker:e}))}))),y(f.default,{className:c.default.stickerPreviewDivider}))};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?8:t,r=e.height,a=void 0===r?13:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 8 13"}),s("path",{className:null!=f?f:void 0,stroke:d,fill:"transparent",d:"M8.16639 0.5H9C10.933 0.5 12.5 2.067 12.5 4V9C12.5 10.933 10.933 12.5 9 12.5H8.16639C7.23921 12.5 6.34992 12.1321 5.69373 11.4771L0.707739 6.5L5.69373 1.52292C6.34992 0.86789 7.23921 0.5 8.16639 0.5Z"}))}d.displayName="UnreadCap"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(3),l=f(n(8280)),u=f(n(9503)),s=f(n(9504)),d=f(n(7344));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t=e.channel,n=e.type,r=e.editorRef,f=e.activeCommand,c=e.pendingReply,v=(0,i.useStateFromStoresObject)([l.default],(function(){return{activeCommandOption:l.default.getActiveOption(),activeCommandOptionStates:l.default.getOptionStates()}})),y=v.activeCommandOption,m=v.activeCommandOptionStates,_=a.useCallback((function(e){var t=r.current;null!=t&&(m[e].hasValue?t.selectCommandOption(e):t.insertCommandOption(e))}),[m,r]),h=[];return null!=f&&h.push(p(u.default,{channel:t,activeCommand:f,activeOption:null!=y?y:null,optionStates:m,onOptionClick:_})),null!=c&&h.push(p(s.default,{reply:c,textAreaType:n})),0===(h=h.map((function(e,t){var n,r=t===h.length-1;return p("div",{className:(0,o.default)((n={},n[d.default.stackedAttachedBar]=!r,n))},t,e)}))).length?null:p("div",{className:d.default.attachedBars},void 0,h)};v.displayName="ChannelTextAreaBars";var y=a.memo(v);t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(8842)),i=l(n(7540));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.className,n=e.channel,r=e.activeCommand,l=e.activeOption,u=e.optionStates,d=e.onOptionClick;return null==r?null:s("div",{className:(0,a.default)(t,i.default.bar)},void 0,s(o.default,{command:r,activeOptionName:null==l?void 0:l.name,channel:n,optionStates:u,onOptionClick:d,showOptions:!0,showImage:!0,isSelectable:!0}))}d.displayName="ApplicationCommandBar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(9)),i=n(3),l=n(106),u=O(n(682)),s=n(8390),d=n(42),f=O(n(8265)),c=n(1209),p=O(n(201)),v=O(n(61)),y=O(n(149)),m=O(n(8509)),_=O(n(686)),h=O(n(24)),E=n(1),g=O(n(6)),S=O(n(7541));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e){var t=e.channel,n=e.message,r=e.replyChainLength;return a.useEffect((function(){(0,l.trackWithMetadata)(E.AnalyticEvents.THREAD_NUDGE_SHOWN,{type:"Reply Chain (3)",reply_chain_length:r+1,channel_id:t.id,guild_id:t.guild_id})}),[t]),T(v.default,{onClick:function(){(0,s.deletePendingReply)(t.id),f.default.openThreadSidebarForCreating(t,n,"Reply Chain Nudge")},className:S.default.threadSuggestionBar,focusProps:{offset:{right:-4,left:-4}}},void 0,T(h.default,{color:h.default.Colors.HEADER_SECONDARY,className:S.default.text},void 0,g.default.Messages.THREAD_REPLY_SUGGESTION.format({count:Math.min(10,r+1)})),T(h.default,{color:h.default.Colors.LINK,className:S.default.createThreadButton},void 0,g.default.Messages.CREATE_THREAD))}function b(e){var t=e.reply,n=e.textAreaType,r=t.channel,l=t.message,f=t.shouldMention,O=t.showMentionToggle,I=(0,u.default)(l),b=I.nick,M=I.colorString,N=n===E.TextareaTypes.NORMAL,A=function(e,t){var n=e.id,r=t.id;return(0,i.useStateFromStores)([p.default],(function(){for(var e=r,t=0;t<10;t++){var a=p.default.getMessage(n,e);if((null==a?void 0:a.type)!==E.MessageTypes.REPLY||!a.messageReference)return t;e=a.messageReference.message_id}return 10}),[n,r])}(r,l),P=(0,c.useCanStartPublicThread)(r,l),R=N&&A>=2&&P;function L(e){e.stopPropagation(),(0,s.setPendingReplyShouldMention)(r.id,!f)}return T("div",{className:S.default.clipContainer},void 0,T("div",{className:S.default.container},void 0,T("div",{className:S.default.replyBar},void 0,T(v.default,{onClick:function(){return(0,d.transitionTo)(E.Routes.CHANNEL(r.getGuildId(),r.id,l.id))},focusProps:{offset:{top:-8,right:-4,bottom:-8,left:-4}}},void 0,T(h.default,{color:h.default.Colors.HEADER_SECONDARY,className:(0,o.default)(S.default.text,S.default.replyLabel)},void 0,g.default.Messages.REPLYING_TO.format({userHook:function(e,t){return T("span",{className:S.default.name,style:{color:M}},t,b)}}))),T("div",{className:S.default.actions},void 0,O&&a.createElement(a.Fragment,null,T(y.default,{text:f?g.default.Messages.REPLY_MENTION_ON_TOOLTIP:g.default.Messages.REPLY_MENTION_OFF_TOOLTIP},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave,r=e.onFocus,a=e.onBlur;return T(v.default,{role:"switch","aria-checked":f,onClick:L,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:a},void 0,T(h.default,{color:f?h.default.Colors.LINK:h.default.Colors.MUTED,className:S.default.mentionButton},void 0,T(m.default,{"aria-label":g.default.Messages.MENTION,className:S.default.mentionIcon}),f?g.default.Messages.REPLY_MENTION_ON:g.default.Messages.REPLY_MENTION_OFF))})),T("div",{className:S.default.separator,"aria-hidden":!0})),T(v.default,{className:S.default.closeButton,onClick:function(e){e.stopPropagation(),(0,s.deletePendingReply)(r.id)}},void 0,T(_.default,{className:S.default.closeIcon})))),R&&T(C,{channel:r,message:l,replyChainLength:A})))}C.displayName="ThreadSuggestion",b.displayName="ChannelReply"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(149)),l=c(n(5686)),u=c(n(9506)),s=c(n(8439)),d=c(n(6)),f=c(n(7543));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e){var t,n=e.document,r=e.maxCharacterCount,c=e.currentLength,p=e.className,m=e.showCharacterCountAfter,_=e.upsellAroundLimit,h=void 0!==_&&_,E=e.showPremiumFlair,g=void 0!==E&&E,S=s.default.serialize(n,"raw"),O=r-(c||S.length),I=O>m,T=0===O?d.default.Messages.CHARACTER_COUNT_AT_LIMIT:O>0?d.default.Messages.CHARACTER_COUNT_CLOSE_TO_LIMIT.format({count:O}):d.default.Messages.CHARACTER_COUNT_OVER_LIMIT;return v("div",{className:(0,o.default)(p,f.default.characterCount,(t={},t[f.default.error]=O<0,t))},void 0,v("div",{className:f.default.flairContainer},void 0,g&&O>=0?v(i.default,{text:d.default.Messages.PREMIUM_MESSAGE_LENGTH_CHATBOX_FLAIR.format({maxLength:r}),position:i.default.Positions.TOP},void 0,(function(e){return a.createElement(l.default,y({className:f.default.premiumFlair},e))})):null,I?null:v(i.default,{text:T,position:i.default.Positions.TOP},void 0,(function(e){return a.createElement("span",e,O)}))),h&&!I?v(u.default,{className:f.default.upsell}):null)}m.displayName="SlateCharacterCount"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=n(3),l=h(n(9507)),u=h(n(10)),s=h(n(36)),d=n(1149),f=h(n(5686)),c=n(41),p=h(n(24)),v=h(n(13)),y=n(1),m=h(n(6)),_=h(n(7542));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function O(){(0,c.openModal)((function(e){return a.createElement(l.default,S({channel:null},e))}))}function I(e){var t=e.className,n=(0,i.useStateFromStores)([s.default,u.default],(function(){var e=u.default.getChannel(s.default.getChannelId());return(null==e?void 0:e.isPrivate())?y.AnalyticsPages.DM_CHANNEL:y.AnalyticsPages.GUILD_CHANNEL}));return a.useEffect((function(){v.default.track(y.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:"longer messages inline",location:{location_page:n,location_section:y.AnalyticsSections.CHANNEL_TEXT_AREA}})}),[n]),g("div",{className:(0,o.default)(_.default.root,t)},void 0,g(f.default,{className:_.default.premium,color:d.GradientCssUrls.PREMIUM_TIER_2}),g(p.default,{size:p.default.Sizes.SIZE_14},void 0,m.default.Messages.PREMIUM_MESSAGE_LENGTH_UPSELL_TOOLTIP.format({onLearnMore:O})))}I.displayName="CharacterCountUpsell"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(473)),o=n(280),i=s(n(5953)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e){return null!=(null==e?void 0:e.getGuildId())?l.AnalyticsPages.GUILD_CHANNEL:(null==e?void 0:e.isGroupDM())||(null==e?void 0:e.isPrivate())?l.AnalyticsPages.DM_CHANNEL:null}function p(e){var t=e.channel,s=e.onClose,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channel","onClose"]);return r.createElement(i.default,f({artURL:n(8887),type:o.PremiumUpsellTypes.MESSAGE_LENGTH_UPSELL,title:u.default.Messages.PREMIUM_MESSAGE_LENGTH_UPSELL_MODAL_HEADER,body:u.default.Messages.PREMIUM_MESSAGE_LENGTH_UPSELL_MODAL_BODY.format({onLearnMore:function(){s(),a.default.open(l.UserSettingsSections.PREMIUM,null,{openWithoutBackstack:!0})}}),premiumType:l.PremiumTypes.TIER_2,analyticsSource:{page:c(t)},analyticsLocation:{section:l.AnalyticsSections.MESSAGE_LENGTH_UPSELL_MODAL,object:l.AnalyticsObjects.BUTTON_CTA},onClose:s},d))}p.displayName="PremiumMessageLengthUpsell"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(29)),i=y(n(9509)),l=y(n(9510)),u=y(n(8802)),s=y(n(9511)),d=y(n(9512)),f=y(n(9513)),c=y(n(165)),p=n(8882),v=y(n(7544));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).timeout=0,t.ref=a.createRef(),t.state={isActive:!1,x:null,y:null},t.hide=function(){t.setState({isActive:!1}),clearTimeout(t.timeout)},t.handleMouseDown=function(e){var n;e.target instanceof Node&&(null===(n=t.ref.current)||void 0===n?void 0:n.contains(e.target))||t.hide()},t.handleMouseUp=function(e){if(e.target instanceof Element)if(0!==e.button)t.hide();else{var n,r=e.target instanceof Node&&(null===(n=t.ref.current)||void 0===n?void 0:n.contains(e.target));clearTimeout(t.timeout),t.timeout=setTimeout((function(){var e=document.activeElement,n=t.props.containerRef.current;t.setState({isActive:r||null!=e&&null!=n&&n.contains(e)})}),100)}else t.hide()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var o=r.prototype;return o.componentDidMount=function(){document.addEventListener("keydown",this.hide),document.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("mouseup",this.handleMouseUp),window.addEventListener("focus",this.hide),window.addEventListener("blur",this.hide)},o.componentWillUnmount=function(){document.removeEventListener("keydown",this.hide),document.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mouseup",this.handleMouseUp),window.removeEventListener("focus",this.hide),window.removeEventListener("blur",this.hide),clearTimeout(this.timeout)},r.getDerivedStateFromProps=function(e,t){var n,r;if(e.value.selection.isCollapsed||!t.isActive)return{x:null,y:null};var a=window.getSelection();if(!a||!a.focusNode||!a.anchorNode||a.isCollapsed)return{x:null,y:null};var o=document.createRange();o.setStart(a.focusNode,a.focusOffset),o.setEnd(a.focusNode,a.focusOffset);var i=o.getBoundingClientRect(),l=document.createRange();l.setStart(a.anchorNode,a.anchorOffset),l.setEnd(a.anchorNode,a.anchorOffset);var u=l.getBoundingClientRect(),s=document.createRange();s.setStart(a.anchorNode,a.anchorOffset),s.setEnd(a.focusNode,a.focusOffset);var d=s.getBoundingClientRect(),f=i.x===u.x,c=f?d.x:Math.min(i.x,u.x),p=f?d.x+d.width:Math.max(i.x,u.x),v=(null===(n=e.containerRef.current)||void 0===n||null===(r=n.getBoundingClientRect())||void 0===r?void 0:r.y)||0;return{x:c+(p-c)/2-102.5,y:Math.max(v,Math.min(u.y,i.y))-45}},o.render=function(){var e=this.props,t=e.editorRef,n=e.value,r=this.state,o=r.x,p=r.y;return null==o||null==p?null:_(c.default,{},void 0,a.createElement("div",{ref:this.ref,className:v.default.toolbar,style:{top:p,left:o}},_("div",{className:v.default.arrow}),_(g,{editorRef:t,value:n,markdownSyntax:"bold"},void 0,_(l.default,{className:v.default.icon})),_(g,{editorRef:t,value:n,markdownSyntax:"italics"},void 0,_(s.default,{className:v.default.icon})),_(g,{editorRef:t,value:n,markdownSyntax:"strikethrough"},void 0,_(f.default,{className:v.default.icon})),_("div",{className:v.default.divider}),_(S,{editorRef:t,value:n,lineStyle:"blockQuote"},void 0,_(i.default,{className:v.default.icon})),_(g,{editorRef:t,value:n,markdownSyntax:"inlineCode"},void 0,_(u.default,{className:v.default.icon})),_(g,{editorRef:t,value:n,markdownSyntax:"spoiler"},void 0,_(d.default,{className:v.default.icon}))))},r}(a.PureComponent);function g(e){var t=e.editorRef,n=e.value,r=e.markdownSyntax,a=e.children,i=null!=n&&null!=(0,p.parseSelectedSyntax)(n).before[r];return _(o.default,{className:v.default.button,innerClassName:v.default.buttonInner,color:i?v.default.active:v.default.inactive,hover:v.default.hover,look:o.default.Looks.FILLED,size:o.default.Sizes.NONE,onClick:function(){var e;null===(e=t.current)||void 0===e||e.toggleMarkdownStyle(r)}},void 0,a)}function S(e){var t=e.editorRef,n=e.value,r=e.lineStyle,a=e.children,i=null!=n&&(0,p.doesSelectionHaveLineStyle)(n,r);return _(o.default,{className:v.default.button,innerClassName:v.default.buttonInner,color:i?v.default.active:v.default.inactive,hover:v.default.hover,look:o.default.Looks.FILLED,size:o.default.Sizes.NONE,onClick:function(){var e,n;null===(e=t.current)||void 0===e||e.setSelectionLineType(i?"line":r),null===(n=t.current)||void 0===n||n.focus()}},void 0,a)}t.default=E,E.displayName="SlateToolbar",g.displayName="InlineMarkdownButton",S.displayName="LineMarkdownButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M19.8401 5.39392C20.1229 4.73405 19.6389 4 18.921 4H17.1231C16.7417 4 16.3935 4.21695 16.2254 4.55933L13.3297 10.4581C13.195 10.7324 13.125 11.0339 13.125 11.3394V19C13.125 19.5523 13.5727 20 14.125 20H20C20.5523 20 21 19.5523 21 19V12.875C21 12.3227 20.5523 11.875 20 11.875H17.8208C17.4618 11.875 17.2198 11.508 17.3612 11.178L19.8401 5.39392ZM9.71511 5.39392C9.99791 4.73405 9.51388 4 8.79596 4H6.99809C6.61669 4 6.2685 4.21695 6.10042 4.55933L3.20466 10.4581C3.07001 10.7324 3 11.0339 3 11.3394V19C3 19.5523 3.44772 20 4 20H9.875C10.4273 20 10.875 19.5523 10.875 19V12.875C10.875 12.3227 10.4273 11.875 9.875 11.875H7.69577C7.33681 11.875 7.0948 11.508 7.2362 11.178L9.71511 5.39392Z"}))}d.displayName="BlockQuote"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({viewBox:"0 0 24 24"},(0,i.default)(c),{width:n,height:a}),s("path",{fill:d,className:f,d:"M18.2754 16.1739C18.2754 13.5072 16.7971 12.058 14.5653 11.3623C16.3044 10.6377 17.4638 9.27536 17.4638 7.18841C17.4638 4.02899 15.3189 2 10.8261 2H5V22H10.7392C15.4348 22 18.2754 20.1159 18.2754 16.1739ZM13.8986 7.50725C13.8986 9.21739 12.7102 10.2319 10.4493 10.2319H8.68116V4.92754H10.6232C12.9421 4.92754 13.8986 5.91304 13.8986 7.50725ZM14.5942 16.058C14.5942 18.058 13.1739 19.0725 10.7392 19.0725H8.68116V12.9565H10.6812C13.2319 12.9565 14.5942 14.029 14.5942 16.058Z"}))}d.displayName="Bold"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({viewBox:"0 0 24 24"},(0,i.default)(c),{width:n,height:a}),s("path",{fill:d,className:f,d:"M21 4V2H11V4H14.461L7.351 20H3V22H13V20H9.539L16.649 4H21Z"}))}d.displayName="Italic"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({viewBox:"0 0 24 24"},(0,i.default)(c),{width:n,height:a}),s("path",{fill:d,className:f,d:"M9.09091 12C9.09091 13.5786 10.3935 14.8571 12 14.8571C13.6065 14.8571 14.9091 13.5786 14.9091 12C14.9091 10.4214 13.6065 9.14286 12 9.14286C10.3935 9.14286 9.09091 10.4214 9.09091 12ZM13.3402 12C13.3402 12.789 12.689 13.4286 11.8857 13.4286C11.0823 13.4286 10.4311 12.789 10.4311 12C10.4311 11.211 11.0823 10.5714 11.8857 10.5714C12.689 10.5714 13.3402 11.211 13.3402 12Z"}),s("path",{fill:d,className:f,d:"M4 2C2.89543 2 2 2.89543 2 4V20C2 21.1046 2.89543 22 4 22H20C21.1046 22 22 21.1046 22 20V4C22 2.89543 21.1046 2 20 2H4ZM4 12C4 12 7.38036 7 12 7C16.6196 7 20 12 20 12C20 12 16.6196 17 12 17C7.38036 17 4 12 4 12Z"}))}d.displayName="Spoiler"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({viewBox:"0 0 24 24"},(0,i.default)(c),{width:n,height:a}),s("path",{fill:d,className:f,d:"M22.004 10.8906H2V13.1133H12.002C13.8401 13.1133 15.336 14.6091 15.336 16.4473C15.336 18.2854 13.8401 19.7813 12.002 19.7813H8.668V18.67H6.44533V20.8926C6.44533 21.5061 6.94321 22.004 7.55667 22.004H12.002C15.0659 22.004 17.5587 19.5112 17.5587 16.4473C17.5587 15.1915 17.1241 14.0446 16.4196 13.1133H22.004V10.8906Z"}),s("path",{fill:d,className:f,d:"M8.87358 8.668C8.748 8.31904 8.66798 7.94786 8.66798 7.55667C8.66798 5.71852 10.1638 4.22267 12.002 4.22267H14.2246V5.334H16.4473V3.11133C16.4473 2.49788 15.9494 2 15.336 2H12.002C8.93803 2 6.44531 4.49272 6.44531 7.55667C6.44531 7.93674 6.48421 8.30904 6.55756 8.668H8.87358Z"}))}d.displayName="StrikeThrough"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Upload=void 0;var r=u(n(8)),a=u(n(3)),o=u(n(2)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8289));n(1);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e,t,n){this.file=e,this.channelId=t,this.classification=i.classifyFile(e),this.isImage="image"===this.classification,this.sizeString=i.sizeString(e.size),this.filename=e.name,this.showLargeMessageDialog=n};t.Upload=d;var f=[];var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.getFirstUpload=function(){return f.length>0?f[0]:null},a.hasAdditionalUploads=function(){return f.length>1},r}(a.default.Store))(o.default,{UPLOAD_MODAL_POP_FILE:function(e){return f.shift(),void(f=[].concat(f))},UPLOAD_MODAL_PUSH_FILES:function(e){var t=e.files,n=e.channelId,a=e.showLargeMessageDialog;f=[].concat(f),r.default.forEach(t,(function(e){f.push(new d(e,n,a))}))},UPLOAD_MODAL_CLEAR_ALL_FILES:function(e){f=[]}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=W(n(0)),o=x(n(133)),i=x(n(98)),l=n(3),u=x(n(2)),s=n(1325),d=W(n(5672)),f=x(n(9516)),c=x(n(5970)),p=x(n(8888)),v=x(n(1177)),y=x(n(71)),m=x(n(12)),_=x(n(5836)),h=x(n(5826)),E=W(n(8634)),g=x(n(373)),S=x(n(1167)),O=x(n(5690)),I=x(n(55)),T=x(n(1164)),C=x(n(477)),b=x(n(151)),M=n(131),N=x(n(8565)),A=n(35),P=x(n(13)),R=n(5835),L=x(n(16)),D=n(281),w=n(8366),j=n(289),k=x(n(5840)),U=x(n(8889)),G=n(8890),F=n(1),B=x(n(6)),H=x(n(7370));function x(e){return e&&e.__esModule?e:{default:e}}function V(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return V=function(){return e},e}function W(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=V();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function z(){return(z=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}).apply(this,arguments)}function K(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){K(o,r,a,i,l,"next",e)}function l(e){K(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,X(e,t)}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var J=(0,o.default)({UNSUPPORTED_OS:null,TEST_MODE:null,GIFT_ONLY:null,PREORDER:null}),Q=Y(b.default,{}),ee=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={paymentSourceId:null},t._loadId=i.default.v4(),t._stepStartTime=Date.now(),t._flowStartTime=Date.now(),t._paymentModalRef=a.createRef(),t.handlePaymentSourceChange=function(e){var n=t.props,r=n.applicationId,a=n.skuId;null!=e?(d.fetchPurchasePreview(r,a,e.id),t.setState({paymentSourceId:e.id})):(d.fetchPurchasePreview(r,a,null),t.setState({paymentSourceId:null}))},t.handlePurchase=function(){var e=$(regeneratorRuntime.mark((function e(n){var r,a,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,a=r.applicationId,o=r.sku,i=t.getPrice(),l=null!=i?i.amount:0,null!=o){e.next=5;break}throw new Error("SKU is null during purchase");case 5:if(!E.default.isPurchasingSKU){e.next=7;break}return e.abrupt("return");case 7:return e.prev=7,P.default.track(F.AnalyticEvents.PAYMENT_FLOW_COMPLETED,z({},t.getBaseAnalyticsData(),{duration_ms:Date.now()-t._flowStartTime})),e.next=11,d.purchaseSKU(a,o.id,{expectedAmount:l,paymentSourceId:n.id,analyticsLoadId:t._loadId,isGift:t.isGift});case 11:(0,s.acceptPurchaseTerms)(),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(7),P.default.track(F.AnalyticEvents.PAYMENT_FLOW_FAILED,z({},t.getBaseAnalyticsData(),{payment_gateway:n.type===F.PaymentSourceTypes.CARD?F.PaymentGateways.STRIPE:F.PaymentGateways.BRAINTREE,payment_source_id:n.id,duration_ms:Date.now()-t._flowStartTime,payment_error_code:e.t0.code})),e.t0;case 18:case"end":return e.stop()}}),e,null,[[7,14]])})));return function(t){return e.apply(this,arguments)}}(),t.handleClose=function(e){void 0===e&&(e=null),(0,t.props.onClose)(e)},t.handleStepChange=function(e,n){var r=Date.now();P.default.track(F.AnalyticEvents.PAYMENT_FLOW_STEP,z({},t.getBaseAnalyticsData(),{from_step:e,to_step:n,step_duration_ms:r-t._stepStartTime,flow_duration_ms:r-t._flowStartTime})),t._stepStartTime=r,n===R.Steps.CONFIRM&&d.showPurchaseConfirmationStep()},t.renderHeader=function(e,n,r){var a=t.props.application;switch(e){case R.Steps.CONFIRM:return null!=a?Y(p.default,{application:a,splashSize:880}):null;default:return t.renderDefaultHeader(e,n,r)}},t.renderConfirmation=function(){var e=t.props,n=e.application,r=e.sku,a=e.isIAP,o=e.giftCode;if(null==r||null==n)throw new Error("No SKU for confirmation step!");return Y("div",{className:H.default.confirmContent},void 0,Y(I.default,{direction:I.default.Direction.VERTICAL},void 0,Y(A.ModalCloseButton,{onClick:function(){return t.handleClose()},className:H.default.confirmCloseButton}),null!=o?Y(k.default,{giftCode:o,application:n,sku:r,onClose:function(){return t.handleClose()}}):Y(U.default,{application:n,sku:r,isIAP:a,onClose:function(){return t.handleClose()}})))},t}q(t,e);var n,r,o,l=t.prototype;return l.getSkuPrice=function(e,t){void 0===e&&(e=this.props),void 0===t&&(t=this.state);var n=e.prices,r=t.paymentSourceId;return null==n?null:n[null!=r?r:E.NO_PAYMENT_SOURCE]},l.componentDidMount=function(){var e=this,t=this.props,n=t.sku,r=t.skuId,a=t.applicationId;null==n?d.fetchSKU(a,r).catch((function(t){return e.handleClose(t.message)})):P.default.track(F.AnalyticEvents.PAYMENT_FLOW_STARTED,this.getBaseAnalyticsData())},l.componentDidUpdate=function(e,t){null==e.sku&&null!=this.props.sku&&P.default.track(F.AnalyticEvents.PAYMENT_FLOW_STARTED,this.getBaseAnalyticsData()),this.checkPriceChange(this.getSkuPrice(e,t),this.getSkuPrice())},l.checkPriceChange=function(e,t){var n=this.props,r=n.sku,a=n.onClose;null!=e&&null!=t&&e.discount_percent_off!==t.discount_percent_off&&u.default.wait((function(){if(null==r)throw new Error("Unexpected null SKU");a(F.PaymentModalPriceChangedError)}))},l.getPrice=function(){var e=this.props,t=e.sku,n=e.isFetchingSKU;if(null==t||n)return null;var r=this.getSkuPrice();if(null!=r)return{amount:r.amount,tax:r.tax,taxInclusive:r.tax_inclusive,currency:r.currency};if(null==this.state.paymentSourceId){var a=t.getPrice();if(null==a)throw new Error("Sku Price cannot be null");return{amount:a.amount,tax:0,taxInclusive:!1,currency:a.currency}}return null},l.getBaseAnalyticsData=function(){var e=this.props,t=e.sku,n=e.analyticsLocation,r=e.appContext,a=e.promotionId;if(null==t)return{};var o=this.getPrice();return z({},(0,v.default)(t),{load_id:this._loadId,payment_type:"sku",is_gift:this.isGift,client_event_source:r===F.AppContext.OVERLAY?F.AppContext.OVERLAY:null,location:n,price:null!=o?o.amount:null,currency:null!=o?o.currency:null,location_promotion_id:a})},l.renderPurchaseWarning=function(){var e=this.props,t=e.sku,n=e.isInTestMode,r=e.isIAP,o=e.isUserEntitledToSku;if(null==t)return null;var i=(0,j.nativePlatformTypeToSKUOperatingSystem)(L.default.getPlatform()),l=[];if(!(null!=i&&t.supportedOperatingSystems.includes(i)||r)){if(1!==t.supportedOperatingSystems.length)throw new Error("Unexpected number of supported operating systems");l.push(Y(c.default,{icon:N.default,iconSize:c.default.Sizes.SMALL,color:c.default.Colors.WARNING,className:H.default.errorBlock},J.UNSUPPORTED_OS,B.default.Messages.APPLICATION_STORE_PURCHASE_GAME_UNSUPPORTED_OS.format({operatingSystem:(0,j.skuOperatingSystemToText)(t.supportedOperatingSystems[0])})))}return n&&l.push(Y(c.default,{icon:N.default,iconSize:c.default.Sizes.SMALL,color:c.default.Colors.WARNING,className:H.default.errorBlock},J.TEST_MODE,B.default.Messages.APPLICATION_STORE_PURCHASE_TEST_MODE)),!0===o&&this.isGiftable&&l.push(Y(c.default,{icon:N.default,iconSize:c.default.Sizes.SMALL,color:c.default.Colors.PRIMARY,className:H.default.errorBlock},J.GIFT_ONLY,B.default.Messages.APPLICATION_STORE_PURCHASE_GIFT_ONLY)),t.isPreorder()&&l.push(Y(c.default,{icon:N.default,iconSize:c.default.Sizes.SMALL,color:c.default.Colors.PRIMARY,className:H.default.errorBlock},J.PREORDER,B.default.Messages.APPLICATION_STORE_PURCHASE_WARNING_PREORDER.format({date:(0,w.getReadablePreorderReleaseDate)(t)}))),Y(a.Fragment,{},void 0,l)},l.renderGenericError=function(e,t){return null==e&&null==t?null:Y(T.default,{className:H.default.errorBlock},void 0,null!=e?e.message:null!=t?t.message:null)},l.renderDefaultHeader=function(e,t,n){var r=this,a=this.props,o=a.isIAP,i=a.application,l=a.sku,u=a.purchaseError;if(null==l||null==i)return null;var s=this.getPrice();return Y(A.ModalHeader,{direction:I.default.Direction.VERTICAL,align:I.default.Align.START,separator:!1},void 0,Y(p.default,{application:i,splashSize:880}),Y(I.default,{align:I.default.Align.CENTER,className:H.default.headerHeader},void 0,Y(M.FormTitle,{tag:M.FormTitleTags.H4},void 0,(0,G.getSkuHeaderText)(o,l.type)),Y(A.ModalCloseButton,{onClick:function(){return r.handleClose()}})),Y(I.default,{align:I.default.Align.CENTER,className:H.default.headerContent},void 0,Y(I.default,{align:I.default.Align.CENTER},void 0,Y(C.default,{game:i}),Y("div",{className:H.default.applicationName},void 0,l.name)),Y("div",{className:H.default.price},void 0,null!=s?(0,D.formatPrice)(s.amount,s.currency):Y(b.default,{type:b.default.Type.PULSING_ELLIPSIS,className:H.default.priceSpinner}))),this.renderPurchaseWarning(),this.renderGenericError(u,n),t.length>1?Y(O.default,{activeId:e,breadcrumbs:t,className:H.default.breadcrumbs}):null)},l.render=function(){var e=this,t=this.props,n=t.sku,r=t.isFetchingSKU,o=t.isPurchasing,i=t.purchaseError,l=t.isUserEntitledToSku,u=t.forceConfirmationStepOnMount,s=t.transitionState;return null==n||r?Q:a.createElement(f.default,{ref:this._paymentModalRef,transitionState:s,canSubmit:null!=this.getSkuPrice(),needsToBeGift:n.type===F.SKUTypes.DURABLE_PRIMARY&&!0===l,isGiftable:this.isGiftable,isPurchasing:o,purchaseError:i,price:this.getPrice(),size:A.ModalSize.SMALL,onPurchase:this.handlePurchase,onIsGiftUpdate:d.updateSKUPaymentIsGift,onPaymentSourceChange:this.handlePaymentSourceChange,onClose:function(){return e.handleClose()},onClearError:d.clearPurchaseError,renderHeader:this.renderHeader,renderConfirmationBody:this.renderConfirmation,submitButtonText:this.isGift?B.default.Messages.APPLICATION_STORE_BUY_GIFT:B.default.Messages.APPLICATION_STORE_BUY,initialStep:u?R.Steps.CONFIRM:null,onStepChange:this.handleStepChange,isGift:this.isGift})},n=t,(r=[{key:"closable",get:function(){var e=this._paymentModalRef.current;return null!=e&&e.closable}},{key:"isGiftable",get:function(){var e=this.props.sku;return null!=e&&e.isGiftable(this.getPrice())}},{key:"isGift",get:function(){return this.props.isGift&&this.isGiftable}}])&&Z(n.prototype,r),o&&Z(n,o),t}(a.PureComponent);ee.displayName="SKUPayment";var te=a.forwardRef((function(e,t){var n=e.applicationId,r=e.skuId,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["applicationId","skuId"]),i=(0,l.useStateFromStores)([y.default],(function(){return y.default.getGame(n)})),u=(0,l.useStateFromStoresArray)([E.default],(function(){return[E.default.getPricesForSku(r),E.default.isPurchasingSKU,E.default.error,E.default.analyticsLocation,E.default.promotionId,E.default.giftCode,E.default.isGift,E.default.isIAP,E.default.forceConfirmationStepOnMount]})),s=u[0],d=u[1],f=u[2],c=u[3],p=u[4],v=u[5],O=u[6],I=u[7],T=u[8],C=(0,l.useStateFromStoresArray)([g.default],(function(){return[g.default.get(r),g.default.isFetching(r)]})),b=C[0],M=C[1],N=(0,l.useStateFromStores)([S.default],(function(){return S.default.inTestModeForApplication(n)})),A=(0,l.useStateFromStores)([h.default,m.default],(function(){return h.default.isEntitledToSku(m.default.getNullableCurrentUser(),r,n)})),P=(0,l.useStateFromStores)([_.default],(function(){return _.default.error}));return a.createElement(ee,z({},o,{application:i,applicationId:n,skuId:r,prices:s,isPurchasing:d,purchaseError:P||f,analyticsLocation:c,promotionId:p,isIAP:I,giftCode:v,isGift:O,forceConfirmationStepOnMount:T,sku:b,isFetchingSKU:M,isInTestMode:N,isUserEntitledToSku:A,ref:t}))})),ne=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._skuPaymentModalRef=a.createRef(),t}q(t,e);var n=t.prototype;return n.close=function(){null!=this._skuPaymentModalRef.current&&this._skuPaymentModalRef.current.closable&&this.handleClose()},n.handleClose=function(e){void 0===e&&(e=null),this.props.onClose(e)},n.render=function(){var e=this;return a.createElement(te,z({},this.props,{ref:this._skuPaymentModalRef,onClose:function(){return e.handleClose()}}))},t}(a.PureComponent);ne.displayName="SKUPaymentModal";var re=ne;t.default=re},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PaymentModal=void 0;var r,a=h(n(0)),o=n(377),i=n(3),l=h(n(287)),u=h(n(5837)),s=m(n(5693)),d=m(n(5836)),f=m(n(693)),c=n(5835),p=n(295),v=h(n(9517)),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(){return(E=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}).apply(this,arguments)}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){S(o,r,a,i,l,"next",e)}function l(e){S(o,r,a,i,l,"throw",e)}i(void 0)}))}}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=[c.Steps.REVIEW,c.Steps.CONFIRM],b=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this)._hasChangedSteps=!1,n.handlePaypalContinue=function(){n.setState({step:c.Steps.PAYPAL_ADDRESS})},n.handleCreditCardContinue=function(){n.setState({step:c.Steps.ADDRESS})},n.handleReviewPaymentSourceChange=function(e){n.setState({paymentSourceId:null!=e?e.id:null})},n.handleReviewPaymentSourceAdd=function(){n.setState({step:c.Steps.PAYMENT_TYPE,steps:v.ADD_PAYMENT_STEPS,paymentSourceId:null});var e=n.props.onClearError;e&&e()},n.handleBack=function(){var e=n.props,t=e.paymentSources,r=e.onClose,a=n.state,o=a.step,i=a.steps,l=n.stepsToRender,s=(0,c.getStepIndex)(o,l);if(s>0){var d=l[s-1],f=d===c.Steps.PAYMENT_TYPE;f&&u.clearError(),n.setState({step:d,steps:f?v.ADD_PAYMENT_STEPS:i})}else if((0,c.canGoBack)(s,t)){var p=n.props.defaultPaymentSourceId;n.setState({step:c.Steps.REVIEW,steps:v.REVIEW_PAYMENT_STEPS,paymentSourceId:p})}else r()},n.handleChoosePaymentType=function(e){switch(e){case y.PaymentSourceTypes.PAYPAL:n.setState({step:c.Steps.PAYPAL,steps:v.ADD_PAYPAL_STEPS});break;case y.PaymentSourceTypes.CARD:n.setState({step:c.Steps.CREDIT_CARD_INFORMATION,steps:v.ADD_CARD_STEPS});break;case y.PaymentSourceTypes.PAYMENT_REQUEST:n.setState({step:c.Steps.PAYMENT_REQUEST_INFO,steps:v.ADD_PAYMENT_REQUEST_STEPS})}},n.handlePaymentSourceAdd=function(e){n.setState({step:c.Steps.REVIEW,paymentSourceId:e})},n.handlePurchase=O(regeneratorRuntime.mark((function e(){var t,r,a,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.props,r=t.paymentSources,a=t.onPurchase,o=t.isGift,null!=(i=n.state.paymentSourceId)){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,a(r[i],o);case 7:n.setState({steps:C,step:c.Steps.CONFIRM}),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(4);case 12:case"end":return e.stop()}}),e,null,[[4,10]])}))),n.handleSelectPlan=function(){var e=n.props.paymentSources,t=Object.values(e).length>0;n.setState({step:t?c.Steps.REVIEW:c.Steps.PAYMENT_TYPE})};var r=t.defaultPaymentSourceId,a=t.paymentSources,o=t.initialStep,i=Object.values(a).length>0,l=o;return null==l&&(l=i?c.Steps.REVIEW:c.Steps.PAYMENT_TYPE),n.state={paymentSourceId:r,steps:i?v.REVIEW_PAYMENT_STEPS:v.ADD_PAYMENT_STEPS,step:l,errorStep:null},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n);var a,i,s,d=r.prototype;return d.componentDidMount=function(){f.default.hasFetchedPaymentSources||l.fetchPaymentSources()},d.componentDidUpdate=function(e,t){var n=this.props.onStepChange,r=this.state.step;r!==t.step&&(this._hasChangedSteps=!0,null!=n&&n(t.step,r))},r.getDerivedStateFromProps=function(e,t){var n=e.billingError,r=e.isAwaitingAuthentication,a=t.errorStep,o={};if(null==n)null!=a&&(o.errorStep=null);else{var i=(0,c.errorToStep)(n);null!=i&&i!==t.errorStep&&(o.step=i,o.errorStep=i)}return null==t.paymentSourceId&&null!=e.defaultPaymentSourceId&&(o.paymentSourceId=e.defaultPaymentSourceId),r?o.step=c.Steps.AWAITING_AUTHENTICATION:t.step===c.Steps.AWAITING_AUTHENTICATION&&(o.step=null!=n?c.Steps.REVIEW:c.Steps.CONFIRM),o},d.render=function(){var e,t=this,n=this.props,r=n.isPurchasing,a=n.canSubmit,i=n.submitButtonText,l=n.useShinySubmitButton,u=n.legalNotice,s=n.renderHeader,d=n.onPaymentSourceChange,f=n.price,m=n.onClearError,_=n.size,h=n.renderConfirmationBody,E=n.renderConfirmationFooter,S=n.className,O=n.isGift,I=n.isGiftable,T=n.needsToBeGift,C=n.onIsGiftUpdate,b=n.transitionState,M=((e={})[c.Steps.CONFIRM]={renderBody:h,renderFooter:E},e[c.Steps.SELECT_PLAN]={renderBody:function(){return t.props.renderSelectPlanBody(t.handleSelectPlan)},renderFooter:function(){return t.props.renderSelectPlanFooter()}},e),N=this.state,A=N.step,P=N.paymentSourceId,R=this.stepsToRender;return g(o.Elements,{options:y.StripeElementsOptions,stripe:(0,p.ensureStripeV3IsLoaded)()},void 0,g(v.default,{transitionState:b,className:S,isPurchasing:r,canSubmit:a,submitButtonText:i,useShinySubmitButton:l,legalNotice:u,renderHeader:s,onPaymentSourceChange:d,price:f,onClearError:m,size:_,extraRenderers:M,step:A,steps:R,paymentSourceId:P,isGiftable:I,isGift:O,needsToBeGift:T,onIsGiftUpdate:C,onBack:this.handleBack,onChoosePaymentType:this.handleChoosePaymentType,onCreditCardContinue:this.handleCreditCardContinue,onPaymentSourceAdd:this.handlePaymentSourceAdd,onPurchase:this.handlePurchase,onPaypalContinue:this.handlePaypalContinue,onReviewPaymentSourceChange:this.handleReviewPaymentSourceChange,onReviewPaymentSourceAdd:this.handleReviewPaymentSourceAdd}))},a=r,(i=[{key:"stepsToRender",get:function(){var e=this.props.prependSteps,t=this.state.steps;return null!=e?[].concat(e,t):t}},{key:"closable",get:function(){var e=this.state.step;return 0===(0,c.getStepIndex)(e,this.stepsToRender)||!this._hasChangedSteps}}])&&I(a.prototype,i),s&&I(a,s),r}(a.Component);t.PaymentModal=b,b.displayName="PaymentModal",b.defaultProps={useShinySubmitButton:!1,needsToBeGift:!1,isGiftable:!1,isGift:!1,renderConfirmationBody:y.NOOP_NULL,renderConfirmationFooter:y.NOOP_NULL,renderSelectPlanBody:y.NOOP_NULL,renderSelectPlanFooter:y.NOOP_NULL};var M=a.forwardRef((function(e,t){var n=(0,i.useStateFromStoresArray)([f.default],(function(){return[f.default.paymentSources,f.default.defaultPaymentSourceId]})),r=n[0],o=n[1],l=(0,i.useStateFromStores)([s.default],(function(){return s.default.error})),u=(0,i.useStateFromStoresArray)([d.default],(function(){return[d.default.error,d.default.isAwaitingAuthentication]})),c=u[0],p=u[1];return a.createElement(b,E({},e,{ref:t,billingError:c||l,paymentSources:r,defaultPaymentSourceId:o,isAwaitingAuthentication:p}))}));t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ADD_PAYMENT_REQUEST_STEPS=t.ADD_PAYPAL_STEPS=t.ADD_CARD_STEPS=t.ADD_PAYMENT_STEPS=t.REVIEW_PAYMENT_STEPS=void 0;var r,a=B(n(0)),o=n(377),i=G(n(3)),l=G(n(2)),u=B(n(287)),s=B(n(5692)),d=B(n(5837)),f=G(n(5673)),c=G(n(160)),p=G(n(5833)),v=G(n(5839)),y=G(n(5693)),m=G(n(693)),_=G(n(29)),h=G(n(1160)),E=G(n(55)),g=G(n(1164)),S=n(131),O=n(35),I=G(n(272)),T=n(5835),C=G(n(16)),b=n(139),M=G(n(5842)),N=G(n(5843)),A=n(5996),P=n(5997),R=n(5844),L=n(9518),D=n(9519),w=n(1),j=G(n(6)),k=G(n(5838)),U=G(n(5714));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function x(){return(x=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}).apply(this,arguments)}function V(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){V(o,r,a,i,l,"next",e)}function l(e){V(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var K=[T.Steps.PAYMENT_TYPE,T.Steps.CREDIT_CARD_INFORMATION,T.Steps.REVIEW];t.REVIEW_PAYMENT_STEPS=K;var $=[T.Steps.PAYMENT_TYPE,T.Steps.CREDIT_CARD_INFORMATION,T.Steps.REVIEW];t.ADD_PAYMENT_STEPS=$;var Z=[T.Steps.PAYMENT_TYPE,T.Steps.CREDIT_CARD_INFORMATION,T.Steps.ADDRESS,T.Steps.REVIEW];t.ADD_CARD_STEPS=Z;var q=[T.Steps.PAYMENT_TYPE,T.Steps.PAYPAL,T.Steps.PAYPAL_ADDRESS,T.Steps.REVIEW];t.ADD_PAYPAL_STEPS=q;var X=[T.Steps.PAYMENT_TYPE,T.Steps.PAYMENT_REQUEST_INFO,T.Steps.REVIEW];t.ADD_PAYMENT_REQUEST_STEPS=X;var J=(0,b.cssValueToNumber)(U.default.innerPadding),Q=function(e){var t,n;function r(){for(var t,n,r=arguments.length,i=new Array(r),f=0;f<r;f++)i[f]=arguments[f];return(n=e.call.apply(e,[this].concat(i))||this).state={hasAcceptedNeccessaryTerms:!1,stripeToken:null},n.handleToggleIsGift=function(e,t){var r=n.props.onIsGiftUpdate;null!=r&&r(t)},n.handlePurchaseTermsChange=function(e){n.setState({hasAcceptedNeccessaryTerms:e})},n.handleReopenPaypal=function(){s.reopenPayPalWindow()},n.handleCardInfoChange=function(e,t){l.default.wait((function(){return d.updateCardInfo(e,t)}))},n.handleBillingAddressChange=function(e,t){l.default.wait((function(){return d.updateAddressInfo(e,t)}))},n.handleCreditCardAdd=function(){var e=W(regeneratorRuntime.mark((function e(t){var r,a,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.props,a=r.creditCardInfo,o=r.billingAddressInfo,i=n.state.stripeToken,e.prev=2,e.next=5,u.createCardPaymentSource(x({stripe:t},a,{billingAddress:o,type:w.PaymentSourceTypes.CARD,token:i}));case 5:l=e.sent,n.props.onPaymentSourceAdd(l.id),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),n.handleStripePaymentRequestAdd=function(){var e=W(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.updateStripePaymentRequest(t),null!=t){e.next=4;break}return n.props.onBack(),e.abrupt("return");case 4:return e.prev=4,e.next=7,u.createPaymentRequestPaymentSource(t);case 7:r=e.sent,n.props.onPaymentSourceAdd(r.id),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(4);case 13:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}(),n.handlePaypalAdd=W(regeneratorRuntime.mark((function e(){var t,r,a,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.props,r=t.braintreeEmail,a=t.braintreeNonce,o=t.billingAddressInfo,0!==r.length&&null!=a){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,u.createPaypalPaymentSource(a,o);case 6:i=e.sent,n.props.onPaymentSourceAdd(i.id),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(3);case 12:case"end":return e.stop()}}),e,null,[[3,10]])}))),n.renderBackButton=function(){var e=n.props,t=e.step,r=e.steps,a=e.paymentSources,o=e.onBack,i=(0,T.getStepIndex)(t,r),l=(0,T.canGoBack)(i,a)?j.default.Messages.BACK:j.default.Messages.CANCEL;return H(_.default,{look:_.default.Looks.LINK,className:k.default.backButton,color:k.default.backButtonColor,size:k.default.backButtonSize,onClick:o},void 0,l)},n.stepRenderer=x(((t={})[T.Steps.PAYMENT_TYPE]={renderBody:function(){var e=n.props,t=e.hidePersonalInformation,r=e.onChoosePaymentType,o=e.isGiftable,i=e.needsToBeGift,l=e.isGift;return t?H(g.default,{className:k.default.errorBlock},void 0,j.default.Messages.BILLING_ERROR_ADD_PAYMENT_SOURCE_STREAMER_MODE):H(a.Fragment,{},void 0,H(M.default,{className:k.default.choosePaymentSourceType,onChooseType:r,allowStripeRequestPayments:!C.default.embedded,onStripePaymentMethodReceived:n.handleStripePaymentRequestAdd}),o&&H(h.default,{disabled:i,className:k.default.giftToggle,type:h.default.Types.INVERTED,value:l,onChange:n.handleToggleIsGift},void 0,H("div",{className:k.default.checkboxLabel},void 0,j.default.Messages.BILLING_IS_GIFT_PURCHASE)))},renderFooter:function(){return H(O.ModalFooter,{direction:E.default.Direction.HORIZONTAL},void 0,n.renderBackButton())}},t[T.Steps.PAYMENT_REQUEST_INFO]={renderBody:function(){return H(R.PaymentRequestStepBody,{className:k.default.formItem,stripePaymentMethod:n.props.stripePaymentMethod,submitting:n.props.submitting})},renderFooter:function(){return H(O.ModalFooter,{direction:E.default.Direction.HORIZONTAL},void 0,n.renderBackButton())}},t[T.Steps.PAYPAL]={renderBody:function(){return H(N.default,{className:k.default.formItem})},renderFooter:function(){var e=n.props,t=e.submitting,r=e.braintreeNonce,a=e.braintreeEmail,o=e.onPaypalContinue,i=e.paypalClient;return H(L.PaypalStepFooter,{submitting:t||null==i,braintreeNonce:r,braintreeEmail:a,onPaypalContinue:o,onReopenPaypal:n.handleReopenPaypal,renderBackButton:n.renderBackButton})}},t[T.Steps.CREDIT_CARD_INFORMATION]={renderBody:function(){var e=n.props.billingError;return H(P.CreditCardInformationBody,{onCardInfoChange:n.handleCardInfoChange,billingError:e})},renderFooter:function(){var e=n.props,t=e.isCardInfoValid,r=e.submitting;return H(o.ElementsConsumer,{},void 0,(function(e){var a=e.stripe,o=e.elements;return H(P.CreditCardInformationFooter,{isCardInfoValid:t,submitting:r,renderBackButton:n.renderBackButton,onCreditCardContinue:function(){n.onCreditCardSubmit(a,o)}})}))}},t[T.Steps.PAYPAL_ADDRESS]={renderBody:function(){var e=n.props,t=e.billingAddressInfo,r=e.billingError;return H(A.AddressStepBody,{billingAddressInfo:t,billingError:r,onBillingAddressChange:n.handleBillingAddressChange})},renderFooter:function(){var e=n.props,t=e.isBillingAddressInfoValid,r=e.submitting;return H(A.AddressStepFooter,{isBillingAddressInfoValid:t,submitting:r,onContinue:n.handlePaypalAdd,renderBackButton:n.renderBackButton})}},t[T.Steps.ADDRESS]={renderBody:function(){var e=n.props,t=e.billingAddressInfo,r=e.billingError;return H(A.AddressStepBody,{billingAddressInfo:t,billingError:r,onBillingAddressChange:n.handleBillingAddressChange})},renderFooter:function(){var e=n.props,t=e.isBillingAddressInfoValid,r=e.submitting;return H(o.ElementsConsumer,{},void 0,(function(e){var a=e.stripe;return H(A.AddressStepFooter,{isBillingAddressInfoValid:t,submitting:r,onContinue:function(){n.handleCreditCardAdd(a)},renderBackButton:n.renderBackButton})}))}},t[T.Steps.REVIEW]={renderBody:function(){var e=n.props,t=e.legalNotice,r=e.paymentSources,a=e.price,o=e.hidePersonalInformation,i=e.paymentSourceId,l=e.onReviewPaymentSourceChange,u=e.onReviewPaymentSourceAdd,s=e.isGiftable,d=e.isGift,f=e.needsToBeGift;return H(D.ReviewStepBody,{legalNotice:t,paymentSources:r,price:a,hidePersonalInformation:o,paymentSourceId:i,onPaymentSourceChange:l,onPaymentSourceAdd:u,onPurchaseTermsChange:n.handlePurchaseTermsChange,onToggleIsGift:n.handleToggleIsGift,isGiftable:s,isGift:d,needsToBeGift:f})},renderFooter:function(){var e=n.props,t=e.canSubmit,r=e.submitButtonText,a=e.useShinySubmitButton,o=e.isPurchasing,i=e.paymentSourceId,l=e.onPurchase,u=e.needsToBeGift,s=e.isGift,d=e.paymentSources;return H(D.ReviewStepFooter,{canSubmit:t,submitButtonText:r,useShinySubmitButton:a,isPurchasing:o,hasAcceptedTerms:n.state.hasAcceptedNeccessaryTerms,paymentSource:null!=i?d[i]:null,onPurchase:l,tooltipText:n.disabledTooltip,needsToBeGift:u,isGift:s})}},t[T.Steps.CONFIRM]={renderBody:w.NOOP_NULL,renderFooter:w.NOOP_NULL},t[T.Steps.AWAITING_AUTHENTICATION]={renderBody:function(){return H(S.FormTitle,{className:k.default.formTitle},void 0,j.default.Messages.PAYMENT_WAITING_FOR_AUTHENTICATION)},renderFooter:w.NOOP_NULL},t),n.props.extraRenderers),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,z(t,n);var i,c,p,v=r.prototype;return v.componentDidMount=function(){s.createClient();var e=this.props,t=e.onPaymentSourceChange,n=e.paymentSources,r=e.defaultPaymentSourceId,a=e.paymentSourceId;null!=t&&(null!=a&&a!==r&&null!=n[a]?t(n[a]):null!=r&&null!=n[r]?t(n[r]):t(null))},v.componentDidUpdate=function(e){var t=this.props,n=t.onPaymentSourceChange,r=t.paymentSources,a=t.paymentSourceId;e.paymentSourceId!==a&&null!=a&&null!=r[a]&&n&&n(r[a])},v.componentWillUnmount=function(){s.teardown(),d.clearCardInfo();var e=this.props.onClearError;e&&e()},v.preventDefault=function(e){e.preventDefault()},v.renderHeader=function(){var e=this.props,t=e.renderHeader,n=e.billingError;return t(e.step,e.steps.map((function(e){return{id:e,label:(0,T.getCrumbLabels)(e)}})),null==(0,T.errorToStep)(n)?n:null)},v.onCreditCardSubmit=function(){var e=W(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.props.onCreditCardContinue,e.prev=1,e.next=4,u.createCardToken(t,n);case 4:a=e.sent,this.setState({stripeToken:a}),r(),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:case"end":return e.stop()}}),e,this,[[1,9]])})));return function(t,n){return e.apply(this,arguments)}}(),v.render=function(){var e=this.props,t=e.size,n=e.step,r=e.steps,a=e.className,o=e.transitionState,i=this.stepRenderer[n],l=i.renderBody();return H(O.ModalRoot,{size:t,className:a,"aria-label":j.default.Messages.SKU_PAYMENT_STEPS_LABEL,transitionState:o},void 0,H(I.default,{},void 0,H("form",{className:k.default.form,onSubmit:this.preventDefault},void 0,this.renderHeader(),n!==T.Steps.CONFIRM?H("div",{className:k.default.divider}):null,null!=l&&H(O.ModalContent,{className:k.default.modalContent},void 0,H("div",{className:k.default.content},void 0,H(f.default,{step:n,steps:r,sideMargin:J},void 0,l))),i.renderFooter())))},i=r,(c=[{key:"disabledTooltip",get:function(){var e=this.props,t=e.needsToBeGift,n=e.isGift,r=e.isGiftable;return this.state.hasAcceptedNeccessaryTerms?t&&!n?r?j.default.Messages.APPLICATION_STORE_PURCHASE_GIFT_ONLY:j.default.Messages.APPLICATION_STORE_PURCHASE_GIFT_ONLY_UNGIFTABLE:null:j.default.Messages.BILLING_ACCEPT_TERMS_TOOLTIP}}])&&Y(i.prototype,c),p&&Y(i,p),r}(a.PureComponent);Q.displayName="PaymentModal",Q.defaultProps={canSubmit:!0,useShinySubmitButton:!1,size:O.ModalSize.SMALL,billingError:null,extraRenderers:{},className:k.default.modal};var ee=i.default.connectStores([m.default,y.default,p.default,c.default,v.default],(function(){return{submitting:p.default.isBusy,paymentSources:m.default.paymentSources,defaultPaymentSourceId:m.default.defaultPaymentSourceId,stripePaymentMethod:y.default.stripePaymentMethod,creditCardInfo:y.default.getCreditCardInfo(),isCardInfoValid:y.default.isCardInfoValid,billingAddressInfo:y.default.getBillingAddressInfo(),isBillingAddressInfoValid:y.default.isBillingAddressInfoValid,braintreeEmail:y.default.braintreeEmail,braintreeNonce:y.default.braintreeNonce,billingError:y.default.error,paypalClient:v.default.getPayPalClient(),hidePersonalInformation:c.default.hidePersonalInformation}}))(Q);t.default=ee},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaypalStepFooter=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(29)),o=u(n(55)),i=n(35),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=function(e){var t=e.submitting,n=e.braintreeNonce,r=e.braintreeEmail,u=e.onPaypalContinue,s=e.onReopenPaypal,f=e.renderBackButton,c=0!==r.length&&null!=n;return d(i.ModalFooter,{justify:o.default.Justify.BETWEEN,direction:o.default.Direction.HORIZONTAL},void 0,f(),d(a.default,{submitting:t,color:c?a.default.Colors.BRAND:a.default.Colors.PRIMARY,onClick:c?u:s},void 0,c?l.default.Messages.NEXT:l.default.Messages.PAYMENT_SOURCE_PAYPAL_REOPEN))};t.PaypalStepFooter=f,f.displayName="PaypalStepFooter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReviewStepFooter=t.ReviewStepBody=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(5970)),i=E(n(5674)),l=E(n(485)),u=E(n(29)),s=E(n(1160)),d=E(n(5828)),f=E(n(149)),c=n(131),p=E(n(9520)),v=E(n(8565)),y=n(35),m=n(281),_=E(n(6)),h=E(n(5838));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t=e.legalNotice,n=e.paymentSources,r=e.price,u=e.hidePersonalInformation,d=e.paymentSourceId,f=e.isGiftable,y=e.isGift,E=e.needsToBeGift,g=e.onPaymentSourceChange,S=e.onPaymentSourceAdd,I=e.onPurchaseTermsChange,T=e.onToggleIsGift,C=[],b=null!=d?n[d]:null;return null!=b&&b.invalid&&C.push(O(o.default,{icon:v.default,color:o.default.Colors.ERROR,iconSize:o.default.Sizes.NONE,iconClassName:h.default.invalidIcon},"source_invalid",_.default.Messages.BILLING_PAYMENT_SOURCE_INVALID)),null!=r&&(r.taxInclusive?C.push(O(o.default,{icon:p.default,color:o.default.Colors.PRIMARY,iconSize:o.default.Sizes.LARGE},"tax_included",_.default.Messages.BILLING_SALES_TAX_INCLUDED)):r.tax>0&&C.push(O(o.default,{icon:p.default,color:o.default.Colors.PRIMARY,iconSize:o.default.Sizes.LARGE},"tax_added",_.default.Messages.BILLING_SALES_TAX_ADDED.format({tax:(0,m.formatPrice)(r.tax,r.currency)})))),O(a.Fragment,{},void 0,O(c.FormTitle,{className:h.default.formTitle},void 0,_.default.Messages.BILLING_PAY_FOR_IT_WITH),O(i.default,{paymentSources:Object.values(n),selectedPaymentSourceId:d,hidePersonalInformation:u,onChange:g,onPaymentSourceAdd:S}),C,f&&O(s.default,{disabled:E,className:h.default.giftToggle,type:s.default.Types.INVERTED,value:y,onChange:T},void 0,O("div",{className:h.default.checkboxLabel},void 0,_.default.Messages.BILLING_IS_GIFT_PURCHASE)),O(l.default,{onChange:I,forceShow:!0,className:h.default.purchaseTerms,finePrint:t}))};t.ReviewStepBody=I,I.displayName="ReviewStepBody";var T=function(e){var t=e.canSubmit,n=e.submitButtonText,r=e.useShinySubmitButton,o=e.isPurchasing,i=e.hasAcceptedTerms,l=e.paymentSource,s=e.onPurchase,c=e.tooltipText,p=e.needsToBeGift,v=e.isGift,m=null!=l&&!l.invalid,_=i&&!(p&&!v)&&m&&t,E={submitting:o,color:u.default.Colors.GREEN,disabled:!_,onClick:s};return O(y.ModalFooter,{},void 0,O("div",{className:h.default.buyButtonTooltipWrapper},void 0,E.disabled&&null!=c?O(f.default,{text:c},void 0,(function(e){return a.createElement("div",S({"aria-hidden":!0,className:h.default.buyButtonTooltipTarget},e))})):null,r?a.createElement(d.default,E,n):a.createElement(u.default,S({type:"submit"},E),n)))};t.ReviewStepFooter=T,T.displayName="ReviewStepFooter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 18 20"}),s("path",{className:f,fill:d,d:"M15,15H3V13H15Zm0-4H3V9H15Zm0-4H3V5H15ZM0,20l1.5-1.5L3,20l1.5-1.5L6,20l1.5-1.5L9,20l1.5-1.5L12,20l1.5-1.5L15,20l1.5-1.5L18,20V0L16.5,1.5,15,0,13.5,1.5,12,0,10.5,1.5,9,0,7.5,1.5,6,0,4.5,1.5,3,0,1.5,1.5,0,0Z"}))}d.displayName="Receipt"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(389),o=u(n(8253)),i=u(n(9522)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.libraryApplication,n=e.onPlay,r=e.onSelect,u=(0,i.default)(t,n);return d(o.default,{navId:"launch-context",onClose:a.closeContextMenu,"aria-label":l.default.Messages.APPLICATION_ACTIONS_MENU_LABEL,onSelect:r},void 0,u)}f.displayName="ApplicationLaunchOptionsContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.useStateFromStores)([l.default],(function(){return l.default.getLaunchOptions(e.id,e.branchId)})),r=(0,a.useStateFromStores)([u.default],(function(){return u.default.getActiveLaunchOptionId(e.id,e.branchId)}));return n.length<2?null:n.map((function(n){return c(i.MenuItem,{id:n.id,label:n.name,action:function(a){n.id!==r&&o.setActiveLaunchOptionId(e.id,e.branchId,n.id),t&&t(a)}})}))};f(n(0));var r,a=n(3),o=f(n(8716)),i=n(8253),l=s(n(155)),u=s(n(120));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(8470)),l=h(n(8636)),u=n(8893),s=h(n(29)),d=h(n(9527)),f=h(n(9528)),c=h(n(9529)),p=n(289),v=n(8614),y=h(n(8833)),m=n(1),_=h(n(7554));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),v=0;v<n;v++)r[v]=arguments[v];return(t=e.call.apply(e,[this].concat(r))||this).renderActions=function(){var e=t.props,n=e.inLibrary,r=e.sku,a=e.renderCustomActions,o=e.isMouseOver,d=(e.showBuyInline||!r.requiresPayment)&&!n,f=d&&o;return null!=a?a():g("div",{className:_.default.priceOs},void 0,g(l.default,{type:l.default.Types.DIRECTORY_TILE,sku:r,inLibrary:n,className:f?_.default.tilePriceWithVisibleBuyButton:_.default.tilePrice}),g(u.OperatingSystemSection,{systems:[m.OperatingSystems.WINDOWS],className:_.default.platform}),d?g(i.default,{skuId:r.id,applicationId:r.applicationId,size:s.default.Sizes.SMALL,shouldRenderPrice:!0,onStoreListing:!0,onClick:function(e){return e.preventDefault()},className:f?_.default.tileBuyButtonVisible:_.default.tileBuyButton}):null)},t.renderMedia=function(){var e,n,r,i=t.props,l=i.playing,u=i.muted,s=i.showMediaPlaceholder,v=i.onToggleMute,y=i.sku,m=i.isHorizontal,h=i.storeListing;return g(a.Fragment,{},void 0,g(c.default,{className:(0,o.default)(_.default.splashContainer,(e={},e[_.default.splashContainerHorizontal]=m,e)),video:null!=h.previewVideo?(0,p.getAssetURL)(y.applicationId,h.previewVideo):void 0,image:null!=h.thumbnail?(0,p.getAssetURL)(y.applicationId,h.thumbnail,600):null,title:y.name,playing:l,muted:u,placeholder:s,onToggleMute:v,splashClassName:_.default.splashVideo,splashPlaceholderClassName:_.default.splashPlaceholder}),y.exclusive?g(d.default,{className:(0,o.default)(_.default.exclusiveRegular,(n={},n[_.default.exclusivePlaying]=l,n))}):y.isTheGameAwardsWinner?g(f.default,{className:(0,o.default)(_.default.exclusiveRegular,(r={},r[_.default.exclusivePlaying]=l,r))}):null)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n),r.prototype.render=function(){var e=this.props,t=e.sku,n=e.storeListing,r=e.isHorizontal,a=e.className,o=e.renderCustomTagline,i=e.renderCustomTitle;return g(e.isEmbed?v.ResponsiveEmbedTile:y.default,{className:a,renderMedia:this.renderMedia,renderTitle:null!=i?i:function(){return t.name},renderTagline:null!=o?o:function(){return n.tagline},renderActions:this.renderActions,isHorizontal:r})},r}(a.PureComponent);O.displayName="ApplicationTile",O.defaultProps={showMediaPlaceholder:!1,isMouseOver:!1,showBuyInline:!1,isHorizontal:!1,isEmbed:!1};var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M14.62 8.35c-.42.28-1.75 1.04-1.95 1.19-.39.31-.75.29-1.14-.01-.2-.16-1.53-.92-1.95-1.19-.48-.31-.45-.7.08-.92 1.64-.69 3.28-.64 4.91.03.49.21.51.6.05.9m7.22 7.28c-.93-2.09-2.2-3.99-3.84-5.66a4.31 4.31 0 0 1-1.06-1.88c-.1-.33-.17-.67-.24-1.01-.2-.88-.29-1.78-.7-2.61-.73-1.58-2-2.4-3.84-2.47-1.81.05-3.16.81-3.95 2.4-.21.43-.36.88-.46 1.34-.17.76-.32 1.55-.5 2.32-.15.65-.45 1.21-.96 1.71-1.61 1.57-2.9 3.37-3.88 5.35-.14.29-.28.58-.37.88-.19.66.29 1.12.99.96.44-.09.88-.18 1.3-.31.41-.15.57-.05.67.35.65 2.15 2.07 3.66 4.24 4.5 4.12 1.56 8.93-.66 9.97-4.58.07-.27.17-.37.47-.27.46.14.93.24 1.4.35.49.09.85-.16.92-.64.03-.26-.06-.49-.16-.73"}),d))}f.displayName="OsLinux"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M18.64 19.499c-.82 1.24-1.687 2.45-3.008 2.47-1.322.03-1.746-.79-3.245-.79-1.508 0-1.972.77-3.224.82-1.292.05-2.268-1.32-3.097-2.53-1.686-2.47-2.978-7.02-1.242-10.08.858-1.52 2.396-2.48 4.063-2.51 1.262-.02 2.465.87 3.244.87.77 0 2.229-1.07 3.757-.91.64.03 2.436.26 3.59 1.98-.09.06-2.14 1.28-2.12 3.81.029 3.02 2.612 4.03 2.642 4.04-.03.07-.414 1.44-1.36 2.83zm-5.631-16c.72-.829 1.913-1.459 2.899-1.499.128 1.17-.336 2.35-1.026 3.19-.68.85-1.804 1.51-2.909 1.42-.148-1.15.404-2.35 1.036-3.11z"}),d))}f.displayName="OsMac"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M4 11.526V6.553l5.684-1.25v6.138L4 11.526zM20.105 3v8.29l-9.473.142V5.094L20.105 3zM4 12.474l5.684.085v6.452L4 17.92v-5.447zm16.105.237V21l-9.473-1.81v-6.622l9.473.143z"}),d))}f.displayName="OsWindows"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(6)),i=l(n(7551));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.className;return s("div",{className:(0,a.default)(i.default.tag,t)},void 0,s("span",{className:i.default.text},void 0,o.default.Messages.APPLICATION_STORE_FIRST_ON_DISCORD))};d.displayName="FirstOnDiscordTag";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(6)),i=l(n(7552));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.className;return s("div",{className:(0,a.default)(i.default.tag,t)},void 0,s("span",{className:i.default.text},void 0,o.default.Messages.APPLICATION_STORE_THE_GAME_AWARDS_WINNER))};d.displayName="TheGameAwardsTag";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=_(n(273)),l=n(57),u=_(n(469)),s=n(299),d=_(n(61)),f=_(n(8894)),c=_(n(151)),p=_(n(8276)),v=_(n(8724)),y=_(n(5945)),m=_(n(7553));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,S(e,t)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._animatedValue=new i.default.Value(1),t.state={imageLoadError:!1,imageLoading:!0},t.componentWillEnter=function(e){t._animatedValue.setValue(0),i.default.timing(t._animatedValue,{toValue:1,duration:400}).start(e)},t.componentWillLeave=function(e){i.default.timing(t._animatedValue,{toValue:0,duration:400}).start(e)},t.getImageStyle=function(){return{opacity:t._animatedValue}},t.handleImageError=function(){t.setState({imageLoadError:!0,imageLoading:!1})},t.handleImageLoaded=function(){t.setState({imageLoading:!1})},t}g(t,e);var n=t.prototype;return n.renderMedia=function(){var e,t=this.props,n=t.src,r=t.className,a=t.title,l=this.state.imageLoading;return E(i.default.img,{className:(0,o.default)((e={},e[m.default.imageLoading]=l,e),r),src:n,alt:a,style:this.getImageStyle(),onError:this.handleImageError,onLoad:this.handleImageLoaded})},n.render=function(){var e=this.props,t=e.className,n=e.title,r=e.src,a=this.state,l=a.imageLoadError,u=a.imageLoading;return null==r||l?E(i.default.div,{className:(0,o.default)(m.default.titleContainer,t),style:this.getImageStyle()},void 0,n):E(i.default.div,{className:(0,o.default)(u?m.default.loadingContainer:null,t),style:this.getImageStyle()},void 0,u?E(c.default,{className:m.default.spinner,itemClassName:m.default.spinnerItem,type:c.default.Type.PULSING_ELLIPSIS,animated:!0}):null,this.renderMedia())},t}(a.Component);O.displayName="TileMediaImage";var I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={currentIndex:0,videoLoadError:!1,videoLoaded:!1},t._video=a.createRef(),t.videoTimeout=new l.Timeout,t.videoPlaying=!1,t.handleToggleMute=function(e){e.stopPropagation(),e.preventDefault();var n=t.props.onToggleMute;n&&n(e)},t.handleVideoError=function(){t.setState({videoLoadError:!0})},t.handleVideoLoaded=function(){t.setState({videoLoaded:!0})},t.renderTypeVideo=function(){var e,n=t.state.videoLoaded,r=t.props,i=r.video,l=r.image,f=r.title,c=r.playing,_=r.muted,h=r.splashClassName,g=r.splashPlaceholderClassName,S=r.renderMediaOverlay,I=_?v.default:p.default;return E(a.Fragment,{},void 0,s.isMobile?null:a.createElement(y.default,{className:(0,o.default)(m.default.splash,h),muted:_,loop:!0,preload:"none",ref:t._video,onLoadedMetadata:t.handleVideoLoaded,onError:t.handleVideoError},E("source",{src:i,type:"video/mp4"})),E(u.default,{},void 0,c&&n?null:E(O,{className:(0,o.default)(m.default.splashPlaceholder,g),src:l,title:f},0)),E(d.default,{className:(0,o.default)(m.default.muteContainer,(e={},e[m.default.muteContainerPlaying]=c&&n,e[m.default.muteContainerMediaOverlay]=null!=S,e)),onClick:t.handleToggleMute},void 0,c&&n?E(I,{className:m.default.mute}):null))},t.nextItem=function(){var e=t.props.slideImages;null!=e&&t.setState({currentIndex:(t.state.currentIndex+1)%e.length})},t.renderSlideItem=function(e){var n=t.props,r=n.image,a=n.title,i=n.playing,l=n.splashClassName,u=t.state.currentIndex;return i?E(O,{className:(0,o.default)(m.default.splash,l),src:e[u],title:a},u):E(O,{className:(0,o.default)(m.default.splash,l),src:r,title:a},"image")},t}g(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.videoTimeout.stop()},n.componentDidUpdate=function(e){var t=this,n=this.props.playing,r=this._video.current;if(null!=r)if(n&&!e.playing){this.videoTimeout.stop(),isFinite(r.duration)&&isFinite(r.currentTime)&&(r.currentTime=0),r.volume=.3;var a=r.play();null!=a&&a.then((function(){t.videoPlaying=!0}))}else e.playing&&!n&&this.videoTimeout.start(400,(function(){t.videoPlaying&&(r.pause(),t.videoPlaying=!1)}))},n.renderTypeImage=function(){var e=this.props,t=e.playing,n=e.slideImages,r=e.image,a=e.title,i=e.splashClassName;return null==n?E(O,{className:(0,o.default)(m.default.splash,i),src:r,title:a},"image"):E(f.default,{onInterval:this.nextItem,interval:2e3,className:m.default.slideshowWrapper,disable:!t},void 0,E(u.default,{},void 0,this.renderSlideItem(n)))},n.render=function(){var e=this.props,t=e.video,n=e.className,r=e.placeholder,a=e.renderMediaOverlay,i=e.playing,l=this.state,u=l.videoLoadError,s=l.videoLoaded;return r?E("div",{className:n}):E("figure",{className:(0,o.default)(m.default.tileMedia,n)},void 0,null==t||u?this.renderTypeImage():this.renderTypeVideo(),null!=a&&a(i&&s))},t}(a.Component);I.displayName="TileMedia";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=_(n(8514)),l=n(8896),u=_(n(29)),s=_(n(61)),d=_(n(686)),f=_(n(8345)),c=_(n(47)),p=_(n(24)),v=_(n(9531)),y=_(n(6)),m=_(n(7557));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t=e.channelId,n=e.messageId,r=(0,o.useStateFromStores)([v.default],(function(){return v.default.shouldShowBump(n)}),[n]),_=a.useCallback((function(){i.default.dismissPublishBump(n),(0,l.confirmPublish)(t,n)}),[t,n]),h=a.useCallback((function(){i.default.dismissPublishBump(n)}),[n]),g=a.useCallback((function(){i.default.permanentlyHidePublishBump(t)}),[t]);return r?E("div",{className:m.default.container},void 0,E("div",{className:m.default.bumpBox},void 0,E(f.default,{className:m.default.icon}),E(c.default,{className:m.default.tagline,size:c.default.Sizes.SIZE_14},void 0,y.default.Messages.NEWS_CHANNEL_PUBLISH_BUMP),E(u.default,{color:u.default.Colors.BRAND,look:u.default.Looks.LINK,size:u.default.Sizes.MIN,className:m.default.publish,onClick:_},void 0,y.default.Messages.NEWS_CHANNEL_PUBLISH),E(s.default,{onClick:h},void 0,E(d.default,{className:m.default.closeIcon,width:16,height:16}))),E(p.default,{color:p.default.Colors.MUTED,className:m.default.hidePermanently},void 0,E(s.default,{onClick:g},void 0,y.default.Messages.NEWS_CHANNEL_PUBLISH_BUMP_HIDE_PERMANENTLY))):null};g.displayName="ChannelFollowingPublishBump";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(3)),a=p(n(28)),o=p(n(2)),i=p(n(11)),l=p(n(10)),u=p(n(40)),s=p(n(12)),d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(99)),f=n(1);function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=new Set,m=new Set;var _=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var o=r.prototype;return o.initialize=function(){this.waitFor(i.default),y=new Set(a.default.get("ChannelFollowingBumpChannels"))},o.shouldShowBump=function(e){return m.has(e)},r}(r.default.Store))(o.default,{MESSAGE_CREATE:function(e){var t=e.channelId,n=e.message;if(e.optimistic)return!1;if(y.has(t))return!1;var r=l.default.getChannel(t),a=s.default.getCurrentUser();if(!(null!=r&&r.type===f.ChannelTypes.GUILD_ANNOUNCEMENT&&n.type===f.MessageTypes.DEFAULT&&(n.author.id===a.id?u.default.can(f.Permissions.SEND_MESSAGES,r):u.default.can(f.Permissions.MANAGE_MESSAGES,r))&&!d.hasFlag(n.flags,f.MessageFlags.CROSSPOSTED)))return!1;m.add(n.id)},MESSAGE_UPDATE:function(e){var t=e.message;m.has(t.id)&&d.hasFlag(t.flags,f.MessageFlags.CROSSPOSTED)&&m.delete(t.id)},CHANNEL_SELECT:function(e){m.clear()},CHANNEL_FOLLOWING_PUBLISH_BUMP_DISMISSED:function(e){var t=e.messageId;m.delete(t)},CHANNEL_FOLLOWING_PUBLISH_BUMP_HIDE_PERMANENTLY:function(e){var t=e.channelId;y.add(t),a.default.set("ChannelFollowingBumpChannels",y),m.clear()}});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=v(n(8314)),l=v(n(9533)),u=n(41),s=v(n(1176)),d=n(296),f=v(n(8743)),c=v(n(6)),p=v(n(7561));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_(i.default.Body,{resolving:!0}),E=_(i.default.Icon,{expired:!0});function g(e){var t=e.code,n=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuildTemplate(t)}));if(null==n||n.state===d.GuildTemplateStates.RESOLVING)return _(i.default,{},void 0,_(i.default.Header,{text:c.default.Messages.GUILD_TEMPLATE_RESOLVING_TITLE}),h);if(n.state===d.GuildTemplateStates.EXPIRED)return _(i.default,{},void 0,_(i.default.Header,{text:c.default.Messages.GUILD_TEMPLATE_INVALID_TITLE}),_(i.default.Body,{},void 0,E,_(i.default.Info,{expired:!0,title:c.default.Messages.GUILD_TEMPLATE_INVALID_SUBTITLE})));var r=__OVERLAY__?_(i.default.Button,{isDisabled:!0,color:i.default.Button.Colors.GREY},void 0,c.default.Messages.GUILD_TEMPLATE_EMBED_VIEW_IN_APP):_(i.default.Button,{onClick:function(){(0,u.openModal)((function(e){return a.createElement(f.default,m({},e,{guildTemplate:n}))}))},submitting:n.state===d.GuildTemplateStates.ACCEPTING,color:i.default.Button.Colors.GREEN},void 0,c.default.Messages.GUILD_TEMPLATE_OPEN);return _(i.default,{},void 0,_(i.default.Header,{text:c.default.Messages.GUILD_TEMPLATE_RESOLVED_EMBED_TITLE}),_(i.default.Body,{},void 0,_(l.default,{className:p.default.icon}),_(i.default.Info,{title:n.name},void 0,c.default.Messages.GUILD_TEMPLATE_USAGES.format({usageCount:n.usageCount||0})),r))}g.displayName="GuildTemplateEmbed"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?40:t,r=e.height,a=void 0===r?40:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,style:{minWidth:n,minHeight:a},viewBox:"0 0 40 40"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 4C15.5817 4 12 7.58172 12 12V20C12 24.4183 15.5817 28 20 28H28C32.4183 28 36 24.4183 36 20V12C36 7.58172 32.4183 4 28 4H20ZM19.5962 21.6084C19.5599 21.8126 19.717 22 19.9244 22H20.5806C20.7422 22 20.8806 21.8841 20.9088 21.7249L21.3333 19.3333H25.3333L24.9295 21.6084C24.8932 21.8126 25.0503 22 25.2577 22H25.9139C26.0756 22 26.2139 21.8841 26.2421 21.7249L26.6667 19.3333H29.0533C29.2152 19.3333 29.3537 19.217 29.3816 19.0575L29.4983 18.3908C29.534 18.1868 29.377 18 29.1699 18H26.9L27.6067 14H29.9933C30.1552 14 30.2937 13.8836 30.3216 13.7241L30.4383 13.0575C30.474 12.8535 30.317 12.6667 30.1099 12.6667H27.84L28.2438 10.3916C28.2801 10.1874 28.123 10 27.9156 10H27.2594C27.0977 10 26.9594 10.1159 26.9312 10.2751L26.5067 12.6667H22.5067L22.9105 10.3916C22.9467 10.1874 22.7897 10 22.5823 10H21.926C21.7644 10 21.6261 10.1159 21.5978 10.2751L21.1733 12.6667H18.7867C18.6248 12.6667 18.4863 12.783 18.4584 12.9425L18.3417 13.6092C18.306 13.8132 18.463 14 18.6701 14H20.94L20.2333 18H17.8467C17.6848 18 17.5463 18.1164 17.5184 18.2759L17.4017 18.9425C17.366 19.1465 17.523 19.3333 17.7301 19.3333H20L19.5962 21.6084ZM21.5669 18L22.2736 14H26.2736L25.5669 18H21.5669Z",fill:d}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33335 14.0208C6.11738 16.1734 4 19.8395 4 24C4 30.6274 9.37258 36 16 36C20.1604 36 23.8262 33.8829 25.979 30.6672H24.3268C22.372 33.1055 19.3683 34.6667 16 34.6667C10.109 34.6667 5.33333 29.8911 5.33333 24C5.33333 20.6315 6.89477 17.6277 9.33335 15.6729V14.0208Z",fill:d}))}d.displayName="TemplateIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(14)),a=d(n(2)),o=n(42),i=d(n(709)),l=d(n(86)),u=d(n(15)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}var f={acceptGuildTemplate:function(e,t,n){return a.default.dirtyDispatch({type:s.ActionTypes.GUILD_TEMPLATE_ACCEPT,code:e}),new Promise((function(d,f){r.default.post({url:s.Endpoints.UNRESOLVED_GUILD_TEMPLATE(e),body:{name:t,icon:n},oldFormErrors:!0}).then((function(t){var n=t.body;a.default.dispatch({type:s.ActionTypes.GUILD_TEMPLATE_ACCEPT_SUCCESS,code:e,guild:n}),i.default.isConnected()?u.default.addConditionalChangeListener((function(){var e;if(null!=u.default.getGuild(n.id))return(0,o.transitionToGuild)(n.id,null===(e=l.default.getDefaultChannel(n.id))||void 0===e?void 0:e.id),d(n),!1})):((0,o.transitionToGuild)(n.id),d(n))}),(function(t){a.default.dispatch({type:s.ActionTypes.GUILD_TEMPLATE_ACCEPT_FAILURE,code:e}),f(t.body)}))}))}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a.useRef([]);a.useEffect((function(){null!=e&&e.state!==i.GuildTemplateStates.RESOLVING&&(t.current.includes(e.code)||(t.current.push(e.code),o.default.track(l.AnalyticEvents.CREATE_GUILD_VIEWED,{guild_template_code:e.code,guild_template_name:e.name,guild_template_description:e.description,guild_template_guild_id:e.sourceGuildId})))}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(13))&&r.__esModule?r:{default:r},i=n(296),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}},function(e,t,n){e.exports=n.p+"35edf813c8596f469ab56e28edc63969.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(286),l=v(n(8610)),u=n(8637),s=n(8899),d=v(n(9539)),f=v(n(9540)),c=v(n(9541)),p=v(n(7566));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n){switch(t.type){case i.ComponentType.ACTION_ROW:return a.createElement(c.default,_({key:n,message:e,renderComponent:h},t));case i.ComponentType.BUTTON:return a.createElement(d.default,_({key:n,message:e},t));case i.ComponentType.SELECT:return a.createElement(f.default,_({key:n,message:e},t))}}function E(e){var t=e.message,n=(0,o.useStateFromStores)([l.default],(function(){return l.default.getInteraction(t)}),[t]),r=a.useMemo((function(){var e;return(0,u.createComponents)(t,null!==(e=t.components)&&void 0!==e?e:[],n)}),[t,n]);return 0===r.length?null:m("div",{className:p.default.container},void 0,(0,s.renderComponents)(t,r,h))}E.displayName="MessageInteractionComponents"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectComponentExperiment=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-05_bot_ui_kit_select",label:"Bot UI Kit Select",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0}}]});t.SelectComponentExperiment=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=T(n(0)),o=O(n(9)),i=n(389),l=O(n(5938)),u=n(286),s=n(8506),d=T(n(8253)),f=O(n(10)),c=O(n(29)),p=O(n(8744)),v=O(n(1251)),y=n(730),m=n(1163),_=n(8638),h=n(8637),E=O(n(6)),g=O(n(7562)),S=O(n(7563));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e){switch(e){case u.ButtonStyle.PRIMARY:return c.default.Colors.BRAND;case u.ButtonStyle.SUCCESS:return c.default.Colors.GREEN;case u.ButtonStyle.DESTRUCTIVE:return c.default.Colors.RED;default:return c.default.Colors.GREY}}function N(e){var t=e.url,n=e.onSelect;return m.SUPPORTS_COPY&&null!=t?b(d.default,{navId:"component-button",onClose:i.closeContextMenu,"aria-label":E.default.Messages.MESSAGE_BUTTON_COMPONENT_LINK_CONTEXT_MENU_NAME,onSelect:n},void 0,b(d.MenuGroup,{},void 0,b(d.MenuItem,{id:"copy",label:E.default.Messages.MESSAGE_BUTTON_COMPONENT_LINK_CONTEXT_MENU_COPY,action:function(){return(0,m.copy)(t)}}))):null}N.displayName="ButtonLinkContextMenu";var A=b(v.default,{dotRadius:3.5,themed:!0});function P(e){var t,n,r,d=e.message,v=e.label,m=e.style,E=e.disabled,O=e.emoji,I=e.url,T=e.customId,P=e.hash,R=e.indices,L=e.applicationId,D=e.state,w=(0,h.useIsComponentDisabled)(d.channel_id),j=null!=O,k=null!=v&&v.length>0,U=m===u.ButtonStyle.LINK&&null!=I&&I.length>0,G=D===_.ActionComponentState.LOADING;return r=U?function(){(0,y.handleClick)({href:I||"",shouldConfirm:!0})}:function(){var e=f.default.getChannel(d.channel_id);null!=e&&null!=T&&(0,s.executeMessageComponentInteraction)({componentType:u.ComponentType.BUTTON,messageId:d.id,messageFlags:d.flags,customId:T,hash:P,indices:R,applicationId:L,channelId:e.id,guildId:e.guild_id})},b(c.default,{className:g.default.component,color:M(m),size:c.default.Sizes.SMALL,disabled:E||D===_.ActionComponentState.DISABLED||w,onClick:r,onContextMenu:function(e){U&&(0,i.openContextMenu)(e,(function(e){return a.createElement(N,C({},e,{url:I}))}))},role:U?"link":"button"},void 0,b("div",{className:(0,o.default)(S.default.content,(t={},t[S.default.hidden]=G,t)),"aria-hidden":G},void 0,j?b(l.default,{className:(0,o.default)((n={},n[S.default.textEmoji]=k,n)),src:O.src,emojiId:O.id,emojiName:O.name,animated:O.animated}):null,k?b("div",{className:S.default.label},void 0,v):null,U?b(p.default,{className:S.default.launchIcon,width:16,height:16}):null),G?b("div",{className:S.default.loading},void 0,A):null)}P.displayName="ButtonActionComponent"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=S(n(0)),o=E(n(9)),i=n(3),l=E(n(5938)),u=n(286),s=n(8506),d=E(n(10)),f=n(8609),c=E(n(1251)),p=S(n(374)),v=n(8638),y=n(8637),m=E(n(8898)),_=E(n(6)),h=E(n(7564));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t,n=e.emoji,r=e.label,a=e.description,i=e.isDisabled,u=e.isOffset,s=(0,o.default)(h.default.labelContainer,((t={})[h.default.disabled]=i,t[h.default.offset]=null==n&&u,t));return I("div",{className:h.default.option},void 0,null!=n?I(l.default,{className:h.default.emoji,emojiId:n.id,emojiName:n.name,animated:n.animated}):null,I("div",{className:s},void 0,I("strong",{className:h.default.label},void 0,r),null!=a?I("span",{className:h.default.description},void 0,a):null))}function C(e){var t=e.emoji,n=e.label;return I("div",{className:h.default.option},void 0,I("div",{className:(0,o.default)(h.default.value,h.default.singleValue)},void 0,null!=t?I(l.default,{className:h.default.emoji,src:t.src,emojiId:t.id,emojiName:t.name,animated:t.animated}):null,I("span",{},void 0,n)))}function b(e){var t=e.options;return I("div",{className:h.default.option},void 0,I("div",{className:h.default.value},void 0,t.map((function(e){return I("span",{className:h.default.tag},e.value,e.label)}))))}T.displayName="OptionLabel",C.displayName="OptionValue",b.displayName="OptionPills";var M=I(c.default,{dotRadius:3.5,themed:!0});function N(e){var t=e.message,n=e.applicationId,r=e.options,o=e.customId,l=e.hash,c=e.indices,E=e.placeholder,g=e.maxValues,S=e.minValues,N=e.disabled,A=e.state,P=(0,y.useIsComponentDisabled)(t.channel_id),R=(0,i.useStateFromStores)([m.default],(function(){return m.default.getInteractionComponentState(t.id,c)})),L=g>1,D=A===v.ActionComponentState.LOADING,w=a.useState(!1),j=w[0],k=w[1],U=a.useState(null),G=U[0],F=U[1],B=a.useState((function(){return new Set(r.filter((function(e){return e.default})).map((function(e){return e.value})))})),H=B[0],x=B[1],V=a.useState(H),W=V[0],Y=V[1],z=a.useMemo((function(){return r.some((function(e){return null!=e.emoji}))}),[r]);a.useEffect((function(){var e=new Set(r.filter((function(e){return e.default})).map((function(e){return e.value})));x(e),Y(e)}),[r]),a.useEffect((function(){if(null!=R){var e=R.selectedOptions.map((function(e){var t;return null===(t=r[e])||void 0===t?void 0:t.value}));x(new Set(e)),Y(new Set(e))}}),[c,r,t.id,R]);var K=a.useCallback((function(){return _.default.Messages.MESSAGE_SELECT_COMPONENT_SELECT_REQUIREMENT.format({count:S})}),[S]),$=a.useCallback((function(){if(L&&(H.size<S||H.size>g))F(K());else if(W!==H){F(null),Y(H);var e=d.default.getChannel(t.channel_id);null!=e&&null!=o&&(0,s.executeMessageComponentInteraction)({componentType:u.ComponentType.SELECT,messageId:t.id,messageFlags:t.flags,customId:o,hash:l,indices:c,applicationId:n,channelId:e.id,guildId:e.guild_id,httpBodyData:{values:Array.from(H)},localState:{selectedOptions:Array.from(H).map((function(e){return r.findIndex((function(t){return t.value===e}))}))}})}}),[L,H,S,g,F,K,W,Y,n,o,l,c,t,r]);a.useEffect((function(){j||H.size===W.size&&Array.from(W).every((function(e){return H.has(e)}))||$()}),[j,H,W,$]);var Z=(0,p.useVariableSelect)({value:H,onChange:function(e){return x(e)},isMulti:L});return I(a.Fragment,{},void 0,I("div",{className:h.default.container},void 0,a.createElement(p.default,O({isDisabled:N||P,className:h.default.select,options:r.map((function(e){return O({},e,{disabled:L&&!H.has(e.value)&&H.size===g})})),placeholder:null!=E?E:_.default.Messages.MESSAGE_SELECT_COMPONENT_DEFAULT_PLACEHOLDER,onClose:function(){return k(!1)},onOpen:function(){return k(!0)},maxVisibleItems:5,closeOnSelect:!L,optionClassName:h.default.selectOption,renderOptionLabel:function(e){return a.createElement(T,O({},e,{isDisabled:L&&!H.has(e.value)&&H.size===g,isOffset:z}))},renderOptionValue:function(e){return L?I(b,{options:e}):a.createElement(C,e[0])}},Z)),D?I("div",{className:h.default.loading},void 0,M):null),null!=G?a.createElement(f.InteractionStatusMessage,O({},(0,f.getFailedContent)(G),{className:h.default.error})):null)}N.displayName="SelectActionComponent"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8609)),o=n(8899),i=l(n(7565));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.message,n=e.components,r=e.errorText,l=e.renderComponent,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["message","components","errorText","renderComponent"]);return null==n||0===n.length?null:d("div",{className:i.default.container},void 0,d("div",{className:i.default.children},void 0,(0,o.renderComponents)(t,n,l)),d(a.default,{className:i.default.error,message:t,component:s({errorText:r},u)}))}f.displayName="ActionRowLayoutComponent"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8308),i=m(n(61)),l=m(n(278)),u=m(n(149)),s=m(n(8900)),d=n(139),f=n(5944),c=m(n(5936)),p=m(n(9543)),v=m(n(7568)),y=m(n(7349));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=(0,d.cssValueToNumber)(y.default.stickerDimension),S=function(e){var t=e.renderableSticker,n=e.channel,r=e.isInteracting,d=a.useState(!0),y=d[0],m=d[1],_=a.useState(String(Date.now())),S=_[0],O=_[1],I=(0,f.useStickerForRenderableSticker)(t,r)[0],T=null!=I,C=E("span",{className:v.default.stickerName},void 0,E(s.default,{className:v.default.stickerIcon}),(null!=I?I:t).name);return E(l.default,{align:l.default.Align.CENTER,animation:l.default.Animation.TRANSLATE,positionKey:S,onRequestClose:function(){m(!0)},renderPopout:function(e){return a.createElement(p.default,h({},e,{renderableSticker:t,channel:n,refreshPositionKey:function(){return O(String(Date.now()))}}))}},void 0,(function(e){var n=e.onClick;return a.createElement(u.default,h({},o.EXPRESSION_TOOLTIP_PROPS,{shouldShow:y,"aria-label":(null!=I?I:t).name,text:T?(0,o.renderClickableTooltipNode)(C):C}),(function(e){return a.createElement(i.default,h({},e,{className:v.default.clickableSticker,onClick:function(e){m(!y),n(e)},tag:"span"}),E(c.default,{isInteracting:r,size:g,sticker:null!=I?I:t}))}))}))};S.displayName="StickerMessage";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=B(n(9)),i=n(3),l=B(n(199)),u=B(n(473)),s=n(106),d=B(n(9544)),f=n(8591),c=n(8308),p=B(n(5948)),v=B(n(15)),y=B(n(12)),m=B(n(29)),_=B(n(61)),h=B(n(55)),E=B(n(8319)),g=B(n(5828)),S=B(n(149)),O=B(n(159)),I=B(n(8320)),T=B(n(5686)),C=B(n(47)),b=B(n(24)),M=B(n(13)),N=B(n(96)),A=n(5944),P=B(n(362)),R=n(290),L=B(n(5936)),D=n(8626),w=n(8513),j=n(9545),k=n(1),U=B(n(6)),G=B(n(7567)),F=B(n(7363));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){x(o,r,a,i,l,"next",e)}function l(e){x(o,r,a,i,l,"throw",e)}i(void 0)}))}}function W(){return(W=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}).apply(this,arguments)}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function z(e){M.default.track(k.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:null!=e.guild_id?k.AnalyticsPages.GUILD_CHANNEL:k.AnalyticsPages.DM_CHANNEL,location_section:k.AnalyticsSections.STICKER_POPOUT}),u.default.open(k.UserSettingsSections.PREMIUM)}function K(e){var t=e.sticker,n=e.description;return Y(h.default,{},void 0,Y(L.default,{sticker:t,size:48,isInteracting:!0}),Y(h.default,{direction:h.default.Direction.VERTICAL,justify:h.default.Justify.CENTER,className:F.default.truncatingText},void 0,Y(b.default,{className:F.default.emojiName,size:b.default.Sizes.SIZE_16},void 0,Y(E.default,{},void 0,t.name)),null!=n&&Y(b.default,{},void 0,n)))}K.displayName="StickerPopoutHeading";var $=function(e){var t=e.closePopout,n=e.sticker,r=e.channel,o=e.refreshPositionKey,l=(0,i.useStateFromStoresArray)([P.default],(function(){return[P.default.getStickerPack(n.pack_id),!P.default.hasLoadedStickerPacks,P.default.isPremiumPack(n.pack_id)]}),[n]),u=l[0],d=l[1],f=l[2],p=(0,i.useStateFromStores)([y.default],(function(){return y.default.getCurrentUser()}),[]),v=function(e){var t=e.sticker,n=e.stickerPack;return a.useMemo((function(){return null==n?[]:n.stickers.slice(0,4).reduce((function(e,n){return 3!==e.length&&n.id!==t.id?e.concat(n):e}),[])}),[t,n])}({sticker:n,stickerPack:u});(0,A.useFetchStickerPack)(n.pack_id);var h=(0,A.useFilteredStickerPackCategories)(r);if(a.useEffect((function(){o()}),[d]),a.useEffect((function(){M.default.track(k.AnalyticEvents.OPEN_POPOUT,W({type:k.AnalyticsSections.STICKER_POPOUT,guild_id:r.getGuildId(),sticker_pack_id:n.pack_id},(0,s.collectChannelAnalyticsMetadata)(r)))}),[n.pack_id]),d||null==u)return Y(c.PopoutLoadingAnimation,{className:G.default.popoutLoader});var E=N.default.isPremium(p,k.PremiumTypes.TIER_2),S=f&&E,O=function(){S?((0,j.navigateToOwnedStickerPack)({stickerPack:u,stickerPickerCategories:h}),t()):null!=u&&((0,w.openStickerPackViewAllModal)({stickerPack:u,sourceSticker:n,analyticsLocation:{section:k.AnalyticsSections.STICKER_POPOUT}}),t())};return Y(c.MessagePopoutContent,{className:G.default.popoutContent},void 0,Y(C.default,{className:G.default.packName,onClick:O},void 0,n.name),Y("p",{className:G.default.packDescription},void 0,function(e,t,n){return t?n?U.default.Messages.STICKER_POPOUT_PACK_INFO_PREMIUM.format({stickerPackName:e.name}):U.default.Messages.STICKER_POPOUT_PACK_INFO_NONPREMIUM:U.default.Messages.STICKER_POPOUT_PACK_INFO_UNAVAILABLE.format({stickerPackName:e.name})}(u,f,E)),Y("ul",{className:G.default.stickersList},void 0,v.map((function(e){return Y(_.default,{onClick:O,className:G.default.stickerWrapper},e.id,Y(L.default,{isInteracting:!0,size:80,sticker:e}))}))),f&&Y("div",{className:G.default.packActions},void 0,!E&&Y(g.default,{className:G.default.premiumButton,color:m.default.Colors.GREEN,innerClassName:G.default.premiumButtonInner,size:m.default.Sizes.SMALL,onClick:function(){return(0,D.openStickerPackPremiumUpsellModal)({section:k.AnalyticsSections.STICKER_POPOUT})}},void 0,Y(T.default,{className:G.default.premiumButtonNitroWheel}),U.default.Messages.STICKER_PACK_AVAILABLE_WITH_PREMIUM),Y(m.default,{color:m.default.Colors.PRIMARY,size:m.default.Sizes.SMALL,onClick:O},"view-sticker-pack",U.default.Messages.STICKER_VIEW_MORE_STICKERS)))};$.displayName="StandardStickerMessagePopout";var Z=function(e){var t=e.sticker,n=e.channel,r=e.closePopout,u=e.refreshPositionKey,E=a.useState(null),g=E[0],T=E[1],C=a.useState(!1),A=C[0],P=C[1],R=y.default.getCurrentUser(),D=N.default.isPremium(R,k.PremiumTypes.TIER_2),w=(0,i.useStateFromStores)([v.default],(function(){return v.default.getGuild(t.guild_id)})),j=null!=w,B=a.useState(!1),H=B[0],x=B[1],$=a.useState(null),Z=$[0],q=$[1],X=a.useMemo((function(){return{page:null!=n.guild_id?k.AnalyticsPages.GUILD_CHANNEL:k.AnalyticsPages.DM_CHANNEL,section:k.AnalyticsSections.STICKER_POPOUT}}),[n.guild_id]),J=a.useRef(W({guild_id:n.getGuildId()},(0,s.collectChannelAnalyticsMetadata)(n))).current;a.useEffect((function(){(function(){var e=V(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null==w||w.hasFeature(k.GuildFeatures.DISCOVERABLE))){e.next=6;break}return e.next=4,(0,d.default)(t.id);case 4:n=e.sent,T(n);case 6:P(!0);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[t.id,j]);var Q,ee=t.guild_id===n.getGuildId(),te=null!=g,ne=!1,re="Custom Sticker Popout";D?Q=j?ee?U.default.Messages.STICKER_POPOUT_PREMIUM_CURRENT_GUILD_DESCRIPTION:U.default.Messages.STICKER_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION:te?U.default.Messages.STICKER_POPOUT_PREMIUM_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION:U.default.Messages.STICKER_POPOUT_PREMIUM_UNJOINED_PRIVATE_GUILD_DESCRIPTION:j?ee?(Q=U.default.Messages.STICKER_POPOUT_CURRENT_GUILD_DESCRIPTION,ne=!0,re="Custom Sticker Popout (Upsell)"):(Q=U.default.Messages.STICKER_POPOUT_JOINED_GUILD_DESCRIPTION,ne=!0,re="Custom Sticker Popout (Upsell)"):te?(Q=U.default.Messages.STICKER_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION,ne=!0,re="Custom Sticker Popout (Upsell)"):(Q=U.default.Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format({openPremiumSettings:function(){z(n),r()}}),re="Custom Sticker Popout (Soft Upsell)");var ae,oe=!ne&&!j&&te&&D;if(a.useEffect((function(){u()}),[A,g]),a.useEffect((function(){M.default.track(k.AnalyticEvents.OPEN_POPOUT,W({type:re},J))}),[]),A){return Y(c.MessagePopoutContent,{className:F.default.popoutContent},void 0,(ae=function(){var e=V(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=g&&!j){e.next=2;break}return e.abrupt("return");case 2:return r(),t=g.id,e.prev=4,e.next=7,l.default.joinGuild(t);case 7:l.default.transitionToGuildSync(t),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(4);case 12:case"end":return e.stop()}}),e,null,[[4,10]])})));return function(){return e.apply(this,arguments)}}(),Y("div",{className:F.default.emojiSection},void 0,Y(K,{description:Q,sticker:t}),ne&&Y(p.default,{className:F.default.ctaButton,subscriptionTier:k.PremiumSubscriptionSKUs.TIER_2,size:m.default.Sizes.SMALL,fullWidth:!0,buttonText:U.default.Messages.EMOJI_POPOUT_PREMIUM_CTA,onSubscribeModalClose:function(e){return e?ae():r()},postSuccessGuild:j||null==g?void 0:g,premiumModalAnalyticsLocation:X}),oe&&Y(m.default,{size:m.default.Sizes.SMALL,className:F.default.ctaButton,fullWidth:!0,onClick:ae},void 0,U.default.Messages.GUILD_PROFILE_JOIN_SERVER_BUTTON))),(null!=w||null!=g)&&function(){var e,n;if(te||j){var r=(null!==(e=null==g?void 0:g.stickers)&&void 0!==e?e:[]).slice(0,13).filter((function(e){return e.id!==t.id})).slice(0,12);return Y("div",{className:F.default.guildSection},void 0,Y(O.default,{className:F.default.guildTitle},void 0,j?U.default.Messages.STICKER_POPOUT_JOINED_GUILD_EMOJI_DESCRIPTION:U.default.Messages.STICKER_POPOUT_UNJOINED_GUILD_EMOJI_DESCRIPTION),Y(f.GuildDetails,{guild:null!=g?g:w}),!j&&a.createElement(a.Fragment,null,Y(_.default,{onClick:function(){u(),x(!H)},className:F.default.showMoreEmojis},void 0,Y(h.default,{},void 0,Y(b.default,{className:F.default.showMoreEmojisLabel,size:b.default.Sizes.SIZE_12,color:b.default.Colors.CUSTOM},void 0,U.default.Messages.STICKER_POPOUT_SHOW_MORE_STICKERS),Y(I.default,{className:(0,o.default)(F.default.showMoreEmojisArrow,(n={},n[F.default.showMoreEmojisArrowCollapsed]=!H,n))}))),H&&Y(h.default,{wrap:h.default.Wrap.WRAP,align:h.default.Align.START,justify:h.default.Justify.START,className:F.default.otherEmojisContainer},void 0,r.map((function(e){return a.createElement(S.default,W({key:e.id,text:e.name},c.EXPRESSION_TOOLTIP_PROPS),(function(t){var n,r=t.onMouseEnter,i=t.onMouseLeave,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["onMouseEnter","onMouseLeave"]);return a.createElement("div",W({key:e.id,className:(0,o.default)(F.default.otherEmoji,(n={},n[G.default.nonInteractingSticker]=null==Z||Z===e.id,n)),onMouseEnter:function(){null==r||r(),q(e.id)},onMouseLeave:function(){null==i||i(),q(null)}},l),Y(L.default,{size:32,enlargeOnInteraction:!0,enlargeWithName:!1,enlargeScaleFactor:2,isInteracting:Z===e.id,sticker:e}))}))})))))}}())}return Y(c.PopoutLoadingAnimation,{className:G.default.popoutLoader})};function q(e){var t=e.channel,n=e.closePopout,r=e.sticker;return Y(c.MessagePopoutContent,{className:G.default.popoutContent},void 0,Y(K,{sticker:r,description:U.default.Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format({openPremiumSettings:function(){n(),z(t)}})}))}q.displayName="UnavailableStickerPopout";var X=Y(c.PopoutLoadingAnimation,{}),J=function(e){var t=e.renderableSticker,n=e.channel,r=e.closePopout,a=e.refreshPositionKey,o=(0,A.useStickerForRenderableSticker)(t,!0),i=o[0],l=o[1];return null!=i&&(0,R.isStandardSticker)(i)?Y($,{sticker:i,closePopout:r,channel:n,refreshPositionKey:a}):null!=i&&(0,R.isGuildSticker)(i)?Y(Z,{sticker:i,channel:n,closePopout:r,refreshPositionKey:a}):l?l&&null==i?Y(q,{channel:n,closePopout:r,sticker:t}):(r(),null):X};t.default=J},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(14))&&r.__esModule?r:{default:r},o=n(701),i=n(1);var l=function(e){return a.default.get({url:i.Endpoints.STICKER_GUILD_DATA(e),oldFormErrors:!0}).then((function(e){return null!=(null==e?void 0:e.body)?(0,o.makeDiscoverableGuild)(e.body):null})).catch((function(){return null}))};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.navigateToOwnedStickerPack=function(e){var t=e.stickerPack,n=e.stickerPickerCategories;a.ComponentDispatch.dispatchToLastSubscribed(i.ComponentActions.OPEN_EXPRESSION_PICKER,{activeView:r.ExpressionPickerViewType.STICKER});var l=n.findIndex((function(e){return e.id===t.id}));-1!==l&&(0,o.setActiveCategoryIndex)(l)};var r=n(1218),a=n(121),o=n(8348),i=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=n(3),l=n(389),u=I(n(8397)),s=I(n(685)),d=n(42),f=I(n(10)),c=I(n(200)),p=I(n(61)),v=I(n(8903)),y=I(n(97)),m=I(n(8265)),_=n(392),h=I(n(746)),E=n(698),g=I(n(9548)),S=I(n(6)),O=I(n(7570));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e){var t=e.message,n=e.compact,r=(0,i.useStateFromStores)([f.default],(function(){return f.default.getChannel(t.id)}));return null==r?null:b(N,{channel:r,compact:n,isSystemMessage:(0,s.default)(t)})}function N(e){var t,n,r=e.channel,s=e.compact,f=e.isSystemMessage;var I=(0,i.useStateFromStores)([h.default],(function(){return h.default.getCount(r.id)})),T=function(e){var t,n=(0,i.useStateFromStores)([h.default],(function(){return h.default.getMostRecentMessage(e.id)})),r=(0,i.useStateFromStores)([h.default],(function(){return h.default.getCount(e.id)})),o=(0,i.useStateFromStores)([c.default],(function(){return c.default.lastMessageId(e.id)}));if(null===(t=e.threadMetadata)||void 0===t?void 0:t.archived)return a.createElement(a.Fragment,null,b("span",{className:O.default.archivedText},void 0,S.default.Messages.THREAD_ARCHIVED),b(v.default,{className:O.default.clock,width:14,height:14}));if(!r)return S.default.Messages.NO_THREAD_MESSAGES;if(null==n)return a.createElement(a.Fragment,null,b("span",{},void 0,S.default.Messages.NO_RECENT_THREAD_MESSAGES),b("span",{className:O.default.timestamp},void 0,(0,E.getTimestampString)(y.default.extractTimestamp(o))));return a.createElement(a.Fragment,null,b(g.default,{message:n,channel:e}),b("span",{className:O.default.timestamp},void 0,(0,E.getTimestampString)(y.default.extractTimestamp(o))))}(r);return a.createElement(a.Fragment,null,b("div",{className:(0,o.default)(O.default.spine,(t={},t[O.default.cozy]=!s,t[O.default.systemMessageSpine]=f,t))}),b(p.default,{onClick:function(e){e.shiftKey?(0,d.transitionToGuild)(r.guild_id,r.id):m.default.openThreadSidebarForViewing(r)},onContextMenu:function(e){(0,l.openContextMenu)(e,(function(e){return a.createElement(u.default,C({channel:r},e))}))},className:(0,o.default)(O.default.container,(n={},n[O.default.systemMessageContainer]=f,n))},void 0,b("div",{className:O.default.topLine},void 0,b("span",{className:O.default.name},void 0,r.name),b("span",{className:O.default.cta},void 0,I?I>=_.MAX_THREAD_MESSAGE_COUNT?S.default.Messages.THREAD_MESSAGE_COUNT_MAX:S.default.Messages.THREAD_MESSAGE_COUNT.format({count:I}):S.default.Messages.SEE_THREAD)),b("span",{className:(0,o.default)(O.default.bottomLine)},void 0,T)))}M.displayName="ThreadMessageAccessories"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n;if(null==e.threadMetadata)return 0;var o=null!==(t=r.default.lastMessageId(e.id))&&void 0!==t?t:e.id,i=a.default.extractTimestamp(o),l=e.threadMetadata.archiveTimestamp?new Date(e.threadMetadata.archiveTimestamp).getTime():0,u=60*(null===(n=e.threadMetadata)||void 0===n?void 0:n.autoArchiveDuration)*1e3;return Math.max(i,l)+u};var r=o(n(200)),a=o(n(97));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(8298),l=c(n(8361)),u=c(n(8640)),s=c(n(70)),d=n(8442),f=c(n(7341));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.message,n=e.channel,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.isBlocked(t.author.id)})),c=a.useMemo((function(){var e;return(e={})[n.guild_id]=[t.author.id],e}),[n.guild_id,t.author.id]);(0,i.useSubscribeGuildMembers)(c);var p=a.useMemo((function(){return t.content?(0,l.default)(t,{formatInline:!0}).content:null}),[t]);return v("div",{className:f.default.threadMessageAccessory},void 0,v("img",{alt:"",src:t.author.getAvatarURL(n.guild_id),className:f.default.threadMessageAccessoryAvatar}),v(u.default,{message:t,compact:!0}),v("div",{className:f.default.threadMessageAccessoryPreview},void 0,function(e,t,n){var r=(0,d.renderSingleLineMessage)(e,t,n,f.default.threadMessageAccessoryContent,f.default.threadMessageAccessoryContentIcon),o=r.contentPlaceholder,i=r.renderedContent,l=r.icon;return a.createElement(a.Fragment,null,null!=i?i:v("span",{className:f.default.threadMessageAccessoryPlaceholder},void 0,o),l)}(t,p,r)))}y.displayName="ThreadMessageAccessoryMessage"},function(e,t,n){e.exports=n.p+"302f8a6d450ff3029c8cf2b49bb22302.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return null!=t&&!!e.mentions.includes(t.author.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8517),i=s(n(5945)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.poster,n=e.src,r=e.width,o=e.height,u=e.naturalWidth,s=e.naturalHeight,d=e.play,f=void 0===d||d,p=e.className,v=a.useRef(null);return a.useEffect((function(){var e=v.current;null!=e&&(f?e.play():e.pause())}),[f]),u<=l.MAX_VIDEO_WIDTH&&s<=l.MAX_VIDEO_HEIGHT||u<=l.MAX_VIDEO_HEIGHT&&s<=l.MAX_VIDEO_WIDTH?a.createElement(i.default,{ref:v,className:p,poster:t,src:n,width:r,height:o,muted:!0,loop:!0,autoPlay:f,preload:"none"}):c("img",{alt:"",src:t,width:r,height:o})}function v(e){var t=e.src,n=e.poster,r=e.naturalWidth,a=e.naturalHeight,i=e.autoPlay,l=e.className,s=e.playable,d=void 0===s||s,v=e.renderImageComponent,y=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["src","poster","naturalWidth","naturalHeight","autoPlay","className","playable","renderImageComponent"]);return c(o.GIFAccessoryContext.Consumer,{},void 0,(function(e){return v(f({},y,{alt:u.default.Messages.GIF,src:n,className:l,autoPlay:i,animated:d,renderAccessory:e,tabIndex:d?0:-1,children:function(e){var n=e.src,o=e.size,i=e.animating;return c(p,{className:l,poster:n,src:t,width:o.width,height:o.height,naturalWidth:r,naturalHeight:a,play:d&&i})}}))}))}p.displayName="Video",v.displayName="LazyGIFV"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8475)),o=l(n(6)),i=l(n(7572));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.message,n=e.onDeleteMessage;return s("div",{className:i.default.ephemeralMessage,onClick:function(e){return e.stopPropagation()}},void 0,s(a.default,{className:i.default.icon,width:16,height:16}),o.default.Messages.ONLY_YOU_CAN_SEE_AND_DELETE_THESE.format({count:1,countMessages:1,handleDelete:function(){n(t,!0)}}))}d.displayName="EphemeralAccessories"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=n(8594),l=m(n(8904)),u=m(n(61)),s=n(8593),d=m(n(8467)),f=n(8517),c=m(n(255)),p=n(1),v=m(n(6)),y=m(n(7574));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=/\.(mp4|webm|mov)$/i,S=/\.(mp3|m4a|ogg|wav|flac)$/i,O=function(e){var t=e.attachment,n=e.inlineMedia,r=e.autoPlayGif,a=e.onClick,o=e.onContextMenu,u=e.renderImageComponent,d=e.renderVideoComponent,c=e.renderAudioComponent,v=e.renderPlaintextFilePreview,y=e.className,m=e.focusable,_=t.filename,h=t.width,O=t.height,I=s.PlaintextFilePreviewExperiment.useExperiment({})[0].enabled;return n&&null!=h&&h>0&&null!=O&&O>0?p.IMAGE_RE.test(_)?E(f.GIFAccessoryContext.Consumer,{},void 0,(function(e){return u({alt:"",src:t.proxy_url||t.url,original:t.url,width:h,height:O,autoPlay:r,onClick:a,onContextMenu:o,renderAccessory:e,className:y,shouldLink:m})})):g.test(_)&&null!=t.proxy_url?d({poster:t.proxy_url+"?format=jpeg",fileSize:t.size,fileName:t.filename,src:t.url,width:h,height:O,onClick:a,onContextMenu:o,naturalWidth:h,naturalHeight:O,className:y,playable:m}):null:null!=n&&S.test(_)&&null!=t.url?c({fileSize:t.size,fileName:t.filename,src:t.url,className:y,playable:m}):I&&null!=t.url&&(0,i.isPlaintextPreviewableFile)(_)?v({attachment:t,className:y}):E(l.default,{url:t.url,filename:t.filename,size:t.size,onClick:a,onContextMenu:o,className:y})};O.displayName="AttachmentContent";var I=E(c.default,{width:16,height:16}),T=function(e){var t=e.className,n=e.attachment,r=e.onRemoveAttachment,i=e.canRemoveAttachment,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className","attachment","onRemoveAttachment","canRemoveAttachment"]),s=n.width,f=n.height,c=n.spoiler,p=null!=s&&s<200||null!=f&&f<50,m=function(e){var s;return void 0===e&&(e=!1),E("div",{className:y.default.messageAttachment},void 0,a.createElement(O,h({},l,{attachment:n,className:(0,o.default)(t,(s={},s[y.default.spoiler]=c&&!p,s[y.default.hiddenSpoilers]=c&&e,s[y.default.inline]=c&&p,s)),focusable:!e})),i&&E(u.default,{className:y.default.removeAttachmentButton,focusProps:{offset:{bottom:4}},onClick:function(){return r(n)},"aria-label":v.default.Messages.REMOVE_MESSAGE_ATTACHMENT},void 0,I))};return c?E(d.default,{type:d.default.Types.ATTACHMENT,inline:p},void 0,(function(e){return m(e)})):m()};t.default=T},function(e,t,n){var r={"./icon-file-acrobat.svg":9555,"./icon-file-ae.svg":9556,"./icon-file-ai.svg":9557,"./icon-file-archive.svg":9558,"./icon-file-audio.svg":9559,"./icon-file-code.svg":9560,"./icon-file-document.svg":9561,"./icon-file-image.svg":9562,"./icon-file-ps.svg":9563,"./icon-file-sketch.svg":9564,"./icon-file-spreadsheet.svg":9565,"./icon-file-unknown.svg":9566,"./icon-file-video.svg":9567,"./icon-file-webcode.svg":9568};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=9554},function(e,t,n){e.exports=n.p+"aee87e981ef9acae845ef397c7a034c5.svg"},function(e,t,n){e.exports=n.p+"f8e80ba7587764ddfa27aa1e02c6ed54.svg"},function(e,t,n){e.exports=n.p+"f1141359084b3b61f3a41adbe541fdbb.svg"},function(e,t,n){e.exports=n.p+"4f27cbf7f975daa32fe7c8dec19ce2de.svg"},function(e,t,n){e.exports=n.p+"7674eb0d869afebca7b1f3a5202506c6.svg"},function(e,t,n){e.exports=n.p+"d6bb78c1d64640ad06cc8cdd1c61b67d.svg"},function(e,t,n){e.exports=n.p+"3c2ce4428c2c44824b07162f648524f5.svg"},function(e,t,n){e.exports=n.p+"2930628f6ae15f3332f9d06e4c967a89.svg"},function(e,t,n){e.exports=n.p+"06d2bb1aa36f4ded097cc069df5ee305.svg"},function(e,t,n){e.exports=n.p+"318ce2f97a8bd1d7a693938d9aff5f08.svg"},function(e,t,n){e.exports=n.p+"1939fe07993a754364bf3fee5223428d.svg"},function(e,t,n){e.exports=n.p+"66084381f55f4238d69e5cbe3b8dc42e.svg"},function(e,t,n){e.exports=n.p+"81d1e0f3ad7aa06b1a82da2492cf8699.svg"},function(e,t,n){e.exports=n.p+"557b6b6b982a8c2b2c97048b86e2e6c3.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.code,n=e.author,r=e.getAcceptInviteContext,h=(0,o.useStateFromStoresObject)([c.default],(function(){return{invite:c.default.getInvite(t),inviteError:c.default.getInviteError(t)}}),[t]),O=h.invite,I=h.inviteError;a.useEffect((function(){null==O&&i.default.resolveInvite(t)}),[t]);var b=null!=O?O:{state:S.InviteStates.RESOLVING,code:""},M=(0,o.useStateFromStores)([f.default],(function(){return null!=(null==O?void 0:O.guild)?f.default.getGuild(O.guild.id):null}),[O]),N=(0,o.useStateFromStores)([d.default],(function(){return d.default.getId()})),A=function(){null!=b.channel&&i.default.transitionToInviteSync(b)},P=function(){(0,u.isAtGuildCapAndNonPremium)()?(0,s.default)({analyticsSource:{page:S.AnalyticsPages.INVITE_EMBED},analyticsLocation:{page:S.AnalyticsPages.INVITE_EMBED,section:S.AnalyticsSections.GUILD_CAP_UPSELL_MODAL}}):i.default.acceptInvite(t,r("Invite Button Embed"),(function(){A()}))};switch(b.state){case S.InviteStates.RESOLVING:return C;case S.InviteStates.EXPIRED:case S.InviteStates.BANNED:return T(_.default,{banned:b.state===S.InviteStates.BANNED,author:n});case S.InviteStates.ERROR:return T(v.default,{author:n,inviteError:I});default:return b.target_type===l.InviteTargetTypes.STREAM?T(g.default,{onTransitionToInviteChannel:A,onAcceptInstantInvite:P,currentUserId:N,guild:M,invite:b}):b.target_type===l.InviteTargetTypes.EMBEDDED_APPLICATION?T(p.default,{invite:b,getAcceptInviteContext:r}):null!=b.channel&&b.channel.type===S.ChannelTypes.GROUP_DM?T(y.default,{onTransitionToInviteChannel:A,onAcceptInstantInvite:P,currentUserId:N,invite:b,author:n}):null!=b.stage_instance&&null!=b.guild?T(E.default,{stageInstance:b.stage_instance,guild:b.guild,isMember:null!=M,onTransitionToInviteChannel:A,onAcceptInstantInvite:P}):T(m.default,{onTransitionToInviteChannel:A,onAcceptInstantInvite:P,currentUserId:N,guild:M,invite:b,author:n})}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=O(n(1211)),l=n(481),u=n(8444),s=O(n(8445)),d=O(n(11)),f=O(n(15)),c=O(n(1174)),p=O(n(9572)),v=O(n(9573)),y=O(n(9574)),m=O(n(9575)),_=O(n(9576)),h=O(n(8446)),E=O(n(9577)),g=O(n(9578)),S=n(1);function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=T(h.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(473)),i=y(n(61)),l=n(8263),u=n(280),s=y(n(5953)),d=n(1),f=y(n(6)),c=y(n(7575)),p=y(n(6038)),v=y(n(9571));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){return function(t,n){return h(i.default,{className:c.default.learnMoreLink,tag:"span",onClick:function(){e(),o.default.open(d.UserSettingsSections.PREMIUM)}},n,t)}}function g(e){var t=e.guildCount,n=e.onClose,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["guildCount","onClose"]);return a.createElement(s.default,_({artURL:v.default,onClose:n,type:u.PremiumUpsellTypes.GUILD_CAP_MODAL_UPSELL,title:f.default.Messages.GUILD_CAP_UPSELL_MODAL_TITLE,body:t<d.MAX_USER_GUILDS?f.default.Messages.GUILD_CAP_UPSELL_MODAL_NEAR_LIMIT_BODY.format({guildCount:t,onAndMore:E(n),newBadgeHook:function(e,t){return h(l.TextBadge,{text:e,className:p.default.newBadge,color:d.Colors.BRAND},t)}}):f.default.Messages.GUILD_CAP_UPSELL_MODAL_AT_LIMIT_BODY.format({onAndMore:E(n),newBadgeHook:function(e,t){return h(l.TextBadge,{text:e,className:p.default.newBadge,color:d.Colors.BRAND},t)}}),premiumType:d.PremiumTypes.TIER_2},r))}g.displayName="PremiumGuildCapUpsell"},function(e,t,n){e.exports=n.p+"06f891af30f9a31efe5855164accc601.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(23)),i=n(3),l=S(n(1211)),u=n(156),s=S(n(294)),d=S(n(8646)),f=n(481),c=S(n(379)),p=S(n(162)),v=S(n(15)),y=n(29),m=S(n(8314)),_=S(n(149)),h=S(n(8446)),E=n(1),g=S(n(6));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(){return(I=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}).apply(this,arguments)}function T(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var b=C(h.default,{});function M(e){var t,n,r=e.invite,h=e.getAcceptInviteContext,S=r.target_type,O=r.target_application;(0,o.default)(S===f.InviteTargetTypes.EMBEDDED_APPLICATION&&null!=O,"invalid application invite");var M=(0,i.useStateFromStores)([v.default],(function(){return null!=r.guild?v.default.getGuild(r.guild.id):null}),[r]),N=c.default.createFromServer(O),A=(0,i.useStateFromStores)([s.default],(function(){return null!=(null==r?void 0:r.channel)&&null!=s.default.getSelfEmbeddedActivityForChannel(r.channel.id)})),P=(0,d.default)(null!==(t=null===(n=r.channel)||void 0===n?void 0:n.id)&&void 0!==t?t:"").some((function(e){var t=e.applicationId;return O.id===t})),R=r.state===E.InviteStates.ACCEPTING,L=null!=M;if(null==M){if(null==r.guild)return b;M=new p.default(r.guild)}var D,w=function(e){null!=r.channel&&l.default.transitionToInviteSync(r,void 0,e)},j=function(){return null};return L&&P?j=w:L||(j=function(e){l.default.acceptInvite(r.code,h("Invite Button Embed"),(function(){w(e)}))}),L&&(P?A&&(D=g.default.Messages.EMBEDDED_ACTIVITIES_ALREADY_IN_ACTIVITY):D=g.default.Messages.EMBEDDED_ACTIVITIES_INVITE_ACTIVITY_ENDED),C(m.default,{},void 0,C(m.default.Header,{text:g.default.Messages.INVITE_BUTTON_TITLE_INVITED_TO_PLAY}),C(m.default.Body,{},void 0,C(m.default.Icon,{guild:M,application:N,onClick:function(){return j(u.ActivityIntent.PLAY)}}),C(m.default.Info,{title:O.name,onClick:function(){return j(u.ActivityIntent.PLAY)}},void 0,g.default.Messages.INVITE_BUTTON_STREAMING_SUBTEXT.format({guildName:M.name})),C(_.default,{text:D},void 0,(function(e){var t=e.onClick,n=T(e,["onClick"]);return a.createElement(m.default.Button,I({onClick:function(){j(u.ActivityIntent.PLAY),null==t||t()}},n,{submitting:R,isDisabled:L&&(A||!P),color:y.ButtonColors.GREEN}),g.default.Messages.PLAY)})),C(_.default,{text:D},void 0,(function(e){var t=e.onClick,n=T(e,["onClick"]);return a.createElement(m.default.Button,I({onClick:function(){j(u.ActivityIntent.SPECTATE),null==t||t()}},n,{submitting:R,isDisabled:L&&(A||!P),color:y.ButtonColors.PRIMARY}),g.default.Messages.SPECTATE)}))))}M.displayName="EmbeddedApplicationInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=s(n(11)),i=s(n(8314)),l=n(8491),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=f(i.default.Icon,{expired:!0});function p(e){var t,n,r=e.author,s=e.inviteError,d=(0,a.useStateFromStores)([o.default],(function(){return o.default.getId()}))===r.id?u.default.Messages.INVITE_BUTTON_TITLE_INVITER_INVALID:u.default.Messages.INVITE_BUTTON_TITLE_INVITED_INVALID,p=(0,l.getDescriptiveInviteError)(null==s?void 0:s.code);return f(i.default,{},void 0,f(i.default.Header,{text:d}),f(i.default.Body,{},void 0,c,f(i.default.Info,{expired:!0,title:null!==(t=null==p?void 0:p.title)&&void 0!==t?t:u.default.Messages.INVITE_BUTTON_INVALID},void 0,null!==(n=null==p?void 0:p.description)&&void 0!==n?n:null==s?void 0:s.message)))}p.displayName="ErrorInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=p(n(31)),i=p(n(10)),l=p(n(12)),u=p(n(8314)),s=n(48),d=p(n(8446)),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y(d.default,{});function _(e){var t,n=e.invite,r=e.author,d=e.currentUserId,p=e.onTransitionToInviteChannel,v=e.onAcceptInstantInvite,_=d===r.id,h=n.state===f.InviteStates.ACCEPTING,E=(0,a.useStateFromStores)([i.default],(function(){return null!=n.channel?i.default.getChannel(n.channel.id):null}),[n]),g=null!=E;if(null==E){if(null==n.channel)return m;E=new o.default(n.channel),t=null!=n.channel&&null!=n.channel.recipients?n.channel.recipients:[]}else t=E.recipients.reduce((function(e,t){var n=l.default.getUser(t);return null!=n&&e.push(n),e}),[]),g&&t.push(l.default.getCurrentUser());var S=E.name;S||(S=t.length>0?t.filter(s.isNotNullish).map((function(e){return e.username})).join(", "):c.default.Messages.UNNAMED);var O=g?p:v,I=c.default.Messages.JOIN_GUILD,T=u.default.Button.Colors.GREEN;g&&(I=c.default.Messages.JOINED_GUILD,T=u.default.Button.Colors.PRIMARY);var C=c.default.Messages.INVITE_BUTTON_TITLE_INVITED_GROUP_DM;return _&&(C=c.default.Messages.INVITE_BUTTON_TITLE_INVITER_GROUP_DM),y(u.default,{},void 0,y(u.default.Header,{text:C}),y(u.default.Body,{},void 0,y(u.default.Icon,{channel:E,onClick:g?O:void 0}),y(u.default.Info,{title:S,onClick:g?O:void 0},void 0,y(u.default.Data,{members:t.length})),y(u.default.Button,{onClick:O,submitting:h,isDisabled:g,color:T},void 0,I)))}_.displayName="GroupDMInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(8720)),i=y(n(31)),l=y(n(162)),u=y(n(8314)),s=n(41),d=y(n(24)),f=y(n(8446)),c=n(1),p=y(n(6)),v=y(n(7576));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_(f.default,{});function E(e){var t,n=e.onTransitionToInviteChannel,r=e.onAcceptInstantInvite,f=e.guild,y=e.invite,m=e.author,E=e.currentUserId===m.id,g=y.channel,S=y.approximate_member_count,O=y.approximate_presence_count,I=y.state===c.InviteStates.ACCEPTING,T=null!=g?new i.default(g):null,C=null!=f,b=null!=T,M=null!=T&&T.type===c.ChannelTypes.GUILD_VOICE;if(null==f){if(null==y.guild)return h;f=new l.default(y.guild)}var N,A,P,R=C?n:r;return A=E?f.hasFeature(c.GuildFeatures.HUB)?p.default.Messages.HUB_INVITE_BUTTON_TITLE_INVITER:p.default.Messages.INVITE_BUTTON_TITLE_INVITER:f.hasFeature(c.GuildFeatures.HUB)?p.default.Messages.HUB_INVITE_BUTTON_TITLE_INVITED:p.default.Messages.INVITE_BUTTON_TITLE_INVITED,null!=f&&(P=_(u.default.GuildName,{guild:f})),(null===(t=f)||void 0===t?void 0:t.hasFeature(c.GuildFeatures.HUB))&&(A=E?p.default.Messages.INVITE_BUTTON_TITLE_INVITER_HUB:p.default.Messages.INVITE_BUTTON_TITLE_INVITED_HUB),M?(A=E?p.default.Messages.INVITE_BUTTON_TITLE_INVITER_VOICE_CHANNEL:p.default.Messages.INVITE_BUTTON_TITLE_INVITED_VOICE_CHANNEL,P=_(u.default.Channel,{channel:T}),N=p.default.Messages.INVITE_BUTTON_BODY_IN_GUILD.format({guildName:f.name})):null!=S&&S>=5||null!=O&&O>0?N=_(u.default.Data,{members:S,membersOnline:O}):b&&(N=_(u.default.Channel,{channel:T,guild:f})),_(u.default,{},void 0,_(u.default.Header,{text:A}),_(u.default.Body,{},void 0,_(u.default.Icon,{guild:f}),_(u.default.Info,{title:P,onClick:C?R:null},void 0,N),_(u.default.Button,{onClick:R,submitting:I,color:u.default.Button.Colors.GREEN},void 0,M?p.default.Messages.INVITE_VOICE_CHANNEL_JOIN:C?p.default.Messages.JOINED_GUILD:p.default.Messages.JOIN_GUILD)),f.hasFeature(c.GuildFeatures.HUB)&&a.createElement(a.Fragment,null,_("div",{className:v.default.separator}),_(d.default,{size:d.default.Sizes.SIZE_14,color:d.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.HUB_INVITE_ANOTHER_SCHOOL_LINK.format({onClick:function(){return(0,s.openModal)((function(e){return a.createElement(o.default,e)}))}}))))}E.displayName="GuildInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=p(n(8406)),i=p(n(11)),l=p(n(36)),u=p(n(160)),s=p(n(8314)),d=n(121),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y(s.default.Icon,{expired:!0});function _(e){var t,n,r,p=e.author,v=e.banned,_=(0,a.useStateFromStores)([i.default],(function(){return i.default.getId()})),h=(0,a.useStateFromStores)([l.default],(function(){return l.default.getChannelId()}));return _===p.id?(t=c.default.Messages.INVITE_BUTTON_INVALID_OWNER,r=c.default.Messages.INVITE_BUTTON_TITLE_INVITER_INVALID):(r=c.default.Messages.INVITE_BUTTON_TITLE_INVITED_INVALID,v?t=c.default.Messages.INSTANT_INVITE_BANNED_INFO:p&&p.username?(t=c.default.Messages.INSTANT_INVITE_ASK_USER_FOR_NEW_INVITE.format({username:p.username}),n=y(s.default.Button,{onClick:function(){var e=p.username,t=p.discriminator,n="@"+e;u.default.hidePersonalInformation||(n+="#"+t),d.ComponentDispatch.dispatchToLastSubscribed(f.ComponentActions.INSERT_TEXT,{content:n}),null!=h&&o.default.startTyping(h)}},void 0,c.default.Messages.MENTION)):t=c.default.Messages.INSTANT_INVITE_ASK_FOR_NEW_INVITE),y(s.default,{},void 0,y(s.default.Header,{text:r}),y(s.default.Body,{},void 0,m,y(s.default.Info,{expired:!0,title:c.default.Messages.INVITE_BUTTON_INVALID},void 0,t),n))}_.displayName="InvalidInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(8567)),o=i(n(8314));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(e){var t=e.stageInstance,n=e.guild,r=e.isMember,i=e.onTransitionToInviteChannel,l=e.onAcceptInstantInvite,s=r?i:l;return u(o.default,{},void 0,u(a.default,{isEmbed:!0,stageInstance:t,guild:n,onClick:s}))};s.displayName="StageInvite";var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(23)),o=n(3),i=n(481),l=y(n(31)),u=y(n(162)),s=y(n(163)),d=y(n(107)),f=y(n(8314)),c=y(n(8446)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_(c.default,{});function E(e){var t=e.invite,n=e.currentUserId,r=e.guild,c=e.onTransitionToInviteChannel,y=e.onAcceptInstantInvite,m=(0,o.useStateFromStores)([d.default],(function(){return d.default.getGuildId()})),E=(0,o.useStateFromStores)([s.default],(function(){return null!=t&&null!=t.target_user?s.default.getActiveStreamForUser(t.target_user.id):null}),[t]),g=(0,o.useStateFromStores)([s.default],(function(){return null!=t&&null!=t.target_user?s.default.getStreamForUser(t.target_user.id):null}),[t]),S=null!=t&&t.target_type===i.InviteTargetTypes.STREAM&&null!=t.target_user&&null!=E,O=null!=t&&null!=g&&null!=t.channel&&null!=t.guild&&g.channelId===t.channel.id&&g.guildId===t.guild.id;(0,a.default)(null!=t,"Invite cannot be null");var I=t.target_type,T=t.target_user;(0,a.default)(I===i.InviteTargetTypes.STREAM&&null!=T,"invalid streaming invite");var C=n===T.id,b=t.state===p.InviteStates.ACCEPTING,M=null!=r;if(null==r){if(null==t.guild)return h;r=new u.default(t.guild)}var N,A,P,R=null!=t.channel?new l.default(t.channel):null,L=S?c:y;M&&!O?P=C?v.default.Messages.INVITE_BUTTON_STREAM_ENDED_STREAMER:v.default.Messages.INVITE_BUTTON_STREAM_ENDED.format({name:T.username}):(N=v.default.Messages.WATCH,A=f.default.Button.Colors.GREEN,S&&(N=v.default.Messages.INVITE_BUTTON_STREAM_WATCHING,A=f.default.Button.Colors.PRIMARY),P=C?v.default.Messages.INVITE_BUTTON_STREAMER:v.default.Messages.INVITE_BUTTON_STREAMING.format({name:T.username}));var D=m===r.id&&R?_(f.default.Channel,{channel:R}):v.default.Messages.INVITE_BUTTON_STREAMING_SUBTEXT.format({guildName:r.name});return _(f.default,{},void 0,_(f.default.Header,{text:v.default.Messages.INVITE_BUTTON_TITLE_STREAMING}),_(f.default.Body,{},void 0,_(f.default.Icon,{guild:r,onClick:M&&O?L:void 0}),_(f.default.Info,{title:P,onClick:M&&O?L:void 0},void 0,D),O?_(f.default.Button,{disabled:M&&!O,onClick:L,submitting:b,isDisabled:S&&O,color:A},void 0,N):null))}E.displayName="StreamingInvite"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(8905)),i=n(293),l=n(1264),u=c(n(11)),s=c(n(256)),d=n(1),f=c(n(7580));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){return null!=e.application?e.application:null!=e.activity&&null!=e.activity.party_id&&(0,i.isSpotifyParty)(e.activity.party_id)?l.SpotifyApplication:void 0}var m=function(e){var t=e.channel,n=e.message,r=e.hideParty,i=(0,a.useStateFromStores)([u.default],(function(){return u.default.getId()})),l=(0,a.useStateFromStores)([s.default],(function(){if(null!=n.application){var e,r=n.author.id;return(null===(e=n.activity)||void 0===e?void 0:e.type)===d.ActivityActionTypes.JOIN_REQUEST&&(r=r===i?t.getRecipientId():i),s.default.getApplicationActivity(r,n.application.id)}return s.default.findActivity(n.author.id,(function(e){return e.type===d.ActivityTypes.LISTENING}))}),[n,t,i]);return v(o.default,{className:f.default.container,activity:l,activityActionType:null!=n.activity?n.activity.type:null,partyId:null!=n.activity?n.activity.party_id:null,userId:n.author.id,application:y(n),message:n,channelId:t.id,guildId:t.getGuildId(),hideParty:r,isSender:n.author.id===i})};m.displayName="MessageActivityInvite";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(29)),i=u(n(149)),l=n(8601);function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(){return(f=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}).apply(this,arguments)}function c(e){var t=e.activity,n=e.user,r=e.source,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["activity","user","source"]),s=(0,l.useSpotifyJoinAction)(t,n,r),c=s.label,p=s.tooltip,v=s.loading,y=s.disabled,m=s.onClick;return d(i.default,{text:p},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return a.createElement(o.default,f({},u,{color:y?o.default.Colors.GREY:o.default.Colors.GREEN,onClick:m,onMouseEnter:t,onMouseLeave:n,disabled:!v&&y,submitting:v}),c)}))}c.displayName="SpotifyJoinButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=M(n(399)),l=M(n(1309)),u=M(n(1277)),s=n(293),d=M(n(8264)),f=M(n(89)),c=M(n(93)),p=n(252),v=M(n(271)),y=M(n(29)),m=M(n(61)),_=M(n(55)),h=M(n(278)),E=M(n(8824)),g=M(n(149)),S=M(n(8409)),O=M(n(8745)),I=M(n(279)),T=n(1),C=M(n(6)),b=M(n(7579));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,L(e,t)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var D=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderUserPopout=function(e){var n=t.props,r=n.renderUserPopout,a=n.member;return a.unknownUser?null:r(a.user,e)},t}return R(t,e),t.prototype.render=function(){var e=this.props,t=e.member,n=e.className,r=e.guildId;return P(h.default,{renderPopout:this.renderUserPopout,position:h.default.Positions.LEFT,preload:function(){return(0,d.default)(t.user.id,t.user.getAvatarURL(r))}},void 0,(function(e){return P(g.default,{text:t.unknownUser?null:t.nick||t.user.username},void 0,(function(i){return a.createElement(m.default,A({className:t.unknownUser?b.default.partyMember:b.default.partyMemberKnown},i,e),P(I.default,{src:t.user.getAvatarURL(r),size:I.default.Sizes.SIZE_24,className:(0,o.default)(b.default.partyAvatar,n),"aria-label":t.user.username}))}))}))},t}(a.PureComponent);D.displayName="PartyMember";var w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleJoin=function(){var e=t.props.onJoin;e&&e()},t.handleInvite=function(){var e=t.props.onInvite;e&&e()},t.handleSync=function(){var e=t.props.onSync;e&&e()},t.handleDownloadApp=function(){var e=t.props.onDownloadApp;e&&e()},t.handleOpenSpotifyTrack=function(){var e=t.props,n=e.activity,r=e.onOpenSpotifyTrack;null!=n&&r&&r(n)},t.handleOpenSpotifyArtist=function(e){var n=t.props,r=n.activity,a=n.onOpenSpotifyArtist,o=n.message;null!=r&&null!=o&&a&&a(r,o.author.id,e)},t.handleOpenSpotifyAlbum=function(){var e=t.props,n=e.activity,r=e.onOpenSpotifyAlbum,a=e.message;null!=n&&null!=a&&r&&r(n,a.author.id)},t.renderUser=function(e,n,r){var a=t.props,i=a.renderUserPopout,l=a.guildId;return null!=e?P(D,{member:e,renderUserPopout:i,className:n,guildId:l},r):P("div",{className:(0,o.default)(b.default.partyMemberEmpty,n)},r)},t}R(t,e);var n=t.prototype;return n.isDeadInvite=function(){var e=this.props,t=e.isPreview,n=e.message,r=e.activity,a=e.applicationId;return!t&&!(null!=n&&(0,l.default)(r,n,a))},n.getPartySize=function(){var e=this.props.activity;return null==e||null==e.party||null==e.party.size||e.party.size.length<2?[-1,-1]:e.party.size},n.getActionableMode=function(){return[T.ActivityActionTypes.LISTEN,T.ActivityActionTypes].includes(this.props.activityActionType)||this.props.isPreview||this.canJoin()?"Actionable":"NotActionable"},n.isInParty=function(){var e=this.props,t=e.activity,n=e.myPartyId;return!e.isPreview&&null!=t&&null!=t.party&&n===t.party.id},n.isPartyFull=function(){var e=this.getPartySize(),t=e[0],n=e[1];return t>-1&&t>=n},n.hasPartySize=function(){var e=this.getPartySize(),t=e[0],n=e[1];return t>-1&&n>-1},n.isActionType=function(e){return this.props.activityActionType===e},n.canJoin=function(){var e=this.props,t=e.activity,n=e.isPreview,r=e.isGameLaunchable,a=e.isInBrowser;return!!n||!(this.isDeadInvite()||!this.isActionType(T.ActivityActionTypes.JOIN)||!(0,i.default)(t,T.ActivityFlags.JOIN))&&(!(!this.hasPartySize()||this.isPartyFull())&&!(a||!r||this.isInParty()))},n.canSendInvite=function(){var e=this.props,t=e.activity;return!!e.isPreview||!(this.isDeadInvite()||!this.isActionType(T.ActivityActionTypes.JOIN_REQUEST)||!(0,i.default)(t,T.ActivityFlags.JOIN))&&!(!this.hasPartySize()||this.isPartyFull())},n.canSync=function(){var e=this.props,t=e.activity,n=e.isPreview,r=e.isSyncable,a=e.isInBrowser;return!!n||!(!this.isActionType(T.ActivityActionTypes.LISTEN)&&!this.isActionType(T.ActivityActionTypes.WATCH))&&(!(this.isDeadInvite()||!(0,i.default)(t,T.ActivityFlags.SYNC))&&!(a||!r||this.isInParty()))},n.getHelpdeskArticleURL=function(){var e=this.props.partyId;return null!=e&&(0,s.isSpotifyParty)(e)?T.HelpdeskArticles.SPOTIFY_CONNECTION:T.HelpdeskArticles.RICH_PRESENCE_INTRODUCTION},n.renderHeaderText=function(){var e=this.props,t=e.activityActionType,n=e.name;switch(t){case T.ActivityActionTypes.LISTEN:return C.default.Messages.INVITE_EMBED_INVITE_TO_LISTEN.format({name:n});case T.ActivityActionTypes.WATCH:return C.default.Messages.INVITE_EMBED_INVITE_TO_WATCH.format({name:n});case T.ActivityActionTypes.JOIN:return C.default.Messages.INVITE_EMBED_INVITE_TO_JOIN_GROUP;case T.ActivityActionTypes.JOIN_REQUEST:default:return C.default.Messages.INVITE_EMBED_ASK_TO_JOIN}},n.renderPartyStatus=function(){var e=this,t=this.props,n=t.activityActionType,r=t.isGameLaunchable,a=t.isSyncable,o=t.isPreview,i=t.isInBrowser,l=t.name,s=t.activity,d=this.getPartySize(),f=d[0],c=d[1];if(this.isDeadInvite())switch(n){case T.ActivityActionTypes.LISTEN:return C.default.Messages.INVITE_EMBED_LISTEN_HAS_ENDED;case T.ActivityActionTypes.WATCH:return C.default.Messages.INVITE_EMBED_WATCH_HAS_ENDED;case T.ActivityActionTypes.JOIN:case T.ActivityActionTypes.JOIN_REQUEST:default:return C.default.Messages.INVITE_EMBED_GAME_HAS_ENDED}if(i&&!o)switch(n){case T.ActivityActionTypes.JOIN:return C.default.Messages.INVITE_EMBED_JOIN_VIA_DESKTOP_APP}if(this.isActionType(T.ActivityActionTypes.LISTEN)||this.isActionType(T.ActivityActionTypes.WATCH)){if(null!=s&&null!=s.details&&null!=s.state&&(0,u.default)(s)){return[P("div",{className:b.default.details},"details",P(v.default,{className:b.default.textLink,onClick:this.handleOpenSpotifyTrack},void 0,s.details)),P("div",{className:b.default.state},"state",C.default.Messages.USER_ACTIVITY_LISTENING_ARTISTS.format({artists:s.state,artistsHook:function(t,n){return null!=s.state?P(E.default,{artists:s.state,linkClassName:b.default.textLink,canOpen:null!=s.sync_id,onOpenSpotifyArtist:e.handleOpenSpotifyArtist},n):null}}))]}return this.isActionType(T.ActivityActionTypes.LISTEN)?C.default.Messages.USER_ACTIVITY_LISTEN_ALONG:C.default.Messages.USER_ACTIVITY_WATCH_ALONG}return this.isActionType(T.ActivityActionTypes.JOIN_REQUEST)?this.isPartyFull()?C.default.Messages.INVITE_EMBED_FULL_GROUP:C.default.Messages.INVITE_EMBED_NUM_OPEN_SLOTS.format({number:c-f}):this.isInParty()?C.default.Messages.INVITE_EMBED_IN_GROUP:r||a||o?this.isPartyFull()?C.default.Messages.INVITE_EMBED_FULL_GROUP:this.hasPartySize()?C.default.Messages.INVITE_EMBED_NUM_OPEN_SLOTS.format({number:c-f}):C.default.Messages.JOIN:C.default.Messages.USER_ACTIVITY_NOT_DETECTED.format({name:l})},n.renderActionButton=function(){var e=this,t=this.props,n=t.isInBrowser,r=t.isPreview,o=t.isGameLaunchable,i=t.isSender,l=t.partyId,u=t.activity,d=t.message,f=t.renderSpotifyJoinButton,c=t.renderCustomButton,p={className:b.default.actionButton,size:y.default.Sizes.SMALL},v=null!=c?c(p):null;if(null!=v)return v;if(!this.isDeadInvite()&&this.isActionType(T.ActivityActionTypes.LISTEN)&&null!=l&&null!=d&&null!=u&&(0,s.isSpotifyParty)(l))return f(A({},p,{activity:u,user:d.author}));return a.createElement(y.default,A({},p,r||!n||e.isDeadInvite()?e.canJoin()?{children:C.default.Messages.JOIN,onClick:e.handleJoin}:e.canSync()?{children:C.default.Messages.JOIN,onClick:e.handleSync}:e.canSendInvite()?{children:C.default.Messages.INVITE_EMBED_INVITE_TO_JOIN,onClick:e.handleInvite,disabled:i}:{children:e.isActionType(T.ActivityActionTypes.JOIN_REQUEST)?C.default.Messages.INVITE_EMBED_INVITE_TO_JOIN:C.default.Messages.JOIN,disabled:!0}:{children:C.default.Messages.USER_ACTIVITY_ACTION_DOWNLOAD_APP,onClick:e.handleDownloadApp},{color:!n&&!o||this.isDeadInvite()?y.default.Colors.GREY:y.default.Colors.GREEN,submitting:this.props.isLoading}))},n.renderMoreUsers=function(e,t,n){return P("div",{className:b.default.moreUsers},n,e)},n.renderParty=function(){var e=this.props,t=e.partyId,n=e.partyMembers,r=e.hideParty,a=e.guildId,o=this.getPartySize(),i=o[0],l=o[1],u=this.hasPartySize()||this.isActionType(T.ActivityActionTypes.LISTEN)||this.isActionType(T.ActivityActionTypes.WATCH);if(null==t||this.isDeadInvite()||!u||r)return null;for(var s=[].concat(n),d=Math.min(i,6);s.length<d;)s.push({user:new f.default({discriminator:"0005"}),unknownUser:!0});for(var c=Math.min(l,106);s.length<c;)s.push(null);return P(S.default,{guildId:a,className:b.default.partyMembers,users:s,max:l>0?Math.min(l,6):6,renderUser:this.renderUser,renderMoreUsers:this.renderMoreUsers})},n.render=function(){var e=this,t=this.props,n=t.className,r=t.coverImage,a=t.name,i=t.activity,l=this.isActionType(T.ActivityActionTypes.JOIN)||this.isActionType(T.ActivityActionTypes.JOIN_REQUEST),s=this.isDeadInvite(),d=null;null==r||null==i||l?!l&&s&&(d=P("div",{className:b.default.artworkSpotifySessionEnded})):d=P("img",{alt:"",src:r,className:(0,p.getClass)(b.default,"artwork",this.getActionableMode())});var f=null!=i&&null!=d&&null!=i.assets&&i.assets.large_text&&!s&&(0,u.default)(i)?i.assets.large_text:null,y=null!=f?P(g.default,{text:f},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return P(v.default,{onClick:e.handleOpenSpotifyAlbum,onMouseEnter:n,onMouseLeave:r},void 0,d)})):d;return P("div",{className:(0,o.default)(b.default.invite,n)},void 0,P("div",{className:b.default.coverImageWrapper},void 0,P("div",{className:(0,o.default)((0,p.getClass)(b.default,"coverImage",this.getActionableMode()),null!=d?b.default.blurred:null),style:{backgroundImage:null!=r?"url('"+r+"')":void 0}})),P(_.default,{className:b.default.fullHeight},void 0,P(_.default,{direction:_.default.Direction.VERTICAL},void 0,P("div",{className:b.default.header},void 0,this.renderHeaderText()),P(_.default.Child,{className:b.default.partyStatus},void 0,this.renderPartyStatus()),P(_.default,{align:_.default.Align.END},void 0,P(_.default,{align:_.default.Align.CENTER,className:b.default.actionAndParty,basis:0,style:{marginRight:0}},void 0,this.renderActionButton(),this.renderParty()),null==d&&l?P("div",{className:b.default.name},void 0,a):null)),y),P(v.default,{href:c.default.getArticleURL(this.getHelpdeskArticleURL()),className:b.default.helpIcon},void 0,P(O.default,{color:T.Colors.PRIMARY_DARK_300,width:12,height:12})))},t}(a.PureComponent);w.displayName="ActivityInviteEmbed";var j=w;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=D(n(0)),o=R(n(9)),i=R(n(8)),l=R(n(273)),u=n(57),s=R(n(469)),d=n(1235),f=R(n(5938)),c=R(n(8408)),p=R(n(8398)),v=D(n(8914)),y=R(n(10)),m=R(n(15)),_=R(n(8916)),h=R(n(70)),E=R(n(161)),g=R(n(8917)),S=R(n(61)),O=R(n(278)),I=R(n(149)),T=R(n(8651)),C=n(99),b=R(n(258)),M=n(724),N=n(1),A=R(n(6)),P=R(n(7586));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U(e,t)}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var G=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={isEmojiPickerActive:!1},t.onAddReaction=function(e){if(null!=e){var n=t.props,r=n.channel,a=n.message;(0,d.addReaction)(r.id,a.id,(0,M.toReactionEmoji)(e))}},t.handleEmojiPickerToggle=function(){t.setState((function(e){return{isEmojiPickerActive:!e.isEmojiPickerActive}}))},t.renderReactionPopout=function(e){var n=e.closePopout,r=t.props.channel;return j(c.default,{closePopout:n,channel:r,onSelectEmoji:function(e,r){t.onAddReaction(e),r&&n()},pickerIntention:N.EmojiIntention.REACTION})},t}return k(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.message,r=t.className,i=this.state.isEmojiPickerActive;return n.state===N.MessageStates.SENDING||(0,C.hasFlag)(n.flags,N.MessageFlags.EPHEMERAL)?null:j(O.default,{shouldShow:i,onRequestClose:this.handleEmojiPickerToggle,renderPopout:this.renderReactionPopout,position:O.default.Positions.RIGHT},void 0,(function(t,n){var i;return a.createElement(S.default,w({},t,{onClick:e.handleEmojiPickerToggle,className:(0,o.default)(P.default.reactionBtn,(i={},i[P.default.active]=n,i),r),"aria-label":A.default.Messages.ADD_REACTION}),j(T.default,{className:P.default.icon}))}))},t}(a.Component);G.displayName="ButtonAddReaction";var F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).isMouseEntered=!1,t.scale=new l.default.Value(1),t.opacity=new l.default.Value(1),t.timeout=new u.Timeout,t.state={shouldShowTooltip:!1,tooltipText:null},t.handleClick=function(){var e=t.props,n=e.message,r=e.emoji,a=e.me,o=e.readOnly,i=e.isPendingMember,l=n.getChannelId();i?t.handleShowVerificationGate():a?(0,d.removeReaction)(l,n.id,r):o||(0,d.addReaction)(l,n.id,r)},t.handleMouseEnter=function(){t.isMouseEntered=!0,t.timeout.start(500,t.showTooltip,!1)},t.showTooltip=function(){t.isMouseEntered&&(t.handleStoreChange(),_.default.addChangeListener(t.handleStoreChange))},t.handleMouseLeave=function(){t.isMouseEntered=!1,t.hideTooltip(),t.setState({shouldShowTooltip:!1})},t.hideTooltip=function(){t.timeout.stop(),_.default.removeChangeListener(t.handleStoreChange)},t.handleStoreChange=function(){var e=t.props,n=H(e.message,e.emoji);t.setState({tooltipText:n,shouldShowTooltip:null!=n&&""!==n})},t.renderLurkerModeUpsellPopout=function(e){var n=e.closePopout,r=t.props,a=r.message;if(!r.isLurking)return null;var o=y.default.getChannel(a.getChannelId()),i=m.default.getGuild(null==o?void 0:o.getGuildId());return null!=i?j(v.default,{type:v.LurkerModeUpsellPopoutTypes.REACTIONS,guild:i,closePopout:n}):void 0},t.renderTooltip=function(){var e=t.props.emoji,n=t.state.tooltipText;return a.createElement(a.Fragment,null,j(f.default,{className:P.default.reactionTooltipEmoji,emojiId:e.id,emojiName:e.name,animated:e.animated}),null!=n&&""!==n.trim()?j("span",{className:P.default.reactionTooltipText},void 0,n):null)},t.handleShowVerificationGate=function(){var e=t.props,n=e.message;if(!e.isPendingMember)return null;var r=y.default.getChannel(n.getChannelId()),a=m.default.getGuild(null==r?void 0:r.getGuildId());null!=a&&(0,p.default)(a.id)},t}k(t,e);var n=t.prototype;return n.componentWillAppear=function(e){this.animateIn(e)},n.componentWillEnter=function(e){this.animateIn(e)},n.componentWillUnmount=function(){this.hideTooltip()},n.animateIn=function(e){E.default.isFocused()?(this.scale.setValue(0),this.opacity.setValue(0),l.default.parallel([l.default.timing(this.scale,{toValue:1,duration:300,easing:l.default.Easing.inOut(l.default.Easing.back())}),l.default.timing(this.opacity,{toValue:1,duration:300})]).start(e)):(this.scale.setValue(1),this.opacity.setValue(1),e())},n.render=function(){var e=this,t=this.props,n=t.count,r=t.emoji,i=t.me,u=t.readOnly,s=t.isLurking,d=t.isPendingMember,c=this.state,p=c.shouldShowTooltip,v=c.tooltipText,y={transform:[{scale:this.scale}],opacity:this.opacity},m=s?"div":S.default;return j(I.default,{tooltipClassName:P.default.reactionTooltip,tooltipContentClassName:P.default.reactionTooltipContent,forceOpen:p,"aria-label":null!=v&&v,text:this.renderTooltip(),onAnimationRest:function(t,n){n!==N.SpringTransitionPhases.LEAVE||e.isMouseEntered||e.setState({tooltipText:null})}},void 0,(function(t){t.onMouseEnter,t.onMouseLeave;var c,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["onMouseEnter","onMouseLeave"]);return a.createElement("div",w({onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave},p),j(l.default.div,{className:(0,o.default)(P.default.reaction,(c={},c[P.default.reactionMe]=i,c[P.default.reactionReadOnly]=u&&!s&&!d,c)),style:y},void 0,j(O.default,{renderPopout:e.renderLurkerModeUpsellPopout,position:O.default.Positions.TOP},void 0,(function(t){return a.createElement("div",t,j(m,{className:P.default.reactionInner,onClick:s?void 0:e.handleClick,"aria-label":A.default.Messages.REACT_WITH_LABEL.format({emojiName:r.name}),"aria-pressed":i},void 0,j(f.default,{emojiId:r.id,emojiName:r.name,animated:r.animated}),j(g.default,{className:P.default.reactionCount,value:n,digitWidth:9})))}))))}))},t}(a.PureComponent);F.displayName="Reaction";var B=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={disableTransitionAppear:!0,reactionsCount:t.props.message.reactions.length},t}return k(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.message.reactions.length;return 0===t.reactionsCount&&n>0?{disableTransitionAppear:!1,reactionsCount:n}:t.reactionsCount!==n?{reactionsCount:n}:null},t.prototype.render=function(){var e=this.props,t=e.message,n=e.disableReactionCreates,r=e.disableReactionUpdates,o=e.isLurking,i=e.isPendingMember,l=e.channel,u=this.state.disableTransitionAppear;return t.reactions.length?j(s.default,{component:"div",className:P.default.reactions,transitionAppear:!u,role:"group","aria-label":A.default.Messages.REACTIONS,transitionLeave:!1},void 0,t.reactions.map((function(e){return a.createElement(F,w({key:(e.emoji.id||0)+":"+e.emoji.name,message:t,readOnly:r,isLurking:o,isPendingMember:i},e))})),!n&&j(G,{message:t,channel:l})):null},t}(a.PureComponent);function H(e,t){var n=_.default.getReactions(e.getChannelId(),e.id,t,N.REACTION_TOOLTIP_MAX_USERS),r=y.default.getChannel(e.getChannelId()),a=null==r||r.isPrivate()?null:r.getGuildId(),o=(0,i.default)(n).reject((function(e){return h.default.isBlocked(e.id)})).take(N.REACTION_TOOLTIP_MAX_USERS).map((function(e){return b.default.getName(a,null==r?void 0:r.id,e)})).value();if(!o.length)return"";var l=e.getReaction(t),u=Math.max(0,(l&&l.count||0)-o.length),s=(0,M.getReactionEmojiName)(t);return 1===o.length?u>0?A.default.Messages.REACTION_TOOLTIP_1_N.format({a:o[0],n:u,emojiName:s}):A.default.Messages.REACTION_TOOLTIP_1.format({a:o[0],emojiName:s}):2===o.length?u>0?A.default.Messages.REACTION_TOOLTIP_2_N.format({a:o[0],b:o[1],n:u,emojiName:s}):A.default.Messages.REACTION_TOOLTIP_2.format({a:o[0],b:o[1],emojiName:s}):3===o.length?u>0?A.default.Messages.REACTION_TOOLTIP_3_N.format({a:o[0],b:o[1],c:o[2],n:u,emojiName:s}):A.default.Messages.REACTION_TOOLTIP_3.format({a:o[0],b:o[1],c:o[2],emojiName:s}):A.default.Messages.REACTION_TOOLTIP_N.format({n:u,emojiName:s})}t.default=B,B.displayName="Reactions"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeInternalFields=function(e){return e.filter((function(e){return e.field_type!==a.VerificationFormFieldTypes.VERIFICATION}))},t.isValidFormResponse=void 0;var r=n(48),a=n(8262);t.isValidFormResponse=function(e){var t=e.required,n=e.response,o=e.field_type;if(!t)return!0;if(null==n)return!1;switch(o){case a.VerificationFormFieldTypes.TERMS:case a.VerificationFormFieldTypes.VERIFICATION:return n;case a.VerificationFormFieldTypes.TEXT_INPUT:case a.VerificationFormFieldTypes.PARAGRAPH:return"string"==typeof n&&""!==n.trim();case a.VerificationFormFieldTypes.MULTIPLE_CHOICE:return"number"==typeof n;default:return(0,r.assertNever)(o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{d:"M12.0002 10.823L20.9652 5.26C20.6772 5.1 20.3522 5 20.0002 5H4.00016C3.64816 5 3.32216 5.1 3.03516 5.26L12.0002 10.823Z",fill:d,className:f}),s("path",{d:"M12.527 12.8489C12.366 12.9489 12.183 12.9999 12 12.9999C11.817 12.9999 11.634 12.9489 11.473 12.8499L2.003 6.97292C2.003 6.98192 2 6.99092 2 6.99892V15.9989C2 17.1009 2.897 17.9989 4 17.9989H20C21.103 17.9989 22 17.1009 22 15.9989V6.99892C22 6.98992 21.997 6.98092 21.997 6.97192L12.527 12.8489Z",fill:d,className:f}))}d.displayName="Mail"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=g(n(0)),o=h(n(9)),i=h(n(5962)),l=h(n(98)),u=n(95),s=g(n(29)),d=h(n(5981)),f=h(n(55)),c=h(n(9586)),p=n(35),v=h(n(6)),y=h(n(7585)),m=h(n(1170)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(e){var t,r;function h(t){var n;return(n=e.call(this,t)||this)._animItem=null,n.headerId=l.default.v4(),n.setLottieRef=function(e){n._lottieRef=e},n.handleAddPhone=function(e){n.state.animated||null==n._animItem||(n._animItem.play(),n.setState({animated:!0})),n._phone=e;var t=n.props.onAddPhone;t&&t(e)},n.handleVerifyPhone=function(e){var t=n.props.onVerifyPhone;null==t||t(e)},n.handleResendCode=function(){var e=n.props.onAddPhone;null==e||e(n._phone)},n.state={animated:!1},n}r=e,(t=h).prototype=Object.create(r.prototype),t.prototype.constructor=t,O(t,r);var E=h.prototype;return E.componentDidMount=function(){var e=this;n.e(80).then(function(t){var r=n(10571);e._animItem=i.default.loadAnimation({container:e._lottieRef,renderer:"svg",loop:!0,autoplay:!1,animationData:r})}.bind(null,n)).catch(n.oe)},E.componentWillUnmount=function(){null!=this._animItem&&(this._animItem.destroy(),this._animItem=void 0)},E.render=function(){var e,t,n=this.props,r=n.error,i=n.working,l=n.transitionState,h=n.validPhone;return e=r?S("div",{className:(0,o.default)(y.default.description,y.default.error,_.default.marginBottom20)},void 0,r):h?S("div",{className:(0,o.default)(y.default.description,_.default.marginBottom20)},void 0,v.default.Messages.VERIFICATION_PHONE_DESCRIPTION):a.createElement(a.Fragment,null,S("div",{className:(0,o.default)(y.default.description,_.default.marginBottom20)},void 0,v.default.Messages.ENTER_PHONE_DESCRIPTION),S("div",{className:(0,o.default)(y.default.description,_.default.marginBottom20)},void 0,v.default.Messages.ENTER_PHONE_DESCRIPTION_NOTE.format())),t=h?S(f.default,{className:y.default.field,direction:f.default.Direction.VERTICAL,align:f.default.Align.CENTER},void 0,S(d.default,{onSubmit:this.handleVerifyPhone}),S(s.default,{className:_.default.marginTop8,size:s.ButtonSizes.SMALL,look:s.ButtonLooks.LINK,color:s.ButtonColors.PRIMARY,onClick:this.handleResendCode},void 0,v.default.Messages.RESEND_CODE)):S(c.default,{className:y.default.field,onSubmit:this.handleAddPhone,submitting:i}),S(p.ModalRoot,{impressionName:u.ImpressionNames.USER_VERIFY_PHONE,transitionState:l,className:(0,o.default)(y.default.phoneVerificationModal,m.default.vertical,m.default.alignCenter,m.default.justifyCenter,_.default.marginTop60),"aria-labelledby":this.headerId},void 0,a.createElement("div",{className:y.default.animationContainer,ref:this.setLottieRef}),S("div",{className:(0,o.default)(y.default.title,_.default.marginBottom8),id:this.headerId},void 0,h?v.default.Messages.VERIFICATION_PHONE_TITLE:v.default.Messages.ENTER_PHONE_TITLE),e,t)},h}(a.PureComponent);I.displayName="PhoneVerificationModal";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=_(n(0)),o=y(n(9)),i=y(n(5699)),l=y(n(5990)),u=_(n(29)),s=y(n(55)),d=y(n(683)),f=y(n(6)),c=y(n(7584)),p=y(n(5958)),v=y(n(370));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).handleChange=function(e){n.closePopout(),n.setState({phone:e.currentTarget.value})},n.handleKeyPress=function(e){n.closePopout(),13===e.which&&(e.preventDefault(),n.handleSubmit())},n.handleSubmit=function(){var e=n.props,t=e.onSubmit,r=e.submitting,a=n.state,o=a.countryCode,i=a.phone;r||t&&t(""+o+i)},n.handleTogglePopout=function(){n.setState({open:!n.state.open})},n.handleClick=function(e){var t=i.default[e].code.split(" "),r=t[0],a=t[1];n.setState({open:!1,countryCode:r,phone:a||""})};var r=i.default.find((function(e){return"United States"===e.name})).code.split(" "),a=r[0],o=r[1];return n.state={countryCode:a,phone:o||"",open:!1},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var a=r.prototype;return a.render=function(){var e=this.state,t=e.countryCode,n=e.phone,r=e.open,a=this.props,i=a.className,y=a.submitting,m=t.split("+")[1];return h(s.default,{className:(0,o.default)(c.default.phoneField,p.default.elevationLow,i),align:s.default.Align.CENTER,grow:0},void 0,h(u.default,{size:u.ButtonSizes.SMALL,className:c.default.countryButton,color:u.ButtonColors.GREY,innerClassName:c.default.countryButtonInner,onClick:this.handleTogglePopout},void 0,h(s.default,{className:(0,o.default)(c.default.countryCodeContainer,v.default.marginReset),justify:s.default.Justify.CENTER},void 0,h("div",{className:c.default.plusSign},void 0,"+"),h("div",{className:c.default.countryCode},void 0,m)),h(d.default,{foreground:c.default.phoneFieldExpand,expanded:r,width:16,height:16})),h("input",{className:c.default.inputField,value:n,onChange:this.handleChange,onKeyPress:this.handleKeyPress,autoFocus:!0}),h(u.default,{className:c.default.sendButton,size:u.ButtonSizes.SMALL,submitting:y,onClick:this.handleSubmit},void 0,f.default.Messages.SEND),r?h(l.default,{onClick:this.handleClick}):null)},a.closePopout=function(){this.state.open&&this.setState({open:!1})},r}(a.PureComponent);g.displayName="PhoneField";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{fill:d,d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"})))}d.displayName="MobileDevice"},function(e,t,n){e.exports=n.p+"e05a39f2363a5628be26fe1d1efbb86c.svg"},function(e,t,n){e.exports=n.p+"07ee40a8c86c515c8582bb432ac02343.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=ae(n(0)),i=n(3),l=n(389),u=ne(n(8254)),s=ne(n(132)),d=n(364),f=ne(n(8412)),c=ne(n(8397)),p=ne(n(26)),v=n(196),y=n(42),m=ne(n(1339)),_=ne(n(8265)),h=ne(n(8923)),E=ne(n(8264)),g=ne(n(8268)),S=ne(n(11)),O=ne(n(303)),I=ne(n(10)),T=ne(n(15)),C=ne(n(256)),b=ne(n(36)),M=ne(n(12)),N=ne(n(80)),A=ae(n(8382)),P=n(1230),R=ne(n(8515)),L=ne(n(9615)),D=ne(n(9617)),w=ne(n(9620)),j=ne(n(9621)),k=ne(n(9622)),U=ne(n(9623)),G=n(9625),F=ne(n(9628)),B=ne(n(9629)),H=ne(n(9635)),x=ne(n(9636)),V=ne(n(9637)),W=ne(n(9638)),Y=ne(n(9639)),z=ne(n(9640)),K=ne(n(9641)),$=ne(n(9642)),Z=n(41),q=n(121),X=ne(n(258)),J=ne(n(164)),Q=n(8928),ee=ne(n(8361)),te=n(1);function ne(e){return e&&e.__esModule?e:{default:e}}function re(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return re=function(){return e},e}function ae(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=re();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function oe(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ie(){return(ie=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}).apply(this,arguments)}function le(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function ue(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){le(o,r,a,i,l,"next",e)}function l(e){le(o,r,a,i,l,"throw",e)}i(void 0)}))}}function se(e,t,n,r){return void 0===r&&(r=!1),o.useCallback(function(){var a=ue(regeneratorRuntime.mark((function a(i){var l;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(null!=e){a.next=2;break}return a.abrupt("return");case 2:return r&&i.stopPropagation(),l=i.currentTarget,a.next=6,(0,E.default)(e.id,e.getAvatarURL(n));case 6:(0,A.openPopout)(l,{closeOnScroll:!1,position:A.default.Positions.RIGHT,shadow:!1,render:function(n){var r=I.default.getChannel(t);return null==r?null:o.createElement(g.default,ie({},n,{userId:e.id,guildId:r.getGuildId(),channelId:r.id}))}});case 7:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}(),[e,t,r,n])}function de(e,t){return o.useCallback((function(n){var r=I.default.getChannel(t);null!=r&&null!=e&&(0,Q.openUserContextMenu)(n,e,r)}),[e,t])}function fe(e){var t=e.message,n=e.compact,r=e.channel,a=t.id,l=t.author,u=S.default.getId(),d=t.getChannelId(),f=(0,i.useStateFromStores)([O.default],(function(){return O.default.isCallActive(d,a)}),[d,a]),c=(0,i.useStateFromStores)([N.default],(function(){return N.default.getVoiceState(te.ME,u)})),p=!f&&null!=t.call&&!t.call.participants.includes(u),v=f&&(null==c||c.channelId!==d),y=o.useCallback((function(){return s.default.selectVoiceChannel(d)}),[d]),m=se(l,d,r.guild_id),_=de(l,d);return oe(D.default,{compact:n,message:t,missed:p,joinable:v,onClickUsername:m,onContextMenuUsername:_,onClickJoinCall:y})}function ce(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,o=t.getChannelId(),i=se(a,o,r.guild_id),l=de(a,o);return oe(k.default,{compact:n,message:t,onClickUsername:i,onContextMenuUsername:l})}function pe(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,o=t.getChannelId(),i=se(a,o,r.guild_id),l=de(a,o);return oe(j.default,{compact:n,message:t,onClickUsername:i,onContextMenuUsername:l})}function ve(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,i=t.getChannelId(),l=o.useCallback((function(){if(b.default.getChannelId()!==i){var e=I.default.getChannel(i);null!=e&&(0,y.transitionToGuild)(e.guild_id,e.id)}setTimeout((function(){return q.ComponentDispatch.dispatch(te.ComponentActions.TOGGLE_CHANNEL_PINS)}),0)}),[i]),u=se(a,i,r.guild_id),s=de(a,i);return oe(U.default,{message:t,compact:n,onClickUsername:u,onContextMenuUsername:s,onClickPins:__OVERLAY__?null:l})}function ye(e){var t=e.message,n=e.channel,r=e.compact,a=se(t.author,t.channel_id,n.guild_id),i=de(t.author,t.channel_id),u=o.useCallback(ue(regeneratorRuntime.mark((function e(){var n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(r=null===(n=t.messageReference)||void 0===n?void 0:n.channel_id)){e.next=6;break}return e.next=4,m.default.loadThread(r);case 4:null!=(a=I.default.getChannel(r))&&_.default.openThreadSidebarForViewing(a);case 6:case"end":return e.stop()}}),e)}))),[t]),s=o.useCallback((function(){(0,Z.openModal)((function(e){return o.createElement(h.default,ie({channel:n},e))}))}),[n]),d=o.useCallback((function(e){var n,r=I.default.getChannel(null===(n=t.messageReference)||void 0===n?void 0:n.channel_id);null!=r&&(0,l.openContextMenu)(e,(function(e){return o.createElement(c.default,ie({},e,{channel:r}))}))}),[t]);return oe(V.default,{message:t,compact:r,onClickUsername:a,onContextMenuUsername:i,onClickThread:u,onClickViewThreads:s,onContextMenuThread:d})}function me(e){var t=e.message,n=e.channel,r=e.compact,a=t.author,o=t.getChannelId(),l=(0,i.useStateFromStores)([M.default],(function(){return M.default.getUser(t.mentions[0])}),[t]),u=se(a,o,n.guild_id),s=de(a,o),d=se(l,o,n.guild_id),f=de(l,o);if(n.isThread())return oe(Y.default,{message:t,channel:n,compact:r,targetUser:l,onClickActor:u,onContextMenuActor:s,onClickTarget:d,onContextMenuTarget:f});if(null!=l&&l.id!==a.id){var c=X.default.getName(null,o,l);return oe(x.default,{message:t,compact:r,onClickUsername:u,onContextMenuUsername:s,otherUsername:c,onClickOtherUsername:d,onContextMenuOtherUsername:f})}return oe(x.default,{message:t,onClickUsername:u,onContextMenuUsername:s})}function _e(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,o=t.getChannelId(),i=se(a,o,r.guild_id),l=de(a,o);return oe(K.default,{message:t,compact:n,onClickUsername:i,onContextMenuUsername:l})}function he(e){var t=e.message,n=e.channel,r=e.compact,a=t.author,l=n.guild_id,u=t.getChannelId(),s=(0,i.useStateFromStores)([T.default],(function(){return T.default.getGuild(l)}),[l]),d=o.useCallback((function(){null!=s&&(0,P.openFullScreenLayer)((function(e){var t=e.transitionState,n=e.closeLayer;return oe(f.default,{layerTransitionState:t,close:n,guildId:s.id,locationSection:te.AnalyticsSections.CHANNEL_TEXT_AREA})}))}),[s]),c=se(a,u,n.guild_id,!0),p=de(a,u);return oe($.default,{message:t,compact:r,guild:s,onClickUsername:c,onContextMenuUsername:p,onClickMessage:d})}function Ee(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,o=t.getChannelId(),i=se(a,o,r.guild_id),l=de(a,o);return oe(w.default,{message:t,compact:n,onClickUsername:i,onContextMenuUsername:l})}function ge(e){var t=e.message,n=e.compact,r=t.getChannelId(),a=(0,i.useStateFromStores)([I.default],(function(){return I.default.getChannel(r)}),[r]),o=null!=a?a.getGuildId():null;return oe(G.UIKitGuildDiscoveryDisqualified,{message:t,compact:n,onClick:function(){null!=o&&u.default.open(o,te.GuildSettingsSections.DISCOVERY)}})}function Se(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,o=t.getChannelId(),i=se(a,o,r.guild_id),l=de(a,o);return oe(L.default,{message:t,compact:n,onClickUsername:i,onContextMenuUsername:l})}function Oe(e){var t=e.message,n=e.channel,r=e.compact,a=(0,i.useStateFromStores)([M.default],(function(){return M.default.getCurrentUser()})),o=(0,i.useStateFromStores)([T.default],(function(){var e,t;return null!==(e=null===(t=T.default.getGuild(n.getGuildId()))||void 0===t?void 0:t.isOwner(a))&&void 0!==e&&e}));return oe(B.default,{message:t,compact:r,isOwner:o,channel:n})}fe.displayName="Call",ce.displayName="ChannelNameChange",pe.displayName="ChannelIconChange",ve.displayName="ChannelPinnedMessage",ye.displayName="ThreadCreated",me.displayName="RecipientRemove",_e.displayName="UserJoin",he.displayName="UserPremiumGuildSubscription",Ee.displayName="ChannelFollowAdd",ge.displayName="GuildDiscoveryDisqualified",Se.displayName="ApplicationCommand",Oe.displayName="InviteUsersReminder";var Ie=Object.freeze(((r={})[te.MessageTypes.DEFAULT]=void 0,r[te.MessageTypes.REPLY]=void 0,r[te.MessageTypes.APPLICATION_COMMAND]=Se,r[te.MessageTypes.RECIPIENT_ADD]=function(e){var t=e.message,n=e.channel,r=e.compact,a=t.author,o=t.getChannelId(),l=(0,i.useStateFromStores)([M.default],(function(){return M.default.getUser(t.mentions[0])}),[t]),u=X.default.getName(null,o,l),s=se(a,o,n.guild_id),d=de(a,o),f=se(l,o,n.guild_id),c=de(l,o);return n.isThread()?oe(W.default,{message:t,channel:n,compact:r,targetUser:l,onClickActor:s,onContextMenuActor:d,onClickTarget:f,onContextMenuTarget:c}):oe(H.default,{message:t,compact:r,otherUsername:u,onClickUsername:s,onContextMenuUsername:d,onClickOtherUsername:f,onContextMenuOtherUsername:c})},r[te.MessageTypes.RECIPIENT_REMOVE]=me,r[te.MessageTypes.CALL]=fe,r[te.MessageTypes.CHANNEL_NAME_CHANGE]=ce,r[te.MessageTypes.CHANNEL_ICON_CHANGE]=pe,r[te.MessageTypes.CHANNEL_PINNED_MESSAGE]=ve,r[te.MessageTypes.USER_JOIN]=_e,r[te.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION]=he,r[te.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1]=he,r[te.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2]=he,r[te.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3]=he,r[te.MessageTypes.CHANNEL_FOLLOW_ADD]=Ee,r[te.MessageTypes.GUILD_STREAM]=function(e){var t=e.message,n=e.compact,r=e.channel,a=t.author,l=t.author.id,u=t.messageReference,s=t.getChannelId(),f=(0,i.useStateFromStores)([C.default],(function(){return C.default.findActivity(l,(function(e){return e.type===te.ActivityTypes.PLAYING}))}),[l]),c=(0,i.useStateFromStores)([I.default],(function(){return null!=u?I.default.getChannel(u.channel_id):null}),[u]),p=null==u?void 0:u.guild_id,y=se(a,s,r.guild_id),m=de(a,s),_=o.useCallback((function(){null!=c&&null!=p&&(0,d.watchStreamAndTransitionToStream)({streamType:v.StreamTypes.GUILD,ownerId:l,channelId:c.id,guildId:p})}),[l,c,p]);return null!=u&&null!=c&&null!=u.guild_id?oe(F.default,{message:t,compact:n,channel:c,playingActivity:f,onJoinStream:_,onClickUsername:y,onContextMenuUsername:m}):null},r[te.MessageTypes.GUILD_DISCOVERY_DISQUALIFIED]=ge,r[te.MessageTypes.GUILD_DISCOVERY_REQUALIFIED]=G.UIKitGuildDiscoveryRequalified,r[te.MessageTypes.GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING]=G.UIKitGuildDiscoveryGracePeriodInitialWarning,r[te.MessageTypes.GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING]=G.UIKitGuildDiscoveryGracePeriodFinalWarning,r[te.MessageTypes.THREAD_CREATED]=ye,r[te.MessageTypes.THREAD_STARTER_MESSAGE]=z.default,r[te.MessageTypes.GUILD_INVITE_REMINDER]=Oe,r));function Te(e){var t,n=e.message,r=e.channel,a=e.compact,o=n.type,i=Ie[o];return null==i?(t=new Error("unknown message type "+n.type),J.default.captureException(t),new p.default("SystemMessage").error("",t),null):oe(R.default,{message:n,content:(0,ee.default)(n).content},void 0,oe(i,{message:n,channel:r,compact:a}))}Te.displayName="SystemMessageWrapper";var Ce=o.memo(Te);t.default=Ce},function(e,t,n){e.exports=n.p+"b4aa5e92cbf71d936e8ab48605ec1461.svg"},function(e,t,n){e.exports=n.p+"f3e713834a05aad80371aa84fb82037a.svg"},function(e,t,n){e.exports=n.p+"de8659b8a9149c4e0dcb597a09bd25d0.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(2)),a=n(1148),o=d(n(9129)),i=d(n(684)),l=d(n(15)),u=d(n(1262)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=null;function y(){var e=o.default.affinities;if(null==e)return!1;for(var t,n=c(e);!(t=n()).done;){var r=t.value,a=r.score,u=r.guildId,d=l.default.getGuild(u),f=i.default.getMemberCount(u);null!=d&&d.premiumSubscriberCount<s.PremiumGuildSubscriptionsRequired[s.PremiumGuildTiers.TIER_3]&&null!=f&&f>=3&&(null==v||a>v.score)&&(v=r)}}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var u=r.prototype;return u.initialize=function(){this.waitFor(l.default,o.default,a.ExperimentStore,i.default),this.syncWith([l.default,o.default,a.ExperimentStore,i.default],y)},u.channelNoticePredicate=function(e,t,n){var r=a.ExperimentStore.getUserExperimentDescriptor(a.Experiments.GUILD_AFFINITY_PREMIUM_GUILD_SUBSCRIPTION_CTA),o=e&&null!=v&&v.guildId===t.id&&Date.now()-n>=s.CHANNEL_NOTICE_SHOW_DELAY;return o&&null!=r&&r.bucket===a.ExperimentBuckets.CONTROL&&(0,a.trackExposureToExperiment)(a.Experiments.GUILD_AFFINITY_PREMIUM_GUILD_SUBSCRIPTION_CTA,r),o&&null!=r&&r.bucket===a.ExperimentBuckets.TREATMENT_1},r}(u.default))(r.default);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchGuildAffinities=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}t.fetchGuildAffinities=function(){return r.default.get({url:o.Endpoints.GUILD_AFFINITIES,oldFormErrors:!0}).then((function(e){var t=e.body.guild_affinities;a.default.dispatch({type:o.ActionTypes.LOAD_GUILD_AFFINITIES_SUCCESS,guildAffinities:t})}),(function(){a.default.dispatch({type:o.ActionTypes.LOAD_GUILD_AFFINITIES_FAILURE})}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(2)),a=u(n(86)),o=u(n(12)),i=u(n(1262)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=null;function f(){var e=o.default.getCurrentUser();if(null==e||e.mfaEnabled===d)return!1;d=e.mfaEnabled}var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var i=r.prototype;return i.initialize=function(){this.waitFor(o.default,a.default),this.syncWith([o.default,a.default],f)},i.channelNoticePredicate=function(e,t){return t.mfaLevel===l.MFALevels.ELEVATED&&!1===d&&a.default.hasElevatedPermissions(t.id)},r}(i.default))(r.default,{CONNECTION_OPEN:function(e){return f()},GUILD_UPDATE:function(e){return!0}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(40)),o=l(n(1262)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){return!0}var d=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var o=r.prototype;return o.initialize=function(){this.waitFor(a.default),this.syncWith([a.default],s)},o.channelNoticePredicate=function(e,t,n){var r=Date.now()-n>=i.CHANNEL_NOTICE_SHOW_DELAY;return e&&r&&a.default.can(i.Permissions.ADMINISTRATOR,t)},r}(o.default))(r.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(40)),o=l(n(1262)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var o=r.prototype;return o.initialize=function(){this.waitFor(a.default),this.syncWith([a.default],i.NOOP)},o.channelNoticePredicate=function(e,t,n){return e&&Date.now()-n>=i.CHANNEL_NOTICE_SHOW_DELAY&&a.default.can(i.Permissions.MANAGE_GUILD,t)},r}(o.default))(r.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=g(n(0)),o=h(n(9)),i=n(122),l=n(483),u=n(5935),s=h(n(29)),d=h(n(61)),f=g(n(149)),c=h(n(1256)),p=h(n(8656)),v=h(n(24)),y=n(1),m=h(n(6)),_=h(n(7592));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}var T={tension:140,friction:30},C={tension:180,friction:30},b={tension:800,friction:20},M=I({},b,{clamp:!0}),N=[].concat(u.GuildTierSubscriptionsOrdered,[{tier:y.PremiumGuildTiers.NONE}]).reverse();function A(e){var t=(0,l.hexToRgb)(e);return[t.r,t.g,t.b]}function P(e){switch(e){case"color":return M;case"scale":default:return b}}function R(e){var t,n=e.tier,r=e.guild,l=e.selectedTier,s=e.canSelectTier,c=e.theme,v=e.tierMarkerActive,h=e.secondaryTierMarkerActive,E=e.finishedInitialAnimation,g=e.targetTier,S=e.renderTierLabel,T=e.onSelect,C=a.useRef(null),b=r.premiumSubscriberCount>=y.PremiumGuildSubscriptionsRequired[n]&&r.premiumSubscriberCount>0,M=l===n,N=b&&y.PremiumGuildSubscriptionsRequired[v]>=y.PremiumGuildSubscriptionsRequired[n]||null!=g&&y.PremiumGuildSubscriptionsRequired[h]>=y.PremiumGuildSubscriptionsRequired[n],R=(E||N)&&M,L=c===y.ThemeTypes.DARK?y.HEXColors.PRIMARY_DARK_700:y.HEXColors.PRIMARY_LIGHT_160,D=(0,u.getTierName)(n),w=y.PremiumGuildSubscriptionsRequired[n],j=null!=D?O(a.Fragment,{},void 0,O("div",{},void 0,D),O("div",{},void 0,m.default.Messages.PREMIUM_GUILD_PERKS_MODAL_LEVEL_SUBSCRIBER_COUNT_TOOLTIP.format({subscriberCount:Math.min(r.premiumSubscriberCount,w),numRequired:w}))):null,k={scale:1,color:A(L)},U={scale:R?1.625:1,color:A(N?y.HEXColors.PREMIUM_GUILD_PINK:L)},G=O(f.default,{text:j,"aria-label":D||!1},void 0,(function(e){return a.createElement(d.default,I({},e,{onClick:function(){return T(n)},focusProps:{ringTarget:C}}),O(i.Spring,{from:k,to:U,config:P},void 0,(function(e){var t,r,l,u=e.scale,d=e.color;return a.createElement(i.animated.div,{ref:C,style:{transform:u.interpolate((function(e){return"scale("+e+")"})),background:(0,i.interpolate)([d],(function(e){return"rgb("+e.toString()+")"}))},className:(0,o.default)(N?_.default.tierMarkerAccomplished:_.default.tierMarkerInProgress,(r={},r[_.default.tierMarkerSelectable]=null===(t=null==s?void 0:s(n))||void 0===t||t,r))},n!==y.PremiumGuildTiers.NONE?O(p.default,{tier:n,className:(0,o.default)(_.default.currentTierIcon,(l={},l[_.default.tier3Icon]=n===y.PremiumGuildTiers.TIER_3,l))}):null)})))}));return O("div",{className:(0,o.default)(_.default.tierMarkerGroup,(t={},t[_.default.selectedTier]=M,t))},n,O("div",{className:_.default.tierMarkerBackground}),G,n!==y.PremiumGuildTiers.NONE?O("div",{className:_.default.tierMarkerLabelContainer},void 0,S(n,b)):null)}R.displayName="TierMarker";var L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={finishedInitialAnimation:0===t.props.guild.premiumSubscriberCount,tierMarkerActive:y.PremiumGuildTiers.NONE,targetTier:null,hasTargetedTier:!1,subscribeModalOpen:!1,secondaryTierMarkerActive:y.PremiumGuildTiers.NONE},t.handleForegroundFrame=function(e){var n=e.width,r=void 0===n?0:n,a=t.props.guild;t.handleTierMarkers(t.state.tierMarkerActive,(function(e){return t.setState({tierMarkerActive:e})}),(function(e,t){return null!=e.amount&&r>=t&&a.premiumSubscriberCount>=e.amount}))},t.handleSecondaryFrame=function(e){var n=e.width,r=void 0===n?0:n;t.handleTierMarkers(t.state.secondaryTierMarkerActive,(function(e){return t.setState({secondaryTierMarkerActive:e})}),(function(e,t){return r>=t}))},t.handleTierMarkers=function(e,t,n){for(var r=N.length-1;r>0;r--){var a=N[r];if(n(a,r/N.length*100))return void(e!==r&&t(a.tier))}},t.handleFinishedInitialAnimation=function(){t.setState({finishedInitialAnimation:!0})},t.handleSelectTier=function(e){var n=t.props,r=n.canSelectTier,a=n.onSelectTier;(null==r||r(e))&&a(e)},t.renderTierLabel=function(e,n){var r=t.props,i=r.guild,l=r.theme;if(null!=(0,u.generateBlockGuildSubscriptionPurchasesNode)()||n)return O(v.default,{className:(0,o.default)([_.default.tierMarkerLabelText,_.default.isAccomplished])},void 0,(0,u.getTierName)(e));var d=(0,u.getTierName)(e),p=O("div",{},void 0,m.default.Messages.PREMIUM_GUILD_PERKS_MODAL_SUBSCRIBE_TO_TIER_TOOLTIP.format({tierName:d}));return O(f.default,{text:p,"aria-label":d||!1,position:f.TooltipPositions.BOTTOM},void 0,(function(n){return a.createElement(s.default,I({},n,{color:l===y.ThemeTypes.DARK?s.default.Colors.WHITE:s.default.Colors.BLACK,size:s.default.Sizes.SMALL,look:s.default.Looks.BLANK,onMouseEnter:function(){var r;null===(r=n.onMouseEnter)||void 0===r||r.call(n),t.setTargetTier(e)},onMouseLeave:function(){var e;null===(e=n.onMouseLeave)||void 0===e||e.call(n),t.maybeClearTargetTier()},onClick:function(){return t.subscribeUpToTier(e,i)}}),O(v.default,{className:_.default.tierMarkerLabelText},void 0,d,O(c.default,{className:_.default.tierMarkerLabelPlusIcon})))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var l=r.prototype;return l.componentDidUpdate=function(e){var t=this.props.selectedTier;e.selectedTier!==t&&this.setState({finishedInitialAnimation:!0})},l.setTargetTier=function(e){var t=this.props.guild;e>(0,u.getGuildTierFromSubscriberCount)(t.premiumSubscriberCount)&&this.setState({targetTier:e,hasTargetedTier:!0})},l.maybeClearTargetTier=function(){this.state.subscribeModalOpen||this.setState({targetTier:null})},l.subscribeUpToTier=function(e,t){var n=this,r={page:y.AnalyticsPages.PREMIUM_GUILD_USER_MODAL,section:y.AnalyticsSections.PREMIUM_GUILD_USER_MODAL_PROGRESS_BAR,object:y.AnalyticsObjects.SUBSCRIBE_TO_TIER_BUTTON};switch(e){case y.PremiumGuildTiers.TIER_3:r.objectType=y.AnalyticsObjectTypes.TIER_3;break;case y.PremiumGuildTiers.TIER_2:r.objectType=y.AnalyticsObjectTypes.TIER_2;break;case y.PremiumGuildTiers.TIER_1:r.objectType=y.AnalyticsObjectTypes.TIER_1}this.setState({subscribeModalOpen:!0}),this.props.openPaymentModal({analyticsLocation:r,numberOfSubscriptionsToAdd:y.PremiumGuildSubscriptionsRequired[e]-t.premiumSubscriberCount,onClose:function(){return n.setState({targetTier:null,subscribeModalOpen:!1})}})},l.renderTierMarker=function(e){var t=this.props,n=t.guild,r=t.selectedTier,a=t.canSelectTier,o=t.theme,i=this.state;return O(R,{tier:e,guild:n,selectedTier:r,canSelectTier:a,theme:o,tierMarkerActive:i.tierMarkerActive,secondaryTierMarkerActive:i.secondaryTierMarkerActive,finishedInitialAnimation:i.finishedInitialAnimation,targetTier:i.targetTier,renderTierLabel:this.renderTierLabel,onSelect:this.handleSelectTier},e)},l.renderForegroundBar=function(){var e=this.state.finishedInitialAnimation,t=this.props,n=t.guild,r=t.initialAnimationDelay;return O(i.Spring,{from:{width:0},to:{width:(0,u.getProgressPercentToTopTier)(n)},config:T,delay:e?0:r,onChange:this.handleForegroundFrame,onRest:e?void 0:this.handleFinishedInitialAnimation},void 0,(function(e){var t=e.width;return O(i.animated.div,{className:_.default.barForeground,style:{width:t.interpolate((function(e){return e+"%"}))}})}))},l.renderSecondaryBar=function(){var e=this.state.targetTier,t=(0,u.getProgressPercentToTopTier)(this.props.guild),n=null!=e?100*e/u.GuildTierSubscriptionsOrdered.length:t;return O(i.Spring,{from:{width:t},to:{width:n},config:C,onChange:this.handleSecondaryFrame},void 0,(function(e){var t=e.width;return O(i.animated.div,{className:_.default.barSecondary,style:{width:t.interpolate((function(e){return e+"%"}))}})}))},l.render=function(){var e=this;return O("div",{className:(0,o.default)(this.props.className,_.default.progressBar)},void 0,O("div",{className:_.default.barBackground},void 0,this.state.hasTargetedTier?this.renderSecondaryBar():null,this.renderForegroundBar()),O("div",{className:_.default.tierMarkerContainer},void 0,N.map((function(t){return e.renderTierMarker(t.tier)}))))},r}(a.Component);t.default=L,L.displayName="PremiumGuildModalProgressBar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?6:t,r=e.height,a=void 0===r?11:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 6 11"}),s("path",{fill:d,className:f,d:"M3 0.625244L0 3.62524V7.62524L3 10.6252L6 7.62524V3.62524L3 0.625244ZM5 7.24524L3 9.24524L1 7.24524V4.04524L3 2.04524L5 4.04524V7.24524Z"}))}d.displayName="PremiumGuildTier1Simple"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("path",{d:"M3 0.625305L0 3.62531V7.62531L3 10.6253L6 7.62531V3.62531L3 0.625305ZM5 7.24531L3 9.24531L1 7.24531V4.04531L3 2.04531L5 4.04531V7.24531Z"}),f=s("path",{d:"M3.76 4.21526L3 3.45526L2 4.45526V5.97526L3.76 4.21526Z"}),c=s("path",{d:"M2.28003 7.11532L3.00003 7.83532L4.00003 6.83532V5.39532L2.28003 7.11532Z"});function p(e){var t=e.width,n=void 0===t?6:t,r=e.height,a=void 0===r?11:r,l=e.color,p=void 0===l?"currentColor":l,v=e.foreground,y=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(y),{width:n,height:a,viewBox:"0 0 6 11"}),s("g",{fill:p,fillRule:"evenodd",className:v},void 0,d,f,c))}p.displayName="PremiumGuildTier3Simple"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 32 32"}),s("path",{fill:d,className:f,d:"M16 1L7 10V22L16 31L25 22V10L16 1ZM20.62 11.27L16.5 7.16V2.91L23.62 10.03L20.62 11.27ZM12 19.93V12.07L16 8.07L20 12.07V19.93L16 23.93L12 19.93ZM15.5 7.16L11.38 11.28L8.38 10.04L15.5 2.91V7.16ZM11 12.2V19.8L8 21.04V10.96L11 12.2ZM11.38 20.73L15.5 24.85V29.09L8.38 21.97L11.38 20.73ZM16.5 24.84L20.62 20.72L23.62 21.96L16.5 29.09V24.84ZM21 19.8V12.2L24 10.96V21.05L21 19.8Z"}))}d.displayName="PremiumGuildTier1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 32 32"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M29 2C29 2.55 28.55 3 28 3C27.45 3 27 2.55 27 2V1C27 0.45 27.45 0 28 0C28.55 0 29 0.45 29 1V2ZM2.94 25.94L4 24L5.06 25.94L7 27L5.06 28.06L4 30L2.94 28.06L1 27L2.94 25.94ZM28 5C27.45 5 27 5.45 27 6V7C27 7.55 27.45 8 28 8C28.55 8 29 7.55 29 7V6C29 5.45 28.56 5 28 5ZM30 3H31C31.56 3 32 3.45 32 4C32 4.55 31.55 5 31 5H30C29.45 5 29 4.55 29 4C29 3.45 29.45 3 30 3ZM26 3H25C24.45 3 24 3.45 24 4C24 4.55 24.45 5 25 5H26C26.55 5 27 4.55 27 4C27 3.45 26.56 3 26 3ZM15.6201 1.46002V7.12002L11.5001 11.23L7.50012 9.58002L15.6201 1.46002ZM24.7401 9.58002L16.6201 1.46002V7.12002L20.7401 11.23L24.7401 9.58002ZM7.12012 10.5L11.1201 12.16V19.76L7.12012 21.42V10.5ZM16.6201 24.8V30.46L24.7401 22.34L20.7401 20.68L16.6201 24.8ZM15.6201 30.46L7.50012 22.34L11.5001 20.68L15.6201 24.8V30.46ZM21.1201 19.76L25.1201 21.42V10.5L21.1201 12.16V19.76ZM19.7301 11.64L20.1201 12.03V19.89L16.1201 23.89L12.1201 19.89V19.38L19.7301 11.64ZM12.1201 17.95L19.0201 10.93L18.2401 10.15L12.1201 16.38V17.95ZM17.5301 9.44002L12.1201 14.95V12.03L16.1201 8.03002L17.5301 9.44002Z"}))}d.displayName="PremiumGuildTier3"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,fillRule:"evenodd",clipRule:"evenodd",d:"M17 6V6.999H7C5.896 6.999 5 7.895 5 8.999V16H3C1.895 16 1 15.104 1 14V6C1 4.896 1.895 4 3 4H15C16.104 4 17 4.896 17 6ZM7 10.999C7 9.89502 7.896 8.99902 9 8.99902H21C22.104 8.99902 23 9.89502 23 10.999V18.999C23 20.103 22.104 20.999 21 20.999H9C7.896 20.999 7 20.103 7 18.999V10.999ZM11.828 14.462L9 18.999H21L17.023 12.618L13.85 17.706L11.828 14.462Z"}))}d.displayName="Pictures"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(5697),l=g(n(5832)),u=g(n(29)),s=g(n(371)),d=g(n(5828)),f=g(n(149)),c=g(n(5694)),p=g(n(5830)),v=g(n(47)),y=g(n(24)),m=n(5935),_=n(1),h=g(n(6)),E=g(n(7594));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}var T=function(e){var t=e.openPaymentModal,n=(0,m.generateBlockGuildSubscriptionPurchasesNode)();if(null!=n)return O(f.default,{text:n,"aria-label":!1},void 0,(function(e){return a.createElement(d.default,I({},e,{disabled:!0,size:u.default.Sizes.SMALL}),h.default.Messages.PREMIUM_GUILD_PERKS_MODAL_BUTTON_SUBSCRIBE_THIS_SERVER)}));return O(d.default,{onClick:function(){t({analyticsLocation:{page:_.AnalyticsPages.PREMIUM_GUILD_USER_MODAL,section:_.AnalyticsSections.PREMIUM_GUILD_USER_MODAL_CTA_BAR,object:_.AnalyticsObjects.BUTTON_CTA}})},size:u.default.Sizes.SMALL},void 0,h.default.Messages.PREMIUM_GUILD_PERKS_MODAL_BUTTON_SUBSCRIBE_THIS_SERVER)};T.displayName="PremiumGuildSubscribeButton";var C=function(e){var t=e.guild,n=e.closeLayer,r=e.openPaymentModal,a=(0,o.useStateFromStores)([l.default],(function(){return l.default.slots})),d=Object.keys(a).filter((function(e){var n=a[e];return null!=n.premiumGuildSubscription&&n.premiumGuildSubscription.guildId===t.id}));return O("div",{className:E.default.ctaBar},void 0,O(s.default,{guild:t,active:!0,size:s.default.Sizes.LARGE,className:E.default.guildIcon}),O("div",{className:E.default.guildDetails},void 0,O(v.default,{size:v.default.Sizes.SIZE_20,className:E.default.guildName},void 0,t.name),O("div",{className:E.default.guildSubscriptionInfo},void 0,O("div",{className:E.default.subscriberCountWrapper},void 0,O(p.default,{className:t.premiumSubscriberCount>0?E.default.badgeIconWithSubscribers:E.default.badgeIconWithoutSubscribers}),O(y.default,{className:E.default.guildSubscriptionInfoSubscriberCount},void 0,h.default.Messages.PREMIUM_GUILD_PERKS_MODAL_HEADER_SUBSCRIPTION_COUNT.format({subscriptions:t.premiumSubscriberCount}))),d.length>0?O(y.default,{className:E.default.userSubscriptionCount},void 0,h.default.Messages.PREMIUM_GUILD_PERKS_MODAL_HEADER_USER_SUBSCRIPTION_COUNT.format({numSubscriptions:d.length})):null)),O("div",{className:E.default.actions},void 0,O(T,{openPaymentModal:r}),O(u.default,{className:E.default.giftAction,innerClassName:E.default.giftActionContent,color:u.default.Colors.PRIMARY,onClick:function(){(0,i.openPremiumSubscriptionNewPlanModal)({planId:_.SubscriptionPlans.PREMIUM_MONTH_TIER_2,isGift:!0,analyticsLocation:{page:_.AnalyticsPages.PREMIUM_GUILD_USER_MODAL,section:_.AnalyticsSections.PREMIUM_GUILD_USER_MODAL_CTA_BAR,object:_.AnalyticsObjects.BUTTON_ICON,objectType:_.AnalyticsObjectTypes.GIFT},onClose:function(e){return e&&n()}})},size:u.default.Sizes.SMALL},void 0,O(c.default,{className:E.default.giftIcon}),h.default.Messages.PREMIUM_GUILD_PERKS_MODAL_GIFT_NITRO)))};C.displayName="PremiumGuildPerksModalCTABar";var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=n(3),l=g(n(469)),u=g(n(1147)),s=g(n(29)),d=g(n(55)),f=g(n(1164)),c=g(n(8518)),p=g(n(5827)),v=n(35),y=g(n(47)),m=g(n(24)),_=g(n(9607)),h=g(n(6)),E=g(n(7596));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,T(e,t)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=function(e){function t(){return e.apply(this,arguments)||this}return I(t,e),t.prototype.render=function(){var e=this.props.onClose;return O(v.ModalHeader,{separator:!1,justify:d.default.Justify.BETWEEN},void 0,O(y.default,{size:y.default.Sizes.SIZE_16},void 0,this.props.text),null!=e?O(v.ModalCloseButton,{onClick:e}):null)},t}(a.PureComponent);function b(e){var t=e.imageClass,n=e.children,r=e.error,a=e.onDismissError;return O("div",{className:E.default.content},void 0,O("div",{className:(0,o.default)(E.default.image,t)}),n,O(l.default,{},void 0,null!=r?O(c.default,{className:E.default.error},void 0,O(f.default,{onDismiss:a},void 0,r.message)):null))}C.displayName="ConfirmationHeader",b.displayName="Body";var M=function(e){var t=e.canceledCount,n=(0,i.useStateFromStores)([u.default],(function(){return u.default.getPremiumTypeSubscription()}));return null==n?null:O("div",{className:E.default.pendingCancellation},void 0,O(p.default,{className:E.default.pendingCancellationIcon}),O(m.default,{size:m.default.Sizes.SIZE_16,className:E.default.pendingCancellationMessage},void 0,h.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_CANCEL_WARNING.format({date:n.currentPeriodEnd,canceledCount:t})))};function N(e){var t=e.imageClass,n=e.blurb,r=e.guild,a=e.warning,o=e.error,i=e.onDismissError,l=e.slotCount,u=void 0===l?1:l,s=e.canceledCount,d=void 0===s?0:s;return O(b,{imageClass:t,error:o,onDismissError:i},void 0,O(m.default,{size:m.default.Sizes.SIZE_16},void 0,n),O(_.default,{className:E.default.guildCard,guild:r,subscriptionChange:u}),O(m.default,{size:m.default.Sizes.SIZE_16},void 0,a),d>0?O(M,{canceledCount:d}):null)}function A(e){var t,n,r=e.imageClass,o=e.blurb,i=e.fromGuilds,l=e.toGuild,u=e.error,s=e.onDismissError,d=e.slotCount,f=void 0===d?1:d,c=e.canceledCount,p=void 0===c?0:c,v=a.useRef(i),y=null===(t=v.current)||void 0===t?void 0:t.length,g=null===(n=v.current)||void 0===n?void 0:n.reduce((function(e,t){return e.hasOwnProperty(t.id)||(e[t.id]=[]),e[t.id].push(t),e}),{});return O(b,{imageClass:r,error:u,onDismissError:s},void 0,O(m.default,{size:m.default.Sizes.SIZE_16},void 0,o),O(m.default,{size:m.default.Sizes.SIZE_12,className:E.default.transferGuildCardHeader},void 0,h.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_TRANSFER_FROM_GUILD.format({guildCount:y})),null!=g?Object.keys(g).map((function(e){return O(_.default,{className:E.default.transferFromGuildCard,guild:g[e][0],subscriptionChange:-1*g[e].length},e)})):null,O(m.default,{size:m.default.Sizes.SIZE_12,className:E.default.transferGuildCardHeader},void 0,h.default.Messages.PREMIUM_GUILD_SUBSCRIBE_CONFIRM_TRANSFER_TO_GUILD.format({slotCount:f})),O("div",{className:E.default.activeTransferGuildCardBorder},void 0,O(_.default,{className:E.default.transferToGuildCard,guild:l,subscriptionChange:null!=i?i.length:1})),p>0?O(M,{canceledCount:p}):null)}M.displayName="PendingCancellationWarning",N.displayName="ConfirmationBody",A.displayName="TransferConfirmationBody";var P=function(e){function t(){return e.apply(this,arguments)||this}return I(t,e),t.prototype.render=function(){var e=this.props,t=e.confirmation,n=e.confirmationLabel,r=e.isModifyingSubscription,a=e.onConfirm,o=e.onCancel;return O(v.ModalFooter,{},void 0,O(s.default,{onClick:a,submitting:r,"aria-label":n},void 0,t),O(s.default,{look:s.default.Looks.LINK,color:s.default.Colors.PRIMARY,onClick:o,disabled:r},void 0,h.default.Messages.CANCEL))},t}(a.PureComponent);P.displayName="ConfirmationFooter";var R=function(e){function t(){return e.apply(this,arguments)||this}return I(t,e),t.prototype.render=function(){var e=this.props,t=e.guild,n=e.header,r=e.blurb,o=e.warning,i=e.confirmation,l=e.confirmationLabel,u=e.imageClass,s=e.error,d=e.isModifyingSubscription,f=e.onConfirm,c=e.onCancel,p=e.onDismissError,y=e.canceledCount;return O(a.Fragment,{},void 0,O(C,{text:n}),O(v.ModalContent,{},void 0,O(N,{guild:t,blurb:r,warning:o,imageClass:u,error:s,onDismissError:p,canceledCount:y})),O(P,{confirmation:i,confirmationLabel:l,isModifyingSubscription:d,onConfirm:f,onCancel:c}))},t}(a.PureComponent);R.displayName="PremiumGuildSubscriptionConfirmation",R.Header=C,R.SubscribeBody=N,R.TransferBody=A,R.Footer=P;var L=R;t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(1175)),l=c(n(371)),u=c(n(9608)),s=c(n(8656)),d=n(5935),f=c(n(7595));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props.tier;return v("div",{className:f.default.tierPill},void 0,v(i.default,{className:f.default.tierPillStar},void 0,v(s.default,{tier:e,className:f.default.tierPillGem})),(0,d.getTierName)(e))},t}(a.PureComponent);_.displayName="TierPill";var h=function(e){var t=e.subscriptionChange,n=e.guild;if(0===t)return null;var r=Math.max(n.premiumSubscriberCount+t,0),o=(0,d.getGuildTierFromSubscriberCount)(r),i=o-(0,d.getGuildTierFromSubscriberCount)(n.premiumSubscriberCount);return 0===i?null:a.createElement(a.Fragment,null,v(u.default,{className:i>0?f.default.levelUpIcon:f.default.levelDownIcon}),v(_,{tier:o}))},E=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.guild,n=e.className,r=e.subscriptionChange;return v("div",{className:(0,o.default)(f.default.subscription,n)},void 0,v(l.default,{guild:t,size:l.default.Sizes.LARGE}),v("div",{className:f.default.subscriptionInfo},void 0,v("div",{className:f.default.guildName},void 0,t.name),v("div",{className:f.default.tierInfo},void 0,v(_,{tier:t.premiumTier}),v(h,{guild:t,subscriptionChange:null!=r?r:0}))))},t}(a.PureComponent);t.default=E,E.displayName="GuildSubscriptionCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 16 16"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.45329 8.53891L3.26217 13.7844C2.95995 14.0719 2.49772 14.0719 2.21328 13.7844C1.92883 13.497 1.92883 13.0299 2.21328 12.7245L6.88884 7.99999L2.21328 3.27543C1.92883 2.988 1.92883 2.50297 2.21328 2.21555C2.49772 1.92812 2.95995 1.92812 3.26217 2.21555L8.45329 7.47903C8.73774 7.76645 8.73774 8.23352 8.45329 8.53891Z",fill:d}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.4533 8.53891L9.26217 13.7844C8.95995 14.0719 8.49772 14.0719 8.21328 13.7844C7.92883 13.497 7.92883 13.0299 8.21328 12.7245L12.8888 7.99999L8.21328 3.27543C7.92883 2.988 7.92883 2.50297 8.21328 2.21555C8.49772 1.92812 8.95995 1.92812 9.26217 2.21555L14.4533 7.47903C14.7377 7.76645 14.7377 8.23352 14.4533 8.53891Z",fill:d}))}d.displayName="DoubleChevronRight"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(8448)),o=d(n(5830)),i=d(n(9610)),l=d(n(24)),u=d(n(6)),s=d(n(7599));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=function(){return c("ul",{className:s.default.perks},void 0,[{icon:o.default,text:u.default.Messages.PREMIUM_GUILD_SUBSCRIBER_FEATURE_MEMBER_BADGE},{icon:i.default,text:u.default.Messages.PREMIUM_GUILD_SUBSCRIBER_FEATURE_PROFILE_BADGE},{icon:a.default,text:u.default.Messages.PREMIUM_GUILD_SUBSCRIBER_FEATURE_ROLE}].map((function(e,t){var n=e.icon;return c("li",{className:s.default.perk},t,c(n,{className:s.default.icon}),c(l.default,{size:l.default.Sizes.SIZE_14},void 0,e.text))})))};p.displayName="PremiumGuildSubscriberPerks";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(22)),l=u(n(7598));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){return f("path",{fill:e.fill,fillRule:"evenodd",className:e.className,d:"M4 20c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5s-.5.2-.5.5v1c0 .2.2.5.5.5zM4 24c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5s-.5.2-.5.5v1c0 .2.2.5.5.5zM5 21c0 .3.2.5.5.5h1c.3 0 .5-.3.5-.5 0-.3-.2-.5-.5-.5h-1c-.3 0-.5.2-.5.5zM1 21c0 .3.2.5.5.5h1c.3 0 .5-.3.5-.5 0-.3-.2-.5-.5-.5h-1c-.3 0-.5.2-.5.5zM2 13l.7 1.3L4 15l-1.3.7L2 17l-.7-1.3L0 15l1.3-.7L2 13zM22 7l.7 1.3L24 9l-1.3.7L22 11l-.7-1.3L20 9l1.3-.7L22 7zM10 14.7v.6l2 2 2-2v-4.6l-4 4zM10 13.3l4-4v-.6l-.1-.2-3.9 3.9v.9zM13.1 7.8L12 6.7l-2 2V11l3.1-3.2zM15 8.2L18 7l-6-6v4.2l3 3zM15 15.8l3 1.2-6 6v-4.2l3-3z"})};c.displayName="GemSheen";var p=f(c,{fill:"#fff"});function v(e){var t=e.width,n=void 0===t?24:t,r=e.height,u=void 0===r?24:r,s=e.color,v=void 0===s?"currentColor":s,y=e.foreground,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return a.createElement("svg",d({},(0,i.default)(m),{width:n,height:u,viewBox:"0 0 24 24",fill:"none"}),p,f("path",{fill:v,fillRule:"evenodd",clipRule:"evenodd",d:"M12 1L6 7V17L12 23V18.8L9 15.8V8.2L12 5.2V1ZM15 15.8L18 17V7L15 8.2V15.8Z"}),f(c,{fill:v,className:(0,o.default)(l.default.gemSheen,y)}))}v.displayName="PremiumGuildSubscriberBadgeLevel4"},function(e,t,n){e.exports=n.p+"50f02014a2ac385c90461d9a4b80e482.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=v(n(24)),l=v(n(1210)),u=n(8657),s=v(n(8924)),d=v(n(8925)),f=n(8658),c=v(n(6)),p=v(n(7376));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.channel,n=e.startThread,r=e.gotoThread,i=(0,u.useActiveThreads)(t),v=i.joinedThreadIds,y=i.unjoinedThreadIds,_=a.useCallback((function(e){return 0===e.section?m(h,{text:c.default.Messages.THREAD_BROWSER_JOINED_HEADER.format({count:v.length})},e.section):m(h,{text:c.default.Messages.THREAD_BROWSER_OTHER_HEADER.format({count:y.length}),divider:v.length>0},e.section)}),[v.length,y.length]),E=a.useCallback((function(e){return 1===e&&v.length>0?64:32}),[v.length]),g=a.useCallback((function(e){var t=0===e.section?v[e.row]:y[e.row];return m(d.default,{threadId:t,type:f.RowType.Active,gotoThread:r},e.section+"-"+e.row)}),[v,y,r]);return 0===v.length&&0===y.length?m(s.default,{channel:t,header:c.default.Messages.THREAD_BROWSER_EMPTY_STATE_ACTIVE_HEADER,startThread:n}):m(l.default,{className:(0,o.default)(p.default.list,p.default.activeThreadsList),fade:!0,sections:[v.length,y.length],sectionHeight:E,rowHeight:80,renderRow:g,renderSection:_,chunkSize:20})}function h(e){var t=e.text,n=e.divider;return a.createElement(a.Fragment,null,n?m("div",{className:p.default.divider}):null,m(i.default,{color:i.default.Colors.HEADER_SECONDARY,size:i.default.Sizes.SIZE_12,className:p.default.sectionHeader},void 0,t))}_.displayName="ActiveThreadsTab"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i,u=e.className,s=e.foreground;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:u},void 0,o("path",{className:s,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 18L12.75 6L11.25 6L11.25 18L12.75 18Z"}),o("path",{className:s,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 12.75C5.80964 12.75 5.25 13.3096 5.25 14V18H3.75V14C3.75 12.4812 4.98122 11.25 6.5 11.25H17.5C19.0188 11.25 20.25 12.4812 20.25 14V18H18.75V14C18.75 13.3096 18.1904 12.75 17.5 12.75H6.5Z"}),o("path",{className:s,fill:l,d:"M12 7C10.6193 7 9.5 5.88071 9.5 4.5C9.5 3.11929 10.6193 2 12 2C13.3807 2 14.5 3.11929 14.5 4.5C14.5 5.88071 13.3807 7 12 7Z"}),o("path",{className:s,fill:l,d:"M19.5 22C18.1193 22 17 20.8807 17 19.5C17 18.1193 18.1193 17 19.5 17C20.8807 17 22 18.1193 22 19.5C22 20.8807 20.8807 22 19.5 22Z"}),o("path",{className:s,fill:l,d:"M12 22C10.6193 22 9.5 20.8807 9.5 19.5C9.5 18.1193 10.6193 17 12 17C13.3807 17 14.5 18.1193 14.5 19.5C14.5 20.8807 13.3807 22 12 22Z"}),o("path",{className:s,fill:l,d:"M4.5 22C3.11929 22 2 20.8807 2 19.5C2 18.1193 3.11929 17 4.5 17C5.88071 17 7 18.1193 7 19.5C7 20.8807 5.88071 22 4.5 22Z"}))}i.displayName="ChannelDirectory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r,a=I(n(0)),o=S(n(9)),i=S(n(10)),l=S(n(1160)),u=S(n(151)),s=I(n(8293)),d=S(n(149)),f=S(n(8602)),c=S(n(24)),p=S(n(1210)),v=n(8657),y=n(1209),m=S(n(8924)),_=S(n(8925)),h=n(8658),E=S(n(6)),g=S(n(7376));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(){return(T=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}).apply(this,arguments)}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e){var t=e.channel,n=e.startThread,r=e.gotoThread,S=a.useState(v.PrivacyTab.Public),O=S[0],I=S[1],b=a.useState(!1),M=b[0],N=b[1],A=(0,y.useIsThreadModerator)(t),P=M&&A,R=O===v.PrivacyTab.Private&&!P;(0,v.useTrackThreadBrowserTab)(!1,{tab:O,moderatorView:P});var L=(0,v.useArchivedThreads)(t,O,P),D=L.threadIds,w=L.canLoadMore,j=L.loading,k=L.loadMore,U=a.useRef(null),G=a.useMemo((function(){var e,t;return C("div",{className:g.default.controls},void 0,C(s.default,{selectedItem:O,type:s.Types.TOP_PILL,onItemSelect:I,className:g.default.tabBar},"tabs",C(s.Item,{id:v.PrivacyTab.Public,className:(0,o.default)(g.default.tab,(e={},e[g.default.active]=O===v.PrivacyTab.Public,e))},void 0,E.default.Messages.THREAD_BROWSER_PUBLIC),C(s.Item,{id:v.PrivacyTab.Private,className:(0,o.default)(g.default.tab,(t={},t[g.default.active]=O===v.PrivacyTab.Private,t))},void 0,E.default.Messages.THREAD_BROWSER_PRIVATE)),A&&O===v.PrivacyTab.Private?C("div",{className:g.default.moderatorView},void 0,C(l.default,{value:M,onChange:function(e,t){return N(t)},className:g.default.checkbox,type:l.default.Types.INVERTED,size:20}),C(c.default,{size:c.default.Sizes.SIZE_16,color:c.default.Colors.INTERACTIVE_NORMAL},void 0,E.default.Messages.MODERATOR_VIEW,C(d.default,{text:E.default.Messages.MODERATOR_VIEW_TOOLTIP},void 0,(function(e){return a.createElement(f.default,T({},e,{className:g.default.infoIcon}))})))):null)}),[O,A,M]),F=a.useCallback((function(){return G}),[G]),B=a.useCallback((function(e){return C(_.default,{threadId:D[e.row],type:R?h.RowType.MyArchived:h.RowType.AllArchived,gotoThread:r},e.section+"-"+e.row)}),[D,R,r]),H=a.useCallback((function(){var e,t,n=null===(e=U.current)||void 0===e?void 0:e.getScrollerState();if(null!=n){var r=i.default.getChannel(D[D.length-1]);if(null!=r){var a=R?r.id:null===(t=r.threadMetadata)||void 0===t?void 0:t.archiveTimestamp;if(null!=a){var o=n.scrollTop+n.scrollHeight;n.offsetHeight-o<200&&k(a)}}}}),[D,k,R]);return 0===D.length?j?C("div",{className:g.default.list},void 0,G,C(u.default,{className:g.default.spinner}),";"):C("div",{className:g.default.list},void 0,G,C(m.default,{channel:t,header:E.default.Messages.THREAD_BROWSER_EMPTY_STATE_ARCHIVED_HEADER,startThread:n})):a.createElement(p.default,{ref:U,className:g.default.list,fade:!0,sections:[D.length],sectionHeight:64,rowHeight:80,renderRow:B,renderSection:F,chunkSize:20,onScroll:w?H:void 0})}b.displayName="ArchivedThreadsTab"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;var r,a=S(n(0)),o=E(n(9)),i=S(n(8311)),l=n(8278),u=n(9616),s=E(n(8640)),d=E(n(61)),f=E(n(8606)),c=E(n(8443)),p=E(n(8266)),v=E(n(150)),y=n(121),m=n(1),_=E(n(6)),h=E(n(7606));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return O("div",{className:h.default.spine})}I.displayName="renderIconSpine";var T=O(f.default,{});function C(e){var t,r=e.message,f=e.onClickUsername,E=e.onContextMenuUsername,g=e.compact,S=r.application;if(null==S||null==S.name)return null;var C,b=(0,u.getApplicationCommand)(r.content);if(null==b)return null;if(!g){var M,N=null!==(M=v.default.getApplicationIconURL({id:S.id,icon:S.icon}))&&void 0!==M?M:n(1321);C=O("img",{alt:"","aria-hidden":!0,className:h.default.avatar,src:N})}var A=_.default.Messages.SYSTEM_MESSAGE_APPLICATION_COMMAND_USED.format({usernameHook:function(){return O(s.default,{className:h.default.username,message:r,compact:g,onClick:f,onContextMenu:E},r.author.id)},commandNameHook:function(){return O(d.default,{className:h.default.command,onClick:function(){return e=b,t=""+l.COMMAND_SENTINEL+e.name,y.ComponentDispatch.dispatchToLastSubscribed(m.ComponentActions.INSERT_TEXT,{content:t}),void i.setPreferredCommandId(e.id);var e,t}},b.id,"/",b.name)},applicationNameHook:function(){return O("span",{className:h.default.application},S.id,C,S.name)}}),P=O(c.default,{timestamp:r.timestamp,compact:g});if(g){var R,L=a.createElement(a.Fragment,null,P,b.hasOptions?I():null);return O(p.default,{className:(0,o.default)(h.default.messageApplicationCommand,(R={},R[h.default.compact]=!0,R)),iconNode:L,iconContainerClassName:h.default.messageIconContainer,compact:!0},void 0,O("div",{className:h.default.header},void 0,A),b.hasOptions?O("div",{className:h.default.content},void 0,b.content):null)}var D=a.createElement(a.Fragment,null,T,b.hasOptions?I():null);return O(p.default,{className:(0,o.default)(h.default.messageApplicationCommand,(t={},t[h.default.compact]=g,t)),iconNode:D,iconContainerClassName:h.default.messageIconContainer},void 0,O("div",{className:h.default.header},void 0,A,P),b.hasOptions?O("div",{className:(0,o.default)(h.default.cozy,h.default.content)},void 0,b.content):null)}C.displayName="ApplicationCommand"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationCommand=function(e){var t=r.exec(e);if(null==t)return null;t[0];var n=t[1],a=t[2],o=t[3];if(null==n||null==a)return null;return{content:"/"+n+(null!=o?" "+o:""),name:n,id:a,hasOptions:!!o}};var r=/<\/([^\s]+):(\d+)>(?:\s?(.*))?/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(682)),o=l(n(8266)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.message,r=e.compact,l=e.missed,u=e.joinable,d=e.onClickUsername,f=e.onContextMenuUsername,c=e.onClickJoinCall,p=(0,a.default)(t).nick,v=function(e){var t=null!=e.call?e.call.duration:null;return null!=t?t.humanize():null}(t),y={onClick:d,onContextMenu:f};return l?s(o.default,{icon:n(9618),timestamp:t.timestamp,compact:r},void 0,null!=v?i.default.Messages.SYSTEM_MESSAGE_CALL_MISSED_WITH_DURATION.format({username:p,usernameOnClick:y,callDuration:v}):i.default.Messages.SYSTEM_MESSAGE_CALL_MISSED.format({username:p,usernameOnClick:y})):s(o.default,{icon:n(9619),timestamp:t.timestamp,compact:r},void 0,null!=v?i.default.Messages.SYSTEM_MESSAGE_CALL_STARTED_WITH_DURATION.format({username:p,usernameOnClick:y,callDuration:v}):i.default.Messages.SYSTEM_MESSAGE_CALL_STARTED.format({username:p,usernameOnClick:y}),u?s(o.default.Action,{onClick:c},void 0,i.default.Messages.SYSTEM_MESSAGE_JOIN_CALL):null)}d.displayName="Call"},function(e,t,n){e.exports=n.p+"d80d1fdc43a3c42134a31a39581160ac.svg"},function(e,t,n){e.exports=n.p+"7f75ab26bc5deb393cd8db44d9fe14e7.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(1311)),i=d(n(271)),l=d(n(278)),u=d(n(8266)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.children,n=e.messageReference;if(null==n)return p(i.default,{},void 0,t);var r=p(o.default,{messageReference:n});return p(l.default,{position:l.default.Positions.RIGHT,renderPopout:function(){return r}},void 0,(function(e){e["aria-controls"],e["aria-expanded"];var n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["aria-controls","aria-expanded"]);return a.createElement(i.default,n,t)}))}v.displayName="WebhookName";var y=function(e){var t,r;function a(){return e.apply(this,arguments)||this}return r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,c(t,r),a.prototype.render=function(){var e=this.props,t=e.onClickUsername,r=e.message,a=e.onContextMenuUsername,o=e.compact,i=r.author,l=r.content,d=r.timestamp,f=r.messageReference,c=s.default.Messages.SYSTEM_MESSAGE_CHANNEL_FOLLOW_ADD.format({username:i.toString(),usernameOnClick:{onClick:t,onContextMenu:a},webhookName:l,webhookNameHook:function(e,t){return p(v,{messageReference:f},t,e)}});return p(u.default,{icon:n(8519),timestamp:d,compact:o},void 0,c)},a}(a.Component);t.default=y,y.displayName="ChannelFollowAdd"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(682)),o=l(n(8266)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.message,r=e.onClickUsername,l=e.onContextMenuUsername,u=e.compact,d=(0,a.default)(t).nick;return s(o.default,{icon:n(8926),timestamp:t.timestamp,compact:u},void 0,i.default.Messages.SYSTEM_MESSAGE_CHANNEL_ICON_CHANGE.format({username:d,usernameOnClick:{onClick:r,onContextMenu:l}}))}d.displayName="ChannelIconChange"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(682)),o=s(n(271)),i=s(n(8266)),l=s(n(6)),u=s(n(7607));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.message,r=e.onClickUsername,s=e.onContextMenuUsername,d=e.compact,c=(0,a.default)(t),p=c.nick,v=c.colorString;return f(i.default,{compact:d,className:u.default.channelNameChange,icon:n(8926),timestamp:t.timestamp},void 0,null==v?l.default.Messages.SYSTEM_MESSAGE_CHANNEL_NAME_CHANGE.format({username:p,usernameOnClick:{onClick:r,onContextMenu:s},channelName:t.content}):l.default.Messages.SYSTEM_MESSAGE_CHANNEL_NAME_CHANGE2.format({username:p,usernameHook:function(e,t){var n=v?{color:v}:null;return f(o.default,{onClick:r,onContextMenu:s,style:n},t,e)},channelName:t.content}))}c.displayName="ChannelNameChange"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(390)),o=s(n(682)),i=s(n(271)),l=s(n(8266)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.message,r=e.onClickUsername,s=e.onContextMenuUsername,d=e.onClickPins,c=e.compact,p=(0,o.default)(t),v=p.nick,y=p.colorString,m=function(e,t){var n=y?{color:y}:null;return f(i.default,{onClick:r,onContextMenu:s,style:n},t,e)},_=function(){if(null!=t.messageReference){var e=t.messageReference,n=e.channel_id,r=e.message_id;a.default.jumpToMessage({channelId:n,messageId:r,flash:!0})}};return f(l.default,{icon:n(9624),timestamp:t.timestamp,compact:c},void 0,null!=t.messageReference?null==d?u.default.Messages.SYSTEM_MESSAGE_PINNED_MESSAGE_NO_CTA_FORMATTED_WITH_MESSAGE.format({usernameOnClick:m,username:v,messageOnClick:_}):u.default.Messages.SYSTEM_MESSAGE_PINNED_MESSAGE_WITH_MESSAGE.format({usernameHook:m,username:v,pinsActionOnClick:d,messageOnClick:_}):null==d?u.default.Messages.SYSTEM_MESSAGE_PINNED_MESSAGE_NO_CTA_FORMATTED.format({usernameOnClick:m,username:v}):u.default.Messages.SYSTEM_MESSAGE_PINNED_MESSAGE.format({usernameHook:m,username:v,pinsActionOnClick:d}))}c.displayName="ChannelPinnedMessage"},function(e,t,n){e.exports=n.p+"5da4cdab01d4d89c593c48c62ae0d937.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIKitGuildDiscoveryDisqualified=f,t.UIKitGuildDiscoveryRequalified=c,t.UIKitGuildDiscoveryGracePeriodInitialWarning=p,t.UIKitGuildDiscoveryGracePeriodFinalWarning=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(5827)),o=u(n(8266)),i=u(n(6)),l=u(n(7608));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.message,r=e.compact,a=e.onClick;return d(o.default,{icon:n(9626),timestamp:t.timestamp,compact:r,contentClassName:l.default.messageContent},void 0,i.default.Messages.SYSTEM_MESSAGE_GUILD_DISCOVERY_DISQUALIFIED.format({onClick:a}))}function c(e){var t=e.message,r=e.compact;return d(o.default,{icon:n(9627),timestamp:t.timestamp,compact:r,contentClassName:l.default.messageContent},void 0,i.default.Messages.SYSTEM_MESSAGE_GUILD_DISCOVERY_REQUALIFIED)}function p(e){var t=e.message,n=e.compact;return d(o.default,{iconNode:d(a.default,{className:l.default.alertIcon}),timestamp:t.timestamp,compact:n,contentClassName:l.default.messageContent},void 0,i.default.Messages.SYSTEM_MESSAGE_GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING)}function v(e){var t=e.message,n=e.compact;return d(o.default,{iconNode:d(a.default,{className:l.default.alertIcon}),timestamp:t.timestamp,compact:n,contentClassName:l.default.messageContent},void 0,i.default.Messages.SYSTEM_MESSAGE_GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING)}f.displayName="UIKitGuildDiscoveryDisqualified",c.displayName="UIKitGuildDiscoveryRequalified",p.displayName="UIKitGuildDiscoveryGracePeriodInitialWarning",v.displayName="UIKitGuildDiscoveryGracePeriodFinalWarning"},function(e,t,n){e.exports=n.p+"c7078943fc392e7dede27a20e6cfdcfb.svg"},function(e,t,n){e.exports=n.p+"86b5987e685f72352730d56690393fc8.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(682)),o=s(n(8520)),i=s(n(8266)),l=s(n(8414)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=f(o.default,{width:20,height:20});function p(e){var t,n=e.message,r=e.channel,o=e.playingActivity,s=e.onJoinStream,d=e.onClickUsername,p=e.onContextMenuUsername,v=e.compact,y=(0,a.default)(n).nick,m=null===(t=n.call)||void 0===t?void 0:t.duration,_=u.default.Messages.SYSTEM_MESSAGE_GUILD_STREAM_ACTIVE.format({username:y,activityName:null!=o?o.name:"unknown",onJoinStream:s,usernameOnClick:{onClick:d,onContextMenu:p}});return null!=m&&(_=u.default.Messages.SYSTEM_MESSAGE_GUILD_STREAM_ENDED.format({username:y,duration:m.humanize(),channelName:r.name,usernameOnClick:{onClick:d,onContextMenu:p}})),f(i.default,{iconNode:null!=m?c:f(l.default,{size:l.default.Sizes.SMALL}),timestamp:n.timestamp,compact:v},void 0,_)}p.displayName="GuildStream"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(8283)),i=n(1389),l=y(n(15)),u=y(n(271)),s=y(n(29)),d=y(n(8266)),f=n(41),c=n(1),p=y(n(6)),v=y(n(7613));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e){var t,r=e.compact,y=e.isOwner,m=e.channel,E=function(){var e=l.default.getGuild(m.getGuildId());null!=e&&((0,f.openModal)((function(t){return a.createElement(o.default,h({},t,{guild:e,channel:m,source:c.InstantInviteSources.INVITE_SYSTEM_MESSAGE}))})),(0,i.trackGuildInviteNotificationAction)())},g=function(e,t){return _(u.default,{className:v.default.inviteLink,onClick:E},t,e)};return t=r?_("div",{className:v.default.inviteContent},void 0,y?p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS_OWNER_COMPACT.format({inviteHook:g}):p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS_COMPACT.format({inviteHook:g})):_("div",{className:v.default.content},void 0,_("div",{className:v.default.inviteHeader},void 0,y?p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS_OWNER:p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS),_("div",{className:v.default.inviteContent},void 0,y?p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS_DESCRIPTION_OWNER:p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS_DESCRIPTION),_(s.default,{onClick:E,size:s.default.Sizes.SMALL,className:v.default.inviteButton},void 0,p.default.Messages.SYSTEM_MESSAGE_INVITE_USERS_BUTTON)),_(d.default,{className:r?v.default.compact:v.default.inviteContent,iconNode:r?null:_("img",{alt:"",src:n(9634),width:40,height:40}),iconContainerClassName:v.default.iconContainer,compact:r},void 0,t)}E.displayName="InviteUsersReminderMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadInviteSuggestions=function(e,t,n){return(0,o.fetchUserAffinities)().then((function(){a.default.dispatch({type:i.ActionTypes.LOAD_INVITE_SUGGESTIONS,omitUserIds:e||new Set,guild:t,channel:n})}))},t.searchInviteSuggestions=function(e){a.default.dispatch({type:i.ActionTypes.INVITE_SUGGESTIONS_SEARCH,query:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(9132),i=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InvitePropertiesType=void 0;var r=u(n(391)),a=u(n(390)),o=u(n(26)),i=u(n(10)),l=u(n(1388));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d;t.InvitePropertiesType=d,function(e){e[e.GROUP_DM=0]="GROUP_DM",e[e.USER=1]="USER"}(d||(t.InvitePropertiesType=d={}));var f=new(function(e){var t,n;function l(){return e.call(this,new o.default("InviteQueue"),1010)||this}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var u=l.prototype;return u._sendInvite=function(e,t,n,r,o){a.default.sendInvite(e.id,t,n,r).then((function(){return o(null,!0)}),(function(){return o(null,!1)}))},u.drain=function(e,t){var n=this,a=e.code,o=e.location,l=e.suggested;switch(e.type){case d.GROUP_DM:this._sendInvite(e.channel,a,o,l,t);break;case d.USER:r.default.ensurePrivateChannel(e.user.id).then((function(e){var r=i.default.getChannel(e);null!=r&&n._sendInvite(r,a,o,l,t)}),(function(){return t(null,!1)}))}},l}(l.default));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=n(8286),i=u(n(70)),l=u(n(8415));n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c,p,v,y,m=new Set,_=[],h=new Map;function E(e){var t=new Set,n=null==y?void 0:y.id,r=(0,o.getMostRecentDMedUser)(m,n);r&&!i.default.isBlocked(r.id)&&t.add(r.id);for(var a,u=d(l.default.getUserAffinities());!(a=u()).done;){var s=a.value.user_id;i.default.isBlocked(s)||t.add(s)}return(0,o.generateRowsForQuery)(e,m,t,100,n)}function g(e){_=e,h=new Map,e.forEach((function(e,t){h.set(e,{index:t})}))}var S=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.getInviteSuggestionRows=function(){return _},a.getTotalSuggestionsCount=function(){return p},a.getInitialCounts=function(){return c},a.getSelectedInviteMetadata=function(e){var t=h.get(e),n=l.default.getUserAffinitiesUserIds();return null!=t?{rowNum:t.index,isAffinitySuggestion:e.isSuggested,numTotal:_.length,numAffinityConnections:n.size,isFiltered:v}:null},r}(r.default.Store))(a.default,{LOAD_INVITE_SUGGESTIONS:function(e){var t=e.omitUserIds,n=e.guild,r=e.channel;y=null==r?n:null,m=t,v=!1;var a=E(""),o=a.rows,i=a.counts;g(o),c=i,p=_.length},INVITE_SUGGESTIONS_SEARCH:function(e){var t=e.query;v=""!==t,g(E(t).rows)}});t.default=S},function(e,t,n){e.exports=n.p+"cf3e2e7f108d20c8d804a13c9067f5a6.svg"},function(e,t,n){e.exports=n.p+"121cb07065820e8ebb8c5218cae21d57.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(682)),o=l(n(8266)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.message,r=e.otherUsername,l=e.onClickUsername,u=e.onContextMenuUsername,d=e.onClickOtherUsername,f=e.onContextMenuOtherUsername,c=e.compact,p=(0,a.default)(t).nick,v=i.default.Messages.SYSTEM_MESSAGE_RECIPIENT_ADD.format({username:p,usernameOnClick:{onClick:l,onContextMenu:u},otherUsername:r,otherUsernameOnClick:{onClick:d,onContextMenu:f}});return s(o.default,{icon:n(8519),timestamp:t.timestamp,compact:c},void 0,v)}d.displayName="RecipientAdd"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(682)),o=l(n(8266)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t,r=e.message,l=e.onClickUsername,u=e.onContextMenuUsername,d=e.compact,f=(0,a.default)(r).nick;if(e.otherUsername){var c=e.otherUsername,p=e.onClickOtherUsername,v=e.onContextMenuOtherUsername;t=i.default.Messages.SYSTEM_MESSAGE_RECIPIENT_REMOVE.format({username:f,usernameOnClick:{onClick:l,onContextMenu:u},otherUsername:c,otherUsernameOnClick:{onClick:p,onContextMenu:v}})}else t=i.default.Messages.SYSTEM_MESSAGE_RECIPIENT_REMOVE_SELF.format({username:f,usernameOnClick:{onClick:l,onContextMenu:u}});return s(o.default,{icon:n(8927),timestamp:r.timestamp,compact:d},void 0,t)}d.displayName="RecipientRemove"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(682)),o=d(n(271)),i=d(n(8287)),l=d(n(8266)),u=d(n(6)),s=d(n(7614));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.message,n=e.compact,r=e.onClickUsername,d=e.onContextMenuUsername,f=e.onClickThread,p=e.onClickViewThreads,v=e.onContextMenuThread,y=(0,a.default)(t),m=y.nick,_=y.colorString,h=u.default.Messages.SYSTEM_MESSAGE_THREAD_CREATED.format({actorName:m,actorHook:function(e,t){var n=_?{color:_}:null;return c(o.default,{onClick:r,onContextMenu:d,style:n},t,e)},threadName:t.content,threadOnClick:{onClick:f,onContextMenu:v},viewThreadsOnClick:p});return c(l.default,{iconNode:c(i.default,{className:s.default.icon}),timestamp:t.timestamp,compact:n},void 0,h)}p.displayName="ThreadCreated"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;d(n(0));var r,a=d(n(682)),o=u(n(271)),i=u(n(8266)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.message,r=e.channel,u=e.targetUser,s=e.onClickActor,d=e.onContextMenuActor,c=e.onClickTarget,p=e.onContextMenuTarget,v=e.compact,y=(0,a.default)(t),m=(0,a.useNullableUserAuthor)(u,r),_=l.default.Messages.SYSTEM_MESSAGE_THREAD_MEMBER_ADD.format({actorName:y.nick,actorHook:function(e,t){var n=y.colorString?{color:y.colorString}:null;return f(o.default,{onClick:s,onContextMenu:d,style:n},t,e)},targetName:null==m?void 0:m.nick,targetHook:function(e,t){var n=(null==m?void 0:m.colorString)?{color:m.colorString}:null;return f(o.default,{onClick:c,onContextMenu:p,style:n},t,e)}});return f(i.default,{icon:n(8519),timestamp:t.timestamp,compact:v},void 0,_)}c.displayName="ThreadMemberAdd"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;d(n(0));var r,a=d(n(682)),o=u(n(271)),i=u(n(8266)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.message,r=e.channel,u=e.targetUser,s=e.onClickActor,d=e.onContextMenuActor,c=e.onClickTarget,p=e.onContextMenuTarget,v=e.compact,y=(0,a.default)(t),m=(0,a.useNullableUserAuthor)(u,r),_=l.default.Messages.SYSTEM_MESSAGE_THREAD_MEMBER_REMOVE.format({actorName:y.nick,actorHook:function(e,t){var n=y.colorString?{color:y.colorString}:null;return f(o.default,{onClick:s,onContextMenu:d,style:n},t,e)},targetName:null==m?void 0:m.nick,targetHook:function(e,t){var n=(null==m?void 0:m.colorString)?{color:m.colorString}:null;return f(o.default,{onClick:c,onContextMenu:p,style:n},t,e)}});return f(i.default,{icon:n(8927),timestamp:t.timestamp,compact:v},void 0,_)}c.displayName="ThreadMemberRemove"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(8287)),o=u(n(8266)),i=u(n(6)),l=u(n(7615));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.message,n=e.compact;return d(o.default,{iconNode:d(a.default,{className:l.default.icon}),timestamp:t.timestamp,compact:n},void 0,i.default.Messages.THREAD_STARTER_MESSAGE_NOT_LOADED)}f.displayName="ThreadStarterMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(8266)),o=i(n(8659));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.message,r=e.onClickUsername,i=e.onContextMenuUsername,l=e.compact,s=t.id,d=t.author,f=o.default.getSystemMessageUserJoin(s).format({username:d.username,usernameOnClick:{onClick:r,onContextMenu:i}});return u(a.default,{icon:n(8519),timestamp:t.timestamp,compact:l},void 0,f)}s.displayName="UserJoin"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=O(n(9)),u=n(1250),s=n(123),d=n(682),f=O(n(9643)),c=O(n(61)),p=n(9133),v=O(n(6001)),y=O(n(5830)),m=O(n(9134)),_=O(n(8266)),h=n(5935),E=n(1),g=O(n(6)),S=O(n(7617));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(){return(M=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}).apply(this,arguments)}var N;!function(e){e.ENTER="enter",e.CONFETTI="confetti",e.LEAF_PEEL="leaf_peel",e.LEAF_FALL="leaf_fall",e.EXIT="exit"}(N||(N={}));var A,P=((r={})[N.ENTER]={BEG:0,END:22},r[N.CONFETTI]={BEG:23,END:119},r[N.LEAF_PEEL]={BEG:120,END:160},r[N.LEAF_FALL]={BEG:161,END:163},r[N.EXIT]={BEG:164,END:200},r);!function(e){e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT"}(A||(A={}));var R=[A.TOP_LEFT,A.TOP_RIGHT],L=(0,u.cssValueToNumber)(S.default.easterEggSize),D={leafX:0,leafY:0,leafSprites:[],leafRotationIncremental:0},w=Object.freeze(((a={})[A.TOP_LEFT]={x:L-11,y:L-125,angle:45,leafX:85,leafY:125,leafSprites:[n(9644)],leafRotationIncremental:.06},a[A.TOP_RIGHT]={x:11,y:L-125,angle:315,leafX:66,leafY:125,leafSprites:[n(9645)],leafRotationIncremental:-.06},a[A.BOTTOM_LEFT]=M({},D,{x:L-11,y:125,angle:135}),a[A.BOTTOM_RIGHT]=M({},D,{x:11,y:125,angle:225}),a)),j={sprites:[n(9135),n(9646),n(9647),n(9648),n(9649)],colors:[E.Colors.PREMIUM_GUILD_PINK,"#FFC0FF","#FFD836","#FF9A15","#A5F7DE","#51BC9D","#AEC7FF","#3E70DD"],fireCount:10,count:5,size:12,sizeSpread:7,angle:170,angleSpread:120,velocity:65,velocitySpread:50},k=M({},j,{count:j.count*j.fireCount,fireCount:1}),U={colors:["#61D5B2"],fireCount:1,count:1,angleSpread:0,size:45,sizeSpread:0,skew:.1,skewSpread:0,skewAngleIncremental:.01,velocity:1,velocitySpread:0,minRotation:0,maxRotation:0,dragCoefficient:.001,interval:0};function G(){switch(Math.floor(Math.random()*Object.keys(A).length)){case 0:return A.TOP_LEFT;case 2:return A.TOP_RIGHT;case 3:return A.BOTTOM_LEFT;case 4:default:return A.BOTTOM_RIGHT}}var F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={animationRef:null,scene:null,position:G(),showAnimationLeaf:!0,fireFallingLeaf:!1,fireConfetti:!1},t.handleEasterEggScenePlay=function(e){t.setState({scene:e})},t.handleEasterEggSceneComplete=function(e){switch(e){case N.EXIT:return t.props.onAnimationComplete()}},t.handleSetAnimationRef=function(e){t.setState({animationRef:e})},t}C(t,e);var r=t.prototype;return r.loadEasterEggAnimation=function(){return n.e(25).then(n.t.bind(null,10572,3)).then((function(e){return e.default}))},r.getNextScene=function(){var e=this.state.scene;if(null==e)return N.ENTER;switch(e){case N.ENTER:return N.CONFETTI;case N.CONFETTI:return R.includes(this.state.position)?N.LEAF_PEEL:N.EXIT;case N.LEAF_PEEL:return N.LEAF_FALL;case N.LEAF_FALL:return N.EXIT;case N.EXIT:return N.ENTER}},r.render=function(){var e,t=this.props,n=t.canvasProps,r=t.parentRef,a=this.state,o=a.scene,u=a.animationRef,s=a.position,d=w[s],f=R.includes(s),c=0,y=0,m=0,_=0;if(null!=o&&null!=u&&r){var h=r.getBoundingClientRect(),E=u.getBoundingClientRect(),g=E.left-h.left,O=E.top-h.top;m=(g+d.x)/h.width*100,_=(O+d.y)/h.height*100,f&&(c=(g+d.leafX)/h.width*100,y=(O+d.leafY)/h.height*100)}var I=this.getNextScene(),C=f&&o===N.LEAF_FALL,b=f&&o===N.EXIT,L=o===N.CONFETTI;return i.createElement(i.Fragment,null,null!=I?T(v.default,{animationRef:this.handleSetAnimationRef,className:(0,l.default)(S.default.easterEggAnimation,(e={},e[S.default.easterEggAnimationTopLeft]=s===A.TOP_LEFT,e[S.default.easterEggAnimationTopRight]=s===A.TOP_RIGHT,e[S.default.easterEggAnimationBottomLeft]=s===A.BOTTOM_LEFT,e[S.default.easterEggAnimationBottomRight]=s===A.BOTTOM_RIGHT,e[S.default.easterEggAnimationHideLeaf]=b,e)),nextScene:I,sceneSegments:P,onScenePlay:this.handleEasterEggScenePlay,onSceneComplete:this.handleEasterEggSceneComplete,importData:this.loadEasterEggAnimation,pauseWhileUnfocused:!1}):null,i.createElement(p.ConfettiCannon,M({},n,k,{angle:d.angle,position:{x:m,y:_},firing:L})),f?i.createElement(p.ConfettiCannon,M({},n,U,{className:S.default.cannon,sprites:d.leafSprites,position:{x:c,y:y},angle:d.angle,minRotationIncremental:d.leafRotationIncremental,maxRotationIncremental:d.leafRotationIncremental,firing:C})):null)},t}(i.Component);F.displayName="EasterEggAnimation";var B=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={iconRef:null,confettiCannonRef:null,fireCannon:!1,showEasterEgg:!1},t.handleIconMouseEnter=function(){t.state.showEasterEgg||0!==Math.floor(50*Math.random())?t.setState({fireCannon:!0}):t.setState({showEasterEgg:!0})},t.handleIconMouseLeave=function(){t.setState({fireCannon:!1})},t.handleEasterEggAnimationComplete=function(){t.setState({showEasterEgg:!1})},t.handleSetIconRef=function(e){t.setState({iconRef:e})},t.handleSetConfettiCannonRef=function(e){t.setState({confettiCannonRef:e})},t}C(t,e);var n=t.prototype;return n.renderConfetti=function(){var e=this,t=this.state,n=t.iconRef,r=t.confettiCannonRef,a=t.fireCannon,o=t.showEasterEgg,l=0,u=0;if(null!=r&&null!=n){var s=r.getBoundingClientRect(),d=n.getBoundingClientRect(),f=d.left-s.left+d.width/2,c=d.top-s.top+d.height/2;l=f/s.width*100,u=c/s.height*100}return T(m.default,{},void 0,i.createElement("div",{className:S.default.cannonWrapper,ref:this.handleSetConfettiCannonRef},null!=r?T(p.ConfettiCanvas,{className:S.default.cannon},void 0,(function(t){return i.createElement(i.Fragment,null,o?T(F,{canvasProps:t,parentRef:r,onAnimationComplete:e.handleEasterEggAnimationComplete}):null,i.createElement(p.ConfettiCannon,M({},t,j,{position:{x:l,y:u},firing:a})))})):null))},n.render=function(){var e,t=this.props,n=t.message,r=t.onClickUsername,a=t.onContextMenuUsername,o=t.onClickMessage,i=t.guild,l=t.compact,u=function(e){switch(e.type){case E.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1:return E.PremiumGuildTiers.TIER_1;case E.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2:return E.PremiumGuildTiers.TIER_2;case E.MessageTypes.USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3:return E.PremiumGuildTiers.TIER_3}return null}(n),s=(0,f.default)(n),p=this.context.reducedMotion,v=(0,d.getMessageAuthor)(n).nick,m={onClick:r,onContextMenu:a};e=null==u||null==i?s>1?g.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_SUBSCRIBED_MANY.format({username:v,usernameOnClick:m,numSubscriptions:s}):g.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_SUBSCRIBED.format({username:v,usernameOnClick:m}):s>1?g.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_SUBSCRIBED_MANY_ACHIEVED_TIER.format({username:v,usernameOnClick:m,numSubscriptions:s,guildName:i.name,newTierName:(0,h.getTierName)(u)}):g.default.Messages.SYSTEM_MESSAGE_GUILD_MEMBER_SUBSCRIBED_ACHIEVED_TIER.format({username:v,usernameOnClick:m,guildName:i.name,newTierName:(0,h.getTierName)(u)});var O=T(c.default,{className:S.default.iconWrapper,innerRef:this.handleSetIconRef,onClick:o},void 0,T(y.default,{className:S.default.icon,onMouseEnter:this.handleIconMouseEnter,onMouseLeave:this.handleIconMouseLeave}));return T(_.default,{iconNode:O,timestamp:n.timestamp,compact:l},void 0,T("div",{onClick:o,className:S.default.message},void 0,e),p.enabled?null:this.renderConfetti())},t}(i.PureComponent);t.default=B,B.displayName="UserPremiumGuildSubscription",B.contextType=s.AccessibilityPreferencesContext},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=Number(e.content);return isNaN(t)||0===t?1:t}},function(e,t,n){e.exports=n.p+"65e856f0d3fa6f1c3bc728d421240da2.svg"},function(e,t,n){e.exports=n.p+"584625557b31e29b44a3bb2f4cd7e33a.svg"},function(e,t,n){e.exports=n.p+"bb738a64264307f6a4a3e84e5f1eddb6.svg"},function(e,t,n){e.exports=n.p+"e843c51c0eec3801b70cae5c45ad343f.svg"},function(e,t,n){e.exports=n.p+"0700205862c1a590feed964754d34669.svg"},function(e,t,n){e.exports=n.p+"6b6d88307890126be8b60125143bc2f4.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(391)),o=n(8253),i=u(n(10)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){var n=i.default.getChannel(e);return null==n||n.isMultiUserDM()?null:d(o.MenuItem,{id:"close-dm",label:l.default.Messages.CLOSE_DM,action:function(){return a.default.closePrivateChannel(e,t)}})}f.displayName="useCloseDMItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(391)),i=n(8253),l=n(8256),u=f(n(10)),s=f(n(12)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){var n=(0,a.useStateFromStores)([s.default],(function(){return s.default.getCurrentUser()}),[]),r=(0,a.useStateFromStores)([u.default],(function(){return u.default.getChannel(t)}),[t]);return null==r||r.isOwner(e)||!r.isOwner(n.id)?null:p(i.MenuItem,{id:"remove",label:d.default.Messages.REMOVE_FROM_GROUP,action:function(){return o.default.removeRecipient(t,e)},color:l.MenuItemColor.DANGER})}v.displayName="useRemoveUserFromGroupItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(9653));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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}).apply(this,arguments)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={hasSeenSurvey:!1},f=d,c=!1;function p(e){return null!=e&&!f.hasSeenSurvey&&(o.default.trackExposure({}),o.default.getCurrentConfig({}).showJoinSurvey&&(c=!0,f.hasSeenSurvey=!0),!0)}var v=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a,o,i,p=r.prototype;return p.initialize=function(e){f=l({},d,{},e)},p.getState=function(){return f},a=r,(o=[{key:"isShowingSurvey",get:function(){return c}},{key:"hasSeenSurvey",get:function(){return f.hasSeenSurvey}}])&&u(a.prototype,o),i&&u(a,i),r}(r.default.PersistedStore);v.persistKey="GuildJoinReasonStore";var y=new v(a.default,{GUILD_JOIN:function(e){return p(e.guildId)},INVITE_ACCEPT_SUCCESS:function(e){var t;return p(null===(t=e.invite.guild)||void 0===t?void 0:t.id)},GUILD_JOIN_SURVEY_CLOSE:function(e){c=!1}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-04_new_user_guild_join_survey",label:"Survey when a new user joins a server",defaultConfig:{showJoinSurvey:!1},treatments:[{id:1,label:"Show survey",config:{showJoinSurvey:!0}}]});t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.NUF_MODAL_KEY=t.NUFSlides=void 0,t.NUFSlides=r,function(e){e.AGE_GATE="age-gate",e.CHOOSE_TEMPLATE="choose-template",e.CUSTOMIZE_GUILD="customize-server",e.CHANNEL_PROMPT="channel-prompt",e.JOIN_GUILD="join-server",e.CREATION_INTENT="creation-intent",e.COMPLETE="complete"}(r||(t.NUFSlides=r={}));t.NUF_MODAL_KEY="nuf-refresh-modal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(9)),o=i(n(7936));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var u=r.forwardRef((function(e,t){var n,i=e.children,l=e.className,u=e.style,s=e.noBorder,d=void 0!==s&&s;return r.createElement("div",{className:(0,a.default)(l,o.default.tile,(n={},n[o.default.noBorder]=d,n)),style:u,ref:t},i)}));t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(9)),i=n(122),l=n(1250),u=n(3),s=n(10936),d=n(8296),f=n(123),c=A(n(8752)),p=n(280),v=A(n(12)),y=A(n(61)),m=A(n(149)),_=A(n(5686)),h=n(41),E=n(8263),g=R(n(8414)),S=A(n(13)),O=A(n(96)),I=n(774),T=A(n(10348)),C=n(1),b=A(n(6)),M=A(n(7941)),N=A(n(7399));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return(D=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}).apply(this,arguments)}var w=(0,l.cssValueToNumber)(N.default.borderRadius),j={opacity:0,transform:"translate3d(100%, 0, 0)"},k={opacity:1,transform:"translate3d(0%, 0, 0)"},U={opacity:0},G={opacity:1},F={borderRadius:w+"px "+w+"px "+w+"px "+w+"px"},B={borderRadius:"0px "+w+"px "+w+"px 0px"},H={mass:1,tension:500,friction:18,clamp:!0},x=function(e){var t=e.participant,n=e.isUpsellEnabled,r=e.shape,i=e.size,l=e.didTrackUpsellViewed,s=e.setDidTrackUpsellViewed,f=e.className,N=(0,I.getMaxQuality)(t),A=null!=(0,T.default)(t.id),P=(0,I.isPremiumFPS)(N),R=(0,I.isPremiumResolution)(N),w=P||R,j=(0,d.useAnalyticsContext)().location,k=(0,u.useStateFromStores)([v.default],(function(){return v.default.getCurrentUser()})),U=n&&!O.default.isPremium(k,C.PremiumTypes.TIER_1),G=a.useCallback((function(){U&&w&&(0,h.openModal)((function(e){return a.createElement(c.default,D({},e,{analyticsSource:j}))}))}),[U,w,j]);if(a.useEffect((function(){!l&&w&&(S.default.track(C.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:p.PremiumUpsellTypes.STREAM_QUALITY_INDICATOR,has_premium_stream_fps:P,has_premium_stream_resolution:R}),s(!0))}),[P,R,w,l,s]),null==N)return null;var F=L(m.default,{text:A?b.default.Messages.SCREENSHARE_QUALITY_TOOLTIP_REDUCED:w?b.default.Messages.SCREENSHARE_QUALITY_TOOLTIP_PREMIUM:b.default.Messages.SCREENSHARE_QUALITY_TOOLTIP_NORMAL,position:m.default.Positions.BOTTOM,color:m.default.Colors.GREY},void 0,(function(e){var t;return a.createElement(y.default,D({},e,{onClick:G,className:(0,o.default)(M.default.qualityIndicator,i,g.LiveIndicatorShapes[r],A?M.default.qualityIndicatorLowQuality:M.default.qualityIndicatorFullQuality,(t={},t[M.default.clickable]=U&&w,t))}),w?L(_.default,{className:M.default.premiumStreamIcon}):null,L("span",{className:M.default.qualityResolution},void 0,(0,I.getResolutionText)(N.maxResolution)),L("span",{},void 0,(0,I.getFPSText)(N.maxFrameRate)))}));return L(E.TextBadge,{text:F,className:f,color:C.Colors.PRIMARY_DARK_700,shape:r})};x.displayName="StreamQualityIndicator";var V=function(e){var t=e.participant,n=e.showQuality,r=e.isUpsellEnabled,l=void 0===r||r,u=e.size,d=e.className,c=a.useState(!1),p=c[0],v=c[1],y=(0,I.getMaxQuality)(t),m=a.useContext(f.AccessibilityPreferencesContext).reducedMotion,_=(0,s.useStreamQualityIndicatorExperiment)(null!=y)[0].showIndicator,h=n&&_&&null!=y,S=(0,i.useTransition)(h,{enter:{from:m.enabled?U:j,to:m.enabled?G:k},leave:m.enabled?U:j,config:H}),O=(0,i.useSpring)({to:h?B:F,config:H});return L("div",{className:(0,o.default)(M.default.streamQualityIndicator,d)},void 0,S((function(e,n){return n?L(i.animated.div,{style:e},void 0,L(x,{className:M.default.liveQualityIndicator,participant:t,size:u,shape:E.BadgeShapes.ROUND_LEFT,isUpsellEnabled:l,didTrackUpsellViewed:p,setDidTrackUpsellViewed:v})):null})),L(i.animated.div,{style:O,className:M.default.liveIndicator},void 0,L(g.default,{size:u,shape:E.BadgeShapes.SQUARE})))};V.displayName="StreamQualityLiveIndicator";var W=V;t.default=W},function(e,t,n){e.exports=n.p+"3f8ff16e485080df4e54267370420785.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8753)),o=l(n(55)),i=l(n(7943));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.mainText,n=e.supportingText,r=e.children,l=e.size;return s(o.default,{className:i.default.root,justify:o.default.Justify.CENTER,align:o.default.Align.CENTER,direction:o.default.Direction.VERTICAL},void 0,s(a.default,{header:t,description:n,size:l}),r)}d.displayName="ScreenMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a({},e);(function(e){var t=e;return"object"==typeof t.args&&"string"==typeof t.cmd})(t)&&(t=function(e){switch(e.cmd){case r.RPCCommands.AUTHENTICATE:return a({},e,{args:a({},e.args,{access_token:"<removed>"})});default:return a({},e)}}(t));(function(e){var t=e;return"object"==typeof t.data&&"string"==typeof t.cmd})(t)&&(t=function(e){switch(e.cmd){case r.RPCCommands.AUTHENTICATE:return a({},e,{data:a({},e.data,{access_token:"<removed>"})});default:return a({},e)}}(t));return t};var r=n(1);function a(){return(a=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(8)),a=i(n(689)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,n){if(this.transport=e,this.version=t,this.encoding=n,this.id=r.default.uniqueId(),this.authorization={authing:!1,scopes:[],accessToken:null,expires:new Date(0)},this.application={id:null,name:null,icon:null},!t||t>o.RPC_VERSION||t<1)throw new a.default(o.RPCCloseCodes.INVALID_VERSION,"Invalid Version: "+t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(8940)),l=g(n(8755)),u=g(n(10)),s=g(n(12)),d=g(n(278)),f=g(n(8367)),c=g(n(9677)),p=g(n(248)),v=g(n(96)),y=g(n(8400)),m=g(n(8288)),_=n(1),h=g(n(6)),E=g(n(7636));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t=e.className;return I(f.default,{className:t})}T.displayName="SettingsIcon";var C=I(T,{});function b(e){var t=e.className;return I(a.Fragment,{},void 0,I(p.default,{className:t,mask:p.default.Masks.HEADER_BAR_BADGE},void 0,C),I(c.default,{className:E.default.badgeUpgrade}))}function M(e){var t=e.hideBadges,n=void 0!==t&&t,r=e.stream,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["hideBadges","stream"]),c=(0,o.useStateFromStores)([s.default],(function(){return v.default.isPremium(s.default.getCurrentUser())})),p=(0,o.useStateFromStores)([u.default],(function(){return u.default.getChannel(null==r?void 0:r.channelId)})),E=a.useMemo((function(){return null!=r?[r]:[]}),[r]),g=a.useCallback((function(){null!=p&&(0,l.default)(p.getGuildId(),p.id,_.AnalyticsSections.STREAM_SETTINGS)}),[p]);if(null==r||null==p)return null;var S=T;return n||c||(S=b),I(d.default,{position:d.default.Positions.TOP,renderPopout:function(e){var t=e.closePopout;return I(y.default,{},void 0,I(i.default,{channel:p,currentUser:s.default.getCurrentUser(),activeStreams:E,onClose:t,showReportOption:!0,handleGoLive:g}))},animation:d.default.Animation.FADE},void 0,(function(e){return a.createElement(m.default,O({},e,{label:h.default.Messages.STREAMER_SETTINGS_TITLE,iconComponent:S},f))}))}b.displayName="UpgradeSettingsIcon",M.displayName="StreamSettingsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(8551)),i=E(n(8552)),l=E(n(29)),u=E(n(55)),s=n(131),d=n(35),f=n(41),c=n(374),p=E(n(24)),v=E(n(9098)),y=E(n(9099)),m=E(n(6)),_=E(n(7622)),h=E(n(7623));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=S(o.default,{}),C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={problem:null},t.handleChanged=function(e){t.setState({problem:null!=e?e:null})},t.handleSubmit=function(){var e=t.props,n=e.stream,r=e.streamApplication,o=e.analyticsData,l=e.onClose,u=t.state.problem;(0,y.default)(u,n,"",r,o,"Stream"),l(),(0,f.openModal)((function(e){return a.createElement(i.default,O({body:m.default.Messages.STREAM_REPORTED_BODY},e))}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n),r.prototype.render=function(){var e=this.props,t=e.isStreamer,n=e.transitionState,r=e.onClose,a=this.state.problem;return S(d.ModalRoot,{transitionState:n,size:d.ModalSize.SMALL,"aria-label":m.default.Messages.STREAM_REPORT_A_PROBLEM},void 0,T,S(d.ModalHeader,{separator:!1},void 0,S(d.ModalCloseButton,{className:h.default.closeButton,onClick:r}),S(s.FormTitle,{tag:s.FormTitle.Tags.H2,className:h.default.title},void 0,m.default.Messages.STREAM_REPORT_A_PROBLEM)),S(d.ModalContent,{className:h.default.content},void 0,S(p.default,{},void 0,m.default.Messages.STREAM_REPORT_PROBLEM_BODY),S(s.FormItem,{title:m.default.Messages.STREAM_REPORT_LABEL},void 0,S(c.SingleSelect,{placeholder:m.default.Messages.STREAM_REPORT_PLACEHOLDER,options:(0,v.default)(t,!1),onChange:this.handleChanged,value:a,maxVisibleItems:4})),S("div",{className:_.default.art})),S(d.ModalFooter,{className:h.default.footer},void 0,S(l.default,{color:l.default.Colors.BRAND,disabled:null==a,onClick:this.handleSubmit},void 0,m.default.Messages.STREAM_REPORT_SUBMIT),S(u.default,{},void 0,S(l.default,{look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY,size:l.default.Sizes.NONE,onClick:r},void 0,m.default.Messages.CANCEL))))},r}(a.PureComponent);C.displayName="ReportProblem";var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.useStateFromStoresObject)([c.default],(function(){return c.default.getState()})),r=n.preset,S=n.resolution,O=n.fps,C=(0,o.useStateFromStores)([v.default],(function(){var e;return null!==(e=v.default.getDesktopSource())&&void 0!==e?e:{id:null}})).id,b=(0,o.useStateFromStores)([y.default],(function(){var e;return null===(e=y.default.getNullableCurrentUser())||void 0===e?void 0:e.premiumType})),M=(0,o.useStateFromStores)([p.default],(function(){var t;return null===(t=p.default.getGuild(null==e?void 0:e.guildId))||void 0===t?void 0:t.premiumTier})),N=(0,u.useAnalyticsContext)().location,A=a.useCallback((function(e,n,r,o){e?l.default.setDesktopSource(C,s.ApplicationStreamPresets.PRESET_CUSTOM,n,r,!0,i.MediaEngineContextTypes.STREAM):function(e,t){(0,m.openModal)((function(e){return a.createElement(h.default,T({},e,{analyticsSource:t}))}),{},e===E.AppContext.POPOUT?_.POPOUT_MODAL_CONTEXT:_.DEFAULT_MODAL_CONTEXT)}(t,T({},N,{object:E.AnalyticsObjects.RADIO_ITEM,objectType:o}))}),[t,N,C]);if(null==e)return null;var P=r===s.ApplicationStreamPresets.PRESET_DOCUMENTS?s.ApplicationStreamFPS.FPS_30:O,R=s.ApplicationStreamFPSButtonsWithSuffixLabel.map((function(e){var t=e.value,n=e.label,r=(0,d.default)(s.ApplicationStreamPresets.PRESET_CUSTOM,S,t,b,M);return I(f.MenuRadioItem,{group:"stream-settings-fps",id:"stream-settings-fps-"+t,label:n,checked:t===O,action:function(){return A(r,S,t,E.AnalyticsObjectTypes.RESOLUTION)}},"stream-settings-fps-"+t)})),L=s.ApplicationStreamResolutionButtonsWithSuffixLabel.map((function(e){var t=e.value,n=e.label,r=(0,d.default)(s.ApplicationStreamPresets.PRESET_CUSTOM,t,P,b,M);return I(f.MenuRadioItem,{group:"stream-settings-resolution",id:"stream-settings-resolution-"+t,label:n,checked:t===S,action:function(){return A(r,t,P,E.AnalyticsObjectTypes.RESOLUTION)}},"stream-settings-resolution-"+t)}));return a.createElement(a.Fragment,null,I(f.MenuGroup,{label:g.default.Messages.SCREENSHARE_FRAME_RATE},void 0,R),I(f.MenuGroup,{label:g.default.Messages.STREAM_RESOLUTION},void 0,L))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(34),l=S(n(288)),u=n(8296),s=n(713),d=S(n(8453)),f=n(8253),c=S(n(1185)),p=S(n(15)),v=S(n(51)),y=S(n(12)),m=n(41),_=n(217),h=S(n(8752)),E=n(1),g=S(n(6));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(){return(T=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(null==e||null==e.userPremiumType&&null==e.guildPremiumTier)return!0;var r=!1;null!=e.userPremiumType&&(r=r||o.default.isPremiumAtLeast(t,e.userPremiumType));null!=e.guildPremiumTier&&(r=r||(0,a.isGuildPremiumAtLeast)(n,e.guildPremiumTier));return r};var r,a=n(5935),o=(r=n(96))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(311)),i=m(n(79)),l=m(n(29)),u=m(n(55)),s=n(35),d=m(n(47)),f=m(n(24)),c=m(n(13)),p=n(1),v=m(n(6)),y=m(n(370));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClose=function(){var e=t.props.onClose;e&&e()},t.handleStreamWithoutSound=function(){var e=t.props,n=e.handleStream,r=e.onClose,a=e.pid;o.default.continueNonelevatedProcess(a),n(),r()},t.handleRequestElevated=function(){var e=t.props,n=e.handleStream,r=e.onClose,a=e.pid;o.default.requestElevatedProcess(a),n(),r()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props.pid,t=null!=e?i.default.getGameForPID(e):null;c.default.track(p.AnalyticEvents.OPEN_MODAL,{type:"Elevated Permissions Sound",application_id:null!=t?t.id:null,application_name:null!=t?t.name:null,game_id:null!=t?t.id:null})},a.render=function(){return h(s.ModalRoot,{transitionState:this.props.transitionState,"aria-label":v.default.Messages.ELEVATED_PERMISSIONS_SOUND_TITLE},void 0,h(s.ModalHeader,{justify:u.default.Justify.BETWEEN,separator:!1},void 0,h(d.default,{tag:d.default.Tags.H2,size:d.default.Sizes.SIZE_20},void 0,v.default.Messages.ELEVATED_PERMISSIONS_SOUND_TITLE),h(s.ModalCloseButton,{onClick:this.handleClose})),h(s.ModalContent,{},void 0,h(f.default,{tag:"strong",size:f.default.Sizes.SIZE_16,className:y.default.marginBottom20},void 0,v.default.Messages.ELEVATED_PERMISSIONS_SOUND_BODY)),h(s.ModalFooter,{},void 0,h(l.default,{onClick:this.handleRequestElevated},void 0,v.default.Messages.ELEVATED_PERMISSIONS_SOUND_REQUEST_ACCESS_BUTTON),h(l.default,{look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY,onClick:this.handleStreamWithoutSound},void 0,v.default.Messages.ELEVATED_PERMISSIONS_SOUND_NO_SOUND_BUTTON)))},r}(a.Component);g.displayName="ElevatedPermissionsSound";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){for(var r,l=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(a.ApplicationStreamPresetValues[e]);!(r=l()).done;){var u=r.value;if((0,o.default)(e,u.resolution,u.fps,t,n))return[u.resolution,u.fps]}return null};var r,a=n(713),o=(r=n(8453))&&r.__esModule?r:{default:r};function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=V;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=U(n(473)),l=U(n(10)),u=U(n(71)),s=U(n(15)),d=U(n(51)),f=U(n(79)),c=U(n(36)),p=U(n(710)),v=U(n(29)),y=U(n(55)),m=U(n(477)),_=U(n(371)),h=n(131),E=U(n(8662)),g=U(n(5827)),S=U(n(9668)),O=U(n(24)),I=n(48),T=U(n(16)),C=U(n(8757)),b=U(n(1248)),M=U(n(9669)),N=U(n(9670)),A=U(n(9671)),P=U(n(8948)),R=U(n(9672)),L=U(n(8949)),D=n(1),w=U(n(6)),j=U(n(7631)),k=U(n(7348));function U(e){return e&&e.__esModule?e:{default:e}}function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(e){var t=e.selectedSource,n=e.selectSource,r=e.sourceChanged,a=e.onChangeSource,i=(0,o.useStateFromStores)([f.default,p.default],(function(){return T.default.isWindows()?(0,b.default)(f.default,p.default):null})),l=(0,o.useStateFromStores)([u.default],(function(){return null!=(null==i?void 0:i.id)?u.default.getGame(i.id):null})),s=(0,o.useStateFromStores)([f.default],(function(){return f.default.getRunningGames()})),d=(0,o.useStateFromStores)([u.default],(function(){return s.map((function(e){return null!=e.id?u.default.getGame(e.id):null})).filter(I.isNotNullish)}),[s]),c=null;if(null!=t?c=t.name:null!=i&&(c=i.name),null==c)return null;var y=(0,L.default)(i,t,s),_=r?d.find((function(e){return e.id===(null==y?void 0:y.id)})):l,g=null!=t&&t.id.startsWith("screen")?E.default:S.default;return F(h.FormItem,{title:w.default.Messages.GO_LIVE_MODAL_APPLICATION_FORM_TITLE,className:k.default.modalContent,titleClassName:k.default.formItemTitle},void 0,F(P.default,{},void 0,null!=_?F(m.default,{game:_,size:m.default.Sizes.XSMALL,className:j.default.selectedIcon}):F(g,{className:j.default.selectedIcon}),F("span",{className:j.default.ellipsisText},void 0,c),n?F(v.default,{className:j.default.changeButton,color:v.default.Colors.PRIMARY,size:v.default.Sizes.SMALL,onClick:a},void 0,w.default.Messages.CHANGE):null))}function H(e){var t=e.onChange,n=e.guildId,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuild(n)}));return null==r?(t(),null):F(h.FormItem,{title:w.default.Messages.GO_LIVE_MODAL_GUILD_FORM_TITLE,className:k.default.modalContent,titleClassName:k.default.formItemTitle},void 0,F(P.default,{},void 0,F(_.default,{guild:r,size:_.default.Sizes.SMALLER,className:j.default.selectedIcon}),F("span",{className:j.default.ellipsisText},void 0,r.toString()),F(v.default,{className:j.default.changeButton,color:v.default.Colors.PRIMARY,size:v.default.Sizes.SMALL,onClick:t},void 0,w.default.Messages.CHANGE)))}function x(e){var t=e.text;return F(y.default,{align:y.default.Align.CENTER,className:j.default.warning},void 0,F(g.default,{className:j.default.warningIcon}),F(O.default,{color:O.default.Colors.CUSTOM,size:O.default.Sizes.SIZE_12},void 0,t))}function V(e){var t=e.selectedSource,n=e.selectedFPS,r=e.selectedChannelId,u=e.selectedPreset,s=e.selectedResolution,f=e.showExtendedSettings,p=e.sourceChanged,v=e.guildId,y=e.selectSource,m=e.selectGuild,_=e.onClose,h=e.onChangeSelectedFPS,E=e.onChangeSelectedResolution,g=e.onChangeSelectedPreset,S=e.onChangeSelectedChannelId,O=e.onChangeSource,I=e.onChangeGuild,T=(0,o.useStateFromStores)([c.default,l.default],(function(){return l.default.getChannel(c.default.getVoiceChannelId())})),b=(0,o.useStateFromStores)([C.default],(function(){return C.default.GPUDriversOutdated})),P=(0,o.useStateFromStores)([d.default],(function(){return d.default.getSoundshareEnabled()})),L=(0,M.default)();return null!=t&&t.id.startsWith("screen")?L=w.default.Messages.GO_LIVE_SCREENSHARE_NO_SOUND:null==L&&d.default.supportsEnableSoundshare()&&P!==D.SoundshareEnableState.ENABLED&&(L=w.default.Messages.GO_LIVE_SCREENSHARE_ENABLE_FOR_SOUNDSHARE.format({onVoiceSettingsClick:function(){_(),i.default.open(D.UserSettingsSections.VOICE)}})),F(a.Fragment,{},void 0,F(B,{selectSource:y,sourceChanged:p,onChangeSource:O,selectedSource:t}),null!=L?F(x,{text:L}):null,m&&null!=v?F(H,{guildId:v,onChange:I}):null,null!=T?F(A.default,{channel:T}):F(N.default,{guildId:v,selectedChannelId:r,onChangeSelectedChannelId:S}),b?F(x,{text:w.default.Messages.GO_LIVE_VIDEO_DRIVERS_OUTDATED}):null,F(R.default,{selectedPreset:u,selectedFPS:n,selectedResolution:s,guildId:v,showExtendedSettings:f,onClose:_,onFPSChange:h,onResolutionChange:E,onPresetChange:g}))}B.displayName="SelectedSource",H.displayName="SelectedGuild",x.displayName="Warning",V.displayName="Confirm"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M22 7.002V5C22 3.898 21.104 3 20 3H4C2.897 3 2 3.898 2 5V7.002H22ZM8 4C8.553 4 9 4.448 9 5C9 5.553 8.553 6 8 6C7.447 6 7 5.553 7 5C7 4.448 7.447 4 8 4ZM5 4C5.553 4 6 4.448 6 5C6 5.553 5.553 6 5 6C4.447 6 4 5.553 4 5C4 4.448 4.447 4 5 4Z"}),s("path",{fill:d,d:"M2 8.00201V19C2 20.103 2.897 21 4 21H20C21.104 21 22 20.103 22 19V8.00201H2Z"}))}d.displayName="Window"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!l.default.supports(a.Features.SOUNDSHARE))return o.GO_LIVE_SCREENSHARE_NO_SOUND;if(u.default.isWindows()&&!r.default.satisfies(null===i.default||void 0===i.default?void 0:i.default.os.release,s.WINDOWS_SOUNDSHARE_VERSION))return d.default.Messages.GO_LIVE_SCREENSHARE_UPDATE_WINDOWS_FOR_SOUNDSHARE;if(u.default.isOSX()&&!r.default.satisfies(null===i.default||void 0===i.default?void 0:i.default.os.release,s.DARWIN_SOUNDSHARE_VERSION))return d.default.Messages.GO_LIVE_SCREENSHARE_UPDATE_MACOS_FOR_SOUNDSHARE;return null};var r=f(n(1290)),a=n(34),o=n(1300),i=f(n(118)),l=f(n(51)),u=f(n(16)),s=n(196),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=m(n(86)),i=m(n(15)),l=m(n(40)),u=m(n(12)),s=m(n(365)),d=m(n(1162)),f=n(484),c=m(n(8945)),p=m(n(8946)),v=m(n(6)),y=m(n(7627));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.selectedChannelId,n=e.guildId,r=e.onChangeSelectedChannelId,m=(0,a.useStateFromStores)([u.default],(function(){return u.default.getCurrentUser()})),_=(0,a.useStateFromStores)([i.default,o.default,l.default],(function(){return(0,f.getStreamEligibleChannels)(o.default.getChannels(n),i.default,l.default)})),E=(0,a.useStateFromStores)([s.default],(function(){return s.default.getVoiceStates(n)})),g=_.map((function(e){var n;return{name:h(c.default,{channel:e,users:null===(n=E[e.id])||void 0===n?void 0:n.filter((function(e){return e.user.id!==m.id})).map((function(e){return e.user})),selected:e.id===t}),value:e.id}}));return h(p.default,{title:v.default.Messages.GO_LIVE_MODAL_SELECT_CHANNEL_FORM_TITLE},void 0,h(d.default,{options:g,value:t,itemInfoClassName:y.default.channelInfoWrapper,itemTitleClassName:y.default.channelTitleWrapper,onChange:function(e){var t=e.value;return r(t)}}))}E.displayName="ChannelSelect"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(11)),i=c(n(365)),l=n(131),u=c(n(8945)),s=c(n(8948)),d=c(n(6)),f=c(n(7348));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.channel,n=(0,a.useStateFromStores)([o.default],(function(){return o.default.getId()})),r=(0,a.useStateFromStores)([i.default],(function(){return i.default.getVoiceStatesForChannel(t)}),[t]);return v(l.FormItem,{title:d.default.Messages.GO_LIVE_MODAL_CURRENT_CHANNEL_FORM_TITLE,className:f.default.modalContent,titleClassName:f.default.formItemTitle},void 0,v(s.default,{},void 0,v(u.default,{channel:t,users:r.filter((function(e){return e.user.id!==n})).map((function(e){return e.user}))})))}y.displayName="CurrentChannel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=L;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=n(3),l=M(n(8257)),u=M(n(8942)),s=n(8296),d=M(n(8752)),f=M(n(15)),c=M(n(12)),p=M(n(9673)),v=M(n(55)),y=n(149),m=n(131),_=n(41),h=n(374),E=M(n(24)),g=n(713),S=M(n(8453)),O=n(1),I=M(n(6)),T=M(n(7348)),C=M(n(7630)),b=M(n(370));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t,n,r,i,l){var u,s,f,c=e.value,p=e.label;return n?(s=P(y.TooltipContainer,{text:I.default.Messages.STREAM_QUALITY_UNLOCK},void 0,P(v.default,{align:v.default.Align.CENTER},void 0,P(E.default,{size:E.default.Sizes.SIZE_12,className:C.default.selectorNitroText},void 0,p))),f=function(){return(0,_.openModal)((function(e){return a.createElement(d.default,A({},e,{onCloseParent:l,analyticsSource:r}))}))}):(s=P(E.default,{size:E.default.Sizes.SIZE_12,className:t?C.default.selectorTextSelected:C.default.selectorText},void 0,p),f=function(){return i(c)}),{content:s,className:(0,o.default)(t?C.default.selectorButtonSelected:C.default.selectorButton,(u={},u[C.default.selectorButtonPremiumRequired]=n,u)),onClick:f}}function L(e){var t=e.onClose,n=e.selectedPreset,r=e.selectedResolution,o=e.selectedFPS,y=e.showExtendedSettings,M=e.onResolutionChange,N=e.onFPSChange,L=e.onPresetChange,D=e.guildId,w=(0,i.useStateFromStores)([c.default],(function(){return c.default.getCurrentUser().premiumType})),j=(0,i.useStateFromStores)([f.default],(function(){var e;return null===(e=f.default.getGuild(D))||void 0===e?void 0:e.premiumTier})),k=(0,s.useAnalyticsContext)().location;a.useEffect((function(){u.default.trackExposure({})}));var U=A({},k,{section:O.AnalyticsSections.STREAM_SETTINGS}),G=P(p.default,{buttons:(y?g.ApplicationStreamResolutionButtonsExtended:g.ApplicationStreamResolutionButtons).map((function(e){return R(e,e.value===r,!(0,S.default)(n,e.value,o,w,j),U,(function(){return M(e.value)}),t)}))}),F=P(p.default,{buttons:g.ApplicationStreamFPSButtons.map((function(e){return R(e,e.value===o,!(0,S.default)(n,r,e.value,w,j),U,(function(){return N(e.value)}),t)}))});if(y){var B=[{value:g.ApplicationStreamPresets.PRESET_VIDEO,label:I.default.Messages.STREAM_PRESET_VIDEO},{value:g.ApplicationStreamPresets.PRESET_DOCUMENTS,label:I.default.Messages.STREAM_PRESET_DOCUMENTS},{value:g.ApplicationStreamPresets.PRESET_CUSTOM,label:I.default.Messages.STREAM_PRESET_CUSTOM}],H=null!=w,x=P(E.default,{size:E.default.Sizes.SIZE_12,className:C.default.documentModeDescription},void 0,H?I.default.Messages.STREAM_PRESET_DOCUMENTS_DESCRIPTION_NITRO.format({fps:o}):I.default.Messages.STREAM_PRESET_DOCUMENTS_DESCRIPTION_NON_NITRO.format({fps:o,onUpgrade:function(){return(0,_.openModal)((function(e){return a.createElement(d.default,A({},e,{onCloseParent:t,analyticsSource:U}))}))}})),V=n===g.ApplicationStreamPresets.PRESET_DOCUMENTS?P(v.default,{},void 0,P(m.FormItem,{title:I.default.Messages.STREAM_RESOLUTION,titleClassName:T.default.formItemTitleSlim,className:C.default.documentModeGroup},void 0,x)):P(v.default,{},void 0,P(m.FormItem,{title:I.default.Messages.STREAM_RESOLUTION,className:C.default.settingsGroup,titleClassName:T.default.formItemTitleSlim},void 0,G),P(m.FormItem,{title:I.default.Messages.SCREENSHARE_FRAME_RATE,className:C.default.settingsGroup,titleClassName:T.default.formItemTitleSlim},void 0,F));return a.createElement(l.default,U,P(m.FormItem,{title:I.default.Messages.STREAM_QUALITY,titleClassName:T.default.formItemTitle,className:T.default.modalContent},void 0,P("div",{className:C.default.qualitySettingsContainer},void 0,P(h.SingleSelect,{value:n,className:b.default.marginTop8,options:B,onChange:function(e){return L(e)}}),V)))}return a.createElement(l.default,U,P(v.default,{className:T.default.modalContent},void 0,P(m.FormItem,{title:I.default.Messages.STREAM_RESOLUTION,className:C.default.settingsGroup,titleClassName:T.default.formItemTitle},void 0,G),P(m.FormItem,{title:I.default.Messages.SCREENSHARE_FRAME_RATE,className:C.default.settingsGroup,titleClassName:T.default.formItemTitle},void 0,F)))}L.displayName="StreamSettings"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(88)),i=l(n(7629));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.data,n=e.disabled,r=t.content,l=t.className,u=t.onClick,d=t.disabled;return s(o.default,{},void 0,s("button",{type:"button",className:(0,a.default)(i.default.item,l),onClick:u,disabled:n||d},void 0,r))};d.displayName="Button";var f=function(e){var t=e.buttons,n=e.disabled,r=e.className;return s("div",{role:"group",className:(0,a.default)(i.default.group,r)},void 0,t.map((function(e,t){return s(d,{data:e,disabled:n},t)})))};f.displayName="ButtonGroup";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;O(n(0));var r,a=g(n(9)),o=g(n(8)),i=n(3),l=O(n(86)),u=g(n(15)),s=g(n(40)),d=g(n(361)),f=g(n(61)),c=g(n(371)),p=g(n(683)),v=g(n(24)),y=n(484),m=g(n(8946)),_=g(n(6)),h=g(n(7348)),E=g(n(7632));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t=e.guildId,n=e.onClick,r=(0,i.useStateFromStores)([u.default],(function(){return u.default.getGuild(t)})),a=(0,i.useStateFromStores)([l.default,u.default,s.default],(function(){return l.default.getChannels(t)[l.GUILD_VOCAL_CHANNELS_KEY].some((function(e){var t=e.channel;return(0,y.canStreamInChannel)(t,u.default,s.default)}))}));return null!=r&&a?I(f.default,{onClick:function(){return n(t)},className:E.default.guildRow},void 0,I(c.default,{guild:r,size:c.default.Sizes.SMALL,className:E.default.guildIcon}),I(v.default,{size:v.default.Sizes.SIZE_16,className:E.default.guildName},void 0,r.toString()),I(p.default,{direction:p.default.Directions.RIGHT,className:E.default.guildArrow})):null}function C(e){var t=e.onSelectGuild,n=(0,i.useStateFromStores)([d.default],(function(){return d.default.guildFolders}));return I(m.default,{title:_.default.Messages.GO_LIVE_MODAL_SELECT_GUILD_FORM_TITLE,scrollerClassName:(0,a.default)(E.default.guildScroller,h.default.marginBottom)},void 0,o.default.flatMap(n,(function(e){return e.guildIds.map((function(e){return I(T,{guildId:e,onClick:t},e)}))})))}T.displayName="GuildRow",C.displayName="GuildSelect"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r,a=b(n(0)),o=T(n(9)),i=b(n(10365)),l=n(57),u=T(n(51)),s=T(n(79)),d=T(n(710)),f=T(n(61)),c=T(n(55)),p=T(n(9676)),v=T(n(8950)),y=T(n(151)),m=T(n(24)),_=T(n(468)),h=T(n(16)),E=T(n(1302)),g=T(n(1248)),S=T(n(8947)),O=T(n(6)),I=T(n(7635));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){N(o,r,a,i,l,"next",e)}function l(e){N(o,r,a,i,l,"throw",e)}i(void 0)}))}}function P(){return(0,i.default)(u.default.getMediaEngine(),[i.DesktopSources.WINDOW,i.DesktopSources.SCREEN],{width:176,height:99}).then((function(e){var t=e.filter((function(e){return e.id.startsWith(i.DesktopSources.SCREEN)}));return{windowSources:e.filter((function(e){return e.id.startsWith(i.DesktopSources.WINDOW)})).sort((function(e,t){return R(t)-R(e)})),screenSources:t}}))}function R(e){var t=h.default.isWindows()?(0,g.default)(s.default,d.default):null,n=s.default.getRunningGames();return null!=t&&(0,E.default)(e.id,t.windowHandle)?2:null!=n.find((function(t){return(0,E.default)(e.id,t.windowHandle)}))?1:0}var L=M(y.default,{});function D(e){var t=e.selectedSource,n=e.onChangeSelectedSource,r=a.useState(null),u=r[0],s=r[1],d=a.useState(null),y=d[0],h=d[1],E=a.useState(i.DesktopSources.WINDOW),g=E[0],T=E[1],C=a.useState(!1),b=C[0],N=C[1],R=a.useRef(null),D=a.useRef(new l.Interval);a.useEffect((function(){var e=D.current;return P().then((function(t){var n=t.screenSources,r=t.windowSources;s(n),h(r),e.start(1e3,A(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P();case 2:t=e.sent,n=t.screenSources,r=t.windowSources,s(n),h(r);case 7:case"end":return e.stop()}}),e)}))))})),function(){e.stop()}}),[]);var w=a.useCallback((function(e){var t;null!==e&&(R.current=e,N(null!==(t=!e.isScrolledToTop())&&void 0!==t&&t))}),[]),j=g===i.DesktopSources.WINDOW?y:u;if(null==j)return M(c.default,{className:I.default.spinner,justify:c.default.Justify.CENTER,align:c.default.Align.CENTER},void 0,L);var k=j.map((function(e){var r,a,i,l=e.id,u=e.name,s=e.url,d=(null==t?void 0:t.id)===l;return M(f.default,{className:(0,o.default)(I.default.tile,(r={},r[I.default.selected]=d,r)),onClick:function(){return n(e)}},l,M(c.default,{direction:c.default.Direction.VERTICAL,justify:c.default.Justify.CENTER,align:c.default.Align.CENTER},void 0,M(c.default,{justify:c.default.Justify.CENTER,align:c.default.Align.CENTER},void 0,M("div",{style:{backgroundImage:"url("+s+")"},className:(0,o.default)(I.default.sourceThumbnail,(a={},a[I.default.selected]=d,a))})),M(m.default,{className:(0,o.default)(I.default.sourceName,(i={},i[I.default.selected]=d,i))},void 0,u)))}));return M(a.Fragment,{},void 0,M("div",{className:I.default.segmentContainer},void 0,M(S.default,{separator:b}),M(v.default,{options:[{name:O.default.Messages.GO_LIVE_MODAL_APPLICATIONS,value:i.DesktopSources.WINDOW},{name:O.default.Messages.GO_LIVE_MODAL_SCREENS,value:i.DesktopSources.SCREEN}],value:g,onChange:function(e){var t=e.value;return T(t)},className:I.default.segmentControl,optionClassName:I.default.segmentControlOption})),a.createElement(_.default,{ref:w,className:I.default.sourceScroller,onScroll:function(){var e=R.current;null!=e&&N(!e.isScrolledToTop())}},M(p.default,{layout:p.default.Layout.WRAP,columns:2,className:I.default.sourceContainer},void 0,k)))}D.displayName="SourceSelect"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=s(n(9)),l=s(n(55)),u=s(n(7633));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.WRAP="wrap",e.STACK="stack"}(a||(a={}));var p=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=r.prototype;return o.renderChildren=function(){var e,t=this.props,n=t.children,r=t.layout,o=t.columns;switch(r){case a.STACK:e="100%";break;case a.WRAP:e=1/o*100+"%"}return n.map((function(t,n){return f(l.default.Child,{className:u.default.tile,basis:e,grow:0},n,t)}))},o.render=function(){var e=this.props.className;return f(l.default,{className:(0,i.default)(e,u.default.grid),wrap:l.default.Wrap.WRAP},void 0,this.renderChildren())},r}(o.PureComponent);p.displayName="Grid",p.Layout=a,p.defaultProps={children:[],layout:a.WRAP,columns:4};var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?8:t,r=e.height,a=void 0===r?8:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 8 8",fill:"none"}),s("path",{className:f,fill:d,d:"M8 3.99957L4 0 0 3.99957l1.20161 1.20149L3.1502 3.25268V8h1.6996V3.25268l1.94858 1.94838L8 3.99957z"}))}d.displayName="UpgradeArrow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){function e(){(0,a.showAppDownloadModal)("Screenshare Unavailable")}(0,o.openModal)((function(t){return r.createElement(i.default,d({},t,{header:l.default.Messages.SCREENSHARE_UNAVAILABLE,body:l.default.Messages.SCREENSHARE_UNAVAILABLE_DOWNLOAD_APP,confirmText:l.default.Messages.DOWNLOAD_APP,onConfirm:e}))}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(1228),o=n(41),i=u(n(10357)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}},function(e,t,n){e.exports=n.p+"c9f51873ae719a6b4b8c6724362e999e.png"},function(e,t,n){e.exports=n.p+"7beab7b17eaa9ff7ceed3e5b1af274c2.png"},function(e,t,n){e.exports=n.p+"0113e92896135807e30f5de869074733.png"},function(e,t,n){e.exports=n.p+"554a8e1a41c2e30cdb946396d3d336f2.png"},function(e,t,n){e.exports=n.p+"554a8e1a41c2e30cdb946396d3d336f2.png"},function(e,t,n){e.exports=n.p+"554a8e1a41c2e30cdb946396d3d336f2.png"},function(e,t,n){e.exports=n.p+"7fa2adf98f26db34178bb30a63dabe8c.png"},function(e,t,n){e.exports=n.p+"a92f116201fa7ff2b4acbb39f144ec60.png"},function(e,t,n){e.exports=n.p+"716d569d0bca379a84578572c6efc7ac.png"},function(e,t,n){e.exports=n.p+"f23c5c28c4429691f7c54af93876d661.png"},function(e,t,n){e.exports=n.p+"3a79cdd1d4af225247f2ba574b97ae78.png"},function(e,t,n){e.exports=n.p+"64f37efd5319b9b581557604864f042a.png"},function(e,t,n){e.exports=n.p+"92cd1f9eabd48ec32dc2ecef617f706b.png"},function(e,t,n){e.exports=n.p+"f100f1c7bd174cdcc1f2da6ad6ad08a4.png"},function(e,t,n){e.exports=n.p+"3a3ec02f3c9193e85bda10f5d2a42574.png"},function(e,t,n){e.exports=n.p+"65e119537887668fd73fd2998d28589e.png"},function(e,t,n){e.exports=n.p+"e6d6b255259ac878d00819a9555072ad.png"},function(e,t,n){e.exports=n.p+"e6d6b255259ac878d00819a9555072ad.png"},function(e,t,n){e.exports=n.p+"e6d6b255259ac878d00819a9555072ad.png"},function(e,t,n){e.exports=n.p+"e6d6b255259ac878d00819a9555072ad.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(156),a=(0,n(50).createExperiment)({kind:"guild",id:"2020-11_poker_night",label:"Activities Experiment",defaultConfig:{enabledApplicationIds:[],useNewInviteButton:!1,rtcPanelIconsOnly:!1,showDiscordGameTooltips:!0},treatments:[{id:1,label:"Poker Night",config:{enabledApplicationIds:[r.POKER_NIGHT_APPLICATION_ID],useNewInviteButton:!0,rtcPanelIconsOnly:!0,showDiscordGameTooltips:!1}},{id:2,label:"All Activities",config:{enabledApplicationIds:[r.POKER_NIGHT_APPLICATION_ID,r.END_GAME_APPLICATION_ID,r.FISHINGTON_APPLICATION_ID,r.YOUTUBE_APPLICATION_ID],useNewInviteButton:!0,rtcPanelIconsOnly:!0,showDiscordGameTooltips:!1}},{id:3,label:"Betrayal",config:{enabledApplicationIds:[r.END_GAME_APPLICATION_ID],useNewInviteButton:!0,rtcPanelIconsOnly:!0,showDiscordGameTooltips:!1}},{id:4,label:"YouTube",config:{enabledApplicationIds:[r.YOUTUBE_APPLICATION_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!1}},{id:5,label:"Fishington",config:{enabledApplicationIds:[r.FISHINGTON_APPLICATION_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!1}},{id:6,label:"Discord Game 1",config:{enabledApplicationIds:[r.DISCORD_GAME_01_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:7,label:"Discord Game 2",config:{enabledApplicationIds:[r.DISCORD_GAME_02_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:8,label:"Discord Game 3",config:{enabledApplicationIds:[r.DISCORD_GAME_03_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:9,label:"Discord Game 4",config:{enabledApplicationIds:[r.DISCORD_GAME_04_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:10,label:"Discord Game 5",config:{enabledApplicationIds:[r.DISCORD_GAME_05_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:11,label:"Discord Game 6",config:{enabledApplicationIds:[r.DISCORD_GAME_06_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:12,label:"Discord Game 7",config:{enabledApplicationIds:[r.DISCORD_GAME_07_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:13,label:"Discord Game 8",config:{enabledApplicationIds:[r.DISCORD_GAME_08_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:14,label:"Discord Game 9",config:{enabledApplicationIds:[r.DISCORD_GAME_09_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:15,label:"Discord Game 10",config:{enabledApplicationIds:[r.DISCORD_GAME_10_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:16,label:"Discord Game 11",config:{enabledApplicationIds:[r.DISCORD_GAME_11_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:17,label:"Discord Game 12",config:{enabledApplicationIds:[r.DISCORD_GAME_12_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:18,label:"Discord Game 13",config:{enabledApplicationIds:[r.DISCORD_GAME_13_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:19,label:"Discord Game 14",config:{enabledApplicationIds:[r.DISCORD_GAME_14_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:20,label:"Discord Game 15",config:{enabledApplicationIds:[r.DISCORD_GAME_15_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:21,label:"Discord Game 16",config:{enabledApplicationIds:[r.DISCORD_GAME_16_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:22,label:"Discord Game 17",config:{enabledApplicationIds:[r.DISCORD_GAME_17_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:23,label:"Discord Game 18",config:{enabledApplicationIds:[r.DISCORD_GAME_18_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:24,label:"Discord Game 19",config:{enabledApplicationIds:[r.DISCORD_GAME_19_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:25,label:"Discord Game 20",config:{enabledApplicationIds:[r.DISCORD_GAME_20_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:26,label:"Discord Game 21",config:{enabledApplicationIds:[r.DISCORD_GAME_21_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:27,label:"Discord Game 22",config:{enabledApplicationIds:[r.DISCORD_GAME_22_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:28,label:"Discord Game 23",config:{enabledApplicationIds:[r.DISCORD_GAME_23_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:29,label:"Discord Game 24",config:{enabledApplicationIds:[r.DISCORD_GAME_24_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:30,label:"Discord Game 25",config:{enabledApplicationIds:[r.DISCORD_GAME_25_ID],rtcPanelIconsOnly:!0,useNewInviteButton:!0,showDiscordGameTooltips:!0}},{id:31,label:"Public Server Experiment",config:{enabledApplicationIds:[r.POKER_NIGHT_APPLICATION_ID,r.CHESS_IN_THE_PARK_APPLICATION_ID],useNewInviteButton:!0,rtcPanelIconsOnly:!0,showDiscordGameTooltips:!1}}]});t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;_(n(0));var r,a=y(n(8257)),o=_(n(8253)),i=y(n(10368)),l=y(n(10369)),u=y(n(10370)),s=y(n(10968)),d=y(n(10969)),f=y(n(10970)),c=n(1),p=y(n(6)),v=y(n(7966));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.onClose,n=e.renderOutputDevices,r=void 0!==n&&n,y=e.renderInputDevices,m=void 0!==y&&y,_=e.renderInputModes,E=void 0!==_&&_,g=e.renderInputVolume,S=void 0!==g&&g,O=e.renderOutputVolume,I=void 0!==O&&O,T=e.onSelect,C=(0,f.default)(),b=(0,s.default)(),M=(0,d.default)(),N=(0,i.default)(),A=(0,l.default)(),P=(0,u.default)();return h(a.default,{object:c.AnalyticsObjects.CONTEXT_MENU},void 0,h(o.default,{onSelect:T,className:v.default.menu,onClose:t,navId:"audio-device-context","aria-label":p.default.Messages.AUDIO_DEVICE_ACTIONS},void 0,m?h(o.MenuGroup,{label:p.default.Messages.INPUT_DEVICE},void 0,b):null,r?h(o.MenuGroup,{label:p.default.Messages.OUTPUT_DEVICE},void 0,M):null,E?h(o.MenuGroup,{label:p.default.Messages.FORM_LABEL_INPUT_MODE},void 0,N):null,h(o.MenuGroup,{},void 0,S?A:null,I?P:null,C)))}E.displayName="AudioDeviceMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;v(n(0));var r,a=n(3),o=c(n(8257)),i=v(n(8253)),l=c(n(51)),u=c(n(10971)),s=c(n(10972)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.onClose,n=e.onSelect,r=(0,a.useStateFromStores)([l.default],(function(){return l.default.isVideoEnabled()})),c=(0,u.default)(),p=(0,s.default)();return y(o.default,{object:d.AnalyticsObjects.CONTEXT_MENU},void 0,y(i.default,{onClose:t,navId:"video-device-context","aria-label":f.default.Messages.FORM_LABEL_VIDEO_DEVICE,onSelect:n},void 0,y(i.MenuGroup,{label:f.default.Messages.FORM_LABEL_VIDEO_DEVICE},void 0,c),y(i.MenuGroup,{},void 0,!r&&p)))}m.displayName="VideoDeviceMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t)return void(0,i.openModal)((function(e){return r.createElement(o.default,d({},e,{title:l.default.Messages.SUPPRESSED,body:l.default.Messages.SUPPRESSED_PERMISSION_BODY}))}));if(e)return void(0,i.openModal)((function(e){return r.createElement(o.default,d({},e,{title:l.default.Messages.SERVER_MUTED_DIALOG_TITLE,body:l.default.Messages.SERVER_MUTED_DIALOG_BODY}))}));a.default.toggleSelfMute()};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(288)),o=u(n(218)),i=n(41),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.children,n=(0,a.usePreventIdle)("popup"),o=n.preventIdle,i=n.allowIdle;return r.useEffect((function(){return o(),function(){return i()}}),[i,o]),r.createElement(r.Fragment,null,t)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(8400);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStoresObject)([i.default],(function(){var e,t,n=null===(e=null===(t=(0,r.default)(i.default.getVideoDevices()).values().first())||void 0===t?void 0:t.disabled)||void 0===e||e;return{enabled:i.default.isVideoEnabled(),cameraUnavailable:n||!i.default.supports(o.Features.VIDEO)}})),t=e.enabled,n=e.cameraUnavailable;return{enabled:t,cameraUnavailable:n}};var r=l(n(8)),a=n(3),o=n(34),i=l(n(51));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(3),a=d(n(712)),o=d(n(11)),i=d(n(51)),l=d(n(40)),u=d(n(80)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){return(0,r.useStateFromStoresObject)([u.default,o.default,i.default,l.default,a.default],(function(){var t,n=null!=e?u.default.getVoiceState(e.getGuildId(),o.default.getId()):null,r=i.default.isSelfMute()||i.default.isSelfMutedTemporarily(),d=null==e?void 0:e.getGuildId(),f=a.default.isViewingRoles(d)&&!l.default.can(s.Permissions.SPEAK,e);return{selfMute:r,suppress:(null==n?void 0:n.suppress)||f,mute:null!==(t=null==n?void 0:n.mute)&&void 0!==t&&t}}))};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=T(n(0)),o=n(3),i=O(n(8953)),l=O(n(8758)),u=O(n(8375)),s=O(n(10)),d=O(n(36)),f=O(n(39)),c=T(n(8352)),p=O(n(8509)),v=O(n(255)),y=O(n(8958)),m=O(n(8959)),_=O(n(8960)),h=O(n(8962)),E=n(1),g=O(n(6)),S=O(n(7647));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var b={offset:{left:4,right:-12}};function M(e,t){var n=void 0===t?{}:t,r=n.guildFilter,a=n.roleFilter,o=n.everyoneFilter,l=n.messageId,u=void 0===l?null:l;r=void 0===r?y.default.guildFilter:r,a=void 0===a?y.default.roleFilter:a,o=void 0===o?y.default.everyoneFilter:o;var s=null;null!=e&&(s=r===E.RecentMentionsFilters.ALL_SERVERS?null:e.getGuildId()),i.default.fetchRecentMentions(u,E.MAX_MENTIONS_PER_FETCH,s,a,o)}function N(e){var t=e.header,n=e.onJump,r=(0,o.useStateFromStores)([s.default,d.default],(function(){return s.default.getChannel(d.default.getChannelId())})),u=(0,o.useStateFromStoresObject)([y.default],(function(){return{messages:y.default.getMentions(),hasMore:y.default.hasMore,loading:y.default.loading,guildFilter:y.default.guildFilter,roleFilter:y.default.roleFilter,everyoneFilter:y.default.everyoneFilter}})),f=u.messages,c=u.hasMore,p=u.loading,v=u.guildFilter,m=u.roleFilter,_=u.everyoneFilter;return a.useEffect((function(){M(r)}),[v,m,_,r]),a.useEffect((function(){return function(){i.default.truncateMentions(E.MAX_MENTIONS_PER_FETCH)}}),[]),C(l.default,{className:S.default.recentMentionsPopout,scrollerClassName:S.default.scroller,onFetch:L,onJump:n,onCloseMessage:function(e){i.default.deleteRecentMention(e.id)},channel:r,messages:f,loading:p,hasMore:c,analyticsName:"Recent Mentions",loadMore:function(){var e=null!=f&&f.length>0?f[f.length-1].id:null;M(r,{messageId:e})},canCloseAllMessages:!0,renderHeader:function(){return t},renderEmptyState:R,renderMessage:P,"aria-label":g.default.Messages.RECENT_MENTIONS,listName:"recents"})}N.displayName="RecentMentions";var A=C(v.default,{width:16,height:16});function P(e,t){if(null==e)return[];var n=s.default.getChannel(e.channel_id);return null==n?[]:[C("div",{className:S.default.container},void 0,C(_.default,{channel:n,gotoChannel:t},void 0,C(c.default,{className:S.default.closeButton,tooltip:g.default.Messages.CLOSE,color:c.CircleIconButtonColors.TERTIARY,icon:A,onClick:function(){return i.default.deleteRecentMention(e.id)}})),C("div",{className:S.default.messageContainer},void 0,C(m.default,{guildId:n.guild_id,message:e,className:S.default.jumpButton}),C(u.default,{message:e,channel:n,className:S.default.message,compact:f.default.messageDisplayCompact,animateAvatar:!1,focusProps:b},e.id)))]}function R(e){return C(h.default,{Icon:p.default,header:g.default.Messages.RECENT_MENTIONS_EMPTY_STATE_HEADER,tip:g.default.Messages.RECENT_MENTIONS_EMPTY_STATE_TIP})}function L(e){y.default.hasLoadedEver||M(e)}R.displayName="renderEmptyState"},function(e,t){e.exports='---changelog---\ndate: "2021-06-21"\nlocale: "en-US"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nVideo Call Improvements {added marginTop}\n======================\n\n* **We’ve reduced CPU usage by more than 50% for video calls.** Your computer fans can rest easy now...\n* **We\'ve made group video calls smoother, clearer, and more stable.** Grab up to 25 friends and give it a try. Or, more realistically, up to 3 friends.\n* **Video quality is no longer based on the worst internet connection.** Previously, when someone on a slower network joined a group video call, everyone in that call would receive poorer quality video. Well, proud to announce it’s not like that anymore. You can stop bullying Kyle and his geriatric internet.\n* **New screen share resolution settings.** You can now choose a preset quality level for screen share for the best viewing experience based on what you’re doing. This includes gaming, better text readability, and smoother video.\n\n\nMac Improvements {added marginTop}\n======================\n\n* **Added audio to screen share on Macs!** There’s some setup required. Visit *Settings > Voice & Video > Screen Share* to get started. And yes I know, *finally.* Please don’t yell at me about how long it took, I just write the update notes.\n* **Reduced CPU usage on Macs** to make sharing your screen less resource intensive as you now enjoy that sweet, sweet screen share audio.  \n* **Changing default audio fix is now live.** Changing the default input/output device during a call now immediately takes effect. The default device label will also display which device is selected.\n* **Mac pop out fix.** Double clicking a pop out window title bar will now maximize properly.   \n\n\nNew Features {added marginTop}\n======================\n\n* **Added Stage Discovery.** Check out communities that are hosting live Stages—audio events like concerts, panels, talent shows, and whatever other weird but legal things you can come up with—by clicking on the new Discovery tab. \n* **Added collapse syncing.** There are people out there that use multiple Discord clients on their computers. And when those people would collapse and expand categories in their servers, it would not reflect that change across all clients. Now it does you beautifully strange, multi-client people.\n* **Added keyboard navigation in the emoji picker** for better accessibility.\n* **Uhhhh more emoji stuff.** Hovering over a reaction now shows a larger preview of the emoji. \n* **Help us test something for Discord!** We’re testing out what it’s like to have games built directly into voice channels. Come play and test [Poker in our official server](https://discord.gg/pokernight) and share your feedback!\n\n\nFixes and Updates {progress}\n======================\n\n* **Added pagination to the search bar.** You no longer have to scroll endlessly through search results. Now you can jump between pages to find the exact evidence you need against your friend while trying to make a point that they totally said this thing like 6 months ago but you can’t remember but just give you a minute to go find it because you swear they totally said that.\n* **Switch to push to talk (PTT) seamlessly.** When entering a PTT-only channel, you will now receive a pop up with the option to switch to PTT. \n* **More accurate file upload errors.** File upload errors, such as the explicit content filter, will now display more consistently.\n* **New voice transmit status.** Your *voice transmit status*, or funny little green circle that show when you talk into mic, is now visible around your bottom left avatar while in voice.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "nl"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nVerbeteringen videogesprekken {added marginTop}\n======================\n\n* **We hebben het CPU-gebruik tijdens videogesprekken met ruim 50% teruggebracht.** De ventilatoren van je computer kunnen rustig bijkomen...\n* **We hebben videogesprekken soepeler, helderder en stabieler gemaakt.** Verzamel maximaal 25 vrienden en probeer het maar uit. Of, realistischer, maximaal 3 vrienden.\n* **Videokwaliteit wordt niet langer gebaseerd op de slechtste internetverbinding.** Wanneer voorheen iemand met een langzaam netwerk zich aansloot bij een groepsvideogesprek, kreeg iedereen een slechtere videokwaliteit. Vol trots delen we mee dat daar nu verandering in is gekomen, dus stop met het pesten van Rutger en zijn aftandse internet.\n* **Nieuwe resolutie-instellingen tijdens schermdelen.** Je kunt nu een vooraf ingesteld kwaliteitsniveau kiezen voor schermdelen, voor de beste kijkervaring op basis van wat je aan het doen bent. Hieronder valt ook gamen, betere leesbaarheid van tekst en betere videobeelden.\n\n\nMac-verbeteringen {added marginTop}\n======================\n\n* **Audio toegevoegd aan schermdelen op Macs!** Hier moet je wat instellingen voor aanpassen. Ga naar *Instellingen > Spraak en video > Schermdelen* om aan de slag te gaan. En ja, ik weet het: *eindelijk.* Ik schrijf alleen maar de updatenotities, dus schreeuw alsjeblieft niet naar me dat het zo lang heeft geduurd.\n* **Verminderd CPU-gebruik op Macs** zodat het delen van je scherm minder van je computer vraagt terwijl je geniet van die heerlijke audio tijdens het schermdelen.  \n* **Je kunt nu de standaardaudio aanpassen.** Wanneer je tijdens een gesprek het standaard invoer- of uitvoerapparaat aanpast, wordt die wijziging meteen doorgevoerd. Het standaardapparaat-label geeft ook weer welk apparaat is geselecteerd.\n* **Oplossing Mac-pop-out.** Wanneer je dubbelklikt op de titelbalk van een pop-outvenster wordt die correct gemaximaliseerd.   \n\n\nNieuwe functies {added marginTop}\n======================\n\n* **Synchronisatie invouwen toegevoegd.** Er zijn mensen die meerdere Discord-clients gebruiken op hun computers. Wanneer zij categorieën op hun servers in- of uitvouwden, werd die wijziging niet op al hun clients doorgevoerd. Maar daar is nu verandering in gekomen, prachtige vreemde multi-clientmensen.\n* **Toetsenbordnavigatie toegevoegd aan de emojikiezer** voor een betere toegankelijkheid.\n* **Eh, nog meer emoji-dingen.** Beweeg de cursor boven een reactie om een grotere preview van de emoji te kunnen zien. \n\n\nProbleemoplossingen en updates {progress}\n======================\n\n* **Paginering aan de zoekbalk toegevoegd.** Je hoeft niet langer eindeloos door de zoekresultaten te scrollen. Je kunt naar andere pagina\'s springen om het exacte bewijs te vinden dat je nodig hebt om aan je vriend te laten zien dat hij dat ene zes maanden geleden echt heeft gezegd, ook al weet je niet meer wat het was. Dus zoek je het op omdat je zeker weet dat hij dat écht heeft gezegd.\n* **Schakel moeiteloos over naar push-to-talk (PTT).** Wanneer je op een PTT-only-kanaal komt, verschijnt er nu een pop-up met de optie om over te schakelen naar PTT. \n* **Foutmeldingen tijdens het uploaden van bestanden zijn nu nauwkeuriger.** Uploadfouten zoals het expliciete inhoudsfilter worden nu consistenter weergegeven.\n* **Nieuwe stemverzendstatus.** Je *stemverzendstatus*, of dat geinige groene cirkeltje dat wordt weergegeven als je in je microfoon praat, is nu zichtbaar rondom je avatar linksonder wanneer je op een spraakkanaal zit.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "fr"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nAméliorations des appels vidéo {added marginTop}\n======================\n\n* **Nous avons réduit l\'utilisation du processeur de plus de 50 % lors des appels vidéo.** Les ventilateurs de ton ordinateur peuvent se la couler douce maintenant.\n* **Nous avons rendu les appels vidéo de groupe plus fluides, plus clairs et plus stables.** Rassemble 25 amis et tente l\'expérience. Ou plutôt 3. Oui, 3 amis, c\'est plus réaliste...\n* **La qualité vidéo n\'est plus basée sur la pire connexion internet.** Auparavant, lorsqu\'une personne se trouvant sur un réseau plus lent rejoignait un appel vidéo de groupe, tous les participants à cet appel recevaient une vidéo de moins bonne qualité. Eh bien, nous sommes fiers d\'annoncer que ce n\'est plus le cas. Plus besoin de s\'énerver sur Kévin et sa connexion internet qui date du paléolithique.\n* **Nouveaux paramètres de résolution pour le partage d\'écran.** Tu peux désormais choisir un niveau de qualité prédéfini pour le partage d\'écran afin d\'obtenir la meilleure expérience visuelle en fonction de ce que tu fais. Cela inclut les jeux, une meilleure lisibilité du texte et des vidéos plus fluides.\n\n\nAméliorations pour Mac {added marginTop}\n======================\n\n* **Ajout de l\'audio pour le partage d\'écran sur Mac !** Quelques manipulations sont nécessaires. Rends-toi simplement dans *Paramètres > Voix & Vidéo > Partage d\'écran*. Et oui je sais, *enfin.* Pas la peine de me crier dessus pour le temps que ça a pris, j\'écris juste les notes de mise à jour moi.\n* **Réduction de l\'utilisation du processeur sur Mac** pour rendre le partage de ton écran moins gourmand en ressources pendant que tu profites du doux son du partage d\'écran.  \n* **Modification de la correction audio par défaut.** La modification du périphérique d\'entrée/de sortie par défaut pendant un appel prend désormais effet immédiatement. L\'étiquette du périphérique par défaut affichera également le périphérique sélectionné.\n* **Correction du lecteur réduit pour Mac.** Un double-clic sur la barre de titre d\'une fenêtre de lecteur réduit permet désormais de la maximiser correctement.   \n\n\nNouvelles fonctionnalités {added marginTop}\n======================\n\n* **Ajout de la synchronisation de réduction.** Certaines personnes utilisent plusieurs clients Discord sur leur ordinateur. Et lorsque ces personnes réduisaient et développaient des catégories dans leurs serveurs, le changement n\'était pas répercuté sur tous les clients. Maintenant, il le fait pour les personnes qui utilisent plusieurs clients.\n* **Ajout d\'une navigation au clavier dans le sélecteur d\'émojis** pour une meilleure accessibilité.\n* **Eeeeet toujours plus de trucs en lien avec les émojis.** Passer le curseur de la souris sur une réaction permet désormais d\'afficher un aperçu plus grand de l\'émoji. \n\nCorrections et mises à jour {progress}\n======================\n\n* **Ajout d\'une pagination à la barre de recherche.** Plus besoin de faire défiler pendant des heures les résultats de tes recherches. Tu peux maintenant passer d\'une page à l\'autre pour trouver la preuve exacte dont tu as besoin pour convaincre tes amis qu\'ils ont dit telle ou telle chose il y a 6 mois. Tu ne te rappelles plus quoi exactement, mais tu vas trouver dans une minute parce que tu peux jurer qu\'ils l\'ont dit.\n* **Passe facilement en mode Appuyer-pour-parler (APP).** Lorsque tu entres dans un salon en APP uniquement, une fenêtre s\'affichera désormais avec l\'option pour passer en mode APP. \n* **Alertes d\'erreurs d\'upload de fichiers plus précises.** Les alertes d\'erreurs d\'upload de fichiers, telles que le filtre de contenu explicite, s\'affichent désormais de manière plus cohérente.\n* **Nouveau statut de transmission de voix.** Ton *statut de transmission de voix*, ou si tu préfères, le petit cercle vert qui s\'allume quand tu parles dans ton micro, est désormais visible autour de ton avatar situé en bas à gauche lors des appels.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "de"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nVerbesserungen an Videoanrufen {added marginTop}\n======================\n\n* **Wir haben die CPU-Auslastung bei Videoanrufen um 50 % reduziert.** Dein Computerlüfter kann erst mal durchatmen …\n* **Gruppen-Videoanrufe laufen jetzt reibungsloser, klarer und stabiler.** Versuch es mit bis zu 25 Freunden. Oder, was viel realistischer ist, mit drei.\n* **Die Videoqualität ist nicht mehr von der schlechtesten Internetverbindung abhängig.** Zuvor wurde die Videoqualität aller Teilnehmer runtergeschraubt, sobald jemand mit einer langsamen Netzwerkverbindung dem Gruppen-Videoanruf beigetreten ist. Wir verkünden voller Stolz, dass das nicht mehr der Fall ist. Du kannst aufhören, Kyle und sein antiquiertes DSL-Modem zu mobben.\n* **Neue Auflösungseinstellungen für Bildschirmübertragungen.** Du kannst ab jetzt voreingestellte Qualitätsstufen für Bildschirmübertragungen auswählen – für ein optimales Bildergebnis, basierend auf dem, was du machst. Das beinhaltet Gaming, bessere Lesbarkeit und flüssige Videos.\n\n\nVerbesserung für Mac {added marginTop}\n======================\n\n* **Audio bei Bildschirmübertragungen für Mac hinzugefügt!** Es benötigt ein bisschen Vorarbeit. Um loszulegen, geh auf *Einstellungen > Sprach- & Videochat > Bildschirmübertragung*. Ja, ja, wir wissen schon, *endlich*. Schrei mich bitte nicht an, weil es so lange gedauert hat, ich schreib hier nur diese Updates.\n* **CPU-Auslastung für Mac reduziert**, damit Bildschirmübertragungen weniger leistungsintensiv sind und du jetzt auch bei Bildschirmübertragungen den hammergeilen Sound genießen kannst.  \n* **Fehler beim Ändern der Audioeinstellungen behoben.** Wenn Ein- oder Ausgabegeräte während eines Anrufs geändert werden, wird diese Änderung ab jetzt sofort übernommen. Außerdem wird auch angezeigt, welches Gerät ausgewählt wurde.\n* **Fehler bei Popout für Mac behoben.** Bei einem Doppelklick auf die Popout-Titelleiste wird das Fenster jetzt wie vorgesehen maximiert.   \n\n\nNeue Features {added marginTop}\n======================\n\n* **Ein- und Ausklappen von Kanälen jetzt synchronisiert.** Vielleicht gehörst du ja auch zu denen, die mehrere Discord-Clients auf ihrem Computer benutzen. Wenn du also Kanäle ein- oder ausgeklappt hast, wurde diese Änderung nicht auf allen Clients übernommen. Jetzt tut es das aber – wir lieben Multi-Client!\n* **Tastatur-Navigation für Emoji-Auswahl hinzugefügt**, für ein wenig mehr Barrierefreiheit.\n* **Uhhh, noch mehr Emoji-Zeug.** Wenn du mit der Maus über eine Reaktion fährst, wird eine größere Vorschau der Emojis angezeigt. \n\nFehlerbehebungen und Updates {progress}\n======================\n\n* **Seitennummerierung zur Suchleiste hinzugefügt.** Du musst nie wieder ewig durch die Suchergebnisse scrollen. Ab jetzt kannst du direkt zu einer Seite springen. Endlich hast du den Beweis dafür, dass deine Freunde vor sechs Monaten etwas ganz Bestimmtes gesagt haben, innerhalb von wenigen Sekunden. Du hast recht und das sollen sie ruhig wissen!\n* **Wechsle reibungslos zu Push-to-Talk (PTT).** Wenn du einen PTT-Kanal betrittst, erscheint jetzt ein Popup-Fenster mit der Option, zu PTT zu wechseln. \n* **Genauere Fehlermeldungen zu Datei-Uploads.** Die Anzeige der Fehlermeldungen zu Datei-Uploads wurde verbessert, wie zum Beispiel bei Meldungen zum Filter für anstößige Inhalte.\n* **Neuer Sprachübertragungsstatus.** Dein *Sprachübertragungsstatus*, der niedliche grüne Kreis, der beim Sprechen leuchtet, ist jetzt um deinen Avatar unten links sichtbar, wenn du sprichst.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "it"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nMiglioramenti per le videochiamate {added marginTop}\n======================\n\n* **Abbiamo ridotto l\'utilizzo della CPU di oltre il 50% per le videochiamate.** Le ventole del tuo computer ora possono stare tranquille...\n* **Abbiamo reso le videochiamate di gruppo più fluide, più chiare e più stabili.** Puoi fare una prova aggiungendo un massimo di 25 amici. Oppure, in modo più realistico, un massimo di 3 amici.\n* **La qualità del video non si basa più sulla connessione internet più scarsa.** In precedenza, quando qualcuno con una rete più lenta si univa alla videochiamata, tutti i partecipanti alla chiamata ricevevano una qualità video peggiore. Beh, siamo fieri di annunciare che ora non è più così. Puoi smettere di tormentare Kyle per la sua connessione geriatrica.\n* **Nuove impostazioni della condivisione schermo.** Ora puoi scegliere un livello di qualità prestabilito per la condivisione schermo in modo da assicurare la miglior esperienza visiva a seconda di quello che stai facendo. Include gaming, migliore leggibilità dei testi e video più fluidi.\n\n\nMiglioramenti per Mac {added marginTop}\n======================\n\n* **Aggiunto l\'audio alla condivisione schermo su Mac!** È necessaria una configurazione specifica. Vai nelle *Impostazioni > Voce e video > Condivisione schermo* per iniziare. E sì, concordo, *era ora*. Ti prego, non prendertela con me per quanto tempo ci è voluto, io scrivo solo le note sugli aggiornamenti.\n* **Abbiamo ridotto l\'utilizzo della CPU su Mac** per fare in modo che condividere lo schermo non consumi troppe risorse, ora che ti puoi finalmente godere il dolce, meraviglioso audio nella condivisione schermo.  \n* **Abbiamo risolto il problema della modifica dell\'audio predefinito.** Ora le modifiche per i dispositivi di input/output predefiniti durante la chiamata hanno effetto immediatamente. L\'etichetta del dispositivo predefinito ora indica anche quale dispositivo è selezionato al momento.\n* **Risolto il problema delle nuove finestre su Mac.** Fare doppio clic sulla barra del titolo di una finestra aperta ora la ingrandirà correttamente.   \n\n\nNuove funzionalità {added marginTop}\n======================\n\n* **Aggiunta sincronizzazione della riduzione.** C\'è gente là fuori che usa più Discord Client sul proprio computer. E quando queste persone riducevano o espandevano le categorie sui propri server, la modifica non veniva apportata a tutti i client. Ora invece sì, bella e strana gente del multi-client.\n* **Abbiamo aggiunto la navigazione con la tastiera nel selettore emoji** per una migliore accessibilità.\n* **Uhhhh altra roba sugli emoji.** Passare il cursore sopra una reazione ora ti mostra un\'anteprima più grande dell\'emoji. \n\nCorrezioni e aggiornamenti {progress}\n======================\n\n* **Aggiunte pagine alla barra di ricerca.** Non devi più scorrere all\'infinito tra i risultati di ricerca. Ora puoi saltare da una pagina all\'altra per trovare esattamente le prove da sbattere in faccia ai tuoi amici che negano di aver detto quella cosa 6 mesi fa ma tu non ti ricordi bene e ora ti basta un minuto per ritrovarla perché non hai nessun dubbio sul fatto che lo abbiano detto.\n* **Passa facilmente al push-to-talk (PTT).** Quando entri in un canale unicamente con PTT, ora ti apparirà un pop-up con l\'opzione per passare a PTT. \n* **Errori di caricamento file più precisi.** Gli errori di caricamento file, come il filtro dei contenuti espliciti, ora appariranno più regolarmente.\n* **Nuovo stato di trasmissione della voce.** Il tuo *stato di trasmissione della voce*, noto anche come buffo cerchio verde che appare quando stai parlando al microfono, ora è visibile attorno al tuo avatar in basso a sinistra quando sei in chat vocale.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "ja"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nビデオ通話を改善 {added marginTop}\n======================\n\n* **ビデオ通話時の CPU 使用率を 50% 以上抑えました。**これであなたの冷却ファンも安心です……\n* **グループビデオ通話のスムーズさ、クリアさ、安定感がアップ。**最大 25 人の友達を集めて、ぜひお試しください。まあ現実的には 3 人ってとこですかね。\n* **ビデオ画質が最低のインターネット速度に左右されなくなりました。**これまでは、低速のネット環境を使用している人がグループビデオ通話に参加すると、他の参加者全員のビデオ画質も落ちるという事態が発生していました。でも、もうそんなことが起こる心配はありません。カイルと彼のボロボロのネット環境をなじるのもやめてあげてくださいね。\n* **画面共有の画質設定が新しくなりました。**配信内容に合わせてベストな視聴体験を約束できるよう、プリセットの画質レベルを選べるようになりました。ゲーム向けの設定、テキストが読みやすいよう調整された設定、スムーズな動画配信のための設定などがあります。\n\n\nMac 向けの改善 {added marginTop}\n======================\n\n* **Mac の画面共有が音声に対応しました!** お使いいただく前に設定が必要です。「設定」>「音声・ビデオ」>「画面共有」からどうぞ。はい、そのとおりです。やっとです。遅いんだよって怒らないでくださいね。自分は更新情報を書くだけのお仕事なのです。\n* **Mac での CPU 使用率を下げました。**これで、愛しい愛しい音声つき画面共有を楽しむときも、リソースの圧迫が抑えられます。  \n* **音声のデフォルト設定変更がリアルタイムになりました。**通話中にデフォルトの入力/出力デバイスを変更すると、即時反映されます。またデフォルトのデバイスを選択すると、デフォルトであることを示すラベルも表示されます。\n* **Mac でのポップアウトを改善しました。**ポップアウト・ウィンドウのタイトルバーをダブルクリックすると、ちゃんと最大化されるようになりました。   \n\n\n新機能{added marginTop}\n======================\n\n* **折りたたみの同期を実装しました。**世の中には、パソコン上で複数の Discord クライアントを使っている人々が存在します。こういった人々がサーバーでカテゴリの折りたたみ・展開を行っても、これまではその操作を全てのクライアントに反映することはできませんでした。でも今ならできるようになりましたよ、美しくも奇妙なマルチクライアント使いの皆様。\n* **絵文字ピッカーにキーボード・ナビゲーションを追加しました**。使いやすさ、向上です。\n* **えーと、あれだ。絵文字のあれです。**リアクションにカーソルをかざすと、絵文字のプレビューができるようになりました。 \n\n\nバグ修正と更新{progress}\n======================\n\n* **検索バーでページ分けできるようになりました。**検索結果を永久にスクロールし続ける手間はもういりません。これからはページ間をジャンプして、6 ヶ月前くらいに友達が〇〇って言ったけど正確にいつかは思い出せなくて一瞬だけ時間ちょうだい絶対間違いなく言ってたからすぐに探し出して言質取るから、っていうときに役立てることができます。\n* **プッシュツートーク(PTT)への切り替えがシームレスになりました。**PTT オンリーのチャンネルに入るときには、PTT に切り替えるオプションのポップアップが表示されます。 \n* **ファイルのアップロードエラー表示がより正確に。**不適切なコンテンツのフィルターなどのファイル・アップロードエラーが、より正確に、一貫して表示されるようになりました。\n* **音声送信ステータスが新しくなりました。***音声送信ステータス*ってアレです。マイクに向かって話すと表示される変な緑の丸のことです。音声通話中、そのアレがアバターの左下に表示されるようになりました。\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "ko"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\n영상 통화 개선 {added marginTop}\n======================\n\n* **영상 통화를 할 때의 CPU 사용량을 50% 이상 줄였어요.** 컴덕후 여러분, 이제 노여움을 풀어주세요...\n* **그룹 영상 통화를 더 부드럽고, 더 깨끗하고, 더 안정적으로 만들었어요.** 친구를 25명까지 모아 한번 해보세요. 현실적으로 3명만 모아서 해봐도 좋아요.\n* **더 이상 동영상 품질이 가장 안 좋은 인터넷 연결 상태를 기준으로 설정되지 않아요.** 예전까지만 해도 인터넷 연결 상태가 좋지 않은 사람이 그룹 영상 통화에 참여하면, 통화에 참여 중인 모두의 동영상 품질이 나빠졌었죠. 하지만 이제 이런 일은 없을 거예요. 인터넷이 느리다고 놀림 받는 일도 없을 거고요.\n* **화면 공유 해상도 설정 기능을 사용할 수 있어요.** 현재 무얼 하고 있느냐에 따라 시청 환경을 최적화할 수 있도록 프리셋 품질 레벨을 선택할 수 있어요. 여기에는 게임, 텍스트 가독성 향상, 더 부드러운 동영상이 포함돼요.\n\n\nMac 개선 {added marginTop}\n======================\n\n* **Mac에서의 화면 공유에서 음성을 추가했어요!** 대신 설정이 좀 필요해요. *설정 > 음성 및 비디오 > 화면 공유*로 가서 시작해보세요. 왜 이렇게 오래 걸렸느냐고 화내지 마세요. 전 업데이트 소식만 전달할 뿐이니까요.\n* **Mac에서의 CPU 사용량을 줄였어요.** 달콤한 화면 공유 음성을 즐기실 수 있도록 화면 공유가 리소스를 덜 잡아먹게 했답니다.  \n* **기본 음성을 변경할 수 있어요.** 통화 중 기본 입력/출력 장치를 바꾸면 즉시 효과가 적용돼요. 기본 장치 레이블 표시는 현재 어떤 장치가 선택되어 있는지를 보여줘요.\n* **Mac 팝업창을 수정했어요.** 이제 팝업창의 타이틀 바를 더블 클릭하면 창이 정상적으로 최대화돼요.   \n\n\n새 기능 {added marginTop}\n======================\n\n* **접기 동기화 기능을 추가했어요.** 컴퓨터로 여러 개의 Discord 클라이언트를 사용하는 분들이 계시는데, 여태까지는 이분들이 서버에서 카테고리를 접거나 확장할 때 변경 내용이 모든 클라이언트에 반영되지는 않았어요. 근데 이제 된답니다.\n* **이모티콘 선택기에 키보드 탐색 기능을 추가**해서 접근성을 높였어요.\n* **더 많은 이모티콘이 출시됐어요.** 반응에 마우스 커서를 올려두면 해당 이모티콘의 더 큰 미리보기가 표시돼요. \n\n수정 및 업데이트 {progress}\n======================\n\n* **검색 창에 페이지 기능을 추가했어요.** 검색 결과를 뒤져볼 때 더는 손가락 빠지도록 스크롤을 내릴 필요가 없어요. 6개월 전 친구가 뭔가에 관해 무슨 얘기를 했는데 그게 정확히 무엇에 관한 것이었는지 기억이 가물가물하지만 왠지 당장 궁금해서 미칠 거 같을 때, 검색 결과 페이지를 오가며 편하게 그 실마리를 찾아볼 수 있을 거예요.\n* **눌러서 말하기(PTT)로의 전환이 더 매끄러워졌어요.** 이제 PTT 전용 채널에 입장 시, PTT로의 전환 여부를 묻는 팝업창이 뜰 거예요. \n* **파일 업로드 오류 표시 내용이 더 정확해졌어요.** 유해 콘텐츠 필터 등에 의해 파일 업로드 오류 발생 시 그 내용이 더 일관적으로 표시될 거예요.\n* **음성 전송 상태가 새로 표시돼요.** 음성 채팅 중 마이크에 대고 이야기를 할 때, 왼쪽 아래에 있는 자신의 아바타에 *음성 전송 상태*가 귀여운 녹색 원으로 표시돼요.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "pl"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nUsprawnienia połączeń wideo {added marginTop}\n======================\n\n* **Zmniejszyliśmy zużycie procesora o ponad 50% podczas rozmów wideo.** Twoi fani komputerowi mogą teraz spać spokojnie...\n* **Grupowe rozmowy wideo stały się płynniejsze, wyraźniejsze i stabilniejsze.** Zaproś do 25 znajomych i spróbuj. No dobrze, do 3 znajomych będzie bardziej realistyczne.\n* **Jakość wideo nie jest już zależna od najgorszego połączenia internetowego.** Wcześniej, gdy ktoś z wolniejszym łączem dołączał do grupowej rozmowy wideo, wszyscy uczestnicy otrzymywali gorszą jakość wideo. Cóż, z dumą ogłaszamy, że już tak nie jest. Możesz przestać nękać Kyle\'a z powodu jego przestarzałego internetu.\n* **Nowe ustawienia rozdzielczości współdzielenia ekranu.** Możesz teraz wybrać wstępnie ustawiony poziom jakości dla współdzielenia ekranu, aby uzyskać najlepsze warunki oglądania w zależności od tego, co robisz. Obejmuje to gry, lepszą czytelność tekstu i płynniejsze wideo.\n\n\nUsprawnienia dla komputerów Mac {added marginTop}\n======================\n\n* **Dodano dźwięk do współdzielenia ekranu na komputerach Mac!** Wymagane są pewne czynności konfiguracyjne. Przejdź do sekcji *Ustawienia > Głos i wideo > Współdzielenie ekranu*, aby zacząć. I tak, wiem, *w końcu.* Proszę nie krzyczeć na mnie, że trwało to tak długo, ja tylko piszę notatki o aktualizacji.\n* **Zmniejszono zużycie procesora na komputerach Mac**, dzięki czemu współdzielenie ekranu jest mniej zasobożerne, a Ty możesz teraz cieszyć się tym przyjemnym dźwiękiem towarzyszącym współdzieleniu ekranu.  \n* **Wprowadzono poprawkę dotyczącą zmiany domyślnego audio.** Zmiana domyślnego urządzenia wejściowego/wyjściowego podczas połączenia jest teraz natychmiast widoczna. Etykieta urządzenia domyślnego będzie również wyświetlać, które urządzenie zostało wybrane.\n* **Poprawka do wyskakujących okien na komputerach Mac.** Dwukrotne kliknięcie paska tytułu wyskakującego okna powoduje teraz prawidłową maksymalizację.   \n\n\nNowe funkcje {added marginTop}\n======================\n\n* **Dodano synchronizację zwijania.** Są osoby, które używają wielu klientów Discord na swoich komputerach. I kiedy takie osoby zwijały i rozwijały kategorie na swoich serwerach, nie odzwierciedlało to zmian na wszystkich klientach. Teraz jest to możliwe dla osób korzystających z wielu klientów.\n* **Dodano nawigację klawiaturową w narzędziu do wybierania emoji** w celu zwiększenia dostępności.\n* **I jeszcze więcej emoji!** Najechanie kursorem na reakcję pokazuje teraz większy podgląd emoji. \n\nPoprawki i aktualizacje {progress}\n======================\n\n* **Dodano paginację do paska wyszukiwania.** Nie musisz już przewijać w nieskończoność wyników wyszukiwania. Teraz możesz przeskakiwać między stronami, aby znaleźć niezbity dowód, którego potrzebujesz, chcąc udowodnić swojemu znajomemu, że naprawdę coś powiedział 6 miesięcy temu, ale nie możesz sobie przypomnieć, więc poświęcasz trochę czasu, aby to znaleźć, ponieważ przysięgasz, że naprawdę to powiedział.\n* **Bezproblemowo przełącz się do trybu Naciśnij i Mów (NIM).** Po wejściu na kanał działający tylko w trybie Naciśnij i Mów pojawia się okienko z możliwością przełączenia na tryb NIM. \n* **Bardziej precyzyjne błędy przesyłania plików.** Błędy przesyłania plików, takie jak filtr wulgarnych treści, będą teraz wyświetlane bardziej konsekwentnie.\n* **Nowy status transmisji głosowej.** Twój *status transmisji głosowej*, czyli zabawne małe zielone kółko, które pokazuje się, gdy mówisz do mikrofonu, jest teraz widoczny wokół Twojego lewego dolnego awatara, gdy jesteś w trybie głosowym.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "ru"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nУлучшения видеозвонков {added marginTop}\n======================\n\n* **Мы снизили потребление ресурсов ЦП при видеозвонках более чем на 50%.** Теперь кулеры ваших компьютеров наконец смогут отдохнуть…\n* **Групповые видеозвонки стали более плавными, чёткими и стабильными.** Организуйте видеозвонок с 25 друзьями и сами убедитесь. Ну ладно, с тремя друзьями, это уже больше похоже на правду.\n* **Качество видео больше не зависит от худшего интернет-соединения.** Раньше, когда кто-то с более медленным соединением присоединялся к групповому видеозвонку, качество видео у всех участников снижалось. Что ж, с гордостью сообщаем, что это больше не так. Вы можете перестать издеваться над Стасом и его доисторическим интернетом.\n* **Новые настройки разрешения для показа экрана.** Теперь вы можете выбрать предустановленный уровень качества изображения для показа экрана в зависимости от того, что вы делаете. У нас есть режимы для игр, лучшей читаемости текста и более плавного видео.\n\n\nУлучшения для Mac {added marginTop}\n======================\n\n* **Показ экрана на устройствах Mac теперь можно делать со звуком!** Для этого выполните следующее: перейдите в настройки > Голос и видео > Показ экрана. Да-да, «наконец-то»! Не ругайтесь на меня, пожалуйста, я знаю, что мы слишком долго над этим работали, я всего лишь пишу о том, что изменилось с этим обновлением.\n* **Снижена нагрузка на ЦП устройств Mac,** чтобы при показе экрана расходовалось меньше ресурсов, пока вы наслаждаетесь новой возможностью делать это со звуком.  \n* **Стала доступна возможность менять звук по умолчанию.** Теперь во время звонка можно свободно менять устройство ввода/вывода по умолчанию. При смене режима будет отображаться значок выбранного по умолчанию устройства.\n* **Исправление для режима отдельного окна на устройствах Mac.** При двойном щелчке по заголовку отдельного окна оно теперь разворачивается должным образом.   \n\n\nНовые функции {added marginTop}\n======================\n\n* **Добавлена синхронизация сворачивания.** Немало людей используют несколько клиентов Discord одновременно. И когда эти люди сворачивали и разворачивали категории на своих серверах, эти изменения происходили не на всех клиентах. Это больше не проблема для вас, странные, но прекрасные люди с кучей клиентов Discord.\n* **Для большего удобства добавлена навигация с клавиатуры в меню эмодзи**.\n* **Еще больше улучшений эмодзи.** Теперь при наведении курсора на реакцию отображается более крупная версия эмодзи. \n\nИсправления и улучшения {progress}\n======================\n\n* **Добавлена нумерация страниц поиска.** Больше не нужно бесконечно прокручивать результаты поиска. Теперь вы легко сможете победить в споре с друзьями и найти ту фразу, которую они сказали полгода назад, даже если они утверждают, будто такого не было.\n* **Переключайтесь в режим рации легко и просто.** При входе на канал, предназначенный только для режима рации, вы получите всплывающее окно с предложением переключиться в режим рации. \n* **Единообразие ошибок при загрузке файлов.** Теперь ошибки загрузки файлов, например из-за нежелательного содержимого, будут отображаться единообразно.\n* **Новый статус при голосовом общении.** Ваш *статус передачи голоса*, или забавный зелёный кружок, который отображается, когда вы говорите в микрофон, теперь будет появляться в левом нижнем углу вашего аватара, когда вы находитесь в голосовом чате.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "es-ES"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nMejoras en las videollamadas {added marginTop}\n======================\n\n* **Hemos reducido el uso de la CPU en las videollamadas en más de un 50 %.** Los ventiladores de vuestros ordenadores pueden tomarse un descanso...\n* **Hemos hecho que las videollamadas en grupo sean más fluidas, claras y estables.** Reuníos con hasta 25 amigos y probadlo. O, bueno, también vale con solo 3.\n* **La calidad de vídeo ya no se basa en la peor conexión a internet.** Antes, cuando alguien con una conexión lenta se unía a una videollamada en grupo, todos los participantes en esa llamada recibían un vídeo de peor calidad. Es un honor anunciar que ha dejado de ser así. Ya podéis dejar de meteros con el pobre Kyle y su internet del año de la pera.\n* **Nuevos ajustes de resolución al compartir pantalla.** Ahora podéis elegir un nivel de calidad predeterminado para compartir pantalla y conseguir la mejor calidad de visualización en función de lo que estéis haciendo. Esto incluye juegos, una mejor legibilidad de los textos y una reproducción de vídeo más fluida.\n\n\nMejoras en Mac {added marginTop}\n======================\n\n* **¡Hemos añadido audio al compartir pantalla en Mac!** Para ello, hay que configurar unas cosillas. Id a *Ajustes > Voz y vídeo > Compartir pantalla* para empezar. Y sí, lo sé, ya era hora. No me echéis la bronca por haber tardado tanto, yo solo escribo las notas de la actualización.\n* **Hemos reducido el uso de la CPU en Mac** para que compartir pantalla consuma menos recursos, ya que ahora se puede disfrutar del glorioso audio de compartir pantalla.  \n* **Hemos corregido el problema del cambio del audio por defecto.** Cambiar el dispositivo de entrada/salida por defecto durante una llamada ahora tiene efecto inmediato. La etiqueta del dispositivo por defecto también mostrará el dispositivo seleccionado.\n* **Corrección de ventana emergente de Mac.** Ahora, hacer doble clic en la barra de título de una ventana emergente hace que se maximice correctamente.   \n\n\nNuevas características {added marginTop}\n======================\n\n* **Hemos añadido la contracción sincronizada.** Algunas personas utilizan varios clientes de Discord en sus ordenadores y, cuando esas personas contraían y expandían categorías en sus servidores, el cambio no aparecía en todos los clientes. Ahora sí lo hace, extrañas y bellísimas personas multicliente.\n* **Hemos añadido la navegación por teclado en el selector de emojis** para proporcionar una mejor accesibilidad.\n* **Yyyyy más cosas sobre emojis.** Ahora pasar el ratón por encima de una reacción muestra una vista previa más grande del emoji. \n\nCorrecciones y actualizaciones {progress}\n======================\n\n* **Hemos añadido la paginación a la barra de búsqueda.** Ya no tenéis que navegar durante una eternidad por los resultados de búsqueda. Ahora podéis saltar de una página a otra para encontrar la prueba irrefutable que necesitáis contra vuestro amigo en un intento por demostrar inequívocamente que dijo una cosa hace unos 6 meses, pero que no recordáis, pero que podréis demostrar si os da un minuto para buscarla porque estáis seguros de que lo dijo.\n* **Cambiad a Pulsar para hablar (PPH) fácilmente.** Ahora, al entrar en un canal exclusivamente de PPH, aparecerá una ventana con la opción de cambiar a PPH. \n* **Errores de subida de archivos más específicos.** Ahora los errores de subida de archivos, como el filtro de contenido explícito, se mostrarán de forma más coherente.\n* **Nuevo estado de transmisión de voz.** Ahora vuestro estado de transmisión de voz, también conocido como «ese adorable circulito verde que aparece cuando habláis por el micro», también aparecerá en vuestro avatar de abajo a la izquierda mientras estéis en un chat de voz.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "sv-SE"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nFörbättrade videosamtal {added marginTop}\n======================\n\n* **Vi har reducerat CPU-användningen med mer än 50 % för videosamtal.** Nu kan fläktarna i din dator slappna av ...\n* **Vi har gjort gruppvideosamtalen smidigare, renare och stabilare.** Ta med upp till 25 vänner och testa. Eller, kanske mer realistiskt, upp till 3 vänner.\n* **Videokvaliteten styrs nu inte längre av den sämsta internetanslutningen.** Tidigare, när någon med ett långsammare nätverk gick med i ett gruppvideosamtal, fick alla i det samtalet sämre videokvalitet. Vi är stolta över att kunna meddela att det inte längre är på det viset. Ni kan sluta mobba folk för deras uråldriga internet.\n* **Nya upplösningsinställningar för skärmdelning.** Du kan nu välja en förinställd kvalitetsnivå för skärmdelning för bästa tittarupplevelse baserat på vad du gör. Detta omfattar spel, bättre läsbarhet av text och smidigare video.\n\n\nFörbättringar för Mac {added marginTop}\n======================\n\n* **Vi har lagt till ljud till skärmdelning på Mac-enheter!** Vissa inställningar krävs. Gå till *Inställningar > Röst & video > Skärmdelning* för att komma igång. Och ja, jag vet, *äntligen*. Kom inte och gnäll på mig om hur lång tid det tog. Jag har hand om uppdateringsmeddelanden, inget annat.\n* **Reducerad CPU-användning på Mac-enheter** för att det ska bli mindre resursintensivt att dela din skärm nu när du njuter av det härliga skärmdelningsljudet.  \n* **Ändring av standardljudet är nu fixat.** Ändring av standardinmatnings-/utmatningsenheten under ett samtal sätter nu igång omedelbart. Standardenheten markerar även vilken enhet som är vald.\n* **Fixade pop ut-fönster för Mac.** Genom att dubbelklicka på namnlisten för pop ut-fönster maximeras det som det ska.   \n\n\nNya funktioner {added marginTop}\n======================\n\n* **Vi ha lagt till minimeringssynkning.** De finns de som använder fler än en Discord-klient på sina datorer. När dessa användare minimerade och expanderade kategorier på sina servrar återspeglades inte dessa förändringar på alla klienter. Nu, alla ni underbart märkliga flerklientsmänniskor, så gör det det.\n* **Vi ha lagt till tangentbordsnavigering i emojiväljaren** för bättre tillgänglighet.\n* **Duuuu, mer emojigrejer!** Om du hovrar över en reaktion visas nu en större förhandsvisning av emojin. \n\nFixar och uppdateringar {progress}\n======================\n\n* **Vi har lagt till paginering till sökfältet.** Du behöver inte längre bläddra bland ändlösa sökresultat. Nu kan du hoppa mellan sidor för att hitta precis de bevis du behöver mot en kompis för att påpeka att hon eller han helt säkert sa en sak för sex månader sedan, men du kommer inte riktigt ihåg vad det var och behöver bara en minut för att hitta det som du lovar att hon eller han bergis sa.\n* **Växla till tryck-för-tal (PTT) utan problem.** När du går med i en endast-tryck-för-tal-kanal får du nu ett pop up-meddelande som ger dig möjlighet att växla till tryck-för-tal. \n* **Mer exakta filuppladdningsfel.** Filuppladdningsfel, så som filter för stötande innehåll, kommer nu att visas mer konsekvent.\n* **Ny röstsändningsstatus.** Din *röstsändningsstatus*, eller den konstiga lilla gröna cirkeln som visar att du pratar i mikrofonen, kommer nu att synas runt din avatar längst ner till vänster när du är i en röstkanal.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "pt-BR"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nMelhorias na Chamada de Vídeo {added marginTop}\n======================\n\n* **Reduzimos o uso da CPU em mais de 50% para chamadas de vídeo.** Assim, os ventiladores do seu computador podem ter um descanso…\n* **Deixamos as chamadas de vídeo em grupo mais suaves, claras e estáveis.** Chame 25 amigos ou mais e experimente. Ou, sendo mais realista, até 3 amigos.\n* **A qualidade do vídeo não é mais baseada na pior conexão com a internet.** Antes, quando uma pessoa com internet lenta se juntava à chamada, todo mundo recebia um vídeo de má qualidade. Bem, estamos orgulhosos em anunciar que não é mais assim. Vocês podem parar de zoar o Joãozinho pela internet a lenha dele.\n* **Novas configurações de resolução do compartilhamento de tela.** Agora você pode escolher o nível de qualidade da sua tela compartilhada baseado no que você está fazendo. Isso inclui jogos, melhor leitura de texto e vídeos mais suaves.\n\n\nMelhorias para o Mac {added marginTop}\n======================\n\n* **Adicionamos áudio para o compartilhamento de tela no Mac!** Algumas configurações serão necessárias. Para começar, vá para *Configuração > Voz e Vídeo > Compartilhamento de tela*. E sim, eu sei, *finalmente.* Por favor, não grite comigo sobre como isso demorou, eu só escrevo as notas de atualização.\n* **Uso da CPU no Mac reduzido** para assegurar que compartilhar sua tela use menos recursos, enquanto você aproveita o novo e maravilhoso compartilhamento tela com áudio.  \n* **Alteração da correção de áudio padrão agora está disponível.** Alterar o dispositivo de entrada/saída padrão durante uma chamada agora tem efeito imediato. A marcação do dispositivo padrão também exibirá qual dispositivo está selecionado.\n* **Consertamos os pop-ups no Mac** O duplo-clique na barra de título de um pop-up agora vai maximizá-lo corretamente.   \n\n\nNovos recursos {added marginTop}\n======================\n\n* **Adicionamos sincronização ao fechar.** Há pessoas por aí que usam múltiplos clientes Discord em seus computadores. E quando essas pessoas fechavam e abriam categorias em seus servidores, nem todos os clientes recebiam essa alteração. Agora recebem, queridas pessoas estranhas com muitos clientes.\n* **Adicionamos navegação pelo teclado no seletor de emojis** para uma melhor acessibilidade.\n* **Hããã mais coisa de emoji.** Passar o mouse pelas reações agora mostra prévias maiores do emoji. \n\n\nCorreções e atualizações {progress}\n======================\n\n* **Adicionamos paginação à barra de busca.** Você não vai mais precisar rolar infinitamente pelos resultados de busca. Agora você pode pular direto entre páginas para encontrar a prova concreta contra seu amigo, de que ele realmente disse isso, tipo, seis meses atrás, apesar de você não se lembrar direito, mas espera só um minuto para você ir procurar, porque ele disse isso sim e você pode provar.\n* **Mude para Aperte para Falar (APF) sem esforço.** Ao entrar em um canal que é apenas APF, você agora receberá um pop-up com a opção de mudar para APF. \n* **Erros ao enviar arquivos estão mais precisos.** Erros no envio de arquivos, como o filtro de conteúdo explícito, serão exibidos com mais consistência.\n* **Novo status de transmissão de voz.** Seu *status de transmissão de voz,* ou o circulozinho verde que mostra que você está falando no microfone, agora é visível na parte de baixo do seu avatar, à esquerda.\n\n\n---changelog---\ndate: "2021-06-21"\nlocale: "tr"\nrevision: 1\nimage: "https://cdn.discordapp.com/attachments/677236002271526936/857671612651143178/7gFzadkQ.png"\n---\nGörüntülü Arama Geliştirmeleri {added marginTop}\n======================\n\n* **Görüntülü aramalar esnasındaki işlemci kullanımını %50\'den fazla azalttık.** Bilgisayar fanların artık biraz dinlenebilir...\n* **Görüntülü grup aramalarını daha akıcı, temiz ve stabil hale getirdik.** 25 arkadaşını topla ve dene. Daha gerçekçi olmak gerekirse, 3 arkadaşını.\n* **Görüntü kalitesi artık en kötü internet bağlantısına göre ayarlanmıyor.** Önceden, yavaş bağlantıya sahip biri görüntülü grup aramasına katıldığında aramadaki herkesin görüntü kalitesi azalırdı. Bu durumun artık böyle olmadığını gururla duyuruyoruz. Arkadaşlarınızın çağdışı internetlerine laf atmayı bırakabilirsiniz.\n* **Yeni ekran paylaşımı çözünürlüğü ayarları.** Artık yaptığın işe en uygun görüntüleme deneyimini yaşamak adına ekran paylaşımı için önceden belirlenen bir kalite seviyesi seçebilirsin. Bunların içinde oyun, daha iyi metin okunurluğu ve daha akıcı video seçenekleri bulunur.\n\n\nMac Geliştirmeleri {added marginTop}\n======================\n\n* **Mac\'teki ekran paylaşımına ses eklendi!** Bu ufak bir kurulum gerektiriyor. *Ayarlar > Ses ve Görüntü > Ekran Paylaşımı* sekmesine gitmen gerekiyor. Evet, evet; *sonunda*. Niye bu kadar uzun sürdüğünü bana sorma, ben sadece güncelleme notlarını yazıyorum.\n* **Mac\'teki işlemci kullanımı azaldı.** Böylece ekran paylaşımın daha az kaynak gerektirecek ve sen de o güzelim sesli ekran paylaşımının tadını çıkarabileceksin.  \n* **Varsayılan ses aygıtını değiştirme sorununu çözdük.** Bir arama esnasında varsayılan ses giriş/çıkış aygıtını değiştirmek artık anında geçerli oluyor. Varsayılan cihaz etiketi de hangi cihazın seçili olduğunu gösterecek.\n* **Mac pencere modu sorununu çözdük.** Pencere modu başlığına çift tıklamak düzgün bir şekilde ekranı kaplamasını sağlayacak.   \n\n\nYeni Özellikler {added marginTop}\n======================\n\n* **Daraltma senkronizasyonu ekledik.** Bilgisayarlarında birden fazla Discord istemcisi çalıştıran bazı kişiler var. Bu kişiler sunucularındaki kategorileri daraltıp genişlettiğinde bu değişiklik tüm istemcilerde geçerli olmuyordu. Artık oluyor. Bizce hiç de tuhaf olmayan \\"çok istemci severler\\" sevinebilir.\n* **Emoji seçiciye klavye kısayolu ekledik.** Böylece erişilebilirliği arttırmış olduk.\n* **Iıı, yeni emoji zımbırtıları.** Artık imleci bir tepkinin üzerine getirmek emojinin önizlemesini daha genişçe gösteriyor. \n\n\nDüzeltmeler ve Güncellemeler {progress}\n======================\n\n* **Arama çubuğuna sayfalandırma ekledik.** Artık arama sonuçlarının içinde kaybolmana gerek kalmayacak. Böylece arkadaşının altı ay önce söylediğini iddia ettiğin, onun kesinlikle yalanladığı, ama tam hatırlamasan da senin yüzde yüz emin olduğun şey hakkındaki delili saniyeler içinde bulmak için sayfalar arasında hızlıca geçiş yapabilirsin.\n* **Bas-konuşa (PTT) kusursuzca geçiş yap.** Sadece bas-konuş kullanılan bir kanala girdiğinde bas-konuşa geçiş yapabilmen için bir pencere açılacak. \n* **Daha isabetli dosya yükleme hataları.** Sakıncalı içerik filtresi gibi dosya yükleme hataları artık daha tutarlı görünecek.\n* **Yeni ses aktarımı durumu.** *Ses aktarımı durumun*, yani mikronuna konuştuğunda görünen minik yeşil daire artık sesli sohbetteyken sol alttaki avatarının etrafında görünecek.\n\n\n'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(8)),a=h(n(3)),o=h(n(28)),i=h(n(2)),l=_(n(5829)),u=h(n(478)),s=_(n(5672)),d=h(n(71)),f=h(n(79)),c=h(n(12)),p=h(n(5826)),v=h(n(373)),y=n(1);function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e){return e&&e.__esModule?e:{default:e}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O="DetectedOffPlatformPremiumPerksStore",I={},T={},C=[];function b(){for(var e,t=!1,n=g(r.default.values(T));!(e=n()).done;){var a=e.value,o=a.skuId,i=a.applicationId;if(!C.includes(o)){var l=d.default.getGame(i);if(null!=l){var f=v.default.get(o);null!=f?p.default.applicationIdsFetching.has(l.id)||p.default.isEntitledToSku(c.default.getCurrentUser(),o,l.id,l.id)||!f.available?null!=I[o]&&(delete I[o],t=!0):(I[o]={skuId:o,applicationId:i},t=!0):v.default.isFetching(o)||v.default.didFetchingSkuFail(o)||s.fetchSKU(l.id,o)}else d.default.isFetching(i)||d.default.didFetchingFail(i)||u.default.fetchApplication(i)}}return t}var M=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var i=a.prototype;return i.initialize=function(){this.waitFor(f.default,v.default,p.default),C=o.default.get(O)||C},i.getDetectedOffPlatformPremiumPerks=function(){return r.default.values(I)},a}(a.default.Store))(i.default,{LOGOUT:function(e){return I={},void(T={})},SKU_FETCH_SUCCESS:function(e){return b()},ENTITLEMENT_FETCH_APPLICATION_SUCCESS:function(e){return b()},ENTITLEMENT_CREATE:function(e){return b()},APPLICATION_FETCH_SUCCESS:function(e){return b()},DETECTED_OFF_PLATFORM_PREMIUM_PERKS_DISMISS:function(e){var t=e.skuId;if(delete I[t],C.includes(t))return!1;C.push(t),o.default.set(O,C)},RUNNING_GAMES_CHANGE:function(e){return function(){for(var e,t=!1,n=g(f.default.getRunningGames());!(e=n()).done;){var r=e.value,a=r.id,o=r.distributor;if(null!=a&&o!==y.Distributors.DISCORD)for(var i,u=g(y.OFF_PLATFORM_PREMIUM_PERKS);!(i=u()).done;){var s=i.value,d=s.skuId,c=s.applicationId;c===a&&(C.includes(d)||null==T[d]&&(p.default.applicationIdsFetched.has(c)||p.default.applicationIdsFetching.has(c)||null!=p.default.getForSku(d)||l.fetchUserEntitlementsForApplication(c),T[d]={skuId:d,applicationId:c},t=!0))}}return t&&b(),t}()}});t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(97)),i=u(n(11)),l=u(n(70));n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=!1;var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(l.default,i.default)},a.isEligible=function(){return d},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return d!==(d=l.default.getFriendIDs().length>=10&&o.default.extractTimestamp(i.default.getId())<Date.now()-15552e6)}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;c(n(5));var r=c(n(3)),a=c(n(28)),o=c(n(2)),i=n(9156),l=c(n(684)),u=c(n(15)),s=c(n(40)),d=c(n(12)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v,y={hiddenSurveys:{},currentSurvey:null,iosIsPushNotificationClicked:!1,iosIsInviteShown:!1,iosFirstRunDate:a.default.get(f.FIRST_RUN_DATE_KEY)||null,lastFetched:null},m=y;!function(e){e.IS_OWNER="is_owner",e.IS_ADMIN="is_admin",e.IS_COMMUNITY="is_community",e.GUILD_SIZE="guild_size"}(v||(v={}));var _=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.initialize=function(e){m=e||y},a.getState=function(){return m},a.getCurrentSurvey=function(){return m.currentSurvey},r}(r.default.PersistedStore);_.persistKey="SurveyStore";var h=new _(o.default,{CONNECTION_OPEN:function(e){var t;null!=m.lastFetched&&Date.now()-(null!==(t=m.lastFetched)&&void 0!==t?t:0)<864e5||(0,i.surveyFetch)()},SURVEY_FETCHED:function(e){var t=e.survey,n=m,r=n.hiddenSurveys;if(n.iosIsPushNotificationClicked,n.iosIsInviteShown,m.lastFetched=Date.now(),null!=t&&null==r[t.key]){if(!function(e){var t=e.guild_requirements,n=void 0===t?[]:t,r=e.guild_size,a=void 0===r?[null,null]:r;if(0===n.length)return!0;for(var o=0,i=Object.values(u.default.getGuilds());o<i.length;o++){var c=i[o];if(!n.includes(v.IS_COMMUNITY)||c.hasFeature(f.GuildFeatures.COMMUNITY)){var p=d.default.getCurrentUser(),y=(null==p?void 0:p.id)===c.ownerId,m=s.default.can(f.Permissions.ADMINISTRATOR,c);if((!n.includes(v.IS_OWNER)||y)&&(!n.includes(v.IS_ADMIN)||m)){if(n.includes(v.GUILD_SIZE)){var _=l.default.getMemberCount(c.id);if(null==_)continue;if(null!=a[0]&&_<a[0])continue;if(null!=a[1]&&_>a[1])continue}return!0}}}return!1}(t))return;0,m.currentSurvey=t}},SURVEY_HIDE:function(e){var t=e.key;m.hiddenSurveys[t]=!0,m.currentSurvey=null},PUSH_NOTIFICATION_CLICK:function(e){m.iosIsPushNotificationClicked=!0},DISPLAYED_INVITE_SHOW:function(e){m.iosIsInviteShown=!0},LOGOUT:function(e){m.hiddenSurveys={}}});t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;_(n(0));var r,a=n(3),o=y(n(8953)),i=_(n(8253)),l=y(n(10)),u=y(n(36)),s=_(n(8352)),d=y(n(278)),f=y(n(9712)),c=y(n(8958)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.closePopout,n=e.onSelect,r=(0,a.useStateFromStores)([l.default,u.default],(function(){return l.default.getChannel(u.default.getChannelId())})),s=(0,a.useStateFromStoresObject)([c.default],(function(){return{everyoneFilter:c.default.everyoneFilter,roleFilter:c.default.roleFilter,guildFilter:c.default.guildFilter}})),d=s.everyoneFilter,f=s.roleFilter,y=s.guildFilter;return h(i.default,{navId:"mentions-filter","aria-label":v.default.Messages.FILTER,onClose:t,onSelect:n},void 0,h(i.MenuCheckboxItem,{id:"Everyone",label:v.default.Messages.RECENT_MENTIONS_FILTER_EVERYONE,action:function(){o.default.setGuildFilter({everyoneFilter:!d})},checked:d}),h(i.MenuCheckboxItem,{id:"Roles",label:v.default.Messages.RECENT_MENTIONS_FILTER_ROLES,action:function(){o.default.setGuildFilter({roleFilter:!f})},checked:f}),null==r||r.isPrivate()?null:h(i.MenuCheckboxItem,{id:"All Servers",label:v.default.Messages.RECENT_MENTIONS_FILTER_ALL_SERVERS,action:function(){o.default.setGuildFilter({guildFilter:y===p.RecentMentionsFilters.THIS_SERVER?p.RecentMentionsFilters.ALL_SERVERS:p.RecentMentionsFilters.THIS_SERVER})},checked:y===p.RecentMentionsFilters.ALL_SERVERS}))}E.displayName="FilterPopout";var g=h(f.default,{});function S(){return h(d.default,{align:d.default.Align.RIGHT,animation:d.default.Animation.NONE,position:d.default.Positions.BOTTOM,renderPopout:function(e){return h(E,{closePopout:e.closePopout})}},void 0,(function(e){var t=e.onClick;return h(s.default,{tooltip:v.default.Messages.FILTER,color:s.CircleIconButtonColors.SECONDARY,icon:g,onClick:t})}))}S.displayName="RecentMentionsFilterButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,fill:"none"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.33331 1.33331C3.78103 1.33331 3.33331 1.78103 3.33331 2.33331V9.99998H2.33331C1.78103 9.99998 1.33331 10.4477 1.33331 11C1.33331 11.5523 1.78103 12 2.33331 12H3.33331V13.6666C3.33331 14.2189 3.78103 14.6666 4.33331 14.6666C4.8856 14.6666 5.33331 14.2189 5.33331 13.6666V12H6.33331C6.8856 12 7.33331 11.5523 7.33331 11C7.33331 10.4477 6.8856 9.99998 6.33331 9.99998H5.33331V2.33331C5.33331 1.78103 4.8856 1.33331 4.33331 1.33331ZM10.6666 2.33331C10.6666 1.78103 11.1144 1.33331 11.6666 1.33331C12.2189 1.33331 12.6666 1.78103 12.6666 2.33331V3.99998H13.6666C14.2189 3.99998 14.6666 4.44769 14.6666 4.99998C14.6666 5.55226 14.2189 5.99998 13.6666 5.99998H12.6666V13.6666C12.6666 14.2189 12.2189 14.6666 11.6666 14.6666C11.1144 14.6666 10.6666 14.2189 10.6666 13.6666V5.99998H9.66665C9.11436 5.99998 8.66665 5.55226 8.66665 4.99998C8.66665 4.44769 9.11436 3.99998 9.66665 3.99998H10.6666V2.33331Z",fill:d,className:f}))}d.displayName="Filter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r,a=P(n(0)),o=N(n(9)),i=N(n(66)),l=n(680),u=n(3),s=N(n(2)),d=N(n(105)),f=N(n(29)),c=N(n(151)),p=N(n(8952)),v=N(n(47)),y=N(n(24)),m=n(468),_=N(n(13)),h=n(121),E=N(n(9714)),g=N(n(8962)),S=P(n(8963)),O=N(n(9715)),I=P(n(8668)),T=N(n(8954)),C=n(1),b=N(n(6)),M=N(n(7652));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e){var t=e.setTab,n=e.onJump,r=e.showTutorial,f=e.setSeenTutorial,v=e.closePopout,y=a.useRef(null),N=(0,I.default)(y),A=N[0],P=N[1],D=A.loadState,w=A.channels,k=P.maybeLoadMore,U=P.markAllRead;!function(e,t,n){a.useLayoutEffect((function(){var r,a=t.scrollToChannelIndex;n.clearScrollToChannelIndex();var o=e.current;if(null!=o&&null!=a){var i=null===(r=o.getScrollerNode())||void 0===r?void 0:r.children;if(null!=i){var l=i[a];if(null!=l){var u=o.getScrollerState(),s=u.scrollTop,d=s+u.scrollHeight;(l.offsetTop<s||l.offsetTop>d)&&o.scrollTo({to:l.offsetTop})}}}}))}(y,A,P),function(e,t){a.useEffect((function(){var n=function(){var n=e.channels.find((function(e){return!e.collapsed}));null!=n&&t.markChannelRead(n)};return h.ComponentDispatch.subscribe(C.ComponentActions.MARK_TOP_INBOX_CHANNEL_READ,n),function(){h.ComponentDispatch.unsubscribe(C.ComponentActions.MARK_TOP_INBOX_CHANNEL_READ,n)}}),[t,e.channels])}(A,P),a.useEffect((function(){_.default.track(C.AnalyticEvents.OPEN_POPOUT,{type:"Inbox"})}),[]),a.useEffect((function(){return s.default.subscribe(C.ActionTypes.CONNECTION_OPEN,v),function(){s.default.unsubscribe(C.ActionTypes.CONNECTION_OPEN,v)}}),[v]);var G,F=(0,u.useStateFromStores)([d.default],(function(){return d.default.messageGroupSpacing})),B=(0,T.default)("unreads",y);if(0===w.length)return L("div",{className:M.default.container},void 0,L(S.default,{tab:S.Tab.Unreads,setTab:t}),L(g.default,{Icon:p.default,header:b.default.Messages.UNREADS_EMPTY_STATE_HEADER,tip:"OS X"===(null===(G=i.default.os)||void 0===G?void 0:G.family)?b.default.Messages.UNREADS_EMPTY_STATE_TIP_MAC:b.default.Messages.UNREADS_EMPTY_STATE_TIP}));var H=L(j,{setSeenTutorial:f});return L("div",{className:(0,o.default)(M.default.container,"group-spacing-"+F),"aria-label":b.default.Messages.UNREADS_TAB_LABEL},void 0,L(S.default,{tab:S.Tab.Unreads,setTab:t},void 0,L(E.default,{onClick:U})),L(l.ListNavigatorProvider,{navigator:B},void 0,L(l.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement(m.AdvancedScrollerThin,R({ref:function(e){var n;y.current=e,t.current=null!==(n=null==e?void 0:e.getScrollerNode())&&void 0!==n?n:null}},o,{onScroll:D===I.LoadState.Done?void 0:k,className:M.default.scroller}),r?H:null,(0,O.default)(w,P,n),D===I.LoadState.Done?null:L(c.default,{className:M.default.spinner}))}))))}D.displayName="UnreadMessages";var w=L(p.default,{width:24,height:24});function j(e){var t=e.setSeenTutorial;return L("div",{className:M.default.tutorial},void 0,L("div",{className:M.default.tutorialIcon},void 0,w),L("div",{},void 0,L(v.default,{className:M.default.tutorialHeader,size:v.default.Sizes.SIZE_16},void 0,b.default.Messages.UNREADS_TUTORIAL_HEADER),L(y.default,{color:y.default.Colors.HEADER_SECONDARY,size:y.default.Sizes.SIZE_14},void 0,b.default.Messages.UNREADS_TUTORIAL_BODY),L(f.default,{className:M.default.tutorialButton,onClick:t,size:f.default.Sizes.SMALL},void 0,b.default.Messages.TUTORIAL_CLOSE)))}j.displayName="Tutorial"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.onClick,n=a.useState(!1),r=n[0],i=n[1],l=function(){t(),s.default.track(d.AnalyticEvents.INBOX_CHANNEL_ACKED,{marked_all_channels_as_read:!0,num_unread_channels_remaining:0})};return a.createElement(a.Fragment,null,r?y(_,{confirm:l,cancel:function(){return i(!1)}}):null,y(o.default,{tooltip:f.default.Messages.UNREADS_MARK_READ,color:o.CircleIconButtonColors.SECONDARY,icon:m,onClick:function(e){e.shiftKey?l():i(!0)}}))};var r,a=v(n(0)),o=v(n(8352)),i=c(n(8964)),l=n(466),u=c(n(24)),s=c(n(13)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y(i.default,{});function _(e){var t=e.cancel,n=e.confirm;return y(l.DeclarativeConfirmModal,{dismissable:!0,header:f.default.Messages.UNREADS_CONFIRM_MARK_ALL_READ_HEADER,confirmText:f.default.Messages.MARK_AS_READ,cancelText:f.default.Messages.CANCEL,onCancel:t,onConfirm:n},void 0,y(u.default,{color:u.default.Colors.STANDARD},void 0,f.default.Messages.UNREADS_CONFIRM_MARK_ALL_READ_DESCRIPTION))}_.displayName="ConfirmDeleteModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=t.markChannelRead,d=t.markGuildRead,f=t.deleteChannel,p=t.toggle,v=t.getNumUnreadChannels,y=null;return a.default.flatMap(e,(function(e){var t=e.sortOrder!==y;y=e.sortOrder;var a=[];return t&&(e.hasLoadedAnything&&e.sortOrder===l.SortOrder.ReallyOldChannel?a.push(c(o.default,{className:s.default.divider,contentClassName:s.default.dividerContent},"old-divider",u.default.Messages.UNREADS_OLD_CHANNELS_DIVIDER)):e.hasLoadedAnything&&e.sortOrder===l.SortOrder.NoNotifications&&a.push(c(o.default,{className:s.default.divider,contentClassName:s.default.dividerContent},"disabled-divider",u.default.Messages.UNREADS_NO_NOTIFICATIONS_DIVIDER))),a.push(c(i.default,{channel:e,markChannelRead:r,markGuildRead:d,toggle:p,deleteChannel:f,onJump:n,getNumUnreadChannels:v},e.channelId)),a}))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(8)),o=d(n(8472)),i=d(n(9716)),l=n(8668),u=d(n(6)),s=d(n(7651));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=N(n(0)),o=b(n(9)),i=n(122),l=n(3),u=b(n(2)),s=n(8321),d=n(106),f=b(n(8965)),c=n(42),p=b(n(10)),v=N(n(8352)),y=b(n(61)),m=b(n(149)),_=b(n(683)),h=b(n(372)),E=b(n(8964)),g=b(n(9717)),S=b(n(8960)),O=b(n(9720)),I=n(1),T=b(n(6)),C=b(n(7650));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e){var t=e.channel,n=e.deleteChannel,r=a.useRef(null),o=a.useState([0,0]),l=o[0],u=l[0],s=l[1],d=o[1],f=t.deleted&&u>0;if(t.deleted&&0===u&&null!=r.current){var c=r.current.offsetHeight,p=r.current.offsetTop,v=r.current.parentElement.scrollTop;d([c,c-(v>p?c-(v-p):c)])}var y=(0,i.useSpring)({config:{clamp:!0,friction:18,tension:200},opacity:f?0:1,size:f?0:1,onRest:function(){n(t.channelId)}}),m={opacity:y.opacity,height:y.size.to((function(e){return f?function(e,t,n){return t+(e-t)*n}(u,s,e):"auto"}))};return a.createElement(i.animated.div,{ref:r,style:m},a.createElement(w,e))}R.displayName="AnimatedUnreadChannel";var L=a.memo(R);function D(e){var t=e.channel,n=e.onJump,r=e.deleteChannel,o=e.toggle,i=(0,l.useStateFromStores)([p.default],(function(){return p.default.getChannel(t.channelId)}));if(a.useEffect((function(){null==i||!t.isFullyLoaded||t.hasError||t.collapsed||0!==t.messages.length||u.default.wait((function(){(0,s.ack)(t.channelId,!0),r(t.channelId)}))})),null==i)return null;if(!t.hasLoadedAnything)return null;var f=function(e,r){(0,d.trackWithMetadata)(I.AnalyticEvents.INBOX_CHANNEL_CLICKED,{channel_id:t.channelId,guild_id:t.guildId}),(0,c.transitionTo)(I.Routes.CHANNEL(t.guildId||I.ME,t.channelId,r||t.oldestUnreadMessageId)),n(e)};return P("div",{className:C.default.channel},void 0,P(S.default,{channel:i,gotoChannel:f,mentionCount:t.mentionCount,toggleCollapsed:o,channelState:t},void 0,P(g.default,{channel:i}),a.createElement(U,e),a.createElement(F,e)),t.collapsed?null:P(O.default,{channel:t,channelRecord:i,gotoChannel:f}))}t.default=L,D.displayName="UnreadChannel";var w=a.memo(D),j=P(E.default,{width:16,height:16}),k=P(h.default,{width:16,height:16});function U(e){var t=e.channel,n=e.markChannelRead,r=e.markGuildRead,a=e.getNumUnreadChannels,o=(0,f.default)()&&null!=t.guildId;return P(v.default,{className:C.default.markReadButton,tooltip:o?T.default.Messages.MARK_GUILD_AS_READ:T.default.Messages.MARK_AS_READ,color:v.CircleIconButtonColors.TERTIARY,icon:o?j:k,onClick:function(){o&&null!=t.guildId?r(t.guildId):n(t),(0,d.trackWithMetadata)(I.AnalyticEvents.INBOX_CHANNEL_ACKED,{channel_id:t.channelId,guild_id:t.guildId,marked_all_channels_as_read:!1,num_unread_channels_remaining:a()-1})}})}U.displayName="MarkReadButton";var G=P(_.default,{width:16,height:16});function F(e){var t=e.channel,n=e.toggle,r=e.getNumUnreadChannels;function i(){n(t),(0,d.trackWithMetadata)(I.AnalyticEvents.INBOX_CHANNEL_COLLAPSED,{channel_id:t.channelId,guild_id:t.guildId,num_unread_channels_remaining:r(),is_now_collapsed:!t.collapsed})}return P(m.default,{text:T.default.Messages.COLLAPSE},void 0,(function(e){var n;return a.createElement(y.default,A({},e,{className:(0,o.default)(C.default.collapseButton,(n={},n[C.default.collapsed]=t.collapsed,n)),onClick:i}),G)}))}F.displayName="CollapseButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;p(n(0));var r,a=p(n(8352)),o=f(n(278)),i=f(n(8666)),l=f(n(9718)),u=f(n(9719)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=v(i.default,{width:16,height:16});function m(e){var t=e.channel;return v(o.default,{align:o.default.Align.RIGHT,animation:o.default.Animation.NONE,position:o.default.Positions.BOTTOM,renderPopout:function(){return t.isThread()?v(u.default,{channel:t,location:{section:s.AnalyticsSections.INBOX}}):v(l.default,{channel:t,location:{section:s.AnalyticsSections.INBOX}})}},void 0,(function(e){var t=e.onClick;return v(a.default,{tooltip:d.default.Messages.NOTIFICATION_SETTINGS,color:a.CircleIconButtonColors.TERTIARY,icon:y,onClick:t})}))}m.displayName="NotificationSettingsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;p(n(0));var r,a=n(3),o=n(389),i=f(n(8399)),l=f(n(8966)),u=p(n(8253)),s=f(n(15)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.channel,n=e.location,r=e.onSelect,f=(0,a.useStateFromStores)([s.default],(function(){return s.default.getGuild(t.guild_id)})),c=(0,i.default)(t,n),p=(0,l.default)(f,n);return v(u.default,{navId:"recents-notifications",onClose:o.closeContextMenu,"aria-label":d.default.Messages.RECENTS_NOTIFICATIONS_MENU_LABEL,onSelect:r},void 0,v(u.MenuGroup,{},void 0,c),v(u.MenuGroup,{},void 0,p))}y.displayName="RecentsNotificationSettingsContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;c(n(0));var r,a=n(389),o=c(n(8253)),i=d(n(8265)),l=n(392),u=n(8473),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.channel,n=e.onSelect,r=(0,u.useThreadNotificationSetting)(t);return p(o.default,{navId:"recents-thread-notifications",onClose:a.closeContextMenu,"aria-label":s.default.Messages.RECENTS_NOTIFICATIONS_MENU_LABEL,onSelect:n},void 0,(0,l.getThreadNotificationOptions)().map((function(e){var n=e.setting,l=e.label;return p(o.MenuRadioItem,{group:"thread-notifications",id:""+n,label:l,action:function(){i.default.setNotificationSetting(t,n),(0,a.closeContextMenu)()},checked:n===r},n)})))}v.displayName="RecentsThreadNotificationSettingsContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(5)),i=n(680),l=n(3),u=I(n(88)),s=I(n(8590)),d=I(n(8667)),f=I(n(9721)),c=I(n(40)),p=I(n(39)),v=I(n(29)),y=I(n(151)),m=I(n(8472)),_=n(1161),h=I(n(8959)),E=n(8668),g=n(1),S=I(n(6)),O=I(n(7649));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M={left:4,right:-12};function N(e){var t,n=e.channel,r=e.message,o=e.compact,l=e.isGroupStart,s=(0,i.useListItem)(null!==(t=r.id)&&void 0!==t?t:""),d=a.useCallback((function(e){var t;"ArrowLeft"===e.key&&(null===(t=document.querySelector('[data-recents-channel="'+n.id+'"]'))||void 0===t||t.focus())}),[n.id]);return b(u.default,{offset:M},void 0,a.createElement("div",C({className:O.default.messageContainer,key:r.id,onKeyDown:d},s),b(h.default,{guildId:n.guild_id,message:r,className:O.default.jumpButton}),b(f.default,{id:r.id,message:r,channel:n,className:O.default.message,compact:o,animateAvatar:!1,isGroupStart:l,onKeyDown:d})))}N.displayName="UnreadMessage";var A=b(y.default,{},"spinner");function P(e){var t=e.channel,n=e.channelRecord,r=e.gotoChannel,a=(0,l.useStateFromStores)([p.default],(function(){return p.default.messageDisplayCompact})),i=(0,l.useStateFromStores)([c.default],(function(){return c.default.can(g.Permissions.CREATE_INSTANT_INVITE,n)})),u=0===t.messages.length||t.messages[0].timestamp.isSame((0,o.default)(),"day"),f=[];if(!t.collapsed){var y=null,h=null,I=t.messages.slice(0,E.MAX_SHOWN_MESSAGES);I.forEach((function(e){if(!(0,s.default)(e,i)){if(!(u||null!=y&&y.isSame(e.timestamp,"day"))){var t=(0,_.dateFormat)(e.timestamp,"LL");f.push(b(m.default,{className:O.default.divider},t,t)),y=e.timestamp}var r=null==h||(0,d.default)(h,e);h=e,f.push(b(N,{channel:n,message:e,compact:a,isGroupStart:r},e.id))}})),t.messages.length>=E.MAX_SHOWN_MESSAGES&&f.push(b(v.default,{color:v.default.Colors.LINK,look:v.default.Looks.LINK,onClick:function(e){return r(e,I[I.length-1].id)}},"view-all",S.default.Messages.UNREADS_VIEW_CHANNEL," ›")),0===f.length&&(f=[A])}return b("div",{className:O.default.messages},void 0,f)}P.displayName="UnreadChannelMessages"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(9)),i=n(3),l=A(n(105)),u=R(n(706)),s=n(1209),d=A(n(10)),f=A(n(70)),c=A(n(39)),p=A(n(255)),v=A(n(8424)),y=A(n(8266)),m=n(99),_=A(n(685)),h=A(n(682)),E=n(8831),g=A(n(8497)),S=A(n(8652)),O=A(n(8653)),I=A(n(8654)),T=A(n(8931)),C=n(1),b=A(n(6)),M=A(n(7379)),N=A(n(7343));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return(D=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}).apply(this,arguments)}function w(e){var t,n=e.channel,r=e.message,p=e.compact,y=void 0!==p&&p,b=e.className,M=e.onContextMenu,A=e.onClick,P=e.disableInteraction,R=void 0!==P&&P,j=e.hasThread,U=C.MessageTypesWithLazyLoadedReferences.has(r.type)?r.messageReference:void 0,G=(0,i.useStateFromStores)([u.default],(function(){return u.default.getMessageByReference(U)})),F=(0,i.useStateFromStores)([d.default],(function(){return r.type===C.MessageTypes.THREAD_STARTER_MESSAGE&&G.state===u.ReferencedMessageState.LOADED?d.default.getChannel(G.message.channel_id):null})),B=(0,i.useStateFromStoresObject)([l.default,c.default],(function(){var e=c.default.inlineAttachmentMedia,t=c.default.gifAutoPlay,n=c.default.renderEmbeds,r=c.default.inlineEmbedMedia,a=c.default.renderReactions,o=l.default.useReducedMotion;return{gifAutoPlay:t&&!o,renderEmbeds:n,inlineAttachmentMedia:e,inlineEmbedMedia:r,renderReactions:a}})),H=(0,g.default)(r,B.inlineEmbedMedia&&B.renderEmbeds),x=H.content,V=H.hasSpoilerEmbeds,W=(0,h.default)(r),Y=(0,s.useCanSeeThreads)(),z=(0,i.useStateFromStores)([d.default],(function(){return r.hasFlag(C.MessageFlags.HAS_THREAD)&&d.default.getChannel(r.id)}));return r.type===C.MessageTypes.THREAD_STARTER_MESSAGE&&G.state===u.ReferencedMessageState.LOADED&&null!=F?a.createElement(w,D({},e,{message:G.message,channel:F,hasThread:!1})):f.default.isBlocked(r.author.id)?L(k,{className:b,compact:y,count:1}):L(v.default,{compact:y,className:(0,o.default)(b,(t={},t[N.default.ephemeral]=(0,m.hasFlag)(r.flags,C.MessageFlags.EPHEMERAL),t[N.default.disableInteraction]=R,t[N.default.groupStart]=e.isGroupStart,t)),childrenRepliedMessage:(0,T.default)(r,U,G,y),childrenHeader:(0,O.default)(D({},e,{author:W,guildId:n.guild_id})),childrenAccessories:a.createElement(E.MessageAccessories,D({},B,{channel:n,message:r,hasSpoilerEmbeds:V,compact:y,canSuppressEmbeds:!1,canDeleteAttachments:!1,disableReactionReads:!1,disableReactionCreates:!1,disableReactionUpdates:!1,renderThreadAccessory:j,renderComponentAccessory:!1})),childrenMessageContent:(0,S.default)(e,x),childrenSystemMessage:(0,I.default)(e),onContextMenu:M,onClick:A,hasThread:Y&&!1!==j&&null!=z&&r.hasFlag(C.MessageFlags.HAS_THREAD),hasReply:r.type===C.MessageTypes.REPLY,isSystemMessage:(0,_.default)(r)})}w.displayName="InboxMessage";var j=a.memo(w);function k(e){var t=e.className,n=e.count,r=e.compact;return L(v.default,{className:t,compact:r,role:"group",childrenMessageContent:L(y.default,{compact:r,className:M.default.blockedSystemMessage,iconNode:L(p.default,{className:M.default.blockedIcon})},void 0,L("div",{className:M.default.blockedMessageText},void 0,b.default.Messages.BLOCKED_MESSAGE_COUNT.format({count:n})))})}t.default=j,k.displayName="BlockedItemMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch(e){case i.ActivityTypes.PLAYING:return r.default;case i.ActivityTypes.WATCHING:return o.default;default:return a.default}};var r=l(n(8762)),a=l(n(9157)),o=l(n(9158)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(705)),i=n(389),l=A(n(132)),u=n(364),s=A(n(9724)),d=n(8671),f=n(196),c=n(140),p=n(484),v=A(n(1379)),y=A(n(8322)),m=A(n(8264)),_=A(n(8268)),h=A(n(11)),E=A(n(15)),g=A(n(40)),S=A(n(80)),O=A(n(278)),I=A(n(149)),T=A(n(8670)),C=n(121),b=n(1),M=A(n(6)),N=A(n(7655));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return(D=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}).apply(this,arguments)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var k=function(e){var t,n,r,d,A;function P(){for(var t,n=arguments.length,r=new Array(n),d=0;d<n;d++)r[d]=arguments[d];return(t=e.call.apply(e,[this].concat(r))||this).domElementRef=a.createRef(),t.state={userPopoutOpen:!1},t.handleClickUser=function(){t.setState({userPopoutOpen:!t.state.userPopoutOpen})},t.handleCloseUserPopout=function(){t.setState({userPopoutOpen:!1})},t.handleHidePreview=function(){var e=t.props,n=e.hidePreview,r=e.isStreaming,a=e.user;r&&(null==n||n(a.id))},t.handleMouseEnter=function(){var e=t.props,n=e.user,r=e.showPreview;e.isStreaming&&(null==r||r(n.id))},t.handleWatchStream=function(){var e=t.props,n=e.user,r=e.channel,a=e.isWatching,i=e.hidePreview;if(t.canWatchStream){var s={streamType:f.StreamTypes.GUILD,ownerId:n.id,channelId:r.id,guildId:r.guild_id};h.default.getId()!==n.id&&l.default.selectVoiceChannel(r.id),a?((0,v.default)(s),o.default.selectParticipant(s.channelId,(0,c.encodeStreamKey)(s))):(0,u.watchStreamAndTransitionToStream)(s),C.ComponentDispatch.dispatch(b.ComponentActions.POPOUT_CLOSE),null==i||i(n.id)}},t.handleUserContextMenu=function(e){var n=t.props,r=n.channel,o=n.user;(0,i.openContextMenu)(e,(function(e){return a.createElement(y.default,D({},e,{user:o,guildId:r.guild_id,channelId:r.id,showMediaItems:!0,showStageChannelItems:r.isGuildStageVoice()}))}))},t.renderUserPopout=function(e){var n=t.props,r=n.channel,o=n.user,i=r.getGuildId();return a.createElement(_.default,D({userId:o.id,guildId:null!=i?i:void 0,channelId:r.id},e))},t.renderStreamPopout=function(){var e=t.props,n=e.user,r=e.channel,a=e.previewIsOpen;return L(s.default,{user:n,channel:r,onWatch:t.handleWatchStream,canWatch:t.canWatchStream,previewIsOpen:a})},t.renderUser=function(e){var n=t.props,r=n.isSelfOnOtherClient,o=n.shouldShowPreview,i=n.mute,l=n.localMute,u=n.localVideoDisabled,s=n.speaking,d=n.user,f=n.deaf,c=n.priority,p=n.collapsed,v=n.isStreaming,y=n.nick,m=n.video,_=n.serverMute,h=n.serverDeaf,E=n.tabIndex,g=n.embeddedActivityType,S=n.embeddedApplication,C=n.channel,b=t.state.userPopoutOpen,N={user:d,speaking:s,mute:i,localMute:l,localVideoDisabled:u,isStreaming:v,video:m,priority:c,deaf:f,nick:y,collapsed:p,serverMute:_,serverDeaf:h,tabIndex:E,embeddedActivityType:g,embeddedApplication:S,disabled:r,selected:b,onClick:t.handleClickUser,onDoubleClick:t.handleWatchStream,onContextMenu:t.handleUserContextMenu,guildId:C.guild_id};return r?L(I.default,{text:M.default.Messages.CONNECTED_ON_ANOTHER_CLIENT},void 0,(function(e){e.onClick,e.onContextMenu;var t=R(e,["onClick","onContextMenu"]);return a.createElement(T.default,D({},N,t))})):L(O.default,{position:O.default.Positions.RIGHT,renderPopout:t.renderStreamPopout,shouldShow:o&&!b,onRequestClose:t.handleHidePreview,spacing:0},void 0,(function(){return a.createElement(T.default,D({},N,{onMouseDown:e.onMouseDown,onKeyDown:e.onKeyDown}))}))},t}return n=e,(t=P).prototype=Object.create(n.prototype),t.prototype.constructor=t,j(t,n),P.prototype.render=function(){var e=this,t=this.state.userPopoutOpen,n=this.props,r=n.connectUserDragSource,a=n.canDrag,o=n.isSelfOnOtherClient,i=n.user,l=n.channel,u=L("div",{className:N.default.draggable,onMouseEnter:o?void 0:this.handleMouseEnter,onMouseLeave:o?void 0:this.handleHidePreview},void 0,L(O.default,{preload:function(){return(0,m.default)(i.id,i.getAvatarURL(l.guild_id))},position:O.default.Positions.RIGHT,renderPopout:this.renderUserPopout,shouldShow:t,onRequestClose:this.handleCloseUserPopout},void 0,(function(t){return e.renderUser(t)})));return a?r(u):u},r=P,(d=[{key:"canWatchStream",get:function(){var e=this.props,t=e.channel;return e.isStreaming&&(0,p.canWatchStream)(t,S.default,E.default,g.default)}}])&&w(r.prototype,d),A&&w(r,A),P}(a.PureComponent);k.displayName="VoiceUser",k.defaultProps={isSelfOnOtherClient:!1};var U=(0,d.makeVoiceUserDraggable)(k);t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=C(n(0)),o=I(n(9)),i=I(n(3)),l=C(n(8556)),u=I(n(8298)),s=I(n(8600)),d=n(726),f=I(n(9725)),c=I(n(163)),p=I(n(11)),v=I(n(256)),y=I(n(61)),m=I(n(8525)),_=I(n(24)),h=I(n(13)),E=I(n(8935)),g=n(1),S=I(n(6)),O=I(n(7654));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var N=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.user,n=e.streamApplication;h.default.track(g.AnalyticEvents.OPEN_POPOUT,{type:"Stream Preview",other_user_id:t.id,application_id:null!=n?n.id:null,application_name:null!=n?n.name:null,game_id:null!=n?n.id:null,is_streaming:!0})},a.renderPreview=function(e){var t=this.props,n=t.onWatch,r=t.activeStream,a=t.currentUserId,o=t.canWatch;return b(y.default,{onClick:n,className:O.default.previewContainer},void 0,b(E.default,{className:O.default.previewImage,stream:e}),o?b("div",{className:O.default.previewHover},void 0,b(_.default,{size:_.default.Sizes.SIZE_14,color:_.default.Colors.CUSTOM,className:O.default.white},void 0,(0,f.default)(e,r,a))):null)},a.render=function(){var e,t=this.props,n=t.activity,r=t.user,a=t.stream,i=t.previewIsOpen;return null==a?null:b("div",{className:(0,o.default)(O.default.streamPreviewWrapper,(e={},e[O.default.mounted]=i,e))},void 0,b("div",{className:O.default.streamPreview},void 0,this.renderPreview(a),b("div",{className:O.default.body},void 0,null!=n?b(l.default,{hideHeader:!0,type:l.UserActivityTypes.STREAM_PREVIEW,activity:n,user:r,guildId:a.guildId,channelId:a.channelId,actionColor:O.default.watchButton}):b(s.default,{type:l.UserActivityTypes.STREAM_PREVIEW,applicationStream:a,user:r,guildId:a.guildId,channelId:a.channelId,className:O.default.activityActions,color:O.default.watchButton}),b(m.default,{type:m.default.Types.INLINE,className:O.default.protip},void 0,__OVERLAY__?S.default.Messages.WATCH_STREAM_IN_APP:S.default.Messages.WATCH_STREAM_TIP))))},r}(a.PureComponent);N.displayName="StreamPreviewPopout";var A=i.default.connectStores([v.default,c.default,p.default],(function(e){var t=e.user,n=c.default.getStreamForUser(t.id);return{user:t,streamApplication:(0,d.getStreamerApplication)(n,v.default),stream:n,activeStream:c.default.getActiveStreamForApplicationStream(n),currentUserId:p.default.getId(),activity:(0,d.getStreamerActivity)(n,v.default)}}))((0,u.default)((function(e){var t,n=e.channel,r=e.user;return(t={})[n.guild_id]=[r.id],t}))(N));t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(null==t||t.state===o.ApplicationStreamStates.ENDED||(0,a.encodeStreamKey)(t)!==(0,a.encodeStreamKey)(e))return i.default.Messages.WATCH_STREAM;if(t.ownerId===n)return i.default.Messages.WATCH_STREAM_STREAMING;return i.default.Messages.WATCH_STREAM_WATCHING};var r,a=n(140),o=n(1),i=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=e.background,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","background"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M21.178 1.70703L22.592 3.12103L4.12103 21.593L2.70703 20.178L21.178 1.70703Z"}),s("path",{className:c,fill:d,d:"M18 10.5283L10.5287 18H21V17C19.344 17 18 15.657 18 14V10.5283Z"}),s("path",{className:c,fill:d,d:"M8.957 19.5718L9.52877 19H15.4449C14.7519 20.19 13.4759 21 11.9999 21C10.7748 21 9.68752 20.442 8.957 19.5718Z"}),s("path",{className:c,fill:d,d:"M12 3C13.417 3 14.71 3.5 15.734 4.321L5.99805 14.058C5.99805 14.0479 5.99856 14.038 5.99907 14.0283C5.99956 14.0188 6.00005 14.0094 6.00005 14V9C6.00005 5.686 8.68605 3 12 3Z"}))}d.displayName="BellOff"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=a.useState(!1),r=n[0],u=n[1],d=a.useState(null),f=d[0],c=d[1];return{loading:r,error:f,onSave:function(){var n,r=(n=regeneratorRuntime.mark((function n(r){var a,s,d,f,p,v,y,m,_,h,E;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=r.topic,s=r.privacyLevel,d=r.description,f=r.schedule,p=r.ticket,""!==a&&null!=s&&null!=f){n.next=3;break}return n.abrupt("return");case 3:if(v=null!=p&&null==p.priceTier,null!=f.startDate&&!v){n.next=6;break}return n.abrupt("return");case 6:return u(!0),c(null),n.prev=8,m={name:a,description:d,privacyLevel:s,channelId:e.id,scheduledStartTime:f.startDate.toISOString(),scheduledEndTime:null===(y=f.endDate)||void 0===y?void 0:y.toISOString(),entityType:l.GuildScheduledEventEntityTypes.STAGE_INSTANCE},null!=p&&null!=(null==p?void 0:p.priceTier)&&(_=p.priceTier,h=p.color,m.tickets=[{priceTier:_,color:h}]),n.next=13,i.default.createGuildEvent(e.guild_id,m);case 13:t(),n.next=21;break;case 16:n.prev=16,n.t0=n.catch(8),E=new o.APIError(n.t0),c(E),u(!1);case 21:case"end":return n.stop()}}),n,null,[[8,16]])})),function(){var e=this,t=arguments;return new Promise((function(r,a){var o=n.apply(e,t);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return r.apply(this,arguments)}}()}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(275),i=(r=n(8493))&&r.__esModule?r:{default:r},l=n(8423);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M13.5605 11L11.2646 8.706L12.6842 7.294L17.4023 12.009L12.6822 16.708L11.2656 15.292L13.5685 13H2C2.50429 18.045 6.7842 22 11.9744 22C17.5025 22 22 17.513 22 12C22 6.487 17.5025 2 11.9744 2C6.7842 2 2.50429 5.954 2 11H13.5605Z"}))}d.displayName="StageLeave"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchActiveOutboundPromotions=p,t.default=void 0;var r=d(n(14)),a=d(n(2)),o=n(5829),i=n(11021),l=d(n(39)),u=d(n(8759)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){f(o,r,a,i,l,"next",e)}function l(e){f(o,r,a,i,l,"throw",e)}i(void 0)}))}}function p(){return v.apply(this,arguments)}function v(){return(v=c(regeneratorRuntime.mark((function e(){var t,n,d,f,c,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u.default.isFetchingActiveOutboundPromotions){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,a.default.dispatch({type:s.ActionTypes.ACTIVE_OUTBOUND_PROMOTIONS_FETCH}),t=i.PromotionPreviewExperiment.getCurrentConfig({}).previewEnabled?s.Endpoints.OUTBOUND_PROMOTIONS_PREVIEW:s.Endpoints.OUTBOUND_PROMOTIONS,e.next=7,r.default.get({url:t,query:{locale:l.default.locale},oldFormErrors:!0});case 7:if(n=e.sent,d=n.body,f=u.default.consumedInboundPromotionId,u.default.hasFetchedConsumedInboundPromotionId){e.next=16;break}return e.next=13,(0,o.fetchUserEntitlementsForApplication)(s.PREMIUM_SUBSCRIPTION_APPLICATION,!1);case 13:p=e.sent,v=p.find((function(e){return null!=e.promotion_id&&!0===e.consumed})),f=null!==(c=null==v?void 0:v.promotion_id)&&void 0!==c?c:null;case 16:a.default.dispatch({type:s.ActionTypes.ACTIVE_OUTBOUND_PROMOTIONS_FETCH_SUCCESS,activeOutboundPromotions:d,consumedInboundPromotionId:f}),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(2),a.default.dispatch({type:s.ActionTypes.ACTIVE_OUTBOUND_PROMOTIONS_FETCH_FAIL});case 22:case"end":return e.stop()}}),e,null,[[2,19]])})))).apply(this,arguments)}var y={fetchActiveOutboundPromotions:p,dismissOutboundPromotionNotice:function(){a.default.dispatch({type:s.ActionTypes.OUTBOUND_PROMOTION_NOTICE_DISMISS})},markOutboundPromotionsSeen:function(){a.default.dispatch({type:s.ActionTypes.OUTBOUND_PROMOTIONS_SEEN})}};t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=c(n(8)),o=c(n(3)),i=c(n(2)),l=c(n(758)),u=c(n(11)),s=c(n(1269)),d=c(n(51)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(){return(v=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}).apply(this,arguments)}var y={};function m(){a.default.forEach(y,(function(e,t){e.destroy(),delete y[t]}))}function _(e,t,n){var r=y[e];return null!=r?t(r):n}function h(e){var t=e.lobbyId,n=y[t];if(null==n)return!1;n.destroy(),delete y[t]}var E=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var o=r.prototype;return o.forEach=function(e){a.default.each(y,e)},o.getState=function(e){return _(e,(function(e){return e.state}),f.RTCConnectionStates.DISCONNECTED)},o.isConnected=function(e){return this.getState(e)===f.RTCConnectionStates.RTC_CONNECTED},o.isDisconnected=function(e){return this.getState(e)===f.RTCConnectionStates.DISCONNECTED},o.getHostname=function(e){return _(e,(function(e){return e.hostname}),null)},o.getQuality=function(e){return _(e,(function(e){return e.quality}),f.RTCConnectionQuality.UNKNOWN)},o.getPings=function(e){return _(e,(function(e){return e.getPings()}),[])},o.getAveragePing=function(e){return _(e,(function(e){return e.getAveragePing()}),0)},o.getLastPing=function(e){return _(e,(function(e){return e.getLastPing()}),0)},o.getOutboundLossRate=function(e){return _(e,(function(e){return e.getOutboundLossRate()}),0)},o.getMediaSessionId=function(e){return _(e,(function(e){return e.getMediaSessionId()}),null)},o.getRTCConnectionId=function(e){return _(e,(function(e){return e.getRTCConnectionId()}),null)},o.getDuration=function(e){return _(e,(function(e){return e.getDuration()}),0)},r}(o.default.Store))(i.default,d.default.isSupported()?{CONNECTION_OPEN:function(e){r=e.sessionId,m()},CONNECTION_CLOSED:function(e){return r=null,void m()},RTC_CONNECTION_STATE:function(e){return!0},RTC_CONNECTION_PING:function(e){return!0},RTC_CONNECTION_LOSS_RATE:function(e){return!0},LOBBY_VOICE_STATE_UPDATE:function(e){if(u.default.getId()!==e.userId)return!1;if(e.sessionId!==r)return!1;var t=y[e.lobbyId];null!=t&&null==e.channelId?(t.destroy(),delete y[e.lobbyId]):null!=t?t.channelId=e.channelId:null!=e.channelId&&(t=function(e,t){if(null==r)throw new Error("Creating RTCConnection without session.");var n=s.default.getLobby(e);if(null==n)throw new Error("Creating RTCConnection without lobby.");var a=n.application_id,o=new l.default(u.default.getId(),r,e,t,a);return o.on("state",(function(t,n,r){i.default.dirtyDispatch(v({type:f.ActionTypes.RTC_CONNECTION_STATE,state:t,hostname:n},r,{lobbyId:e}))})),o.on("ping",(function(t,n){i.default.dispatch({type:f.ActionTypes.RTC_CONNECTION_PING,pings:t,quality:n,lobbyId:e})})),o.on("outboundlossrate",(function(t){i.default.dispatch({type:f.ActionTypes.RTC_CONNECTION_LOSS_RATE,lossRate:t,lobbyId:e})})),o}(e.lobbyId,e.channelId),y[e.lobbyId]=t)},LOBBY_VOICE_SERVER_UPDATE:function(e){var t=y[e.lobbyId];if(null==t)return!1;t.connect(e.endpoint,e.token)},LOBBY_DELETE:h,LOBBY_DISCONNECT:h}:{});t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(64)),a=u(n(16)),o=u(n(43)),i=n(401),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=[],f=function(e,t,n){var r=a.default.isWindows()?0:1;e===l.KeyboardDeviceTypes.MOUSE_BUTTON&&n===r||d.forEach((function(r){return r._handleEvent(e,t,n)}))},c=function(e){var t,n;function r(){var t;return(t=e.call(this)||this).combo=[],d.push(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)),1===d.length&&o.default.setOnInputEventCallback(f),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.destroy=function(){var e=this;this.removeAllListeners(),0===(d=d.filter((function(t){return t!==e}))).length&&o.default.setOnInputEventCallback(null)},a.toString=function(){return(0,i.toString)(this.combo)},a._handleEvent=function(e,t,n){0===t?this.combo=this.combo.filter((function(t){var r=t[0],a=t[1];return!(r===e&&a===n)})):(this.combo.push([e,n,(0,i.getEnv)()]),this.emit("change",this))},r}(r.default);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RecordModes=void 0;var r,a,o,i=h(n(0)),l=m(n(9)),u=m(n(767)),s=m(n(8)),d=m(n(88)),f=n(401),c=h(n(29)),p=m(n(55)),v=m(n(6)),y=m(n(7658));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.RecordModes=o,function(e){e.DEFAULT="DEFAULT",e.RECORDING="RECORDING"}(o||(t.RecordModes=o={}));var S=((r={})[o.DEFAULT]=y.default.default,r[o.RECORDING]=y.default.recording,r),O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._inputId=s.default.uniqueId("key-recorder-"),t._unregisterNativeRecorder=null,t._mousedownMode=null,t._inputRef=i.createRef(),t._containerRef=i.createRef(),t.setInputRef=function(e){t._input=e,t._inputRef.current=e},t.handleClick=function(e){e.stopPropagation(),e.preventDefault();var n=t.props,r=n.onClick;n.disableOnClickWhileRecording&&t._mousedownMode===o.RECORDING||r()},t.handleMouseDown=function(){t._mousedownMode=t.props.mode},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props.onChange;if(null!=this.props.registerNativeRecorder&&null!=e)this._unregisterNativeRecorder=this.props.registerNativeRecorder(this._inputId,e);else if(null!=e&&null!=this._input){new u.default(this._input).handleKey=e}},a.componentWillUnmount=function(){null!=this._unregisterNativeRecorder&&this._unregisterNativeRecorder()},a.componentDidUpdate=function(e){var t=this.props.mode;if(e.mode!==t){var n=this._input;if(null!=n){var r=document.activeElement;t===o.DEFAULT&&n===r&&n.blur(),t===o.RECORDING&&n!==r&&n.focus()}}},a.render=function(){var e,t,n=this,r=this.props,a=r.mode,u=r.value,s=r.disabled,m=(0,f.toString)(u,!0);t=a===o.RECORDING?v.default.Messages.SHORTCUT_RECORDER_BUTTON_RECORDING:0===u.length?v.default.Messages.SHORTCUT_RECORDER_BUTTON:v.default.Messages.SHORTCUT_RECORDER_BUTTON_EDIT;var _=a===o.DEFAULT&&u.length>0;return E(d.default,{focusTarget:this._inputRef,ringTarget:this._containerRef},void 0,i.createElement("div",{onClick:this.handleClick,onMouseDown:this.handleMouseDown,ref:this._containerRef,className:(0,l.default)(y.default.container,S[a],(e={},e[y.default.hasValue]=_,e[y.default.disabled]=s,e))},E(p.default,{className:y.default.layout},void 0,E(p.default.Child,{className:y.default.input},void 0,i.createElement("input",{id:this._inputId,placeholder:v.default.Messages.SHORTCUT_RECORDER_NO_BIND,type:"text",ref:this.setInputRef,readOnly:!0,value:m,disabled:this.props.mode!==o.RECORDING||s})),E(p.default,{shrink:1,grow:0,style:{margin:0}},void 0,E(c.default,{className:y.default.button,disabled:s,onClick:function(e){e.stopPropagation(),e.preventDefault(),n.handleClick(e)},size:c.default.Sizes.MIN,color:c.ButtonColors.GREY},void 0,E("span",{className:y.default.text},void 0,t),E("span",{className:y.default.editIcon}))))))},r}(i.PureComponent);O.displayName="KeyRecorder";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{width:n,height:a,className:e.className,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},void 0,o("path",{transform:"translate(2.000000, 2.000000)",fillRule:"nonzero",fill:l,className:e.foreground,d:"M4,0 L4,3 L0,3 L0,0 L4,0 Z M12,4 L12,7 L8,7 L8,4 L12,4 Z M8,9 L12,9 L12,12 L8,12 L8,9.33333333 L8,9 Z M7,7 L3,7 L3,10 L7,10 L7,12 L3,12 L1,12 L1,4 L3,4 L3,5 L7,5 L7,7 Z"}))}i.displayName="ChannelCategory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=O(n(0)),o=g(n(9)),i=g(n(480)),l=O(n(680)),u=g(n(9735)),s=g(n(88)),d=g(n(61)),f=g(n(278)),c=n(85),p=g(n(1266)),v=g(n(1337)),y=g(n(729)),m=n(1375),_=n(1210),h=n(1),E=g(n(5713));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(){return(I=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}).apply(this,arguments)}function T(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e){return e.label}function M(e){var t=e.options,n=e.value,r=e.onChange,d=e.placeholder,y=e.className,_=e.isDisabled,g=void 0!==_&&_,S=e.maxVisibleItems,O=void 0===S?3:S,I=e.look,T=void 0===I?m.Looks.FILLED:I,M=e.autoFocus,A=void 0!==M&&M,P=e.renderOptionLabel,R=void 0===P?b:P,L=(0,u.default)(),D=L[0],w=L[1],j=a.useRef(null),k=a.useState(null),U=k[0],G=k[1],F=a.useState(!1),B=F[0],H=F[1],x=a.useState(null),V=x[0],W=x[1],Y=a.useState(!1),z=Y[0],K=Y[1],$=a.useRef(null),Z=(0,c.useUID)(),q=(0,c.useUID)(),X=a.useCallback((function(e,t){var n=document.querySelector(e),r=$.current;G(t),null!=r&&null!=n&&r.scrollIntoViewNode({node:n})}),[]),J=a.useCallback((function(){return new Promise((function(e){var t=$.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),Q=a.useCallback((function(){return new Promise((function(e){var t=$.current;if(null==t)return e();t.scrollToBottom({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),ee=(0,l.default)({id:q,scrollToStart:J,scrollToEnd:Q,isEnabled:!0,wrap:!0,useVirtualFocus:!0,setFocus:X}),te=t.find((function(e){return e.value===n}));a.useEffect((function(){B&&null!=te&&requestAnimationFrame((function(){var e=$.current,n=t.indexOf(te);null==e||e.scrollToIndex({section:0,row:n})}))}),[B]),a.useLayoutEffect((function(){W((function(e){var t;return null!==(t=null==te?void 0:te.label)&&void 0!==t?t:e}))}),[te]);var ne=a.useCallback((function(e){r(e),G(null),H(!1),K(!1)}),[r]);a.useLayoutEffect((function(){var e;A&&(null===(e=j.current)||void 0===e||e.focus())}),[A]);var re=a.useCallback((function(e){switch(e.keyCode){case h.KeyboardKeys.ESCAPE:H(!1);break;case h.KeyboardKeys.ARROW_DOWN:H(!0)}}),[]);return C(l.ListNavigatorProvider,{navigator:ee},void 0,C(f.default,{spacing:0,shouldShow:B,renderPopout:function(e){var r=e.closePopout;return C(N,{listRef:$,listId:Z,maxVisibleItems:O,width:w,value:n,closePopout:r,onSelect:ne,options:z&&null!=V?t.filter((function(e){return(0,i.default)(V.toLowerCase(),e.label.toLowerCase())})):t,activeDescendant:U,renderOptionLabel:R})},position:f.default.Positions.BOTTOM},void 0,(function(e,t){var n,r,i=e["aria-expanded"],u=e["aria-controls"],f=t?v.default:p.default,c=ee.containerProps,_=c.ref,h=c.onKeyDown;return C(s.default,{within:!0,offset:4},void 0,a.createElement("div",{role:"combobox","aria-expanded":i,"aria-haspopup":"listbox","aria-owns":Z,onClick:function(){return H(!0)},ref:D,className:(0,o.default)(E.default.select,E.default.searchable,y,(n={},n[E.default.open]=t,n[E.default.lookFilled]=T===m.Looks.FILLED,n[E.default.disabled]=g,n))},a.createElement("input",{"aria-autocomplete":"list","aria-controls":u,"aria-multiline":!1,"aria-activedescendant":null!=U?(0,l.createListItemId)(q,U):void 0,value:null!=V?V:"",onChange:function(e){W(e.target.value),H(!0),K(!0)},onFocus:function(){return H(!0)},onBlur:function(e){var t,n;(null===(t=$.current)||void 0===t||null===(n=t.getScrollerNode())||void 0===n?void 0:n.contains(e.relatedTarget))||H(!1)},className:(0,o.default)(E.default.searchInput,(r={},r[E.default.editing]=z,r)),onKeyDown:function(e){h(e),re(e)},placeholder:null==te?d:"",ref:function(e){_.current=e,j.current=e}}),C(f,{})))})))}function N(e){var t=e.onSelect,n=e.closePopout,r=e.value,o=e.options,i=e.width,u=e.maxVisibleItems,s=e.activeDescendant,d=e.listRef,f=e.listId,c=e.renderOptionLabel,p=a.useRef(null),v=a.useCallback((function(e){t(e),n()}),[n,t]),y=o.length<=u?_.ListNone:_.ListAuto;return C(l.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,n=(e.onKeyDown,T(e,["ref","onKeyDown"]));return a.createElement(y,I({id:f,className:E.default.popout,style:{width:i,maxHeight:44*u},ref:function(e){var n;d.current=e;var r=null!==(n=null==e?void 0:e.getScrollerNode())&&void 0!==n?n:null;p.current=r,t.current=r}},n,{role:"listbox",rowHeight:44,sections:[o.length],sectionHeight:0,renderRow:function(e){var t,n=e.row,a=o[n],i=c(a);return C(A,{"aria-posinset":n,"aria-setsize":o.length,isSelected:a.value===r,isFocused:s===String(a.value),value:a.value,label:i,onSelect:v},null!==(t=a.key)&&void 0!==t?t:n)},renderSection:function(){return null}}))}))}function A(e){var t,n=e.value,r=e.label,i=e.onSelect,u=e.isSelected,s=e.isFocused,f=T(e,["value","label","onSelect","isSelected","isFocused"]),c=(0,l.useListItem)(String(n));return a.createElement(d.default,I({style:{height:44},focusProps:{enabled:!1},className:(0,o.default)(E.default.option,(t={},t[E.default.focused]=s,t)),onClick:function(){return i(n)}},c,f,{"aria-selected":u,id:c["data-list-item-id"],role:"option"}),r,u&&C(y.default,{className:E.default.selectedIcon,width:20,height:20}))}M.displayName="SearchableSelect",N.displayName="SelectPopout",A.displayName="Option"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=r.useState(void 0),t=e[0],n=e[1],a=r.useRef(null);return r.useLayoutEffect((function(){var e=a.current;if(null!=e){var t=new ResizeObserver((function(e){var t,r,o=e[0],i=null==o||null===(t=o.borderBoxSize)||void 0===t||null===(r=t[0])||void 0===r?void 0:r.inlineSize;if(null==i){var l=a.current;if(null!=l){var u=window.getComputedStyle(l);i=parseFloat(u.width||"0")}}n(i)}));return t.observe(e),function(){return t.disconnect()}}}),[]),[a,t]};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(3)),i=n(752),l=d(n(9737)),u=n(374),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleChange=function(e){t.props.onChange(e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.applicationId,n=e.branches,r=e.onHasBranchesChange;(0,i.fetchBranchesForApplication)(t),r&&r(n.length>0)},a.componentDidUpdate=function(e){var t=this.props,n=t.onHasBranchesChange,r=t.branches.length>0;null!=n&&r!==e.branches.length>0&&n(r)},a.render=function(){var e=this.props,t=e.branches,n=e.selectedBranchId,r=e.applicationId,a=e.includeMaster,o=e.hide,i=e.className;if(0===t.length||o)return null;var l=a?t:t.filter((function(e){return e.id!==r}));return c(u.SingleSelect,{options:l.map((function(e){return{label:e.getName(r),value:e.id}})),placeholder:s.default.Messages.CREATE_STORE_CHANNEL_SELECT_BRANCH,value:n,onChange:this.handleChange,className:i})},r}(a.Component);v.displayName="ApplicationBranchSelector",v.defaultProps={includeMaster:!1};var y=o.default.connectStores([l.default],(function(e){var t=e.applicationId;return{branches:l.default.getBranches(t)}}))(v);t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={};var u=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getBranches=function(e){return l[e]||[]},r}(r.default.Store))(a.default,{OWNED_APPLICATION_BRANCHES_FETCH_SUCCESS:function(e){var t=e.applicationId,n=e.branches;l[t]=n},LOGOUT:function(e){l={}}});t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(3)),i=n(5672),l=d(n(373)),u=n(374),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleChange=function(e){t.props.onChange(e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.applicationId,n=e.skus,r=e.selectedSkuId,a=e.onChange;null==n?(0,i.fetchSKUsForApplication)(t,!1):1===n.length&&null==r&&a(n[0].id)},a.componentDidUpdate=function(){var e=this.props,t=e.skus,n=e.selectedSkuId,r=e.onChange;null!=t&&1===t.length&&null==n&&r(t[0].id)},a.render=function(){var e=this.props,t=e.skus,n=e.selectedSkuId,r=e.className,a=null!=t&&0===t.length;return c(u.SingleSelect,{options:null!=t?t.map((function(e){return{label:e.name,value:e.id}})):[],placeholder:a?s.default.Messages.CREATE_STORE_CHANNEL_NO_SKUS:s.default.Messages.CREATE_STORE_CHANNEL_SELECT_SKU,value:n,onChange:this.handleChange,className:r,isDisabled:a})},r}(a.Component);v.displayName="ApplicationSKUSelector";var y=o.default.connectStores([l.default],(function(e){var t=e.applicationId;return{skus:l.default.getForApplication(t)}}))(v);t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(8297)),o=i(n(7665));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var u=r.forwardRef((function(e,t){var n=e.query,i=e.onQueryChange,l=e.onRemoveTag,u=e.onSelect,s=e.onSelectionChange,d=e.selectedSection,f=e.selectedRow,c=e.tags,p=e.sections,v=e.placeholder,y=void 0===v?"":v,m=e.focusAfterReady,_=e.isReady;return r.createElement(a.default,{autoFocus:!0,className:o.default.searchBar,maxHeight:100,onQueryChange:i,onRemoveTag:l,selectedSection:d,selectedRow:f,onSelect:u,onSelectionChange:s,placeholder:0===c.length?y:"",query:n,ref:t,size:a.default.Sizes.MEDIUM,tags:c,sections:p,focusAfterReady:m,isReady:_})}));t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,className:f,d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}))}d.displayName="Key"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(8254)),i=n(9170),l=n(8253),u=c(n(86)),s=c(n(40)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=(0,a.useStateFromStoresObject)([s.default,u.default],(function(){return{canManageGuild:s.default.can(d.Permissions.MANAGE_GUILD,e),canManageRoles:s.default.can(d.Permissions.MANAGE_ROLES,e),canBanMembers:s.default.can(d.Permissions.BAN_MEMBERS,e),canManageNicknames:s.default.can(d.Permissions.MANAGE_NICKNAMES,e),canManageEmojis:s.default.can(d.Permissions.MANAGE_EMOJIS,e),canManageWebhooks:s.default.can(d.Permissions.MANAGE_WEBHOOKS,e),canViewAuditLog:s.default.can(d.Permissions.VIEW_AUDIT_LOG,e),channels:u.default.getChannels(e.id).SELECTABLE}}),[e]),n=t.canManageGuild,r=t.canManageRoles,c=t.canBanMembers,p=t.canManageNicknames,y=t.canManageEmojis,m=t.canManageWebhooks,_=t.canViewAuditLog,h=t.channels;function E(t){o.default.open(e.id,t)}return __OVERLAY__||!(n||r||c||p||y||m||_)?null:v(l.MenuItem,{id:"guild-settings",label:f.default.Messages.SERVER_SETTINGS,action:function(){return E()}},void 0,(0,i.getGuildSettingsSections)(e,h).map((function(e){var t=e.section,n=e.label;if(null==n)return null;switch(t){case d.GuildSettingsSections.DELETE:return null;case d.GuildSettingsSections.COMMUNITY:return v(l.MenuItem,{id:t,action:function(){return E(t)},label:f.default.Messages.GUILD_SETTINGS_COMMUNITY},t);default:return v(l.MenuItem,{id:t,action:function(){return E(t)},label:n},t)}})))}y.displayName="useGuildSettingsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(29)),i=y(n(467)),l=y(n(153)),u=n(85),s=y(n(476)),d=n(35),f=y(n(47)),c=y(n(24)),p=y(n(6)),v=y(n(7670));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.onConfirm,n=e.onClose,r=e.validationText,y=e.errorText,m=e.header,h=e.className,E=e.cancelText,g=e.confirmText,S=e.instructionText,O=e.transitionState,I=e.children,T=a.useState(""),C=T[0],b=T[1],M=a.useState(null),N=M[0],A=M[1],P=(0,u.useUID)(),R=a.Children.count(I)?_(i.default,{type:i.default.Types.WARNING,className:v.default.card},void 0,_(c.default,{className:v.default.warning,size:c.default.Sizes.SIZE_16},void 0,I)):null;return _(d.ModalRoot,{transitionState:O,"aria-labelledby":P,className:h},void 0,_("form",{onSubmit:function(e){e.preventDefault(),C.toLowerCase()===r.toLowerCase()?(null==t||t(),n()):A(y)}},void 0,_(d.ModalHeader,{separator:!1},void 0,_(f.default,{id:P,tag:f.default.Tags.H2,size:f.default.Sizes.SIZE_20},void 0,m)),_(d.ModalContent,{},void 0,R,_(s.default,{title:S,className:v.default.spacing},void 0,_(l.default,{id:"text-entry-confirm",type:"text",value:C,autoComplete:"off",onChange:b,autoFocus:!0}),N?_(c.default,{color:c.default.Colors.STATUS_RED,size:c.default.Sizes.SIZE_12,className:v.default.error},void 0,N):null)),_(d.ModalFooter,{},void 0,_(o.default,{type:"submit",color:o.default.Colors.RED},void 0,g||p.default.Messages.CONFIRM),_(o.default,{onClick:n,look:o.default.Looks.LINK,color:o.default.Colors.PRIMARY},void 0,E||p.default.Messages.CANCEL))))}h.displayName="TextEntryConfirm"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2020-12_guild_delete_feedback",label:"Guild Delete Feedback experiment",defaultConfig:{showFeedback:!1},treatments:[{id:1,label:"Show guild delete feedback",config:{showFeedback:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=_(n(0)),o=y(n(8552)),i=y(n(9745)),l=n(395),u=n(1220),s=_(n(41)),d=y(n(13)),f=y(n(9746)),c=n(9747),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}var g=[c.GuildDeleteReasons.OTHER];function S(e){var t=e.transitionState,n=e.onClose,r=e.guildId;return a.useEffect((function(){d.default.track(p.AnalyticEvents.OPEN_MODAL,{type:"Guild Delete Report"})}),[]),h(i.default,{header:v.default.Messages.GUILD_DELETE_FEEDBACK_HEADER,body:v.default.Messages.GUILD_DELETE_FEEDBACK_BODY,problems:c.GUILD_DELETE_REASONS,feedbackProblems:g,onSubmit:function(e){var t=e.problem,n=e.dontShowAgain,i=e.feedback;n&&(0,u.hideHotspot)(l.HotspotLocations.GUILD_DELETE_FEEDBACK);var d=null==t;(0,f.default)(r,t,i,d),d||s.openModal((function(e){return a.createElement(o.default,E({body:v.default.Messages.GUILD_DELETE_FEEDBACK_REPORT},e))}))},onClose:n,transitionState:t,otherKey:c.GuildDeleteReasons.OTHER})}S.displayName="GuildDeleteFeedback"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(9)),i=T(n(8)),l=T(n(1296)),u=T(n(8551)),s=T(n(1259)),d=T(n(29)),f=T(n(9096)),c=T(n(55)),p=T(n(8272)),v=n(85),y=n(131),m=T(n(1336)),_=n(35),h=T(n(24)),E=T(n(93)),g=n(9097),S=n(8795),O=T(n(6)),I=T(n(7396));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(){return b(h.default,{className:I.default.helpdeskLink,size:h.default.Sizes.SIZE_12,color:h.default.Colors.MUTED},void 0,O.default.Messages.FEEDBACK_NEED_MORE_HELP.format({helpdeskURL:E.default.getSubmitRequestURL()}))}M.displayName="HelpdeskLink";var N=b(u.default,{}),A=b(M,{});function P(e){var t=e.header,n=e.body,r=e.problems,u=e.transitionState,E=e.feedbackProblems,T=void 0===E?[]:E,C=e.otherKey,M=e.onSubmit,P=e.onClose,R=(0,s.default)(r),L=a.useState(!1),D=L[0],w=L[1],j=a.useState(null),k=j[0],U=j[1],G=a.useState(i.default.shuffle(r)),F=G[0],B=G[1],H=a.useState(""),x=H[0],V=H[1],W=(0,v.useUID)(),Y=(0,m.default)(D),z=(0,m.default)(k),K=(0,m.default)(M),$=(0,m.default)(x),Z=null!=k&&T.includes(k);return a.useEffect((function(){i.default.isEqual(R,r)||B((0,g.shuffleProblems)(r,C))}),[r,R,C]),a.useEffect((function(){return function(){K.current({problem:z.current,dontShowAgain:Y.current,feedback:$.current})}}),[]),b(_.ModalRoot,{transitionState:u,className:I.default.modalRoot,"aria-labelledby":W},void 0,N,b(_.ModalHeader,{separator:!1,className:(0,o.default)(I.default.headerContainer,I.default.simpleHeaderContainer)},void 0,b(h.default,{id:W,className:I.default.header,color:h.default.Colors.CUSTOM,size:h.default.Sizes.SIZE_24},void 0,t),b(h.default,{size:h.default.Sizes.SIZE_16,color:h.default.Colors.CUSTOM,className:I.default.ratingBody},void 0,n)),b(_.ModalContent,{className:I.default.content},void 0,Z?null:b(y.FormItem,{className:I.default.problemInfo},void 0,b(f.default,{options:F,onClick:function(e){var t=e.value;U(t),T.includes(t)||P()}})),Z?b(y.FormItem,{title:O.default.Messages.FEEDBACK_DESCRIBE_ISSUE,className:I.default.problemInfo},void 0,b(p.default,{value:x,maxLength:S.FEEDBACK_FREEFORM_LENGTH,onChange:V}),A):null),b(_.ModalFooter,{className:I.default.footer,direction:c.default.Direction.HORIZONTAL},void 0,Z?a.createElement(a.Fragment,null,b(d.default,{size:d.default.Sizes.SMALL,look:d.default.Looks.LINK,color:d.default.Colors.PRIMARY,onClick:function(){U(null),V("")}},void 0,O.default.Messages.BACK),b(d.default,{size:d.default.Sizes.SMALL,onClick:P},void 0,O.default.Messages.SUBMIT)):b(l.default,{checked:D,onChange:function(){return w(!D)}},void 0,b(h.default,{},void 0,O.default.Messages.DONT_SHOW_AGAIN))))}P.displayName="FeedbackModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){a.default.track(o.AnalyticEvents.USER_REPORT_SUBMITTED,{report_name:"Guild Deletion",guild_id:e,reason:t,feedback:n,skipped:r})};var r,a=(r=n(13))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GUILD_DELETE_REASONS=t.GuildDeleteReasons=void 0;var r,a,o=(r=n(6))&&r.__esModule?r:{default:r};t.GuildDeleteReasons=a,function(e){e.TOO_HARD="Too hard",e.TEST="Testing purposes",e.ACCIDENT="Created on accident",e.TEMPLATE="Curious about server/template",e.LONELY="Empty server",e.INACTIVE="Inactive server",e.OTHER="Other"}(a||(t.GuildDeleteReasons=a={}));var i=[{value:a.TOO_HARD,label:o.default.Messages.GUILD_DELETE_FEEDBACK_TOO_HARD},{value:a.TEST,label:o.default.Messages.GUILD_DELETE_FEEDBACK_TEST},{value:a.ACCIDENT,label:o.default.Messages.GUILD_DELETE_FEEDBACK_ACCIDENT},{value:a.TEMPLATE,label:o.default.Messages.GUILD_DELETE_FEEDBACK_TEMPLATE},{value:a.LONELY,label:o.default.Messages.GUILD_DELETE_FEEDBACK_LONELY},{value:a.INACTIVE,label:o.default.Messages.GUILD_DELETE_FEEDBACK_INACTIVE},{value:a.OTHER,label:o.default.Messages.GUILD_DELETE_FEEDBACK_OTHER}];t.GUILD_DELETE_REASONS=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=L(n(0)),l=P(n(9)),u=n(3),s=P(n(199)),d=P(n(8255)),f=P(n(12)),c=P(n(29)),p=P(n(151)),v=L(n(8293)),y=P(n(681)),m=P(n(24)),_=n(48),h=P(n(8294)),E=P(n(8673)),g=P(n(8410)),S=P(n(8411)),O=n(8262),I=P(n(9749)),T=P(n(9752)),C=P(n(9763)),b=P(n(9766)),M=n(1),N=P(n(6)),A=P(n(7679));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e[e.LOADING=0]="LOADING",e[e.INTRO=1]="INTRO",e[e.SETTINGS=2]="SETTINGS"}(a||(a={})),function(e){e[e.EDIT=0]="EDIT",e[e.APPLICATIONS=1]="APPLICATIONS",e[e.REVIEW_APPLICATION=2]="REVIEW_APPLICATION"}(o||(o={}));var w=D(C.default,{}),j=function(e){var t=e.setView;return D(y.default,{title:N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION,tag:y.default.Tags.H2},void 0,D("div",{className:A.default.introDescription},void 0,D(m.default,{size:m.default.Sizes.SIZE_14,className:A.default.description},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION),D(m.default,{size:m.default.Sizes.SIZE_14,className:A.default.description},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION_COMING_SOON),D(c.default,{onClick:function(){t(a.SETTINGS)}},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_INTRO_BUTTON)),w)};j.displayName="GuildSettingsMemberVerificationIntro";var k=function(e){var t,n=e.guildId,r=e.setPreventNavigation,a=(0,u.useStateFromStores)([E.default],(function(){return E.default.getRequests(n)}),[n]),c=null!=a?a[O.GuildJoinRequestApplicationStatuses.PENDING].total:0,p=(0,u.useStateFromStores)([f.default],(function(){return f.default.getCurrentUser().isStaff()})),g=(0,u.useStateFromStores)([d.default],(function(){return d.default.getProps()})).guild,C=i.useState(c>0?o.APPLICATIONS:o.EDIT),P=C[0],R=C[1],L=i.useState(null),w=L[0],j=L[1],k=i.useState(1),U=k[0],G=k[1],F=i.useState(O.GuildJoinRequestApplicationStatuses.PENDING),B=F[0],H=F[1],x=(0,u.useStateFromStores)([S.default],(function(){return null!=g?S.default.get(g.id):null}));i.useEffect((function(){null!=n&&h.default.fetchGuildJoinRequests({guildId:n})}),[n]),i.useEffect((function(){null!=w&&P!==o.REVIEW_APPLICATION?R(o.REVIEW_APPLICATION):null==w&&P===o.REVIEW_APPLICATION&&R(o.APPLICATIONS)}),[w,P]),i.useEffect((function(){s.default.fetchGuildBans(n)}),[n]);var V=i.useCallback((function(e){R(e)}),[]),W=null==g?void 0:g.hasFeature(M.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED),Y=null==x?void 0:x.formFields,z=i.useMemo((function(){return!(!W||null==Y||0===Y.length)&&(1!==Y.length||Y[0].field_type!==O.VerificationFormFieldTypes.TERMS)}),[W,Y]),K=null;switch(P){case o.EDIT:K=D(T.default,{setPreventNavigation:r,pendingRequestsCount:c});break;case o.APPLICATIONS:K=D(I.default,{guildId:n,setSelectedJoinRequest:function(e,t,r){if(void 0===e&&(e=null),void 0===t&&(t=O.GuildJoinRequestApplicationStatuses.PENDING),null!=n&&null!=e&&null!=a){var o=a[t].requests.findIndex((function(t){return t.userId===e}));j(o),G(r)}},setApplicationStatus:H,applicationStatus:B,totalCount:a[B].total});break;case o.REVIEW_APPLICATION:break;default:return(0,_.assertNever)(P)}return P===o.REVIEW_APPLICATION&&null!=w?D(b.default,{guildId:n,selectedIndex:w,applicationStatus:B,setSelectedIndex:j,page:U}):D(y.default,{title:N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION,tag:y.default.Tags.H2},void 0,D(m.default,{className:A.default.description,color:m.default.Colors.HEADER_SECONDARY},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION),D(m.default,{className:(0,l.default)(A.default.description,(t={},t[A.default.descriptionSpaced]=!p,t)),color:m.default.Colors.HEADER_SECONDARY},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION_COMING_SOON),D(v.default,{className:A.default.tabs,selectedItem:P,type:v.default.Types.TOP,look:v.default.Looks.BRAND,onItemSelect:V},void 0,D(v.Item,{className:(0,l.default)(A.default.tab,A.default.spacer),id:o.EDIT},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_SCREEN_TITLE),z?D(v.Item,{className:(0,l.default)(A.default.tab,A.default.spacer),id:o.APPLICATIONS,"aria-label":N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_APPLICATIONS_TITLE+" "+(c>0&&c.toLocaleString())},void 0,N.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_APPLICATIONS_TITLE,c>0&&D(m.default,{size:m.default.Sizes.SIZE_12,className:A.default.badge},void 0,c.toLocaleString())):null),K)};k.displayName="GuildSettingsMemberVerificationSettings";var U=function(e){var t=e.setPreventNavigation,n=(0,u.useStateFromStores)([d.default],(function(){return d.default.getProps()})).guild,r=(0,u.useStateFromStores)([f.default],(function(){return f.default.getCurrentUser().isStaff()})),o=i.useState(a.LOADING),l=o[0],s=o[1];switch(i.useEffect((function(){null!=n&&g.default.fetchVerificationForm(n.id).then((function(e){s(null==e?a.INTRO:a.SETTINGS)}))}),[null==n?void 0:n.id]),l){case a.LOADING:return D(p.default,{type:p.default.Type.SPINNING_CIRCLE});case a.INTRO:return D(j,{setView:s});case a.SETTINGS:return r&&null!=n?D(k,{guildId:null==n?void 0:n.id,setPreventNavigation:t}):D(T.default,{setPreventNavigation:t});default:return(0,_.assertNever)(l)}};t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=S(n(1159)),l=S(n(151)),u=S(n(372)),s=S(n(8883)),d=S(n(8884)),f=S(n(47)),c=S(n(8972)),p=S(n(24)),v=S(n(272)),y=S(n(8294)),m=S(n(8673)),_=n(8262),h=S(n(9751)),E=S(n(6)),g=S(n(7382));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var T=[{value:_.GuildJoinRequestApplicationStatuses.PENDING,label:E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_PENDING},{value:_.GuildJoinRequestApplicationStatuses.REJECTED,label:E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_REJECTED},{value:_.GuildJoinRequestApplicationStatuses.APPROVED,label:E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_APPROVED}],C=function(e){var t=e.status,n=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_PENDING_APPLICATIONS_TITLE,r=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_PENDING_APPLICATIONS_BODY;switch(t){case _.GuildJoinRequestApplicationStatuses.REJECTED:n=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_REJECTED_APPLICATIONS_TITLE,r=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_REJECTED_APPLICATIONS_BODY;break;case _.GuildJoinRequestApplicationStatuses.APPROVED:n=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_APPROVED_APPLICATIONS_TITLE,r=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_APPROVED_APPLICATIONS_BODY;break;default:n=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_PENDING_APPLICATIONS_TITLE,r=E.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EMPTY_PENDING_APPLICATIONS_BODY}return I("div",{className:g.default.emptyContainer},void 0,I("div",{className:g.default.emptyIcon},void 0,I(d.default,{className:g.default.star}),I(u.default,{className:g.default.checkmark}),I(s.default,{className:g.default.plus})),I(f.default,{size:f.default.Sizes.SIZE_24},void 0,n),I(p.default,{color:p.default.Colors.HEADER_SECONDARY,className:g.default.emptyBody},void 0,r))};C.displayName="ApplicationsEmptyState";var b=function(e){var t,n=e.guildId,r=e.setSelectedJoinRequest,u=e.setApplicationStatus,s=e.applicationStatus,d=e.totalCount,f=a.useState(1),p=f[0],E=f[1],S=(0,o.useStateFromStores)([m.default],(function(){return m.default.getRequests(n)||{}}),[n])[s],O=(0,o.useStateFromStores)([m.default],(function(){return m.default.isFetching()}),[]);a.useEffect((function(){null!=n&&y.default.fetchGuildJoinRequests({guildId:n,status:s}),E(1)}),[s,n]);return a.createElement(a.Fragment,null,I(i.default,{value:s,clearable:!1,options:T,onChange:function(e){var t=e.value;u(t)},className:g.default.search}),!O&&null!==(t=null==S?void 0:S.requests.length)&&void 0!==t&&t?I(v.default,{},void 0,S.requests.map((function(e){return I(h.default,{guildJoinRequest:e,setSelectedJoinRequest:r,page:p},"guild-join-request-"+e.userId)})),I(c.default,{pageSize:_.MAX_RESULTS_PER_PAGE,totalCount:d,currentPage:p,maxVisiblePages:5,onPageChange:function(e){var t,r=e>p,a=r?S.requests[S.requests.length-1]:S.requests[0];y.default.fetchGuildJoinRequests(((t={guildId:n,status:s})[r?"before":"after"]=new Date(a.createdAt).getTime(),t)),E(e)}})):I(C,{status:s}),O&&I(l.default,{className:g.default.fetchingSpinner}))};t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PaginationTypes=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(133)),o=i(n(8));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=(0,a.default)({PAGE:null,GAP:null,BACK:null,NEXT:null});t.PaginationTypes=s;var d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).changePageTo=function(e){var n=t.props,r=n.selectedPage,a=n.onPageChange;r!==e&&null!=a&&a(e)},t.handleForward=function(){t.changePageTo(Math.min(t.props.selectedPage+1,t.props.totalPageCount))},t.handleBackward=function(){t.changePageTo(Math.max(t.props.selectedPage-1,1))},t.handleJump=function(e){t.changePageTo(e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.getNeighborBounds=function(){var e=this.props,t=e.totalPageCount,n=e.maxVisiblePages,r=e.selectedPage,a=Math.ceil(n/2),o=Math.floor(n/2),i=r<=a?[1,n]:r>t-o?[t-n+1,t]:[r-a+1,r+o],l=i[0],u=i[1];return[Math.max(l,1),Math.min(u,t)]},a.getPageList=function(){var e=this,t=this.props,n=t.totalPageCount,r=t.selectedPage,a=this.getNeighborBounds(),i=a[0],l=a[1],u={type:s.BACK,key:"back",disabled:1===r,selected:!1,navigateToPage:this.handleBackward},d={type:s.NEXT,key:"next",disabled:r===n,selected:!1,navigateToPage:this.handleForward},f=[],c=[];i>1&&(f=[{type:s.PAGE,key:"page-1",targetPage:1,navigateToPage:function(){return e.handleJump(1)}},{type:s.GAP,key:"left-gap"}],i+=2),l<n&&(c=[{type:s.GAP,key:"right-gap"},{type:s.PAGE,key:"page-"+n,targetPage:n,navigateToPage:function(){return e.handleJump(n)}}],l-=2);var p=o.default.range(i,l+1).map((function(t){return{type:s.PAGE,key:"page-"+t,targetPage:t,selected:t===r,disabled:!1,navigateToPage:function(){return e.handleJump(t)}}}));return[u].concat(f,p,c,[d])},a.render=function(){var e=this.props,t=e.totalPageCount;return(0,e.children)({pages:this.getPageList(),hasMultiplePages:t>1})},r}(r.PureComponent);d.displayName="PaginationController",d.defaultProps={maxVisiblePages:9};var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(9)),o=y(n(89)),i=y(n(61)),l=y(n(5950)),u=y(n(279)),s=y(n(47)),d=y(n(24)),f=y(n(150)),c=n(8262),p=y(n(6)),v=y(n(7382));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(e){var t,n=e.guildJoinRequest,r=e.page,y=e.setSelectedJoinRequest,m=n.user,h=n.createdAt,E=n.applicationStatus;if(null==m)throw new Error("Missing user on this guild join request!");var g=f.default.getUserAvatarURL(new o.default(m)),S=function(){y(m.id,E,r)};return _(i.default,{onClick:S,className:v.default.guildJoinRequestRow},void 0,_("div",{className:v.default.inline},void 0,_(u.default,{src:g,size:u.default.Sizes.SIZE_40,"aria-label":m.username,className:v.default.spacer}),_("div",{},void 0,_("div",{className:v.default.inline},void 0,_(s.default,{size:s.default.Sizes.SIZE_16},void 0,m.username),_(d.default,{size:d.default.Sizes.SIZE_16,color:d.default.Colors.HEADER_SECONDARY},void 0,"#"+m.discriminator)),_(d.default,{color:d.default.Colors.HEADER_SECONDARY},void 0,new Date(h).toLocaleString(p.default.getLocale(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})))),_("div",{className:v.default.inline},void 0,_(s.default,{muted:E===c.GuildJoinRequestApplicationStatuses.PENDING,size:s.default.Sizes.SIZE_12,className:(0,a.default)(v.default.status,(t={},t[v.default.approved]=E===c.GuildJoinRequestApplicationStatuses.APPROVED,t[v.default.rejected]=E===c.GuildJoinRequestApplicationStatuses.REJECTED,t))},void 0,E),_(i.default,{onClick:S},void 0,_(l.default,{className:v.default.caret}))))};h.displayName="GuildJoinRequestRow";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=D(n(9)),i=n(3),l=D(n(8254)),u=D(n(105)),s=D(n(8255)),d=D(n(12)),f=D(n(29)),c=D(n(55)),p=D(n(151)),v=D(n(8522)),y=D(n(8272)),m=n(131),_=D(n(681)),h=D(n(372)),E=D(n(1215)),g=D(n(466)),S=n(41),O=D(n(47)),I=D(n(24)),T=D(n(13)),C=D(n(8410)),b=D(n(8411)),M=D(n(9753)),N=D(n(9754)),A=D(n(8906)),P=n(1),R=D(n(6)),L=D(n(7674));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var G=U(p.default,{}),F=function(e){var t,n,r,p,D,w=e.setPreventNavigation,F=e.pendingRequestsCount,B=(0,i.useStateFromStores)([s.default],(function(){return s.default.getProps()})).guild,H=(0,i.useStateFromStores)([u.default],(function(){return u.default.useReducedMotion})),x=(0,i.useStateFromStores)([d.default],(function(){return d.default.getCurrentUser().isStaff()})),V=a.useState(!1),W=V[0],Y=V[1],z=(0,i.useStateFromStores)([b.default],(function(){return null!=B?b.default.get(B.id):null})),K=a.useState(null!==(t=null==z?void 0:z.description)&&void 0!==t?t:""),$=K[0],Z=K[1],q=a.useState(!1),X=q[0],J=q[1],Q=null==B?void 0:B.hasFeature(P.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED),ee=a.useState(!Q||(null==B?void 0:B.hasFeature(P.GuildFeatures.PREVIEW_ENABLED))),te=ee[0],ne=ee[1];a.useEffect((function(){null!=B&&C.default.fetchVerificationForm(B.id).then((function(e){var t;Z(null!==(t=null==e?void 0:e.description)&&void 0!==t?t:"")}))}),[null==B?void 0:B.id]),a.useEffect((function(){if(null!=B&&Q){var e=B.features;te?e.add(P.GuildFeatures.PREVIEW_ENABLED):e.delete(P.GuildFeatures.PREVIEW_ENABLED),l.default.saveGuild(B.id,{features:e})}}),[te]);var re=a.useRef(!1);a.useEffect((function(){return function(){re.current=!0}}),[]);var ae=a.useCallback((function(e){var t,n,r,o;""!==$&&(null!==(t=null==z||null===(n=z.formFields)||void 0===n?void 0:n.length)&&void 0!==t?t:0)>0?e():(o=""===$&&0===(null==z||null===(r=z.formFields)||void 0===r?void 0:r.length)?R.default.Messages.MEMBER_VERIFICATION_WARNING_DESCRIPTION_AND_FIELDS:""===$?R.default.Messages.MEMBER_VERIFICATION_WARNING_DESCRIPTION:R.default.Messages.MEMBER_VERIFICATION_WARNING_FIELDS,(0,S.openModal)((function(t){return a.createElement(g.default,k({},t,{header:R.default.Messages.MEMBER_VERIFICATION_WARNING_TITLE,cancelText:R.default.Messages.MEMBER_VERIFICATION_WARNING_CANCEL,confirmText:R.default.Messages.MEMBER_VERIFICATION_WARNING_CONFIRM,onConfirm:e}),U(I.default,{size:I.default.Sizes.SIZE_16},void 0,o))})))}),[$,z]);if(a.useEffect((function(){var e,t;!Q||""!==$&&0!==(null!==(e=null==z||null===(t=z.formFields)||void 0===t?void 0:t.length)&&void 0!==e?e:0)?w(!1,null):w(!0,ae)}),[Q,w,ae,$,z]),a.useEffect((function(){return function(){if(re.current&&X){var e,t=null==z||null===(e=z.formFields)||void 0===e?void 0:e.map((function(e){return e.field_type}));T.default.track(P.AnalyticEvents.GUILD_MEMBERSHIP_GATE_SETTINGS_UPDATED,{guild_id:null==B?void 0:B.id,is_enabled:Q,requirements:t,preview_enabled:null==B?void 0:B.hasFeature(P.GuildFeatures.PREVIEW_ENABLED)})}}}),[re,X,Q,z,null==B?void 0:B.id,null==B?void 0:B.features]),null==B||null==z)return G;var oe=a.createElement(a.Fragment,null,U(c.default,{align:c.default.Align.CENTER,className:L.default.enableContainer},void 0,Q?U(h.default,{width:24,height:24,className:(0,o.default)(L.default.activeCircle,(n={},n[L.default.animate]=W,n))}):U(E.default,{width:24,height:24,className:(0,o.default)(L.default.editCircle,(r={},r[L.default.animate]=W,r))}),Q?U(c.default.Child,{className:L.default.enableDescription},void 0,U(I.default,{},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_ENABLED),U(I.default,{},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_ENABLED_SECOND_LINE)):U(c.default.Child,{className:L.default.enableDescription},void 0,U(I.default,{},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_PROGRESS_WILL_SAVE),U(I.default,{},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_ENABLE_REMINDER)),U(c.default,{grow:0,justify:c.default.Justify.END},void 0,U(f.default,{className:L.default.previewButton,disabled:null==(null==z||null===(p=z.formFields)||void 0===p?void 0:p.length)||0===(null==z||null===(D=z.formFields)||void 0===D?void 0:D.length),look:f.default.Looks.LINK,size:f.default.Sizes.SMALL,onClick:function(){(0,S.openModal)((function(e){return a.createElement(A.default,k({},e,{guildId:B.id,isPreview:!0}))}))},color:f.default.Colors.PRIMARY},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_PREVIEW),U(f.default,{size:f.default.Sizes.SMALL,color:Q?f.default.Colors.RED:f.default.Colors.BRAND,onClick:function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J(!0),e.next=3,C.default.enableVerificationForm(B.id,!Q);case 3:Y(!H);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){j(o,r,a,i,l,"next",e)}function l(e){j(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();Q?Q&&null!=F&&F>0?(0,S.openModal)((function(t){return a.createElement(M.default,k({},t,{guildId:B.id,onSuccess:e}))})):e():ae(e)}},void 0,Q?R.default.Messages.DISABLE:R.default.Messages.ENABLE))),x?U("div",{className:(0,o.default)(L.default.descriptionWrapper,L.default.switchField)},void 0,U("div",{},void 0,U(O.default,{size:O.default.Sizes.SIZE_16},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_PREVIEW_ENABLED_TITLE),U(I.default,{color:I.default.Colors.HEADER_SECONDARY},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_PREVIEW_DESCRIPTION.format({helpdeskArticle:""}))),U(v.default,{className:L.default.switch,checked:te,onChange:ne})):null,U("div",{className:L.default.descriptionWrapper},void 0,U(m.FormTitle,{},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION_TITLE),U(y.default,{placeholder:R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION_PLACEHOLDER,onChange:function(e){Z(e)},onBlur:function(){var e=$.trim();e!==z.description&&(J(!0),C.default.updateVerificationFormDescription(B.id,e))},value:$,maxLength:300,autosize:!0})),U("div",{className:L.default.divider}),U(N.default,{guildId:B.id,verificationForm:z,setHasChanges:J}));return x?oe:U(_.default,{title:R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION,tag:_.default.Tags.H2},void 0,U("div",{className:L.default.introDescription},void 0,U(I.default,{size:I.default.Sizes.SIZE_14,className:L.default.description},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION),U(I.default,{size:I.default.Sizes.SIZE_14,className:L.default.description},void 0,R.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DESCRIPTION_COMING_SOON)),oe)};F.displayName="GuildSettingsMemberVerificationEditScreen";var B=F;t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(29)),i=n(85),l=n(35),u=v(n(47)),s=v(n(24)),d=v(n(8294)),f=n(8262),c=v(n(6)),p=v(n(7672));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function h(e){var t=e.guildId,n=e.onClose,r=e.transitionState,v=e.onSuccess,y=(0,i.useUID)(),h=a.useState(null),E=h[0],g=h[1],S=function(){var e,r=(e=regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(r),e.prev=1,e.next=4,d.default.actionAllPendingJoinRequests(t,r);case 4:return e.next=6,v();case 6:n(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),g(null);case 12:case"end":return e.stop()}}),e,null,[[1,9]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){_(o,r,a,i,l,"next",e)}function l(e){_(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return r.apply(this,arguments)}}();return m(l.ModalRoot,{transitionState:r,"aria-labelledby":y},void 0,m(l.ModalHeader,{separator:!1,id:y},void 0,m(u.default,{tag:u.default.Tags.H2,size:u.default.Sizes.SIZE_20},void 0,c.default.Messages.MEMBER_VERIFICATION_DISABLE_CONFIRM_TITLE)),m(l.ModalContent,{className:p.default.body},void 0,m(s.default,{},void 0,c.default.Messages.MEMBER_VERIFICATION_DISABLE_CONFIRM_BODY)),m(l.ModalFooter,{},void 0,m(o.default,{color:o.default.Colors.PRIMARY,size:o.default.Sizes.SMALL,disabled:null!=E,onClick:n},void 0,c.default.Messages.CANCEL),m(o.default,{className:p.default.spacedButton,color:o.default.Colors.RED,size:o.default.Sizes.SMALL,disabled:null!=E,submitting:E===f.GuildJoinRequestApplicationStatuses.REJECTED,onClick:function(){return S(f.GuildJoinRequestApplicationStatuses.REJECTED)}},void 0,c.default.Messages.MEMBER_VERIFICATION_DISABLE_CONFIRM_KICK_ALL),m(o.default,{color:o.default.Colors.GREEN,size:o.default.Sizes.SMALL,disabled:null!=E,submitting:E===f.GuildJoinRequestApplicationStatuses.APPROVED,onClick:function(){return S(f.GuildJoinRequestApplicationStatuses.APPROVED)}},void 0,c.default.Messages.MEMBER_VERIFICATION_DISABLE_CONFIRM_APPROVE_ALL)))}h.displayName="DisableVerificationConfirmModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FIELD_TO_EDIT_MODAL_MAP=void 0;var r,a,o=X(n(0)),i=Z(n(9)),l=Z(n(8)),u=n(5941),s=n(3),d=Z(n(10)),f=Z(n(15)),c=Z(n(39)),p=Z(n(12)),v=Z(n(29)),y=Z(n(61)),m=Z(n(55)),_=X(n(1164)),h=Z(n(149)),E=Z(n(159)),g=Z(n(255)),S=Z(n(8431)),O=Z(n(9755)),I=Z(n(9756)),T=Z(n(1215)),C=Z(n(1283)),b=Z(n(9757)),M=Z(n(466)),N=n(41),A=Z(n(47)),P=Z(n(24)),R=Z(n(78)),L=Z(n(8410)),D=n(8301),w=n(8262),j=Z(n(9758)),k=Z(n(9759)),U=n(9760),G=Z(n(8908)),F=Z(n(8909)),B=Z(n(8910)),H=Z(n(8911)),x=Z(n(8912)),V=Z(n(8913)),W=n(1),Y=Z(n(6)),z=Z(n(7673)),K=Z(n(9761)),$=Z(n(9762));function Z(e){return e&&e.__esModule?e:{default:e}}function q(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return q=function(){return e},e}function X(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=q();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function J(){return(J=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}).apply(this,arguments)}function Q(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var ee=((r={})[w.VerificationFormFieldTypes.VERIFICATION]=null,r[w.VerificationFormFieldTypes.TERMS]=k.default,r[w.VerificationFormFieldTypes.TEXT_INPUT]=U.TextInputFieldModal,r[w.VerificationFormFieldTypes.PARAGRAPH]=U.ParagraphFieldModal,r[w.VerificationFormFieldTypes.MULTIPLE_CHOICE]=j.default,r);t.FIELD_TO_EDIT_MODAL_MAP=ee;var te=function(e){var t,n=e.icon,r=e.label,a=e.disabled,l=e.onClick,u=e.disabledText,s=Q(m.default,{className:(0,i.default)(z.default.addFieldRow,(t={},t[z.default.disabled]=a,t)),align:m.default.Align.CENTER,justify:m.default.Justify.START},void 0,n,Q(P.default,{},void 0,r));return a?Q(h.default,{text:null!=u?u:Y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_COMING_SOON},void 0,(function(e){return o.createElement("div",e,s)})):Q(y.default,{className:z.default.addFieldButton,onClick:l},void 0,s)},ne=function(e){var t,n=e.index,r=e.field,a=e.inputComponent,l=e.disableEdit,s=void 0!==l&&l,d=e.draggable,f=void 0===d||d,c=e.disabledText,p=e.onEdit,v=e.onDelete,m=e.onFieldReorder,_=e.isDropHovered,E=o.useRef(null),S=(0,u.useDrag)({item:{type:"FORM_FIELD",field:r,index:n},end:function(e,t){null==e||t.didDrop()||m&&m(e.field,null,!0)}})[1];(0,(0,u.useDrop)({accept:"FORM_FIELD",hover:function(e,t){var r,a=e.index,o=null===(r=E.current)||void 0===r?void 0:r.getBoundingClientRect(),i=t.getClientOffset();if(null!=o&&null!=i){var l=(o.bottom-o.top)/2,u=i.y-o.top;a<n&&u<l||a>n&&u<l||m&&m(e.field,n,!1)}},drop:function(e){m&&m(e.field,n,!0)}})[1])(S(E)),f&&(a=o.createElement("div",{className:z.default.draggableWrapper,ref:E},a));var O=s?Q(h.default,{text:c},void 0,(function(e){return o.createElement("div",J({},e,{className:z.default.editButtonsWrapper}),Q("div",{},void 0,Q(T.default,{height:32,width:32,className:(0,i.default)(z.default.editButton,z.default.editButtonDisabled)})),Q("div",{},void 0,Q(g.default,{height:32,width:32,className:(0,i.default)(z.default.editButton,z.default.editButtonDisabled)})))})):Q("div",{className:z.default.editButtonsWrapper},void 0,Q(y.default,{onClick:function(){return p&&p(r,n)}},void 0,Q(T.default,{height:32,width:32,className:z.default.editButton})),Q(y.default,{onClick:function(){return v&&v(n)}},void 0,Q(g.default,{height:32,width:32,className:z.default.editButton})));return Q("div",{className:(0,i.default)(z.default.editableFormFieldWrapper,(t={},t[z.default.dragging]=_,t))},void 0,a,O)};ne.displayName="EditableFormField";var re=Q(H.default,{isSettingsView:!0,isPreview:!0}),ae=Q(G.default,{isSettingsView:!0,isPreview:!0}),oe=function(e){var t,n=e.verificationForm,r=e.guildId,a=e.setHasChanges,i=(0,s.useStateFromStores)([c.default],(function(){return c.default.theme})),u=(0,s.useStateFromStores)([f.default],(function(){return f.default.getGuild(r)})),y=null==u?void 0:u.verificationLevel,g=null==u?void 0:u.hasFeature(W.GuildFeatures.PREVIEW_ENABLED),T=y===W.VerificationLevels.VERY_HIGH,j=(0,s.useStateFromStores)([f.default],(function(){var e;return null===(e=f.default.getGuild(r))||void 0===e?void 0:e.rulesChannelId})),k=(0,s.useStateFromStores)([d.default],(function(){return d.default.getChannel(j)})),U=(0,s.useStateFromStores)([p.default],(function(){return p.default.getCurrentUser()})),G=R.default.can(W.Permissions.SEND_MESSAGES,U,k),H=o.useState(null!==(t=n.formFields)&&void 0!==t?t:[]),Z=H[0],q=H[1],X=o.useState(null),oe=X[0],ie=X[1],le=null==u?void 0:u.hasFeature(W.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED),ue=null==U?void 0:U.isStaff(),se=o.useMemo((function(){return Z.some(w.isTermsFormField)}),[Z]),de=o.useMemo((function(){return!(!le||null==Z||0===Z.length)&&(1!==Z.length||Z[0].field_type!==w.VerificationFormFieldTypes.TERMS)}),[le,Z]),fe=o.useMemo((function(){return[{type:w.VerificationFormFieldTypes.TERMS,label:Y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_RULES,icon:Q(S.default,{className:z.default.icon,height:24,width:24}),disabled:!G||null!=Z&&Z.some(w.isTermsFormField),disabledText:G?Y.default.Messages.MEMBER_VERIFICATION_RULE_TOOLTIP:Y.default.Messages.MEMBER_VERIFICATION_NEED_RULES_CHANNEL_PERMS},{type:w.VerificationFormFieldTypes.TEXT_INPUT,label:Y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_TEXT_INPUT,icon:Q(b.default,{className:z.default.icon,height:24,width:24}),disabled:!ue},{type:w.VerificationFormFieldTypes.PARAGRAPH,label:Y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_PARAGRAPH,icon:Q(I.default,{className:z.default.icon,height:24,width:24}),disabled:!ue},{type:w.VerificationFormFieldTypes.MULTIPLE_CHOICE,label:Y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_MULTIPLE_CHOICE,icon:Q(O.default,{className:z.default.icon,background:z.default.iconBackground,height:24,width:24}),disabled:!ue},{label:Y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_VERIFICATION,icon:Q(C.default,{className:z.default.icon,height:24,width:24}),disabled:!0}]}),[G,ue,Z]),ce=function(e){q(e),L.default.updateVerificationForm(r,e)},pe=function(e){if(null!=e){var t=ee[e];null!=t&&(0,N.openModal)((function(e){return o.createElement(t,J({},e,{onSave:function(e){ce([].concat(Z,[e]))}}))}),{onCloseRequest:W.NOOP})}},ve=function(e,t){var n=ee[e.field_type];null!=n&&(0,N.openModal)((function(r){return o.createElement(n,J({},r,{field:e,onSave:function(e){return function(e,t){if(!l.default.isEqual(Z[t],e)){a(!0);var n=[].concat(Z);n[t]=e,ce(n)}}(e,t)}}))}),{onCloseRequest:W.NOOP})},ye=function(e){(0,N.openModal)((function(t){return o.createElement(M.default,J({header:Y.default.Messages.MEMBER_VERIFICATION_DELETE_FIELD_CONFIRM_TITLE,confirmText:Y.default.Messages.REMOVE,cancelText:Y.default.Messages.CANCEL,onConfirm:function(){return function(e){a(!0),ce([].concat(Z.slice(0,e),Z.slice(e+1)))}(e)},onCancel:t.onClose},t),Q(P.default,{size:P.default.Sizes.SIZE_14},void 0,Y.default.Messages.MEMBER_VERIFICATION_DELETE_FIELD_CONFIRM_TEXT))}))},me=function(e,t,n){if(null!=Z){var r=Z.indexOf(e),a=[].concat(Z);null!=t&&t!==r&&(a.splice(r,1),a.splice(t,0,e),q(a)),n?(ce(a),ie(null)):ie(t)}},_e=function(e){switch(e.field_type){case w.VerificationFormFieldTypes.VERIFICATION:return T?re:ae;case w.VerificationFormFieldTypes.TERMS:return Q(x.default,{field:e,channelId:j,isSettingsView:!0});case w.VerificationFormFieldTypes.TEXT_INPUT:return Q(V.default,{field:e,isSettingsView:!0});case w.VerificationFormFieldTypes.PARAGRAPH:return Q(B.default,{field:e,isSettingsView:!0});case w.VerificationFormFieldTypes.MULTIPLE_CHOICE:return Q(F.default,{field:e,isSettingsView:!0});default:return null}},he=null;se&&(G?!g&&ue&&(he=Y.default.Messages.MEMBER_VERIFICATION_PREVIEW_DISABLED_MARKDOWN_WARNING):he=Y.default.Messages.MEMBER_VERIFICATION_NEED_RULES_CHANNEL_PERMS);var Ee=Z.length===D.MAX_FORM_ELEMENTS;return Q(m.default,{align:m.default.Align.START,justify:m.default.Justify.BETWEEN},void 0,Q("div",{className:z.default.addFieldButtonsContainer},void 0,ue&&(de?Q("div",{className:z.default.approvalTypeNotice},void 0,Q(A.default,{size:A.default.Sizes.SIZE_12,className:z.default.manualApprovalTitle},void 0,Y.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_MANUAL_APPROVAL),Q(P.default,{size:P.default.Sizes.SIZE_12,color:P.default.Colors.HEADER_SECONDARY,className:z.default.approvalTypeBody},void 0,Y.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_MANUAL_APPROVAL_DESCRIPTION)):Q("div",{className:z.default.approvalTypeNotice},void 0,Q(A.default,{size:A.default.Sizes.SIZE_12,className:z.default.autoApprovalTitle},void 0,Y.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_AUTO_APPROVAL),Q(P.default,{size:P.default.Sizes.SIZE_12,color:P.default.Colors.HEADER_SECONDARY,className:z.default.approvalTypeBody},void 0,Y.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_AUTO_APPROVAL_DESCRIPTION))),Q(E.default,{},void 0,Y.default.Messages.MEMBER_VERIFICATION_ADD_QUESTION),fe.map((function(e){var t=e.type,n=e.icon,r=e.label,a=e.disabled,o=e.disabledText;return Q(te,{icon:n,label:r,disabled:Ee||a,disabledText:Ee?Y.default.Messages.MEMBER_VERIFICATION_FORM_FIELDS_LIMIT.format({number:D.MAX_FORM_ELEMENTS}):o,onClick:function(){return pe(t)}},r)}))),Q("div",{className:z.default.previewContainer},void 0,null!=he?Q(_.default,{backgroundColor:_.Colors.BACKGROUND_ACCENT,className:z.default.errorBanner},void 0,he):null,Q("div",{className:z.default.editableFieldsContainer},void 0,D.REQUIRED_FORM_FIELDS.map((function(e,t){return Q(ne,{field:e,inputComponent:_e(e),index:t,disableEdit:!0,disabledText:Y.default.Messages.MEMBER_VERIFICATION_FORM_REQUIRED_ITEM,draggable:!1},"required-"+t)}))),0===Z.length?Q(m.default,{direction:m.default.Direction.VERTICAL,align:m.default.Align.CENTER,className:z.default.getStartedWrapper},void 0,Q("img",{alt:"",src:i===W.ThemeTypes.DARK?K.default:$.default,className:z.default.getStartedIcon}),Q(A.default,{size:A.default.Sizes.SIZE_20,className:z.default.getStartedTitle},void 0,Y.default.Messages.MEMBER_VERIFICATION_GET_STARTED_TITLE),Q(P.default,{className:z.default.getStartedSubtitle},void 0,Y.default.Messages.MEMBER_VERIFICATION_GET_STARTED_SUBTITLE),Q(h.default,{text:G?null:Y.default.Messages.MEMBER_VERIFICATION_NEED_RULES_CHANNEL_PERMS},void 0,(function(e){return o.createElement(v.default,J({},e,{disabled:!G,size:v.default.Sizes.SMALL,onClick:function(){return pe(w.VerificationFormFieldTypes.TERMS)}}),Y.default.Messages.MEMBER_VERIFICATION_GET_STARTED_BUTTON)}))):Q("div",{className:z.default.editableFieldsContainer},void 0,Z.map((function(e,t){return Q(ne,{field:e,inputComponent:_e(e),index:t,disableEdit:(0,w.isTermsFormField)(e)&&!G,disabledText:Y.default.Messages.MEMBER_VERIFICATION_NEED_RULES_CHANNEL_PERMS,onEdit:ve,onDelete:ye,onFieldReorder:me,isDropHovered:t===oe},"field-"+t)})))))};oe.displayName="MemberVerificationFormBuilder";var ie=oe;t.default=ie},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=e.background,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","background"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"}),s("circle",{className:f,cx:"8",cy:"8",r:"8",fill:d}),s("path",{className:c,fillRule:"evenodd",clipRule:"evenodd",d:"M11.06 6L8 9.09042L4.94 6L4 6.95142L8 11L12 6.95142L11.06 6Z"}))}d.displayName="MultipleChoice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"}),s("rect",{className:f,y:"3",width:"16",height:"2",rx:"1",fill:d}),s("rect",{className:f,y:"11",width:"8",height:"2",rx:"1",fill:d}),s("rect",{className:f,y:"7",width:"16",height:"2",rx:"1",fill:d}))}d.displayName="Paragraph"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?17:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 17 16",xmlns:"http://www.w3.org/2000/svg"}),s("rect",{className:f,y:"5",width:"16",height:"2",rx:"1",fill:d}),s("rect",{className:f,y:"9",width:"8",height:"2",rx:"1",fill:d}))}d.displayName="ShortAnswer"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(9)),i=n(5941),l=S(n(29)),u=S(n(55)),s=S(n(153)),d=S(n(149)),f=n(85),c=S(n(686)),p=S(n(8528)),v=n(35),y=S(n(47)),m=S(n(24)),_=n(8301),h=n(8262),E=S(n(6)),g=S(n(7355));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=function(e){var t,n=e.choice,r=e.index,u=e.onChange,d=e.onClear,f=e.onReorder,v=e.isDropHovered,y=a.useRef(null),m=a.useRef(null),_=(0,i.useDrag)({item:{type:"MULTIPLE_CHOICE",choice:n,index:r},end:function(e,t){null==e||t.didDrop()||f(e.choice,null,!0)}}),h=_[1],S=_[2],O=(0,i.useDrop)({accept:"MULTIPLE_CHOICE",hover:function(e,t){var n,a=e.index,o=null===(n=y.current)||void 0===n?void 0:n.getBoundingClientRect(),i=t.getClientOffset();if(null!=o&&null!=i){var l=(o.bottom-o.top)/2,u=i.y-o.top;a<r&&u<l||a>r&&u>l||f(e.choice,r,!1)}},drop:function(e){f(e.choice,r,!0)}})[1];return h(m),S(O(y)),a.createElement("div",{ref:y,className:(0,o.default)(g.default.draggableInputContainer,(t={},t[g.default.dragging]=v,t))},T("div",{className:g.default.inputWrapper},void 0,T(s.default,{autoFocus:!0,onChange:function(e){return u(e)},placeholder:E.default.Messages.MEMBER_VERIFICATION_MULTIPLE_CHOICE_PLACEHOLDER.format({index:r+1}),value:n}),T(l.default,{className:g.default.clearButtonRight,onClick:d,look:l.default.Looks.BLANK,size:l.default.Sizes.NONE},void 0,T(c.default,{className:g.default.clearIcon}))),a.createElement("div",{ref:m,className:g.default.dragContainer},T(p.default,{className:g.default.dragIcon})))};C.displayName="DraggableChoiceRow";var b=function(e){var t,n,r=e.field,o=e.transitionState,i=e.onSave,c=e.onClose,p=a.useState(null!==(t=null==r?void 0:r.label)&&void 0!==t?t:""),S=p[0],O=p[1],b=a.useState(null!==(n=null==r?void 0:r.choices)&&void 0!==n?n:[""]),M=b[0],N=b[1],A=a.useState(null),P=A[0],R=A[1],L=a.useState(null),D=L[0],w=L[1],j=(0,f.useUID)(),k=function(){M.length!==_.MAX_NUM_CHOICES&&N([].concat(M,[""]))},U=function(e,t,n){if(null!=M){var r=M.indexOf(e),a=[].concat(M);null!=t&&t!==r&&(a.splice(r,1),a.splice(t,0,e),N(a)),w(n?null:t)}},G=M.length===_.MAX_NUM_CHOICES;return T(v.ModalRoot,{transitionState:o,"aria-labelledby":j},void 0,T(v.ModalContent,{className:g.default.modalContent},void 0,T(y.default,{size:y.default.Sizes.SIZE_16,className:g.default.headerText,id:j},void 0,E.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_MULTIPLE_CHOICE),T(s.default,{autoFocus:!0,className:g.default.spacedItem,onChange:function(e){var t=e.replace(/(\r\n|\n|\r)/g," ");t.length>_.MAX_QUESTION_LENGTH&&(t=e.slice(0,_.MAX_QUESTION_LENGTH)),O(t)},placeholder:E.default.Messages.MEMBER_VERIFICATION_FIELD_QUESTION,value:S}),T("div",{className:g.default.divider}),M.map((function(e,t){return T(C,{choice:e,index:t,onChange:function(e){return function(e,t){var n=e.replace(/(\r\n|\n|\r)/g," ");n.length>_.MAX_CHOICE_LENGTH&&(n=n.slice(0,_.MAX_CHOICE_LENGTH));var r=[].concat(M);r[t]=n,N(r)}(e,t)},onClear:function(){return function(e){var t=[].concat(M.slice(0,e),M.slice(e+1));N(0===t.length?[""]:t)}(t)},onReorder:U,isDropHovered:t===D},"choice-"+t)})),T(d.default,{text:G?E.default.Messages.MEMBER_VERIFICATION_MULTIPLE_CHOICE_LIMIT.format({number:_.MAX_NUM_CHOICES}):null},void 0,(function(e){return a.createElement(l.default,I({},e,{onClick:k,disabled:G,color:l.default.Colors.GREY,size:l.default.Sizes.SMALL,className:g.default.addItemButton}),E.default.Messages.MEMBER_VERIFICATION_MULTIPLE_CHOICE_ADD)})),P&&T(m.default,{className:g.default.errorText,size:m.default.Sizes.SIZE_12,color:m.default.Colors.ERROR},void 0,P)),T(v.ModalFooter,{justify:u.default.Justify.BETWEEN},void 0,T(u.default,{grow:0},void 0,T(l.default,{className:g.default.cancelButton,color:l.default.Colors.GREY,onClick:c,size:l.default.Sizes.SMALL},void 0,E.default.Messages.CANCEL),T(l.default,{onClick:function(){var e=S.trim();if(""!==e)if(0!==M.map((function(e){return e.trim()})).filter((function(e){return""!==e})).length){var t={field_type:h.VerificationFormFieldTypes.MULTIPLE_CHOICE,label:e,choices:M,required:!0};i(t),c()}else R(E.default.Messages.MEMBER_VERIFICATION_CHOICES_REQUIRED_ERROR);else R(E.default.Messages.MEMBER_VERIFICATION_FIELD_QUESTION_REQUIRED_ERROR)},size:l.default.Sizes.SMALL},void 0,E.default.Messages.SAVE))))};b.displayName="MultipleChoiceModal";var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=P(n(9)),i=P(n(188)),l=n(5941),u=P(n(8325)),s=n(3),d=P(n(8257)),f=P(n(8391)),c=P(n(10)),p=P(n(8255)),v=P(n(29)),y=P(n(61)),m=P(n(55)),_=P(n(149)),h=n(85),E=P(n(159)),g=P(n(686)),S=P(n(8528)),O=n(35),I=P(n(47)),T=P(n(24)),C=n(8301),b=n(8262),M=n(1),N=P(n(6)),A=P(n(7355));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var w=function(e){var t,n=e.rule,r=e.rulesChannel,i=e.index,s=e.onChange,d=e.onKeyDown,c=e.onClear,p=e.onRuleReorder,m=e.isDropHovered,_=e.focused,h=e.onFocus,E=e.previewEnabled,O=a.useRef(null),I=a.useRef(null),b=a.useState({textValue:n.value,richValue:u.default.deserialize(n.value)}),P=b[0],R=P.textValue,L=P.richValue,w=b[1],j=(0,l.useDrag)({item:{type:"RULE",rule:n,index:i},end:function(e,t){null==e||t.didDrop()||p(e.rule,null,!0)}}),k=j[1],U=j[2],G=(0,l.useDrop)({accept:"RULE",hover:function(e,t){var n,r=e.index,a=null===(n=O.current)||void 0===n?void 0:n.getBoundingClientRect(),o=t.getClientOffset();if(null!=a&&null!=o){var l=(a.bottom-a.top)/2,u=o.y-a.top;r<i&&u<l||r>i&&u>l||p(e.rule,i,!1)}},drop:function(e){p(e.rule,i,!0)}})[1];k(I),U(G(O));return a.useEffect((function(){""!==n.value&&""===R&&w({textValue:n.value,richValue:u.default.deserialize(n.value)})}),[n.value,R]),null==r?null:a.createElement("div",{ref:O,className:(0,o.default)(A.default.draggableInputContainer,(t={},t[A.default.dragging]=m,t))},D("div",{className:A.default.inputWrapper},void 0,D(y.default,{onMouseDown:function(){return h(i)}},void 0,D(f.default,{innerClassName:A.default.rulesTextAreaInput,type:M.TextareaTypes.RULES_INPUT,textValue:R,richValue:L,channel:r,placeholder:N.default.Messages.MEMBER_VERIFICATION_RULE_PLACEHOLDER,focused:_,onChange:function(e,t,n){var r=t;r.length>C.MAX_RULE_LENGTH&&(r=r.slice(0,C.MAX_RULE_LENGTH)),t!==r&&(t=r,n=u.default.deserialize(r)),s(t),w({textValue:t,richValue:n})},onKeyDown:d,canMentionChannels:E,canMentionRoles:E,maxCharacterCount:C.MAX_RULE_LENGTH,characterCountClassName:A.default.characterCount,onSubmit:function(){return Promise.resolve({shouldClear:!1,shouldRefocus:!0})}})),D(v.default,{className:A.default.clearButton,onClick:c,look:v.default.Looks.BLANK,size:v.default.Sizes.NONE},void 0,D(g.default,{className:A.default.clearIcon})),D(T.default,{className:A.default.rulesInputNumber,size:T.default.Sizes.SIZE_16,color:T.default.Colors.MUTED},void 0,i+1+".")),a.createElement("div",{ref:I,className:A.default.dragContainer},D(S.default,{className:A.default.dragIcon})))};w.displayName="DraggableRulesRow";var j=function(e){var t,n=e.shortRule,r=e.fullRule,i=e.disabled,l=e.onClick,u=D(T.default,{},void 0,n);return i?D(_.default,{text:N.default.Messages.MEMBER_VERIFICATION_RULE_LIMIT.format({number:C.MAX_NUM_RULES})},void 0,(function(e){var t;return a.createElement("div",L({},e,{className:(0,o.default)(A.default.exampleRule,(t={},t[A.default.disabled]=i,t))}),u)})):D(y.default,{className:(0,o.default)(A.default.exampleRule,(t={},t[A.default.disabled]=i,t)),onClick:function(){return l(r)}},void 0,D(T.default,{},void 0,n))},k=function(e){var t=e.field,n=e.transitionState,r=e.onSave,o=e.onClose,l=(0,s.useStateFromStores)([p.default],(function(){return p.default.getProps().guild})),u=null==l?void 0:l.rulesChannelId,f=null==l?void 0:l.hasFeature(M.GuildFeatures.PREVIEW_ENABLED),y=(0,s.useStateFromStores)([c.default],(function(){return null!=u?c.default.getChannel(u):null})),g=a.useState(null!=(null==t?void 0:t.values)?null==t?void 0:t.values.map((function(e){return{id:(0,i.default)(),value:e}})):[{id:(0,i.default)(),value:""}]),S=g[0],P=g[1],R=a.useState(null),k=R[0],U=R[1],G=a.useState(null),F=G[0],B=G[1],H=a.useState(0),x=H[0],V=H[1],W=(0,h.useUID)(),Y=function(e){if(S.length!==C.MAX_NUM_RULES)if(null!=e&&""===S[S.length-1].value){var t=[].concat(S);t[S.length-1].value=e,P(t),V(t.length-1)}else P([].concat(S,[{id:(0,i.default)(),value:null!=e?e:""}])),V(S.length)},z=a.useCallback((function(e,t,n){if(null!=S){var r=S.indexOf(e);if(null!=t&&t!==r){var a=[].concat(S);a.splice(r,1),a.splice(t,0,e),P(a)}B(n?null:t)}}),[S,P]);if(null==l||null==y)return null;var K=S.length===C.MAX_NUM_RULES;return D(d.default,{page:M.AnalyticsPages.GUILD_RULES_CREATE_MODAL},void 0,D(O.ModalRoot,{className:A.default.modal,size:O.ModalSize.MEDIUM,transitionState:n,"aria-labelledby":W},void 0,D(O.ModalContent,{className:A.default.modalContent},void 0,D(I.default,{size:I.default.Sizes.SIZE_16,className:A.default.headerText,id:W},void 0,N.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_RULES),S.map((function(e,t){return D(w,{rulesChannel:y,rule:e,index:t,onChange:function(e){return function(e,t){var n=[].concat(S);n[t].value=e,P(n)}(e,t)},onClear:function(){return function(e){var t=[].concat(S.slice(0,e),S.slice(e+1));P(0===t.length?[{id:(0,i.default)(),value:""}]:t)}(t)},onRuleReorder:z,isDropHovered:t===F,focused:t===x,onFocus:V,previewEnabled:null==f||f},e.id)})),D(_.default,{text:K?N.default.Messages.MEMBER_VERIFICATION_RULE_LIMIT.format({number:C.MAX_NUM_RULES}):null},void 0,(function(e){return a.createElement(v.default,L({},e,{className:A.default.addItemButton,color:v.default.Colors.GREY,size:v.default.Sizes.SMALL,disabled:K,onClick:function(){return Y()}}),N.default.Messages.MEMBER_VERIFICATION_ADD_RULE)})),D("div",{className:A.default.divider}),D(E.default,{},void 0,N.default.Messages.MEMBER_VERIFICATION_EXAMPLE_RULES),D(m.default,{direction:m.default.Direction.VERTICAL},void 0,D(m.default,{wrap:m.default.Wrap.WRAP,justify:m.default.Justify.START},void 0,D(j,{shortRule:N.default.Messages.MEMBER_VERIFICATION_RULE_BE_RESPECTFUL,fullRule:N.default.Messages.MEMBER_VERIFICATION_RULE_BE_RESPECTFUL_FULL,disabled:K,onClick:Y}),D(j,{shortRule:N.default.Messages.MEMBER_VERIFICATION_RULE_NO_SPAM,fullRule:N.default.Messages.MEMBER_VERIFICATION_RULE_NO_SPAM_FULL,disabled:K,onClick:Y})),D(m.default,{wrap:m.default.Wrap.WRAP,justify:m.default.Justify.START},void 0,D(j,{shortRule:N.default.Messages.MEMBER_VERIFICATION_RULE_NO_NSFW,fullRule:N.default.Messages.MEMBER_VERIFICATION_RULE_NO_NSFW_FULL,disabled:K,onClick:Y}),D(j,{shortRule:N.default.Messages.MEMBER_VERIFICATION_RULE_SAFE,fullRule:N.default.Messages.MEMBER_VERIFICATION_RULE_SAFE_FULL,disabled:K,onClick:Y}))),k&&D(T.default,{className:A.default.errorText,size:T.default.Sizes.SIZE_12,color:T.default.Colors.ERROR},void 0,k)),D(O.ModalFooter,{},void 0,D(v.default,{onClick:function(){var e=S.map((function(e){return e.value.trim()})).filter((function(e){return""!==e}));if(0!==e.length){var t={field_type:b.VerificationFormFieldTypes.TERMS,label:N.default.Messages.MEMBER_VERIFICATION_FORM_RULES_LABEL,values:e,required:!0};r(t),o()}else U(N.default.Messages.MEMBER_VERIFICATION_RULES_REQUIRED_ERROR)},size:v.default.Sizes.SMALL},void 0,N.default.Messages.SAVE),D(v.default,{className:A.default.cancelButton,color:v.default.Colors.GREY,onClick:o,size:v.default.Sizes.SMALL},void 0,N.default.Messages.CANCEL))))};k.displayName="RulesFieldModal";var U=k;t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParagraphFieldModal=t.TextInputFieldModal=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(29)),i=_(n(55)),l=_(n(8272)),u=_(n(153)),s=n(85),d=n(35),f=_(n(47)),c=_(n(24)),p=n(8301),v=n(8262),y=_(n(6)),m=_(n(7355));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(){return(E=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}).apply(this,arguments)}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var S=function(e){var t,n,r=e.type,_=e.title,h=e.field,E=e.transitionState,S=e.onSave,O=e.onClose,I=a.useState(null!==(t=null==h?void 0:h.label)&&void 0!==t?t:""),T=I[0],C=I[1],b=a.useState(null!==(n=null==h?void 0:h.placeholder)&&void 0!==n?n:""),M=b[0],N=b[1],A=a.useState(null),P=A[0],R=A[1],L=(0,s.useUID)(),D=r===v.VerificationFormFieldTypes.TEXT_INPUT?u.default:l.default;return g(d.ModalRoot,{transitionState:E,"aria-labelledby":L},void 0,g(d.ModalContent,{className:m.default.modalContent},void 0,g(f.default,{size:f.default.Sizes.SIZE_16,className:m.default.headerText,id:L},void 0,_),g(u.default,{className:m.default.spacedItem,onChange:function(e){var t=e.replace(/(\r\n|\n|\r)/g," ");t.length>p.MAX_QUESTION_LENGTH&&(t=t.slice(0,p.MAX_QUESTION_LENGTH)),C(t)},placeholder:y.default.Messages.MEMBER_VERIFICATION_FIELD_QUESTION,value:T}),g(D,{onChange:function(e){var t=e.replace(/(\r\n|\n|\r)/g," ");t.length>p.MAX_PLACEHOLDER_LENGTH&&(t=t.slice(0,p.MAX_PLACEHOLDER_LENGTH)),N(t)},placeholder:y.default.Messages.MEMBER_VERIFICATION_FIELD_PLACEHOLDER,value:M}),P&&g(c.default,{className:m.default.errorText,size:c.default.Sizes.SIZE_12,color:c.default.Colors.ERROR},void 0,P)),g(d.ModalFooter,{justify:i.default.Justify.BETWEEN},void 0,g(i.default,{grow:0},void 0,g(o.default,{className:m.default.cancelButton,color:o.default.Colors.GREY,onClick:O,size:o.default.Sizes.SMALL},void 0,y.default.Messages.CANCEL),g(o.default,{onClick:function(){var e=T.trim();""===e&&R(y.default.Messages.MEMBER_VERIFICATION_FIELD_QUESTION_REQUIRED_ERROR);var t={field_type:r,label:e,placeholder:M.trim(),required:!0};S(t),O()},size:o.default.Sizes.SMALL},void 0,y.default.Messages.SAVE))))};S.displayName="TextFieldModal";var O=function(e){return a.createElement(S,E({title:y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_TEXT_INPUT,type:v.VerificationFormFieldTypes.TEXT_INPUT},e))};t.TextInputFieldModal=O,O.displayName="TextInputFieldModal";var I=function(e){return a.createElement(S,E({title:y.default.Messages.MEMBER_VERIFICATION_FORM_ITEM_PARAGRAPH,type:v.VerificationFormFieldTypes.PARAGRAPH},e))};t.ParagraphFieldModal=I,I.displayName="ParagraphFieldModal"},function(e,t,n){e.exports=n.p+"ad082dc120a6e6a20b3062870b34d4b5.svg"},function(e,t,n){e.exports=n.p+"2829631f7e09423e4c97e995647a9a65.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=E(n(9)),o=n(3),i=E(n(39)),l=E(n(1160)),u=E(n(55)),s=E(n(159)),d=E(n(47)),f=E(n(24)),c=n(1),p=E(n(6)),v=E(n(7675)),y=E(n(7350)),m=E(n(7345)),_=E(n(9764)),h=E(n(9765));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=function(e){var t=e.width,n=e.className;return S("div",{className:(0,a.default)(v.default.exampleTextSingleLine,n),style:{width:t}})};O.displayName="ExampleTextSingleLine";var I=S(O,{width:"70%"}),T=function(e){var t=e.className;return S(u.default,{className:t,direction:u.default.Direction.VERTICAL,align:u.default.Align.START},void 0,S(O,{width:"100%",className:v.default.spacedSingleLine}),S(O,{width:"50%",className:v.default.spacedSingleLine}),I)};T.displayName="ExampleTextMultiLine";var C=S(T,{}),b=S(O,{width:"80px"}),M=S(O,{width:"80px"}),N=function(){var e=(0,o.useStateFromStores)([i.default],(function(){return i.default.theme}));return S("div",{className:v.default.exampleContainer},void 0,S("div",{className:v.default.exampleWumpus},void 0,S("img",{className:v.default.wumpus,alt:"",src:n(8767)}),S("div",{className:v.default.tooltipPointer}),S("div",{className:v.default.tooltip},void 0,p.default.Messages.GUILD_SETTINGS_EXAMPLE_TOOLTIP)),S(u.default,{className:v.default.exampleModal},void 0,S(u.default,{className:v.default.guildSidebar,direction:u.default.Direction.VERTICAL,justify:u.default.Justify.BETWEEN},void 0,S("div",{className:v.default.guildInfo},void 0,S("img",{alt:"",className:y.default.guildIcon,src:n(8973),width:48,height:48}),S(d.default,{size:d.default.Sizes.SIZE_20,className:y.default.guildName},void 0,p.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_EXAMPLE_GUILD_NAME),C),S("div",{},void 0,S(u.default,{align:u.default.Align.CENTER,className:y.default.onlineCount},void 0,S("div",{className:y.default.dotOnline}),b),S(u.default,{align:u.default.Align.CENTER},void 0,S("div",{className:y.default.dotMembers}),M))),S("div",{className:v.default.content},void 0,S("img",{alt:"",src:e===c.ThemeTypes.DARK?_.default:h.default,className:v.default.applicationIcon}),S(d.default,{size:d.default.Sizes.SIZE_24,className:v.default.header},void 0,p.default.Messages.MEMBER_VERIFICATION_MODAL_TITLE),S(f.default,{size:f.default.Sizes.SIZE_14,color:f.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.MEMBER_VERIFICATION_MODAL_SUBTITLE),S("hr",{className:v.default.divider}),S("div",{className:v.default.formItem},void 0,S(s.default,{},void 0,p.default.Messages.MEMBER_VERIFICATION_FORM_RULES_LABEL),S("div",{className:m.default.formFieldWrapper},void 0,[1,2,3,4].map((function(e){return S("div",{className:m.default.termsRow},e,S(f.default,{size:f.default.Sizes.SIZE_16,color:f.default.Colors.MUTED},void 0,e+"."),S(T,{className:v.default.rule}))}))),S(l.default,{size:20,type:l.default.Types.INVERTED,value:!0,className:v.default.checkbox},void 0,S(f.default,{className:m.default.checkboxText,size:f.default.Sizes.SIZE_16},void 0,p.default.Messages.MEMBER_VERIFICATION_READ_RULES))),S("div",{className:y.default.footer},void 0,S("div",{className:v.default.fakeButton},void 0,p.default.Messages.SUBMIT)))))};N.displayName="GuildSettingsMemberVerificationIntroExample";var A=N;t.default=A},function(e,t,n){e.exports=n.p+"65dbc9c659143d244038e4d4b496a058.svg"},function(e,t,n){e.exports=n.p+"0fea698e63eef5b6d219258e7d1da1e6.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=n(3),l=g(n(61)),u=g(n(681)),s=g(n(8354)),d=g(n(5971)),f=g(n(5950)),c=g(n(47)),p=g(n(24)),v=g(n(8294)),y=g(n(8673)),m=n(8262),_=g(n(9767)),h=g(n(6)),E=g(n(7678));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t=e.guildId,n=e.selectedIndex,r=e.applicationStatus,g=e.setSelectedIndex,S=e.page,I=a.useState(S-1),T=I[0],C=I[1],b=(0,i.useStateFromStoresObject)([y.default],(function(){var e=y.default.getRequests(t)[r],a=e.requests;return{total:e.total,selectedJoinRequest:a[n]}})),M=b.selectedJoinRequest,N=b.total;if(null==M)return null;var A=m.MAX_RESULTS_PER_PAGE*T+(n+1)<N,P=0!==T||0!==n;return O(u.default,{},void 0,O("div",{className:E.default.header},void 0,O(l.default,{onClick:function(){g(null)}},void 0,O(s.default,{direction:s.default.Directions.LEFT,className:E.default.back})),O(c.default,{size:c.default.Sizes.SIZE_16,muted:!0},void 0,h.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION),O(f.default,{className:E.default.chevron}),O(c.default,{size:c.default.Sizes.SIZE_16},void 0,h.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_REVIEW_APPLICATION_TITLE)),O(p.default,{color:p.default.Colors.HEADER_SECONDARY},void 0,h.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_REVIEW_APPLICATION_DESCRIPTION),O("div",{className:E.default.navbar},void 0,P?O(l.default,{onClick:function(){if(0!==n||0!==T)return 0===n?(v.default.fetchGuildJoinRequests({guildId:t,status:r,after:new Date(M.createdAt).getTime()}),g(m.MAX_RESULTS_PER_PAGE-1),void C(T-1)):void g(n-1)},className:(0,o.default)(E.default.navButton,E.default.previous)},void 0,O(d.default,{direction:s.default.Directions.LEFT,className:(0,o.default)(E.default.chevron,E.default.navSpacing)}),O(c.default,{muted:!0},void 0,h.default.Messages.PAGINATION_PREVIOUS)):null,A?O(l.default,{onClick:function(){n+1>=m.MAX_RESULTS_PER_PAGE?(v.default.fetchGuildJoinRequests({guildId:t,status:r,before:new Date(M.createdAt).getTime()}),g(0),C(T+1)):g(n+1)},className:(0,o.default)(E.default.navButton,E.default.next)},void 0,O(c.default,{muted:!0,className:E.default.navSpacing},void 0,h.default.Messages.PAGINATION_NEXT),O(f.default,{direction:s.default.Directions.RIGHT,className:E.default.chevron})):null,O(p.default,{className:E.default.navbarTitle},void 0,h.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_REVIEW_PENDING_APPLICATIONS.format({count:N}))),O("hr",{className:E.default.separator}),O(_.default,{guildId:t,guildJoinRequest:M}))};I.displayName="GuildSettingsMemberVerificationReviewApplication";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=n(3),l=M(n(8604)),u=M(n(89)),s=M(n(8255)),d=M(n(15)),f=M(n(40)),c=M(n(29)),p=M(n(372)),v=M(n(255)),y=M(n(8431)),m=n(41),_=M(n(279)),h=M(n(47)),E=M(n(24)),g=M(n(8294)),S=n(8262),O=M(n(9768)),I=M(n(8907)),T=n(1),C=M(n(6)),b=M(n(7677));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var R=function(e){var t=e.onApprove,n=e.onDeny,r=e.onBan,l=e.canBanUser,u=e.guildJoinRequest,d=u.applicationStatus,f=u.actionedByUser,m=u.actionedAt,_=u.rejectionReason,g=u.user;if(null==g)throw new Error("Missing user on this guild join request!");var O=(0,i.useStateFromStores)([s.default],(function(){return s.default.getProps().bans})),I=null!=O?O[g.id]:null;switch(d){case S.GuildJoinRequestApplicationStatuses.PENDING:return a.createElement(a.Fragment,null,P(c.default,{onClick:t},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_APPROVE_APPLICATION),P("hr",{className:b.default.sidebarSeparator}),P(c.default,{color:c.default.Colors.RED,onClick:function(){return n()}},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DENY_APPLICATION),l?P(c.default,{color:c.default.Colors.PRIMARY,onClick:function(){n(!0)},className:b.default.buttonSpacing},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DENY_AND_BAN_APPLICATION):null);case S.GuildJoinRequestApplicationStatuses.APPROVED:case S.GuildJoinRequestApplicationStatuses.REJECTED:var T=d===S.GuildJoinRequestApplicationStatuses.APPROVED,M=null!=I?y.default:T?p.default:v.default,N=null;return null!=I?N=a.createElement(a.Fragment,null,P(h.default,{size:h.default.Sizes.SIZE_12,muted:!0,className:b.default.sidebarTitle},void 0,null!=I.reason?C.default.Messages.BAN_REASON:C.default.Messages.NO_BAN_REASON),null!=I.reason?P(E.default,{color:E.default.Colors.HEADER_SECONDARY,className:b.default.rejectionReason},void 0,I.reason):null):l&&(N=P(c.default,{color:c.default.Colors.PRIMARY,onClick:r},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_BAN_USER)),a.createElement(a.Fragment,null,P(M,{className:(0,o.default)(b.default.statusIcon,T?b.default.approvedIcon:b.default.deniedIcon),width:24,height:24}),P(h.default,{size:h.default.Sizes.SIZE_16,className:b.default.status},void 0,null!=I?C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_BANNED:T?C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_APPROVED:C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DENIED),null!=f&&null!=m?P(E.default,{color:E.default.Colors.HEADER_SECONDARY,className:b.default.actionedBy},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_ACTIONED_BY.format({username:f.username,discriminator:f.discriminator,date:new Date(m).toLocaleString(C.default.getLocale(),{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})):null,null!=_?a.createElement(a.Fragment,null,P("hr",{className:b.default.sidebarSeparator}),P(h.default,{size:h.default.Sizes.SIZE_12,muted:!0,className:b.default.sidebarTitle},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_REASON_TITLE),P(E.default,{color:E.default.Colors.HEADER_SECONDARY,className:b.default.rejectionReason},void 0,_),N):null);default:return null}},L=function(e){var t=e.guildId,n=e.guildJoinRequest,r=new u.default(n.user),o=n.createdAt,s=n.formResponses,c=(0,i.useStateFromStores)([d.default],(function(){return d.default.getGuild(t)}),[t]),p=(0,i.useStateFromStores)([f.default],(function(){return null!=c&&f.default.canManageUser(T.Permissions.BAN_MEMBERS,r,c)}),[r,c]),v=function(){p&&(0,m.openModal)((function(e){return a.createElement(l.default,A({},e,{guildId:t,user:r}))}))};return P("div",{className:b.default.container},void 0,P("div",{className:b.default.application},void 0,P(_.default,{size:_.default.Sizes.SIZE_80,src:r.getAvatarURL(t),"aria-label":r.username,className:b.default.avatar}),P("div",{className:b.default.username},void 0,P(h.default,{size:h.default.Sizes.SIZE_24},void 0,r.toString()),P(E.default,{color:E.default.Colors.HEADER_SECONDARY,size:E.default.Sizes.SIZE_16},void 0,"#"+r.discriminator)),P(E.default,{color:E.default.Colors.HEADER_SECONDARY},void 0,C.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_APPLICATION_SUBMITTED_TIME.format({date:new Date(o).toLocaleString()})),P("hr",{className:b.default.applicationSeparator}),P(I.default,{guildId:t,formState:s,requestingUser:r})),P("div",{className:b.default.sidebar},void 0,P(R,{onApprove:function(){g.default.updateGuildJoinRequest(t,r.id,S.GuildJoinRequestApplicationStatuses.APPROVED)},onDeny:function(e){void 0===e&&(e=!1),(0,m.openModal)((function(n){return P(O.default,{modalProps:n,guildId:t,userId:r.id,onConfirm:e?v:void 0})}))},onBan:v,canBanUser:p,guildJoinRequest:n})))};L.displayName="GuildJoinRequestApplication";var D=L;t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(8272)),i=d(n(466)),l=d(n(8294)),u=n(8262),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t=e.guildId,n=e.userId,r=e.onConfirm,d=e.modalProps,f=a.useState(),v=f[0],y=f[1];return a.createElement(i.default,c({header:s.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DENY_MODAL_TITLE,cancelText:s.default.Messages.CANCEL,confirmText:s.default.Messages.GUILD_SETTINGS_MEMBER_VERIFICATION_DENY_APPLICATION,onConfirm:function(){l.default.updateGuildJoinRequest(t,n,u.GuildJoinRequestApplicationStatuses.REJECTED,v),null==r||r()}},d),p(o.default,{value:v,onChange:y,maxLength:160}))};v.displayName="DenyApplicationModal";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M,t.GuildSettingsRolesNotice=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(23)),i=n(3),l=O(n(199)),u=O(n(8254)),s=n(8459),d=O(n(8292)),f=O(n(684)),c=O(n(8355)),p=O(n(8255)),v=O(n(39)),y=n(48),m=n(8303),_=n(8529),h=O(n(9770)),E=O(n(9788)),g=O(n(9792)),S=n(1);function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e){u.default.selectRole(e)}var b=function(){var e=(0,i.useStateFromStores)([p.default],(function(){return p.default.getProps()})).guild,t=(0,i.useStateFromStores)([c.default],(function(){return c.default.formState})),n=(0,i.useStateFromStores)([v.default],(function(){return v.default.theme}));return T(d.default,{onSave:function(){if(null!=e){var t=e.id,n=c.default.editedRoleIds.map((function(e){return c.default.getRole(e)})).filter(y.isNotNullish),r=c.default.getSortDeltas();(0,s.saveRoleSettings)(t,n,r)}},submitting:t===S.FormStates.SUBMITTING,onReset:s.init,theme:n})};function M(){var e=(0,i.useStateFromStoresObject)([c.default],(function(){return{guild:c.default.guild,roles:c.default.roles}}),[]),t=e.guild,n=e.roles;(0,o.default)(null!=t,"Guild cannot be null here");var r=a.useMemo((function(){return n.find((function(e){return e.id===t.id}))}),[n,t]);(0,o.default)(null!=r,"Guild must have an everyone role");var u=a.useMemo((function(){return n.filter((function(e){return e.id!==t.id}))}),[n,t]),s=(0,i.useStateFromStores)([p.default],(function(){return p.default.getSelectedRoleId()})),d=a.useState(u.length>0),v=d[0],y=d[1];a.useEffect((function(){y(v||u.length>0)}),[v,u.length]),a.useEffect((function(){var e=f.default.getMemberCount(t.id);null!=e&&e<=_.MAX_PREFETCH_MEMBER_COUNT&&l.default.requestMembers(t.id,"",0,!1)}),[]);var S=a.useState(m.GuildSettingsRoleEditSections.DISPLAY),O=S[0],I=S[1];return a.useEffect((function(){null==s&&I(m.GuildSettingsRoleEditSections.DISPLAY)}),[s]),null!=s?T(h.default,{editRoleId:s,setEditRoleId:C,selectedSection:O,setSelectedSection:I}):v?T(g.default,{setEditRoleId:C,guild:t,everyoneRole:r,otherRoles:u,setSelectedSection:I}):T(E.default,{guild:t,everyoneRole:r,setEditRoleId:C})}t.GuildSettingsRolesNotice=b,b.displayName="GuildSettingsRolesNotice",M.displayName="GuildSettingsRolesMain"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(23)),i=n(3),l=n(106),u=n(88),s=I(n(8355)),d=I(n(40)),f=n(131),c=I(n(13)),p=n(48),v=I(n(8460)),y=n(8303),m=n(8529),_=I(n(9771)),h=I(n(9777)),E=I(n(9780)),g=I(n(9783)),S=n(1),O=I(n(7693));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(){return(b=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}).apply(this,arguments)}function M(e){var t=e.editRoleId,n=e.setEditRoleId,r=e.selectedSection,I=e.setSelectedSection,T=(0,i.useStateFromStores)([s.default],(function(){return s.default.guild}),[]);(0,o.default)(null!=T,"guildId cannot be null here");var M=(0,i.useStateFromStores)([s.default],(function(){return s.default.getRole(t)}),[t]);a.useEffect((function(){null==M&&n(null)}),[M,n]);var N,A=(0,i.useStateFromStores)([d.default],(function(){return d.default.getHighestRole(T)}),[T]),P=(0,i.useStateFromStores)([d.default],(function(){return!d.default.isRoleHigher(T,A,M)})),R=a.useRef(null);if(a.useEffect((function(){var e,n,a=(0,m.getSectionAnalyticsName)(r),o=null!==(e=null===(n=v.default.getRoleMemberCount(T.id))||void 0===n?void 0:n[t])&&void 0!==e?e:0;c.default.track(S.AnalyticEvents.ROLE_PAGE_VIEWED,b({tab_opened:a,is_everyone:T.id===t,role_id:t,role_mentionable:null==M?void 0:M.mentionable,role_hoist:null==M?void 0:M.hoist,role_permissions:null==M?void 0:M.permissions.toString(),role_num_members:o},(0,l.collectGuildAnalyticsMetadata)(T.id)))}),[r,T.id,null==M?void 0:M.id]),null==M)return null;switch(r){case y.GuildSettingsRoleEditSections.DISPLAY:N=C(_.default,{guild:T,role:M,locked:P,highestRole:A,setSelectedSection:I});break;case y.GuildSettingsRoleEditSections.PERMISSIONS:N=C(E.default,{guild:T,role:M,locked:P,setSelectedSection:I});break;case y.GuildSettingsRoleEditSections.MEMBERS:N=C(h.default,{guild:T,role:M,locked:P,setSelectedSection:I});break;default:(0,p.assertNever)(r)}return C(f.FormSection,{className:O.default.page},void 0,C(g.default,{guild:T,currentRoleId:t,setCurrentRoleId:n,setSelectedSection:I}),a.createElement("div",{className:O.default.contentContainer,ref:R},C(u.FocusRingScope,{containerRef:R},void 0,N)))}M.displayName="GuildSettingsRolesEdit"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NameFormItem=G,t.ColorPickerFormItem=F,t.RolePreview=B,t.SettingsFormItem=H,t.default=x;var r,a=D(n(0)),o=R(n(9)),i=R(n(8)),l=n(3),u=n(8459),s=n(277),d=n(297),f=R(n(1263)),c=R(n(8975)),p=R(n(89)),v=R(n(40)),y=R(n(8496)),m=R(n(278)),_=R(n(8267)),h=R(n(153)),E=n(131),g=n(468),S=n(259),O=n(8303),I=n(8530),T=R(n(8675)),C=D(n(8531)),b=n(9775),M=n(1),N=R(n(6)),A=R(n(7682)),P=R(n(7356));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var k=(0,s.makeLazy)({createPromise:function(){return Promise.all([n.e(0),n.e(9),n.e(15)]).then(n.t.bind(null,8421,7))},webpackId:8421}),U=i.default.debounce((function(e,t){return(0,u.updateRoleName)(e,t)}),200);function G(e){var t=e.role,n=e.disabled,r=a.useState(t.name),o=r[0],i=r[1];return a.useEffect((function(){i(t.name)}),[t.name]),j(E.FormItem,{title:N.default.Messages.FORM_LABEL_ROLE_NAME,required:!0},void 0,j(h.default,{type:"text",value:o,maxLength:I.ROLE_NAME_MAX_LENGTH,onChange:function(e){i(e),U(t.id,e)},disabled:n}))}function F(e){var t=e.role,n=e.disabled;return j(E.FormItem,{className:A.default.colorPicker,title:N.default.Messages.FORM_LABEL_ROLE_COLOR,required:!0},void 0,j(E.FormText,{className:A.default.colorDescription},void 0,N.default.Messages.ROLE_COLOR_HELP),j(k,{defaultColor:M.DEFAULT_ROLE_COLOR,colors:M.ROLE_COLORS,value:t.color,disabled:n,onChange:function(e){return function(e,t){e.color===t||t===M.DEFAULT_ROLE_COLOR&&0===e.color||(t===M.DEFAULT_ROLE_COLOR&&(t=0),(0,u.updateRoleColor)(e.id,t))}(t,e)},customPickerPosition:m.default.Positions.RIGHT},t.id))}function B(e){var t,r,o=e.role,i=(r=N.default.Messages.ROLE_SAMPLE_MESSAGE,a.useMemo((function(){var e=(0,d.createMessageRecord)(w({},(0,f.default)("1337",r),{state:M.MessageStates.SENT,id:"31337"}));return e.author=new p.default({id:"313337",username:N.default.Messages.WUMPUS,discriminator:"0000",bot:!1}),e.author.getAvatarURL=function(){return n(9776)},e}),[r])),l={nick:i.author.username,colorString:null!==(t=o.colorString)&&void 0!==t?t:void 0};return j(y.default,{},void 0,j("div",{className:A.default.previewContainer,"aria-hidden":!0},void 0,j("div",{className:(0,S.getThemeClass)(M.ThemeTypes.LIGHT)},void 0,j("div",{className:A.default.messageContainer},void 0,j(c.default,{author:l,message:i,isGroupStart:!0}))),j("div",{className:(0,S.getThemeClass)(M.ThemeTypes.DARK)},void 0,j("div",{className:A.default.messageContainer},void 0,j(c.default,{author:l,message:i,isGroupStart:!0})))))}function H(e){var t=e.role,n=e.disabled;return a.createElement(a.Fragment,null,j(_.default,{disabled:n,value:t.hoist,onChange:function(e){return(0,u.toggleRoleSettings)(t.id,e,t.mentionable)},hideBorder:!0},void 0,N.default.Messages.FORM_LABEL_HOIST_DESCRIPTION),j(E.FormDivider,{className:A.default.divider}),j(_.default,{disabled:n,value:t.mentionable,onChange:function(e){return(0,u.toggleRoleSettings)(t.id,t.hoist,e)},note:N.default.Messages.FORM_LABEL_MENTIONABLE_DESCRIPTION,hideBorder:!0},void 0,N.default.Messages.FORM_LABEL_MENTIONABLE.format()))}function x(e){var t,n=e.guild,r=e.role,i=e.locked,u=e.highestRole,s=e.setSelectedSection,d=(0,l.useStateFromStores)([v.default],(function(){return v.default.can(M.Permissions.ADMINISTRATOR,n)})),f=r.id===(null==n?void 0:n.id),c=r.id===(null==u?void 0:u.id),p=i||f,y=d&&(!i||c),m=(0,T.default)(0),_=m.headerHeight,h=m.headerRef,S=(0,C.useScrolledToTop)(),I=S.scrolledToTop,N=S.handleScroll;return j(g.AdvancedScrollerAuto,{className:A.default.scroller,style:{scrollPaddingTop:_},onScroll:N},void 0,j("div",{className:P.default.contentWidth},void 0,a.createElement("div",{className:(0,o.default)(P.default.header,P.default.stickyHeader,(t={},t[P.default.stickyHeaderElevated]=!I,t)),ref:h},j(C.default,{guild:n,role:r,selectedSection:O.GuildSettingsRoleEditSections.DISPLAY,setSelectedSection:s})),j(G,{role:r,disabled:p}),j(E.FormDivider,{className:A.default.divider}),j(F,{role:r,disabled:p}),j(B,{role:r}),j(E.FormDivider,{className:A.default.divider}),j(H,{role:r,disabled:p}),y?a.createElement(a.Fragment,null,j(E.FormDivider,{className:A.default.divider}),j(b.ViewAsRoleDescription,{guildId:n.id,role:r})):null))}G.displayName="NameFormItem",F.displayName="ColorPickerFormItem",B.displayName="RolePreview",x.displayName="GuildSettingsRolesEditDisplay"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.useStateFromStoresObject)([f.default],(function(){var n=f.default.getHighestRole(e);return{canViewAsRoles:f.default.can(v.Permissions.ADMINISTRATOR,e),locked:!f.default.isRoleHigher(e,n,t),highestRole:n}})),r=n.canViewAsRoles,m=n.locked,_=n.highestRole,E=r&&(!m||t.id===(null==_?void 0:_.id)),g=[];E&&g.push(h(u.MenuItem,{id:"view-as-role",label:y.default.Messages.VIEW_AS_ROLE,icon:c.default,action:function(){var n;(0,d.viewAsRoles)(e.id,((n={})[t.id]=t,n))}},"view-as-role"));var S=(0,l.default)(t.id);null!=S&&g.push(S);var O=t.managed,I=null!=t&&t.id===e.id;m||O||I||g.push(h(u.MenuGroup,{},"delete-role",h(u.MenuItem,{id:"delete-role",label:y.default.Messages.DELETE,color:s.MenuItemColor.DANGER,icon:p.default,action:function(){i.default.show({title:y.default.Messages.SETTINGS_ROLES_DELETE_TITLE,body:y.default.Messages.SETTINGS_ROLES_DELETE_BODY.format({name:name}),cancelText:y.default.Messages.CANCEL,onConfirm:function(){return o.default.deleteRole(e.id,t.id)}})}})));return g};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=m(n(199)),i=m(n(1354)),l=m(n(8258)),u=n(8253),s=n(8256),d=n(8532),f=m(n(40)),c=m(n(9773)),p=m(n(8676)),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(8354))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}function u(e){return a.createElement(o.default,l({},e,{direction:o.default.Directions.RIGHT}))}u.displayName="ArrowRight"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManagedRoleWarningText=y,t.default=function(e){var t=(0,o.useStateFromStores)([u.default],(function(){return u.default.getProps().integrations}));return a.useMemo((function(){return y(e,t)}),[e,t])};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(8254)),l=c(n(183)),u=c(n(8255)),s=c(n(8976)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){var n,r,a,o;if(!e.managed)return null;var u,c=null===(n=e.tags)||void 0===n?void 0:n.bot_id,p=null===(r=e.tags)||void 0===r?void 0:r.integration_id,y=void 0!==(null===(a=e.tags)||void 0===a?void 0:a.premium_subscriber);if(null!=c?u=null==t?void 0:t.find((function(e){var t,n=e.application;return(null==n||null===(t=n.bot)||void 0===t?void 0:t.id)===c})):null!=p&&(u=null==t?void 0:t.find((function(e){return e.id===p}))),null!=(null===(o=u)||void 0===o?void 0:o.name)){var m=u.name;[d.PlatformTypes.TWITCH,d.PlatformTypes.YOUTUBE].includes(u.type)&&(m=l.default.get(u.type).name+" - "+m);var _=function(){i.default.setSection(d.GuildSettingsSections.INTEGRATIONS)};return f.default.Messages.MANAGED_ROLE_INTEGRATION_LINKED_EXPLANATION.format({name:m,integrationNameHook:function(e,t){return v(s.default,{onClick:_},t,e)}})}return y?f.default.Messages.MANAGED_ROLE_PREMIUM_SUBSCRIBER_EXPLANATION:f.default.Messages.MANAGED_ROLE_EXPLAINATION}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewAsRoleDescription=function(e){var t=e.guildId,n=e.role;return a.createElement(a.Fragment,null,v(l.default,{title:d.default.Messages.VIEW_AS_ROLE,className:f.default.container},void 0,v(s.default,{},void 0,d.default.Messages.VIEW_AS_ROLE_DESCRIPTION),v(i.default,{className:f.default.button,innerClassName:f.default.buttonInner,size:i.default.Sizes.SMALL,color:i.default.Colors.GREY,onClick:function(){var e;return(0,o.viewAsRoles)(t,((e={})[n.id]=n,e))}},void 0,d.default.Messages.VIEW_AS_ROLE,v(u.default,{width:16,height:16,direction:u.default.Directions.RIGHT,className:f.default.arrowIcon}))))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8532),i=c(n(29)),l=c(n(476)),u=c(n(8354)),s=c(n(24)),d=c(n(6)),f=c(n(7681));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){e.exports=n.p+"82c30e69b6fdf3d4284f0b91d5694bd5.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemberList=ee,t.MemberSearcher=te,t.default=ne;var r,a=V(n(0)),o=H(n(9)),i=n(3),l=n(389),u=H(n(8254)),s=H(n(1279)),d=n(8298),f=H(n(9778)),c=H(n(8264)),p=H(n(8268)),v=H(n(8355)),y=H(n(12)),m=H(n(271)),_=H(n(29)),h=H(n(61)),E=V(n(8353)),g=H(n(278)),S=H(n(5942)),O=H(n(149)),I=H(n(686)),T=H(n(696)),C=H(n(466)),b=n(41),M=H(n(24)),N=n(1210),A=H(n(13)),P=H(n(8460)),R=n(8303),L=n(8529),D=H(n(8675)),w=H(n(8977)),j=V(n(8531)),k=H(n(9779)),U=n(1),G=H(n(6)),F=H(n(7685)),B=H(n(7356));function H(e){return e&&e.__esModule?e:{default:e}}function x(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return x=function(){return e},e}function V(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=x();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function W(){return(W=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}).apply(this,arguments)}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function z(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function K(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){z(o,r,a,i,l,"next",e)}function l(e){z(o,r,a,i,l,"throw",e)}i(void 0)}))}}function $(e,t,n){return Z.apply(this,arguments)}function Z(){return(Z=K(regeneratorRuntime.mark((function e(t,n,r){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.roles.filter((function(e){return e!==r})),e.prev=1,e.next=4,u.default.updateMemberRoles(n,t.id,o,[],[r]);case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(1),i=new s.default(e.t0),(0,b.openModal)((function(e){return a.createElement(C.default,W({},e,{header:G.default.Messages.ERROR_GENERIC_TITLE,confirmText:G.default.Messages.OKAY,confirmButtonColor:_.default.Colors.BRAND}),Y(M.default,{color:M.default.Colors.STANDARD,size:M.default.Sizes.SIZE_16},void 0,i.getAnyErrorMessage()))}));case 10:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}var q=Y(I.default,{width:16,height:16});function X(e){var t=e.member,n=e.guildId,r=e.roleId,i=e.locked,u=a.useMemo((function(){var e;return(e={})[n]=[t.id],e}),[n,t.id]);function s(e){e.stopPropagation(),i||(e.shiftKey?$(t,n,r):function(e,t,n){var r=v.default.getRole(n);(0,b.openModal)((function(o){return a.createElement(C.default,W({},o,{header:G.default.Messages.ROLE_REMOVE_MEMBER_CONFIRM_TITLE,confirmText:G.default.Messages.REMOVE,cancelText:G.default.Messages.CANCEL,onConfirm:function(){return $(e,t,n)}}),Y(M.default,{color:M.default.Colors.STANDARD,size:M.default.Sizes.SIZE_16},void 0,G.default.Messages.ROLE_REMOVE_MEMBER_CONFIRM_BODY.format({username:e.name,roleName:null==r?void 0:r.name})),Y(M.default,{className:F.default.removeTip,color:M.default.Colors.MUTED,size:M.default.Sizes.SIZE_16},void 0,G.default.Messages.ROLE_REMOVE_MEMBER_CONFIRM_TIP))}))}(t,n,r))}function m(e){var r=y.default.getUser(t.id);null!=r&&(0,l.openContextMenu)(e,(function(e){return a.createElement(f.default,W({},e,{user:r,guildId:n,showChatItems:!1}))}))}return(0,d.useSubscribeGuildMembers)(u),Y("div",{className:B.default.contentWidth},void 0,Y(g.default,{renderPopout:function(e){return a.createElement(p.default,W({guildId:n,userId:t.id},e))},position:g.default.Positions.LEFT,preload:function(){return(0,c.default)(t.id,t.avatarURL)}},void 0,(function(e){return a.createElement(h.default,W({},e,{className:F.default.memberRow,onContextMenu:m}),Y(k.default,{className:F.default.memberDetails,avatarURL:t.avatarURL,name:t.name,bot:t.bot,verifiedBot:t.verifiedBot,userTag:t.userTag}),Y("div",{className:F.default.removeButtonContainer},void 0,Y(O.default,{text:i?G.default.Messages.ROLE_REMOVE_MEMBER_MANAGED:G.default.Messages.ROLE_REMOVE_MEMBER_CONFIRM_TITLE,position:O.default.Positions.TOP},void 0,(function(e){var t;return a.createElement(h.default,W({},e,{className:(0,o.default)(F.default.removeButton,(t={},t[F.default.removeButtonDisabled]=i,t)),onClick:s}),q)}))))})))}X.displayName="MemberRow";var J=Y(T.default,{});function Q(e){var t=e.handleAddClick;return Y("div",{className:B.default.contentWidth},void 0,Y("div",{className:(0,o.default)(F.default.memberRow,F.default.emptyRowContainer)},void 0,J,Y(M.default,{className:F.default.emptyRowText,size:M.default.Sizes.SIZE_14,color:M.default.Colors.MUTED},void 0,G.default.Messages.ROLE_EDIT_MEMBERS_NO_SEARCH_RESULTS.format({addMembersHook:function(e,n){return Y(m.default,{onClick:t},n,e)}}))))}function ee(e){var t=e.guildId,n=e.roleId,r=e.query,o=e.headerHeight,i=e.locked,l=e.onScroll,u=e.roleMembers,s=e.handleAddClick,d=a.useMemo((function(){return r.trim().toLowerCase()}),[r]);(0,L.useQueryGuildMembers)(t,d);var f=a.useMemo((function(){return u.filter((function(e){return(0,L.filterFullMembersByQuery)(d,e)}))}),[u,d]),c=Y(Q,{handleAddClick:s},"empty");return Y(N.ListAuto,{className:F.default.list,sections:[Math.max(f.length,1)],sectionHeight:o,renderSection:function(){return Y("div",{style:{height:o}},"section")},style:{scrollPaddingTop:o},rowHeight:40,renderRow:function(e){var r=e.row;if(0===f.length)return c;var a=f[r];return Y(X,{member:a,guildId:t,roleId:n,locked:i},a.id)},onScroll:l})}function te(e){var t=e.query,n=e.setQuery,r=e.locked,a=e.handleAddClick;return Y("div",{className:F.default.searchContainer},void 0,Y(S.default,{size:S.default.Sizes.MEDIUM,query:t,onChange:n,onClear:function(){return n("")},placeholder:G.default.Messages.SEARCH_MEMBERS}),Y(_.default,{className:F.default.addButton,size:_.default.Sizes.SMALL,onClick:a,disabled:r},void 0,G.default.Messages.ROLE_ADD_MEMBERS_BUTTON))}function ne(e){var t,n=e.guild,r=e.role,l=e.locked,u=e.setSelectedSection,s=a.useState(""),d=s[0],f=s[1],c=(0,D.default)(0),p=c.headerHeight,v=c.headerRef,y=(0,j.useScrolledToTop)(),m=y.scrolledToTop,_=y.handleScroll,h=r.managed||l,g=(0,L.useGuildRoleMembers)(n.id,r.id),S=(0,i.useStateFromStores)([P.default],(function(){var e,t;return null!==(e=null===(t=P.default.getRoleMemberCount(n.id))||void 0===t?void 0:t[r.id])&&void 0!==e?e:0}))>g.length,O=function(){A.default.track(U.AnalyticEvents.OPEN_MODAL,{type:"Add Role Members",location_page:"Role Settings",location_section:"Members"}),(0,b.openModal)((function(e){return a.createElement(w.default,W({},e,{roleId:r.id,guildId:n.id}))}))};return Y("div",{className:F.default.container},void 0,a.createElement("div",{className:F.default.headerContainer,ref:v},Y("div",{className:B.default.contentWidth},void 0,Y("div",{className:(0,o.default)(B.default.header,(t={},t[B.default.stickyHeaderElevated]=!m,t))},void 0,Y(j.default,{guild:n,role:r,selectedSection:R.GuildSettingsRoleEditSections.MEMBERS,setSelectedSection:u}),Y(te,{query:d,setQuery:f,locked:h,handleAddClick:O}),S?Y(E.default,{className:F.default.searchWarning,messageType:E.HelpMessageTypes.INFO,fontSize:E.HelpMessageFontSizes.FONT_SIZE_14},void 0,G.default.Messages.ROLE_EDIT_MEMBERS_MISSING):null))),Y(ee,{headerHeight:p+8,query:d,guildId:n.id,roleId:r.id,locked:h,onScroll:_,roleMembers:g,handleAddClick:O}))}Q.displayName="MembersEmptyRow",ee.displayName="MemberList",te.displayName="MemberSearcher",ne.displayName="GuildSettingsRolesEditMembers"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;L(n(0));var r,a=n(389),o=P(n(8257)),i=n(286),l=P(n(8323)),u=P(n(8258)),s=P(n(8405)),d=L(n(8253)),f=n(717),c=P(n(8378)),p=P(n(8379)),v=P(n(8380)),y=P(n(8603)),m=P(n(8340)),_=P(n(8384)),h=P(n(8385)),E=P(n(8386)),g=P(n(8505)),S=P(n(8343)),O=P(n(8608)),I=P(n(8387)),T=P(n(8324)),C=P(n(8435)),b=P(n(8407)),M=P(n(8388)),N=n(1),A=P(n(6));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w(e){var t=e.user,n=e.guildId,r=e.showModalItems,P=void 0===r||r,R=e.showMediaItems,L=void 0!==R&&R,w=e.showChatItems,j=void 0===w||w,k=e.popoutPosition,U=void 0===k?f.PopoutPositions.RIGHT:k,G=e.target,F=e.analyticsContext,B=e.context,H=e.onSelect,x=(0,T.default)(t.id,n,B),V=(0,g.default)(t,n,B),W=(0,S.default)(t.id,B),Y=(0,M.default)(t.id),z=(0,h.default)(t,B),K=(0,v.default)({user:t,guildId:n,target:G,popoutPosition:U,context:B}),$=(0,p.default)(t),Z=(0,b.default)(t.id),q=(0,I.default)(t.id),X=(0,s.default)(n,t.id,{page:N.AnalyticsPages.GUILD_CHANNEL,section:N.AnalyticsSections.CHAT_USERNAME,object:N.AnalyticsObjects.CONTEXT_MENU_ITEM},B),J=(0,E.default)(t,n),Q=(0,l.default)(null,t),ee=(0,c.default)(t),te=(0,_.default)(t),ne=(0,y.default)(t,n),re=(0,C.default)(t.id,n),ae=(0,O.default)(t,n),oe=(0,u.default)(t.id),ie=(0,m.default)(i.ApplicationCommandTarget.USER,void 0,n);return D(o.default,{context:F,object:N.AnalyticsObjects.CONTEXT_MENU},void 0,D(d.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":A.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:H},void 0,D(d.MenuGroup,{},void 0,P&&x,j&&V,W,z,P&&K,P&&$,Y),L&&D(d.MenuGroup,{},void 0,Z),D(d.MenuGroup,{},void 0,P&&Q),D(d.MenuGroup,{},void 0,L&&q,P&&X,ie,P&&J,ee,P&&te),D(d.MenuGroup,{},void 0,ne),D(d.MenuGroup,{},void 0,re,ae),D(d.MenuGroup,{},void 0,oe)))}w.displayName="GuildUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(1288)),i=f(n(160)),l=f(n(1222)),u=f(n(279)),s=f(n(24)),d=f(n(7684));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.className,n=e.avatarURL,r=e.name,f=e.bot,c=e.verifiedBot,v=e.userTag,y=(0,o.default)([i.default],(function(){return i.default.hidePersonalInformation}));return p("div",{className:(0,a.default)(d.default.container,t)},void 0,p(u.default,{className:d.default.avatar,src:n,size:u.default.Sizes.SIZE_24,"aria-label":r}),p("div",{className:d.default.textContainer},void 0,p(s.default,{tag:"span",className:d.default.name,color:s.default.Colors.HEADER_PRIMARY,size:s.default.Sizes.SIZE_14},void 0,r),f?p(l.default,{className:d.default.botTag,verified:c}):null,y?null:p(s.default,{tag:"span",color:s.default.Colors.INTERACTIVE_NORMAL,className:d.default.userTag,size:s.default.Sizes.SIZE_14},void 0,v)))}v.displayName="MemberDetails"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClearPermissionsButton=D,t.PermissionsList=w,t.default=j;var r,a=P(n(0)),o=N(n(9)),i=N(n(63)),l=n(3),u=n(8459),s=N(n(9171)),d=N(n(40)),f=N(n(12)),c=N(n(29)),p=N(n(5942)),v=N(n(149)),y=N(n(24)),m=n(468),_=N(n(13)),h=N(n(9172)),E=N(n(78)),g=n(8303),S=N(n(8970)),O=N(n(8675)),I=P(n(8531)),T=n(1),C=N(n(6)),b=N(n(7688)),M=N(n(7356));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function L(){return(L=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}).apply(this,arguments)}function D(e){var t=e.guild,n=e.role,r=e.locked,o=(0,l.useStateFromStores)([f.default],(function(){return f.default.getCurrentUser()})),s=a.useMemo((function(){return E.default.computePermissions(o,t)}),[o,t]),d=a.useMemo((function(){var e;return(e={})[n.id]=L({},n,{permissions:E.default.NONE}),e}),[n]),p=a.useMemo((function(){return E.default.computePermissions(o,t,null,d)}),[o,t,d]),y=!i.default.equals(s,p);return R("div",{className:b.default.clearButtonWrapper},void 0,R(v.default,{text:y?C.default.Messages.HELP_CLEAR_PERMISSIONS:null,position:v.default.Positions.TOP,color:v.default.Colors.RED},void 0,(function(e){var t=e.onMouseEnter,a=e.onMouseLeave;return R(c.default,{className:b.default.clearButton,size:c.default.Sizes.TINY,look:c.default.Looks.LINK,color:c.default.Colors.LINK,onClick:function(){return(0,u.clearRolePermissions)(n.id)},onMouseEnter:t,onMouseLeave:a,disabled:i.default.equals(n.permissions,E.default.NONE)||y||r},void 0,C.default.Messages.ROLE_PERMISSIONS_CLEAR_PERMISSIONS)})))}function w(e){var t=e.guild,n=e.role,r=e.specs,a=e.locked;if(0===r.length)return R("div",{className:b.default.noResultsContainer},void 0,R(S.default,{className:b.default.noResults}),R(y.default,{},void 0,C.default.Messages.ROLE_PERMISSIONS_EMPTY_TEXT));function o(e){var r;return d.default.can(e,t)?!d.default.can(e,t,null,(r={},r[n.id]=L({},n,{permissions:i.default.remove(n.permissions,e)}),r))&&C.default.Messages.HELP_SINGULAR_PERMISSION:C.default.Messages.HELP_MISSING_PERMISSION}return R("div",{className:b.default.permissionsWrapper},void 0,R(D,{guild:t,role:n,locked:a}),r.map((function(e,t){return R(s.default,{className:b.default.permissionsForm,spec:e,permissions:n.permissions,locked:a,onChange:function(e,t){return(0,u.updateRolePermissions)(n.id,e,t)},permissionRender:o},t)})))}function j(e){var t,n=e.guild,r=e.role,i=e.locked,l=e.setSelectedSection,u=a.useState(""),s=u[0],d=u[1],f=a.useMemo((function(){return h.default.generateGuildPermissionSpec(n)}),[n]).map((function(e){return L({},e,{permissions:e.permissions.filter((function(e){return e.title.toLowerCase().includes(s.trimStart().toLowerCase())}))})})).filter((function(e){return e.permissions.length>0})),c=(0,O.default)(0),v=c.headerHeight,y=c.headerRef,E=(0,I.useScrolledToTop)(),S=E.scrolledToTop,N=E.handleScroll,A=a.useRef(!1);return a.useEffect((function(){A.current||""===s.trimStart()||(_.default.track(T.AnalyticEvents.SEARCH_STARTED,{search_type:"Permissions"}),A.current=!0)}),[s]),R(m.AdvancedScrollerAuto,{className:b.default.scroller,style:{scrollPaddingTop:v},onScroll:N},void 0,R("div",{className:M.default.contentWidth},void 0,a.createElement("div",{className:(0,o.default)(M.default.header,M.default.stickyHeader,(t={},t[M.default.stickyHeaderElevated]=!S,t)),ref:y},R(I.default,{guild:n,role:r,selectedSection:g.GuildSettingsRoleEditSections.PERMISSIONS,setSelectedSection:l}),R("div",{className:b.default.searchContainer},void 0,R(p.default,{size:p.default.Sizes.MEDIUM,query:s,onChange:d,onClear:function(){return d("")},placeholder:C.default.Messages.ROLE_PERMISSIONS_SEARCH_PLACEHOLDER}))),R(w,{guild:n,role:r,specs:f,locked:i})))}D.displayName="ClearPermissionsButton",w.displayName="PermissionsList",j.displayName="GuildSettingsRolesEditPermissions"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_,t.PermissionOverrideTypes=void 0;p(n(0));var r,a=f(n(55)),o=f(n(9782)),i=n(85),l=f(n(1165)),u=p(n(474)),s=p(n(159)),d=f(n(370));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=o.default.Types;t.PermissionOverrideTypes=y;var m=v(l.default,{});function _(e){var t=e.value,n=e.onChange,r=e.children,l=e.note,f=e.style,c=e.disabled,p=void 0!==c&&c,y=e.hideBorder,_=void 0!==y&&y,h=e.className,E=void 0===h?d.default.marginBottom20:h,g=(0,i.useUID)();return v(a.default,{style:f,className:E,direction:a.default.Direction.VERTICAL},void 0,v(a.default,{},void 0,v(a.default.Child,{},void 0,v(s.default,{id:g,className:d.default.marginReset,tag:s.Tags.H3,disabled:p},void 0,r)),v(a.default.Child,{grow:0,shrink:0},void 0,v(o.default,{value:t,onChange:n,disabled:p,labelledBy:g}))),l&&v(a.default.Child,{className:d.default.marginTop4},void 0,v(u.default,{type:u.Types.DESCRIPTION},void 0,l)),!_&&v(a.default.Child,{className:d.default.marginTop20},void 0,m))}_.displayName="PermissionOverrideItem",_.Types=o.default.Types},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PermissionOverrideType=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=v(n(9)),l=v(n(61)),u=n(1162),s=v(n(372)),d=v(n(255)),f=v(n(8848)),c=v(n(6)),p=v(n(7686));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}t.PermissionOverrideType=a,function(e){e.DENY="DENY",e.PASSTHROUGH="PASSTHROUGH",e.ALLOW="ALLOW"}(a||(t.PermissionOverrideType=a={}));var h=Object.keys(a);function E(e){var t,n=e.value,r=void 0===n?a.PASSTHROUGH:n,l=e.onChange,s=e.labelledBy,d=e.disabled,f=void 0!==d&&d,c=(0,u.useRadioGroup)({orientation:"horizontal",isDisabled:f,labelledBy:s});return o.createElement("div",m({className:(0,i.default)(p.default.group,(t={},t[p.default.disabled]=f,t))},c),h.map((function(e){return _(g,{type:e,isSelected:r===e,onSelect:function(e){r===e||f||l(e)}},e)})))}function g(e){var t,n,r,v,y=e.type,h=e.onSelect,E=e.isSelected;switch(y){case a.DENY:v=c.default.Messages.PERMISSION_OVERRIDE_DENY,n=d.default,r=p.default.deny;break;case a.ALLOW:v=c.default.Messages.PERMISSION_OVERRIDE_ALLOW,n=s.default,r=p.default.allow;break;case a.PASSTHROUGH:default:v=c.default.Messages.PERMISSION_OVERRIDE_PASSTHROUGH,n=f.default,r=p.default.passthrough}var g=(0,u.useRadioItem)({isSelected:E,label:v});return o.createElement(l.default,m({className:(0,i.default)(p.default.item,r,(t={},t[p.default.selected]=E,t)),onClick:function(){return h(y)}},g),_(n,{width:16,height:16}))}E.displayName="PermissionOverride",E.Types=a,g.displayName="PermissionOverrideOption";var S=E;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=F;var r,a=D(n(0)),o=R(n(9)),i=n(5941),l=n(202),u=n(3),s=n(389),d=R(n(199)),f=R(n(8527)),c=R(n(8576)),p=R(n(8355)),v=R(n(40)),y=R(n(61)),m=R(n(9173)),_=R(n(8293)),h=n(149),E=R(n(8354)),g=R(n(5951)),S=R(n(24)),O=R(n(468)),I=n(8303),T=D(n(8979)),C=R(n(8677)),b=R(n(8980)),M=n(8531),N=n(1),A=R(n(6)),P=R(n(7692));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(){return(j=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}).apply(this,arguments)}function k(e){return e?S.default.Colors.HEADER_PRIMARY:S.default.Colors.INTERACTIVE_ACTIVE}function U(e){var t,n,r=e.guild,u=e.role,d=e.highestRole,f=e.selectedItem,p=e.onClick,v=e.currentPosition,y=e.onDragStart,m=e.onDragReset,h=e.onDragComplete,E=(0,T.useLockTooltip)(r,d,u),g=(null==r?void 0:r.id)===u.id,O=null==E&&!g,I=(0,i.useDrag)({item:{type:"DRAGGABLE_ROLE",id:u.id,position:v},canDrag:function(){return O},begin:function(){y(u.id)},end:function(e,t){var n=t.getDropResult();null!=n?h(n.roleId):m()}})[1],C=(0,i.useDrop)({accept:"DRAGGABLE_ROLE",canDrop:function(){return O},collect:function(e){var t=e.getItem();return null==t?{dragSourcePosition:null}:e.isOver()&&e.canDrop()?{dragSourcePosition:t.position}:{dragSourcePosition:null}},drop:function(){return{roleId:u.id}}}),b=C[0].dragSourcePosition,M=C[1];return w(_.default.Item,{className:(0,o.default)(P.default.row,(t={},t[P.default.dragBefore]=null!==b&&v<b,t[P.default.dragAfter]=null!==b&&v>b,t)),id:u.id,selectedItem:f,itemType:_.default.Types.SIDE,onClick:p,onContextMenu:function(e){(0,s.openContextMenu)(e,(function(e){return a.createElement(c.default,j({},e,{role:u,guild:r}))}))},"aria-label":u.name,clickableRef:function(e){var t,n;I(null!==(t=null==e?void 0:e.ref)&&void 0!==t?t:null),M(null!==(n=null==e?void 0:e.ref)&&void 0!==n?n:null)}},void 0,w("div",{className:P.default.roleDot,style:{backgroundColor:null!==(n=u.colorString)&&void 0!==n?n:(0,l.int2hex)(N.DEFAULT_ROLE_COLOR)}}),null!=E?w(T.default,{className:P.default.lock,tooltipText:E}):null,w(S.default,{className:P.default.roleName,color:k(g)},void 0,u.name))}U.displayName="RoleRow";var G=w(g.default,{width:20,height:20});function F(e){var t,n=e.guild,r=e.currentRoleId,i=e.setCurrentRoleId,l=e.setSelectedSection,s=(0,u.useStateFromStores)([p.default],(function(){return p.default.roles})),c=(0,u.useStateFromStores)([v.default],(function(){return v.default.getHighestRole(n)})),g=f.default.useExperiment({guildId:n.id})[0].showNewRolesCreationFlow,T=a.useState(s.length),N=T[0],R=T[1],L=(0,M.useScrolledToTop)(),D=L.scrolledToTop,j=L.handleScroll,k=(0,b.default)(s),F=k.handleDragStart,B=k.handleDragReset,H=k.handleDragComplete,x=a.useRef(null),V=a.useCallback((function(e){var t,n,r=s.findIndex((function(t){return t.id===e}));null===(t=x.current)||void 0===t||null===(n=t.getScrollerNode())||void 0===n||n.scrollTo({top:Math.max(34*(r-2),0)})}),[s]);a.useEffect((function(){V(r)}),[]),a.useEffect((function(){s.length>N&&V(r),s.length!==N&&R(s.length)}),[s.length,N,R,V,r]);var W=g?w("div",{className:P.default.tooltip},void 0,w(S.default,{},void 0,A.default.Messages.ROLE_CREATE_CTA),w(S.default,{color:S.default.Colors.MUTED},void 0,A.default.Messages.ROLE_CREATE_TOOLTIP_TIP)):A.default.Messages.GUILD_SETTINGS_ACTION_FILTER_ROLE_CREATE;return w(m.default.Sidebar,{className:P.default.sidebar},void 0,w("div",{className:P.default.container},void 0,w("div",{className:(0,o.default)(P.default.titleContainer,(t={},t[P.default.titleElevated]=!D,t))},void 0,w(y.default,{className:P.default.title,onClick:function(){return i(null)}},void 0,w(E.default,{direction:E.default.Directions.LEFT}),w(S.default,{className:P.default.titleText,size:S.default.Sizes.SIZE_16,color:S.default.Colors.CUSTOM},void 0,A.default.Messages.BACK)),w(h.TooltipContainer,{position:g?h.TooltipPositions.RIGHT:h.TooltipPositions.TOP,"aria-label":g?A.default.Messages.ROLE_CREATE_TOOLTIP_TIP:A.default.Messages.GUILD_SETTINGS_ACTION_FILTER_ROLE_CREATE,text:w(S.default,{className:P.default.tooltip},void 0,W)},void 0,w(y.default,{className:P.default.addRole,onClick:function(e){return(0,C.default)(e,n,(function(){d.default.createRole(n.id),l(I.GuildSettingsRoleEditSections.DISPLAY)}))}},void 0,G))),a.createElement(O.default,{className:P.default.list,ref:x,onScroll:j},w(_.default,{selectedItem:r,onItemSelect:function(e){return i(e)},orientation:"vertical"},void 0,s.map((function(e,t){return w(U,{guild:n,role:e,highestRole:c,selectedItem:r,onClick:function(){return i(e.id)},currentPosition:t,onDragStart:F,onDragReset:B,onDragComplete:H},e.id)}))))))}F.displayName="GuildSettingsRolesSidebar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S,t.CreateRoleSlideTypes=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(95),l=n(3),u=_(n(40)),s=n(703),d=n(85),f=n(35),c=n(8530),p=_(n(9785)),v=_(n(9786)),y=_(n(9787)),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}t.CreateRoleSlideTypes=a,function(e){e.DISPLAY="display",e.PERMISSIONS="permissions",e.ADD_MEMBERS="add-members"}(a||(t.CreateRoleSlideTypes=a={}));var g=[a.DISPLAY,a.PERMISSIONS,a.ADD_MEMBERS];function S(e){var t=e.guild,n=e.transitionState,r=e.initialSlide,_=void 0===r?a.DISPLAY:r,h=e.onClose,S=(0,d.useUID)(),O=(0,l.useStateFromStores)([u.default],(function(){return u.default.can(m.Permissions.ADMINISTRATOR,t)})),I=o.useState(_),T=I[0],C=I[1],b=o.useState(null),M=b[0],N=b[1],A=o.useState(_),P=A[0],R=A[1],L=o.useState(c.DEFAULT_TEMPLATE_TYPE),D=L[0],w=L[1];o.useEffect((function(){C(_)}),[C,_]);var j=o.useCallback((function(){var e=g.indexOf(T);e>0&&C(g[e-1])}),[T]),k=o.useCallback((function(){var e=g.indexOf(T);e<g.length-1&&C(g[e+1])}),[T]),U=o.useCallback((function(e){O||h(),N(e)}),[N,O,h]),G={impression_group:i.ImpressionGroups.ROLE_ADD_FLOW};return E(f.ModalRoot,{transitionState:n,"aria-labelledby":S},void 0,E(s.Slides,{activeSlide:T,width:c.CREATE_ROLE_DESKTOP_MODAL_WIDTH,onSlideReady:function(e){return R(e)}},void 0,E(s.Slide,{id:a.DISPLAY,impressionName:i.ImpressionNames.ROLE_CREATE_DISPLAY,impressionMetadata:G},void 0,E(p.default,{guildId:t.id,roleId:M,onClose:h,onRoleCreated:U,onNext:k})),E(s.Slide,{id:a.PERMISSIONS,impressionName:i.ImpressionNames.ROLE_CREATE_PERMISSIONS,impressionMetadata:G},void 0,E(y.default,{guildId:t.id,roleId:M,selectedTemplate:D,setSelectedTemplate:w,onClose:h,onBack:j,onNext:k})),E(s.Slide,{id:a.ADD_MEMBERS,impressionName:i.ImpressionNames.ROLE_CREATE_ADD_MEMBERS,impressionMetadata:G},void 0,E(v.default,{guildId:t.id,roleId:M,onClose:h,onBack:j,isReady:P===a.ADD_MEMBERS}))))}S.displayName="CreateRoleModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPickerFormItem=P,t.default=function(e){var t,n,r=e.guildId,l=e.onClose,f=e.onRoleCreated,c=e.roleId,v=e.onNext,y=(0,p.useUID)(),E=(0,o.useStateFromStores)([u.default],(function(){return null!=c?u.default.getRole(c):null})),g=a.useState(null!==(t=null==E?void 0:E.name)&&void 0!==t?t:S.default.Messages.NEW_ROLE),O=g[0],T=g[1],C=a.useState(null!==(n=null==E?void 0:E.color)&&void 0!==n?n:0),A=C[0],R=C[1],L=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=c){e.next=7;break}return e.next=3,i.default.createRoleWithNameColor(r,O,A);case 3:t=e.sent,f(t.id),e.next=9;break;case 7:return e.next=9,i.default.updateRoleDisplay(r,c,O,A);case 9:v();case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){b(o,r,a,i,l,"next",e)}function l(e){b(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return a.createElement(a.Fragment,null,M(m.ModalHeader,{direction:d.default.Direction.VERTICAL,className:I.default.header,separator:!1,id:y},void 0,M(_.default,{className:I.default.title,size:_.default.Sizes.SIZE_24},void 0,null!=c?S.default.Messages.ROLE_UPDATE_CTA:S.default.Messages.ROLE_CREATE_DISPLAY_TITLE),M(h.default,{color:h.default.Colors.STANDARD,size:h.default.Sizes.SIZE_16},void 0,S.default.Messages.ROLE_CREATE_DISPLAY_SUBTITLE),l&&M(m.ModalCloseButton,{className:I.default.closeButton,onClick:l})),M(m.ModalContent,{className:I.default.content},void 0,M(N,{name:O,setName:T}),M(P,{color:A,setColor:R})),M(m.ModalFooter,{className:I.default.footer},void 0,M(s.default,{className:I.default.footerButton,disabled:""===O,onClick:L},void 0,null!=c?S.default.Messages.ROLE_UPDATE_CTA:S.default.Messages.ROLE_CREATE_CTA)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=T(n(199)),l=n(277),u=T(n(8355)),s=T(n(29)),d=T(n(55)),f=T(n(278)),c=T(n(153)),p=n(85),v=n(131),y=T(n(686)),m=n(35),_=T(n(47)),h=T(n(24)),E=n(8530),g=n(1),S=T(n(6)),O=T(n(7690)),I=T(n(7383));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e){var t=e.name,n=e.setName;return M(v.FormItem,{className:I.default.formItem,title:S.default.Messages.FORM_LABEL_ROLE_NAME,required:!0},void 0,M("div",{className:O.default.inputWithClearWrapper},void 0,M(c.default,{type:"text",value:t,maxLength:E.ROLE_NAME_MAX_LENGTH,onChange:function(e){n(e)}}),t.length>0?M(s.default,{className:O.default.clearButton,onClick:function(){n("")},look:s.default.Looks.BLANK,size:s.default.Sizes.NONE},void 0,M(y.default,{className:O.default.clearIcon})):null),M(v.FormText,{className:I.default.formHelpText},void 0,S.default.Messages.ROLE_CREATE_NAME_EXAMPLES))}N.displayName="NameFormItem";var A=(0,l.makeLazy)({createPromise:function(){return Promise.all([n.e(0),n.e(9),n.e(15)]).then(n.t.bind(null,8421,7))},webpackId:8421});function P(e){var t=e.color,n=e.setColor;return M(v.FormItem,{className:I.default.formItem,title:S.default.Messages.FORM_LABEL_ROLE_COLOR,required:!0},void 0,M(v.FormText,{className:I.default.formHelpText},void 0,S.default.Messages.ROLE_COLOR_HELP),M(A,{className:I.default.colorPicker,defaultColor:g.DEFAULT_ROLE_COLOR,colors:g.ROLE_COLORS,value:t,onChange:function(e){return function(e){n(e===g.DEFAULT_ROLE_COLOR?0:e)}(e)},customPickerPosition:f.default.Positions.RIGHT}))}P.displayName="ColorPickerFormItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(85),o=n(8977);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e){var t=e.onClose,n=e.guildId,r=e.roleId,i=e.onBack,u=e.isReady,s=(0,a.useUID)();return null==r?null:l(o.AddRoleMembersModalContent,{headerId:s,onClose:t,guildId:n,roleId:r,onBack:i,isCreateRoleFlow:!0,focusSearchAfterReady:!0,isReady:u})}u.displayName="CreateRoleMembersSlide"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.onClose,n=e.guildId,r=e.roleId,o=e.selectedTemplate,i=e.setSelectedTemplate,d=e.onBack,c=e.onNext,v=(0,p.useUID)(),E=a.useState(o),I=E[0],T=E[1];return a.createElement(a.Fragment,null,b(y.ModalHeader,{direction:f.default.Direction.VERTICAL,className:S.default.header,separator:!1,id:v},void 0,b(m.default,{className:O.default.title,size:_.default.Sizes.SIZE_24},void 0,g.default.Messages.ROLE_CREATE_PERMISSIONS_TITLE),b(_.default,{color:_.default.Colors.STANDARD,size:_.default.Sizes.SIZE_16},void 0,g.default.Messages.ROLE_CREATE_PERMISSIONS_SUBTITLE),t&&b(y.ModalCloseButton,{className:O.default.closeButton,onClick:t})),b(y.ModalContent,{className:S.default.content},void 0,b(N,{selectedTemplate:o,setSelectedTemplate:i,sliderOverrideValue:I}),b(s.CarouselWithPreview,{width:h.CREATE_ROLE_DESKTOP_MODAL_WIDTH,currentIndex:o,renderItem:function(e,t,a){return b(A,{template:e,index:t,animation:a,selectedTemplate:o,setSelectedTemplate:i,setSliderOverrideValue:T,onTemplateSelect:function(){return t=e,void(null!=r&&(l.default.updateRolePermissions(n,r,t.permissions),c()));var t}})},items:Object.values(h.PermissionTemplates),itemSize:M,edgeItems:0})),b(y.ModalFooter,{className:O.default.footer},void 0,b(u.default,{color:u.default.Colors.GREY,className:O.default.footerButton,onClick:function(){i(h.DEFAULT_TEMPLATE_TYPE),c()}},void 0,g.default.Messages.ROLE_CREATION_SKIP),b(u.default,{onClick:d,look:u.default.Looks.LINK,color:u.default.Colors.PRIMARY,size:u.default.Sizes.TINY,className:O.default.backButton},void 0,g.default.Messages.BACK)))};var r,a=C(n(0)),o=I(n(9)),i=I(n(273)),l=I(n(199)),u=I(n(29)),s=n(8655),d=I(n(61)),f=I(n(55)),c=C(n(8360)),p=n(85),v=I(n(372)),y=n(35),m=I(n(47)),_=I(n(24)),h=n(8530),E=n(1),g=I(n(6)),S=I(n(7691)),O=I(n(7383));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M={width:248,height:336,margin:16},N=function(e){var t=e.selectedTemplate,n=e.setSelectedTemplate,r=e.sliderOverrideValue;return b(c.default,{className:S.default.slider,markers:[h.PermissionTemplateTypes.COSMETIC,h.PermissionTemplateTypes.MEMBER,h.PermissionTemplateTypes.MODERATOR,h.PermissionTemplateTypes.MANAGER],initialValue:r,asValueChanges:n,stickToMarkers:!0,equidistant:!0,renderMarker:function(e){var n;return b("div",{className:S.default.markWrapper},void 0,b("div",{className:(0,o.default)(S.default.markDot,(n={},n[S.default.hiddenMark]=t>=e,n))}),b(_.default,{size:_.default.Sizes.SIZE_12,color:_.default.Colors.HEADER_PRIMARY,className:S.default.markLabel},void 0,h.PermissionTemplates[e].title()))},markerPosition:c.MarkerPositions.BELOW,fillStyles:{background:h.PermissionTemplates[t].color},barClassName:S.default.sliderBar,grabberClassName:S.default.grabber,grabberStyles:{background:h.PermissionTemplates[t].color}})};N.displayName="RoleTemplateSelectSlider";var A=function(e){var t,n=e.template,r=e.index,a=e.animation,l=e.selectedTemplate,s=e.setSelectedTemplate,f=e.onTemplateSelect,c=e.setSliderOverrideValue;return b(i.default.div,{style:null!=a?{opacity:a.interpolate({inputRange:[0,1],outputRange:[.3,1]})}:null},void 0,b(d.default,{onClick:function(){l!==r&&(s(r),c(r))},className:(0,o.default)(S.default.templateWrapper,(t={},t[S.default.clickableTemplate]=l!==r,t))},void 0,b("div",{className:S.default.templateContent},void 0,b(_.default,{className:S.default.templateHeader,size:_.default.Sizes.SIZE_16,color:_.default.Colors.HEADER_PRIMARY},void 0,n.title()),b(_.default,{size:_.default.Sizes.SIZE_14,className:S.default.templateDescription},void 0,n.description()),n.contentPreface()&&b(_.default,{size:_.default.Sizes.SIZE_14,className:S.default.templatePreface},void 0,n.contentPreface()),n.contents().map((function(e,t){return b("div",{className:S.default.permissionItem},"permission-"+r+"-"+t,b(v.default,{color:E.Colors.STATUS_GREEN_600,className:S.default.permissionIcon}),b(_.default,{size:_.default.Sizes.SIZE_14},void 0,e))}))),b(u.default,{disabled:l!==r,onClick:f},void 0,g.default.Messages.SELECT)))};A.displayName="RoleTemplateCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(9)),i=n(3),l=S(n(199)),u=n(8305),s=S(n(105)),d=S(n(29)),f=n(131),c=n(159),p=S(n(279)),v=S(n(47)),y=S(n(24)),m=S(n(8981)),_=S(n(8677)),h=n(1),E=S(n(6)),g=S(n(7695));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){I(o,r,a,i,l,"next",e)}function l(e){I(o,r,a,i,l,"throw",e)}i(void 0)}))}}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e){var t=e.color,n=e.children,r={backgroundColor:t};return C("div",{className:g.default.roleTag},void 0,C("span",{className:g.default.roleDot,style:r}),C("span",{className:g.default.roleText},void 0,n))}function M(e){var t,n=e.guild,r=e.display;return C("div",{className:(0,o.default)(g.default.banner,n.backgroundClass,(t={},t[g.default.bannerOut]=!r,t))},void 0,C("div",{className:g.default.roles},void 0,n.roles.map((function(e,t){return C("div",{className:g.default.rolesRow},t,e.map((function(e){return C(b,{color:e.color},e.name,e.name)})))}))),C("div",{className:g.default.profileCard},void 0,C("div",{className:g.default.avatarContainer},void 0,C(p.default,{className:g.default.avatar,size:p.default.Sizes.SIZE_80,"aria-hidden":!0,status:h.StatusTypes.ONLINE,src:n.avatar}),C(y.default,{color:y.default.Colors.HEADER_PRIMARY,size:y.default.Sizes.SIZE_16,className:g.default.avatarName},void 0,n.username))))}b.displayName="RoleTag",M.displayName="ExampleGuild";function N(){var e=(0,i.useStateFromStores)([s.default],(function(){return s.default.useReducedMotion})),t=a.useMemo((function(){return[{backgroundClass:g.default.bannerClubs,username:"Wumpus#0000",avatar:n(9789),roles:[[{name:E.default.Messages.ROLE_EMPTY_STATE_CLUBS_ROLE_1,color:"#7e00fc"},{name:E.default.Messages.ROLE_EMPTY_STATE_CLUBS_ROLE_2,color:"#faa61a"},{name:E.default.Messages.ROLE_EMPTY_STATE_CLUBS_ROLE_3,color:"#f06ea8"}],[{name:E.default.Messages.ROLE_EMPTY_STATE_CLUBS_ROLE_4,color:"#45ddc0"},{name:E.default.Messages.ROLE_EMPTY_STATE_CLUBS_ROLE_5,color:"#00b0f4"},{name:E.default.Messages.ROLE_EMPTY_STATE_CLUBS_ROLE_6,color:"#ba1616"}]]},{backgroundClass:g.default.bannerGaming,username:"Graggle#0000",avatar:n(9790),roles:[[{name:E.default.Messages.ROLE_EMPTY_STATE_GAMING_ROLE_1,color:"#4a76e6"},{name:E.default.Messages.ROLE_EMPTY_STATE_GAMING_ROLE_2,color:"#ad87ff"},{name:E.default.Messages.ROLE_EMPTY_STATE_GAMING_ROLE_3,color:"#6defcf"}],[{name:E.default.Messages.ROLE_EMPTY_STATE_GAMING_ROLE_4,color:"#ff73fa"},{name:E.default.Messages.ROLE_EMPTY_STATE_GAMING_ROLE_5,color:"#3ba55c"},{name:E.default.Messages.ROLE_EMPTY_STATE_GAMING_ROLE_6,color:"#ff1b66"}]]},{backgroundClass:g.default.bannerHobbies,username:"Mallow#0000",avatar:n(9791),roles:[[{name:E.default.Messages.ROLE_EMPTY_STATE_HOBBIES_ROLE_1,color:"#20d6b8"},{name:E.default.Messages.ROLE_EMPTY_STATE_HOBBIES_ROLE_2,color:"#236136"},{name:E.default.Messages.ROLE_EMPTY_STATE_HOBBIES_ROLE_3,color:"#ff9a15"}],[{name:E.default.Messages.ROLE_EMPTY_STATE_HOBBIES_ROLE_4,color:"#ff78b9"},{name:E.default.Messages.ROLE_EMPTY_STATE_HOBBIES_ROLE_5,color:"#00b0f4"},{name:E.default.Messages.ROLE_EMPTY_STATE_HOBBIES_ROLE_6,color:"#6f52e4"}]]}]}),[]),r=a.useState(0),o=r[0],l=r[1];return a.useEffect((function(){if(!e){var n=setTimeout((function(){return l((o+1)%t.length)}),6332);return function(){return clearTimeout(n)}}}),[o]),C("div",{className:g.default.bannerContainer,"aria-hidden":!0},void 0,t.map((function(e,t){return C(M,{guild:e,display:t===o},t)})))}N.displayName="ExampleRolesBanner";var A=C(N,{});function P(e){var t=e.guild,n=e.everyoneRole,r=e.setEditRoleId,o=a.useState(!1),i=o[0],s=o[1],p=a.useCallback((function(){r(n.id)}),[r,n.id]);return C(u.DefaultCustomContentScroller,{},void 0,C(f.FormSection,{className:g.default.section,title:E.default.Messages.ROLES,tag:c.Tags.H2},void 0,C("div",{className:g.default.container},void 0,A,C(v.default,{size:v.default.Sizes.SIZE_24},void 0,E.default.Messages.ROLE_OVERVIEW_EMPTY_SUBHEADER),C(y.default,{color:y.default.Colors.HEADER_SECONDARY,size:y.default.Sizes.SIZE_16,className:g.default.introBody},void 0,E.default.Messages.ROLE_OVERVIEW_DESCRIPTION),C(d.default,{className:g.default.button,size:d.default.Sizes.MEDIUM,onClick:function(e){return(0,_.default)(e,t,T(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.next=3,l.default.createRole(t.id);case 3:s(!1);case 4:case"end":return e.stop()}}),e)}))))},submitting:i},void 0,E.default.Messages.ROLE_CREATE_CTA)),C(f.FormDivider,{className:g.default.divider}),C(m.default,{role:n,onClick:p})))}P.displayName="GuildSettingsRolesIntro"},function(e,t,n){e.exports=n.p+"3a55d3972a7d68bcb306af32ab1b226a.svg"},function(e,t,n){e.exports=n.p+"f17da3efc8cf47226d362fee2f5f7197.svg"},function(e,t,n){e.exports=n.p+"642982d3d82323a8fb69860f116ebca7.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=ie;var r,a=W(n(0)),o=x(n(9)),i=n(5941),l=n(202),u=n(3),s=n(389),d=x(n(199)),f=n(8305),c=x(n(8527)),p=W(n(8576)),v=x(n(40)),y=x(n(29)),m=W(n(8352)),_=x(n(61)),h=x(n(5942)),E=x(n(149)),g=W(n(159)),S=x(n(8528)),O=x(n(8475)),I=x(n(8331)),T=x(n(1215)),C=x(n(696)),b=x(n(8577)),M=x(n(8448)),N=x(n(24)),A=x(n(13)),P=x(n(93)),R=n(8674),L=x(n(8460)),D=n(8303),w=x(n(9793)),j=x(n(8981)),k=W(n(8979)),U=x(n(8677)),G=x(n(8980)),F=n(1),B=x(n(6)),H=x(n(7697));function x(e){return e&&e.__esModule?e:{default:e}}function V(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return V=function(){return e},e}function W(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=V();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Y(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function z(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Y(o,r,a,i,l,"next",e)}function l(e){Y(o,r,a,i,l,"throw",e)}i(void 0)}))}}function K(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $(){return($=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}).apply(this,arguments)}var Z=K(S.default,{}),q=K(O.default,{width:20,height:20}),X=K(T.default,{width:20,height:20}),J=K(I.default,{width:20,height:20});function Q(e){var t,n,r,u=e.role,d=e.guild,f=e.highestRole,c=e.currentPosition,v=e.memberCount,y=e.onDragStart,h=e.onDragReset,g=e.onDragComplete,S=e.disableHover,O=e.disableDrag,I=e.setEditRoleId,T=e.setSelectedSection,C=(0,k.useLockTooltip)(d,f,u),A=null!=C,P=a.useState(!1),R=P[0],L=P[1],w=a.useMemo((function(){return{item:{type:"DRAGGABLE_ROLE",id:u.id,position:c},canDrag:function(){return R&&!A},collect:function(e){return{isDragging:e.isDragging()}},begin:function(){y(u.id)},end:function(e,t){var n=t.getDropResult();null!=n?g(n.roleId):h()}}}),[u,y,h,g,A,R]),j=(0,i.useDrag)(w),U=j[0].isDragging,G=j[1],x=a.useMemo((function(){return{accept:"DRAGGABLE_ROLE",canDrop:function(){return!A},collect:function(e){var t=e.getItem();return null==t?{dragSourcePosition:null}:e.isOver()&&e.canDrop()?{dragSourcePosition:t.position}:{dragSourcePosition:null}},drop:function(){return{roleId:u.id}}}}),[A,u]),V=(0,i.useDrop)(x),W=V[0].dragSourcePosition,Y=V[1],z=a.useCallback((function(e){(0,s.openContextMenu)(e,(function(e){return a.createElement(p.default,$({},e,{role:u,guild:d}))}))}),[d,u]),Q=(0,p.useHasGuildRoleItems)(d,u);if(U)return a.createElement("div",{ref:G,className:(0,o.default)(H.default.roleRow,H.default.roleRowDragging)});function ee(){I(u.id)}function te(){ee(),T(D.GuildSettingsRoleEditSections.MEMBERS)}return a.createElement(_.default,{className:(0,o.default)(H.default.roleRow,(t={},t[H.default.roleRowDisableHover]=S,t[H.default.containerDragBefore]=null!=W&&c<W,t[H.default.containerDragAfter]=null!=W&&c>W,t)),onClick:ee,onContextMenu:z,ref:function(e){var t,n;G(null!==(t=null==e?void 0:e.ref)&&void 0!==t?t:null),Y(null!==(n=null==e?void 0:e.ref)&&void 0!==n?n:null)},"aria-label":B.default.Messages.ROLE_ROW_DESCRIPTION.format({name:u.name,count:""+v})},K("div",{className:(0,o.default)(H.default.dragIcon,H.default.dragSpacing,(n={},n[H.default.dragIconHidden]=A||O,n)),onMouseEnter:function(){return L(!0)},onMouseLeave:function(){return L(!1)}},void 0,Z),K("div",{className:(0,o.default)(H.default.roleNameContainer,H.default.roleNameSpacing)},void 0,K(M.default,{className:H.default.shield,color:null!==(r=u.colorString)&&void 0!==r?r:(0,l.int2hex)(F.DEFAULT_ROLE_COLOR)}),null!=C?K(k.default,{className:H.default.lock,tooltipText:C}):null,K(N.default,{className:H.default.roleName,color:N.default.Colors.HEADER_PRIMARY,size:N.default.Sizes.SIZE_16},void 0,u.name)),K(E.default,{text:B.default.Messages.ROLE_OVERVIEW_VIEW_MEMBERS,"aria-label":B.default.Messages.ROLE_ROW_VIEW_MEMBERS.format({count:""+v}),position:E.default.Positions.RIGHT},void 0,(function(e){return a.createElement(_.default,$({},e,{className:(0,o.default)(H.default.memberCountContainer,H.default.memberSpacing),onClick:te}),K(N.default,{size:N.default.Sizes.SIZE_16,color:N.default.Colors.CUSTOM},void 0,v),K(b.default,{className:H.default.person,width:20,height:20}))})),K("div",{className:(0,o.default)(H.default.buttonsContainer,H.default.buttonsSpacing)},void 0,K(m.default,{className:(0,o.default)(H.default.circleButton,H.default.editButton),tooltip:A?B.default.Messages.VIEW:B.default.Messages.EDIT,color:m.CircleIconButtonColors.SECONDARY,size:m.CircleIconButtonSizes.SIZE_36,icon:A?q:X,onClick:ee}),K(m.default,{className:H.default.circleButton,tooltip:B.default.Messages.MORE,color:m.CircleIconButtonColors.SECONDARY,size:m.CircleIconButtonSizes.SIZE_36,icon:J,onClick:z,disabled:!Q})))}Q.displayName="RoleRow";var ee=K(C.default,{});function te(){return K("div",{className:H.default.emptyRoles},void 0,K("div",{className:H.default.dragSpacing}),ee,K(N.default,{className:H.default.emptyRolesText,size:N.default.Sizes.SIZE_16,color:N.default.Colors.MUTED},void 0,B.default.Messages.ROLE_LIST_EMPTY))}function ne(e){var t=e.guild,n=e.query,r=e.setQuery,o=a.useState(!1),i=o[0],l=o[1],u=c.default.useExperiment({guildId:t.id})[0].showNewRolesCreationFlow,s=a.useCallback((function(e){r(e)}),[r]),f=a.useCallback((function(){r("")}),[r]),p=function(e){return(0,U.default)(e,t,z(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.next=3,d.default.createRole(t.id);case 3:l(!1);case 4:case"end":return e.stop()}}),e)}))))},v=u?K(E.default,{"aria-label":B.default.Messages.ROLE_CREATE_TIP_TOOLTIP_TEXT,text:K(N.default,{className:H.default.tooltip},void 0,B.default.Messages.ROLE_CREATE_TIP_TOOLTIP_TEXT)},void 0,(function(e){return a.createElement(y.default,$({},e,{className:H.default.createButton,size:y.default.Sizes.SMALL,onClick:p,submitting:i}),B.default.Messages.ROLE_CREATE_CTA)})):K(y.default,{className:H.default.createButton,size:y.default.Sizes.SMALL,onClick:p,submitting:i},void 0,B.default.Messages.ROLE_CREATE_CTA);return K("div",{className:H.default.rolesList},void 0,K("div",{className:H.default.searchContainer},void 0,K(h.default,{size:h.default.Sizes.MEDIUM,query:n,onChange:s,onClear:f,placeholder:B.default.Messages.SEARCH_ROLES}),v))}te.displayName="EmptyRoles",ne.displayName="RolesSearcher";var re=K(w.default,{});function ae(e){var t=e.guild,n=e.everyoneRole,r=e.filteredRoles,i=e.setEditRoleId,l=e.query,u=e.setQuery,s=e.setHeaderHeight,d=a.useRef(null);a.useEffect((function(){var e,t;s(null!==(e=null===(t=d.current)||void 0===t?void 0:t.offsetHeight)&&void 0!==e?e:371)}),[s]);var f=a.useCallback((function(){i(n.id)}),[i,n.id]);return a.createElement("div",{ref:d},K(g.default,{tag:g.Tags.H1},void 0,B.default.Messages.ROLES),re,K(j.default,{role:n,onClick:f}),K(N.default,{className:H.default.helpText,color:N.default.Colors.HEADER_SECONDARY,size:N.default.Sizes.SIZE_14},void 0,B.default.Messages.ROLE_LIST_BODY_WITH_HELP.format({articleURL:P.default.getArticleURL(F.HelpdeskArticles.PERMISSIONS_TUTORIAL)})),K(ne,{guild:t,query:l,setQuery:u}),K("div",{className:H.default.rolesTable},void 0,K("div",{className:H.default.tableHeader},void 0,K("div",{className:H.default.dragSpacing}),K(N.default,{className:(0,o.default)(H.default.tableTitle,H.default.roleNameSpacing)},void 0,B.default.Messages.ROLE_LIST_HEADER.format({numRoles:r.length||"0"})),K(N.default,{className:(0,o.default)(H.default.tableTitle,H.default.memberSpacing)},void 0,B.default.Messages.MEMBERS),K("div",{className:H.default.buttonsSpacing}))))}ae.displayName="PageHeader";var oe=K(te,{},"empty-role");function ie(e){var t=e.setEditRoleId,n=e.guild,r=e.everyoneRole,o=e.otherRoles,i=e.setSelectedSection,l=(0,u.useStateFromStores)([L.default],(function(){return L.default.getRoleMemberCount(n.id)}),[n.id]),s=(0,u.useStateFromStores)([v.default],(function(){return v.default.getHighestRole(n)}),[n]),d=a.useState(""),c=d[0],p=d[1],y=c.trim();a.useEffect((function(){(0,R.fetchMemberCounts)(n.id)}),[n.id]);var m=a.useRef(!1);a.useEffect((function(){m.current||""===c.trimStart()||(A.default.track(F.AnalyticEvents.SEARCH_STARTED,{search_type:"Roles"}),m.current=!0)}),[c]);var _=a.useMemo((function(){return o.filter((function(e){return function(e,t){return""===t||e.name.toLowerCase().includes(t.toLowerCase())}(e,y)}))}),[o,y]),h=a.useState(371),E=h[0],g=h[1],S=K(ae,{guild:n,everyoneRole:r,filteredRoles:_,setEditRoleId:t,query:c,setQuery:p,setHeaderHeight:g},"header"),O=a.useCallback((function(){return S}),[n,r,_,t,c]),I=a.useMemo((function(){return[].concat(o,[r])}),[o,r]),T=(0,G.default)(I),C=T.draggingRoleId,b=T.handleDragStart,M=T.handleDragReset,N=T.handleDragComplete,P=a.useCallback((function(e){var r,a=e.row;if(0===_.length)return oe;var u=_[a];return K(Q,{role:u,guild:n,highestRole:s,currentPosition:a,memberCount:null!==(r=null==l?void 0:l[u.id])&&void 0!==r?r:0,onDragStart:b,onDragReset:M,onDragComplete:N,disableHover:null!=C,disableDrag:o.length!==_.length,setEditRoleId:t,setSelectedSection:i},u.id)}),[_,n,s,l,b,M,N,C,o,t,i]);return K(f.ListContentScroller,{sections:[Math.max(_.length,1)],sectionHeight:E,renderSection:O,rowHeight:61,renderRow:P})}ie.displayName="GuildSettingsRolesOverview"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(24)),o=l(n(6)),i=l(n(7696));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(){return s(a.default,{className:i.default.description,color:a.default.Colors.HEADER_SECONDARY,size:a.default.Sizes.SIZE_14},void 0,o.default.Messages.ROLE_OVERVIEW_DESCRIPTION)}d.displayName="GuildSettingsRolesDescription"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;var r,a=h(n(0)),o=m(n(480)),i=n(3),l=m(n(15)),u=m(n(12)),s=h(n(8595)),d=m(n(78)),f=n(8532),c=m(n(712)),p=n(1),v=m(n(6)),y=m(n(7698));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t;return S("span",{style:{color:null!==(t=e.colorString)&&void 0!==t?t:"currentColor"}},void 0,e.name)}O.displayName="coloredRoleLabel";var I=S(s.ComboboxItem.Checkbox,{}),T=S(s.ComboboxItem.Checkbox,{checked:!0});function C(e){var t=e.guildId,n=(0,i.useStateFromStores)([u.default],(function(){return u.default.getNullableCurrentUser()})),r=(0,i.useStateFromStores)([l.default],(function(){return l.default.getGuild(t)})),m=(0,i.useStateFromStores)([c.default],(function(){return c.default.getViewingRoles(t)})),_=(0,s.useMultiSelect)(null==m?[]:Object.keys(m)),h=_[0],g=_[1],C=a.useRef(r);a.useEffect((function(){var e={},t=C.current;if(null!=t){for(var n,r=E(h);!(n=r()).done;){var a=n.value,o=t.getRole(a);null!=o&&(e[a]=o)}(0,f.viewAsRoles)(t.id,e)}}),[h]);var b=null!=r&&null!=n?d.default.getHighestRole(r,n.id):null,M=a.useMemo((function(){return null!=r&&null!=n?Object.values(r.roles).filter((function(e){return e.id!==r.id})).filter((function(e){return(null==b?void 0:b.id)===e.id||d.default.isRoleHigher(r,n.id,b,e)})):[]}),[r,n,b]);return null==n||null==r?null:d.default.can(p.Permissions.ADMINISTRATOR,n,r)?S("div",{className:y.default.container},void 0,S(s.default,{placeholder:v.default.Messages.SEARCH_ROLES,value:h,onChange:g,autoFocus:!0},void 0,(function(e){var t=M.reduce((function(t,n){return(0,o.default)(e.toLowerCase(),n.name.toLowerCase())&&t.push(S(s.ComboboxItem,{value:n.id},n.id,S(s.ComboboxItem.Label,{},void 0,O(n)),I)),t}),[]),n=r.getRole(r.id);return null!=n&&t.push(S(s.ComboboxItem,{value:n.id,disabled:!0},n.id,S(s.ComboboxItem.Label,{},void 0,O(n)),T)),t}))):null}C.displayName="ViewAsRoleSelector"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(8292)),i=f(n(8255)),l=f(n(39)),u=f(n(8451)),s=f(n(8679)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return l.default.theme})),t=(0,a.useStateFromStores)([i.default],(function(){return i.default.getProps()})).guild,n=(0,a.useStateFromStores)([s.default],(function(){return s.default.getSettingsProps()})),r=n.submitting,f=n.welcomeSettings;if(null==t)return null;return p(o.default,{onSave:function(){return u.default.saveWelcomeScreen(t.id,f)},onReset:function(){return u.default.resetWelcomeScreen()},theme:e,submitting:r,onSaveText:d.default.Messages.TRY_AGAIN,message:d.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_UPDATE_FAILURE})};v.displayName="GuildSettingsCommunityWelcomeNotice";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(98)),i=n(10380),l=n(3),u=A(n(14)),s=n(9797),d=A(n(9798)),f=n(395),c=n(1220),p=A(n(684)),v=A(n(9800)),y=A(n(8255)),m=A(n(15)),_=A(n(39)),h=A(n(29)),E=R(n(1164)),g=A(n(681)),S=R(n(474)),O=n(159),I=A(n(1236)),T=A(n(24)),C=A(n(13)),b=n(1),M=A(n(6)),N=A(n(7701));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var w=function(e,t,n,r){void 0===r&&(r=!1);var a=null;return null==t||Number.isNaN(t)?null!=t&&!Number.isNaN(t)||null==e||(a=M.default.Messages.GUILD_ANALYTICS_METRICS_LAST_WEEK):a=M.default.Messages.PERCENTAGE_SINCE_LAST_WEEK.format({percentage:(0,i.truncateAndLocalizeNumber)(Math.abs(t),n)}),{localizedNumber:null!=e?(0,i.truncateAndLocalizeNumber)(e,n)+(r?"%":""):M.default.Messages.NOT_AVAILABLE,subtext:a,isTrendingUp:t>0,isTrendingDown:t<0}},j=function(e,t){return void 0===t&&(t=!1),t||e===b.AbortCodes.NOT_ENOUGH_GUILD_MEMBERS?D(E.default,{icon:I.default,className:N.default.notEnoughMembersError,backgroundColor:E.Colors.BACKGROUND_ACCENT},void 0,M.default.Messages.GUILD_ANALYTICS_ERROR_GUILD_SIZE):null==e?null:D(E.default,{backgroundColor:E.Colors.BACKGROUND_ACCENT},void 0,M.default.Messages.GUILD_ANALYTICS_ERROR_MESSAGE)};j.displayName="getErrorBlock";var k=function(){var e=a.useState(!1),t=e[0],n=e[1],r=(0,l.useStateFromStores)([y.default],(function(){return y.default.getGuildId()}));return D(h.default,{className:N.default.developerPortalCta,onClick:function(){n(!0),C.default.track(b.AnalyticEvents.GUILD_INSIGHTS_SETTINGS_CTA_CLICKED,{guild_id:r});var e=null==r?b.RelativeMarketingURLs.DEVELOPER_PORTAL:b.RelativeMarketingURLs.DEVELOPER_PORTAL_GUILD_ANALYTICS(r),t=o.default.v4();u.default.post({url:b.Endpoints.HANDOFF,body:{key:t},oldFormErrors:!0}).then((function(n){var r=n.body.handoff_token;window.open(b.MarketingURLs.DEVELOPER_PORTAL_LOGIN_HANDOFF(t,r,e))}),(function(){window.open(e)})).then((function(){n(!1)}))},submitting:t},void 0,M.default.Messages.GUILD_ANALYICS_DEVELOPERS_BUTTON)};k.displayName="DevPortalButton";var U=D(k,{}),G=function(){var e=(0,l.useStateFromStores)([y.default],(function(){return y.default.getGuildId()})),t=(0,l.useStateFromStores)([p.default],(function(){return p.default.getMemberCount(e)})),n=(0,l.useStateFromStores)([m.default],(function(){return m.default.getGuild(e)})),r=(0,l.useStateFromStores)([_.default],(function(){return _.default.locale})),o=(0,l.useStateFromStoresObject)([v.default],(function(){return{analytics:null!=e?v.default.getOverviewAnalytics(e):null,errorCode:v.default.getError()}})),i=o.analytics,u=o.errorCode,h=null==t||null==n||null!=t&&t<500&&null!=n&&!n.hasFeature(b.GuildFeatures.PARTNERED)&&!n.hasFeature(b.GuildFeatures.VERIFIED);a.useEffect((function(){null==e||h||((0,s.fetchEngagementOverview)(e),(0,s.fetchGrowthActivationOverview)(e),(0,s.fetchGrowthActivationRetention)(e))}),[e,h]),a.useEffect((function(){(0,c.hideHotspot)(f.HotspotLocations.GUILD_ANALYTICS_GUILD_SETTINGS_MENU)}),[]);var E=null!=i?D("div",{className:N.default.guildAnalyticsOverviewWrapper},void 0,D("div",{className:N.default.overviewData},void 0,a.createElement(d.default,L({title:M.default.Messages.WEEKLY_VISITORS,tooltipText:M.default.Messages.VISITORS_INFO},w(i.visitors,i.visitorsChange,r))),a.createElement(d.default,L({title:M.default.Messages.WEEKLY_COMMUNICATORS,tooltipText:M.default.Messages.COMMUNICATORS_INFO},w(i.communicators,i.communicatorsChange,r))),a.createElement(d.default,L({title:M.default.Messages.WEEKLY_NEW_MEMBERS},w(i.newMembers,i.newMembersChange,r))),a.createElement(d.default,L({title:M.default.Messages.WEEKLY_NEW_MEMBER_RETENTION,tooltipText:M.default.Messages.NEW_MEMBER_RETENTION_INFO},w(i.pctRetained,i.pctRetainedChange,r,!0))))):null;return D(g.default,{tag:O.Tags.H1,title:M.default.Messages.SERVER_INSIGHTS},void 0,D(S.default,{type:S.Types.DESCRIPTION},void 0,M.default.Messages.GUILD_ANALYTICS_DESCRIPTION.format()),j(u,h),D("div",{className:N.default.developerPortalCtaWrapper},void 0,D("div",{className:N.default.placeholderImage}),D(T.default,{className:N.default.developerPortalCtaText},void 0,M.default.Messages.GUILD_ANALYTICS_DEVELOPERS_CTA),U),E)};G.displayName="GuildSettingsAnalytics";var F=G;t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchEngagementOverview=function(e){return l(e,o.Endpoints.GUILD_ANALYTICS_ENGAGEMENT_OVERVIEW).then((function(t){var n=t.body;a.default.dispatch({type:o.ActionTypes.GUILD_ANALYTICS_ENGAGEMENT_OVERVIEW_FETCH_SUCCESS,guildId:e,stats:n.slice(0,2)})}),(function(e){a.default.dispatch({type:o.ActionTypes.GUILD_ANALYTICS_ENGAGEMENT_OVERVIEW_FETCH_FAILURE,error:e.body})}))},t.fetchGrowthActivationOverview=function(e){return l(e,o.Endpoints.GUILD_ANALYTICS_GROWTH_ACTIVATION_OVERVIEW).then((function(t){var n=t.body;a.default.dispatch({type:o.ActionTypes.GUILD_ANALYTICS_GROWTH_ACTIVATION_OVERVIEW_FETCH_SUCCESS,guildId:e,stats:n.slice(0,2)})}),(function(e){a.default.dispatch({type:o.ActionTypes.GUILD_ANALYTICS_GROWTH_ACTIVATION_OVERVIEW_FETCH_FAILURE,error:e.body})}))},t.fetchGrowthActivationRetention=function(e){return l(e,o.Endpoints.GUILD_ANALYTICS_GROWTH_ACTIVATION_RETENTION).then((function(t){var n=t.body.filter((function(e){return e.hasOwnProperty("pct_retained")})).map((function(e){var t=e.interval_start_timestamp,n=e.pct_retained;!function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n])}(e,["interval_start_timestamp","pct_retained"]);return{interval_start_timestamp:t,pct_retained:n}}));a.default.dispatch({type:o.ActionTypes.GUILD_ANALYTICS_GROWTH_ACTIVATION_RETENTION_FETCH_SUCCESS,guildId:e,stats:n.slice(0,2)})}),(function(e){a.default.dispatch({type:o.ActionTypes.GUILD_ANALYTICS_GROWTH_ACTIVATION_RETENTION_FETCH_FAILURE,error:e.body})}))};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=new Date,a=new Date(n.getTime()-864e5*(n.getDay()+1)-36288e5);return r.default.get({url:t(e),query:{start:a.toISOString(),end:n.toISOString(),interval:2},oldFormErrors:!0})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(149)),i=v(n(159)),l=v(n(1236)),u=v(n(9799)),s=v(n(47)),d=v(n(24)),f=n(1),c=v(n(6)),p=v(n(7700));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}var h=function(e){var t=e.title,n=e.subtext,r=void 0===n?c.default.Messages.NOT_AVAILABLE:n,v=e.localizedNumber,y=e.isTrendingUp,h=e.isTrendingDown,E=e.tooltipText,g="string"==typeof E?E:t,S=null!=E?m(o.default,{text:E,position:o.default.Positions.TOP,"aria-label":g},void 0,(function(e){return a.createElement(l.default,_({},e,{className:p.default.infoIcon,height:16,width:16}))})):null;return m("div",{className:p.default.analyticsCard},void 0,m(i.default,{className:p.default.analyticsCardTitle},void 0,t,S),m("div",{className:p.default.analyticsCardContent},void 0,m(s.default,{className:null!=v?p.default.analyticsCardNumber:p.default.analyticsCardNumberNotAvailable,size:s.default.Sizes.SIZE_24},void 0,null!=v?v:c.default.Messages.NOT_AVAILABLE)),m("div",{className:p.default.analyticsCardArrowSubText},void 0,y?m(u.default,{className:p.default.trendingArrow,color:f.Colors.STATUS_GREEN_600,"aria-label":c.default.Messages.TRENDING_ARROW_UP,width:14,height:12}):null,h?m(u.default,{className:p.default.trendingArrowIconDown,color:f.Colors.STATUS_RED,"aria-label":c.default.Messages.TRENDING_ARROW_DOWN,width:14,height:12}):null,m(d.default,{size:d.default.Sizes.SIZE_12},void 0,r)))};h.displayName="AnalyticsCard";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var i=function(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{className:e.className,width:n,height:a,viewBox:"0 0 14 12"},void 0,o("path",{d:"M7 0L13.9282 12H0.0717969L7 0Z",fill:l}))};i.displayName="TrendingArrow";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(9801)),a=i(n(3)),o=i(n(2));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s=["pct_retained","new_members","visitors","communicators"],d={},f=null;function c(e){var t=e.guildId,n=e.stats;f=null;var a={},o={},i=n[0],l=n[1];null!=i&&s.forEach((function(e){if(null!=i[e]){var t=(0,r.default)(e);null!=l&&0!==l[e]&&(a[t+"Change"]=100*(i[e]-l[e])/l[e]),o[t]=i[e]}})),d[t]=u({},o,{},a,{},d[t])}function p(e){var t=e.error;f=t.code}var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getOverviewAnalytics=function(e){return d[e]},a.getError=function(){return f},r}(a.default.Store))(o.default,{GUILD_ANALYTICS_ENGAGEMENT_OVERVIEW_FETCH_SUCCESS:c,GUILD_ANALYTICS_GROWTH_ACTIVATION_OVERVIEW_FETCH_SUCCESS:c,GUILD_ANALYTICS_GROWTH_ACTIVATION_RETENTION_FETCH_SUCCESS:c,GUILD_ANALYTICS_ENGAGEMENT_OVERVIEW_FETCH_FAILURE:p,GUILD_ANALYTICS_GROWTH_ACTIVATION_OVERVIEW_FETCH_FAILURE:p,GUILD_ANALYTICS_GROWTH_ACTIVATION_RETENTION_FETCH_FAILURE:p});t.default=v},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=K(n(0)),o=Y(n(9)),i=Y(n(67)),l=n(680),u=Y(n(3)),s=n(9803),d=n(389),f=Y(n(8316)),c=Y(n(8984)),p=Y(n(6008)),v=Y(n(9804)),y=Y(n(8502)),m=Y(n(1291)),_=Y(n(9805)),h=n(8681),E=Y(n(89)),g=Y(n(10)),S=Y(n(8680)),O=Y(n(8255)),I=Y(n(15)),T=Y(n(160)),C=Y(n(39)),b=Y(n(12)),M=K(n(9806)),N=n(717),A=Y(n(29)),P=n(8503),R=K(n(8302)),L=Y(n(55)),D=Y(n(151)),w=n(131),j=Y(n(696)),k=Y(n(279)),U=n(468),G=K(n(8985)),F=n(48),B=n(1),H=Y(n(6)),x=Y(n(7704)),V=Y(n(7381)),W=Y(n(5958));function Y(e){return e&&e.__esModule?e:{default:e}}function z(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return z=function(){return e},e}function K(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=z();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function $(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Z(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function q(){return(q=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}).apply(this,arguments)}function X(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,J(e,t)}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleHeaderClick=function(){var e=t.props,n=e.onHeaderClick,r=e.log;null==n||n(r)},t.handleUserContextMenu=function(e){var n=t.props,r=n.log,o=n.guildId,i=r.user;null!=i&&null!=o&&(0,d.openContextMenu)(e,(function(e){return a.createElement(_.default,q({},e,{guildId:o,user:i}))}))},t.handleChannelContextMenu=function(e){var n=t.props,r=n.log,o=n.guildId,i=I.default.getGuild(o);null!=r.options.channel&&null!=i&&(0,d.openContextMenu)(e,(function(e){return a.createElement(v.default,q({},e,{channel:r.options.channel}))}))},t.handleTargetContextMenu=function(e){var n=t.props,r=n.log,o=n.guildId;(0,d.openContextMenu)(e,(function(e){switch(r.targetType){case B.AuditLogTargetTypes.CHANNEL:case B.AuditLogTargetTypes.CHANNEL_OVERWRITE:var t=g.default.getChannel(r.targetId),n=I.default.getGuild(o);return null!=t&&null!=n?a.createElement(v.default,q({},e,{channel:t})):a.createElement(y.default,q({},e,{id:r.targetId}));case B.AuditLogTargetTypes.USER:var i=b.default.getUser(r.targetId);if(null!=i&&null!=o)return a.createElement(_.default,q({},e,{guildId:o,user:i}))}return null}))},t}return X(t,e),t.prototype.render=function(){var e=this.props,t=(e.onHeaderClick,e.guildId),n=Z(e,["onHeaderClick","guildId"]);return null==t?null:a.createElement(M.default,q({},n,{onHeaderClick:this.handleHeaderClick,onUserContextMenu:this.handleUserContextMenu,onChannelContextMenu:this.handleChannelContextMenu,onTargetContextMenu:this.handleTargetContextMenu}))},t}(a.PureComponent);function ee(e){return{label:e.username,value:e.id,user:e}}function te(e){var t=e.logs,n=e.guildId,r=e.expandedId,o=e.lastExpandedId,i=e.scroller,u=e.setExpandedRef,s=e.setLastExpandedRef,d=e.onHeaderClick,f=e.onContentClick,c=a.useRef(i);a.useEffect((function(){c.current=i}),[i]);var v=(0,p.default)("audit-log",c);return $(l.ListNavigatorProvider,{navigator:v},void 0,$(l.ListNavigatorContainer,{},void 0,(function(e){var i=e.ref,l=Z(e,["ref"]);return a.createElement("div",q({ref:i},l),t.map((function(e){var t=r===e.id,i=o===e.id,l=t?u:i?s:null;return a.createElement(Q,{guildId:n,ref:l,className:x.default.marginBottom8,onHeaderClick:d,onContentClick:f,log:e,key:e.id,expanded:t})})))})))}Q.displayName="AuditLogClickWrap",te.displayName="AuditLogList";var ne=$(P.ComboboxItem.Checkmark,{}),re=$(P.ComboboxItem.Checkmark,{}),ae=$(P.ComboboxItem.Icon,{},void 0,$(j.default,{width:30,height:30})),oe=$(P.ComboboxItem.Checkmark,{}),ie=$(f.default,{}),le=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._clickedInside=!1,t._scrollerRef=null,t._prevRects=t.getRects(),t._contentRef=a.createRef(),t.state={expandedId:null,lastExpandedId:null,actionFilterQuery:""},t.renderActionQuickSelectItem=function(e,n){var r,a=t.props.actionFilter,o=(0,h.getActionType)(e.value),i=(0,h.getTargetType)(e.value),l=e.value===a;return $(P.ComboboxItem,{value:e.value,selectedColor:P.ComboboxItem.Colors.BRAND},null!==(r=e.key)&&void 0!==r?r:n,$(P.ComboboxItem.Icon,{},void 0,$(M.AuditLogIcon,{themeOverride:l?B.ThemeTypes.DARK:null,actionType:o,targetType:i,action:e.value})),$(P.ComboboxItem.Label,{},void 0,e.label),ne)},t.renderUserQuickSelectItem=function(e,n){if(e.user instanceof E.default){var r=e.user;return $(P.ComboboxItem,{value:r.id,selectedColor:P.ComboboxItem.Colors.BRAND},r.id,$(P.ComboboxItem.Icon,{},void 0,$(k.default,{size:k.default.Sizes.SIZE_32,src:r.getAvatarURL(t.props.guildId||void 0),"aria-label":r.username,className:x.default.avatar})),$(P.ComboboxItem.Label,{},void 0,$("span",{className:x.default.username},void 0,r.username),$("span",{className:x.default.discriminator},void 0,"#",r.discriminator)),re)}var a;return $(P.ComboboxItem,{value:e.value,selectedColor:P.ComboboxItem.Colors.BRAND},null!==(a=e.key)&&void 0!==a?a:n,ae,$(P.ComboboxItem.Label,{},void 0,e.label),oe)},t.renderHeaderDropdowns=function(){var e,n,r=t.props,a=r.actionFilter,i=r.hide,l=r.userIdFilter,u=r.moderators;if(i)return null;var s=G.ACTION_FILTER_ITEMS(),d=s,f=null!==(e=s.find((function(e){var t=e.value;return a===t})))&&void 0!==e?e:s[0],p={label:H.default.Messages.GUILD_SETTINGS_FILTER_ALL_USERS,valueLabel:H.default.Messages.GUILD_SETTINGS_FILTER_ALL,value:null},v=[p].concat(u).map((function(e){return e instanceof E.default?ee(e):e})),y=null!==(n=v.find((function(e){return e.value===l})))&&void 0!==n?n:p;return[$(L.default.Child,{},"user-filter",$(c.default,{popoutClassName:(0,o.default)(x.default.guildSettingsAuditLogsUserFilterPopout,W.default.elevationBorderHigh),items:v,renderItem:t.renderUserQuickSelectItem,renderValue:t.renderUserQuickSelectValue,value:y,onChange:t.handleFilterUserChange,label:H.default.Messages.GUILD_SETTINGS_FILTER_USER,placeholder:H.default.Messages.SEARCH_MEMBERS,popoutProps:{autoInvert:!1,position:N.PopoutPositions.BOTTOM}})),$(L.default.Child,{},"action-filter",$(c.default,{placeholder:H.default.Messages.SEARCH_ACTIONS,label:H.default.Messages.GUILD_SETTINGS_FILTER_ACTION,popoutClassName:(0,o.default)(x.default.guildSettingsAuditLogsUserFilterPopout,W.default.elevationBorderLow),items:d,renderItem:t.renderActionQuickSelectItem,renderValue:t.renderActionQuickSelectValue,value:f,onChange:t.handleFilterActionChange,popoutProps:{autoInvert:!1,position:N.PopoutPositions.BOTTOM}}))]},t.renderLoadMore=function(){var e=t.props,n=e.showLoadMore,r=e.hasOlderLogs,a=e.hide;if(n&&r&&!a)return $(A.default,{color:A.default.Colors.PRIMARY,className:x.default.marginTop20,onClick:t.handleFetchNextPage},void 0,H.default.Messages.GUILD_SETTINGS_AUDIT_LOG_LOAD_MORE)},t.handleFilterActionChange=function(e){(0,s.filterByAction)(e,t.props.guildId)},t.handleFilterUserChange=function(e){(0,s.filterByUserId)(e,t.props.guildId)},t.handleHeaderClick=function(e){var n=t.state.expandedId;n!==e.id?(t._clickedInside=!0,t.setState({expandedId:e.id,lastExpandedId:n}),t._prevRects=t.getRects()):(t._expandedRef=null,t._lastExpandedRef=null,null!=n&&(t._prevRects=t.getRects()),t.setState({expandedId:null,lastExpandedId:null}))},t.handleOutsideClick=function(){null==t.state.expandedId||t._clickedInside?null!=t.state.expandedId&&(t._clickedInside=!1):(t._expandedRef=null,t._lastExpandedRef=null,t.setState({expandedId:null,lastExpandedId:null}),t._prevRects=t.getRects())},t.handleContentClick=function(e){t._clickedInside=!0,e.stopPropagation()},t.handleSetScrollerRef=function(e){t._scrollerRef=e},t.handleOnScroll=function(){t.isScrollerAtBottom()&&t.handleFetchNextPage()},t.handleFetchNextPage=function(){(0,s.fetchNextLogPage)(t.props.guildId)},t.handleActionFilterQueryChange=function(e){t.setState({actionFilterQuery:e})},t.handleActionFilterQueryClear=function(){t.setState({actionFilterQuery:""})},t.handleSetExpandedRef=function(e){t._expandedRef=e},t.handleSetLastExpandedRef=function(e){t._lastExpandedRef=e},t}X(t,e);var r=t.prototype;return r.componentDidMount=function(){(0,s.fetchLogs)(this.props.guildId),document.addEventListener("click",this.handleOutsideClick)},r.componentWillUnmount=function(){document.removeEventListener("click",this.handleOutsideClick)},r.componentDidUpdate=function(e,t){this.state.expandedId!==t.expandedId&&this.fixScroll(),!this.props.showLoadMore&&this.props.logs.length!==e.logs.length&&null!=this._scrollerRef&&this.isScrollerAtBottom()&&(0,s.fetchNextLogPage)(this.props.guildId,!0)},r.isScrollerAtBottom=function(){var e;return(null===(e=this._scrollerRef)||void 0===e?void 0:e.isScrolledToBottom())||!1},r.fixScroll=function(){var e=this._scrollerRef;if(null!=e){var t=this.getRects(),n=this._prevRects;if(null!=t.expanded&&null!=t.lastExpanded&&null!=n.expanded&&!(t.expanded.top<t.lastExpanded.top)){var r=n.expanded.height-t.lastExpanded.height,a=e.getScrollerState().scrollTop-r;e.scrollTo({to:a})}}},r.getRects=function(){var e={lastExpanded:null,expanded:null};if(null!=this._lastExpandedRef){var t=i.default.findDOMNode(this._lastExpandedRef);null!=t&&t instanceof Element&&(e.lastExpanded=t.getBoundingClientRect())}if(null!=this._expandedRef){var n=i.default.findDOMNode(this._expandedRef);null!=n&&n instanceof Element&&(e.expanded=n.getBoundingClientRect())}return e},r.renderUserQuickSelectValue=function(e){return e.valueLabel||e.label},r.renderActionQuickSelectValue=function(e){return e.valueLabel||e.label},r.renderHeader=function(){return $(L.default,{direction:L.default.Direction.VERTICAL,className:x.default.customHeader},void 0,$(L.default,{align:L.default.Align.CENTER},void 0,$(w.FormTitle,{tag:w.FormTitleTags.H1,className:x.default.marginReset},void 0,H.default.Messages.GUILD_SETTINGS_LABEL_AUDIT_LOG),this.renderHeaderDropdowns()),$(w.FormDivider,{className:(0,o.default)(x.default.marginBottom20,x.default.marginTop20)}))},r.renderSpinner=function(){return $(D.default,{type:D.default.Type.SPINNING_CIRCLE})},r.renderContent=function(){var e=this.state,t=e.expandedId,r=e.lastExpandedId,a=this.props,o=a.logs,i=a.theme,l=a.hide,u=a.isInitialLoading,s=a.isLoading,d=a.hasError,f=a.guildId;if(l)return ie;if(s||u)return this.renderSpinner();if(0===o.length){var c=d?H.default.Messages.GUILD_SETTINGS_LABEL_AUDIT_LOG_ERROR_BODY:H.default.Messages.GUILD_SETTINGS_LABEL_AUDIT_LOG_EMPTY_BODY,p=d?H.default.Messages.GUILD_SETTINGS_LABEL_AUDIT_LOG_ERROR_TITLE:H.default.Messages.GUILD_SETTINGS_LABEL_AUDIT_LOG_EMPTY_TITLE;return $(R.default,{theme:i,className:x.default.marginTop40},void 0,$(R.EmptyStateImage,{darkSrc:n(9807),lightSrc:n(9808),width:272,height:130}),$(R.EmptyStateText,{note:c,style:{maxWidth:300}},void 0,p))}return $(te,{logs:o,guildId:f,expandedId:t,lastExpandedId:r,setExpandedRef:this.handleSetExpandedRef,setLastExpandedRef:this.handleSetLastExpandedRef,onHeaderClick:this.handleHeaderClick,onContentClick:this.handleContentClick,scroller:this._scrollerRef})},r.render=function(){var e=this.props,t=e.isLoadingNextPage,n=e.hide,r=e.isLoading;return $("div",{className:V.default.customColumn},void 0,$("div",{className:V.default.customContainer},void 0,a.createElement(U.AdvancedScrollerAuto,{className:(0,o.default)(V.default.customScroller,x.default.scroller),onScroll:this.handleOnScroll,ref:this.handleSetScrollerRef},a.createElement("div",{className:x.default.content,ref:this._contentRef},$(m.default,{containerRef:this._contentRef},void 0,this.renderHeader(),this.renderContent(),this.renderLoadMore(),!t||n||r?null:this.renderSpinner())))))},t}(a.PureComponent);le.displayName="GuildSettingsAuditLog";var ue=u.default.connectStores([S.default,O.default,I.default,C.default,T.default,b.default],(function(){var e=O.default.getGuildId(),t=I.default.getGuild(e),n=S.default.logs;return{guildId:e,moderators:S.default.userIds.map((function(e){return b.default.getUser(e)})).filter(F.isNotNullish),isInitialLoading:S.default.isInitialLoading,isLoading:S.default.isLoading,isLoadingNextPage:S.default.isLoadingNextPage,showLoadMore:S.default.groupedFetchCount>2,hasError:S.default.hasError,hasOlderLogs:S.default.hasOlderLogs,logs:null!=n&&null!=t?G.transformLogs(n,t):[],actionFilter:S.default.actionFilter,userIdFilter:S.default.userIdFilter,theme:C.default.theme,hide:T.default.enabled}}))(le);t.default=ue},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchLogs=d,t.fetchNextLogPage=function(e,t){void 0===t&&(t=!1);if(!o.default.hasOlderLogs||u()||null==e)return;var n=o.default.logs,r=n[n.length-1],l=null;null!=r&&(l=r.id);return a.default.dirtyDispatch({type:i.ActionTypes.AUDIT_LOG_FETCH_NEXT_PAGE_START,before:l,isGroupedFetch:t}),s(e,{before:l}).then((function(e){var t=e.body,n=t.audit_log_entries,r=t.integrations,o=t.users,l=t.webhooks,u=t.guild_scheduled_events,s=t.threads;a.default.dispatch({type:i.ActionTypes.AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS,logs:n,integrations:r,users:o,webhooks:l,guildScheduledEvents:u,threads:s})}),(function(){return a.default.dispatch({type:i.ActionTypes.AUDIT_LOG_FETCH_NEXT_PAGE_FAIL})}))},t.filterByAction=function(e,t){if(u()||null==t)return;return a.default.dispatch({type:i.ActionTypes.AUDIT_LOG_FILTER_BY_ACTION,action:e}),d(t,null,e)},t.filterByUserId=function(e,t){if(u()||null==t)return;return a.default.dispatch({type:i.ActionTypes.AUDIT_LOG_FILTER_BY_USER,userId:e}),d(t,e)};var r=l(n(14)),a=l(n(2)),o=l(n(8680)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return o.default.isLoading||o.default.isLoadingNextPage}function s(e,t){var n=function(e){var t=e.before,n=e.userId,r=e.action;n=n||o.default.userIdFilter,r=r||o.default.actionFilter;var a={limit:i.AUDIT_LOG_PAGE_LIMIT};return null!=t&&(a.before=t),null!=n&&(a.user_id=n),null!=r&&(a.action_type=r),a}(t);return r.default.get({url:i.Endpoints.GUILD_AUDIT_LOG(e),query:n,oldFormErrors:!0})}function d(e,t,n){if(!u()&&null!=e)return a.default.dirtyDispatch({type:i.ActionTypes.AUDIT_LOG_FETCH_START}),s(e,{userId:t,action:n}).then((function(e){var t=e.body,n=t.audit_log_entries,r=t.integrations,o=t.users,l=t.webhooks,u=t.guild_scheduled_events,s=t.threads;a.default.dispatch({type:i.ActionTypes.AUDIT_LOG_FETCH_SUCCESS,logs:n,integrations:r,users:o,webhooks:l,guildScheduledEvents:u,threads:s})}),(function(){return a.default.dispatch({type:i.ActionTypes.AUDIT_LOG_FETCH_FAIL})}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;v(n(0));var r,a=n(389),o=n(687),i=c(n(8258)),l=v(n(8253)),u=n(42),s=c(n(11)),d=c(n(8370)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.channel,n=e.onSelect,r=(0,d.default)(t),c=(0,i.default)(t.id);return s.default.isGuest()?null:y(l.default,{navId:"channel-context",onClose:a.closeContextMenu,"aria-label":f.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:n},void 0,y(l.MenuGroup,{},void 0,r,t.isCategory()?null:y(l.MenuItem,{id:"jump-to-channel",label:f.default.Messages.JUMP_TO_CHANNEL,action:function(){(0,u.transitionToGuild)(t.guild_id,t.id),(0,o.popLayer)()}})),y(l.MenuGroup,{},void 0,c))}m.displayName="ChannelAuditLogContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;m(n(0));var r,a=n(389),o=v(n(8257)),i=v(n(8258)),l=m(n(8253)),u=v(n(11)),s=v(n(8343)),d=v(n(8324)),f=v(n(8435)),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.user,n=e.guildId,r=e.analyticsContext,v=e.onSelect,y=(0,d.default)(t.id),m=(0,f.default)(t.id,n),h=(0,i.default)(t.id),E=(0,s.default)(t.id);return u.default.isGuest()||t.isNonUserBot()?null:_(o.default,{context:r,object:c.AnalyticsObjects.CONTEXT_MENU},void 0,_(l.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":p.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:v},void 0,_(l.MenuGroup,{},void 0,y,E),_(l.MenuGroup,{},void 0,m),_(l.MenuGroup,{},void 0,h)))}h.displayName="AuditLogUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.AuditLogIcon=void 0;var r,a,o=O(n(0)),i=g(n(9)),l=n(680),u=n(180),s=g(n(70)),d=g(n(12)),f=O(n(8985)),c=n(292),p=n(139),v=g(n(61)),y=g(n(55)),m=g(n(683)),_=g(n(279)),h=n(1),E=g(n(7703));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t){var n=f.NotRenderedChanges[e.targetType];return null!=n&&!0===n[t.key]}var N=((r={})[h.AuditLogActionTypes.CREATE]=E.default.typeCreate,r[h.AuditLogActionTypes.UPDATE]=E.default.typeUpdate,r[h.AuditLogActionTypes.DELETE]=E.default.typeDelete,r),A=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.render=function(){var e=this.props,t=e.actionType,n=e.targetType,r=e.action,a=e.themeOverride,o=null!=a?E.default["themeOverride"+(0,p.upperCaseFirstChar)(a)]:null;return T("div",{className:(0,i.default)(E.default.icon,N[t],function(e,t){var n;return t===h.AuditLogActions.MESSAGE_DELETE?E.default.targetMessage:(n={},n[h.AuditLogTargetTypes.ALL]=E.default.targetAll,n[h.AuditLogTargetTypes.GUILD]=E.default.targetGuild,n[h.AuditLogTargetTypes.CHANNEL]=E.default.targetChannel,n[h.AuditLogTargetTypes.CHANNEL_OVERWRITE]=E.default.targetChannel,n[h.AuditLogTargetTypes.USER]=E.default.targetMember,n[h.AuditLogTargetTypes.ROLE]=E.default.targetRole,n[h.AuditLogTargetTypes.INTEGRATION]=E.default.targetIntegration,n[h.AuditLogTargetTypes.INVITE]=E.default.targetInvite,n[h.AuditLogTargetTypes.WEBHOOK]=E.default.targetWebhook,n[h.AuditLogTargetTypes.EMOJI]=E.default.targetEmoji,n[h.AuditLogTargetTypes.STICKER]=E.default.targetSticker,n[h.AuditLogTargetTypes.STAGE_INSTANCE]=E.default.targetStageInstance,n[h.AuditLogTargetTypes.GUILD_SCHEDULED_EVENT]=E.default.targetGuildScheduledEvent,n[h.AuditLogTargetTypes.THREAD]=E.default.thread,n)[e]}(n,r),o)})},t}(o.PureComponent);t.AuditLogIcon=A,A.displayName="AuditLogIcon";var P=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.render=function(){var e=this.props,t=e.user;return T("span",{onContextMenu:e.onContextMenu,className:E.default.userHook},void 0,T("span",{},void 0,t.username),T("span",{className:E.default.discrim},void 0,"#",t.discriminator))},t}(o.PureComponent);P.displayName="UserHook";var R=function(e){function t(){return e.apply(this,arguments)||this}C(t,e);var n=t.prototype;return n.hasChangesToRender=function(){var e=this.props.log,t=e.changes;return(e.actionType!==h.AuditLogActionTypes.DELETE||e.action===h.AuditLogActions.MEMBER_BAN_ADD||e.action===h.AuditLogActions.MEMBER_KICK||e.action===h.AuditLogActions.MEMBER_PRUNE)&&(null!=t&&t.some((function(t){return!M(e,t)})))},n.renderTitle=function(){var e=this.props,t=e.log,n=e.onUserContextMenu,r=e.onTargetContextMenu,a=e.onChannelContextMenu,o=t.user,i=t.target,l=t.options,c=f.getChangeTitle(t);return null!=c?T("div",{className:E.default.overflowEllipsis},void 0,c.format({user:o,target:i,userHook:function(e,r){return T(P,{user:t.user,onContextMenu:n},r)},targetHook:function(e,n){return t.targetType===h.AuditLogTargetTypes.USER?T(P,{user:t.target,onContextMenu:r},n):T("span",{onContextMenu:r},n,e)},count:l.count,channel:l.channel?"string"==typeof l.channel?l.channel:(0,u.computeChannelName)(l.channel,d.default,s.default,!0):null,channelHook:function(e,t){return T("span",{onContextMenu:a},t,e)}})):null},n.renderRoleUpdate=function(e){var t=e.newValue;return Array.isArray(t)?t.map((function(e){return T("div",{className:E.default.subListItem},e.id,e.name)})):null},n.renderPermissionUpdate=function(e){var t=this,n=e.newValue;return Array.isArray(n)?n.map((function(e){return T("div",{className:E.default.subListItem},e,f.getStringForPermission(e,t.props.log))})):null},n.renderChangeDetails=function(e){var t=this,n=this.props,r=n.log,a=n.onContentClick;if(null==r.changes)return null;var o=0,l=r.changes.map((function(n,a){var l=n.oldValue,u=n.newValue,s=null;r.action===h.AuditLogActions.MEMBER_ROLE_UPDATE?s=t.renderRoleUpdate(n):r.targetType!==h.AuditLogTargetTypes.ROLE&&r.action!==h.AuditLogActions.CHANNEL_OVERWRITE_CREATE&&r.action!==h.AuditLogActions.CHANNEL_OVERWRITE_UPDATE||(s=t.renderPermissionUpdate(n)),r.action!==h.AuditLogActions.CHANNEL_UPDATE&&!h.AuditLogActions.CHANNEL_CREATE||n.key!==h.AuditLogChangeKeys.TYPE||(null!=l&&(l=(0,c.channelTypeString)({type:l})),null!=u&&(u=(0,c.channelTypeString)({type:u})));var d=e[n.key];if(M(r,n))return null;if("function"==typeof d&&(d=d(n)),null!=d&&"object"==typeof d){if(null==d.format){var p=d[n.newValue];null==p&&null!=d[f.DEFAULT_FOR_STRINGS_KEY]?d=d[f.DEFAULT_FOR_STRINGS_KEY]:null!=p&&(d=p)}var v;if(null!=d&&null!=d.format)d=d.format({user:r.user,target:r.target,oldValue:l,newValue:u,count:Array.isArray(u)?u.length:null,subtarget:null!==(v=r.options.subtarget)&&void 0!==v?v:null,newColorHook:function(e,t){return T("div",{className:E.default.colorHook,style:{backgroundColor:n.newValue}},t)},oldColorHook:function(e,t){return T("div",{className:E.default.colorHook,style:{backgroundColor:n.oldValue}},t)}})}if(!d)return console.warn("No change string for",n),null;var m=(0,i.default)(E.default.prefix,N[r.actionType]);return o++,T(y.default,{className:E.default.detail,style:{position:"relative",top:1}},a,T(y.default,{className:m,grow:0},void 0,T("div",{className:E.default.number},void 0,o<10?"0":null,o),T("div",{className:E.default.dash},void 0,"—")),T(y.default,{className:E.default.change,direction:y.default.Direction.VERTICAL},void 0,T("div",{className:E.default.changeStr},void 0,d),null!=s?T("div",{},void 0,s):null))}));return T(y.default,{onClick:a,className:E.default.changeDetails,direction:y.default.Direction.VERTICAL},void 0,l)},n.renderChangeSummary=function(){var e=this.props,t=e.expanded,n=e.log;if(t)switch(n.targetType){case h.AuditLogTargetTypes.GUILD:return this.renderChangeDetails(f.GuildChangeStrings());case h.AuditLogTargetTypes.CHANNEL:case h.AuditLogTargetTypes.CHANNEL_OVERWRITE:return this.renderChangeDetails(f.ChannelChangeStrings());case h.AuditLogTargetTypes.USER:return this.renderChangeDetails(f.UserChangeStrings());case h.AuditLogTargetTypes.ROLE:return this.renderChangeDetails(f.RoleChangeStrings());case h.AuditLogTargetTypes.INVITE:return this.renderChangeDetails(f.InviteChangeStrings());case h.AuditLogTargetTypes.WEBHOOK:return this.renderChangeDetails(f.WebhookChangeStrings());case h.AuditLogTargetTypes.EMOJI:return this.renderChangeDetails(f.EmojiChangeStrings());case h.AuditLogTargetTypes.STICKER:return this.renderChangeDetails(f.StickerChangeStrings());case h.AuditLogTargetTypes.INTEGRATION:return this.renderChangeDetails(f.IntegrationChangeStrings());case h.AuditLogTargetTypes.STAGE_INSTANCE:return this.renderChangeDetails(f.StageInstanceChangeStrings());case h.AuditLogTargetTypes.GUILD_SCHEDULED_EVENT:return this.renderChangeDetails(f.GuildScheduledEventChangeStrings());case h.AuditLogTargetTypes.THREAD:return this.renderChangeDetails(f.ThreadChangeStrings())}return null},n.render=function(){var e=this,t=this.props,n=t.log,r=t.className,a=t.expanded,u=t.onHeaderClick,s=this.hasChangesToRender(),d=E.default.headerDefault;a?d=E.default.headerExpanded:s&&(d=E.default.headerClickable);var f,c=n.timestampStart.calendar(),p=n.timestampEnd.calendar();f=c===p?T("div",{className:E.default.timestamp},void 0,c):T("div",{className:E.default.timestamp},void 0,c,"—",p);var g=s?u:h.NOOP;return T(l.ListNavigatorItem,{id:n.id},void 0,(function(t){var l;return T(y.default,{direction:y.default.Direction.VERTICAL,className:(0,i.default)(E.default.auditLog,r)},void 0,o.createElement(v.default,I({className:d,"aria-expanded":a,onClick:g},t),T(A,{action:n.action,actionType:n.actionType,targetType:n.targetType}),T(_.default,{className:E.default.avatar,src:null===(l=n.user)||void 0===l?void 0:l.getAvatarURL(void 0),"aria-hidden":!0,size:_.default.Sizes.SIZE_40}),T(y.default,{className:E.default.timeWrap,direction:y.default.Direction.VERTICAL},void 0,T(y.default.Child,{grow:1},void 0,e.renderTitle()),f),s?T(m.default,{className:E.default.expand,foreground:E.default.expandForeground,expanded:a,"aria-hidden":!0}):null),a?T("div",{className:E.default.divider}):null,e.renderChangeSummary())}))},t}(o.PureComponent);R.displayName="AuditLog";var L=R;t.default=L},function(e,t,n){e.exports=n.p+"99253cefda98913b1e9f7d155ad81ed3.svg"},function(e,t,n){e.exports=n.p+"0049cd2d5d8dad87fac3811fa651988e.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=x(n(0)),o=B(n(9)),i=B(n(8)),l=B(n(3)),u=n(389),s=B(n(199)),d=B(n(8254)),f=n(8305),c=B(n(1279)),p=B(n(9810)),v=B(n(8255)),y=B(n(160)),m=B(n(39)),_=B(n(12)),h=B(n(29)),E=B(n(61)),g=x(n(8302)),S=B(n(55)),O=B(n(5942)),I=B(n(151)),T=n(85),C=B(n(1165)),b=B(n(681)),M=x(n(474)),N=n(159),A=n(35),P=n(41),R=B(n(279)),L=B(n(24)),D=n(393),w=B(n(264)),j=n(1),k=B(n(6)),U=B(n(7705)),G=B(n(7347)),F=B(n(370));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function V(){return(V=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}).apply(this,arguments)}function W(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Y(e,t)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function K(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){K(o,r,a,i,l,"next",e)}function l(e){K(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Z(e){var t=e.transitionState,n=e.guild,r=e.user,o=e.ban,i=e.hideDiscriminator,l=e.onClose,u=(0,T.useUID)(),d=a.useState(!1),f=d[0],p=d[1],v=a.useState(null),y=v[0],m=v[1];function _(){return(_=$(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=n){e.next=2;break}return e.abrupt("return");case 2:return m(null),p(!0),e.prev=4,e.next=7,s.default.unbanUser(n.id,r.id);case 7:l(),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(4),m(new c.default(e.t0)),p(!1);case 14:case"end":return e.stop()}}),e,null,[[4,10]])})))).apply(this,arguments)}return z(A.ModalRoot,{className:U.default.bannedUserModal,transitionState:t,"aria-labelledby":u},void 0,z(A.ModalHeader,{justify:S.default.Justify.CENTER,id:u,className:U.default.header,separator:!1},void 0,z(L.default,{className:U.default.userUsername},void 0,r.toString()),i?null:z(L.default,{className:U.default.userDiscrim},void 0,"#",r.discriminator)),z(A.ModalContent,{className:U.default.content},void 0,z(L.default,{className:U.default.reasonHeader,size:L.default.Sizes.SIZE_12},void 0,k.default.Messages.BAN_REASON),z(L.default,{},void 0,o.reason||k.default.Messages.NO_BAN_REASON),null!=y?z(L.default,{className:U.default.error,color:L.default.Colors.STATUS_RED},void 0,y.getAnyErrorMessage()):null),z(A.ModalFooter,{},void 0,z(S.default,{justify:S.default.Justify.BETWEEN},void 0,z(h.default,{onClick:function(){return _.apply(this,arguments)},look:h.default.Looks.LINK,color:h.default.Colors.RED,submitting:f},void 0,k.default.Messages.REVOKE_BAN),z(h.default,{onClick:l},void 0,k.default.Messages.DONE))))}Z.displayName="BannedUserModal";var q=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleShowModal=function(){var e=t.props,n=e.guild,r=e.user,o=e.hideDiscriminator,i=e.ban;(0,P.openModal)((function(e){return a.createElement(Z,V({},e,{guild:n,user:r,ban:i,hideDiscriminator:o}))}))},t.handleContextMenu=function(e){(0,u.openContextMenu)(e,(function(e){return a.createElement(p.default,V({},e,{user:t.props.user}))}))},t}return W(t,e),t.prototype.render=function(){var e=this.props,t=e.user,n=e.hideDiscriminator,r=e.guild;return z(E.default,{className:(0,o.default)(U.default.bannedUser,G.default.card),onClick:this.handleShowModal,onContextMenu:this.handleContextMenu},void 0,z(R.default,{src:t.getAvatarURL(null==r?void 0:r.id),"aria-label":t.username,size:R.default.Sizes.SIZE_40,className:U.default.bannedUserAvatar}),z("div",{className:U.default.username},void 0,t.toString(),!n&&z("span",{className:U.default.discrim},void 0,"#",t.discriminator)))},t}(a.PureComponent);q.displayName="BannedUser";var X=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(t=e.call.apply(e,[this].concat(a))||this).getSortedBans=(0,D.cachedFunction)((function(e,n){return null!=e?(0,i.default)(e).keys().map(_.default.getUser).filter(t.makeFilter(n)).sortBy((function(e){return e.username.toLowerCase()})).value():[]})),t.getRowHeight=function(e,n){if(e>0)return 0;var r=t.props,a=r.bans,o=r.searchQuery,i=t.getSortedBans(a,o);if(0===i.length&&1===n)return 56;var l=i[n],u=null==a?void 0:a[(null==l?void 0:l.id)||""];return null==l||null==u?0:56},t.renderRow=function(e){var n=e.section,r=e.row,a=t.props,o=a.bans,i=a.streamerMode,l=a.guild,u=a.searchQuery;if(n>0)return null;if(null==o&&0===r)return z(I.default,{className:F.default.marginTop20,type:I.default.Type.SPINNING_CIRCLE},"spinner");var s=t.getSortedBans(o,u)[r],d=null==o?void 0:o[(null==s?void 0:s.id)||""];return null!=s&&null!=d?z(q,{user:s,ban:d,hideDiscriminator:i,guild:l},s.id):void 0},t.getSectionHeight=function(e){return e>0?0:null==t.props.bans?462:120},t.renderSection=function(){var e,r=t.props,a=r.bans,o=r.theme,l=r.searchQuery;null==a?e=null:i.default.isEmpty(a)&&(e=z(g.default,{theme:o,className:F.default.marginTop40},void 0,z(g.EmptyStateImage,{darkSrc:n(9811),lightSrc:n(9812),width:256,height:212}),z(g.EmptyStateText,{note:k.default.Messages.BANS_NO_USERS_BANNED,style:{maxWidth:300}},void 0,k.default.Messages.NO_BANS)));var u=(0,i.default)(a||{}).keys().value().length;return z(b.default,{tag:N.Tags.H1,title:k.default.Messages.BANS_HEADER.format({bans:u})},"bans-header",z(S.default,{justify:S.default.Justify.BETWEEN,align:S.default.Align.START},void 0,z(M.default,{type:M.Types.DESCRIPTION,className:F.default.marginBottom20},void 0,k.default.Messages.BANS_HINT.format({onModerationClick:t.handleModerationClick})),null==e&&z(O.default,{className:U.default.searchBar,query:l||"",placeholder:k.default.Messages.BANS_SEARCH_PLACEHOLDER,onChange:t.handleQueryChange,onClear:t.handleQueryClear})),z(C.default,{style:{marginBottom:-1}}),e)},t}W(t,e);var r=t.prototype;return r.makeFilter=function(e){if(null==e||0===e.length)return function(e){return null!=e};var t=new RegExp("^"+w.default.escape(e),"i");return function(e){return null!=e&&t.test(e.username)}},r.render=function(){var e=this.props,t=e.bans,n=e.guild,r=e.searchQuery;if(null==n)return null;var a=this.getSortedBans(t,r);return z(f.ListContentScroller,{sections:[Math.max(1,a.length)],sectionHeight:this.getSectionHeight,renderSection:this.renderSection,rowHeight:this.getRowHeight,renderRow:this.renderRow})},r.handleModerationClick=function(){d.default.setSection(j.GuildSettingsSections.MODERATION)},r.handleQueryChange=function(e){d.default.setSearchQuery(e)},r.handleQueryClear=function(){d.default.setSearchQuery("")},t}(a.PureComponent);X.displayName="GuildSettingsBans";var J=l.default.connectStores([v.default,m.default,y.default],(function(){var e=v.default.getProps(),t=e.bans,n=e.guild;return{searchQuery:e.searchQuery||"",bans:t,guild:n,theme:m.default.theme,streamerMode:y.default.hidePersonalInformation}}))(X);t.default=J},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;y(n(0));var r,a=n(389),o=p(n(8257)),i=p(n(8258)),l=y(n(8253)),u=p(n(11)),s=p(n(8343)),d=p(n(8324)),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.user,n=e.analyticsContext,r=e.onSelect,p=(0,d.default)(t.id),v=(0,i.default)(t.id),y=(0,s.default)(t.id);return u.default.isGuest()||t.isNonUserBot()?null:m(o.default,{context:n,object:f.AnalyticsObjects.CONTEXT_MENU},void 0,m(l.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":c.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:r},void 0,m(l.MenuGroup,{},void 0,p,y),m(l.MenuGroup,{},void 0,v)))}_.displayName="BannedUserContextMenu"},function(e,t,n){e.exports=n.p+"789de85a973b1d974a21aa03c1e14323.svg"},function(e,t,n){e.exports=n.p+"e3fb8fe698a871db1d0e34ededf8a954.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GuildSettingsCommunityOverviewNotice=void 0;var r,a=G(n(0)),o=k(n(9)),i=n(3),l=k(n(28)),u=k(n(8254)),s=k(n(8292)),d=n(180),f=n(1213),c=G(n(86)),p=k(n(8255)),v=k(n(40)),y=k(n(70)),m=k(n(39)),_=k(n(12)),h=k(n(29)),E=k(n(1159)),g=k(n(8272)),S=k(n(149)),O=n(131),I=k(n(681)),T=G(n(474)),C=G(n(159)),b=k(n(255)),M=k(n(466)),N=n(41),A=k(n(47)),P=k(n(24)),R=k(n(8986)),L=n(1),D=k(n(6)),w=k(n(7709)),j=k(n(9828));function k(e){return e&&e.__esModule?e:{default:e}}function U(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return U=function(){return e},e}function G(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=U();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function F(){return(F=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}).apply(this,arguments)}function B(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var H=function(){var e=(0,i.useStateFromStores)([p.default],(function(){return p.default.getProps()})),t=e.guild,n=e.submitting,r=(0,i.useStateFromStores)([m.default],(function(){return m.default.theme}));return B(s.default,{theme:r,submitting:n,onReset:function(){null!=t&&u.default.init(t.id)},onSave:function(){null!=t&&u.default.saveGuild(t.id,{rulesChannelId:t.rulesChannelId,preferredLocale:t.preferredLocale,publicUpdatesChannelId:t.publicUpdatesChannelId,description:t.description,features:t.features})}})};t.GuildSettingsCommunityOverviewNotice=H,H.displayName="GuildSettingsCommunityOverviewNotice";var x=B(b.default,{width:24,height:24}),V=function(e){var t=e.discoveryEnabled,n=e.welcomeScreenEnabled,r=a.useState(!0===l.default.get("dismissedCommunityFeaturesUpsell")),o=r[0],i=r[1];if(t&&n)return null;return o?null:B("div",{className:w.default.upsellContainer},void 0,B("div",{className:w.default.upsellContent},void 0,B("img",{src:j.default,alt:"",width:60,className:w.default.upsellImage}),B("div",{},void 0,B(A.default,{size:A.default.Sizes.SIZE_16,className:w.default.upsellHeader},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_UPSELL_HEADER),B(P.default,{},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_UPSELL_BODY))),B(h.default,{"aria-label":D.default.Messages.CLOSE,look:h.default.Looks.BLANK,size:h.default.Sizes.NONE,className:w.default.upsellClose,onClick:function(){l.default.set("dismissedCommunityFeaturesUpsell",!0),i(!0)}},void 0,x),B("div",{className:w.default.upsellFooter},void 0,n?null:B(h.default,{size:h.default.Sizes.SMALL,onClick:function(){u.default.setSection(L.GuildSettingsSections.COMMUNITY_WELCOME)},className:w.default.upsellButton},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_UPSELL_BUTTON_WELCOME_SCREEN),t?null:B(h.default,{size:h.default.Sizes.SMALL,onClick:function(){u.default.setSection(L.GuildSettingsSections.DISCOVERY)},className:w.default.upsellButton,color:h.default.Colors.PRIMARY},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_UPSELL_BUTTON_DISCOVERY),B(h.default,{size:h.default.Sizes.SMALL,onClick:function(){u.default.setSection(L.GuildSettingsSections.ANALYTICS)},className:w.default.upsellButton,color:h.default.Colors.PRIMARY},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_UPSELL_BUTTON_ANALYTICS)))};V.displayName="CommunityFeaturesUpsell";var W=function(){var e=(0,i.useStateFromStores)([p.default],(function(){return p.default.getProps()})).guild,t=(0,i.useStateFromStoresObject)([v.default],(function(){return{canManageGuild:v.default.can(L.Permissions.MANAGE_GUILD,e),isGuildAdmin:v.default.can(L.Permissions.ADMINISTRATOR,e)}})),n=t.canManageGuild,r=t.isGuildAdmin,s=(0,i.useStateFromStores)([c.default],(function(){return null!=e?c.default.getChannels(e.id):null})),m=!0!==l.default.get("dismissedCommunityFeaturesUpsell");if(null==e)return null;var b=[];null!=s&&s[c.GUILD_SELECTABLE_CHANNELS_KEY].forEach((function(e){var t=e.channel;t.type===L.ChannelTypes.GUILD_TEXT&&b.push({value:t.id,label:(0,d.computeChannelName)(t,_.default,y.default,!0)})}));var A=function(){if(null!=e){var t=new Set(e.features);t.delete(L.GuildFeatures.COMMUNITY),t.delete(L.GuildFeatures.DISCOVERABLE),t.delete(L.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED),t.delete(L.GuildFeatures.PREVIEW_ENABLED),u.default.updateGuild({features:t,rulesChannelId:null,publicUpdatesChannelId:null})}},R=function(e){var t=e.value;u.default.updateGuild({rulesChannelId:t})},j=function(e){var t=e.value;u.default.updateGuild({publicUpdatesChannelId:t})},k=function(e){var t=e.value;u.default.updateGuild({preferredLocale:t})},U=function(e){u.default.updateGuild({description:e})},G=function(){e.features.has(L.GuildFeatures.DISCOVERABLE)&&e.features.has(L.GuildFeatures.PARTNERED)?(0,N.openModal)((function(e){return a.createElement(M.default,F({},e,{header:D.default.Messages.GUILD_SETTINGS_COMMUNITY_DISABLE_PUBLIC_CONFIRM_DEFAULT_TITLE,confirmText:D.default.Messages.CONFIRM,cancelText:D.default.Messages.NEVERMIND,onConfirm:A}),B(P.default,{},void 0,D.default.Messages.GUILD_SETTINGS_PARTNER_AND_DISCOVERY_DISABLE_PUBLIC_CONFIRM_TEXT))})):e.features.has(L.GuildFeatures.DISCOVERABLE)?(0,N.openModal)((function(e){return a.createElement(M.default,F({},e,{header:D.default.Messages.GUILD_SETTINGS_COMMUNITY_DISABLE_PUBLIC_CONFIRM_DEFAULT_TITLE,confirmText:D.default.Messages.CONFIRM,cancelText:D.default.Messages.NEVERMIND,onConfirm:A}),B(P.default,{},void 0,D.default.Messages.GUILD_SETTINGS_DISCOVERY_DISABLE_PUBLIC_CONFIRM_TEXT))})):e.features.has(L.GuildFeatures.PARTNERED)?(0,N.openModal)((function(e){return a.createElement(M.default,F({},e,{header:D.default.Messages.GUILD_SETTINGS_COMMUNITY_DISABLE_PUBLIC_CONFIRM_DEFAULT_TITLE,confirmText:D.default.Messages.CONFIRM,cancelText:D.default.Messages.NEVERMIND,onConfirm:A}),B(P.default,{},void 0,D.default.Messages.GUILD_SETTINGS_PARTNER_DISABLE_PUBLIC_CONFIRM_TEXT))})):A()};return B(I.default,{title:D.default.Messages.GUILD_SETTINGS_COMMUNITY,tag:C.Tags.H1},void 0,m?B(V,{discoveryEnabled:e.features.has(L.GuildFeatures.DISCOVERABLE),welcomeScreenEnabled:e.features.has(L.GuildFeatures.WELCOME_SCREEN_ENABLED)}):null,B(I.default,{className:(0,o.default)(w.default.twoColumnFormSection,w.default.firstSection)},void 0,B("div",{className:w.default.descriptionColumn},void 0,B(C.default,{className:w.default.formTitle},void 0,D.default.Messages.FORM_LABEL_DISCOVERY_RULES_CHANNEL),B(T.default,{type:T.Types.DESCRIPTION,className:w.default.formDescription},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_RULES_CHANNEL_HELP)),B(E.default,{className:(0,o.default)(w.default.formSelect,w.default.selectColumn),value:e.rulesChannelId,clearable:!1,searchable:!0,options:b,onChange:R,disabled:!n})),B(O.FormDivider,{className:w.default.divider}),B(I.default,{className:(0,o.default)(w.default.twoColumnFormSection,w.default.firstSection)},void 0,B("div",{className:w.default.descriptionColumn},void 0,B(C.default,{className:w.default.formTitle},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_MOD_CHANNEL_TITLE),B(T.default,{type:T.Types.DESCRIPTION,className:w.default.formDescription},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_MOD_CHANNEL_HELP)),B(E.default,{className:(0,o.default)(w.default.formSelect,w.default.selectColumn),value:e.publicUpdatesChannelId,clearable:!1,searchable:!0,options:b,onChange:j,disabled:!n})),B(O.FormDivider,{className:w.default.divider}),B(I.default,{className:w.default.twoColumnFormSection},void 0,B("div",{className:w.default.descriptionColumn},void 0,B(C.default,{className:w.default.formTitle},void 0,D.default.Messages.FORM_LABEL_SERVER_LANGUAGE),B(T.default,{type:T.Types.DESCRIPTION,className:w.default.formDescription},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_LOCALE_HELP)),B(E.default,{className:(0,o.default)(w.default.formSelect,w.default.selectColumn),value:e.preferredLocale,clearable:!1,searchable:!0,options:f.LOCALE_OPTIONS,onChange:k,disabled:!n})),B(O.FormDivider,{className:w.default.divider}),function(){if(null!=e)return B(I.default,{},void 0,B(C.default,{className:w.default.formTitle},void 0,D.default.Messages.FORM_LABEL_SERVER_DESCRIPTION),B(T.default,{className:w.default.description,type:T.Types.DESCRIPTION},void 0,D.default.Messages.FORM_HELP_SERVER_DESCRIPTION),B(g.default,{value:e.description||"",placeholder:D.default.Messages.SERVER_DESCIPTION_EMPTY,onChange:U,maxLength:120,disabled:!n}))}(),B(O.FormDivider,{className:w.default.divider}),B(I.default,{className:w.default.twoColumnFormSection},void 0,B("div",{className:w.default.descriptionColumn},void 0,B(C.default,{className:w.default.formTitle},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_DISABLE_COMMUNITY),B(T.default,{type:T.Types.DESCRIPTION,className:w.default.formDescription},void 0,D.default.Messages.GUILD_SETTINGS_COMMUNITY_DISABLE_COMMUNITY_DESCRIPTION)),B(S.default,{text:r?null:D.default.Messages.GUILD_SETTINGS_COMMUNITY_ADMINISTRATOR_ONLY,"aria-label":r?void 0:D.default.Messages.GUILD_SETTINGS_COMMUNITY_ADMINISTRATOR_ONLY},void 0,(function(e){return a.createElement(h.default,F({size:h.default.Sizes.SMALL,onClick:G,color:h.default.Colors.RED,disabled:!r},e),D.default.Messages.GUILD_SETTINGS_COMMUNITY_DISABLE_COMMUNITY)}))))};W.displayName="GuildSettingsCommunitySettings";var Y=B(W,{}),z=function(){var e=(0,i.useStateFromStores)([p.default],(function(){return p.default.getProps()})).guild;return null==e?null:e.features.has(L.GuildFeatures.COMMUNITY)?Y:B(R.default,{guild:e})};t.default=z},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=x(n(0)),o=B(n(9)),i=B(n(63)),l=n(3),u=B(n(8254)),s=n(8459),d=n(180),f=B(n(8987)),c=x(n(86)),p=B(n(8255)),v=B(n(15)),y=B(n(70)),m=B(n(39)),_=B(n(12)),h=B(n(1160)),E=B(n(1159)),g=B(n(149)),S=n(85),O=x(n(474)),I=B(n(159)),T=B(n(1236)),C=B(n(47)),b=B(n(24)),M=B(n(93)),N=B(n(78)),A=n(8474),P=n(1),R=B(n(6)),L=B(n(7707)),D=B(n(9815)),w=B(n(9816)),j=B(n(9817)),k=B(n(9818)),U=B(n(9819)),G=B(n(9820)),F=B(n(8988));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function V(){return(V=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}).apply(this,arguments)}function W(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Y=function(e){var t=e.guild,n=e.onAcceptVerificationLevel,r=e.onAcceptContentFilter,a=e.disableContentFilter,o=e.disableVerificationLevel,i=e.headerId,u=e.theme,s=(0,l.useStateFromStores)([v.default],(function(){return v.default.getGuild(t.id)}),[t.id]),d=null!=s&&s.verificationLevel>P.VerificationLevels.NONE,f=(null==s?void 0:s.explicitContentFilter)===P.GuildExplicitContentFilterTypes.ALL_MEMBERS,c=u===P.ThemeTypes.DARK?U.default:G.default;return W("div",{className:L.default.container},void 0,W("div",{className:L.default.content},void 0,W("img",{alt:"",src:c,width:80}),W(C.default,{size:C.default.Sizes.SIZE_24,className:L.default.header,id:i},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_1_HEADER),W(b.default,{color:b.default.Colors.CUSTOM,size:b.default.Sizes.SIZE_16,className:L.default.headerCaption},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_1_BODY)),W("div",{className:L.default.form},void 0,W(I.default,{},void 0,R.default.Messages.FORM_LABEL_VERIFICATION_LEVEL),W(O.default,{type:O.Types.DESCRIPTION,className:L.default.description},void 0,d?R.default.Messages.ENABLE_COMMUNITY_MODAL_VERIFICATION_LEVEL_MET:R.default.Messages.ENABLE_COMMUNITY_MODAL_VERIFICATION_LEVEL_HELP),W(h.default,{type:h.default.Types.ROW,disabled:o,value:t.verificationLevel>P.VerificationLevels.NONE,onChange:n},void 0,W(b.default,{},void 0,R.default.Messages.ENABLE_PUBLIC_MODAL_VERIFICATION_LEVEL_DESCRIPTION))),W("div",{className:L.default.form},void 0,W(I.default,{},void 0,R.default.Messages.FORM_LABEL_EXPLICIT_CONTENT_FILTER),W(O.default,{type:O.Types.DESCRIPTION,className:L.default.description},void 0,f?R.default.Messages.ENABLE_COMMUNITY_MODAL_CONTENT_FILTER_MET:R.default.Messages.ENABLE_PUBLIC_MODAL_CONTENT_FILTER_HELP),W(h.default,{type:h.default.Types.ROW,disabled:a,value:t.explicitContentFilter===P.GuildExplicitContentFilterTypes.ALL_MEMBERS,onChange:r},void 0,W(b.default,{},void 0,R.default.Messages.EXPLICIT_CONTENT_FILTER_HIGH))))};Y.displayName="EnableCommunityModalFirstStep";var z=function(e){var t=e.selectableChannels,n=e.onRuleChannelChange,r=e.ruleChannel,a=e.onPublicUpdatesChannelChange,o=e.publicUpdatesChannel,i=e.headerId,l=e.theme===P.ThemeTypes.DARK?D.default:w.default;return W("div",{className:L.default.container},void 0,W("div",{className:L.default.content},void 0,W("img",{alt:"",src:l,width:80}),W(C.default,{size:C.default.Sizes.SIZE_24,className:L.default.header,id:i},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_2_HEADER),W(b.default,{color:b.default.Colors.CUSTOM,size:b.default.Sizes.SIZE_16,className:L.default.headerCaption},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_2_BODY)),W("div",{className:L.default.form},void 0,W(I.default,{},void 0,R.default.Messages.ENABLE_PUBLIC_MODAL_RULES_CHANNEL_TITLE),W(O.default,{type:O.Types.DESCRIPTION,className:L.default.description},void 0,R.default.Messages.ENABLE_PUBLIC_MODAL_RULES_CHANNEL_HELP),W(E.default,{clearable:!1,searchable:!0,options:t,onChange:n,value:r,maxMenuHeight:200})),W("div",{className:L.default.form},void 0,W(I.default,{},void 0,R.default.Messages.GUILD_SETTINGS_COMMUNITY_MOD_CHANNEL_TITLE),W(O.default,{type:O.Types.DESCRIPTION,className:L.default.description},void 0,R.default.Messages.GUILD_SETTINGS_COMMUNITY_MOD_CHANNEL_HELP),W(E.default,{clearable:!1,searchable:!0,options:t,menuPlacement:E.default.MenuPlacements.TOP,onChange:a,value:o,maxMenuHeight:200})))};z.displayName="EnableCommunityModalSecondStep";var K=function(e){var t=e.guild,n=e.policyAccepted,r=e.everyoneRolePermissionsAccepted,i=e.onAcceptPolicy,l=e.onAcceptDefaultNotifications,u=e.onAcceptEveryoneRolePermissions,s=e.disableDefaultNotifications,d=e.disableEveryoneRolePermissions,f=e.headerId,c=e.theme===P.ThemeTypes.DARK?j.default:k.default;return W("div",{className:L.default.container},void 0,W("div",{className:L.default.content},void 0,W("img",{alt:"",src:c,width:80}),W(C.default,{size:C.default.Sizes.SIZE_24,className:L.default.header,id:f},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_3_HEADER),W(b.default,{color:b.default.Colors.CUSTOM,size:b.default.Sizes.SIZE_16,className:L.default.headerCaption},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_3_BODY)),W("div",{className:L.default.form},void 0,W(g.default,{text:s?R.default.Messages.ENABLE_COMMUNITY_MODAL_REQUIREMENT_SATISFIED_TOOLTIP:null,"aria-label":!!s&&R.default.Messages.ENABLE_COMMUNITY_MODAL_REQUIREMENT_SATISFIED_TOOLTIP},void 0,(function(e){var n;return a.createElement("div",e,W(h.default,{type:h.default.Types.ROW,disabled:s,value:t.defaultMessageNotifications===P.UserNotificationSettings.ONLY_MENTIONS,onChange:l,className:(0,o.default)((n={},n[L.default.disabled]=s,n))},void 0,W(b.default,{},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_DEFAULT_NOTIFICATIONS_LABEL.format({infoHook:function(){return W(g.default,{text:R.default.Messages.ENABLE_COMMUNITY_MODAL_DEFAULT_NOTIFICATIONS_TOOLTIP,"aria-label":R.default.Messages.ENABLE_COMMUNITY_MODAL_DEFAULT_NOTIFICATIONS_TOOLTIP},void 0,(function(e){return a.createElement(T.default,V({className:L.default.icon},e))}))}}))))}))),W(g.default,{text:d?R.default.Messages.ENABLE_COMMUNITY_MODAL_REQUIREMENT_SATISFIED_TOOLTIP:null,"aria-label":!!d&&R.default.Messages.ENABLE_COMMUNITY_MODAL_REQUIREMENT_SATISFIED_TOOLTIP},void 0,(function(e){var t;return a.createElement("div",V({},e,{className:L.default.checkboxOption}),W(h.default,{type:h.default.Types.ROW,disabled:d,value:r,onChange:u,className:(0,o.default)((t={},t[L.default.disabled]=d,t))},void 0,W(b.default,{},void 0,R.default.Messages.ENABLE_COMMUNITY_MODAL_EVERYONE_ROLE_PERMISSION_LABEL.format({infoHook:function(){return W(g.default,{text:R.default.Messages.ENABLE_COMMUNITY_MODAL_EVERYONE_ROLE_PERMISSION_TOOLTIP,"aria-label":R.default.Messages.ENABLE_COMMUNITY_MODAL_EVERYONE_ROLE_PERMISSION_TOOLTIP},void 0,(function(e){return a.createElement(T.default,V({className:L.default.icon},e))}))}}))))})),W("div",{className:L.default.form},void 0,W(I.default,{},void 0,R.default.Messages.PUBLIC_GUILD_POLICY_TITLE),W(O.default,{type:O.Types.DESCRIPTION,className:L.default.description},void 0,R.default.Messages.COMMUNITY_POLICY_HELP.format({helpdeskArticle:M.default.getArticleURL(P.HelpdeskArticles.PUBLIC_GUILD_GUILDLINES)})),W(h.default,{type:h.default.Types.ROW,value:n,onChange:i},void 0,W(b.default,{},void 0,R.default.Messages.PUBLIC_GUILD_POLICY_ACCEPT))))};K.displayName="EnableCommunityModalFinalStep";var $=function(e){var t=e.transitionState,n=e.onClose,r=(0,l.useStateFromStoresObject)([p.default],(function(){return p.default.getProps()})).guild,o=(0,l.useStateFromStores)([m.default],(function(){return m.default.theme})),v=a.useState(!1),h=v[0],E=v[1],g=a.useState(!A.MODERATOR_PERMISSIONS.some((function(e){return N.default.canEveryone(e,r)}))),O=g[0],I=g[1],T=a.useState(A.CREATE_NEW_CHANNEL_VALUE),C=T[0],b=T[1],M=a.useState(A.CREATE_NEW_CHANNEL_VALUE),D=M[0],w=M[1],j=a.useState(null==r?void 0:r.defaultMessageNotifications)[0],k=a.useState(null==r?void 0:r.verificationLevel)[0],U=a.useState(null==r?void 0:r.explicitContentFilter)[0],G=a.useState(O)[0],B=null==r?void 0:r.getRole(null==r?void 0:r.id),H=(0,l.useStateFromStores)([c.default],(function(){return null!=r?c.default.getChannels(r.id):null}),[r]),x=(0,S.useUID)();if(null==r)return null;var $=[{value:A.CREATE_NEW_CHANNEL_VALUE,label:R.default.Messages.ENABLE_PUBLIC_MODAL_CREATE_CHANNEL}];H[c.GUILD_SELECTABLE_CHANNELS_KEY].forEach((function(e){var t=e.channel;t.type===P.ChannelTypes.GUILD_TEXT&&$.push({value:t.id,label:(0,d.computeChannelName)(t,_.default,y.default,!0)})}));var Z=k!==P.VerificationLevels.NONE,q=U===P.GuildExplicitContentFilterTypes.ALL_MEMBERS,X=j===P.UserNotificationSettings.ONLY_MENTIONS,J=G,Q=W(Y,{guild:r,disableVerificationLevel:Z,disableContentFilter:q,onAcceptVerificationLevel:function(e,t){t?t&&u.default.updateGuild({verificationLevel:P.VerificationLevels.LOW}):u.default.updateGuild({verificationLevel:k})},onAcceptContentFilter:function(e,t){t?u.default.updateGuild({explicitContentFilter:P.GuildExplicitContentFilterTypes.ALL_MEMBERS}):u.default.updateGuild({explicitContentFilter:U})},headerId:x,theme:o}),ee=W(z,{selectableChannels:$,onRuleChannelChange:function(e){var t=e.value;b(t)},onPublicUpdatesChannelChange:function(e){var t=e.value;w(t)},ruleChannel:C,publicUpdatesChannel:D,headerId:x,theme:o}),te=W(K,{guild:r,disableDefaultNotifications:X,disableEveryoneRolePermissions:J,policyAccepted:h,everyoneRolePermissionsAccepted:O,onAcceptPolicy:function(e,t){E(!!t)},onAcceptDefaultNotifications:function(e,t){t?u.default.updateGuild({defaultMessageNotifications:P.UserNotificationSettings.ONLY_MENTIONS}):u.default.updateGuild({defaultMessageNotifications:j})},onAcceptEveryoneRolePermissions:function(e,t){null!=B&&I(!!t)},headerId:x,theme:o}),ne=W("img",{alt:"",src:F.default,className:L.default.footerImage,width:240}),re=[{modalContent:Q,disableNextStep:r.explicitContentFilter!==P.GuildExplicitContentFilterTypes.ALL_MEMBERS||r.verificationLevel===P.VerificationLevels.NONE,overviewTitle:R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_1_TITLE},{modalContent:ee,disableNextStep:null==C||null==D,overviewTitle:R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_2_TITLE},{modalContent:te,disableNextStep:!h,overviewTitle:R.default.Messages.ENABLE_COMMUNITY_MODAL_STEP_3_TITLE}];return W(f.default,{stepData:re,title:R.default.Messages.ENABLE_COMMUNITY_MODAL_TITLE,transitionState:t,onClose:n,completeButtonText:R.default.Messages.ENABLE_COMMUNITY_BUTTON_TEXT,onComplete:function(){if(null!=B&&h){var e=new Set(r.features);e.add(P.GuildFeatures.COMMUNITY);var t=O?i.default.remove(B.permissions,A.MODERATOR_PERMISSIONS_FLAG):B.permissions,n=V({},B,{permissions:t});u.default.updateGuild({features:e,rulesChannelId:C,publicUpdatesChannelId:D}),u.default.saveGuild(r.id,{features:e,rulesChannelId:C,verificationLevel:r.verificationLevel,explicitContentFilter:r.explicitContentFilter,publicUpdatesChannelId:D,defaultMessageNotifications:r.defaultMessageNotifications}),t!==B.permissions&&(0,s.saveRoleSettings)(r.id,[n])}},overviewFooter:ne,sequencerClassName:L.default.container})};$.displayName="EnableCommunityModal";var Z=$;t.default=Z},function(e,t,n){e.exports=n.p+"78aa59ccfc53326f0459a72541bd9a51.svg"},function(e,t,n){e.exports=n.p+"896f03c6652b88b11ec2587ee4121198.svg"},function(e,t,n){e.exports=n.p+"4a5245103f9ed585ea37487ecabae871.svg"},function(e,t,n){e.exports=n.p+"803b292832d042cb5983e1096eff8c9b.svg"},function(e,t,n){e.exports=n.p+"fe3d06954b50aa53b1a088b1caa1462a.svg"},function(e,t,n){e.exports=n.p+"6b1c2a6dff0f80b740220b790ea29837.svg"},function(e,t,n){e.exports=n.p+"a00896b9b5af1ccebeb80816b71995d0.svg"},function(e,t,n){e.exports=n.p+"614d2dd57ee7dce69074063e93438add.png"},function(e,t,n){e.exports=n.p+"17150afdf12eb23743d4d53915b05355.png"},function(e,t,n){e.exports=n.p+"94dc6f30a819026fa295d85f1f72b4ab.svg"},function(e,t,n){e.exports=n.p+"908c2d8370ee8df51ee0b28245778206.png"},function(e,t,n){e.exports=n.p+"8639f5f6242256805bc4f4bb19c2b23b.png"},function(e,t,n){e.exports=n.p+"054d740c3f3a4ebc8823ab52ea3070cf.png"},function(e,t,n){e.exports=n.p+"5ac53bbce4bc51dd14d5413bd7d1c77d.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(3),l=I(n(2)),u=I(n(5938)),s=I(n(8451)),d=I(n(8255)),f=I(n(29)),c=I(n(55)),p=I(n(151)),v=I(n(681)),y=I(n(159)),m=I(n(47)),_=I(n(24)),h=n(48),E=I(n(9830)),g=I(n(6)),S=I(n(7712)),O=I(n(7377));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e[e.LOADING=0]="LOADING",e[e.INTRO=1]="INTRO",e[e.SETTINGS=2]="SETTINGS"}(a||(a={}));var b=function(e){var t=e.setWelcomeView,r=e.setShowCreateModal,o=[{emoji:"💬",description:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_CHANNEL_DESCRIPTION_1,name:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_CHANNEL_NAME_1},{emoji:"🏹",description:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_CHANNEL_DESCRIPTION_2,name:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_CHANNEL_NAME_2},{emoji:"🗞",description:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_CHANNEL_DESCRIPTION_3,name:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_CHANNEL_NAME_3}];return C(v.default,{title:g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME,tag:v.default.Tags.H2},void 0,C("div",{className:S.default.welcomeDescription},void 0,C(_.default,{size:_.default.Sizes.SIZE_14},void 0,g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_INTRO_TEXT.format()),C(f.default,{onClick:function(){r(!0),t(a.SETTINGS)}},void 0,g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_INTRO_BUTTON)),C("div",{className:S.default.exampleContainer},void 0,C("div",{className:S.default.exampleWumpus},void 0,C("img",{className:S.default.wumpus,alt:"",src:n(8767)}),C("div",{className:S.default.tooltipPointer}),C("div",{className:S.default.tooltip},void 0,g.default.Messages.GUILD_SETTINGS_EXAMPLE_TOOLTIP)),C(c.default,{direction:c.default.Direction.VERTICAL,align:c.default.Align.CENTER,className:S.default.exampleModal},void 0,C("img",{alt:"",className:O.default.guildIcon,src:n(8973),width:64,height:64}),C(m.default,{size:m.default.Sizes.SIZE_24,className:S.default.header},void 0,g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_TITLE.format()),C(_.default,{size:_.default.Sizes.SIZE_14,color:_.default.Colors.HEADER_SECONDARY,className:O.default.guildDescription},void 0,g.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_EXAMPLE_DESCRIPTION),C(y.default,{className:O.default.choiceHeader},void 0,g.default.Messages.WELCOME_SCREEN_CHOICE_HEADER),C("div",{className:O.default.options},void 0,o.map((function(e){return C(c.default,{align:c.default.Align.CENTER,className:S.default.optionContainer},e.name,C(u.default,{emojiName:e.emoji,className:O.default.optionEmoji}),C("div",{className:O.default.optionTextContainer},void 0,C(_.default,{size:_.default.Sizes.SIZE_16,className:O.default.channelDescription},void 0,e.description),C(_.default,{size:_.default.Sizes.SIZE_12,color:_.default.Colors.HEADER_SECONDARY},void 0,"#"+e.name)))}))))))};b.displayName="GuildSettingsCommunityWelcomeIntro";var M=function(){var e=(0,i.useStateFromStores)([d.default],(function(){return d.default.getProps()})).guild,t=o.useState(a.LOADING),n=t[0],r=t[1],u=o.useState(!1),f=u[0],c=u[1];switch(o.useEffect((function(){null!=e&&l.default.wait((function(){s.default.fetchWelcomeScreen(e.id).then((function(e){r(null==e?a.INTRO:a.SETTINGS)}))}))}),[e]),n){case a.LOADING:return C(p.default,{type:p.default.Type.SPINNING_CIRCLE});case a.INTRO:return C(b,{setWelcomeView:r,setShowCreateModal:c});case a.SETTINGS:return C(E.default,{guild:e,showCreateModal:f});default:return(0,h.assertNever)(n)}};t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=V();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=x(n(9)),i=x(n(130)),l=n(5941),u=n(92),s=n(3),d=n(389),f=x(n(5938)),c=x(n(105)),p=x(n(180)),v=x(n(8451)),y=x(n(8679)),m=x(n(8989)),_=x(n(8990)),h=x(n(9831)),E=x(n(8932)),g=x(n(10)),S=x(n(249)),O=x(n(29)),I=x(n(55)),T=x(n(375)),C=x(n(371)),b=x(n(8272)),M=n(131),N=x(n(681)),A=x(n(159)),P=x(n(8307)),R=x(n(372)),L=x(n(1215)),D=x(n(8565)),w=n(41),j=x(n(47)),k=x(n(24)),U=x(n(13)),G=x(n(78)),F=n(1),B=x(n(6)),H=x(n(7711));function x(e){return e&&e.__esModule?e:{default:e}}function V(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return V=function(){return e},e}function W(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Y(){return(Y=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}).apply(this,arguments)}var z=function(e){var t,n,r=e.guildId,i=e.welcomeChannel,c=e.onEdit,v=e.onChannelReorder,y=e.isDropHovered,E=e.index,I=a.useState(!1),T=I[0],C=I[1],b=a.useRef(null),M=(0,s.useStateFromStores)([g.default],(function(){return g.default.getChannel(i.channel_id)})),N=(0,s.useStateFromStores)([S.default],(function(){return null!=i.emoji_id?S.default.getUsableCustomEmojiById(i.emoji_id):null})),A=null!=M&&G.default.canEveryoneRole(F.Permissions.VIEW_CHANNEL,M),R=(0,p.default)(M,!0);if((0,(0,l.useDrag)({item:{type:"WELCOME_CHANNEL",channel:i,index:E},end:function(e,t){null==e||t.didDrop()||v(e.channel,null,!0)}})[1])((0,(0,l.useDrop)({accept:"WELCOME_CHANNEL",hover:function(e){v(e.channel,E,!1)},drop:function(e){v(e.channel,E,!0)}})[1])(b)),A)if(null!=N||null!=i.emoji_name){var L;n=W(f.default,{className:(0,o.default)((L={},L[H.default.disabledEmoji]=null!=(null==N?void 0:N.id),L)),emojiId:null==N?void 0:N.id,emojiName:null!=N?N.name:i.emoji_name,animated:Boolean(null==N?void 0:N.animated)})}else n=W(P.default,{width:24,height:24,className:H.default.channelIcon});else n=W(D.default,{width:24,height:24,className:H.default.warningIcon});return a.createElement("div",{className:(0,o.default)(H.default.welcomeChannel,(t={},t[H.default.dragging]=y,t)),ref:b,onContextMenu:function(e){(0,d.openContextMenu)(e,(function(e){return a.createElement(h.default,Y({},e,{guildId:r,welcomeChannel:i,onChannelReorder:v,setShowConfirmModal:C,onEdit:c,index:E}))}))}},n,W("div",{className:H.default.channelDescriptionWrapper},void 0,W(k.default,{size:k.default.Sizes.SIZE_16,color:k.default.Colors.HEADER_PRIMARY,className:H.default.channelDescription},void 0,i.description),W(k.default,{size:k.default.Sizes.SIZE_12,color:A?k.default.Colors.HEADER_SECONDARY:k.default.Colors.CUSTOM,className:A?null:H.default.channelWarning},void 0,A?R:B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_INVALID_CHANNEL)),W(O.default,{color:O.default.Colors.GREY,size:O.default.Sizes.SMALL,onClick:function(){return(0,w.openModal)((function(e){return a.createElement(m.default,Y({},e,{welcomeChannel:i,guildId:r,onSave:c}))}),{onCloseRequest:function(){return u.NOOP_NULL}})}},void 0,B.default.Messages.EDIT),T&&W(_.default,{onConfirm:function(){return c()},onCancel:function(){return C(!1)},channelId:i.channel_id}))};z.displayName="GuildWelcomeChannelRow";var K=function(e){var t,n,r=e.guild,l=e.showCreateModal,d=(0,s.useStateFromStores)([y.default],(function(){return y.default.getSettingsProps()})),f=d.welcomeSettings,p=d.originalWelcomeSettings,_=(0,s.useStateFromStores)([c.default],(function(){return c.default.useReducedMotion})),h=a.useState(null),g=h[0],S=h[1],P=a.useState(!1),D=P[0],G=P[1],x=a.useState(!1),V=x[0],K=x[1],$=f.description,Z=f.channels,q=f.enabled,X=function(e){null!=r&&((0,i.default)(e,p.channels)||(v.default.saveWelcomeScreen(r.id,{channels:e}),G(!0)))},J=function(e){null!=r&&e!==p.enabled&&(v.default.saveWelcomeScreen(r.id,{enabled:e}),K(!_),G(!0))},Q=function(e){if(null!=e){var t=[].concat(null!=Z?Z:[],[e]);v.default.updateSettings({channels:t}),X(t)}},ee=function(e){return function(t){var n=[].concat(null!=Z?Z:[]);null==t?n.splice(e,1):n[e]=t,v.default.updateSettings({channels:n}),X(n),0===n.length&&q&&(v.default.updateSettings({enabled:!1}),J(!1))}},te=function(e,t,n){if(null!=Z){var r=Z.indexOf(e),a=[].concat(Z);null!=t&&t!==r&&(a.splice(r,1),a.splice(t,0,e),v.default.updateSettings({channels:a})),n?(X(a),S(null)):S(t)}},ne=a.useRef(!1);return a.useEffect((function(){return null!=r&&l&&(0,w.openModal)((function(e){return a.createElement(m.default,Y({},e,{guildId:r.id,onSave:Q}))}),{onCloseRequest:function(){return u.NOOP_NULL}}),function(){ne.current=!0}}),[]),a.useEffect((function(){return function(){if(ne.current&&D){var e=[],t=[],n=!1;null==Z||Z.forEach((function(r){e.push(r.description),t.push(r.channel_id),null!=r.emoji_id&&(n=!0)})),U.default.track(F.AnalyticEvents.GUILD_WELCOME_SCREEN_SETTINGS_UPDATED,{guild_id:null==r?void 0:r.id,options:e,options_channel_ids:t,guild_description:$,has_custom_emojis:n,is_enabled:q})}}}),[D,Z,$,q,r,ne]),null==r?null:W(N.default,{title:B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME,tag:N.default.Tags.H2},void 0,W(k.default,{className:H.default.description,size:k.default.Sizes.SIZE_14},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_SETTINGS_TEXT),W(I.default,{align:I.default.Align.CENTER,className:H.default.enableContainer},void 0,q?W(R.default,{width:24,height:24,className:(0,o.default)(H.default.activeCircle,(t={},t[H.default.animate]=V,t))}):W(L.default,{width:24,height:24,className:(0,o.default)(H.default.editCircle,(n={},n[H.default.animate]=V,n))}),q?W(I.default.Child,{className:H.default.enableDescription},void 0,W(k.default,{},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_ENABLED),W(k.default,{},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_ENABLED_SECOND_LINE)):W(I.default.Child,{className:H.default.enableDescription},void 0,W(k.default,{},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_PROGRESS_WILL_SAVE),W(k.default,{},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_ENABLE_REMINDER)),W(I.default,{grow:0,justify:I.default.Justify.END},void 0,W(O.default,{disabled:0===(null==Z?void 0:Z.length),className:H.default.previewButton,look:O.default.Looks.LINK,size:O.default.Sizes.SMALL,onClick:function(){null!=r&&(0,w.openModal)((function(e){return a.createElement(E.default,Y({},e,{guildId:r.id,isPreview:!0}))}))},color:O.default.Colors.PRIMARY},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_PREVIEW),W(O.default,{disabled:!q&&0===(null==Z?void 0:Z.length),size:O.default.Sizes.SMALL,color:q?O.default.Colors.RED:O.default.Colors.BRAND,onClick:function(){J(!q)}},void 0,q?B.default.Messages.DISABLE:B.default.Messages.ENABLE))),W("div",{className:H.default.previewContainer},void 0,W(I.default,{className:H.default.welcomeHeader,direction:I.default.Direction.VERTICAL},void 0,W(C.default,{size:C.default.Sizes.LARGER,className:H.default.icon,guild:r,animate:!0,tabIndex:-1}),W(j.default,{className:H.default.welcomeTitle,tag:j.default.Tags.H1,size:j.default.Sizes.SIZE_24},void 0,B.default.Messages.WELCOME_SCREEN_TITLE.format({guildName:r.name,guildNameHook:function(e,t){return W("span",{},t,W(T.default,{guild:r,className:H.default.headerGuildBadge,flowerStarClassName:H.default.flowerStar}),W("strong",{},void 0,e))}})),W("div",{className:H.default.descriptionWrapper},void 0,W(b.default,{className:H.default.descriptionInput,placeholder:B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_DESCRIPTION_PLACEHOLDER,onChange:function(e){v.default.updateSettings({description:e})},onBlur:function(){null!=r&&$!==p.description&&(v.default.saveWelcomeScreen(r.id,{description:null==$?void 0:$.trim()}),G(!0))},onKeyDown:function(e){e.keyCode===F.KeyboardKeys.ENTER&&e.preventDefault()},value:$,maxLength:140}))),W(M.FormDivider,{className:H.default.divider}),W(I.default,{className:H.default.welcomeChannels,direction:I.default.Direction.VERTICAL},void 0,W(A.default,{},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_RECOMMENDED_CHANNELS_TITLE),W(k.default,{size:k.default.Sizes.SIZE_14,className:H.default.addChannelSubtext},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_RECOMMENDED_CHANNELS_DESCRIPTION),null==Z?void 0:Z.map((function(e,t){return W(z,{guildId:r.id,welcomeChannel:e,onEdit:ee(t),onChannelReorder:te,isDropHovered:t===g,index:t},t)})),(null==Z||Z.length<5)&&W(O.default,{onClick:function(){return(0,w.openModal)((function(e){return a.createElement(m.default,Y({},e,{guildId:r.id,onSave:Q}))}),{onCloseRequest:function(){return u.NOOP_NULL}})},className:H.default.addChannelButton,color:O.default.Colors.PRIMARY},void 0,B.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_ADD_RECOMMENDED_CHANNEL))))};K.displayName="GuildSettingsCommunityWelcomeSettings";var $=K;t.default=$},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=y(n(0)),o=n(3),i=n(389),l=y(n(8253)),u=n(8256),s=n(41),d=p(n(8523)),f=p(n(8989)),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(e){var t,n=e.guildId,r=e.welcomeChannel,p=e.onEdit,v=e.onChannelReorder,y=e.setShowConfirmModal,h=e.index,E=e.onSelect,g=(0,o.useStateFromStores)([d.default],(function(){return d.default.get(n)})),S=(null!==(t=null==g?void 0:g.welcome_channels)&&void 0!==t?t:[]).length-1,O=function(e){v(r,e,!0)};return _(l.default,{navId:"welcome-settings-context","aria-label":c.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onClose:i.closeContextMenu,onSelect:E},void 0,_(l.MenuGroup,{},void 0,_(l.MenuItem,{id:"move-up",label:c.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_CHANNEL_MOVE_UP,disabled:h<=0,action:function(){return O(h-1)}}),_(l.MenuItem,{id:"move-down",label:c.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_CHANNEL_MOVE_DOWN,disabled:h>S,action:function(){return O(h+1)}})),_(l.MenuGroup,{},void 0,_(l.MenuItem,{id:"edit",label:c.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_CHANNEL_EDIT,action:function(){return(0,s.openModal)((function(e){return a.createElement(f.default,m({},e,{welcomeChannel:r,guildId:n,onSave:p}))}))}}),_(l.MenuItem,{id:"delete",label:c.default.Messages.GUILD_SETTINGS_PUBLIC_WELCOME_CHANNEL_DELETE,action:function(){return y(!0)},color:u.MenuItemColor.DANGER})))};h.displayName="WelcomeChannelsSettingsContextMenu";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GuildSettingsDiscoveryNotice=void 0;var r,a=Z(n(0)),o=K(n(3)),i=K(n(8254)),l=K(n(8338)),u=K(n(8327)),s=K(n(8292)),d=n(8305),f=K(n(9833)),c=n(180),p=n(8991),v=n(1213),y=n(9834),m=K(n(8533)),_=n(9835),h=Z(n(8578)),E=K(n(8483)),g=K(n(9836)),S=K(n(8992)),O=n(8591),I=Z(n(86)),T=K(n(8255)),C=K(n(40)),b=K(n(70)),M=K(n(12)),N=K(n(29)),A=K(n(61)),P=K(n(1159)),R=K(n(149)),L=n(131),D=K(n(681)),w=Z(n(474)),j=Z(n(159)),k=K(n(255)),U=n(41),G=K(n(24)),F=K(n(150)),B=n(701),H=n(193),x=K(n(9838)),V=K(n(9842)),W=n(1),Y=K(n(6)),z=K(n(7720));function K(e){return e&&e.__esModule?e:{default:e}}function $(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return $=function(){return e},e}function Z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=$();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function q(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function X(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function J(){return(J=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}).apply(this,arguments)}function Q(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var te=o.default.connectStores([T.default],(function(){var e=T.default.getProps(),t=e.guild,n=e.originalGuild,r=e.submitting,a=e.guildMetadata;return{guild:t,submitting:r,onReset:function(){null!=t&&i.default.init(t.id)},onSave:function(){null!=t&&((0,_.trackDiscoverySettingsChange)(t,n),i.default.saveGuild(t.id,{features:t.features,discoverySplash:t.discoverySplash,description:t.description,rulesChannelId:t.rulesChannelId,preferredLocale:t.preferredLocale}),h.saveGuildMetadata(t.id,a.primaryCategoryId,a.keywords,a.emojiDiscoverabilityEnabled,a.partnerActionedTimestamp,a.partnerApplicationTimestamp))}}}))(s.default);t.GuildSettingsDiscoveryNotice=te;var ne=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={discoverableGuild:null},t.handleToggleDiscovery=function(){var e=t.props.guild;if(null!=e){var n=new Set(e.features);e.hasFeature(W.GuildFeatures.DISCOVERABLE)?n.delete(W.GuildFeatures.DISCOVERABLE):n.add(W.GuildFeatures.DISCOVERABLE),i.default.updateGuild({features:n})}},t.handleEnableDiscovery=function(e){var n=t.props.guild;if(null!=n){var r=new Set(n.features);if(!n.hasFeature(W.GuildFeatures.DISCOVERABLE)){r.add(W.GuildFeatures.DISCOVERABLE),i.default.updateGuild({features:r}),null!=e&&e.scrollTo({to:0});var o=(0,U.openModal)((function(e){var t=e.onClose,o=Q(e,["onClose"]);return a.createElement(g.default,J({guildName:n.name,onClose:function(){i.default.saveGuild(n.id,{features:r}),t()}},o))}),{onCloseRequest:function(){i.default.saveGuild(n.id,{features:r}),(0,U.closeModal)(o)}})}}},t.handleSplashChange=function(e){i.default.updateGuild({discoverySplash:e})},t.handleLocaleChange=function(e){var t=e.value;i.default.updateGuild({preferredLocale:t})},t.handlePrimaryCategoryChange=function(e){var n=t.props.guild;null!=(null==n?void 0:n.id)&&h.updateGuildPrimaryCategory(null==n?void 0:n.id,(null==e?void 0:e.value)||v.DEFAULT_DISCOVERY_CATEGORY_ID)},t.handleSubcategoryChange=function(e){var n=t.props,r=n.guild,a=n.guildMetadata.secondaryCategoryIds;if(null!=r){var o=e.map((function(e){return e.value}));if(e.length<a.length){a.filter((function(e){return!o.includes(e)})).forEach((function(e){return h.deleteGuildCategory(r.id,e)}))}else{if(a.length>=5)return;o.filter((function(e){return!a.includes(e)})).forEach((function(e){return h.addGuildCategory(r.id,e)}))}}},t.handleRemoveSubcategory=function(e){var n=t.props.guild;null!=n&&h.deleteGuildCategory(n.id,e)},t.handleRemoveKeyword=function(e){var n=t.props,r=n.guild,a=n.guildMetadata;if(null!=(null==r?void 0:r.id)){var o=[].concat(a.keywords);o.splice(e,1),h.updateGuildKeywords(r.id,o)}},t.handleAddKeyword=function(e){var n=t.props,r=n.guild,a=n.guildMetadata.keywords;null!=(null==r?void 0:r.id)&&(a.length>=10||h.updateGuildKeywords(r.id,[].concat(a,[e])))},t.handleToggleEmojiDiscoverability=function(){var e=t.props,n=e.guild,r=e.guildMetadata.emojiDiscoverabilityEnabled;null!=(null==n?void 0:n.id)&&h.updateGuildEmojiDiscoverabilityEnabled(n.id,!r)},t.renderMultiValue=function(e){var n=e.label,r=e.value;return X("span",{className:z.default.tag},void 0,n,X(A.default,{className:z.default.closeWrapper,onClick:function(){return t.handleRemoveSubcategory(r)}},void 0,X(k.default,{width:16,height:16,className:z.default.close})))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ee(t,n);var o=r.prototype;return o.componentDidMount=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==(t=this.props.guild)){e.next=9;break}return(0,y.fetchDiscoveryChecklist)(t.id).then((function(){(0,p.trackGuildSettingsDiscoveryViewed)(t.id)})),h.maybeFetchGuildDiscoveryCategories(),h.fetchMetadataForGuild(t.id),e.next=7,(0,B.getDiscoverableGuild)(t.id);case 7:null!=(n=e.sent)&&this.setState({discoverableGuild:n});case 9:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){q(o,r,a,i,l,"next",e)}function l(e){q(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),o.renderDiscoverableSection=function(){var e=this,t=this.props,n=t.guild,r=t.isGuildAdmin;if(null!=n){var o=n.hasFeature(W.GuildFeatures.DISCOVERABLE);return X(D.default,{className:z.default.twoColumnFormSection},void 0,X("div",{},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.GUILD_SETTINGS_ENABLE_DISCOVERABLE),X(w.default,{type:w.Types.DESCRIPTION,className:z.default.formDescription},void 0,Y.default.Messages.FORM_HELP_ENABLE_DISCOVERABLE),X(w.default,{type:w.Types.DESCRIPTION,className:z.default.formDescription},void 0,Y.default.Messages.FORM_HELP_DISCOVERABLE_CHANGE_TIME),X(R.default,{text:r?null:Y.default.Messages.GUILD_SETTINGS_DISCOVERY_ADMIN_ONLY},void 0,(function(t){return a.createElement(N.default,J({size:N.default.Sizes.SMALL,onClick:e.handleToggleDiscovery,color:o?N.default.Colors.PRIMARY:N.default.Colors.GREEN,hover:o?N.default.Colors.PRIMARY:N.default.Colors.GREEN,disabled:!r},t),o?Y.default.Messages.GUILD_SETTINGS_DISABLE_DISCOVERABLE:Y.default.Messages.GUILD_SETTINGS_ENABLE_DISCOVERABLE)}))),X(S.default,{className:z.default.guildCard,loading:null==n,guild:n}))}},o.renderCoverImageSection=function(){var e=this.props,t=e.guild,n=e.errors,r=e.canManageGuild;if(null!=t)return a.createElement(a.Fragment,null,X(D.default,{className:z.default.twoColumnFormSection},void 0,X("div",{},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.FORM_LABEL_DISCOVERY_COVER_IMAGE),X(w.default,{type:w.Types.DESCRIPTION,className:z.default.formDescription},void 0,Y.default.Messages.FORM_HELP_DISCOVERY_COVER_IMAGE),X(N.default,{size:N.default.Sizes.SMALL,color:N.default.Colors.PRIMARY,hover:N.default.Colors.PRIMARY},void 0,Y.default.Messages.UPLOAD_BACKGROUND,X(u.default,{disabled:!r,onChange:this.handleSplashChange}))),X(l.default,{avatar:t.discoverySplash,makeURL:function(e){return e&&F.default.getGuildDiscoverySplashURL({id:t.id,splash:e,size:512*(0,H.getDevicePixelRatio)()})},disabled:!r,onChange:this.handleSplashChange,hint:Y.default.Messages.CHANGE_SPLASH,className:z.default.avatarUploader,avatarClassName:z.default.avatarUploaderInnerSquare,hideSize:!0,showEditingModal:!1})),null!=(null==n?void 0:n.discovery_splash)?X(G.default,{color:G.default.Colors.ERROR},void 0,n.discovery_splash):null)},o.renderEmojiDiscoverabilitySection=function(){var e,t=this.props,n=t.canManageGuild,r=t.guildMetadata,a=this.state.discoverableGuild,o=r.emojiDiscoverabilityEnabled,i=null==a||null===(e=a.emojis)||void 0===e?void 0:e[0],l=null!=i?{name:i.require_colons?":"+i.name+":":i.name,emojiId:i.id,animated:i.animated,jumboable:!0}:{};return X(D.default,{className:z.default.twoColumnFormSection},void 0,X("div",{className:z.default.formColumnLeft},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_EMOJI_DISCOVERABILITY_TITLE),X(w.default,{className:z.default.description,type:w.Types.DESCRIPTION},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_EMOJI_DISCOVERABILITY_DESCRIPTION),X(N.default,{size:N.default.Sizes.SMALL,color:o?N.default.Colors.PRIMARY:N.default.Colors.GREEN,hover:o?N.default.Colors.PRIMARY:N.default.Colors.GREEN,disabled:!n,onClick:this.handleToggleEmojiDiscoverability},void 0,o?Y.default.Messages.GUILD_SETTINGS_DISCOVERY_EMOJI_DISCOVERABILITY_DISABLE:Y.default.Messages.GUILD_SETTINGS_DISCOVERY_EMOJI_DISCOVERABILITY_ENABLE)),null!=i&&null!=a&&X(O.CustomGuildEmojiPopout,{emojiSourceDiscoverableGuild:a,node:l,closePopout:W.NOOP,demoMode:!0}))},o.renderLocaleSelector=function(){var e=this.props,t=e.guild,n=e.canManageGuild;if(null!=t)return X(D.default,{className:z.default.twoColumnFormSection},void 0,X("div",{},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.FORM_LABEL_SERVER_LANGUAGE),X(w.default,{type:w.Types.DESCRIPTION,className:z.default.formDescription},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_LOCALE_HELP)),X(P.default,{className:z.default.formSelect,value:t.preferredLocale,clearable:!1,searchable:!1,options:v.LOCALE_OPTIONS,onChange:this.handleLocaleChange,disabled:!n}))},o.renderCategoriesSection=function(){var e=this.props,t=e.canManageGuild,n=e.guildMetadata,r=e.primaryCategoryOptions,o=e.allCategoryOptions,i=e.errors;return a.createElement(a.Fragment,null,X(D.default,{},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_PRIMARY_CATEGORY_TITLE),X(w.default,{type:w.Types.DESCRIPTION,className:z.default.description},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_PRIMARY_CATEGORY_DESCRIPTION)),X(P.default,{value:n.primaryCategoryId===v.DEFAULT_DISCOVERY_CATEGORY_ID?null:n.primaryCategoryId,placeholder:Y.default.Messages.SELECT,clearable:!0,searchable:!0,options:r,onChange:this.handlePrimaryCategoryChange,disabled:!t}),X(D.default,{className:z.default.noDividerFormSection},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_SUBCATEGORY_TITLE),X(P.default,{value:n.secondaryCategoryIds,searchable:!0,clearable:!1,options:o,onChange:this.handleSubcategoryChange,disabled:!t,multiValueRenderer:this.renderMultiValue,isMulti:!0})),null!=(null==i?void 0:i.category)?X(G.default,{color:G.default.Colors.ERROR,className:z.default.error},void 0,i.category):null)},o.renderKeywordsSection=function(){var e=this.props,t=e.canManageGuild,n=e.guildMetadata,r=e.errors;return X(D.default,{},void 0,X(j.default,{className:z.default.formTitle},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_SEARCH_KEYWORDS_TITLE),X(w.default,{className:z.default.description,type:w.Types.DESCRIPTION},void 0,Y.default.Messages.GUILD_SETTINGS_DISCOVERY_SEARCH_KEYWORDS_DESCRIPTION.format()),X(f.default,{tags:n.keywords,onRemoveTag:this.handleRemoveKeyword,onAddTag:this.handleAddKeyword,maxTags:10,maxTaxLength:30,disabled:!t}),null!=(null==r?void 0:r.keywords)?X(G.default,{color:G.default.Colors.ERROR,className:z.default.error},void 0,r.keywords):null)},o.render=function(){var e=this,t=this.props,n=t.guild,r=t.discoveryChecklist,a=t.isGuildAdmin;if(null==n||null==r)return null;switch((0,_.getSettingsView)(n,r)){case _.DiscoverySettingsViews.INTRO:return X(d.ScrollerContext.Consumer,{},void 0,(function(t){return X(V.default,{guild:n,onEnableDiscovery:function(){return e.handleEnableDiscovery(t)},isGuildAdmin:a})}));case _.DiscoverySettingsViews.DISQUALIFIED:return X(x.default,{guild:n});case _.DiscoverySettingsViews.SETTINGS:return X(D.default,{className:z.default.discoverySettings,title:Y.default.Messages.DISCOVERY,tag:j.Tags.H1},void 0,this.renderDiscoverableSection(),X(L.FormDivider,{className:z.default.divider}),this.renderCoverImageSection(),X(L.FormDivider,{className:z.default.divider}),this.renderEmojiDiscoverabilitySection(),X(L.FormDivider,{className:z.default.divider}),this.renderCategoriesSection(),X(L.FormDivider,{className:z.default.divider}),this.renderKeywordsSection(),X(L.FormDivider,{className:z.default.divider}),this.renderLocaleSelector());default:return null}},r}(a.PureComponent);ne.displayName="GuildSettingsDiscovery";var re=o.default.connectStores([T.default,C.default,m.default,I.default,E.default,M.default,b.default],(function(){var e=T.default.getProps(),t=e.guild,n=e.errors,r=e.submitting,a=e.guildMetadata,o=C.default.can(W.Permissions.MANAGE_GUILD,t),i=C.default.can(W.Permissions.ADMINISTRATOR,t),l=null!=t?m.default.getDiscoveryChecklist(t.id):null,u=null!=t?I.default.getChannels(t.id):null,s=[];null!=u&&u[I.GUILD_SELECTABLE_CHANNELS_KEY].forEach((function(e){var t=e.channel;t.type===W.ChannelTypes.GUILD_TEXT&&s.push({value:t.id,label:(0,c.computeChannelName)(t,M.default,b.default,!0)})}));var d=E.default.getPrimaryCategories().map((function(e){return{value:e.categoryId,label:e.name}})),f=E.default.getAllCategories().map((function(e){return{value:e.categoryId,label:e.name}}));return{guild:t,errors:n,submitting:r,discoveryChecklist:l,selectableChannels:s,canManageGuild:o,isGuildAdmin:i,guildMetadata:a,primaryCategoryOptions:d,allCategoryOptions:f}}))(ne);t.default=re},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(61)),l=f(n(153)),u=f(n(255)),s=n(1),d=f(n(7713));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t,n=e.className,r=e.tags,f=e.value,c=e.onRemoveTag,y=e.onAddTag,m=e.maxTaxLength,_=e.maxTags,h=e.disabled,E=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className","tags","value","onRemoveTag","onAddTag","maxTaxLength","maxTags","disabled"]),g=a.useState(f||""),S=g[0],O=g[1],I=r.map((function(e,t){var n;return v("span",{className:(0,o.default)(d.default.tag,(n={},n[d.default.disabledTag]=h,n))},t,e,!h&&v(i.default,{className:d.default.closeWrapper,onClick:function(){return c(t)}},void 0,v(u.default,{width:16,height:16,className:d.default.close})))})),T=a.useCallback((function(){var e=S.trim();0!==e.length&&(null!=_&&r.length>=_||(y(e),O("")))}),[S,_,y,r.length]),C=a.useCallback((function(e){switch(e.keyCode){case s.KeyboardKeys.BACKSPACE:0===S.length&&r.length>0&&(e.preventDefault(),e.stopPropagation(),c(r.length-1));break;case s.KeyboardKeys.ENTER:case s.KeyboardKeys.TAB:case s.KeyboardKeys.COMMA:e.preventDefault(),e.stopPropagation(),T()}}),[T,S.length,c,r.length]);return v("div",{className:(0,o.default)(n,d.default.inputWrapper,(t={},t[d.default.disabled]=h,t))},void 0,I,a.createElement(l.default,p({className:d.default.inputOuter,inputClassName:d.default.inputInner},E,{value:S,onKeyDown:C,onChange:O,maxLength:m,disabled:h,onBlur:T})))};y.displayName="TextInputWithTags";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchDiscoveryChecklist=function(e){return s.apply(this,arguments)};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){l(o,r,a,i,u,"next",e)}function u(e){l(o,r,a,i,u,"throw",e)}i(void 0)}))}}function s(){return(s=u(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:o.ActionTypes.DISCOVER_CHECKLIST_FETCH_START,guildId:t}),e.prev=1,e.next=4,r.default.get({url:o.Endpoints.GUILD_DISCOVERY_REQUIREMENTS(t),oldFormErrors:!0});case 4:n=e.sent,a.default.dispatch({type:o.ActionTypes.DISCOVER_CHECKLIST_FETCH_SUCCESS,guildId:t,checklist:n.body}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),a.default.dispatch({type:o.ActionTypes.DISCOVER_CHECKLIST_FETCH_FAILURE,guildId:t});case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSettingsView=function(e,t){var n=e.hasFeature(l.GuildFeatures.VERIFIED),r=e.hasFeature(l.GuildFeatures.DISCOVERABLE),a=e.hasFeature(l.GuildFeatures.ENABLED_DISCOVERABLE_BEFORE);if(n)return o.SETTINGS;if(!r&&!a)return o.INTRO;if(null==t)return o.SETTINGS;var i=t.sufficientWithoutGracePeriod&&null!=t.gracePeriodEndDate&&t.gracePeriodEndDate>new Date;if(!t.sufficient&&!i&&r)return o.DISQUALIFIED;return t.sufficient||i?o.SETTINGS:o.INTRO},t.trackDiscoverySettingsChange=function(e,t){var n=!1,r={guild_id:e.id,automatic:!1};null!=t&&e.discoverySplash===t.discoverySplash||(r.discovery_splash_edit_type=null==e.discoverySplash?a.REMOVED:a.UPLOADED,n=!0);null!=t&&e.features.has(l.GuildFeatures.DISCOVERABLE)===t.features.has(l.GuildFeatures.DISCOVERABLE)||(r.is_discoverable=e.features.has(l.GuildFeatures.DISCOVERABLE),n=!0);null!=t&&e.rulesChannelId===t.rulesChannelId||(r.rules_channel_id=e.rulesChannelId,n=!0);n&&i.default.track(l.AnalyticEvents.GUILD_SETTINGS_DISCOVERY_UPDATED,r)},t.DiscoverySettingsViews=void 0;var r,a,o,i=(r=n(13))&&r.__esModule?r:{default:r},l=n(1);!function(e){e.UPLOADED="uploaded",e.REMOVED="removed"}(a||(a={})),t.DiscoverySettingsViews=o,function(e){e.INTRO="intro",e.DISQUALIFIED="disqualified",e.SETTINGS="settings"}(o||(t.DiscoverySettingsViews=o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(29)),o=n(85),i=n(35),l=f(n(47)),u=f(n(24)),s=f(n(6)),d=f(n(7714));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(e){var t=e.transitionState,r=e.onClose,f=e.guildName,c=(0,o.useUID)();return p(i.ModalRoot,{transitionState:t,className:d.default.root,"aria-labelledby":c},void 0,p("div",{className:d.default.modal},void 0,p("img",{alt:"",src:n(9837),className:d.default.image,width:320}),p(l.default,{size:l.default.Sizes.SIZE_24,className:d.default.title,id:c},void 0,s.default.Messages.GUILD_SETTINGS_DISCOVERY_ENABLED_MODAL_HEADER.format({serverName:f})),p(u.default,{color:u.default.Colors.MUTED,size:u.default.Sizes.SIZE_16,className:d.default.body},void 0,s.default.Messages.GUILD_SETTINGS_DISCOVERY_ENABLED_MODAL_BODY),p(u.default,{color:u.default.Colors.MUTED,size:u.default.Sizes.SIZE_16,className:d.default.body},void 0,s.default.Messages.FORM_HELP_DISCOVERABLE_CHANGE_TIME),p(a.default,{className:d.default.button,onClick:r},void 0,s.default.Messages.GUILD_SETTINGS_DISCOVERY_ENABLED_MODAL_DISMISS)))};v.displayName="DiscoverySuccessModal";var y=v;t.default=y},function(e,t,n){e.exports=n.p+"26959a88e27a4b7b0eae1da83d17d37f.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(681)),o=d(n(47)),i=d(n(24)),l=d(n(8682)),u=d(n(6)),s=d(n(7718));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=function(e){var t=e.guild;return c(a.default,{title:u.default.Messages.DISCOVERY,tag:a.default.Tags.H2},void 0,c("div",{className:s.default.background}),c("div",{className:s.default.discoverySettings},void 0,c("div",{className:s.default.image}),c(o.default,{className:s.default.header,size:o.default.Sizes.SIZE_24},void 0,u.default.Messages.GUILD_SETTINGS_DISCOVERY_DISQUALIFIED),c(i.default,{className:s.default.description,size:i.default.Sizes.SIZE_16},void 0,u.default.Messages.GUILD_SETTINGS_DISCOVERY_DISQUALIFIED_DESCRIPTION.format()),c(l.default,{className:s.default.checklist,guildId:t.id,noHeader:!0,failedItemsOnly:!0})))};p.displayName="GuildSettingsDiscoveryDisqualified";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(122),i=n(1213),l=n(85),u=n(35),s=v(n(47)),d=v(n(24)),f=n(1),c=v(n(6)),p=v(n(7716));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=m("sup",{"aria-hidden":!0},void 0,"1"),h=function(e){var t=e.currentNumber,n=e.thresholdNumber,r=e.currentLabel,i=e.isPercent,l=void 0!==i&&i,u=null!=n?Math.floor(t/n*100):0,s=c.default.Messages.NUMBERS_ONLY.format({count:t}),v=null!=n?c.default.Messages.NUMBERS_ONLY.format({count:n}):"--";return a.createElement(a.Fragment,null,m("div",{className:p.default.progressWrapper},void 0,m("div",{className:p.default.progressBackground}),m(o.Spring,{from:{width:0},to:{width:u},config:{tension:200,friction:20,mass:50,clamp:!0}},void 0,(function(e){var t=e.width;return m(o.animated.div,{className:p.default.progressBar,style:{width:t.interpolate((function(e){return e+"%"})),backgroundColor:t.interpolate((function(e){return e<33?f.Colors.STATUS_RED:f.Colors.STATUS_YELLOW}))}})}))),m("div",{className:p.default.labelWrapper},void 0,m("div",{className:p.default.current},void 0,m(d.default,{color:u<33?d.default.Colors.ERROR:d.default.Colors.STATUS_YELLOW,className:p.default.bold},void 0,l?s+"%":s),m(d.default,{"aria-describedby":"health-score-details-score-explain",size:d.default.Sizes.SIZE_12,color:d.default.Colors.HEADER_SECONDARY},void 0,r,_)),m("div",{className:p.default.requirement},void 0,m(d.default,{className:p.default.bold},void 0,l?v+"%":v),m(d.default,{"aria-describedby":"health-score-details-requirement-explain",size:d.default.Sizes.SIZE_12,color:d.default.Colors.HEADER_SECONDARY},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_PROGRESS_REQUIREMENT_LABEL))))},E=m("sup",{"aria-hidden":!0},void 0,"1 "),g=function(e){var t,n,r,a=e.guildChecklist,o=e.transitionState,f=e.onClose,v=(0,l.useUID)(),y=a.retentionHealthy,_=a.engagementHealthy,g=a.healthScore,S=g.avg_nonnew_participators,O=g.avg_nonnew_communicators,I=g.perc_ret_w1_intentful;if(!_&&null!=S&&S<i.DISCOVERY_PARTICIPATOR_REQUIREMENT&&(n=m("div",{className:p.default.failingBlock},void 0,m(s.default,{className:p.default.marginAfter,tag:s.default.Tags.H3,size:s.default.Sizes.SIZE_16},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_VISITOR_FAILING_ACTION),m(d.default,{},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_VISITOR_FAILING_ACTION_DETAILS),m(h,{currentNumber:S,thresholdNumber:40,currentLabel:c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_VISITOR_PROGRESS_LABEL}))),!_&&null!=O&&O<i.DISCOVERY_COMMUNICATOR_REQUIREMENT&&(r=m("div",{className:p.default.failingBlock},void 0,m(s.default,{className:p.default.marginAfter,tag:s.default.Tags.H3,size:s.default.Sizes.SIZE_16},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_COMMUNICATOR_FAILING_ACTION),m(d.default,{},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_COMMUNICATOR_FAILING_ACTION_DETAILS),m(h,{currentNumber:O,thresholdNumber:20,currentLabel:c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_COMMUNICATOR_PROGRESS_LABEL}))),!y&&null!=I){var T=Math.floor(100*I);t=m("div",{className:p.default.failingBlock},void 0,m(s.default,{className:p.default.marginAfter,tag:s.default.Tags.H3,size:s.default.Sizes.SIZE_16},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_RETENTION_FAILING_ACTION),m(d.default,{},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_RETENTION_FAILING_ACTION_DETAILS_UPDATED.format()),m(h,{currentNumber:T,thresholdNumber:10,currentLabel:c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_RETENTION_PROGRESS_LABEL,isPercent:!0}))}return m(u.ModalRoot,{transitionState:o,size:u.ModalSize.MEDIUM,className:p.default.modal,"aria-labelledby":v},void 0,m(u.ModalContent,{className:p.default.content},void 0,m(s.default,{tag:s.default.Tags.H2,size:s.default.Sizes.SIZE_24,className:p.default.modalHeader,id:v},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_FAILING),m(d.default,{className:p.default.marginAfter},void 0,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTH_DEFINITIONS_INTRO),m("div",{className:p.default.separator}),n,r,t,m("div",{className:p.default.separator}),m(d.default,{className:p.default.marginAfter,color:d.default.Colors.HEADER_SECONDARY,id:"health-score-details-score-explain"},void 0,E,c.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SCORE_EXPLAIN)),m(u.ModalCloseButton,{onClick:f,className:p.default.closeButton}))};g.displayName="HealthScoreDetailsModal";var S=g;t.default=S},function(e,t,n){e.exports=n.p+"eda26f0407efedaa721199f939511167.svg"},function(e,t,n){e.exports=n.p+"84c2ac411161e2270327766e6c44a4fe.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=C(n(0)),o=I(n(8)),i=n(276),l=n(3),u=I(n(8533)),s=C(n(9843)),d=I(n(9844)),f=I(n(8992)),c=I(n(684)),p=I(n(29)),v=I(n(149)),y=I(n(47)),m=I(n(24)),_=I(n(93)),h=I(n(8682)),E=n(1),g=I(n(6)),S=I(n(7719)),O=I(n(9846));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=["322850917248663552","172018499005317120","414234792121597953","228406572756369408"],A=["620723483965653003","662246299369734154","181970867549503489","102860784329052160"],P=function(e){var t=e.guild,n=e.onEnableDiscovery,r=e.isGuildAdmin,I=(0,i.useStableMemo)((function(){return[o.default.sample(N),o.default.sample(A)]}),[]),T=I[0],C=I[1];a.useEffect((function(){s.fetchDiscoverableGuilds([T,C])}),[T,C]);var P=(0,l.useStateFromStoresArray)([d.default],(function(){return[d.default.getGuild(T),d.default.getGuild(C)]}),[T,C]),R=P[0],L=P[1],D=(0,l.useStateFromStoresObject)([u.default],(function(){return{canEnableDiscovery:u.default.passesChecklist(t.id),isPendingSuccess:u.default.isPendingSuccess(t.id)}}),[t.id]),w=D.canEnableDiscovery,j=D.isPendingSuccess,k=(0,l.useStateFromStoresArray)([c.default],(function(){return[null,c.default.getMemberCount(t.id)]}),[t.id]),U=k[0],G=k[1],F=a.useCallback((function(){null!=n&&n()}),[n]),B=null;return r?j?B=g.default.Messages.GUILD_SETTINGS_DISCOVERY_PENDING_HEALTHY:w||(B=g.default.Messages.GUILD_SETTINGS_DISCOVERY_REQUIREMENTS_NOT_MET):B=g.default.Messages.GUILD_SETTINGS_DISCOVERY_ADMIN_ONLY,M("div",{className:S.default.container},void 0,M("img",{alt:"",src:O.default,className:S.default.sparkles}),M("div",{className:S.default.discoverPreview},void 0,M(f.default,{className:S.default.placeholderCard,disabled:!0,small:!0,loading:null==R,guild:R}),M(f.default,{className:S.default.previewCard,guild:t,description:g.default.Messages.GUILD_SETTINGS_DISCOVERY_PREVIEW_DESCRIPTION,presenceCount:U,memberCount:G}),M(f.default,{className:S.default.placeholderCard,disabled:!0,small:!0,loading:null==L,guild:L})),M(y.default,{className:S.default.header,size:y.default.Sizes.SIZE_24},void 0,g.default.Messages.GUILD_SETTINGS_DISCOVERY_HEADER),M(m.default,{size:m.default.Sizes.SIZE_16,className:S.default.byline,color:m.default.Colors.HEADER_SECONDARY},void 0,g.default.Messages.GUILD_SETTINGS_DISCOVERY_DESCRIPTION),M(v.default,{text:B},void 0,(function(e){return a.createElement(p.default,b({},e,{className:S.default.enableButton,color:p.default.Colors.BRAND,size:p.default.Sizes.LARGE,disabled:!w||!r,onClick:F}),g.default.Messages.GUILD_SETTINGS_ENABLE_DISCOVERABLE)})),M(m.default,{className:S.default.guidelines,color:m.default.Colors.HEADER_SECONDARY,size:m.default.Sizes.SIZE_12},void 0,g.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_ABIDE_BY_GUIDELINES.format({guidelinesURL:_.default.getArticleURL(E.HelpdeskArticles.PUBLIC_GUILD_GUILDLINES)})),M(h.default,{className:S.default.checklist,guildId:t.id}))};P.displayName="GuildSettingsDiscoveryIntro";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.viewGuild=function(e,t,n){return p.apply(this,arguments)},t.fetchDiscoverableGuilds=function(e){return v.apply(this,arguments)};var r=d(n(137)),a=d(n(14)),o=d(n(2)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(701)),l=n(8991),u=n(1);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){f(o,r,a,i,l,"next",e)}function l(e){f(o,r,a,i,l,"throw",e)}i(void 0)}))}}function p(){return(p=c(regeneratorRuntime.mark((function e(t,n,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,l.trackGuildSelected)(t,n,r),e.next=3,i.startLurking(t,r.location);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(){return(v=c(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.default.dirtyDispatch({type:u.ActionTypes.DISCOVER_GUILDS_FETCH_START,guildIds:t}),e.prev=1,e.next=4,a.default.get({url:u.Endpoints.GUILD_DISCOVERY,query:r.default.stringify({guild_ids:t}),oldFormErrors:!0});case 4:n=e.sent,i=n.body.guilds,o.default.dispatch({type:u.ActionTypes.DISCOVER_GUILDS_FETCH_SUCCESS,guilds:i}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),o.default.dispatch({type:u.ActionTypes.DISCOVER_GUILDS_FETCH_FAILURE});case 12:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(8)),a=s(n(3)),o=s(n(2)),i=s(n(11)),l=n(48),u=s(n(9845));n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f={},c=0;var p=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(i.default)},a.isFetching=function(){return c>0},a.getGuild=function(e){return f[e]},a.getGuilds=function(e){return e.map((function(e){return f[e]})).filter(l.isNotNullish)},r}(a.default.Store))(o.default,{DISCOVER_GUILDS_FETCH_START:function(e){c+=1},DISCOVER_GUILDS_FETCH_SUCCESS:function(e){var t=e.guilds;c-=1,r.default.map(t,u.default).forEach((function(e){return f[e.id]=e}))},DISCOVER_GUILDS_FETCH_FAILURE:function(e){c-=1}});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{id:e.id,name:e.name,description:e.description,splash:e.splash,banner:e.banner,icon:e.icon,features:new Set(e.features),presenceCount:e.approximate_presence_count,memberCount:e.approximate_member_count,premiumSubscriptionCount:e.premium_subscription_count,preferredLocale:e.preferred_locale,discoverySplash:e.discovery_splash,emojis:e.emojis}}},function(e,t,n){e.exports=n.p+"495f448b98d1a52201497439bee093b6.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=w(n(0)),o=L(n(9)),i=L(n(8)),l=L(n(3)),u=L(n(154)),s=L(n(8511)),d=L(n(8416)),f=L(n(8327)),c=L(n(9848)),p=L(n(8255)),v=L(n(39)),y=L(n(29)),m=w(n(8302)),_=L(n(55)),h=L(n(151)),E=L(n(153)),g=L(n(149)),S=L(n(681)),O=w(n(474)),I=w(n(159)),T=L(n(279)),C=L(n(150)),b=L(n(261)),M=n(1),N=L(n(6)),A=L(n(7721)),P=L(n(7347)),R=L(n(370));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(){return(k=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}).apply(this,arguments)}function U(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,G(e,t)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var F=i.default.throttle(s.default.fetchEmoji,1e3),B=function(e){function t(t){var n;return(n=e.call(this,t)||this).handleDeleteEmoji=function(){var e=n.props,t=e.guildId,r=e.emoji;s.default.deleteEmoji(t,r.id)},n.handleNameKeyPress=function(e){var t=e.currentTarget;13===e.which&&t.blur()},n.handleNameChange=function(e){n.setState({name:e})},n.handleNameBlur=function(){var e=n.props.emoji,t=n.state.name;if(t!==e.name){var r=n.props.guildId;s.default.updateEmoji(r,e.id,b.default.sanitizeEmojiName(t))}},n.state={name:t.emoji.name},n}U(t,e);var n=t.prototype;return n.renderEmoji=function(){var e=this.props.emoji,t=C.default.getEmojiURL({id:e.id,animated:e.animated});return j(_.default.Child,{basis:"40px",grow:0},void 0,j(g.default,{text:e.available?null:N.default.Messages.EMOJI_DISABLED_PREMIUM_TIER_LOST},void 0,(function(n){var r;return a.createElement("div",k({},n,{className:(0,o.default)(A.default.emojiImage,(r={},r[A.default.emojiDisabled]=!e.available,r)),style:{backgroundImage:"url("+t+")"}}))})))},n.renderEmojiName=function(){var e=this.state.name;return j(_.default.Child,{basis:"50%"},void 0,j("div",{className:A.default.positionRelative},void 0,j(E.default,{className:A.default.emojiAliasInput,inputClassName:A.default.emojiInput,placeholder:N.default.Messages.GUILD_SETTINGS_EMOJI_ALIAS_PLACEHOLDER,onKeyPress:this.handleNameKeyPress,onChange:this.handleNameChange,onBlur:this.handleNameBlur,size:E.default.Sizes.MINI,value:e,maxLength:M.EMOJI_MAX_LENGTH}),j("div",{className:A.default.emojiAliasPlaceholder},void 0,e.length>0?e:N.default.Messages.GUILD_SETTINGS_EMOJI_ALIAS_PLACEHOLDER)))},n.renderUser=function(){var e=this.props,t=e.emoji,n=e.guildId;return j(_.default.Child,{basis:"50%",className:A.default.emojiUploader},void 0,j(T.default,{src:t.user.getAvatarURL(n),"aria-label":t.user.username,size:T.default.Sizes.SIZE_24,className:A.default.avatar}),j(O.default,{className:(0,o.default)(A.default.emojiRowText)},void 0,t.user.username))},n.renderDeleteButton=function(){return j(d.default,{className:A.default.emojiRemove,onClick:this.handleDeleteEmoji})},n.render=function(){return j(_.default,{className:(0,o.default)(A.default.emojiRow,P.default.card),align:_.default.Align.CENTER},void 0,this.renderEmoji(),this.renderEmojiName(),this.renderUser(),this.renderDeleteButton())},t}(a.PureComponent);B.displayName="EmojiRow";var H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleFileChange=function(e,n){var r=t.props.guild;if(null!=r){var a=b.default.sanitizeEmojiName(n.split(".")[0]);s.default.uploadEmoji(r.id,e,a).catch((function(e){var t,n=e.body;null!=n&&(n.code===M.AbortCodes.TOO_MANY_EMOJI?t=N.default.Messages.TOO_MANY_EMOJI:n.code===M.AbortCodes.TOO_MANY_ANIMATED_EMOJI?t=N.default.Messages.TOO_MANY_ANIMATED_EMOJI:null!=n.image&&(t=N.default.Messages.EMOJI_TOO_BIG.format({maxSize:M.EMOJI_MAX_FILESIZE_KB}))),null!=t&&u.default.show({body:t})}))}},t}U(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this.props.guild;null!=e&&F(e.id)},r.componentDidUpdate=function(e){var t=this.props,n=t.revision,r=t.guild;null!=r&&e.revision<n&&F(r.id)},r.getMaxSlots=function(){var e=this.props.guild;return null!=e?e.getMaxEmojiSlots():M.EMOJI_MAX_SLOTS},r.renderUploader=function(){var e=this.props,t=e.emojis,n=e.isUploading,r=t?t.filter((function(e){return!e.animated})).length:0,a=t?t.filter((function(e){return e.animated})).length:0,o=this.getMaxSlots(),i=o-r,l=Math.max(i,o-a),u=N.default.Messages.GUILD_SETTINGS_EMOJI_UPLOAD_TO_SERVER_MESSAGE;return j(S.default,{className:R.default.marginBottom40},void 0,j(_.default,{align:_.default.Align.START,className:R.default.marginBottom20},void 0,j(_.default.Child,{},void 0,j(O.default,{type:O.Types.DESCRIPTION},void 0,u.format({count:o,maxSize:M.EMOJI_MAX_FILESIZE_KB}))),j(_.default.Child,{wrap:!0,grow:0},void 0,j(y.default,{tabIndex:-1,disabled:n||0===l,submitting:n,focusProps:{within:!0}},void 0,N.default.Messages.UPLOAD_EMOJI,l>0?j(f.default,{tabIndex:0,onChange:this.handleFileChange,multiple:!0}):null))))},r.renderTitle=function(e,t){var n=t.length,r=this.getMaxSlots()-n;return j(I.default,{tag:I.Tags.H5,className:R.default.marginBottom20},void 0,e,j("span",{},void 0," — ",N.default.Messages.EMOJI_SLOTS_AVAILABLE.format({count:r})))},r.renderEmojiTable=function(e,t){return 0===t.length?j(O.default,{type:O.Types.DESCRIPTION,className:R.default.marginBottom40},void 0,N.default.Messages.NO_EMOJI_BODY):j(S.default,{className:R.default.marginBottom40},void 0,j(_.default,{className:R.default.marginBottom4},void 0,j(_.default.Child,{basis:"40px",grow:0,wrap:!0},void 0,j(O.default,{type:O.default.Types.DESCRIPTION},void 0,N.default.Messages.EMOJI)),j(_.default.Child,{basis:"50%",wrap:!0},void 0,j(O.default,{type:O.default.Types.DESCRIPTION,className:A.default.emojiAliasOffset},void 0,N.default.Messages.GUILD_SETTINGS_EMOJI_ALIAS)),j(_.default.Child,{basis:"50%",wrap:!0},void 0,j(O.default,{type:O.default.Types.DESCRIPTION},void 0,N.default.Messages.UPLOADED_BY))),t.reverse().map((function(t){return j(B,{guildId:e.id,emoji:t},t.id)})))},r.renderEmojis=function(){var e=this.props,t=e.emojis,r=e.theme,a=e.guild;if(null==t||null==a)return j(h.default,{className:R.default.marginTop40,type:h.default.Type.SPINNING_CIRCLE});if(0===t.length)return j(m.default,{theme:r,className:R.default.marginTop20},void 0,j(m.EmptyStateImage,{darkSrc:n(9850),lightSrc:n(9851),width:272,height:212}),j(m.EmptyStateText,{note:N.default.Messages.NO_EMOJI},void 0,N.default.Messages.NO_EMOJI_TITLE));var o=i.default.partition(t,(function(e){return!e.animated})),l=o[0],u=o[1];return j("div",{},void 0,this.renderTitle(N.default.Messages.EMOJI,l),this.renderEmojiTable(a,l),this.renderTitle(N.default.Messages.ANIMATED_EMOJI,u),this.renderEmojiTable(a,u))},r.render=function(){return j(S.default,{tag:I.Tags.H1,title:N.default.Messages.SERVER_EMOJI},void 0,this.renderUploader(),this.renderEmojis())},t}(a.PureComponent);H.displayName="GuildSettingsEmoji";var x=l.default.connectStores([v.default,c.default,p.default],(function(){var e=p.default.getProps().guild;return{guild:e,emojis:null!=e?c.default.getEmojis(e.id):[],revision:null!=e?c.default.getEmojiRevision(e.id):null,isUploading:c.default.isUploadingEmoji(),theme:v.default.theme}}))(H);t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=l(n(9849)),i=l(n(107));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s={},d={},f=0;var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(i.default)},a.isUploadingEmoji=function(){return f>0},a.getEmojiRevision=function(e){return s[e]||0},a.getEmojis=function(e){return d[e]},r}(r.default.Store))(a.default,{EMOJI_DELETE:function(e){var t=e.guildId,n=e.emojiId;d[t]=d[t].filter((function(e){return e.id!==n}))},EMOJI_FETCH_SUCCESS:function(e){var t=e.guildId,n=e.emojis;d[t]=n.map((function(e){return new o.default(e)}))},EMOJI_FETCH_FAILURE:function(e){var t=e.guildId;d[t]=[]},EMOJI_UPLOAD_START:function(e){f++},EMOJI_UPLOAD_STOP:function(e){f--},GUILD_EMOJIS_UPDATE:function(e){var t=e.guildId;s[t]=(s[t]||0)+1}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(62)),a=o(n(89));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this).id=t.id,n.name=t.name,n.managed=t.managed,n.roles=t.roles,n.requiredColons=t.requiredColons,n.user=new a.default(t.user),n.animated=t.animated,n.available=t.available,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r}(r.default);t.default=l},function(e,t,n){e.exports=n.p+"a7371de3223292c6f31f8aeed62f17c1.svg"},function(e,t,n){e.exports=n.p+"3236694e0c095adfbbd5334fc8dc7aa0.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,t.GuildSettingsIntegrationsNotice=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(8317)),i=f(n(8292)),l=f(n(9177)),u=f(n(8982)),s=f(n(8255)),d=f(n(39));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.refToScroller,n=(0,a.useStateFromStores)([s.default],(function(){return s.default.getProps()}),[]).guild,r=(0,a.useStateFromStores)([u.default],(function(){return u.default.getProps()}),[]),o=r.section,i=r.integrations,d=r.editedIntegration,f=r.webhooks,c=r.editedWebhook,v=r.isFetching,y=r.errors;return null==n?null:p(l.default,{guild:n,section:o,integrations:i,webhooks:f,editedIntegration:d,editedWebhook:c,isFetching:v,hasChanges:u.default.hasChanges,errors:y,refToScroller:t})}function y(){var e=(0,a.useStateFromStores)([s.default],(function(){return s.default.getProps()})),t=e.guild,n=e.submitting,r=(0,a.useStateFromStores)([d.default],(function(){return d.default.theme}));return p(i.default,{theme:r,submitting:n,onReset:function(){o.default.init()},onSave:function(){null!=t&&(null!=u.default.editedIntegration?o.default.saveIntegration(t.id,u.default.editedIntegration):null!=u.default.editedWebhook&&o.default.saveWebhook(t.id,u.default.editedWebhook))}})}v.displayName="GuildSettingsIntegrations",y.displayName="GuildSettingsIntegrationsNotice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.guild,n=e.applicationIntegration,r=e.selectableWebhookChannels,i=e.editedWebhook,l=e.errors,_=e.canNavigate,A=n.application,P=n.integration,w=n.webhooks,j=(0,o.useStateFromStores)([u.default],(function(){return null==A.bot||u.default.canManageUser(b.Permissions.MANAGE_GUILD,A.bot.id,t)}),[A.bot,t]),k=a.useCallback((function(){_()&&(0,h.openModal)((function(e){return a.createElement(D,R({guild:t,application:A,integration:P},e))}))}),[A,_,t,P]),U=a.useMemo((function(){var e=[{icon:p.default,text:M.default.Messages.INTEGRATION_ADDED_DATE.format({timestamp:O.default.extractTimestamp(P.id)})}];return null!=P.user&&e.push({icon:v.default,text:M.default.Messages.INTEGRATION_ADDED_USER.format({user:P.user.tag})}),e}),[P.id,P.user]),G=L(T.default,{guild:t,applicationIntegration:n}),F=a.useMemo((function(){return null!=A.bot?G:L(d.default,{className:N.default.emptyCard,editable:!0},void 0,L(g.default,{color:g.default.Colors.MUTED},void 0,M.default.Messages.INTEGRATIONS_APPLICATION_NO_BOT))}),[A.bot,n,t]);return a.createElement(a.Fragment,null,L(I.default,{name:A.name,imageSrc:A.getIconURL(32)||S.DEFAULT_AVATARS[0],details:U,isHeader:!0}),null!=(null==A?void 0:A.description)?L(c.FormText,{className:N.default.headerDescription,type:c.FormTextTypes.DESCRIPTION},void 0,A.description):null,L(c.FormDivider,{className:N.default.headerDivider}),null!=A.bot?L("div",{className:N.default.section},void 0,L(f.default,{className:N.default.sectionHeader,align:f.default.Align.CENTER},void 0,L(y.default,{className:N.default.sectionIcon,width:24,height:24}),L(E.default,{size:E.default.Sizes.SIZE_16},void 0,M.default.Messages.INTEGRATIONS_APPLICATION_BOT)),F):null,L("div",{className:N.default.section},void 0,L(f.default,{className:N.default.sectionHeader,align:f.default.Align.CENTER},void 0,L(m.default,{className:N.default.sectionIcon,width:24,height:24}),L(E.default,{size:E.default.Sizes.SIZE_16},void 0,M.default.Messages.INTEGRATIONS_APPLICATION_WEBHOOKS)),w.length>0?L(C.default,{webhooks:w,editedWebhook:i,selectableWebhookChannels:r,errors:l,canNavigate:_}):L(d.default,{className:N.default.emptyCard,editable:!0},void 0,L(g.default,{color:g.default.Colors.MUTED},void 0,M.default.Messages.INTEGRATIONS_APPLICATION_NO_WEBHOOKS))),L(c.FormDivider,{className:N.default.headerDivider}),L(f.default,{className:N.default.section,justify:f.default.Justify.BETWEEN,align:f.default.Align.CENTER},void 0,L(g.default,{color:g.default.Colors.HEADER_SECONDARY},void 0,j?M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE_SUMMARY:M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE_NO_PERMISSIONS),L(f.default.Child,{grow:0,shrink:0},void 0,L(s.default,{size:s.default.Sizes.SMALL,color:s.default.Colors.RED,look:s.default.Looks.FILLED,disabled:!j,onClick:k},void 0,M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE))))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=A(n(154)),l=A(n(8254)),u=A(n(40)),s=A(n(29)),d=A(n(467)),f=A(n(55)),c=n(131),p=A(n(1224)),v=A(n(8577)),y=A(n(1283)),m=A(n(8683)),_=A(n(466)),h=n(41),E=A(n(47)),g=A(n(24)),S=n(150),O=A(n(97)),I=A(n(8401)),T=A(n(9854)),C=A(n(8684)),b=n(1),M=A(n(6)),N=A(n(7727));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e){var t=e.application,n=e.guild,r=e.integration,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["application","guild","integration"]);return a.createElement(_.default,R({},o,{header:M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE_TITLE.format({applicationName:t.name}),confirmText:M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE,cancelText:M.default.Messages.CANCEL,onConfirm:function(){l.default.disableIntegration(n.id,r.id).catch((function(){i.default.show({title:M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE_ERROR_TITLE,body:M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE_ERROR})}))}}),L(g.default,{size:g.default.Sizes.SIZE_16},void 0,M.default.Messages.INTEGRATIONS_APPLICATION_REMOVE_BODY.format({applicationName:t.name})))}D.displayName="RemoveApplicationModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(9)),i=T(n(63)),l=n(3),u=T(n(199)),s=T(n(8501)),d=n(1383),f=T(n(89)),c=T(n(56)),p=T(n(1222)),v=T(n(467)),y=T(n(55)),m=n(131),_=T(n(372)),h=T(n(255)),E=T(n(24)),g=n(48),S=T(n(78)),O=T(n(6)),I=T(n(7723));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){var t=e.guild,n=e.applicationIntegration.application,r=null!=n.bot?new f.default(n.bot):null,T=(0,l.useStateFromStores)([c.default],(function(){return null!=r?c.default.getMember(t.id,r.id):null}),[r,t]),C=null==r?void 0:r.id;a.useEffect((function(){null!=C&&u.default.requestMembersById(t.id,C)}),[t.id,C]);var N=a.useMemo((function(){for(var e,n,r,a=t.getRole(t.id),o=(null==T||null===(e=T.roles)||void 0===e?void 0:e.map((function(e){return t.getRole(e)})).filter(g.isNotNullish))||[],l=null!==(n=null==a?void 0:a.permissions)&&void 0!==n?n:S.default.NONE,u=M(o);!(r=u()).done;){var s=r.value;l=i.default.add(l,s.permissions)}return l}),[t,T]);return null==r?null:b(v.default,{editable:!0,className:I.default.card},void 0,b(y.default,{direction:y.default.Direction.VERTICAL},void 0,b(y.default,{align:y.default.Align.CENTER},void 0,b("img",{alt:"",src:r.getAvatarURL(t.id),className:I.default.iconWrapper}),b(E.default,{color:E.default.Colors.HEADER_PRIMARY},void 0,O.default.Messages.INTEGRATIONS_APPLICATION_BOT_NAME.format({user:r})),b(p.default,{className:I.default.tag,verified:r.isVerifiedBot()})),function(e,t,n,r){for(var l,u=[],f=[],c=M(d.OrderedPermissions);!(l=c()).done;){var p=l.value,v=void 0,g=void 0;i.default.has(r,p)?(v=u,g=b(_.default,{width:16,height:16,className:(0,o.default)(I.default.check,I.default.integratedCheck)})):(v=f,g=b(h.default,{width:16,height:16,className:(0,o.default)(I.default.cross)})),v.push(b("div",{className:I.default.permission},String(p),g,b(E.default,{},void 0,(0,d.getPermissionName)(p))))}return a.createElement(a.Fragment,null,b(m.FormDivider,{className:I.default.divider}),n.length>0?a.createElement(a.Fragment,null,b(m.FormTitle,{className:I.default.permissionHeader},void 0,O.default.Messages.ROLES_LIST.format({numRoles:n.length})),b(s.default,{className:I.default.rolePills,user:e,guild:t,userRoles:n,wrap:!1,readOnly:!0})):null,u.length>0?a.createElement(a.Fragment,null,b(m.FormTitle,{className:I.default.permissionHeader},void 0,O.default.Messages.INTEGRATIONS_APPLICATION_GRANTED_PERMISSIONS),b(y.default,{wrap:y.default.Wrap.WRAP},void 0,u)):null,f.length>0?a.createElement(a.Fragment,null,b(m.FormTitle,{className:I.default.permissionHeader},void 0,O.default.Messages.INTEGRATIONS_APPLICATION_DENIED_PERMISSIONS),b(y.default,{wrap:y.default.Wrap.WRAP},void 0,f)):null)}(r,t,(null==T?void 0:T.roles)||[],N)))}A.displayName="BotCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=R;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(154)),i=b(n(8317)),l=b(n(8369)),u=b(n(8338)),s=b(n(8401)),d=b(n(29)),f=b(n(467)),c=b(n(61)),p=b(n(55)),v=b(n(1159)),y=b(n(153)),m=n(131),_=b(n(683)),h=b(n(8345)),E=b(n(466)),g=n(41),S=b(n(24)),O=n(150),I=n(1),T=b(n(6)),C=b(n(7724));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e,t){return null!=t&&/^data:/.test(t)?t:(0,O.getUserAvatarURL)({id:e.id,avatar:t,discriminator:I.NON_USER_BOT_DISCRIMINATOR})}function R(e){var t=e.webhook,n=e.editedWebhook,r=e.channelOptions,O=e.isExpanded,I=e.errors,b=e.onToggleExpand,M=a.useMemo((function(){return P(t,t.avatar)}),[t]),R=a.useCallback((function(){(0,g.openModal)((function(e){return a.createElement(E.default,N({},e,{header:T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_DELETE_TITLE.format({name:t.name}),confirmText:T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_DELETE,cancelText:T.default.Messages.CANCEL,onConfirm:function(){l.default.delete(t.guild_id,t.id).catch((function(){o.default.show({title:T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_ERROR_DELETING,body:T.default.Messages.WEBHOOK_ERROR_INTERNAL_SERVER_ERROR})}))}}),A(S.default,{size:S.default.Sizes.SIZE_16},void 0,T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_DELETE_BODY))}))}),[t.guild_id,t.id,t.name]),L=[];null!=t.source_channel&&null!=t.source_guild&&(L.push({icon:h.default,text:t.source_channel.name}),L.push({text:A("span",{className:C.default.guildSource},void 0,T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_GUILD_SOURCE.format({guildHook:function(){return A("span",{className:C.default.sourceName},void 0,t.source_guild.name)}}))}));var D=null;return O&&null!=n&&(D=A("div",{className:C.default.body},void 0,A(m.FormDivider,{className:C.default.topDivider}),A(p.default,{},void 0,A(p.default.Child,{shrink:1,grow:0},void 0,A(p.default,{className:C.default.avatarWrapper,direction:p.default.Direction.VERTICAL},void 0,A(u.default,{avatar:n.avatar,onChange:function(e){i.default.updateWebhook({avatar:e})},makeURL:function(e){return P(t,e)},avatarClassName:C.default.avatarUploaderInner,showIcon:!0}),I.avatar?a.createElement(a.Fragment,null,I.avatar):null)),A(p.default,{direction:p.default.Direction.VERTICAL},void 0,A(p.default,{},void 0,A(p.default.Child,{basis:"50%"},void 0,A(m.FormItem,{title:T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_NAME},void 0,A(y.default,{value:n.name,onChange:function(e){i.default.updateWebhook({name:e})},maxLength:80,error:I.name}))),A(p.default.Child,{basis:"50%"},void 0,A(m.FormItem,{title:T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_DEST_CHANNEL},void 0,A(v.default,{value:n.channel_id,clearable:!1,searchable:!1,options:r,onChange:function(e){var t=e.value;i.default.updateWebhook({channelId:t})}})))),A(m.FormDivider,{className:C.default.bottomDivider}),A(p.default,{},void 0,A(d.default,{onClick:R,size:d.default.Sizes.SMALL,color:d.default.Colors.RED,look:d.default.Looks.LINK,className:C.default.removeButton},void 0,T.default.Messages.INTEGRATIONS_FOLLOWED_CHANNEL_DELETE)))))),A(f.default,{editable:!0,className:C.default.card},void 0,A(p.default,{direction:p.default.Direction.VERTICAL},void 0,A(c.default,{className:C.default.header,"aria-expanded":O,onClick:b},void 0,A(p.default,{align:p.default.Align.CENTER},void 0,A(s.default,{name:t.name,imageSrc:M,detailsClassName:C.default.description,details:L}),A(_.default,{className:C.default.expandIcon,expanded:O,"aria-hidden":!0}))),D))}R.displayName="FollowedChannelCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=H;var r,a=k(n(0)),o=w(n(9)),i=w(n(14)),l=n(57),u=w(n(154)),s=w(n(8317)),d=w(n(8369)),f=w(n(8338)),c=w(n(8401)),p=w(n(89)),v=w(n(160)),y=w(n(29)),m=w(n(467)),_=w(n(61)),h=w(n(55)),E=w(n(1159)),g=w(n(153)),S=k(n(149)),O=n(131),I=w(n(683)),T=w(n(1224)),C=w(n(466)),b=n(41),M=w(n(24)),N=n(150),A=w(n(97)),P=n(1163),R=n(1),L=w(n(6)),D=w(n(7725));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function U(){return(U=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}).apply(this,arguments)}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var F=function(e){if(null==e)return null;var t=new p.default(e);return v.default.enabled?t.username:t.tag};function B(e,t){return null!=t&&/^data:/.test(t)?t:(0,N.getUserAvatarURL)({id:e.id,avatar:t,discriminator:R.NON_USER_BOT_DISCRIMINATOR})}function H(e){var t=e.id,n=e.webhook,r=e.editedWebhook,p=e.channelOptions,v=e.isExpanded,N=e.isNew,w=e.errors,j=e.onToggleExpand,k=a.useState(!1),H=k[0],x=k[1],V=a.useState(new l.Timeout)[0],W=a.useMemo((function(){return B(n,n.avatar)}),[n]),Y=a.useCallback((function(){var e=""+i.default.getAPIBaseURL(!1)+R.Endpoints.WEBHOOK_INTEGRATION(n.id,n.token);(0,P.copy)(e)}),[n]),z=a.useCallback((function(){(0,b.openModal)((function(e){return a.createElement(C.default,U({},e,{header:L.default.Messages.WEBHOOK_DELETE_TITLE.format({name:name}),confirmText:L.default.Messages.WEBHOOK_DELETE,cancelText:L.default.Messages.WEBHOOK_CANCEL,onConfirm:function(){d.default.delete(n.guild_id,n.id).catch((function(){u.default.show({title:L.default.Messages.WEBHOOK_ERROR_DELETING_WEBHOOK,body:L.default.Messages.WEBHOOK_ERROR_INTERNAL_SERVER_ERROR})}))}}),G(M.default,{size:M.default.Sizes.SIZE_16},void 0,L.default.Messages.WEBHOOK_DELETE_BODY.format({name:name})))}))}),[n.guild_id,n.id]),K=[];null!=n.user?K.push({icon:T.default,text:L.default.Messages.INTEGRATION_CREATED_USER_DATE.format({user:F(n.user),timestamp:A.default.extractTimestamp(n.id)})}):K.push({icon:T.default,text:L.default.Messages.INTEGRATION_CREATED_DATE.format({timestamp:A.default.extractTimestamp(n.id)})});var $=null;return v&&null!=r&&($=G("div",{className:D.default.body},void 0,G(O.FormDivider,{className:D.default.topDivider}),G(h.default,{},void 0,G(h.default.Child,{shrink:1,grow:0},void 0,G(h.default,{className:D.default.avatarWrapper,direction:h.default.Direction.VERTICAL},void 0,G(f.default,{avatar:r.avatar,onChange:function(e){s.default.updateWebhook({avatar:e})},makeURL:function(e){return B(n,e)},avatarClassName:D.default.avatarUploaderInner,showIcon:!0,disabled:!n.token}),w.avatar?a.createElement(a.Fragment,null,w.avatar):null)),G(h.default,{direction:h.default.Direction.VERTICAL},void 0,G(h.default,{},void 0,G(h.default.Child,{basis:"50%"},void 0,G(O.FormItem,{title:L.default.Messages.WEBHOOK_FORM_NAME},void 0,G(g.default,{value:r.name,onChange:function(e){s.default.updateWebhook({name:e})},maxLength:80,error:w.name,disabled:!n.token}))),G(h.default.Child,{basis:"50%"},void 0,G(O.FormItem,{title:L.default.Messages.CHANNEL},void 0,G(E.default,{value:r.channel_id,clearable:!1,searchable:!1,options:p,onChange:function(e){var t=e.value;s.default.updateWebhook({channelId:t})}})))),G(O.FormDivider,{className:D.default.bottomDivider}),G(h.default,{},void 0,G(S.default,{text:L.default.Messages.INTEGRATIONS_WEBHOOK_COPIED_URL,forceOpen:H,color:S.TooltipColors.GREEN,disableTooltipPointerEvents:!0},void 0,(function(e){var t=e.onClick,r=(e.onMouseEnter,e.onMouseLeave,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick","onMouseEnter","onMouseLeave"]));return a.createElement(y.default,U({},r,{onClick:function(){t&&t(),x(!0),V.start(1e3,(function(){return x(!1)})),Y()},size:y.default.Sizes.SMALL,color:y.default.Colors.PRIMARY,look:y.default.Looks.FILLED,className:D.default.copyButton,disabled:!n.token}),L.default.Messages.INTEGRATIONS_WEBHOOK_COPY_URL)})),G(y.default,{onClick:z,size:y.default.Sizes.SMALL,color:y.default.Colors.RED,look:y.default.Looks.LINK},void 0,L.default.Messages.INTEGRATIONS_WEBHOOK_DELETE)))))),G(m.default,{editable:!0,id:t,className:(0,o.default)(D.default.card,N?D.default.pulse:null)},void 0,G(h.default,{direction:h.default.Direction.VERTICAL},void 0,G(_.default,{className:D.default.header,"aria-expanded":v,onClick:j},void 0,G(h.default,{align:h.default.Align.CENTER},void 0,G(c.default,{name:n.name,imageSrc:W,details:K}),G(I.default,{className:D.default.expandIcon,expanded:v,"aria-hidden":!0}))),$))}H.displayName="WebhookCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.integrations,n=e.editedIntegration,r=e.guild,p=e.platformType,v=e.labelText,_=e.descriptionText,h=e.helpText,E=e.canNavigate,g=l.default.get(p),S=a.useCallback(function(){var e,t=(e=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!E()){e.next=4;break}return e.next=3,o.default.enableIntegration(r.id,t.type,t.id);case 3:i.default.startEditingIntegration(t.id);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){m(o,r,a,i,l,"next",e)}function l(e){m(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),[E,r.id]),O=a.useCallback((function(e){E()&&(e.id===(null==n?void 0:n.id)&&i.default.stopEditingIntegration(),o.default.disableIntegration(r.id,e.id))}),[E,n,r.id]),I=a.useCallback((function(e){E()&&(e===(null==n?void 0:n.id)?i.default.stopEditingIntegration():i.default.startEditingIntegration(e))}),[E,n]);return a.createElement(a.Fragment,null,y(d.default,{name:v,icon:g.icon.white,iconBackgroundColor:g.color,iconClassName:c.default.platformIcon,description:_,isHeader:!0}),y(u.FormDivider,{className:c.default.headerDivider}),t.map((function(e){return y(f.default,{integration:e,editedIntegration:n,guild:r,isExpanded:(null==n?void 0:n.id)===e.id,onEnable:S,onDisable:O,onToggleExpand:function(){return I(e.id)}},e.id)})),y(s.default,{className:c.default.helpText,color:s.default.Colors.MUTED},void 0,h))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(8254)),i=p(n(8317)),l=p(n(183)),u=n(131),s=p(n(24)),d=p(n(8401)),f=p(n(9858)),c=p(n(7730));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=U();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=k(n(9)),i=k(n(5)),l=n(3),u=k(n(8254)),s=k(n(8317)),d=k(n(8401)),f=k(n(183)),c=k(n(89)),p=k(n(249)),v=k(n(160)),y=k(n(271)),m=k(n(29)),_=k(n(467)),h=k(n(1160)),E=k(n(61)),g=k(n(55)),S=k(n(149)),O=n(131),I=k(n(683)),T=k(n(1224)),C=k(n(9859)),b=k(n(466)),M=n(41),N=n(374),A=k(n(24)),P=k(n(150)),R=k(n(97)),L=n(1),D=k(n(6)),w=k(n(7729)),j=k(n(370));function k(e){return e&&e.__esModule?e:{default:e}}function U(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return U=function(){return e},e}function G(){return(G=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}).apply(this,arguments)}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var B=F(C.default,{width:24,height:24});function H(e,t,n,r,o,i){return F(g.default,{},void 0,F(g.default.Child,{basis:"50%"},void 0,F(O.FormTitle,{className:j.default.marginBottom8},void 0,D.default.Messages.FORM_LABEL_SYNCED_ROLE),F(A.default,{className:w.default.syncedRole,color:A.default.Colors.HEADER_PRIMARY},void 0,o)),F(g.default.Child,{basis:"50%"},void 0,F(O.FormTitle,{className:j.default.marginBottom8},void 0,t),F(g.default,{justify:g.default.Justify.BETWEEN},void 0,F(g.default,{direction:g.default.Direction.VERTICAL},void 0,F(A.default,{color:A.default.Colors.HEADER_PRIMARY},void 0,n),F(A.default,{color:A.default.Colors.HEADER_SECONDARY,size:A.default.Sizes.SIZE_12},void 0,r)),F(m.default,{size:m.default.Sizes.SMALL,look:m.default.Looks.FILLED,color:m.default.Colors.PRIMARY,disabled:e.syncing||e.revoked,onClick:i},void 0,e.syncing?B:a.createElement(a.Fragment,null,D.default.Messages.SYNC)))))}function x(e,t,n,r){return F(g.default,{},void 0,F(g.default.Child,{basis:"50%"},void 0,F(O.FormTitle,{className:j.default.marginBottom8},void 0,t),F(N.SingleSelect,{placeholder:t,value:""+e.expire_behavior,options:[{value:"0",label:D.default.Messages.REMOVE_SYNCED_ROLE},{value:"1",label:D.default.Messages.KICK_FROM_SERVER}],isDisabled:e.syncing,onChange:function(e){return n(parseInt(e))}})),F(g.default.Child,{basis:"50%"},void 0,F(O.FormTitle,{className:j.default.marginBottom8},void 0,D.default.Messages.FORM_LABEL_EXPIRE_GRACE_PERIOD),F(N.SingleSelect,{placeholder:D.default.Messages.FORM_LABEL_EXPIRE_GRACE_PERIOD,maxVisibleItems:5,value:""+e.expire_grace_period,options:[1,3,7,14,30].map((function(e){return{value:""+e,label:D.default.Messages.N_DAYS.format({days:e})}})),onChange:function(e){return r(parseInt(e))},isDisabled:e.syncing})))}function V(e,t,n){return F(g.default,{direction:g.default.Direction.VERTICAL},void 0,F(h.default,{type:h.default.Types.INVERTED,className:(0,o.default)(j.default.marginTop20,j.default.marginBottom8),value:e.enable_emoticons,disabled:e.syncing,onChange:function(e){var t=e.currentTarget;return n(t.checked)}},void 0,F(O.FormText,{},void 0,D.default.Messages.ENABLE_TWITCH_EMOJI_SYNC)),F(g.default,{wrap:g.default.Wrap.WRAP,className:w.default.twitchEmojis},void 0,t.map((function(e,t){return F(S.default,{text:e.name},t,(function(t){return a.createElement("img",G({alt:D.default.Messages.IMG_ALT_EMOJI.format({name:e.name}),key:e.name,draggable:!1,className:(0,o.default)(w.default.emoji,"emoji","jumboable"),src:P.default.getEmojiURL({id:e.id,animated:e.animated})},t))}))}))))}H.displayName="renderSyncSection",x.displayName="renderExpirationSection",V.displayName="renderEmoticonSection";var W=F(C.default,{width:24,height:24});function Y(e){var t=e.guild,n=e.integration,r=e.editedIntegration,o=e.isExpanded,h=e.onToggleExpand,S=e.onDisable,C=e.onEnable,N=a.useState(!1),P=N[0],j=N[1],k=(0,l.useStateFromStores)([v.default],(function(){return v.default.hidePersonalInformation})),U=a.useCallback((function(){j(!0),C(n)}),[n,C]),B=a.useCallback((function(){n.syncing||(0,M.openModal)((function(e){var t=0===n.expire_behavior?D.default.Messages.REMOVE_SYNCED_ROLE:D.default.Messages.KICK_FROM_SERVER;return a.createElement(b.default,G({},e,{header:D.default.Messages.DISABLE_INTEGRATION_TITLE,confirmText:t,cancelText:D.default.Messages.CANCEL,onConfirm:function(){return S(n)}}),F(A.default,{size:A.default.Sizes.SIZE_16},void 0,n.type===L.PlatformTypes.YOUTUBE?D.default.Messages.DISABLE_INTEGRATION_YOUTUBE_BODY:D.default.Messages.DISABLE_INTEGRATION_TWITCH_BODY))}))}),[n,S]);var Y,z=a.useCallback((function(){u.default.syncIntegration(t.id,n.id)}),[t.id,n.id]),K=a.useCallback((function(){null!=n.role_id&&(u.default.setSection(L.GuildSettingsSections.ROLES),u.default.selectRole(n.role_id))}),[n.role_id]),$=a.useMemo((function(){var e,t,r=(null===(e=(t=f.default.get(n.type)).getPlatformUserUrl)||void 0===e?void 0:e.call(t,n.account))||"";switch(n.type){case L.PlatformTypes.YOUTUBE:return{serviceName:D.default.Messages.INTEGRATIONS_YOUTUBE,expireBehaviorLabel:D.default.Messages.FORM_LABEL_MEMBERSHIP_EXPIRE_BEHAVIOR,syncLabel:D.default.Messages.FORM_LABEL_SYNCED_MEMBERS,subscribersText:D.default.Messages.NUM_MEMBERS.format({subscribers:n.subscriber_count||0}),channelURL:r};case L.PlatformTypes.TWITCH:default:return{serviceName:D.default.Messages.INTEGRATIONS_TWITCH,expireBehaviorLabel:D.default.Messages.FORM_LABEL_SUB_EXPIRE_BEHAVIOR,syncLabel:D.default.Messages.FORM_LABEL_SYNCED_SUBS,subscribersText:D.default.Messages.NUM_SUBSCRIBERS.format({subscribers:n.subscriber_count||0}),channelURL:r}}}),[n.account,n.subscriber_count,n.type]),Z=$.serviceName,q=$.channelURL,X=$.expireBehaviorLabel,J=$.syncLabel,Q=$.subscribersText,ee=a.useMemo((function(){var e=null!=n.role_id?t.getRole(n.role_id):null;return{roleLink:null!=e?F(y.default,{onClick:K},void 0,e.name):D.default.Messages.NONE,syncDescriptionText:n.revoked?D.default.Messages.SYNC_REVOKED.format({user:n.user,platformName:f.default.get(n.type).name}):D.default.Messages.INTEGRATIONS_LAST_SYNC.format({datetime:(0,i.default)(n.synced_at).calendar()})}}),[t,K,n.revoked,n.role_id,n.synced_at,n.type,n.user]),te=ee.roleLink,ne=ee.syncDescriptionText,re=a.useMemo((function(){var e=p.default.getGuildEmoji(t.id),r=Object.values(t.roles).filter((function(e){return null!=e.tags&&e.tags.integration_id===n.id})).map((function(e){return e.id}));return n.enable_emoticons?e.sort((function(e,t){return e.name.localeCompare(t.name)})).filter((function(e){return null!=n.role_id&&(null==e?void 0:e.roles.some((function(e){return r.includes(e)})))})):[]}),[t.id,t.roles,n.enable_emoticons,n.id,n.role_id]);if(a.useEffect((function(){(null==r?void 0:r.id)===n.id&&!0===(null==r?void 0:r.enabled)&&j(!1)}),[r,n.id]),n.enabled&&n.user)Y=[{icon:T.default,text:k?D.default.Messages.INTEGRATION_ADDED_DATE.format({timestamp:R.default.extractTimestamp(n.id)}):D.default.Messages.INTEGRATION_ADDED_USER_DATE.format({user:null!=n.user?new c.default(n.user).tag:null,timestamp:R.default.extractTimestamp(n.id)})}];else{var ae=new URL(q);Y=[{text:D.default.Messages.INTEGRATIONS_ACCOUNT_DESCRIPTION.format({serviceName:Z,accountUrl:q,accountUrlText:ae.hostname+ae.pathname})}]}var oe=F(g.default,{className:w.default.header,align:g.default.Align.CENTER},void 0,F(d.default,{name:""+n.name,detailsClassName:w.default.description,details:Y}),n.enabled?F(g.default.Child,{shrink:0,grow:0},void 0,F(I.default,{className:w.default.expandIcon,expanded:o&&!P,"aria-hidden":!0})):F(g.default.Child,{shrink:0,grow:0},void 0,F(m.default,{size:m.default.Sizes.SMALL,color:m.default.Colors.PRIMARY,onClick:U,disabled:P},void 0,P?W:a.createElement(a.Fragment,null,D.default.Messages.INTEGRATIONS_ENABLE)))),ie=null;return o&&!P&&null!=r&&(ie=F(g.default,{className:w.default.body,direction:g.default.Direction.VERTICAL},void 0,F(O.FormDivider,{className:w.default.topDivider}),H(r,J,Q,ne,te,z),F(O.FormDivider,{className:w.default.midDivider}),x(r,X,(function(e){s.default.updateIntegration({expireBehavior:e})}),(function(e){s.default.updateIntegration({expireGracePeriod:e})})),n.type===L.PlatformTypes.TWITCH?V(r,re,(function(e){s.default.updateIntegration({enableEmoticons:e})})):null,F(O.FormDivider,{className:w.default.bottomDivider}),F(g.default,{},void 0,F(m.default,{className:w.default.disableButton,size:m.default.Sizes.SMALL,color:m.default.Colors.RED,look:m.default.Looks.LINK,onClick:B},void 0,D.default.Messages.INTEGRATIONS_DISABLE)))),F(_.default,{editable:!0,className:w.default.card},void 0,F(g.default,{direction:g.default.Direction.VERTICAL},void 0,n.enabled?F(E.default,{className:w.default.expandableHeader,"aria-expanded":o&&!P,onClick:h},void 0,oe):oe,ie))}Y.displayName="BuiltInIntegrationCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(22)),l=u(n(7728));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=f("polygon",{points:"24 0 0 0 0 24 24 24"});function p(e){var t=e.width,n=void 0===t?16:t,r=e.height,u=void 0===r?16:r,s=e.color,p=void 0===s?"currentColor":s,v=e.foreground,y=e.className,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","className"]);return a.createElement("svg",d({className:(0,o.default)(l.default.updateAvailable,y)},(0,i.default)(m),{width:n,height:u,viewBox:"0 0 24 24"}),f("g",{fill:"none",fillRule:"evenodd"},void 0,f("path",{fill:p,className:v,fillRule:"nonzero",d:"M5,8 L9,12 L6,12 C6,15.31 8.69,18 12,18 C13.01,18 13.97,17.75 14.8,17.3 L16.26,18.76 C15.03,19.54 13.57,20 12,20 C7.58,20 4,16.42 4,12 L1,12 L5,8 Z M18,12 C18,8.69 15.31,6 12,6 C10.99,6 10.03,6.25 9.2,6.7 L7.74,5.24 C8.97,4.46 10.43,4 12,4 C16.42,4 20,7.58 20,12 L23,12 L19,16 L15,12 L18,12 Z"}),c))}p.displayName="UpdateAvailable"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=m(n(1166)),o=m(n(29)),i=m(n(55)),l=n(131),u=m(n(47)),s=m(n(93)),d=m(n(8684)),f=n(1),c=m(n(6)),p=m(n(7731)),v=m(n(8995)),y=m(n(8996));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){var n=e===f.ThemeTypes.DARK?v.default:y.default;return h(i.default,{direction:i.default.Direction.VERTICAL,align:i.default.Align.CENTER},void 0,h("img",{alt:"",src:n,className:p.default.emptyStateImage}),h(u.default,{size:u.default.Sizes.SIZE_16},void 0,c.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_EMPTY),h(o.default,{className:p.default.emptyStateButton,onClick:t},void 0,c.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_EMPTY_BUTTON))}function g(e){var t=e.followedChannelWebhooks,n=e.editedWebhook,r=e.selectableWebhookChannels,o=e.errors,i=e.canNavigate,u=(0,a.default)();return h(l.FormSection,{},void 0,h(l.FormText,{type:l.FormTextTypes.DESCRIPTION},void 0,c.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_DESCRIPTION.format({helpdeskArticle:s.default.getArticleURL(f.HelpdeskArticles.CHANNEL_FOLLOWING)})),h(l.FormDivider,{className:p.default.headerDivider}),t.length>0?h(d.default,{webhooks:t,editedWebhook:n,selectableWebhookChannels:r,errors:o,canNavigate:i}):E(u,(function(){return open(s.default.getArticleURL(f.HelpdeskArticles.CHANNEL_FOLLOWING))})))}E.displayName="renderEmptyState",g.displayName="IntegrationsChannelFollowing"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=F;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=P(n(9)),i=n(3),l=P(n(1166)),u=P(n(183)),s=P(n(8377)),d=P(n(725)),f=P(n(40)),c=P(n(467)),p=P(n(55)),v=P(n(151)),y=n(131),m=P(n(1224)),_=P(n(9862)),h=P(n(8683)),E=P(n(47)),g=P(n(24)),S=n(150),O=P(n(93)),I=P(n(97)),T=P(n(9863)),C=n(1),b=P(n(6)),M=P(n(7733)),N=P(n(9864)),A=P(n(9865));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t,n){var r;return r=e>0?b.default.Messages.INTEGRATIONS_WEBHOOKS_BUTTON:b.default.Messages.INTEGRATIONS_WEBHOOKS_EMPTY_BUTTON,L(T.default,{name:b.default.Messages.INTEGRATIONS_WEBHOOKS,icon:h.default,buttonText:r,buttonDisabled:!t,onButtonClick:n,hasNextSection:e>0,details:[{text:b.default.Messages.INTEGRATIONS_WEBHOOKS_SUMMARY.format({count:e})}]})}function w(e,t){var n,r;return e>0?(n=b.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_BUTTON,r=t):(n=b.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_EMPTY_BUTTON,r=function(){return open(O.default.getArticleURL(C.HelpdeskArticles.CHANNEL_FOLLOWING))}),L(T.default,{name:b.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING,icon:_.default,buttonText:n,onButtonClick:r,hasNextSection:e>0,details:[{text:b.default.Messages.INTEGRATIONS_CHANNEL_FOLLOWING_SUMMARY.format({count:e})}]})}function j(e,t,n){var r,a,o,i=u.default.get(C.PlatformTypes.TWITCH);return e>0?(r=b.default.Messages.INTEGRATIONS_TWITCH_BUTTON,a=b.default.Messages.INTEGRATIONS_TWITCH_SUMMARY.format({count:t}),o=function(){return n(C.PlatformTypes.TWITCH)}):(r=b.default.Messages.INTEGRATIONS_TWITCH_EMPTY_BUTTON,a=b.default.Messages.INTEGRATIONS_TWITCH_EMPTY_SUMMARY,o=function(){return(0,s.default)(C.PlatformTypes.TWITCH)}),L(T.default,{name:b.default.Messages.INTEGRATIONS_TWITCH,icon:i.icon.white,iconBackgroundColor:i.color,iconClassName:M.default.platformIcon,buttonText:r,onButtonClick:o,hasNextSection:e>0,details:[{text:a}]})}function k(e,t,n){var r,a,o,i=u.default.get(C.PlatformTypes.YOUTUBE);return e>0?(r=b.default.Messages.INTEGRATIONS_YOUTUBE_BUTTON,a=b.default.Messages.INTEGRATIONS_YOUTUBE_SUMMARY.format({count:t}),o=function(){return n(C.PlatformTypes.YOUTUBE)}):(r=b.default.Messages.INTEGRATIONS_YOUTUBE_EMPTY_BUTTON,a=b.default.Messages.INTEGRATIONS_YOUTUBE_EMPTY_SUMMARY,o=function(){return(0,s.default)(C.PlatformTypes.YOUTUBE)}),L(T.default,{name:b.default.Messages.INTEGRATIONS_YOUTUBE,icon:i.icon.white,iconBackgroundColor:i.color,iconClassName:M.default.platformIcon,buttonText:r,onButtonClick:o,hasNextSection:e>0,details:[{text:a}]})}function U(e,t){var n=e.application,r=e.integration,a=[];return null!=r.user?a.push({icon:m.default,text:b.default.Messages.INTEGRATION_ADDED_USER_DATE.format({timestamp:I.default.extractTimestamp(r.id),user:r.user.tag})}):a.push({icon:m.default,text:b.default.Messages.INTEGRATION_ADDED_DATE.format({timestamp:I.default.extractTimestamp(r.id)})}),L(T.default,{name:n.name,imageSrc:n.getIconURL(48)||S.DEFAULT_AVATARS[0],integration:e,buttonText:b.default.Messages.INTEGRATIONS_APPLICATION_BUTTON,hasNextSection:!0,onButtonClick:function(){return t(n.id)},details:a},r.id)}function G(e){var t=e===C.ThemeTypes.DARK?N.default:A.default;return L(p.default,{direction:p.default.Direction.VERTICAL,align:p.default.Align.CENTER,className:M.default.emptyStateWrapper},void 0,L("img",{alt:"",src:t,className:M.default.emptyStateImage}),L(c.default,{editable:!0,className:M.default.emptyStateCard},void 0,L(g.default,{color:g.default.Colors.MUTED},void 0,b.default.Messages.INTEGRATIONS_OVERVIEW_NO_APPLICATIONS)))}function F(e){var t=e.guild,n=e.channel,r=e.applicationIntegrations,u=e.builtInIntegrations,s=e.customWebhooks,c=e.followedChannelWebhooks,p=e.isLoading,m=e.canCreateWebhook,_=e.onManageBuiltIn,h=e.onManageCustomWebhooks,g=e.onManageFollowedChannels,S=e.onManageApplication,I=(0,l.default)(),T=(0,i.useStateFromStoresObject)([d.default],(function(){return{isFetchingConnections:d.default.isFetching(),accounts:d.default.getAccounts()}}),[]),N=T.isFetchingConnections,A=T.accounts,P=(0,i.useStateFromStoresObject)([f.default],(function(){return{canManageWebhooks:null!=t&&f.default.can(C.Permissions.MANAGE_WEBHOOKS,t)||null!=n&&f.default.can(C.Permissions.MANAGE_WEBHOOKS,n),canManageGuild:null!=t&&null==n&&f.default.can(C.Permissions.MANAGE_GUILD,t)}}),[t,n]),R=P.canManageWebhooks,F=P.canManageGuild,B=a.useMemo((function(){var e,t,n,r;return{availableTwitchIntegrations:(null===(e=u.twitch)||void 0===e?void 0:e.length)||0,availableYoutubeIntegrations:(null===(t=u.youtube)||void 0===t?void 0:t.length)||0,guildTwitchIntegrations:(null===(n=u.twitch)||void 0===n?void 0:n.filter((function(e){return e.enabled})).length)||0,guildYoutubeIntegrations:(null===(r=u.youtube)||void 0===r?void 0:r.filter((function(e){return e.enabled})).length)||0}}),[u.twitch,u.youtube]),H=B.availableTwitchIntegrations,x=B.availableYoutubeIntegrations,V=B.guildTwitchIntegrations,W=B.guildYoutubeIntegrations,Y=a.useMemo((function(){if(N||!F)return{showTwitchCard:!1,showYoutubeCard:!1};var e=null==t?void 0:t.hasFeature(C.GuildFeatures.COMMUNITY),n=A.filter((function(e){return e.type===C.PlatformTypes.TWITCH})).length>0,r=A.filter((function(e){return e.type===C.PlatformTypes.YOUTUBE})).length>0;return{showTwitchCard:H>0||!n&&e,showYoutubeCard:x>0||!r&&e}}),[N,F,t,A,H,x]),z=Y.showTwitchCard,K=Y.showYoutubeCard,$=Object.values(r).map((function(e){return U(e,S)})),Z=L("div",{className:M.default.footerImage});0===$.length&&F&&($=G(I),Z=null);var q=O.default.getArticleURL(C.HelpdeskArticles.INTEGRATIONS),X=null!=n?b.default.Messages.INTEGRATIONS_OVERVIEW_DESCRIPTION_CHANNEL:b.default.Messages.INTEGRATIONS_OVERVIEW_DESCRIPTION_GUILD,J=[];return R&&(J.push(D(s.length,m,h)),J.push(w(c.length,g))),z&&J.push(j(H,V,_)),K&&J.push(k(x,W,_)),L(y.FormSection,{className:(0,o.default)(null!=Z?M.default.footerPlaceholder:null)},void 0,L(y.FormText,{type:y.FormTextTypes.DESCRIPTION},void 0,X.format({helpdeskArticle:q})),L(y.FormDivider,{className:M.default.divider}),p||N||null==t?L(v.default,{className:M.default.spinner,type:v.default.Type.SPINNING_CIRCLE}):a.createElement(a.Fragment,null,J,F?a.createElement(a.Fragment,null,J.length>0?L(y.FormDivider,{className:M.default.divider}):null,L(E.default,{size:E.default.Sizes.SIZE_16,className:M.default.sectionHeader},void 0,b.default.Messages.INTEGRATIONS_APPLICATION_SECTION),$):null,Z))}D.displayName="renderWebhooksCard",w.displayName="renderFollowedChannelsCard",j.displayName="renderTwitchCard",k.displayName="renderYoutubeCard",U.displayName="renderApplicationCard",G.displayName="renderEmptyState",F.displayName="IntegrationsOverview"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{width:n,height:a,viewBox:"0 0 24 24",className:e.className},void 0,o("path",{fillRule:"evenodd",clipRule:"evenodd",fill:l,className:e.foreground,d:"M20 1.707V4.293L16.707 1L15.293 2.414L18.586 5.707H16V7.707H22V1.707H20ZM5 14.707H8V8.70697C8 7.60497 8.897 6.70697 10 6.70697H14V3.70697C14 2.60497 13.103 1.70697 12 1.70697H5C3.897 1.70697 3 2.60497 3 3.70697V12.707C3 13.809 3.897 14.707 5 14.707ZM12 8.70697H19C20.103 8.70697 21 9.60497 21 10.707V19.707C21 20.81 20.103 21.707 19 21.707H12C10.897 21.707 10 20.81 10 19.707V10.707C10 9.60497 10.897 8.70697 12 8.70697ZM16 12.707V11.707H12V12.707H16ZM12 18.707H19V17.707H12V18.707ZM12 15.707H19V14.707H12V15.707Z"}))}i.displayName="Manifest"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.name,n=e.icon,r=e.imageSrc,E=e.iconBackgroundColor,g=e.iconClassName,O=e.details,I=e.integration,T=e.buttonText,C=e.buttonDisabled,b=e.hasNextSection,M=e.onButtonClick,N=a.useState(!1),A=N[0],P=N[1],R=S(f.default,{},void 0,S(i.default,{name:t,icon:n,imageSrc:r,iconBackgroundColor:E,iconClassName:g,details:O}),S(f.default.Child,{shrink:0,grow:0},void 0,S(f.default,{align:f.default.Align.CENTER,justify:f.default.Justify.END},void 0,function(e,t){if(null==e)return null;var n=[],r=e.application,a=e.webhooks;null!=r.bot&&n.push(S(c.TooltipContainer,{forceOpen:t,text:new l.default(r.bot).isVerifiedBot()?_.default.Messages.INTEGRATIONS_APPLICATION_VERIFIED_BOT:_.default.Messages.INTEGRATIONS_APPLICATION_BOT,className:h.default.feature},"bot",S(v.default,{width:24,height:24,className:h.default.featureIcon})));a.length>0&&n.push(S(c.TooltipContainer,{forceOpen:t,text:_.default.Messages.INTEGRATIONS_WEBHOOKS_SUMMARY.format({count:a.length}),className:h.default.feature},"webhooks",S(y.default,{width:24,height:24,className:h.default.featureIcon})));return n}(I,A),function(e,t,n,r){if(null==e||null==r)return null;return n?S(f.default,{align:f.default.Align.CENTER},void 0,S(m.default,{},void 0,e),n?S(p.default,{width:10,height:10,className:h.default.caret}):null):S(u.default,{size:u.default.Sizes.SMALL,look:n?u.default.Looks.LINK:u.default.Looks.FILLED,color:n?u.default.Colors.PRIMARY:u.default.Colors.BRAND,disabled:t,onClick:r},void 0,e)}(T,C,b,M))));return b?S(d.default,{onClick:M,onFocus:function(){return P(!0)},onBlur:function(){return P(!1)}},void 0,S(s.default,{editable:!0,className:(0,o.default)(h.default.card,h.default.clickable)},void 0,R)):S(s.default,{editable:!0,className:h.default.card},void 0,R)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=E(n(8401)),l=E(n(89)),u=E(n(29)),s=E(n(467)),d=E(n(61)),f=E(n(55)),c=n(149),p=E(n(5950)),v=E(n(1283)),y=E(n(8683)),m=E(n(24)),_=E(n(6)),h=E(n(7732));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){e.exports=n.p+"36d0e0bb009fa362c2533003c0af67b5.svg"},function(e,t,n){e.exports=n.p+"c9b2eb9473c66578a8e021e9fe46b74b.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=I(n(0)),o=S(n(8)),i=S(n(154)),l=S(n(8317)),u=S(n(8369)),s=S(n(1166)),d=S(n(29)),f=S(n(55)),c=n(131),p=S(n(47)),v=S(n(93)),y=I(n(8684)),m=n(1),_=S(n(6)),h=S(n(7734)),E=S(n(8995)),g=S(n(8996));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))}}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t,n){var r=e===m.ThemeTypes.DARK?E.default:g.default;return b(f.default,{direction:f.default.Direction.VERTICAL,align:f.default.Align.CENTER},void 0,b("img",{alt:"",src:r,className:h.default.emptyStateImage}),b(p.default,{size:p.default.Sizes.SIZE_16},void 0,_.default.Messages.INTEGRATIONS_WEBHOOKS_EMPTY),b(d.default,{className:h.default.emptyStateButton,disabled:!t,onClick:n},void 0,_.default.Messages.INTEGRATIONS_WEBHOOKS_EMPTY_BUTTON))}function N(e){var t,n=e.guild,r=e.channel,f=e.customWebhooks,p=e.editedWebhook,E=e.selectableWebhookChannels,g=e.refToScroller,S=e.errors,O=e.canNavigate,I=(0,s.default)(),T=a.useState(null),N=T[0],A=T[1],P=a.useState(null),R=P[0],L=P[1];if(null!=r)t=r;else{var D=Object.values(E);t=D.length>0?D[0]:null}var w=a.useCallback(C(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O()||null===t){e.next=5;break}return e.next=3,u.default.create(n.id,t.id).catch((function(e){var t=e.body;return t&&t.code===m.AbortCodes.TOO_MANY_WEBHOOKS?i.default.show({title:_.default.Messages.WEBHOOK_ERROR_CREATING_WEBHOOK,body:_.default.Messages.WEBHOOK_ERROR_MAX_WEBHOOKS_REACHED}):i.default.show({title:_.default.Messages.WEBHOOK_ERROR_CREATING_WEBHOOK,body:_.default.Messages.WEBHOOK_ERROR_INTERNAL_SERVER_ERROR}),null}));case 3:null!=(r=e.sent)&&(L(r.id),A(r));case 5:case"end":return e.stop()}}),e)}))),[O,t,n]);a.useEffect((function(){if(null!=R){var e,t=document.getElementById((0,y.getNodeId)(R));if(null!=t)l.default.startEditingWebhook(R),null===(e=g.current)||void 0===e||e.scrollIntoViewNode({node:t}),L(null)}}),[f,R,g]),a.useEffect((function(){if(null!=N){var e=f.find((function(e){return e.id===N.id}));null==e||o.default.isEqual(e,N)||A(null)}}),[f,R,N]),a.useEffect((function(){0===f.length&&w()}),[]);var j=null!==t;return b(c.FormSection,{},void 0,b(c.FormText,{type:c.FormTextTypes.DESCRIPTION},void 0,_.default.Messages.INTEGRATIONS_WEBHOOKS_DESCRIPTION.format({helpdeskArticle:v.default.getArticleURL(m.HelpdeskArticles.WEBHOOKS),developersArticle:m.MarketingURLs.API_DOCS_WEBHOOKS})),b(c.FormDivider,{className:h.default.headerDivider}),f.length>0?a.createElement(a.Fragment,null,b(d.default,{className:h.default.createButton,size:d.default.Sizes.SMALL,disabled:!j,onClick:w},void 0,_.default.Messages.INTEGRATIONS_WEBHOOKS_CREATE),b(y.default,{webhooks:f,editedWebhook:p,selectableWebhookChannels:E,lastCreatedWebhookId:null==N?void 0:N.id,errors:S,canNavigate:O})):M(I,j,w))}M.displayName="renderEmptyState",N.displayName="IntegrationsWebhooks"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(9178)),o=u(n(8255)),i=u(n(160)),l=u(n(39));function u(e){return e&&e.__esModule?e:{default:e}}var s=r.default.connectStores([o.default,l.default,i.default],(function(){var e=o.default.getProps(),t=e.invites;return{guild:e.guild,invites:t,showChannel:!0,hide:i.default.hideInstantInvites,theme:l.default.theme}}))(a.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=z(n(0)),o=W(n(9)),i=W(n(8)),l=W(n(3)),u=n(389),s=W(n(199)),d=W(n(8254)),f=W(n(8501)),c=W(n(8984)),p=n(8305),v=W(n(9869)),y=z(n(714)),m=W(n(9871)),_=W(n(684)),h=W(n(56)),E=W(n(8255)),g=W(n(40)),S=W(n(160)),O=W(n(39)),I=W(n(12)),T=W(n(271)),C=n(717),b=W(n(1222)),M=W(n(29)),N=n(8503),A=W(n(55)),P=W(n(5942)),R=W(n(149)),L=n(131),D=W(n(8803)),w=W(n(8663)),j=n(41),k=W(n(279)),U=n(393),G=n(1),F=W(n(6)),B=W(n(7739)),H=W(n(5958)),x=W(n(7347)),V=W(n(370));function W(e){return e&&e.__esModule?e:{default:e}}function Y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Y=function(){return e},e}function z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function K(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $(){return($=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}).apply(this,arguments)}function Z(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,q(e,t)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var X=[],J=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._isMounted=!1,t.state={overflowShown:!1},t.showOverflow=function(e){var n=t.props,r=n.guild,o=n.user;t.setState({overflowShown:!0}),(0,u.openContextMenu)(e,(function(e){return a.createElement(m.default,$({user:o,guildId:r.id,channelId:r.id},e))}),{onClose:t.handleOverflowClose})},t.handleOverflowClose=function(){t._isMounted&&t.setState({overflowShown:!1})},t}Z(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0},n.componentWillUnmount=function(){this._isMounted=!1},n.renderOwnerHelpIcon=function(){var e=this.props,t=e.user,n=e.guild;return t.id!==n.ownerId?null:K(R.default,{text:F.default.Messages.MEMBER_LIST_SERVER_OWNER_HELP},void 0,(function(e){return a.createElement(D.default,$({className:B.default.ownerHelpIcon},e,{"aria-label":F.default.Messages.GUILD_OWNER}))}))},n.render=function(){var e=this.props,t=e.user,n=e.member,r=e.streamerMode,a=e.guild,i=this.state.overflowShown,l={color:n.colorString||void 0};return K(A.default,{className:(0,o.default)(B.default.member,x.default.card,{active:i}),align:A.default.Align.CENTER,onContextMenu:this.showOverflow},void 0,K(k.default,{className:B.default.avatar,src:t.getAvatarURL(a.id),"aria-label":t.username,size:k.default.Sizes.SIZE_40}),K(A.default,{className:B.default.nameTag,direction:A.default.Direction.VERTICAL,grow:0},void 0,K(A.default,{align:A.default.Align.CENTER},void 0,K(L.FormText,{className:B.default.name,style:l},void 0,n.nick||t.toString()),t.bot?K(b.default,{verified:t.isVerifiedBot()}):null,this.renderOwnerHelpIcon()),r?null:K(L.FormText,{className:B.default.tag},void 0,"@",t.tag)),K(A.default.Child,{className:B.default.roleWrapper},void 0,K("div",{},void 0,K(f.default,{user:t,guild:a,userRoles:n.roles,wrap:!1}))),K(A.default,{className:B.default.overflowButton,align:A.default.Align.CENTER,grow:0},void 0,K(M.default,{look:M.default.Looks.BLANK,color:M.default.Colors.TRANSPARENT,size:M.default.Sizes.ICON,onClick:this.showOverflow,"aria-label":F.default.Messages.OTHER_OPTIONS},void 0,K(w.default,{className:B.default.overflowIcon,foreground:B.default.overflowIconFg,"aria-hidden":!0}))))},t}(a.PureComponent);function Q(e){return{role:e,label:e.name,value:e.id}}J.displayName="Member";var ee=K(N.ComboboxItem.Checkmark,{}),te=function(e){function t(){for(var t,n,r=arguments.length,l=new Array(r),u=0;u<r;u++)l[u]=arguments[u];return(t=e.call.apply(e,[this].concat(l))||this).state=(n=t.props.guild,{searchQuery:"",autocompleter:new y.default((function(){return t.forceUpdate()}),[y.AutocompleterResultTypes.USER],100,{userFilters:{guild:(null==n?void 0:n.id)||"",strict:!0}})}),t.handlePruneClick=function(){var e=t.props.guild;null!=e&&(0,j.openModal)((function(t){return a.createElement(v.default,$({},t,{guild:e}))}))},t.renderItem=function(e){var t,n=e.role;return K(N.ComboboxItem,{value:n.id},n.id,K(N.ComboboxItem.Label,{},void 0,K("span",{style:{color:null!==(t=n.colorString)&&void 0!==t?t:""}},void 0,n.name)),ee)},t.sortedMembers=(0,U.cachedFunction)((function(e,t,n,r,a){var o=[];return null==r||(""===t?(0,i.default)(e).sortBy((function(e){var t=I.default.getUser(e.userId);return(null!=t?e.nick||t.username:"").toLocaleLowerCase()})).forEach((function(e){null!=I.default.getUser(e.userId)&&(n!==r.id&&null!=n&&-1===e.roles.indexOf(n)||o.push(e))})):(0,i.default)(a).forEach((function(e){if(e.type===y.AutocompleterResultTypes.USER){var t=e.record,a=h.default.getMember(r.id,t.id);null!=a&&(n!==r.id&&null!=n&&-1===a.roles.indexOf(n)||o.push(a))}}))),o})),t.renderRow=function(e){var n=e.section,r=e.row;if(n>0)return null;var a=t.getSortedMembers()[r];if(null==a)return null;var o=t.props,i=o.currentUser,l=o.guild,u=o.streamerMode,s=I.default.getUser(a.userId);return null==s||null==l?null:K(J,{currentUser:i,member:a,user:s,guild:l,streamerMode:u},a.userId)},t.getRowHeight=function(e,n){if(e>0)return 0;var r=t.getSortedMembers()[n];return null==r||null==I.default.getUser(r.userId)?0:72},t.renderSection=function(){var e=t.getSortedMembers(),n=t.state.searchQuery,r=t.props,a=r.guild,l=r.selectedRoleId,u=r.memberCount;if(null==a)return null;var s={label:"???",value:l},d=(0,i.default)(a.roles).sortBy((function(e){return-e.position})).map((function(e){return e.id===l&&(s.label=e.name),Q(e)})).value(),f=new Intl.NumberFormat(F.default.getLocale()).format(0===n.length?u:e.length);return K(L.FormSection,{},"header",K(L.FormTitle,{tag:L.FormTitleTags.H1},void 0,F.default.Messages.GUILD_SETTINGS_MEMBERS_SERVER_MEMBERS),K(A.default,{className:B.default.membersHeader,align:A.default.Align.CENTER,style:{height:20}},void 0,K(A.default.Child,{},void 0,K(L.FormText,{type:L.FormTextTypes.DESCRIPTION,className:B.default.membersCount},void 0,F.default.Messages.MEMBERS_HEADER.format({members:f}),t.renderPruneAction())),K(A.default,{align:A.default.Align.CENTER,grow:0},void 0,K(c.default,{popoutClassName:(0,o.default)(B.default.membersFilterPopout,H.default.elevationBorderLow),items:d,label:F.default.Messages.GUILD_SETTINGS_MEMBERS_DISPLAY_ROLE,value:s,renderItem:t.renderItem,renderValue:t.renderValue,onChange:t.handleRoleChange,placeholder:F.default.Messages.SEARCH_ROLES,popoutProps:{autoInvert:!1,position:C.PopoutPositions.BOTTOM}}),K(P.default,{className:B.default.searchBar,query:n,onChange:t.handleQueryChange,onClear:t.handleQueryClear}))),K(L.FormDivider,{className:V.default.marginTop20,style:{marginBottom:-1}}))},t.handleQueryChange=function(e){var n=t.props.guild;t.setState({searchQuery:e}),t.state.autocompleter.search(e,null==n?void 0:n.id)},t.handleQueryClear=function(){t.setState({searchQuery:""}),t.state.autocompleter.clear()},t}Z(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.guild,n=e.memberCount;n>0&&n<=1e4&&null!=t&&s.default.requestMembers(t.id,"",1e4,!1)},n.componentWillUnmount=function(){this.state.autocompleter.destroy()},n.renderPruneAction=function(){return this.props.canPrune?K("span",{},void 0," — ",K(T.default,{onClick:this.handlePruneClick,className:B.default.pruneLink},void 0,F.default.Messages.PRUNE)):null},n.renderValue=function(e){return e.label},n.getSortedMembers=function(){var e=this.props,t=e.members,n=e.guild,r=e.selectedRoleId,a=this.state,o=a.searchQuery,i=a.autocompleter;return this.sortedMembers(t,o,r,n||null,i.results)},n.render=function(){var e=this.getSortedMembers();return K(p.ListContentScroller,{sections:[Math.max(1,e.length)],rowHeight:this.getRowHeight,renderRow:this.renderRow,renderSection:this.renderSection,sectionHeight:81})},n.handleRoleChange=function(e){d.default.selectRole(e)},t}(a.PureComponent);te.displayName="GuildSettingsMembers";var ne=l.default.connectStores([E.default,O.default,S.default,I.default,h.default,g.default,_.default],(function(){var e=E.default.getProps(),t=e.guild,n=e.selectedRoleId;return{memberCount:null!=t&&_.default.getMemberCount(t.id)||0,guild:t,selectedRoleId:n,members:null!=t?h.default.getMembers(t.id):X,theme:O.default.theme,currentUser:I.default.getCurrentUser(),canPrune:null!=t&&g.default.can(G.Permissions.KICK_MEMBERS,t),streamerMode:S.default.hidePersonalInformation}}))(te);t.default=ne},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=S(n(0)),o=E(n(8)),i=n(3),l=E(n(9870)),u=n(8501),s=E(n(40)),d=E(n(29)),f=E(n(1162)),c=S(n(1159)),p=E(n(476)),v=E(n(474)),y=n(35),m=E(n(47)),_=E(n(6)),h=E(n(7737));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){I(o,r,a,i,l,"next",e)}function l(e){I(o,r,a,i,l,"throw",e)}i(void 0)}))}}function C(){return(C=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}).apply(this,arguments)}var b=C({},c.DEFAULT_SELECT_STYLES,{control:function(e,t){var n=t.isDisabled,r=t.isFocused,a=t.menuIsOpen,o=t.theme.colors;return C({},e,{borderColor:n?o.neutral10:r?o.primary:o.neutral20,boxShadow:null,borderRadius:a?"3px 3px 0 0":"3px",minHeight:40,transition:"border 0.15s ease",cursor:n?"not-allowed":null,pointerEvents:n?"none":null,maxHeight:150,overflowY:"auto",":hover":{borderColor:n?o.neutral10:o.primary}})}}),M=function(e){var t=e.guild,n=e.transitionState,r=e.onClose,E=a.useState(7),g=E[0],S=E[1],I=a.useState(null),C=I[0],M=I[1],N=a.useState([]),A=N[0],P=N[1],R=a.useCallback(T(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(null),e.next=3,l.default.updateEstimate(t.id,g,A);case 3:n=e.sent,M(n);case 5:case"end":return e.stop()}}),e)}))),[g,t.id,A]);a.useEffect((function(){R()}),[R]);var L=(0,i.useStateFromStores)([s.default],(function(){var e=s.default.getHighestRole(t);return(0,o.default)(t.roles).sortBy((function(e){return e.position})).filter((function(e){return e.id!==t.id})).filter((function(n){return s.default.isRoleHigher(t,e,n)})).value()})).map((function(e){var t=e.id;return{label:e.name,value:t}}));return O(y.ModalRoot,{"aria-labelledby":_.default.Messages.PRUNE_MEMBERS,transitionState:n},void 0,O(y.ModalHeader,{separator:!1},void 0,O(m.default,{tag:m.default.Tags.H2,size:m.default.Sizes.SIZE_20},void 0,_.default.Messages.PRUNE_MEMBERS,"—",null!=t?t.toString():"")),O("div",{className:h.default.content},void 0,O(p.default,{title:_.default.Messages.FORM_LABEL_LAST_SEEN},void 0,O(f.default,{value:g,options:[{name:_.default.Messages.LAST_SEEN.format({days:7}),value:7},{name:_.default.Messages.LAST_SEEN.format({days:30}),value:30}],onChange:function(e){var t=e.value;S(t)},className:h.default.spacing})),O(p.default,{title:_.default.Messages.PRUNE_WITH_ROLES},void 0,O(c.default,{isMulti:!0,options:L,onChange:function(e){P(e.map((function(e){return e.value})))},value:A,multiValueRenderer:function(e){var n=e.value,r=t.getRole(n);if(null==r)return null;var a=A.indexOf(n);return O(u.MemberRole,{className:h.default.role,role:r,canRemove:!0,onRemove:function(){P([].concat(A.slice(0,a),A.slice(a+1)))}})},maxMenuHeight:200,styleOverrides:b})),O(v.default,{type:v.default.Types.DESCRIPTION,className:h.default.spacing},void 0,A.length>0?_.default.Messages.FORM_HELP_LAST_SEEN_WITH_ROLES.format({members:C,days:g}):_.default.Messages.FORM_HELP_LAST_SEEN.format({members:C,days:g}))),O(y.ModalFooter,{},void 0,O(d.default,{onClick:function(){l.default.prune(t.id,g,A),r()}},void 0,_.default.Messages.PRUNE),O(d.default,{look:d.default.Looks.LINK,color:d.default.Colors.PRIMARY,onClick:r},void 0,_.default.Messages.CANCEL)))};M.displayName="PruneGuildModal";var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(14))&&r.__esModule?r:{default:r},o=n(1);function i(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var l={updateEstimate:function(e,t,n){return(r=regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return void 0===t&&(t=7),r.next=3,a.default.get({url:o.Endpoints.GUILD_PRUNE(e),query:{days:t,include_roles:n},oldFormErrors:!0});case 3:return i=r.sent,r.abrupt("return",i.body.pruned);case 5:case"end":return r.stop()}}),r)})),function(){var e=this,t=arguments;return new Promise((function(n,a){var o=r.apply(e,t);function l(e){i(o,n,a,l,u,"next",e)}function u(e){i(o,n,a,l,u,"throw",e)}l(void 0)}))})();var r},prune:function(e,t,n){return a.default.post({url:o.Endpoints.GUILD_PRUNE(e),body:{days:t,compute_prune_count:!1,include_roles:n},oldFormErrors:!0})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;h(n(0));var r,a=n(389),o=m(n(8257)),i=m(n(8258)),l=m(n(8405)),u=h(n(8253)),s=m(n(11)),d=m(n(8603)),f=m(n(9872)),c=m(n(8387)),p=m(n(8435)),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.user,n=e.guildId,r=e.channelId,m=e.analyticsContext,_=e.onSelect,h=(0,c.default)(t.id),g=(0,l.default)(n,t.id,{page:v.AnalyticsPages.GUILD_CHANNEL,section:v.AnalyticsSections.CHAT_USERNAME,object:v.AnalyticsObjects.CONTEXT_MENU_ITEM}),S=(0,d.default)(t,n,r),O=(0,p.default)(t.id,n),I=(0,f.default)(t,n),T=(0,i.default)(t.id);return s.default.isGuest()||t.isNonUserBot()?null:E(o.default,{context:m,object:v.AnalyticsObjects.CONTEXT_MENU},void 0,E(u.default,{navId:"user-context",onClose:a.closeContextMenu,"aria-label":y.default.Messages.USER_ACTIONS_MENU_LABEL,onSelect:_},void 0,E(u.MenuGroup,{},void 0,h,g),E(u.MenuGroup,{},void 0,S),E(u.MenuGroup,{},void 0,O),E(u.MenuGroup,{},void 0,I),E(u.MenuGroup,{},void 0,T)))}g.displayName="GuildSettingsUserContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=p(n(9873)),l=n(8253),u=n(8256),s=p(n(15)),d=p(n(12)),f=n(41),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(e,t){var n=(0,o.useStateFromStores)([d.default],(function(){return d.default.getCurrentUser()})),r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuild(t)}));return null==r||null==n||e.id===r.ownerId||e.bot||!r.isOwnerWithRequiredMfaLevel(n)?null:y(l.MenuItem,{id:"transfer-ownership",color:u.MenuItemColor.DANGER,label:c.default.Messages.TRANSFER_OWNERSHIP,action:function(){return(0,f.openModal)((function(t){return a.createElement(i.default,m({},t,{guild:r,fromUser:n,toUser:e}))}))}})}_.displayName="useTransferGuildOwnershipItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=g(n(0)),o=h(n(8254)),i=n(687),l=g(n(8332)),u=h(n(29)),s=h(n(55)),d=h(n(8267)),f=n(85),c=h(n(474)),p=n(35),v=h(n(47)),y=n(1),m=h(n(6)),_=h(n(7738));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function I(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){O(o,r,a,i,l,"next",e)}function l(e){O(o,r,a,i,l,"throw",e)}i(void 0)}))}}function T(e){var t=e.guild,n=e.toUser,r=e.fromUser,h=e.onClose,E=e.transitionState,g=a.useState(!1),O=g[0],T=g[1],C=(0,f.useUID)(),b=t.hasFeature(y.GuildFeatures.VERIFIED)||t.hasFeature(y.GuildFeatures.PARTNERED),M=b?m.default.Messages.TRANSFER_OWNERSHIP_PROTECTED_GUILD:null;function N(){return(N=I(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.preventDefault(),h(),e.prev=2,e.next=5,o.default.transferOwnership(t.id,n.id);case 5:(0,i.popLayer)(),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(2);case 10:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}return S(p.ModalRoot,{transitionState:E,"aria-labelledby":C},void 0,S("form",{onSubmit:function(e){return N.apply(this,arguments)}},void 0,S(p.ModalHeader,{separator:!1},void 0,S(v.default,{id:C,tag:v.default.Tags.H2,size:v.default.Sizes.SIZE_20},void 0,m.default.Messages.TRANSFER_OWNERSHIP,"—",n.toString())),S(p.ModalContent,{},void 0,S(s.default,{className:_.default.fromToWrapper,justify:s.default.Justify.CENTER},void 0,S("div",{className:_.default.from},void 0,S(l.default,{user:r,size:l.Sizes.SIZE_80})),S("div",{className:_.default.to},void 0,S(l.default,{user:n,size:l.Sizes.SIZE_80}))),S(d.default,{disabled:b,tooltipNote:M,hideBorder:!0,value:O,onChange:function(e){T(e)}},void 0,S(c.default,{type:c.default.Types.DESCRIPTION},void 0,m.default.Messages.TRANSFER_OWNERSHIP_ACKNOWLEDGE.format({username:n.toString()})))),S(p.ModalFooter,{},void 0,S(u.default,{type:"submit",disabled:!O,color:u.default.Colors.RED},void 0,m.default.Messages.TRANSFER_OWNERSHIP),S(u.default,{look:u.default.Looks.LINK,color:u.default.Colors.PRIMARY,onClick:h},void 0,m.default.Messages.CANCEL))))}T.displayName="TransferOwnership"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=T(n(9)),i=T(n(3)),l=T(n(8254)),u=T(n(8316)),s=T(n(11)),d=T(n(8255)),f=T(n(40)),c=T(n(160)),p=T(n(1162)),v=n(149),y=T(n(1165)),m=T(n(681)),_=b(n(474)),h=n(159),E=n(9179),g=T(n(9875)),S=n(1),O=T(n(6)),I=T(n(370));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=M(u.default,{}),R=M(g.default,{}),L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleVerificationLevelChange=function(e){var t=e.value;l.default.updateGuild({verificationLevel:t})},t.handleExplicitContentFilterChange=function(e){var t=e.value;l.default.updateGuild({explicitContentFilter:t})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var a=r.prototype;return a.renderVerificationLevelSection=function(){var e=this.props,t=e.canManageGuild,n=e.guild,r=(0,E.generateVerificationLevelOptions)(n.hasFeature(S.GuildFeatures.COMMUNITY)).map((function(e){return N({},e,{tooltipPosition:v.TooltipPositions.LEFT})}));return M(m.default,{title:O.default.Messages.FORM_LABEL_VERIFICATION_LEVEL},void 0,M(_.default,{type:_.Types.DESCRIPTION,className:I.default.marginBottom20},void 0,O.default.Messages.FORM_HELP_VERIFICATION_LEVEL.format()),M(p.default,{value:n.verificationLevel,options:r,disabled:!t,onChange:this.handleVerificationLevelChange}))},a.renderExplicitContentFilter=function(){var e=this.props,t=e.canManageGuild,n=e.guild,r=(0,E.generateContentFilterOptions)(n.hasFeature(S.GuildFeatures.COMMUNITY)).map((function(e){return N({},e,{tooltipPosition:v.TooltipPositions.LEFT})}));return M(m.default,{title:O.default.Messages.FORM_LABEL_EXPLICIT_CONTENT_FILTER},void 0,M(_.default,{type:_.Types.DESCRIPTION,className:I.default.marginBottom20},void 0,O.default.Messages.FORM_HELP_EXPLICIT_CONTENT_FILTER.format()),M(p.default,{value:n.explicitContentFilter,options:r,disabled:!t,onChange:this.handleExplicitContentFilterChange}))},a.render=function(){var e=this.props,t=e.hide,n=e.canManageGuild;if(t)return P;var r=!1;return n&&(r=!0),M(m.default,{title:O.default.Messages.MODERATION,tag:h.Tags.H1},void 0,this.renderVerificationLevelSection(),M(y.default,{className:(0,o.default)(I.default.marginTop40,I.default.marginBottom40)}),this.renderExplicitContentFilter(),r&&M(y.default,{className:(0,o.default)(I.default.marginTop40,I.default.marginBottom40)}),r&&R)},r}(a.PureComponent);L.displayName="GuildSettingsModeration";var D=i.default.connectStores([c.default,s.default,d.default,f.default],(function(){var e=d.default.getProps().guild,t=!1;return null!=e&&(t=f.default.can(S.Permissions.MANAGE_GUILD,e)),{currentUserId:s.default.getId(),canManageGuild:t,guild:e,hide:c.default.enabled}}))(L);t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=g(n(0)),o=h(n(3)),i=h(n(8254)),l=h(n(473)),u=h(n(8255)),s=h(n(12)),d=g(n(29)),f=h(n(149)),c=h(n(681)),p=g(n(474)),v=n(1),y=h(n(6)),m=h(n(7740)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).setMFAEnabled=function(e){var n=t.props.guild;i.default.updateMFALevel({guildId:n.id,level:e?v.MFALevels.ELEVATED:v.MFALevels.NONE,isEnabled:!e})},t.handleEnableMFA=function(){t.setMFAEnabled(!0)},t.handleDisableMFA=function(){t.setMFAEnabled(!1)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var o=r.prototype;return o.renderEnableButton=function(){var e=this,t=this.props,n=t.currentUser,r=t.guild,o=n.mfaEnabled&&r.isOwnerWithRequiredMfaLevel(n),i=o?null:y.default.Messages.GUILD_SECURITY_REQ_OWNER_ONLY;return S(f.default,{text:i},void 0,(function(t){return a.createElement(d.default,O({className:m.default.buttonWithTooltip,disabled:!o,look:d.ButtonLooks.OUTLINED,color:d.ButtonColors.PRIMARY,onClick:e.handleEnableMFA},t),y.default.Messages.GUILD_SECURITY_REQ_MFA_GUILD_ENABLE)}))},o.renderDisableButton=function(){var e=this.props,t=e.currentUser,n=e.guild,r=t.mfaEnabled&&n.isOwnerWithRequiredMfaLevel(t);return n.hasFeature(v.GuildFeatures.DISCOVERABLE)?S(f.default,{text:y.default.Messages.TOOLTIP_DISCOVERABLE_GUILD_FEATURE_DISABLED},void 0,(function(e){return a.createElement(d.default,O({className:m.default.buttonWithTooltip,disabled:!0,look:d.ButtonLooks.OUTLINED,color:d.ButtonColors.RED},e),y.default.Messages.GUILD_SECURITY_REQ_MFA_GUILD_DISABLE)})):S(d.default,{disabled:!r,look:d.ButtonLooks.OUTLINED,color:d.ButtonColors.RED,onClick:this.handleDisableMFA},void 0,y.default.Messages.GUILD_SECURITY_REQ_MFA_GUILD_DISABLE)},o.render=function(){var e=this.props,t=e.currentUser,n=e.mfaLevel;return S(c.default,{title:y.default.Messages.GUILD_SECURITY_REQ_MFA_LABEL},void 0,S(p.default,{type:p.Types.DESCRIPTION,className:_.default.marginBottom20},void 0,y.default.Messages.GUILD_SECURITY_REQ_MFA_BODY.format()," ",t.mfaEnabled?null:y.default.Messages.GUILD_SECURITY_REQ_MFA_ENABLE.format({onClick:this.openUserAccountModal})),n===v.MFALevels.ELEVATED?this.renderDisableButton():this.renderEnableButton())},o.openUserAccountModal=function(){l.default.open(v.UserSettingsSections.ACCOUNT)},r}(a.PureComponent);T.displayName="MFASettings";var C=o.default.connectStores([s.default,u.default],(function(){var e=u.default.getProps(),t=e.mfaLevel,n=e.guild;return{currentUser:s.default.getCurrentUser(),mfaLevel:t,guild:n}}))(T);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GuildSettingsOverviewNotice=void 0;var r,a=$(n(0)),o=z(n(9)),i=z(n(8)),l=z(n(3)),u=z(n(8254)),s=z(n(8664)),d=z(n(8338)),f=z(n(9877)),c=z(n(8327)),p=n(9146),v=z(n(8292)),y=z(n(1331)),m=n(180),_=n(8328),h=z(n(10)),E=z(n(684)),g=z(n(8255)),S=z(n(40)),O=z(n(8665)),I=z(n(70)),T=z(n(39)),C=z(n(12)),b=$(n(29)),M=z(n(55)),N=z(n(1162)),A=z(n(9878)),P=z(n(1159)),R=z(n(8267)),L=z(n(153)),D=z(n(476)),w=z(n(681)),j=$(n(474)),k=$(n(159)),U=z(n(8672)),G=n(41),F=z(n(150)),B=n(99),H=z(n(93)),x=n(1),V=z(n(6)),W=z(n(7742)),Y=z(n(370));function z(e){return e&&e.__esModule?e:{default:e}}function K(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return K=function(){return e},e}function $(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=K();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Z(){return(Z=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}).apply(this,arguments)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function J(e){var t=e.label,n=e.channel,r=e.category,a=(0,_.getChannelIconComponent)(n),o=null!=r?(0,m.computeChannelName)(r,C.default,I.default):null;return X(U.default,{title:t,icon:a,subtitle:o})}function Q(e){return{value:e.id,label:(0,m.computeChannelName)(e,C.default,I.default),channel:e,category:h.default.getChannel(e.parent_id)}}J.displayName="renderChannelOption";var ee=l.default.connectStores([g.default,T.default],(function(){var e=g.default.getProps(),t=e.guild,n=e.submitting;return{theme:T.default.theme,submitting:n,onReset:function(){null!=t&&u.default.init(t.id)},onSave:function(){null!=t&&u.default.saveGuild(t.id,{name:t.name,region:t.region,icon:t.icon,splash:t.splash,afkChannelId:t.afkChannelId,afkTimeout:t.afkTimeout,systemChannelId:t.systemChannelId,verificationLevel:t.verificationLevel,defaultMessageNotifications:t.defaultMessageNotifications,explicitContentFilter:t.explicitContentFilter,description:t.description,banner:t.banner,systemChannelFlags:t.systemChannelFlags,features:t.features,publicUpdatesChannelId:t.publicUpdatesChannelId})}}}))(v.default);t.GuildSettingsOverviewNotice=ee;var te=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._imageInputRef=a.createRef(),t.handleUploadImage=function(e){var n;e.target===e.currentTarget&&(null===(n=t._imageInputRef.current)||void 0===n||n.activateUploadDialogue())},t.handleShowJoinsChange=function(e){return t.handleSystemChannelFlagsChange(x.SystemChannelFlags.SUPPRESS_JOIN_NOTIFICATIONS,!e)},t.handleShowSubscriptionsChange=function(e){return t.handleSystemChannelFlagsChange(x.SystemChannelFlags.SUPPRESS_PREMIUM_SUBSCRIPTIONS,!e)},t.handleShowGuildRemindersChange=function(e){t.handleSystemChannelFlagsChange(x.SystemChannelFlags.SUPPRESS_GUILD_REMINDER_NOTIFICATIONS,!e)},t.handleRegionSelectorClick=function(){var e=t.props.regions;if(null!=e){var n=e.filter((function(e){return!e.deprecated}));(0,G.openModal)((function(e){return a.createElement(p.RegionSelectModal,Z({regions:n,onChange:t.handleRegionChange},e))}))}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,q(t,n);var l=r.prototype;return l.componentDidMount=function(){null==this.props.regions&&null!=this.props.guild&&s.default.fetchRegions(this.props.guild.id)},l.componentDidUpdate=function(e){var t=this.props.guild;null!=t&&null!=e.guild&&t.id!==e.guild.id&&(null==O.default.getRegions(t.id)&&s.default.fetchRegions(t.id))},l.handleNameChange=function(e){u.default.updateGuild({name:e})},l.handleIconChange=function(e){u.default.updateGuild({icon:e})},l.handleAFKChannelChange=function(e){var t=e.value;"NO_AFK_CHANNEL"===t&&(t=null),u.default.updateGuild({afkChannelId:t})},l.handleAFKTimeoutChange=function(e){var t=e.value;u.default.updateGuild({afkTimeout:parseInt(t,10)})},l.handleSystemChannelChange=function(e){var t=e.value;"NO_SYSTEM_CHANNEL"===t&&(t=null),u.default.updateGuild({systemChannelId:t})},l.handleDefaultMessageNotificationsChange=function(e){var t=e.value;u.default.updateGuild({defaultMessageNotifications:t})},l.handleSplashChange=function(e){u.default.updateGuild({splash:e})},l.handleRegionChange=function(e){var t=e.id;u.default.updateGuild({region:t})},l.handleSystemChannelFlagsChange=function(e,t){var n=this.props.guild;if(null!=n){var r=(0,B.setFlag)(n.systemChannelFlags,e,t);u.default.updateGuild({systemChannelFlags:r})}},l.handleChangeDescription=function(e){u.default.updateGuild({description:e})},l.handleBannerChange=function(e){u.default.updateGuild({banner:e})},l.renderBaseSettings=function(){var e,t,n=this.props,r=n.guild,i=n.region,l=n.regions,u=n.errors,s=n.canManageGuild,d=null==l||0===l.length;return null==r?null:(t=y.default.getCurrentConfig({guildId:r.id}).useGuildVoiceChannelLatencyRouting?X(j.default,{type:j.Types.DESCRIPTION},void 0,V.default.Messages.GUILD_REGION_DEPRECATED_BLURB.format({helpURL:H.default.getArticleURL(x.HelpdeskArticles.CHANNEL_RTC_REGION)})):X(A.default,{disabled:!s||d,region:i,onClick:this.handleRegionSelectorClick,error:null!=u.region}),X(M.default,{className:(0,o.default)(W.default.baseSection,Y.default.marginBottom40)},void 0,X(M.default,{basis:"50%",justify:M.default.Justify.BETWEEN},void 0,X(M.default.Child,{wrap:!0},void 0,X(f.default,{showIcon:!0,name:r.name,icon:r.icon,onChange:this.handleIconChange,disabled:!s,makeURL:function(e){return null!=e&&F.default.getGuildIconURL({id:r.id,icon:e,canAnimate:!0})},className:(0,o.default)((e={},e[W.default.avatarUploader]=s,e[W.default.avatarUploaderDisabled]=!s,e)),avatarClassName:W.default.avatarUploaderInner}),null!=u.icon?X("div",{className:W.default.iconError},void 0,u.icon):null),X(M.default,{direction:M.default.Direction.VERTICAL,align:M.default.Align.START,style:{maxWidth:180}},void 0,X(j.default,{type:j.Types.DESCRIPTION,className:Y.default.marginBottom8},void 0,V.default.Messages.GUILD_SETTINGS_ICON_RECOMMEND),X(b.default,{look:b.ButtonLooks.OUTLINED,color:b.ButtonColors.PRIMARY,disabled:!s,className:Y.default.marginTop8,onClick:this.handleUploadImage},void 0,V.default.Messages.UPLOAD_IMAGE,a.createElement(c.default,{ref:this._imageInputRef,onChange:this.handleIconChange,disabled:!s,showEditingModal:!0})))),X(M.default.Child,{basis:"50%"},void 0,X(D.default,{title:V.default.Messages.FORM_LABEL_SERVER_NAME,className:Y.default.marginBottom20},void 0,X(L.default,{type:"text",disabled:!s,value:r.name,maxLength:100,onChange:this.handleNameChange,error:u.name})),X(D.default,{title:V.default.Messages.FORM_LABEL_SERVER_REGION},void 0,t))))},l.renderAFKSection=function(){var e=this.props,t=e.guild,n=e.canManageGuild,r=e.channels;if(null==t)return null;var a=null!=t.afkTimeout?""+t.afkTimeout:null,o=t.afkChannelId||"NO_AFK_CHANNEL",l=[{value:"60",label:V.default.Messages.DURATION_MINUTES.format({minutes:1})},{value:"300",label:V.default.Messages.DURATION_MINUTES.format({minutes:5})},{value:"900",label:V.default.Messages.DURATION_MINUTES.format({minutes:15})},{value:"1800",label:V.default.Messages.DURATION_MINUTES.format({minutes:30})},{value:"3600",label:V.default.Messages.DURATION_HOURS.format({hours:1})}],u=(0,i.default)(r).filter((function(e){return e.guild_id===t.id})).filter((function(e){return e.type===x.ChannelTypes.GUILD_VOICE})).map((function(e){return Q(e)})).value();return u.unshift({value:"NO_AFK_CHANNEL",label:V.default.Messages.NO_AFK_CHANNEL}),X(w.default,{className:W.default.divider},void 0,X(M.default,{},void 0,X(M.default.Child,{},void 0,X(D.default,{title:V.default.Messages.FORM_LABEL_AFK_CHANNEL},void 0,X(P.default,{value:o,clearable:!1,searchable:!1,options:u,disabled:!n,optionRenderer:J,valueRenderer:J,onChange:this.handleAFKChannelChange}))),X(M.default.Child,{},void 0,X(D.default,{title:V.default.Messages.FORM_LABEL_AFK_TIMEOUT},void 0,X(P.default,{value:a,clearable:!1,searchable:!1,options:l,disabled:"NO_AFK_CHANNEL"===o||!n,onChange:this.handleAFKTimeoutChange})))),X(j.default,{className:Y.default.marginTop8,type:j.Types.DESCRIPTION},void 0,V.default.Messages.FORM_HELP_AFK_CHANNEL))},l.renderJoinNotificationSection=function(){var e=this.props,t=e.guild,n=e.canManageGuild;if(null==t)return null;var r=h.default.getMutableGuildChannels(),a=t.systemChannelId||"NO_SYSTEM_CHANNEL",l=(0,i.default)(r).filter((function(e){return e.getGuildId()===t.id})).filter((function(e){return e.type===x.ChannelTypes.GUILD_TEXT})).map((function(e){return Q(e)})).value();return l.unshift({value:"NO_SYSTEM_CHANNEL",label:V.default.Messages.NO_SYSTEM_CHANNEL}),X(w.default,{className:W.default.divider},void 0,X(k.default,{},void 0,V.default.Messages.FORM_LABEL_SYSTEM_CHANNEL),X(P.default,{value:a,clearable:!1,searchable:!1,options:l,disabled:!n,optionRenderer:J,valueRenderer:J,onChange:this.handleSystemChannelChange}),X(j.default,{className:Y.default.marginTop8,type:j.Types.DESCRIPTION},void 0,V.default.Messages.FORM_HELP_SYSTEM_CHANNEL),X(R.default,{className:Y.default.marginTop20,onChange:this.handleShowJoinsChange,value:!(0,B.hasFlag)(t.systemChannelFlags,x.SystemChannelFlags.SUPPRESS_JOIN_NOTIFICATIONS),hideBorder:!0,disabled:!n||"NO_SYSTEM_CHANNEL"===a},void 0,V.default.Messages.FORM_HELP_SYSTEM_CHANNEL_JOIN_MESSAGES),X(R.default,{className:(0,o.default)(Y.default.marginReset,Y.default.marginTop20),onChange:this.handleShowSubscriptionsChange,value:!(0,B.hasFlag)(t.systemChannelFlags,x.SystemChannelFlags.SUPPRESS_PREMIUM_SUBSCRIPTIONS),hideBorder:!0,disabled:!n||"NO_SYSTEM_CHANNEL"===a},void 0,V.default.Messages.FORM_HELP_SYSTEM_CHANNEL_PREMIUM_SUBSCRIPTION_MESSAGES),X(R.default,{className:(0,o.default)(Y.default.marginReset,Y.default.marginTop20),onChange:this.handleShowGuildRemindersChange,value:!(0,B.hasFlag)(t.systemChannelFlags,x.SystemChannelFlags.SUPPRESS_GUILD_REMINDER_NOTIFICATIONS),hideBorder:!0,disabled:!n||"NO_SYSTEM_CHANNEL"===a},void 0,V.default.Messages.FORM_HELP_SYSTEM_CHANNEL_GUILD_REMINDERS))},l.renderNotificationSection=function(){var e=this.props,t=e.guild,n=e.canManageGuild,r=e.guildMemberCount;if(null==t)return null;var a=[{name:V.default.Messages.FORM_LABEL_ALL_MESSAGES,value:x.UserNotificationSettings.ALL_MESSAGES,desc:null!=r&&r>=x.MAX_MEMBERS_NOTIFY_ALL_MESSAGES?V.default.Messages.GUILD_SETTINGS_DEFAULT_NOTIFICATIONS_LARGE_GUILD_NOTIFY_ALL:null},{name:V.default.Messages.FORM_LABEL_ONLY_MENTIONS.format(),value:x.UserNotificationSettings.ONLY_MENTIONS}];return X(w.default,{className:W.default.divider},void 0,X(k.default,{},void 0,V.default.Messages.FORM_LABEL_DEFAULT_NOTIFICATION_SETTINGS),X(j.default,{type:j.Types.DESCRIPTION,className:Y.default.marginBottom20},void 0,V.default.Messages.GUILD_SETTINGS_DEFAULT_NOTIFICATION_SETTINGS_INTRO),X(j.default,{type:j.Types.DESCRIPTION,className:Y.default.marginBottom20},void 0,V.default.Messages.GUILD_SETTINGS_DEFAULT_NOTIFICATION_SETTINGS_PROTIP.format({videoURL:"https://www.youtube.com/watch?v=zGl796352RI"})),X(N.default,{options:a,value:t.defaultMessageNotifications,disabled:!n,onChange:this.handleDefaultMessageNotificationsChange}))},l.renderServerInviteBGSection=function(){var e,t=this.props,n=t.guild,r=t.canManageGuild;return null==n?null:X(w.default,{title:V.default.Messages.GUILD_SETTINGS_SERVER_INVITE_BACKGROUND,className:W.default.divider},void 0,X(M.default,{},void 0,X(M.default,{basis:"50%",direction:M.default.Direction.VERTICAL,align:M.default.Align.START},void 0,X(j.default,{type:j.Types.DESCRIPTION,className:Y.default.marginBottom8},void 0,V.default.Messages.GUILD_SETTINGS_SPLASH_RECOMMEND.format({articleURL:H.default.getArticleURL(x.HelpdeskArticles.GUILD_BANNER_SPLASH)})),X(b.default,{disabled:!r,look:b.ButtonLooks.OUTLINED,color:b.ButtonColors.PRIMARY,className:Y.default.marginTop8},void 0,V.default.Messages.UPLOAD_BACKGROUND,X(c.default,{disabled:!r,onChange:this.handleSplashChange}))),X(M.default.Child,{wrap:!0,basis:"50%"},void 0,X(d.default,{avatar:n.splash,makeURL:function(e){return e&&F.default.getGuildSplashURL({id:n.id,splash:e})},disabled:!r,onChange:this.handleSplashChange,hint:V.default.Messages.CHANGE_SPLASH,className:(0,o.default)((e={},e[W.default.avatarUploader]=r,e[W.default.avatarUploaderDisabled]=!r,e)),avatarClassName:W.default.avatarUploaderInnerSquare,showEditingModal:!1,hideSize:!0}))))},l.renderBanner=function(){var e,t=this.props,n=t.guild,r=t.canManageGuild;return null==n?null:X(w.default,{title:V.default.Messages.FORM_LABEL_SERVER_BANNER,className:W.default.divider},void 0,X(M.default,{},void 0,X(M.default,{basis:"50%",direction:M.default.Direction.VERTICAL,align:M.default.Align.START},void 0,X(j.default,{type:j.Types.DESCRIPTION,className:Y.default.marginBottom8},void 0,V.default.Messages.FORM_HELP_SERVER_BANNER),X(j.default,{type:j.Types.DESCRIPTION,className:Y.default.marginBottom8},void 0,V.default.Messages.GUILD_SETTINGS_BANNER_RECOMMEND.format({articleURL:H.default.getArticleURL(x.HelpdeskArticles.GUILD_BANNER_SPLASH)})),X(b.default,{disabled:!r,look:b.default.Looks.OUTLINED,color:b.default.Colors.PRIMARY,className:Y.default.marginTop8},void 0,V.default.Messages.UPLOAD_BACKGROUND,X(c.default,{disabled:!r,onChange:this.handleBannerChange}))),X(M.default.Child,{wrap:!0,basis:"50%"},void 0,X(d.default,{avatar:n.banner,makeURL:function(e){return e&&F.default.getGuildBannerURL({id:n.id,banner:e})},disabled:!r,onChange:this.handleBannerChange,hint:V.default.Messages.CHANGE_BANNER,className:(0,o.default)((e={},e[W.default.avatarUploader]=r,e[W.default.avatarUploaderDisabled]=!r,e)),avatarClassName:W.default.avatarUploaderInnerSquare,showEditingModal:!1,hideSize:!0}))))},l.render=function(){var e=this.props.guild;if(null==e)return null;var t=e.hasFeature(x.GuildFeatures.INVITE_SPLASH),n=e.hasFeature(x.GuildFeatures.BANNER);return X(w.default,{title:V.default.Messages.SERVER_OVERVIEW,tag:k.Tags.H1},void 0,this.renderBaseSettings(),this.renderAFKSection(),this.renderJoinNotificationSection(),this.renderNotificationSection(),t?this.renderServerInviteBGSection():null,n?this.renderBanner():null)},r}(a.PureComponent);te.displayName="GuildSettingsOverview";var ne=l.default.connectStores([h.default,g.default,S.default,O.default,C.default,E.default],(function(){var e=g.default.getProps(),t=e.guild,n=e.errors,r=e.submitting,a=null!=t?O.default.getRegions(t.id):null,o={id:"unknown",name:V.default.Messages.UNKNOWN_REGION,vip:!1,sample_hostname:"",sample_port:1,optimal:!1,deprecated:!1};null!=a&&null!=t&&(o=a.find((function(e){return e.id===t.region}))||o);var i=S.default.can(x.Permissions.MANAGE_GUILD,t),l=S.default.can(x.Permissions.ADMINISTRATOR,t),u=null!=t?E.default.getMemberCount(t.id):0;return{channels:h.default.getMutableGuildChannels(),guildChannelsVersion:null!=t?h.default.getGuildChannelsVersion(t.id):-1,canManageGuild:i,isGuildAdmin:l,regions:a,region:o,guild:t,errors:n,submitting:r,currentUser:C.default.getCurrentUser(),guildMemberCount:u}}))(te);t.default=ne},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(8338)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.name,n=e.icon,r=e.makeURL,i=e.onChange,l=e.disabled,s=e.showIcon,d=e.className,f=e.avatarClassName;return u(a.default,{name:t,avatar:n,makeURL:r,onChange:i,disabled:l,hint:o.default.Messages.CHANGE_ICON,showIcon:s,className:d,avatarClassName:f})}s.displayName="GuildIconUploader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=p(n(0)),o=f(n(9)),i=p(n(29)),l=f(n(61)),u=f(n(55)),s=f(n(6)),d=f(n(7741));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t,r,a=e.region;if("unknown"===a.id)r=n(8454);else{var i=a.id.replace(/^vip-/,"");try{r=n(8951)("./"+i+".png")}catch(e){r=n(8454)}}var l={backgroundImage:'url("'+r+'")'};return y("div",{className:(0,o.default)(d.default.flag,(t={},t[d.default.vip]=a.vip,t)),style:l})};m.displayName="RegionFlag";var _=function(e){var t=e.region.name.replace(/ \(VIP\)$/,"");return y("div",{className:d.default.name},void 0,t)};_.displayName="RegionName";var h=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleClick=function(){var e=n.props,t=e.onClick;e.disabled||t()},n.handleMouseLeave=function(){n.setState({hover:!1})},n.handleMouseEnter=function(){n.setState({hover:!0})},n.state={hover:!1},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){var e,t=this.props,n=t.region,r=t.error,a=t.disabled,f=this.state.hover,c=i.ButtonColors.GREY;return a||(f?c=i.ButtonColors.BRAND:!0===r&&(c=i.ButtonColors.RED)),y(l.default,{className:(0,o.default)(d.default.container,(e={},e[d.default.hover]=f,e[d.default.disabled]=a,e[d.default.error]=r,e)),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,tabIndex:-1,onMouseLeave:this.handleMouseLeave},void 0,y(u.default,{className:d.default.layout},void 0,y(u.default,{className:d.default.input,align:u.default.Align.CENTER},void 0,y(u.default.Child,{grow:0,shrink:0},void 0,y(m,{region:n})),y(u.default.Child,{},void 0,y(_,{region:n}))),y(u.default,{shrink:1,grow:0,style:{margin:0}},void 0,y(i.default,{className:d.default.button,onClick:function(){},size:i.ButtonSizes.MIN,color:c,disabled:a},void 0,s.default.Messages.CHANGE))))},r}(a.PureComponent);h.displayName="RegionSelector",h.defaultProps={disabled:!1};var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=j(n(0)),o=n(3),i=D(n(2)),l=j(n(8578)),u=n(8461),s=D(n(9880)),d=D(n(9881)),f=D(n(9891)),c=D(n(8255)),p=D(n(12)),v=D(n(29)),y=j(n(8353)),m=D(n(151)),_=D(n(149)),h=D(n(9892)),E=D(n(1368)),g=D(n(8920)),S=n(41),O=D(n(47)),I=D(n(24)),T=D(n(93)),C=n(8986),b=n(1),M=D(n(6)),N=D(n(7746)),A=D(n(9893)),P=D(n(9894)),R=D(n(9895)),L=D(n(9896));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function U(){return(U=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}).apply(this,arguments)}var G;!function(e){e[e.PENDING=0]="PENDING",e[e.COOLDOWN=1]="COOLDOWN",e[e.APPLICATION=2]="APPLICATION",e[e.LOADING=3]="LOADING"}(G||(G={}));var F=function(){var e=(0,o.useStateFromStores)([c.default],(function(){return c.default.getProps()})),t=e.guild,n=e.guildMetadata,r=(0,o.useStateFromStores)([p.default],(function(){return p.default.getCurrentUser()})),D=(0,o.useStateFromStoresArray)([f.default],(function(){return[null!=t?f.default.getPartnerChecklist(t.id):null,f.default.isLoading()]}),[t]),w=D[0],j=D[1],F=a.useState(!1),B=F[0],H=F[1];a.useEffect((function(){null!=t&&(i.default.wait((function(){return(0,u.fetchPartnerRequirements)(t.id)})),i.default.wait((function(){return l.fetchMetadataForGuild(t.id)})))}),[t]);var x=(w||{}).sufficient,V=null==t?void 0:t.isOwner(r),W=r.verified,Y=null!=n&&null!=n.partnerApplicationTimestamp?new Date(n.partnerApplicationTimestamp):null,z=null!=n&&null!=n.partnerActionedTimestamp?new Date(n.partnerActionedTimestamp):null,K=new Date,$=null!=z?60-Math.floor((K.valueOf()-z.valueOf())/864e5):0,Z=null!=Y&&null==z,q=null!=z&&$>0,X=null!=z&&z>K,J=null,Q=G.LOADING;q?(Q=G.COOLDOWN,J=M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_APPLY_BUTTON_TOOLTIP_REJECTED):Z||B?(Q=G.PENDING,J=M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_APPLY_BUTTON_TOOLTIP_PENDING):j||(Q=G.APPLICATION,x?V||(J=M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_APPLY_BUTTON_TOOLTIP_ONLY_OWNER):J=M.default.Messages.GUILD_SETTINGS_DISCOVERY_REQUIREMENTS_NOT_MET),J=M.default.Messages.GUILD_PARTNER_APPLICATION_BUTTON_PAUSE;var ee=function(){(0,S.openModal)((function(e){return a.createElement(d.default,U({},e,{onSuccess:function(){return H(!0)}}))}),{onCloseRequest:b.NOOP_NULL})};if(null==t)return null;var te=function(){return k(_.default,{text:J},void 0,(function(e){return a.createElement(v.default,U({},e,{onClick:ee,disabled:null!=J,className:N.default.button}),M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_APPLY_BUTTON)}))},ne=k(s.default,{checklist:w,guild:t});return k("div",{className:N.default.container},void 0,k("img",{src:A.default,className:N.default.banner,alt:""}),k(O.default,{size:O.default.Sizes.SIZE_24},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_HEADER),k(I.default,{color:I.default.Colors.HEADER_SECONDARY,size:I.default.Sizes.SIZE_16,className:N.default.body},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_BODY.format({helpdeskArticle:b.MarketingURLs.PARTNERS})),k("div",{className:N.default.featureCards},void 0,[{icon:h.default,color:b.Colors.BRAND,header:M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_UPSELL_BRANDING_HEADER,body:M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_UPSELL_BRANDING_BODY},{icon:g.default,color:b.Colors.BRAND,header:M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_UPSELL_PERKS_HEADER,body:M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_UPSELL_PERKS_BODY},{icon:E.default,color:b.Colors.BRAND,header:M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_UPSELL_RECOGNITION_HEADER,body:M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_UPSELL_RECOGNITION_BODY}].map((function(e,t){return a.createElement(C.FeatureCard,U({key:t},e))}))),function(){switch(Q){case G.APPLICATION:return a.createElement(a.Fragment,null,k(y.default,{className:N.default.applicationPauseWarning,messageType:y.HelpMessageTypes.WARNING},void 0,M.default.Messages.GUILD_PARTNER_APPLICATION_PAUSE),te(),k(I.default,{color:I.default.Colors.HEADER_SECONDARY,className:N.default.paragraph},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_APPLY_DETAILS.format({helpdeskArticle:T.default.getArticleURL(b.HelpdeskArticles.PARTNER_CODE_OF_CONDUCT)})),k("hr",{className:N.default.separator}),W?k("div",{className:N.default.checklistContainer},void 0,k("div",{className:N.default.checklistHeader},void 0,k("img",{src:x?L.default:P.default,className:N.default.requirementsImage,alt:""}),k("div",{},void 0,x?a.createElement(a.Fragment,null,k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_PASSING_HEADER),k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_PASSING_SUBHEADER)):a.createElement(a.Fragment,null,k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_FAILING_HEADER),k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_FAILING_SUBHEADER.format({warningHook:function(e,t){return k("strong",{className:N.default.warning},t,e)}}))))),ne):k("div",{className:N.default.pendingBar},void 0,k("img",{src:P.default,className:N.default.requirementsImage,alt:""}),k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_NOT_VERIFIED)));case G.PENDING:return a.createElement(a.Fragment,null,te(),k("hr",{className:N.default.separator}),k("div",{className:N.default.pendingBar},void 0,k("img",{src:R.default,className:N.default.requirementsImage,alt:""}),k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_PENDING.format({pendingHook:function(e,t){return k("strong",{className:N.default.info},t,e)}}))));case G.COOLDOWN:return a.createElement(a.Fragment,null,te(),X?null:a.createElement(a.Fragment,null,k(I.default,{color:I.default.Colors.HEADER_SECONDARY,className:N.default.cooldown},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_COOLDOWN),k(I.default,{color:I.default.Colors.HEADER_SECONDARY},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_COOLDOWN_COUNTER.format({numDays:$}))),k("hr",{className:N.default.separator}),k("div",{className:N.default.pendingBar},void 0,k("img",{src:P.default,className:N.default.requirementsImage,alt:""}),k(O.default,{size:O.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_PARTNER_INTRO_REJECTED.format({warningHook:function(e,t){return k("strong",{className:N.default.warning},t,e)}}))));default:return a.createElement(a.Fragment,null,k(O.default,{className:N.default.loadingText,tag:O.default.Tags.H2,size:I.default.Sizes.SIZE_16},void 0,M.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_LOADING),k(m.default,{className:N.default.spinner}))}}())};F.displayName="GuildSettingsPartner";var B=F;t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(5)),i=_(n(98)),l=_(n(14)),u=_(n(8254)),s=n(8682),d=_(n(29)),f=_(n(24)),c=_(n(93)),p=_(n(97)),v=n(1),y=_(n(6)),m=_(n(7743));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t=e.checklist,n=e.guild,r=t||{},_=r.healthScorePending,h=r.nsfwProperties,g=void 0===h?{}:h,S=r.safeEnvironment,O=r.healthy,I=r.size,T=r.protected,C=r.retentionHealthy,b=r.engagementHealthy,M=r.age,N=r.minimumGuildAge,A=void 0===N?0:N,P=r.minimumGuildSize,R=void 0===P?0:P,L=[{name:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE,failingName:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE_FAILING,description:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE_DESCRIPTION,failingDescription:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_SAFE_DESCRIPTION_FAILING_GUIDELINES.format({termsURL:v.MarketingURLs.TERMS,guidelinesURL:c.default.getArticleURL(v.HelpdeskArticles.PUBLIC_GUILD_GUILDLINES)}),checked:S},{name:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_SIZE.format({minMembers:R}),failingName:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_SIZE_FAILING,description:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_SIZE_DESCRIPTION.format({minMembers:R.toLocaleString()}),failingDescription:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_SIZE_DESCRIPTION_FAILING.format({minMembers:R.toLocaleString()}),checked:I},{name:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_AGE,failingName:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_AGE_FAILING,description:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_AGE_DESCRIPTION.format({minimumGuildAge:Math.ceil(A/7)}),failingDescription:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_AGE_DESCRIPTION_FAILING.format({minimumGuildAge:Math.ceil(A/7),passDate:(0,o.default)(p.default.extractTimestamp(n.id)).add(A,"days").format("LL")}),checked:M},{name:_?y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_PENDING:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY,failingName:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_HEALTHY_FAILING,description:y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_HEALTHY_DESCRIPTION,failingDescription:a.createElement(a.Fragment,null,E(f.default,{color:f.default.Colors.MUTED,className:m.default.healthFailingDescription},void 0,y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_HEALTHY_DESCRIPTION_FAILING),b?null:E(f.default,{color:f.default.Colors.ERROR},void 0,y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_ENGAGEMENT_FAILING),C?null:E(f.default,{color:f.default.Colors.ERROR},void 0,y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_RETENTION_FAILING),b&&C?null:E(d.default,{className:m.default.detailsButton,look:d.default.Looks.LINK,size:d.default.Sizes.NONE,color:d.default.Colors.LINK,onClick:function(){var e=null==(null==n?void 0:n.id)?v.RelativeMarketingURLs.DEVELOPER_PORTAL:v.RelativeMarketingURLs.DEVELOPER_PORTAL_GUILD_ANALYTICS(n.id),t=i.default.v4();l.default.post({url:v.Endpoints.HANDOFF,body:{key:t},oldFormErrors:!0}).then((function(n){var r=n.body.handoff_token;window.open(v.MarketingURLs.DEVELOPER_PORTAL_LOGIN_HANDOFF(t,r,e))}),(function(){window.open(e)}))}},void 0,y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_HEALTH_VIEW_DETAILS)),pendingDescription:I?y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_HEALTHY_DESCRIPTION_PENDING.format({checkBackHook:function(e,t){return E("strong",{className:m.default.healthPending},t,e)}}):y.default.Messages.GUILD_SETTINGS_PARTNER_CHECKLIST_HEALTHY_DESCRIPTION_PENDING_SIZE.format({minMembers:500}),checked:O,pending:_},{name:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_NSFW,failingName:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_NSFW_FAILING,description:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_NSFW_DESCRIPTION,failingDescription:a.createElement(a.Fragment,null,(null==g?void 0:g.channels)?E(f.default,{color:f.default.Colors.MUTED},void 0,y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_CHANGE_CHANNEL_NAMES_2.format({channelHook:function(e,t){return E("span",{className:m.default.doesNot},t,e)}})):null,null!=(null==g?void 0:g.name)?E(f.default,{color:f.default.Colors.MUTED},void 0,y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_CHANGE_NAME.format({nameHook:function(e,t){return E("span",{className:m.default.doesNot},t,e)}})):null,null!=(null==g?void 0:g.description)?E(f.default,{color:f.default.Colors.MUTED},void 0,y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_CHANGE_DESCRIPTION.format({descriptionHook:function(e,t){return E("span",{className:m.default.doesNot},t,e)}})):null),checked:0===Object.keys(g).length},{name:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA,failingName:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA_FAILING,description:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA_DESCRIPTION,failingDescription:y.default.Messages.GUILD_SETTINGS_DISCOVERY_CHECKLIST_2FA_DESCRIPTION_FAILING.format({onClick:function(){return u.default.setSection(v.GuildSettingsSections.MODERATION)}}),checked:T}];return a.createElement(a.Fragment,null,L.map((function(e,t){return E(a.Fragment,{},e.name,a.createElement(s.ChecklistItem,e),t<L.length-1?E("hr",{className:m.default.separator}):null)})))};t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=n(3),i=n(1213),l=n(8578),u=T(n(9882)),s=T(n(8987)),d=T(n(8255)),f=T(n(39)),c=T(n(12)),p=n(85),v=n(8461),y=n(8534),m=b(n(8462)),_=T(n(9883)),h=T(n(9885)),E=T(n(9887)),g=n(1),S=T(n(6)),O=T(n(7354)),I=T(n(9890));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(){return(A=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}).apply(this,arguments)}var P=function(e){var t=e.transitionState,n=e.onClose,r=e.onSuccess,T=(0,o.useStateFromStores)([d.default],(function(){return d.default.getProps()})).guild,C=(0,o.useStateFromStores)([m.default],(function(){return null!=T?m.default.getApplication(T.id):null})),b=(0,o.useStateFromStores)([m.default],(function(){return m.default.isSubmitting()})),P=(0,o.useStateFromStores)([f.default],(function(){return f.default.locale})),R=(0,o.useStateFromStores)([c.default],(function(){return c.default.getCurrentUser()}));(0,u.default)(T,R,!0),a.useEffect((function(){if((0,l.maybeFetchGuildDiscoveryCategories)(),null!=T&&null==C){var e=A({},m.EMPTY_APPLICATION,{guildId:T.id,language:P});(0,l.fetchMetadataForGuild)(T.id).then((function(t){(0,v.updatePartnerApplication)(T.id,A({},e,{primaryCategoryId:null==t?void 0:t.primaryCategoryId,secondaryCategoryIds:null==t?void 0:t.secondaryCategoryIds}))}))}}),[null==T?void 0:T.id]);var L=(0,p.useUID)();if(null==T)return null;var D=N("img",{alt:"",src:I.default,className:O.default.footerImage,width:240}),w=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,v.submitPartnerApplication)(T.id,C);case 2:e.sent&&(r(),n());case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){M(o,r,a,i,l,"next",e)}function l(e){M(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),j=[{modalContent:N(_.default,{headerId:L,guild:T}),disableNextStep:null==C||""===C.inviteUrl.trim()||""===C.description.trim()||""===C.whyYou.trim()||null==C.language||null==C.serverType||null==C.primaryCategoryId||C.primaryCategoryId===i.DEFAULT_DISCOVERY_CATEGORY_ID,overviewTitle:S.default.Messages.GUILD_PARTNER_APPLICATION_SERVER_STEP},{modalContent:N(E.default,{headerId:L,guild:T}),disableNextStep:null==C||""===C.firstName.trim()||""===C.lastName.trim()||null==C.country||C.connectedAccounts===[]||null===C.survey||C.serverType===y.PartnerTypes.CONTENT_CREATOR&&(null==C||null===C.platform||null==(C.platform===y.PrimaryPlatformTypes.TWITTER&&C.connectedAccounts.find((function(e){return e.type===g.PlatformTypes.TWITTER})))||null==(C.platform===y.PrimaryPlatformTypes.TWITCH&&C.connectedAccounts.find((function(e){return e.type===g.PlatformTypes.TWITCH})))||null==(C.platform===y.PrimaryPlatformTypes.YOUTUBE&&C.connectedAccounts.find((function(e){return e.type===g.PlatformTypes.YOUTUBE})))||null==(C.platform===y.PrimaryPlatformTypes.REDDIT&&C.connectedAccounts.find((function(e){return e.type===g.PlatformTypes.REDDIT})))||null==(C.platform===y.PrimaryPlatformTypes.FACEBOOK&&C.connectedAccounts.find((function(e){return e.type===g.PlatformTypes.FACEBOOK})))||C.platform===y.PrimaryPlatformTypes.OTHER&&""===C.otherPlatform),overviewTitle:S.default.Messages.GUILD_PARTNER_APPLICATION_USER_STEP},{modalContent:N(h.default,{headerId:L,guild:T}),disableNextStep:!1,overviewTitle:S.default.Messages.GUILD_PARTNER_APPLICATION_SUBMIT_STEP}];return N(s.default,{autoCloseOnComplete:!1,submitting:b,stepData:j,title:S.default.Messages.GUILD_PARTNER_APPLICATION_TITLE,transitionState:t,onClose:n,completeButtonText:S.default.Messages.GUILD_PARTNER_APPLICATION_SUBMIT_STEP,onComplete:w,overviewFooter:D,sequencerClassName:O.default.container})};P.displayName="PartnerApplicationModal";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){void 0===n&&(n=!1);var s=null==e?void 0:e.id,d=null==e?void 0:e.isOwner(t),f=(0,a.useStateFromStores)([l.default],(function(){var e;return null!=s?null===(e=l.default.getDefaultChannel(s))||void 0===e?void 0:e.id:null}),[s]);r.useEffect((function(){n&&d&&null!=f&&o.default.wait((function(){return i.default.createInvite(f,{max_age:u.default.INVITE_OPTIONS_FOREVER.value},"Partner Application Modal")}))}),[n,d,f])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=s(n(2)),i=s(n(1211)),l=s(n(86)),u=s(n(8286));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=M(n(0)),o=n(3),i=n(1213),l=C(n(8483)),u=C(n(61)),s=C(n(55)),d=C(n(1159)),f=C(n(8272)),c=C(n(153)),p=M(n(474)),v=C(n(159)),y=C(n(255)),m=C(n(47)),_=C(n(24)),h=n(8461),E=n(8534),g=C(n(8462)),S=n(8686),O=C(n(6)),I=C(n(7354)),T=C(n(9884));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A=O.default.getAvailableLocales().map((function(e){return{value:e.value,label:e.name}})),P=N("img",{alt:"",src:T.default}),R=function(e){var t,n=e.headerId,r=e.guild,T=(0,o.useStateFromStores)([g.default],(function(){return g.default.getApplication(r.id)})),C=(0,o.useStateFromStoresObject)([l.default],(function(){return{primaryCategories:l.default.getPrimaryCategories(),allCategories:l.default.getAllCategories()}})),b=C.primaryCategories,M=C.allCategories,R=null!==(t=a.useRef(null==T?void 0:T.inviteUrl).current)&&void 0!==t?t:"",L=b.map((function(e){return{value:e.categoryId,label:e.name}})),D=M.map((function(e){return{value:e.categoryId,label:e.name}})),w=null!=T?T:{},j=w.primaryCategoryId,k=w.secondaryCategoryIds,U=w.language,G=w.description,F=w.website,B=w.serverType,H=w.whyYou,x=w.inviteUrl;a.useEffect((function(){(0,S.trackApplicationFunnel)(E.ApplicationTypes.PARTNER,E.PartnerApplicationSteps.SERVER)}),[]);return null==r?null:N("div",{className:I.default.container},void 0,N("div",{className:I.default.headerContent},void 0,P,N(m.default,{size:m.default.Sizes.SIZE_24,className:I.default.header,id:n},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_SERVER_STEP_TITLE),N(_.default,{color:_.default.Colors.CUSTOM,size:_.default.Sizes.SIZE_16,className:I.default.headerCaption},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_SERVER_STEP_DESCRIPTION)),N("div",{className:I.default.formItem},void 0,N(v.default,{},void 0,O.default.Messages.FORM_LABEL_SERVER_NAME),N(c.default,{value:r.name,disabled:!0})),N("div",{className:I.default.formItem},void 0,N(v.default,{},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_INVITE_LINK_TITLE),N(p.default,{type:p.Types.DESCRIPTION,className:I.default.description},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_INVITE_LINK_DESCRIPTION),N(c.default,{value:null==x?void 0:x.toString(),onChange:function(e){(0,h.updatePartnerApplication)(r.id,{inviteUrl:e})},disabled:""!==R})),N("div",{className:I.default.formItem},void 0,N(v.default,{},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_TYPE),N(s.default,{justify:s.default.Justify.AROUND,direction:s.default.Direction.VERTICAL,className:I.default.checkboxWrap},void 0,N(d.default,{value:B,options:[{label:O.default.Messages.GUILD_PARTNER_APPLICATION_TYPE_CONTENT,value:E.PartnerTypes.CONTENT_CREATOR},{label:O.default.Messages.GUILD_PARTNER_APPLICATION_TYPE_FAN,value:E.PartnerTypes.COMMUNITY},{label:O.default.Messages.GUILD_PARTNER_APPLICATION_TYPE_BRAND,value:E.PartnerTypes.BRAND},{label:O.default.Messages.GUILD_PARTNER_APPLICATION_TYPE_SOFTWARE,value:E.PartnerTypes.SOFTWARE},{label:O.default.Messages.GUILD_PARTNER_APPLICATION_TYPE_OTHER,value:E.PartnerTypes.OTHER}],onChange:function(e){(0,h.updatePartnerApplication)(r.id,{serverType:e.value})}}))),N("div",{className:I.default.formItem},void 0,N(v.default,{className:I.default.formTitle},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_WEBSITE),N(c.default,{maxLength:250,value:F||"",onChange:function(e){(0,h.updatePartnerApplication)(r.id,{website:e})}})),N("div",{className:I.default.formItem},void 0,N(v.default,{className:I.default.formTitle},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_CATEGORY_LABEL),N(p.default,{type:p.Types.DESCRIPTION,className:I.default.description},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_CATEGORY_DESCRIPTION)),N(d.default,{value:j===i.DEFAULT_DISCOVERY_CATEGORY_ID?null:j,clearable:!0,searchable:!0,maxMenuHeight:150,options:L,onChange:function(e){(0,h.updatePartnerApplication)(r.id,{primaryCategoryId:(null==e?void 0:e.value)||i.DEFAULT_DISCOVERY_CATEGORY_ID})}}),N("div",{className:I.default.formItem},void 0,N(p.default,{type:p.Types.DESCRIPTION,className:I.default.description},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_SUBCATEGORY_DESCRIPTION),N(d.default,{value:k,searchable:!0,clearable:!1,options:D,onChange:function(e){var t=e.map((function(e){return e.value}));(0,h.updatePartnerApplication)(r.id,{secondaryCategoryIds:t})},multiValueRenderer:function(e){var t=e.label,n=e.value;return N("span",{className:I.default.tag},void 0,t,N(u.default,{className:I.default.closeWrapper,onClick:function(){return function(e){var t=null!=k?[].concat(k):[],n=t.indexOf(e);-1!==n&&(t.splice(n,1),(0,h.updatePartnerApplication)(r.id,{secondaryCategoryIds:t}))}(n)}},void 0,N(y.default,{className:I.default.close})))},maxMenuHeight:150,isMulti:!0})),N("div",{className:I.default.formItem},void 0,N(v.default,{},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_LANGUAGE),N(d.default,{options:A,value:U,onChange:function(e){(0,h.updatePartnerApplication)(r.id,{language:null==e?void 0:e.value})},maxMenuHeight:150,searchable:!0})),N("div",{className:I.default.formItem},void 0,N(v.default,{},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_DESCRIPTION_TITLE),N(p.default,{type:p.Types.DESCRIPTION,className:I.default.description},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_DESCRIPTION_DESCRIPTION),N(f.default,{value:G,maxLength:250,onChange:function(e){(0,h.updatePartnerApplication)(r.id,{description:e})}})),N("div",{className:I.default.formItem},void 0,N(v.default,{},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_WHY_YOU_TITLE),N(p.default,{type:p.Types.DESCRIPTION,className:I.default.description},void 0,O.default.Messages.GUILD_PARTNER_APPLICATION_WHY_YOU_DESCRIPTION),N(f.default,{value:H,maxLength:250,onChange:function(e){(0,h.updatePartnerApplication)(r.id,{whyYou:e})}})))};R.displayName="PartnerApplicationServerInfoStep";var L=R;t.default=L},function(e,t,n){e.exports=n.p+"ce47e05754afa547e93d8dde62b02356.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=p(n(47)),l=p(n(24)),u=n(8534),s=p(n(8462)),d=n(8686),f=p(n(6)),c=p(n(7354));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y("img",{alt:"",src:p(n(9886)).default}),_=function(e){var t=e.headerId,n=e.guild,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getApplication(n.id)}));a.useEffect((function(){(0,d.trackApplicationFunnel)(u.ApplicationTypes.PARTNER,u.PartnerApplicationSteps.SUBMIT)}),[]);var p=(null!=r?r:{}).errors;return y("div",{className:c.default.container},void 0,y("div",{className:c.default.centeredContent},void 0,y("div",{className:c.default.headerContent},void 0,m,y(i.default,{size:i.default.Sizes.SIZE_24,className:c.default.header,id:t},void 0,f.default.Messages.GUILD_PARTNER_APPLICATION_SUBMIT_STEP_TITLE),y(l.default,{color:l.default.Colors.CUSTOM,size:l.default.Sizes.SIZE_16,className:c.default.headerCaption},void 0,f.default.Messages.GUILD_PARTNER_APPLICATION_SUBMIT_STEP_DESCRIPTION),y(l.default,{color:l.default.Colors.CUSTOM,size:l.default.Sizes.SIZE_16,className:c.default.headerCaptionSecondLine},void 0,f.default.Messages.GUILD_PARTNER_APPLICATION_SUBMIT_STEP_DESCRIPTION_2))),null!=p&&y(l.default,{color:l.default.Colors.ERROR,size:l.default.Sizes.SIZE_14,className:c.default.errorNotice},void 0,f.default.Messages.GUILD_PARTNER_APPLICATION_HAS_ERRORS))};_.displayName="PartnerApplicationSubmissionStep";var h=_;t.default=h},function(e,t,n){e.exports=n.p+"ce0080388259b1b4d7d805dd3bcb7229.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=I(n(0)),o=S(n(6006)),i=n(3),l=S(n(1159)),u=S(n(153)),s=I(n(474)),d=S(n(159)),f=S(n(47)),c=S(n(24)),p=n(8461),v=n(8534),y=S(n(8462)),m=n(8686),_=S(n(9888)),h=S(n(6)),E=S(n(7354)),g=S(n(9889));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=o.default.map((function(e){return{value:e.code,label:e.name}})),b=T("img",{alt:"",src:g.default}),M=function(e){var t=e.headerId,n=e.guild,r=(0,i.useStateFromStores)([y.default],(function(){return y.default.getApplication(n.id)}));a.useEffect((function(){(0,m.trackApplicationFunnel)(v.ApplicationTypes.PARTNER,v.PartnerApplicationSteps.USER)}),[]);if(null==n)return null;var o=null!=r?r:{},g=o.firstName,S=o.lastName,O=o.otherPlatform,I=o.country,M=o.serverType,N=o.platform,A=o.survey,P=o.surveyOther;return T("div",{className:E.default.container},void 0,T("div",{className:E.default.headerContent},void 0,b,T(f.default,{size:f.default.Sizes.SIZE_24,className:E.default.header,id:t},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_USER_STEP_TITLE),T(c.default,{color:c.default.Colors.CUSTOM,size:c.default.Sizes.SIZE_16,className:E.default.headerCaption},void 0,M===v.PartnerTypes.CONTENT_CREATOR?h.default.Messages.GUILD_PARTNER_APPLICATION_USER_STEP_DESCRIPTION_CONTENT_CREATOR:h.default.Messages.GUILD_PARTNER_APPLICATION_USER_STEP_DESCRIPTION)),T("div",{className:E.default.twoColumn},void 0,T("div",{className:E.default.spacedColumnItem},void 0,T(d.default,{},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_FIRST_NAME),T(u.default,{maxLength:250,value:g,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{firstName:e})}})),T("div",{className:E.default.columnItem},void 0,T(d.default,{},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_LAST_NAME),T(u.default,{maxLength:250,value:S,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{lastName:e})}}))),T("div",{className:E.default.formItem},void 0,T(d.default,{},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_COUNTRY),T(l.default,{options:C,value:I,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{country:null==e?void 0:e.value})},maxMenuHeight:150,searchable:!0})),T("div",{className:E.default.formItem},void 0,T(d.default,{},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_TITLE),T(s.default,{type:s.Types.DESCRIPTION,className:E.default.description},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_DESCRIPTION),T(l.default,{searchable:!1,options:[{value:v.PartnerReasons.TALK_WITH_OTHER_PARTNERS,label:h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_TALK_WITH_OTHER_PARTNERS},{value:v.PartnerReasons.COMMUNITY_TEAM_ACCESS,label:h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_COMMUNITY_TEAM_ACCESS},{value:v.PartnerReasons.NEW_IDEAS_SUGGESTIONS,label:h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_NEW_IDEAS_SUGGESTIONS},{value:v.PartnerReasons.EARLY_ACCESS_TO_FEATURES,label:h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_EARLY_ACCESS_TO_FEATURES},{value:v.PartnerReasons.OTHER,label:h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_OTHER}],value:A,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{survey:null==e?void 0:e.value})},maxMenuHeight:150}),T(s.default,{type:s.default.Types.DESCRIPTION,className:E.default.otherDescription},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_SURVEY_DESCRIPTION_OTHER),T(u.default,{maxLength:250,value:P,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{surveyOther:e})}})),M===v.PartnerTypes.CONTENT_CREATOR&&T("div",{className:E.default.formItem},void 0,T(d.default,{},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_CONTENT_PLATFORM),T(l.default,{options:v.PLATFORM_OPTIONS,value:N,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{platform:null==e?void 0:e.value})},maxMenuHeight:150})),T("div",{className:E.default.formItem},void 0,T(d.default,{},void 0,M===v.PartnerTypes.CONTENT_CREATOR?h.default.Messages.GUILD_PARTNER_APPLICATION_CREATOR_CONNECT:h.default.Messages.GUILD_PARTNER_APPLICATION_CONNECT),M===v.PartnerTypes.CONTENT_CREATOR&&T(s.default,{type:s.default.Types.DESCRIPTION,className:E.default.description},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_CREATOR_MUST_CONNECT_PRIMARY),T(_.default,{guildId:n.id})),M===v.PartnerTypes.CONTENT_CREATOR&&T("div",{className:E.default.formItem},void 0,T(d.default,{},void 0,N===v.PrimaryPlatformTypes.OTHER?h.default.Messages.GUILD_PARTNER_APPLICATION_OTHER_PLATFORM:h.default.Messages.GUILD_PARTNER_APPLICATION_OTHER_PLATFORM_OPTIONAL),T(s.default,{type:s.default.Types.DESCRIPTION,className:E.default.description},void 0,h.default.Messages.GUILD_PARTNER_APPLICATION_OTHER_PLATFORM_DESCRIPTION),T(u.default,{maxLength:250,value:O,onChange:function(e){(0,p.updatePartnerApplication)(n.id,{otherPlatform:e})}})))};M.displayName="PartnerApplicationUserInfoStep";var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Providers=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=n(3),l=_(n(2)),u=_(n(9180)),s=_(n(8377)),d=_(n(725)),f=_(n(55)),c=_(n(372)),p=n(8461),v=_(n(8462)),y=n(1),m=_(n(7745));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=[{value:y.PlatformTypes.TWITTER,label:"Twitter"},{value:y.PlatformTypes.TWITCH,label:"Twitch"},{value:y.PlatformTypes.YOUTUBE,label:"YouTube"},{value:y.PlatformTypes.REDDIT,label:"Reddit"},{value:y.PlatformTypes.FACEBOOK,label:"Facebook"},{value:y.PlatformTypes.GITHUB,label:"Github"}];t.Providers=g;var S=function(e){var t=e.guildId,n=(0,i.useStateFromStores)([d.default],(function(){return d.default.getAccounts()})),r=(0,i.useStateFromStores)([v.default],(function(){return v.default.getApplication(t)})),_=a.useState(new Set),h=_[0],S=_[1],O=function(e){return r.connectedAccounts.some((function(t){return t.type===e}))};return a.useEffect((function(){var e=new Set(h);h.forEach((function(a){var o=n.filter((function(e){return e.type===a}));o.length>0&&(l.default.wait((function(){return(0,p.updatePartnerApplication)(t,{connectedAccounts:[].concat(r.connectedAccounts,o)})})),e.delete(a))})),S(e)}),[n]),E(f.default,{align:f.default.Align.CENTER},void 0,g.map((function(e){var a,i=O(e.value),l=(0,o.default)(m.default.oauthButton,((a={})[m.default.connected]=i,a));return E(f.default.Child,{grow:0,shrink:0,className:m.default.buttonFlexContainer},e.value,E("div",{className:m.default.buttonWrapper},void 0,E(u.default,{innerClassName:l,type:e.value,onConnect:function(){return function(e){if(O(e)){var a=r.connectedAccounts.filter((function(t){return t.type!==e}));(0,p.updatePartnerApplication)(t,{connectedAccounts:a})}else{var o=n.filter((function(t){return t.type===e}));if(0===o.length){(0,s.default)(e);var i=new Set(h);i.add(e),S(i)}else(0,p.updatePartnerApplication)(t,{connectedAccounts:[].concat(r.connectedAccounts,o)})}}(e.value)}}),i&&E("div",{className:m.default.checkmarkCircle},void 0,E(c.default,{color:y.Colors.WHITE,width:12,height:12}))))})))};S.displayName="PartnerApplicationConnectAccountButtonRow";var O=S;t.default=O},function(e,t,n){e.exports=n.p+"94035933c0f95c852079ad9673fdc331.svg"},function(e,t,n){e.exports=n.p+"2faba1d53070a3ae96ec26e3ed600476.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={},u=!1;var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.isLoading=function(){return u},a.passesChecklist=function(e){var t;return!u&&(null===(t=l[e])||void 0===t?void 0:t.sufficient)},a.isPendingSuccess=function(e){var t=l[e];return null!=t&&(!u&&t.healthScorePending&&t.safeEnvironment&&0===Object.keys(t.nsfwProperties).length&&t.size&&t.protected)},a.getPartnerChecklist=function(e){return l[e]},r}(r.default.Store))(a.default,{PARTNER_REQUIREMENTS_FETCH_START:function(e){u=!0},PARTNER_REQUIREMENTS_FETCH_FAILURE:function(e){u=!1},PARTNER_REQUIREMENTS_FETCH_SUCCESS:function(e){var t=e.checklist,n=e.guildId;u=!1,l[n]={guildId:t.guild_id,safeEnvironment:t.safe_environment,healthy:t.healthy,healthScorePending:t.health_score_pending,nsfwProperties:t.nsfw_properties,size:t.size,protected:t.protected,sufficient:t.sufficient,sufficientWithoutGracePeriod:t.sufficient_without_grace_period,gracePeriodEndDate:null!=t.grace_period_end_date?new Date(t.grace_period_end_date):null,retentionHealthy:t.retention_healthy,engagementHealthy:t.engagement_healthy,minimumGuildSize:null!=t.minimum_size?t.minimum_size:500,healthScore:t.health_score,minimumGuildAge:t.minimum_age||0,age:t.age}}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",className:f,d:"M6.81394 8.982C4.53894 11.674 4.65594 15.591 6.93094 18.153L4.03394 21.579L5.56094 22.87L8.46294 19.437C9.56894 20.127 10.8459 20.513 12.1609 20.513C14.2309 20.513 16.1829 19.607 17.5159 18.027C20.0689 15.01 20.7709 6.945 20.9999 3C17.7649 3.876 9.03194 6.356 6.81394 8.982ZM8.93494 17.331C6.82594 15.548 6.55994 12.382 8.34194 10.272C9.59194 8.793 14.9039 6.845 18.7639 5.698L8.93494 17.331Z",fill:d}))}d.displayName="Leaf"},function(e,t,n){e.exports=n.p+"fd7c94580512371af3a5bb3bf25299e9.svg"},function(e,t,n){e.exports=n.p+"bc7f9210390707aa76067bf85b8137e6.svg"},function(e,t,n){e.exports=n.p+"90a5fc7dafd68c6868245d3d6f2cf015.svg"},function(e,t,n){e.exports=n.p+"c23c8cecd8ba616bebacb3d498aac9ee.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,o.useStateFromStores)([f.default],(function(){return f.default.getGuildId()})),t=(0,o.useStateFromStores)([c.default],(function(){return null!=e?c.default.getSubscriptionsForGuild(e):null}));return a.createElement(a.Fragment,null,I(a.Fragment,{},void 0,I(v.FormTitle,{tag:v.FormTitleTags.H1},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_TITLE),null!=t?I(C,{subscriptions:t}):null,I(v.FormText,{type:v.FormText.Types.DESCRIPTION,className:E.default.titleBlurb},void 0,h.default.Messages.GUILD_SETTINGS_PREMIUM_GUILD_BLURB.format({helpdeskArticle:y.default.getArticleURL(_.HelpdeskArticles.GUILD_SUBSCRIPTIONS)}))),I(s.default,{tiers:(0,m.getTiers)(),renderTier:b}),I("div",{className:E.default.divider}),M,N)};var r,a=O(n(0)),o=n(3),i=g(n(8687)),l=g(n(8747)),u=g(n(8748)),s=g(n(8999)),d=g(n(9e3)),f=g(n(8255)),c=g(n(8568)),p=O(n(8353)),v=n(131),y=g(n(93)),m=n(5935),_=n(1),h=g(n(6)),E=g(n(7750));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t=e.endsAt,n=e.premiumGuildSubscriptionsToMaintain,r=e.tierName,o=(0,i.default)(t),l=o.days,u=o.hours;return n<=0?null:a.createElement(a.Fragment,null,0===l&&0===u?h.default.Messages.PREMIUM_GUILD_GRACE_PERIOD_COOLDOWN_SOON.format({tierName:r,numPremiumSubscriptions:n}):h.default.Messages.PREMIUM_GUILD_GRACE_PERIOD_COOLDOWN.format({days:l,hours:u,tierName:r,numPremiumSubscriptions:n}))}function C(e){var t=e.subscriptions,n=(0,m.getGracePeriodEndingDate)(t),r=(0,m.getTierName)((0,m.getGuildTierFromSubscriberCount)(t.length));if(null==n||null==r)return null;var a=(0,m.premiumGuildSubscriptionsRequiredForPerks)(t);return I(p.default,{messageType:p.HelpMessageTypes.WARNING},void 0,I("div",{className:E.default.premiumGuildGracePeriodTitle},void 0,h.default.Messages.PREMIUM_GUILD_GRACE_PERIOD_TITLE.format()),I(T,{endsAt:n,premiumGuildSubscriptionsToMaintain:a,tierName:r}))}C.displayName="GuildSettingsGracePeriodNotice";var b=function(e){var t=e.isAnimatedTo,n=e.onSetRef,r=e.subscriptionCount,a=e.tier,o=e.tiers,i=e.tierIndex;return I(d.default,{subscriptionCount:r,tier:a,onSetRef:n,isAnimatedTo:t,hasBottomMargin:i!==o.length-1},a.tier)};b.displayName="renderTier";var M=I(u.default,{}),N=I(l.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.useRef)(e);(0,a.useEffect)((function(){n.current=e}),[e]),(0,a.useEffect)((function(){var e=setInterval((function(){(0,o.default)(null!=n.current,"Missing callback"),n.current()}),t);return function(){return clearInterval(e)}}),[t])};var r,a=n(0),o=(r=n(23))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=y(n(0)),o=p(n(9)),i=n(122),l=p(n(98)),u=n(139),s=y(n(149)),d=p(n(372)),f=p(n(6)),c=p(n(7747));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=(0,u.cssValueToNumber)(c.default.progressBarWidth),g=(0,u.cssValueToNumber)(c.default.tierMarkerSize),S={tension:140,friction:30},O={tension:800,friction:20},I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={showForegroundTooltip:!1,foregroundTooltipY:0,tierMarkerActive:0,finishedInitialAnimation:!1},t.foregroundTooltipElementRef=a.createRef(),t.tierMarkerMaskId=l.default.v4(),t.handleForegroundMouseEnter=function(e){t.setState({showForegroundTooltip:!0}),t.handleForegroundMouseMove(e)},t.handleForegroundMouseMove=function(e){if(e.target instanceof Element){var n=e.target.getBoundingClientRect(),r=e.clientY-n.top;r!==t.state.foregroundTooltipY&&t.setState({foregroundTooltipY:r})}},t.handleForegroundMouseLeave=function(){t.setState({showForegroundTooltip:!1})},t.handleForegroundFrame=function(e){for(var n=e.height,r=t.props,a=r.tiers,o=r.progress,i=r.onAnimatedTierMaker,l=t.state.tierMarkerActive,u=a.length-1;u>0;u--){var s=a[u],d=l===u;if(n+20>=s.y&&o>=s.numRequired)return void(d||(t.setState({tierMarkerActive:u}),null!=i&&i(s)))}},t.handleFinishedInitialAnimation=function(){t.setState({finishedInitialAnimation:!0})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var u=r.prototype;return u.getTotalHeight=function(){var e=this.props.tiers;return e[e.length-1].y+g/2},u.getProgressHeight=function(e){var t=this.props,n=t.tiers,r=t.progress,a=n[e],o=n[e+1];if(null==o||r===a.numRequired)return a.y;var i=o.y-a.y,l=o.numRequired-a.numRequired,u=(r-a.numRequired)/l*i;return a.y+u},u.getCurrentTierIndex=function(){for(var e=this.props,t=e.tiers,n=e.progress,r=t.length-1;r>0;r--)if(n>=t[r].numRequired)return r;return 0},u.renderForegroundTooltip=function(){var e=this.props,t=e.progress,n=e.tiers,r=this.state,a=r.showForegroundTooltip,o=r.foregroundTooltipY;if(!a||null==this.foregroundTooltipElementRef.current)return null;var i=n[this.getCurrentTierIndex()+1],l=null!=i?i.numRequired:null,u=null!=l?l-t:null;return _(s.TooltipLayer,{targetElementRef:this.foregroundTooltipElementRef,position:s.default.Positions.RIGHT,color:s.default.Colors.BLACK,tooltipClassName:c.default.foregroundTooltip},o,_("div",{},void 0,f.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_NUM_SUBSCRIPTIONS.format({numSubscriptions:t})),null!=u&&null!=i?_("div",{className:c.default.tooltipMuted},void 0,f.default.Messages.PREMIUM_GUILD_SETTINGS_MEMBERS_SUBSCRIBED_NEEDED.format({number:u,tier:i.name})):null)},u.renderTierMarkerTooltip=function(e){var t=this.props.progress;if(null==e.name)return null;var n=Math.min(t,e.numRequired);return _("div",{className:c.default.tierTooltip},void 0,_("div",{},void 0,e.name),_("div",{},void 0,f.default.Messages.PREMIUM_GUILD_SETTINGS_X_OF_Y_SUBSCRIPTIONS.format({subscribers:n,numRequired:e.numRequired})))},u.renderTierMarker=function(e,t,n){var r,o=this.props,l=o.progress,u=o.tiers[n],f=l>=e.numRequired,p=null!=u&&e.numRequired===u.numRequired,v=0===e.numRequired;r=v?c.default.tierDefault:p?c.default.tierCurrent:f?c.default.tierAccomplished:c.default.tierInProgress;var y=v?0:g/2,h=e.y-y,E=this.state.tierMarkerActive===t,S=!v&&p&&E;return _(s.default,{text:this.renderTierMarkerTooltip(e),position:s.default.Positions.RIGHT,"aria-label":e.name||""},e.key,(function(e){return _(i.Spring,{from:{scale:1},to:{scale:S?1.625:1},config:O},void 0,(function(t){return a.createElement(i.animated.div,m({},e,{className:r,style:{top:h,transform:t.scale.interpolate((function(e){return"scale("+e+")"}))}}),S&&_(d.default,{className:c.default.currentTierIcon}))}))}))},u.renderProgressMask=function(e){var t=this.props.tiers;return _("mask",{id:""+this.tierMarkerMaskId},void 0,_("rect",{x:"0",y:"0",width:E,height:e,fill:"white"}),t.map((function(e){return _("circle",{cx:E/2,cy:e.y,r:E/2,fill:"black"},e.key)})))},u.renderProgressBar=function(e,t){var n=this,r=this.getProgressHeight(t),a=this.state,o=a.finishedInitialAnimation,l=a.showForegroundTooltip;return _("g",{mask:"url(#"+this.tierMarkerMaskId+")"},void 0,_("rect",{className:c.default.background,height:e,fill:"currentColor"}),_(i.Spring,{from:{height:0},to:{height:r},config:S,delay:o?0:this.props.initialAnimationDelay,onChange:this.handleForegroundFrame,onRest:o?void 0:this.handleFinishedInitialAnimation},void 0,(function(e){return _(i.animated.rect,{className:c.default.foreground,height:e.height.interpolate((function(e){return Math.max(0,e)})),onMouseEnter:n.handleForegroundMouseEnter,onMouseLeave:n.handleForegroundMouseLeave,onMouseMove:l?n.handleForegroundMouseMove:void 0,fill:"currentColor"})})))},u.render=function(){var e=this,t=this.props,n=t.className,r=t.tiers,i=this.getCurrentTierIndex(),l=this.getTotalHeight();return _("div",{className:(0,o.default)(n,c.default.progressBar),style:{height:l}},void 0,_("svg",{viewBox:"0 0 "+E+" "+l,width:E,height:l},void 0,this.renderProgressMask(l),this.renderProgressBar(l,i)),a.createElement("div",{ref:this.foregroundTooltipElementRef,style:{top:this.state.foregroundTooltipY},className:c.default.foregroundTooltipPosition}),r.map((function(t,n){return e.renderTierMarker(t,n,i)})),this.renderForegroundTooltip())},r}(a.Component);I.displayName="PremiumGuildProgressBar",I.defaultProps={initialAnimationDelay:0};var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=n(122),l=u(n(7748));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),r.prototype.render=function(){var e=this.props,t=e.icon,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["icon"]);return a.createElement(t,n)},r}(a.Component);c.displayName="Icon";var p=(0,i.animated)(c);function v(e){var t=e.className,n=e.name,r=e.icon,a=e.iconClassName,u=(0,i.useTransition)({name:n,icon:r,iconClassName:a},{key:function(e){return e.name},initial:null,from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return d("div",{className:(0,o.default)(l.default.crossfade,t)},void 0,u((function(e,t){var n=t.icon,r=t.iconClassName;return d(p,{icon:n,className:(0,o.default)(l.default.icon,r),style:e})})))}v.displayName="CrossfadeIcon";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=d(n(9)),l=d(n(8)),u=d(n(10382)),s=d(n(7749));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e[e.HOVERING=0]="HOVERING",e[e.FLYING=1]="FLYING"}(a||(a={}));var _=Object.freeze({HOVERING:{Y_DURATION:1500,Y_VALUE:-5,Y_VALUE_MODIFIER:-1,FIRE_COUNT:10,FIRE_MIN_INTENSITY_FALLING:.8,FIRE_MAX_INTENSITY_FALLING:1,FIRE_MIN_INTENSITY_RISING:1,FIRE_MAX_INTENSITY_RISING:1.2},FALLING:{Y_VALUE:10,FIRE_COUNT:10,FIRE_VALUE:.2},STAGING:{DURATION:500,Y_VALUE:22,SHAKE_COUNT:10,SHAKE_INTENSITY:2,FIRE_COUNT:4,FIRE_MIN_INTENSITY:.6,FIRE_MAX_INTENSITY:1},FLYING:{DURATION:500,Y_VALUE:-1e3,Y_EASING:u.default.Easing.bezier(.46,.01,1,-.3),X_VALUE:200,X_EASING:u.default.Easing.bezier(.65,.05,1,.25),FIRE_COUNT:10,FIRE_MIN_INTENSITY:1.2,FIRE_MAX_INTENSITY:1.4,OPACITY_VALUE:0,OPACITY_DURATION_DIVIDEND:2}});function h(e,t,n,r){return u.default.sequence(l.default.times(t,(function(a){return u.default.timing(e,{toValue:r(a),duration:n/t})})))}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).x=new u.default.Value(0),t.y=new u.default.Value(0),t.opacity=new u.default.Value(1),t.fireScale=new u.default.Value(1),t.currentAnimation=null,t.isUnmounted=!1,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var o=r.prototype;return o.componentDidMount=function(){this.startAnimation()},o.componentWillUnmount=function(){this.isUnmounted=!0},o.componentDidUpdate=function(e){this.props.stage!==e.stage&&this.startAnimation()},o.startAnimation=function(){switch(null!=this.currentAnimation&&this.currentAnimation.stop(),this.props.stage){case a.HOVERING:return this.startHoverAnimate();case a.FLYING:return this.flyAnimate()}},o.resetAnimation=function(){this.y.setValue(0),this.x.setValue(0),this.opacity.setValue(1),this.fireScale.setValue(1)},o.startHoverAnimate=function(){this.resetAnimation(),this.hoverAnimate(_.HOVERING.Y_VALUE)},o.createFireAnimation=function(e,t,n,r){return h(this.fireScale,e,t,(function(){return l.default.random(n,r)}))},o.hoverAnimate=function(){var e=y(regeneratorRuntime.mark((function e(t){var n,r,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.props.stage===a.HOVERING&&!this.isUnmounted){e.next=2;break}return e.abrupt("return");case 2:return r=(n=t>1)?_.HOVERING.FIRE_MIN_INTENSITY_FALLING:_.HOVERING.FIRE_MIN_INTENSITY_RISING,o=n?_.HOVERING.FIRE_MAX_INTENSITY_FALLING:_.HOVERING.FIRE_MAX_INTENSITY_RISING,i=this.createFireAnimation(_.HOVERING.FIRE_COUNT,_.HOVERING.Y_DURATION,r,o),l=u.default.timing(this.y,{toValue:t,duration:_.HOVERING.Y_DURATION,easing:u.default.Easing.inOut(u.default.Easing.ease)}),this.currentAnimation=u.default.parallel([l,i]),e.next=10,this.currentAnimation.start();case 10:this.hoverAnimate(t*_.HOVERING.Y_VALUE_MODIFIER);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),o.createShakeAnimation=function(e,t,n){return h(this.x,e,t,(function(e){return l.default.random(1,n)*(e%2==0?1:-1)}))},o.flyAnimate=function(){var e=y(regeneratorRuntime.mark((function e(){var t,n,r,a,o,i,l,s,d,f,c,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.default.spring(this.y,{toValue:_.FALLING.Y_VALUE,overshootClamping:!0}),n=u.default.spring(this.fireScale,{toValue:_.FALLING.FIRE_VALUE,overshootClamping:!0}),r=u.default.parallel([t,n]),a=u.default.timing(this.y,{toValue:_.STAGING.Y_VALUE,duration:_.STAGING.DURATION}),o=this.createShakeAnimation(_.STAGING.SHAKE_COUNT,_.STAGING.DURATION,_.STAGING.SHAKE_INTENSITY),i=this.createFireAnimation(_.STAGING.FIRE_COUNT,_.STAGING.DURATION,_.STAGING.FIRE_MIN_INTENSITY,_.STAGING.FIRE_MAX_INTENSITY),l=u.default.parallel([a,o,i]),s=u.default.timing(this.y,{toValue:_.FLYING.Y_VALUE,duration:_.FLYING.DURATION,easing:_.FLYING.Y_EASING}),d=u.default.timing(this.x,{toValue:_.FLYING.X_VALUE,duration:_.FLYING.DURATION,easing:_.FLYING.X_EASING}),f=u.default.timing(this.opacity,{toValue:_.FLYING.OPACITY_VALUE,duration:_.FLYING.DURATION/_.FLYING.OPACITY_DURATION_DIVIDEND,delay:_.FLYING.DURATION/_.FLYING.OPACITY_DURATION_DIVIDEND}),c=this.createFireAnimation(_.FLYING.FIRE_COUNT,_.FLYING.DURATION,_.FLYING.FIRE_MIN_INTENSITY,_.FLYING.FIRE_MAX_INTENSITY),p=u.default.parallel([s,d,f,c]),this.currentAnimation=u.default.sequence([r,l,p]),e.next=15,this.currentAnimation.start();case 15:this.isUnmounted||null!=(v=this.props.onFlyingComplete)&&v();case 16:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),o.getWumpusStyle=function(){return{transform:[{translateY:this.y.interpolate({inputRange:[0,1],outputRange:["0px","1px"]})},{translateX:this.x.interpolate({inputRange:[0,1],outputRange:["0px","1px"]})}],opacity:this.opacity}},o.getFireStyle=function(){return{transform:[{scale:this.fireScale}]}},o.render=function(){var e=this.props,t=e.className,n=e.style;return c(u.default.div,{className:(0,i.default)(s.default.animation,t),style:p({},n,{},this.getWumpusStyle())},void 0,c("div",{className:s.default.fireTopWrapper},void 0,c(u.default.div,{className:s.default.fire,style:this.getFireStyle()})),c("div",{className:s.default.fireBottomWrapper},void 0,c(u.default.div,{className:s.default.fire,style:this.getFireStyle()})),c("div",{className:s.default.wumpus}))},r}(o.Component);E.displayName="MechaWumpusFlying",E.Stages=a;var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function l(){return(l=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}).apply(this,arguments)}var u=i("path",{d:"M5 0.5L0 5.5V10.5L5 15.5L10 10.5V5.5L5 0.5ZM8.75 9.9875L5 13.7375L1.25 9.9875V6.0125L5 2.2625L8.75 6.0125V9.9875Z"}),s=i("path",{d:"M2.5 6.53751V9.46251L5 11.9625L7.5 9.46251V6.53751L5 4.03751L2.5 6.53751Z"});function d(e){return a.createElement("svg",l({},e,{width:"10",height:"16",viewBox:"0 0 10 16",fill:"#FF73FA",xmlns:"http://www.w3.org/2000/svg"}),u,s)}d.displayName="GuildSettingsServerBoostIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=n(3),i=T(n(8412)),l=n(8277),u=n(5972),s=n(398),d=T(n(9904)),f=T(n(8255)),c=T(n(29)),p=n(131),v=b(n(474)),y=n(1230),m=T(n(47)),_=T(n(24)),h=n(380),E=T(n(93)),g=n(5935),S=n(1),O=T(n(6)),I=T(n(7753));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=function(e){var t=e.guild,n=S.PremiumGuildSubscriptionsRequired[S.PremiumGuildTiers.TIER_1]-t.premiumSubscriberCount;return M("div",{className:I.default.upsellContainer},void 0,M(m.default,{className:I.default.upsellHeader,size:m.default.Sizes.SIZE_24},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPSELL_TITLE),M(_.default,{className:I.default.upsellDescription,size:_.default.Sizes.SIZE_16},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPSELL_DESCRIPTION),M("div",{className:I.default.upsellButtons},void 0,M(c.default,{className:I.default.upsellButtonPrimary,innerClassName:I.default.upsellButton,color:c.default.Colors.WHITE,onClick:function(){return(0,u.openPremiumGuildSubscriptionPurchaseModal)({analyticsLocation:{page:S.AnalyticsPages.GUILD_SETTINGS,section:S.AnalyticsSections.GUILD_SETTINGS_STICKERS,object:S.AnalyticsObjects.BOOSTING_BANNER},guildId:t.id,totalNumberOfSlotsToAssign:n})}},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_BOOST_SERVER),M(c.default,{innerClassName:I.default.upsellButton,color:c.default.Colors.WHITE,onClick:function(){return(0,y.openFullScreenLayer)((function(e){var n=e.transitionState,r=e.closeLayer;return M(i.default,{layerTransitionState:n,close:r,guildId:t.id,locationSection:S.AnalyticsSections.GUILD_SETTINGS_STICKERS})}))}},void 0,O.default.Messages.LEARN_MORE)))};N.displayName="BoostUpsell";var A=function(){return M(p.FormSection,{title:O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_HEADING},void 0,M(v.default,{type:v.Types.DESCRIPTION},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_REQUIREMENTS,M("ul",{className:I.default.uploadRequirementsList},void 0,M("li",{},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_REQUIREMENTS_1),M("li",{},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_REQUIREMENTS_2.format({fileSize:(0,h.formatKbSize)(s.MAX_STICKER_FILE_SIZE,{useKibibytes:!0})})),M("li",{},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_REQUIREMENTS_3),M("li",{},void 0,O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_REQUIREMENTS_4)),O.default.Messages.GUILD_SETTINGS_STICKERS_UPLOAD_HELP.format({articleUrl:E.default.getArticleURL(S.HelpdeskArticles.STICKERS_UPLOAD)})))};A.displayName="UploadRequirements";var P=M(A,{}),R=function(){a.useEffect((function(){(0,l.hideHotspot)(l.HotspotLocations.GUILD_STICKERS_GUILD_SETTINGS_MENU)}),[]);var e=(0,o.useStateFromStores)([f.default],(function(){return f.default.getGuild()}));return null==e?null:M(p.FormSection,{title:O.default.Messages.GUILD_SETTINGS_STICKERS,tag:p.FormTitleTags.H1},void 0,(0,g.isGuildPremiumAtLeast)(e.premiumTier,S.PremiumGuildTiers.TIER_1)?P:M(N,{guild:e}),M(p.FormDivider,{className:I.default.divider}),M(d.default,{guild:e}))};R.displayName="GuildSettingsStickers";var L=R;t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=n(3),l=n(5972),u=C(n(29)),s=C(n(61)),d=C(n(151)),f=C(n(5951)),c=n(41),p=C(n(24)),v=n(5935),y=n(5940),m=C(n(362)),_=C(n(8999)),h=C(n(9e3)),E=C(n(9905)),g=n(9001),S=n(1),O=C(n(6)),I=C(n(7386)),T=C(n(7752));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P=function(e){var t=e.children,n=e.currentGuildTier,r=e.guildStickers,o=e.tier,i=n<o,l=(0,v.getIncrementalStickerCountForTier)(o);return a.createElement(a.Fragment,null,A(p.default,{color:p.default.Colors.HEADER_PRIMARY,size:p.default.Sizes.SIZE_16},void 0,t),!i&&A(p.default,{color:p.default.Colors.STANDARD,className:T.default.tierCardSubheading,size:p.default.Sizes.SIZE_12},void 0,O.default.Messages.GUILD_STICKER_SETTINGS_REMAINING_SLOTS_AVAILABLE.format({numTotal:l,numAvailable:(0,v.getAvailableStickerSlotCount)(r,o)})))},R=function(e){var t=e.guild;return A(s.default,{className:(0,o.default)(I.default.wrapper,T.default.uploadCard),onClick:function(){return(0,c.openModal)((function(e){return a.createElement(g.StickerUploadModal,N({guildId:t.id},e))}))}},void 0,A("div",{className:T.default.iconWrapper},void 0,A(f.default,{className:T.default.icon})),A(p.default,{className:T.default.uploadCardLabel,color:p.default.Colors.INTERACTIVE_ACTIVE,size:p.default.Sizes.SIZE_12},void 0,O.default.Messages.GUILD_STICKER_GRID_UPLOAD_LABEL))};R.displayName="UploadCard";var L=A(d.default,{}),D=function(e){var t=e.guild,n=a.useState(!0),r=n[0],o=n[1],s=(0,i.useStateFromStores)([m.default],(function(){var e;return null!==(e=m.default.getStickersByGuildId(t.id))&&void 0!==e?e:[]}),[t]),d=t.premiumTier;if(a.useEffect((function(){var e=!1;return function(){var n,r=(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o(!0),n.next=3,(0,y.fetchGuildStickers)(t.id);case 3:if(!e){n.next=5;break}return n.abrupt("return");case 5:o(!1);case 6:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,a){var o=n.apply(e,t);function i(e){M(o,r,a,i,l,"next",e)}function l(e){M(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return r.apply(this,arguments)}}()(),function(){e=!0}}),[t]),r)return L;var f=A(R,{guild:t}),c=[{tier:S.PremiumGuildTiers.TIER_1,title:A(P,{guildStickers:s,currentGuildTier:d,tier:S.PremiumGuildTiers.TIER_1},void 0,O.default.Messages.PREMIUM_GUILD_TIER_1)},{tier:S.PremiumGuildTiers.TIER_2,title:A(P,{guildStickers:s,currentGuildTier:d,tier:S.PremiumGuildTiers.TIER_2},void 0,O.default.Messages.PREMIUM_GUILD_TIER_2)},{tier:S.PremiumGuildTiers.TIER_3,title:A(P,{guildStickers:s,currentGuildTier:d,tier:S.PremiumGuildTiers.TIER_3},void 0,O.default.Messages.PREMIUM_GUILD_TIER_3)}];return A(_.default,{tiers:c,renderTier:function(e){var n,r=e.isAnimatedTo,a=e.onSetRef,o=e.tier,i=e.tiers,c=e.tierIndex,y=i[c-1],m=null!=y?(0,v.getTotalStickerCountForTier)(y.tier):0,_=(0,v.getTotalStickerCountForTier)(o.tier),g=s.slice(m,_),I=d<o.tier,C=!I&&((n=s.length)<(0,v.getTotalStickerCountForTier)(S.PremiumGuildTiers.TIER_1)?S.PremiumGuildTiers.TIER_1:n<(0,v.getTotalStickerCountForTier)(S.PremiumGuildTiers.TIER_2)?S.PremiumGuildTiers.TIER_2:n<(0,v.getTotalStickerCountForTier)(S.PremiumGuildTiers.TIER_3)?S.PremiumGuildTiers.TIER_3:S.PremiumGuildTiers.NONE)===o.tier,b=C||g.length>0;return A(h.default,{subscriptionCount:t.premiumSubscriberCount,tier:o,onSetRef:a,isAnimatedTo:r,hasBottomMargin:c!==i.length-1,withCardBody:I&&!b},o.tier,b&&A("div",{className:T.default.grid},void 0,C&&f,g.map((function(e){return A(E.default,{isDisabled:I,sticker:e},e.id)}))),!I&&!C&&0===g.length&&A("div",{className:T.default.emptyTierWrapper},void 0,A(p.default,{size:p.default.Sizes.SIZE_16,color:p.default.Colors.HEADER_SECONDARY},void 0,O.default.Messages.GUILD_STICKER_UNUSED_TIER)),I&&A("div",{className:T.default.emptyTierWrapper},void 0,A(p.default,{className:T.default.unlockTierCtaHeading,size:p.default.Sizes.SIZE_16,color:p.default.Colors.HEADER_SECONDARY},void 0,O.default.Messages.GUILD_STICKER_SETTINGS_ADDITIONAL_SLOTS.format({numAdditional:_-m,numTotal:_})),A(u.default,{onClick:function(){return function(e,n){var r=null;n===S.PremiumGuildTiers.TIER_1?r=S.AnalyticsObjectTypes.TIER_1:n===S.PremiumGuildTiers.TIER_2?r=S.AnalyticsObjectTypes.TIER_2:n===S.PremiumGuildTiers.TIER_3&&(r=S.AnalyticsObjectTypes.TIER_3),(0,l.openPremiumGuildSubscriptionPurchaseModal)({analyticsLocation:{page:S.AnalyticsPages.GUILD_SETTINGS,section:S.AnalyticsSections.GUILD_SETTINGS_STICKERS,objectType:r},guildId:t.id,totalNumberOfSlotsToAssign:e})}(S.PremiumGuildSubscriptionsRequired[o.tier]-t.premiumSubscriberCount,o.tier)}},void 0,O.default.Messages.GUILD_STICKER_SETTINGS_BUY_LEVEL)))}})};D.displayName="GuildStickersTiers";var w=D;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(9)),i=S(n(8332)),l=S(n(5675)),u=S(n(185)),s=S(n(61)),d=S(n(151)),f=S(n(149)),c=S(n(255)),p=S(n(1215)),v=n(41),y=S(n(279)),m=S(n(24)),_=n(5940),h=n(9001),E=S(n(5936)),g=S(n(7386));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(){return(C=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}).apply(this,arguments)}var b=function(e){var t=e.className,n=e.isDisabled,r=e.sticker,S=a.useState(!1),O=S[0],b=S[1],M=(0,l.default)(null,4e3),N=M[0],A=M[1],P=function(){(0,v.openModal)((function(e){return a.createElement(h.StickerUploadModal,C({sticker:r,guildId:r.guild_id},e))}))},R=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A(null),b(!0),e.prev=2,e.next=5,(0,_.deleteGuildSticker)(r);case 5:e.next=11;break;case 7:e.prev=7,e.t0=e.catch(2),A(e.t0.body.message),b(!1);case 11:case"end":return e.stop()}}),e,null,[[2,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),L=null!=r.tags?u.default.getByName(r.tags):null;return I(f.default,{color:f.default.Colors.RED,forceOpen:null!=N,text:N},void 0,(function(){var e,l;return I("div",{className:(0,o.default)(g.default.wrapper,t,(e={},e[g.default.wrapperDisabled]=n,e))},void 0,I("div",{className:(0,o.default)(g.default.content,(l={},l[g.default.contentRemoving]=O,l))},void 0,null!=L&&I(f.default,{text:":"+L.uniqueName+":"},void 0,(function(e){return a.createElement("img",C({alt:L.allNamesString,src:L.url,className:g.default.relatedEmoji},e))})),I(E.default,{className:g.default.sticker,size:90,sticker:r}),I(m.default,{color:m.default.Colors.HEADER_PRIMARY,size:m.default.Sizes.SIZE_12,className:g.default.stickerName},void 0,r.name),null!=r.user&&I("div",{className:g.default.user},void 0,I(i.default,{className:g.default.userAvatar,size:y.default.Sizes.SIZE_16,user:r.user}),I(m.default,{color:m.default.Colors.HEADER_SECONDARY,size:m.default.Sizes.SIZE_12},void 0,r.user.username)),I("div",{className:g.default.actions},void 0,I(s.default,{className:(0,o.default)(g.default.action,g.default.actionEdit),onClick:P},void 0,I(p.default,{className:g.default.icon})),I(s.default,{className:(0,o.default)(g.default.action,g.default.actionRemove),onClick:R},void 0,I(c.default,{className:g.default.icon})))),O&&I(d.default,{className:g.default.spinner}))}))};b.displayName="GuildStickerCard";var M=b;t.default=M},function(e,t,n){e.exports=n.p+"aba6e7203fb389c111886a52373ada06.svg"},function(e,t,n){e.exports=n.p+"bd8311f30604bc3a780e3a97cbf1af64.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GuildSettingsTemplateNotice=V,t.default=Y,t.GuildSettingsTemplateMetadataStore=void 0;var r,a=k(n(0)),o=w(n(9)),i=w(n(23)),l=k(n(3)),u=w(n(2)),s=w(n(8688)),d=w(n(8292)),f=w(n(195)),c=w(n(1178)),p=w(n(1176)),v=n(296),y=w(n(9909)),m=w(n(8743)),_=w(n(8255)),h=w(n(39)),E=w(n(29)),g=w(n(151)),S=w(n(8272)),O=w(n(153)),I=n(131),T=w(n(729)),C=w(n(686)),b=n(466),M=n(41),N=w(n(24)),A=n(1),P=w(n(6)),R=w(n(7755)),L=w(n(370)),D=w(n(5712));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function U(){return(U=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}).apply(this,arguments)}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){F(o,r,a,i,l,"next",e)}function l(e){F(o,r,a,i,l,"throw",e)}i(void 0)}))}}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=new(function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).name="",t.description="",t.error=null,t.reset=function(){var e,n,r=t.getTemplate();null!=r?(t.name=null!==(e=r.name)&&void 0!==e?e:t.name,t.description=null!==(n=r.description)&&void 0!==n?n:t.description):(t.name="",t.description="");t.emitChange()},t.setName=function(e){t.name=e,t.emitChange()},t.setDescription=function(e){t.description=e,t.emitChange()},t.setError=function(e){t.error=e,t.emitChange()},t.save=B(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.default.updateGuildTemplate(_.default.getProps().guild.id,t.getTemplate().code,t.name,t.description);case 2:t.emitChange();case 3:case"end":return e.stop()}}),e)}))),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,H(t,n);var a=r.prototype;return a.getTemplate=function(){var e=_.default.getProps().guild;if(null==e)return null;var t=p.default.getForGuild(e.id);return null!=t&&t.state!==v.GuildTemplateStates.RESOLVING?t:null},a.showNotice=function(){var e=this.getTemplate();return null!=e&&(!!this.name&&(this.name.trim()!==e.name||this.description.trim()!==e.description))},r}(l.default.Store))(u.default);function V(){var e=(0,l.useStateFromStores)([h.default],(function(){return h.default.theme})),t=a.useState(!1),n=t[0],r=t[1],o=function(){var e=B(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),e.next=3,x.save();case 3:r(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return G(d.default,{theme:e,submitting:n,onReset:x.reset,onSave:o})}function W(e){return null!=e&&e.trim().length>=2}function Y(){return G(I.FormSection,{className:L.default.marginBottom4},void 0,G(I.FormTitle,{tag:I.FormTitleTags.H1},void 0,P.default.Messages.GUILD_TEMPLATES),G(I.FormText,{className:L.default.marginBottom20,type:I.FormTextTypes.DESCRIPTION},void 0,P.default.Messages.GUILD_TEMPLATE_SETTINGS_DESCRIPTION.format()),Z,G(I.FormDivider,{className:R.default.divider}),K)}function z(){var e=_.default.getProps().guild;(0,i.default)(null!=e,"guild cannot be null");var t=(0,l.useStateFromStores)([x],(function(){return x.error})),n=a.useState(!0),r=n[0],o=n[1],u=function(e){var t=a.useState(!0),n=t[0],r=t[1];return a.useEffect((function(){function t(){return(t=B(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r(!0),t.prev=1,t.next=4,c.default.loadTemplatesForGuild(e);case 4:r(!1),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),x.setError(new f.default(t.t0));case 10:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[e]),{loading:n,guildTemplate:(0,l.useStateFromStores)([p.default],(function(){return p.default.getForGuild(e)}),[e])}}(e.id),s=u.loading,d=u.guildTemplate;return a.useEffect((function(){if(r&&!s){var e,t;if(null!=d)x.setName(null!==(e=d.name)&&void 0!==e?e:""),x.setDescription(null!==(t=d.description)&&void 0!==t?t:"");o(!1)}}),[r,d,s]),a.useEffect((function(){return function(){x.reset(),x.setError(null)}}),[]),r?t?G(N.default,{color:N.default.Colors.ERROR},void 0,t.message):G(g.default,{className:L.default.marginTop40}):a.createElement(a.Fragment,null,J,G(Q,{guild:e,guildTemplate:d}),null!=(null==t?void 0:t.message)&&G(N.default,{className:L.default.marginTop8,color:N.default.Colors.ERROR},void 0,t.message))}t.GuildSettingsTemplateMetadataStore=x,V.displayName="GuildSettingsTemplateNotice",Y.displayName="GuildSettingsTemplate";var K=G(z,{});function $(){return G("div",{className:R.default.descriptionBox},void 0,G("div",{className:R.default.descriptionSection},void 0,G("h5",{className:(0,o.default)(R.default.descriptionTitle,D.default.h5)},void 0,P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_WILL_COPY),G("div",{className:R.default.descriptionRow},void 0,G(T.default,{className:R.default.descriptionIcon,color:A.Colors.STATUS_GREEN_600,backgroundColor:A.Colors.WHITE}),P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_CHANNELS),G("div",{className:R.default.descriptionRow},void 0,G(T.default,{className:R.default.descriptionIcon,color:A.Colors.STATUS_GREEN_600,backgroundColor:A.Colors.WHITE}),P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_ROLES),G("div",{className:R.default.descriptionRow},void 0,G(T.default,{className:R.default.descriptionIcon,color:A.Colors.STATUS_GREEN_600,backgroundColor:A.Colors.WHITE}),P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_SETTINGS)),G("div",{className:R.default.descriptionSection},void 0,G("h5",{className:(0,o.default)(R.default.descriptionTitle,D.default.h5)},void 0,P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_WONT_COPY),G("div",{className:R.default.descriptionRow},void 0,G(C.default,{className:R.default.descriptionIcon,color:A.Colors.STATUS_RED,backgroundColor:A.Colors.WHITE}),P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_MESSAGES),G("div",{className:R.default.descriptionRow},void 0,G(C.default,{className:R.default.descriptionIcon,color:A.Colors.STATUS_RED,backgroundColor:A.Colors.WHITE}),P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_MEMBERS),G("div",{className:R.default.descriptionRow},void 0,G(C.default,{className:R.default.descriptionIcon,color:A.Colors.STATUS_RED,backgroundColor:A.Colors.WHITE}),P.default.Messages.GUILD_TEMPLATES_FORM_DESCRIPTION_PERKS)))}$.displayName="DescriptionBox";var Z=G($,{});function q(e){var t=e.cancel,n=e.confirm;return G(b.DeclarativeConfirmModal,{dismissable:!0,header:P.default.Messages.GUILD_TEMPLATES_DELETE_TEMPLATE,confirmText:P.default.Messages.GUILD_TEMPLATES_DELETE_TEMPLATE,cancelText:P.default.Messages.CANCEL,onCancel:t,onConfirm:n},void 0,G(N.default,{size:N.default.Sizes.SIZE_16,color:N.default.Colors.STANDARD},void 0,P.default.Messages.GUILD_TEMPLATES_DELETE_DESCRIPTION))}function X(){var e=(0,l.useStateFromStores)([x],(function(){return x.name})),t=(0,l.useStateFromStores)([x],(function(){return x.description})),n=(0,l.useStateFromStores)([x],(function(){return x.error}));return a.createElement(a.Fragment,null,G(I.FormItem,{className:L.default.marginBottom20,title:P.default.Messages.GUILD_TEMPLATES_FORM_LABEL_NAME,error:null==n?void 0:n.getFieldMessage("name")},void 0,G(O.default,{value:e,onChange:function(e){return x.setName(e)},placeholder:P.default.Messages.GUILD_TEMPLATES_FORM_PLACEHOLDER_NAME,maxLength:100})),G(I.FormItem,{className:L.default.marginBottom20,title:P.default.Messages.GUILD_TEMPLATES_FORM_LABEL_DESCRIPTION,error:null==n?void 0:n.getFieldMessage("description")},void 0,G(S.default,{value:t,onChange:function(e){return x.setDescription(e)},placeholder:P.default.Messages.GUILD_TEMPLATES_FORM_PLACEHOLDER_DESCRIPTION,maxLength:120})))}q.displayName="ConfirmDeleteModal";var J=G(X,{});function Q(e){var t=e.guild,n=e.guildTemplate;return null==n?G(ee,{guild:t}):a.createElement(a.Fragment,null,G(I.FormItem,{title:P.default.Messages.GUILD_TEMPLATES_FORM_LABEL_LINK},void 0,G(s.default,{buttonLook:E.default.Looks.FILLED,buttonColor:E.default.Colors.BRAND,value:(0,y.default)(n.code)})),n.isDirty&&G(N.default,{color:N.default.Colors.STATUS_YELLOW,className:L.default.marginTop8},void 0,P.default.Messages.GUILD_TEMPLATES_UNSYNCED_WARNING),G("div",{className:(0,o.default)(L.default.marginTop20,R.default.buttonContainer)},void 0,n.isDirty&&G(te,{guild:t,guildTemplate:n}),G("div",{className:R.default.rightButtonContainer},void 0,G(ne,{guild:t,guildTemplate:n}),G(re,{guildTemplate:n}))),n.isDirty&&G("div",{className:R.default.lastSync},void 0,P.default.Messages.GUILD_TEMPLATES_LAST_SYNC.format({timestamp:new Date(n.updatedAt)})))}function ee(e){var t=e.guild,n=(0,l.useStateFromStores)([x],(function(){return x.name})),r=a.useState(!1),o=r[0],i=r[1],u=function(){var e=B(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x.setError(null),i(!0),e.prev=2,e.next=5,c.default.createGuildTemplate(t.id,x.name,x.description);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),x.setError(new f.default(e.t0));case 10:i(!1);case 11:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(){return e.apply(this,arguments)}}();return G(E.default,{submitting:o,disabled:!W(n),color:E.default.Colors.BRAND,onClick:u},void 0,P.default.Messages.GUILD_TEMPLATES_CREATE_LINK)}function te(e){var t=e.guild,n=e.guildTemplate,r=a.useState(!1),o=r[0],i=r[1],l=function(){var e=B(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x.setError(null),i(!0),e.prev=2,e.next=5,c.default.syncGuildTemplate(t.id,n.code);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),x.setError(new f.default(e.t0));case 10:i(!1);case 11:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(){return e.apply(this,arguments)}}();return G(E.default,{submitting:o,className:R.default.button,onClick:l},void 0,P.default.Messages.GUILD_TEMPLATES_SYNC_TEMPLATE)}function ne(e){var t=e.guild,n=e.guildTemplate,r=a.useState(!1),o=r[0],i=r[1],l=function(){var e=B(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x.setError(null),e.prev=1,e.next=4,c.default.deleteGuildTemplate(t.id,n.code);case 4:x.setName(""),x.setDescription(""),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),x.setError(new f.default(e.t0));case 11:i(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}();return a.createElement(a.Fragment,null,G(E.default,{look:E.default.Looks.OUTLINED,className:R.default.button,color:E.default.Colors.RED,onClick:function(){return i(!0)}},void 0,P.default.Messages.GUILD_TEMPLATES_DELETE_TEMPLATE),o?G(q,{confirm:l,cancel:function(){return i(!1)}}):null)}function re(e){var t=e.guildTemplate;return G(E.default,{color:E.default.Colors.GREY,className:R.default.button,onClick:function(){return(0,M.openModal)((function(e){return a.createElement(m.default,U({},e,{guildTemplate:t}))}))}},void 0,P.default.Messages.GUILD_TEMPLATES_PREVIEW_TEMPLATE)}ee.displayName="GenerateTemplateButton",te.displayName="SyncTemplateButton",re.displayName="PreviewTemplateButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e="");void 0===t&&(t=!0);var n=window.GLOBAL_ENV.GUILD_TEMPLATE_HOST,r="/"+e;return(t?""+location.protocol:"")+"//"+n+r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(6)),i=l(n(7756));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){return e.showDirtyIndicator?s("div",{className:i.default.container},void 0,o.default.Messages.GUILD_TEMPLATES,s("div",{className:i.default.dot})):a.createElement(a.Fragment,null,o.default.Messages.GUILD_TEMPLATES)}d.displayName="GuildSettingsTemplateLabel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,o.useStateFromStores)([u.default],(function(){return u.default.getProps()})).guild,t=(0,l.useThreadsOptInConfig)(e);return null==e?null:a.createElement(a.Fragment,null,E("div",{className:y.default.container},void 0,E("img",{src:m.default,className:y.default.banner,alt:""}),E(p.default,{size:p.default.Sizes.SIZE_24},void 0,"Say Hello to Threads!"),E(v.default,{color:v.default.Colors.HEADER_SECONDARY,size:v.default.Sizes.SIZE_16,className:y.default.body},void 0,"Threads are temporary sub-discussions within a channel that keep conversations focused in your server. And they're coming soon.")),t.viewBots?E(R,{guild:e,config:t}):null)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=_(n(14)),l=n(1209),u=_(n(8255)),s=_(n(271)),d=_(n(29)),f=n(131),c=_(n(159)),p=_(n(47)),v=_(n(24)),y=_(n(7757)),m=_(n(9912));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=E("p",{},void 0,"Since it looks like you might be a bot developer, we want to share an exciting update: Maintainers of bots who want to ",E("strong",{},void 0,"get those bots updated")," before Threads launches can enable Threads in"," ",E("strong",{},void 0,"small testing servers")," to get a head start!"),S=E(c.default,{},void 0,"Qualifying servers must:"),O=E("li",{},void 0,"Have fewer than five members, one of which is a bot"),I=E("li",{},void 0,"Be using the Canary or PTB desktop Discord client"),T=E("p",{},void 0,"If you meet those requirements, just click the button above."),C=E(c.default,{},void 0,"Please keep in mind:"),b=E("li",{},void 0,"If you go above the five member limit, or stop using canary, etc, you won't be able to keep testing Threads"),M=E("li",{},void 0,"Threads are still in development, so there will be issues, bear with us please :D"),N=E("li",{},void 0,"To help with testing, premium Thread features will be enabled until Threads fully launches"),A=E("li",{},void 0,"Be sure to check out ",E(s.default,{href:"https://discord.com/developers/docs/topics/threads"},void 0,"the docs")),P=E("li",{},void 0,"Hype!");function R(e){var t=e.guild,n=e.config,r=a.useState(15),o=r[0],l=r[1];return a.useEffect((function(){var e=setInterval((function(){l((function(t){return--t<=0&&clearInterval(e),t}))}),1e3);return function(){return clearInterval(e)}}),[]),a.createElement(a.Fragment,null,n.enableBots?o>0?E(d.default,{className:y.default.button,disabled:!0},void 0,"Enable Threads (",o,")"):E(d.default,{className:y.default.button,onClick:function(){i.default.post("/guilds/"+t.id+"/threads/bot-opt-in")}},void 0,"Enable Threads"):E(d.default,{className:y.default.button,disabled:!0},void 0,"Threads Enabled"),E(v.default,{size:v.default.Sizes.SIZE_14},void 0,g,E(f.FormDivider,{className:y.default.divider}),S,E("ul",{className:y.default.list},void 0,O,I),T,E(f.FormDivider,{className:y.default.divider}),C,E("ul",{className:y.default.list},void 0,b,M,N,A,P)))}},function(e,t,n){e.exports=n.p+"a2f58145ca2b860e613b54a32ddc6d9f.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GuildSettingsVanityURLNotice=void 0;var r,a=M(n(0)),o=C(n(3)),i=n(9914),l=C(n(8316)),u=C(n(8292)),s=C(n(1258)),d=C(n(8255)),f=C(n(8983)),c=C(n(160)),p=C(n(29)),v=C(n(467)),y=C(n(55)),m=C(n(9915)),_=C(n(151)),h=C(n(681)),E=M(n(474)),g=M(n(159)),S=C(n(24)),O=n(1),I=C(n(6)),T=C(n(7759));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=o.default.connectStores([d.default,f.default],(function(){var e=f.default.vanityURLCode,t=d.default.getGuildId();return{vanityURLCode:e,guildId:t,onReset:function(){(0,i.resetCode)()},onSave:function(){null!=t&&(0,i.saveCode)(t,e)}}}))(u.default);t.GuildSettingsVanityURLNotice=P;var R=N(_.default,{}),L=N(l.default,{}),D=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={isRemoving:!1},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var a=r.prototype;return a.componentWillUnmount=function(){(0,i.close)()},a.renderEditCard=function(){var e=this.state.isRemoving,t=this.props,n=t.hasError,r=t.originalVanityURLCode,a=t.vanityURLCode,o=t.vanityURLUses;return null==a?R:N(v.default,{editable:!0,className:T.default.editVanityUrlCard},void 0,N(g.default,{},void 0,N(y.default,{},void 0,N("div",{className:T.default.formTitleField},void 0,I.default.Messages.INVITE_URL),a.length>0?N("div",{},void 0,I.default.Messages.VANITY_URL_USES.format({uses:o})):null)),N(m.default,{prefix:O.INVITE_ENDPOINT+"/",value:a,onChange:this.handleInviteCodeChange,maxLength:25,autoFocus:!0,error:n}),null!=r&&r.length>0?N(p.default,{className:T.default.removeVanityUrlButton,onClick:this.handleRemoveVanityURL,submitting:e,look:p.default.Looks.LINK,size:p.default.Sizes.MIN,color:p.default.Colors.RED},void 0,I.default.Messages.REMOVE_VANITY_URL):null)},a.renderInfo=function(){var e=this.props,t=e.hasError,n=e.originalVanityURLCode;if(t)return N(S.default,{size:S.default.Sizes.SIZE_16,color:S.default.Colors.STATUS_RED,className:T.default.marginTop20},void 0,I.default.Messages.CHANGE_VANITY_URL_ERROR);if(null!=n&&n.length>0){var r=(0,s.default)(n);return N(E.default,{className:T.default.marginTop20,type:E.Types.LABEL_DESCRIPTOR},void 0,I.default.Messages.VANITY_URL_HELP_EXTENDED_LINK.format({urlText:r,urlValue:r}))}},a.handleRemoveVanityURL=function(){(0,i.setCode)("")},a.handleInviteCodeChange=function(e){(0,i.setCode)(e.replace(/ /g,"-"))},a.render=function(){return this.props.hide?L:N(h.default,{tag:g.Tags.H1,title:I.default.Messages.VANITY_URL},void 0,N(E.default,{type:E.Types.DESCRIPTION,className:T.default.marginBottom8},void 0,I.default.Messages.VANITY_URL_HELP),N(E.default,{type:E.Types.DESCRIPTION,className:T.default.marginBottom20},void 0,I.default.Messages.VANITY_URL_HELP_CONFLICT),this.renderEditCard(),this.renderInfo())},r}(a.PureComponent);D.displayName="GuildSettingsVanityURL";var w=o.default.connectStores([d.default,f.default,c.default],(function(){return{vanityURLCode:f.default.vanityURLCode,vanityURLUses:f.default.vanityURLUses,originalVanityURLCode:f.default.originalVanityURLCode,guildId:d.default.getGuildId(),hasError:f.default.hasError(),hide:c.default.hideInstantInvites}}))(D);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.close=function(){a.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_VANITY_URL_CLOSE})},t.resetCode=function(){a.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_VANITY_URL_RESET})},t.setCode=function(e){a.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_VANITY_URL_SET,code:e})},t.saveCode=function(e,t){return r.default.patch({url:o.Endpoints.GUILD_VANITY_URL(e),body:{code:t},oldFormErrors:!0}).then((function(e){var t=e.body,n=t.code,r=t.uses;a.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_SET_VANITY_URL,code:n,uses:r})}),(function(){a.default.dispatch({type:o.ActionTypes.GUILD_SETTINGS_VANITY_URL_ERROR})}))};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(55)),l=s(n(7758)),u=s(n(370));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).setInputRef=function(e){n._inputRef=e},n.handleChange=function(e){(0,n.props.onChange)(e.currentTarget.value)},n.handleFocus=function(){n.setState({focused:!0})},n.handleBlur=function(){n.setState({focused:!1})},n.handleFocusInput=function(){null!=n._inputRef&&n._inputRef.focus()};var r=n.props.autoFocus;return n.state={focused:null!=r&&r},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e,t=this.state.focused,n=this.props,r=n.value,s=n.placeholder,d=n.error,c=n.className,p=n.maxLength,v=n.autoFocus,y=n.prefix;return f(i.default,{align:i.default.Align.CENTER,justify:i.default.Justify.START,className:(0,o.default)(l.default.prefixInput,c,(e={},e[l.default.focused]=t,e[l.default.error]=d,e)),onClick:this.handleFocusInput},void 0,f(i.default.Child,{grow:0,className:l.default.prefixInputPrefix},void 0,y),f(i.default.Child,{className:u.default.marginReset},void 0,a.createElement("input",{ref:this.setInputRef,className:l.default.prefixInputInput,value:r,placeholder:s,maxLength:p,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,autoFocus:v})))},r}(a.PureComponent);p.displayName="PrefixInput";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=A(n(0)),o=M(n(9)),i=M(n(8)),l=M(n(3)),u=M(n(8254)),s=M(n(8316)),d=M(n(8688)),f=n(180),c=M(n(10)),p=M(n(8255)),v=M(n(70)),y=M(n(160)),m=M(n(12)),_=M(n(55)),h=M(n(1159)),E=M(n(8267)),g=M(n(1165)),S=M(n(476)),O=M(n(681)),I=A(n(474)),T=A(n(159)),C=M(n(6)),b=M(n(370));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=P(s.default,{}),D=function(e){var t,r;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={internalEnabled:t.props.widgetEnabled,widgetEnabledProp:t.props.widgetEnabled},t.renderToggle=function(){return P(E.default,{className:b.default.marginBottom40,value:t.state.internalEnabled,onChange:t.handleToggleWidget},void 0,C.default.Messages.GUILD_SETTINGS_WIDGET_ENABLE_WIDGET)},t.handleToggleWidget=function(e){var n=t.props,r=n.guild,a=n.widgetChannelId;null!=r&&(t.setState({internalEnabled:e}),u.default.updateEmbed(r.id,e,a))},t.handleChannelSelect=function(e){var n=e.value,r=t.props,a=r.guild,o=r.widgetEnabled;null!=a&&u.default.updateEmbed(a.id,o,"NO_INSTANT_INVITE"!==n?n:null)},t}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,R(t,r),a.getDerivedStateFromProps=function(e,t){var n=e.widgetEnabled;return n!==t.widgetEnabledProp?{internalEnabled:n,widgetEnabledProp:n}:null};var l=a.prototype;return l.renderChannelSelect=function(e){var t=this.props.widgetChannelId,n=(0,i.default)(c.default.getMutableGuildChannels()).filter((function(t){return t.guild_id===e.id})).map((function(e){return{value:e.id,label:(0,f.computeChannelName)(e,m.default,v.default,!0)}})).value(),r={value:"NO_INSTANT_INVITE",label:C.default.Messages.NO_INSTANT_INVITE};n.unshift(r);var a=t||r;return P(S.default,{title:C.default.Messages.FORM_LABEL_INSTANT_INVITE_CHANNEL},void 0,P(h.default,{className:b.default.marginBottom20,options:n,value:a,onChange:this.handleChannelSelect,searchable:!1,clearable:!1}),P(I.default,{type:I.Types.DESCRIPTION},void 0,C.default.Messages.FORM_HELP_INSTANT_INVITE_CHANNEL))},l.renderAPIInfo=function(e){var t=""+location.protocol+window.GLOBAL_ENV.API_ENDPOINT+"/guilds/"+e.id+"/widget.json";return P(_.default,{},void 0,P(_.default.Child,{},void 0,P(S.default,{title:C.default.Messages.FORM_LABEL_SERVER_ID},void 0,P(d.default,{value:e.id}))),P(_.default.Child,{},void 0,P(S.default,{title:C.default.Messages.FORM_LABEL_JSON_API},void 0,P(d.default,{value:t}))))},l.renderWidget=function(e){var t='<iframe src="'+(""+location.protocol+window.GLOBAL_ENV.WIDGET_ENDPOINT+"?id="+e.id+"&theme=dark")+'" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>';return P(_.default,{direction:_.default.Direction.VERTICAL},void 0,P(T.default,{},void 0,C.default.Messages.FORM_LABEL_PREMADE_WIDGET),P(_.default,{},void 0,P(_.default.Child,{basis:"50%"},void 0,P(S.default,{},void 0,P(d.default,{value:t}),P(I.default,{type:I.Types.DESCRIPTION},void 0,C.default.Messages.GUILD_SETTINGS_WIDGET_EMBED_HELP.format()))),P(_.default.Child,{basis:"50%"},void 0,P("img",{"data-accessibility":"desaturate",alt:"",src:n(9917)}))))},l.render=function(){var e=this.props.guild;return null==e?null:this.props.hide?L:P(O.default,{tag:T.Tags.H1,title:C.default.Messages.GUILD_SETTINGS_TITLE_SERVER_WIDGET},void 0,this.renderToggle(),this.renderChannelSelect(e),P(g.default,{className:(0,o.default)(b.default.marginTop40,b.default.marginBottom40)}),this.renderAPIInfo(e),P(g.default,{className:(0,o.default)(b.default.marginTop40,b.default.marginBottom40)}),this.renderWidget(e))},a}(a.PureComponent);D.displayName="GuildSettingsWidget";var w=l.default.connectStores([p.default,y.default],(function(){var e=p.default.getProps();return{guild:e.guild,widgetChannelId:e.embedChannelId,widgetEnabled:e.embedEnabled,hide:y.default.enabled}}))(D);t.default=w},function(e,t,n){e.exports=n.p+"4697ec960e57790ad4f6251af4c246b4.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(23)),i=n(3),l=n(275),u=A(n(9919)),s=n(9920),d=A(n(9921)),f=n(9922),c=A(n(8255)),p=A(n(15)),v=A(n(29)),y=A(n(9181)),m=(n(131),A(n(681))),_=n(159),h=A(n(9182)),E=A(n(466)),g=n(41),S=A(n(47)),O=n(374),I=A(n(24)),T=A(n(93)),C=n(1),b=A(n(6)),M=A(n(7761)),N=A(n(9925));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){D(o,r,a,i,l,"next",e)}function l(e){D(o,r,a,i,l,"throw",e)}i(void 0)}))}}var j=function(){return L(m.default,{title:b.default.Messages.GUILD_MONETIZATION_TICKETING_INSIGHTS_SECTION},void 0,L(S.default,{className:M.default.enableTicketingDescription},void 0,b.default.Messages.GUILD_MONETIZATION_TICKETING_INSIGHTS_DESCRIPTION))};j.displayName="TicketingInsightsSection";var k=function(){return L("div",{className:M.default.ticketingEnabledContainer},void 0,L("img",{src:N.default,alt:"",className:M.default.ticketingEnabledIcon}),L("div",{},void 0,L(S.default,{className:M.default.ticketingEnabledTitle},void 0,b.default.Messages.GUILD_MONETIZATION_TICKETING_ENABLED_BADGE_TITLE),L(I.default,{color:I.default.Colors.HEADER_SECONDARY},void 0,b.default.Messages.GUILD_MONETIZATION_TICKETING_ENABLED_BADGE_SUBTITLE.format({URL:T.default.getSubmitRequestURL()}))))};k.displayName="TicketingEnabledBadge";var U=L(k,{}),G=function(){var e=a.useState(),t=e[0],n=e[1],r=(0,i.useStateFromStores)([c.default],(function(){return c.default.getGuildId()})),T=(0,i.useStateFromStores)([p.default],(function(){return p.default.getGuild(r)})),N=function(){var e=a.useState([]),t=e[0],n=e[1],r=a.useState(!1),o=r[0],i=r[1],l=function(){var e=w(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.prev=1,e.next=4,d.default.fetchTeams(!0);case 4:t=e.sent,n(t.body),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(1);case 10:i(!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}();return a.useEffect((function(){l()}),[]),{teams:t,loading:o}}().teams,A=function(){var e=a.useState(!1),t=e[0],n=e[1],r=a.useState(),o=r[0],i=r[1];return{createTicketingApplication:function(){var e=w(regeneratorRuntime.mark((function e(t,r){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),i(null),e.prev=2,e.next=5,u.default.createApplication({name:b.default.Messages.GUILD_MONETIZATION_APP_NAME.format({guildName:t.name}),guildId:t.id,type:s.ApplicationTypes.GUILD_MONETIZATION,teamId:r});case 5:e.next=12;break;case 7:e.prev=7,e.t0=e.catch(2),a=new l.APIError(e.t0),console.error(e.t0),i(a.getAnyErrorMessage());case 12:n(!1);case 13:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t,n){return e.apply(this,arguments)}}(),submitting:t,error:o}}(),P=A.createTicketingApplication,D=A.submitting,j=A.error,k=N.filter((function(e){return e.payout_account_status===f.PayoutAccountStatuses.ACTIVE})).map((function(e){return{label:e.name,value:e.id}})),G=function(){(0,o.default)(null!=T,"No guild provided"),(0,o.default)(null!=t,"No team selected"),P(T,t)},F=(null==T?void 0:T.hasFeature(C.GuildFeatures.TICKETED_EVENTS_ENABLED))||!1;return L(m.default,{tag:_.Tags.H1,title:b.default.Messages.GUILD_MONETIZATION_TICKETING_SETTINGS_PAGE_TITLE},void 0,L(I.default,{size:I.default.Sizes.SIZE_14,color:I.default.Colors.HEADER_SECONDARY,className:M.default.intro},void 0,b.default.Messages.GUILD_MONETIZATION_TICKETING_SETTINGS_PAGE_DESCRIPTION),F?a.createElement(a.Fragment,null,U,!1):L(m.default,{title:b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_SECTION_TITLE},void 0,L(I.default,{size:I.default.Sizes.SIZE_14,color:I.default.Colors.HEADER_SECONDARY,className:M.default.enableTicketingDescription},void 0,b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_DESCRIPTION.format({createTeamURL:C.MarketingURLs.DEVELOPER_PORTAL_TEAMS})),L("div",{className:M.default.selectTeamContainer},void 0,L(O.SingleSelect,{className:M.default.teamSelect,options:k,placeholder:b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_SELECT_PLACEHOLDER,value:t,isDisabled:0===k.length,onChange:function(e){return n(e)}}),L(v.default,{onClick:function(){var e;e=G,(0,g.openModal)((function(t){return a.createElement(E.default,R({confirmButtonColor:v.default.Colors.BRAND,confirmText:b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_CTA,cancelText:b.default.Messages.CANCEL,onConfirm:e},t),L("div",{className:M.default.confirmationBody},void 0,L(y.default,{Icon:h.default,className:M.default.confirmationIcon}),L(S.default,{size:S.default.Sizes.SIZE_24,className:M.default.confirmationHeader},void 0,b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_CONFIRMATION_TITLE),L(I.default,{size:I.default.Sizes.SIZE_16,color:I.default.Colors.HEADER_SECONDARY,className:M.default.confirmationBody},void 0,b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_CONFIRMATION_SUBTITLE)))}))},className:M.default.enableTicketingButton,submitting:D,disabled:null==t},void 0,b.default.Messages.GUILD_MONETIZATION_ENABLE_TICKETING_CTA)),null!=j&&L(I.default,{className:M.default.error},void 0,j)))};G.displayName="GuildSettingsTicketedEvents";var F=G;t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(14))&&r.__esModule?r:{default:r},o=n(1);var i={createApplication:function(e){var t=e.name,n=e.guildId,r=e.type,i=e.teamId;return a.default.post({url:o.Endpoints.APPLICATIONS,body:{name:t,type:r,guild_id:n,team_id:i}})}};t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationTypes=void 0,t.ApplicationTypes=r,function(e){e[e.GAME=1]="GAME",e[e.MUSIC=2]="MUSIC",e[e.GUILD_MONETIZATION=3]="GUILD_MONETIZATION"}(r||(t.ApplicationTypes=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(14))&&r.__esModule?r:{default:r},o=n(1);var i={fetchTeams:function(e){return void 0===e&&(e=!1),a.default.get({url:o.Endpoints.TEAMS,query:{include_payout_account_status:e}})}};t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PayoutAccountStatuses=void 0,t.PayoutAccountStatuses=r,function(e){e[e.UNSUBMITTED=1]="UNSUBMITTED",e[e.PENDING=2]="PENDING",e[e.ACTION_REQUIRED=3]="ACTION_REQUIRED",e[e.ACTIVE=4]="ACTIVE",e[e.BLOCKED=5]="BLOCKED",e[e.SUSPENDED=6]="SUSPENDED"}(r||(t.PayoutAccountStatuses=r={}))},function(e,t,n){e.exports=n.p+"605ae14dee1349dcc4e873f5fbf09a8d.svg"},function(e,t,n){e.exports=n.p+"03fb3f616aa0e2d40dfed558d3224cd7.svg"},function(e,t,n){e.exports=n.p+"fb62591562beffd61103a56078d7bd1d.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(2)),o=n(8838),i=s(n(9927)),l=n(41),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}var c,p,v=null;function y(e){null!=c&&e?c():null!=p&&p(),c=null,p=null}function m(){var e=!1;(0,l.openModal)((function(t){var n=t.onClose,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["onClose"]);return r.createElement(i.default,f({},a,{onClose:function(t){e=t,n()}}))}),{onCloseCallback:function(){(0,o.closeModal)(e)}})}var _={init:function(){a.default.subscribe(u.ActionTypes.PREMIUM_REQUIRED_MODAL_OPEN,(function(e){y(!1),v=e.context,c=e.resolve,p=e.reject,u.CURRENT_APP_CONTEXT===e.context&&m()})),a.default.subscribe(u.ActionTypes.PREMIUM_REQUIRED_MODAL_CLOSE,(function(e){var t=e.shouldContinue;v=null,y(t)})),a.default.subscribe(u.ActionTypes.OVERLAY_SET_INPUT_LOCKED,(function(e){e.locked&&null!=v&&(v=null,y(!1))}))}};t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(3)),i=d(n(5993)),l=d(n(12)),u=d(n(96)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.render=function(){var e=this.props,t=e.user,n=e.transitionState,r=e.onClose;return c(i.default,{transitionState:n,"aria-label":s.default.Messages.PREMIUM_REQUIRED},void 0,c(i.default.Header,{onClose:function(){return r(!1)}},void 0,s.default.Messages.PREMIUM_REQUIRED),c(i.default.Content,{type:i.default.Types.UPGRADE},void 0,t.premiumType&&!u.default.canInstallPremiumApplications(t)?s.default.Messages.PREMIUM_UPGRADE_REQUIRED_BODY:s.default.Messages.PREMIUM_SUBSCRIPTION_REQUIRED_BODY),c(i.default.Footer,{primary:{onClick:function(){return r(!0)},label:s.default.Messages.PREMIUM_REQUIRED_GET_NITRO}}))},r}(a.Component);v.displayName="PremiumRequiredModal";var y=o.default.connectStores([l.default],(function(){return{user:l.default.getCurrentUser()}}))(v);t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(2)),o=n(8615),i=s(n(9929)),l=n(41),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}var c,p,v=null,y=null;function m(e){null!=c&&null!=v?c(v):null!=p&&p(e),c=null,p=null}function _(e,t,n,a){var s=null;(0,l.openModal)((function(o){var l=o.onClose,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(o,["onClose"]);return r.createElement(i.default,f({},d,{onClose:function(e){void 0===e&&(e=null),s=e,l()},applicationId:t,skuId:n,analyticsSource:a,isIAP:e===u.AppContext.OVERLAY}))}),{onCloseCallback:function(){(0,o.closePurchaseConfirmationModal)(s)}})}var h={init:function(){a.default.subscribe(u.ActionTypes.PURCHASE_CONFIRMATION_MODAL_OPEN,(function(e){m(),y=e.context,v=e.entitlements,c=e.resolve,p=e.reject,u.CURRENT_APP_CONTEXT===e.context&&_(e.context,e.applicationId,e.skuId,e.analyticsSource)})),a.default.subscribe(u.ActionTypes.PURCHASE_CONFIRMATION_MODAL_CLOSE,(function(e){var t=e.error;y=null,m(t)})),a.default.subscribe(u.ActionTypes.OVERLAY_SET_INPUT_LOCKED,(function(e){e.locked&&null!=y&&(y=null,m())}))}};t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(3)),i=n(5672),l=E(n(8888)),u=E(n(71)),s=E(n(373)),d=E(n(55)),f=E(n(1346)),c=n(35),p=E(n(13)),v=E(n(8889)),y=n(8890),m=n(1),_=E(n(7370)),h=E(n(5838));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.application,n=e.skuId,r=e.sku,a=e.onClose;null==r?(0,i.fetchSKU)(t.id,n).catch((function(e){return a(e.message)})):this.track(r)},a.componentDidUpdate=function(e){var t=this.props.sku;t!==e.sku&&null!=t&&this.track(t)},a.track=function(e){var t=this.props.analyticsSource;p.default.track(m.AnalyticEvents.OPEN_MODAL,{type:"Application Entitlement Confirmation",source:t,application_id:e.applicationId,sku_id:e.id})},a.render=function(){var e=this.props,t=e.sku,n=e.application,r=e.onClose,a=e.isIAP,o=e.transitionState,i=null!=t?(0,y.getSkuHeaderText)(a,t.type):null;return S(c.ModalRoot,{transitionState:o,size:c.ModalSize.SMALL,"aria-label":i,className:h.default.modal},void 0,S(l.default,{application:n,splashSize:880}),S(f.default.Content,{className:h.default.content},void 0,S(d.default,{direction:d.default.Direction.VERTICAL,className:_.default.confirmContent},void 0,S(c.ModalCloseButton,{onClick:function(){return r()},className:_.default.confirmCloseButton}),null!=t?S(v.default,{application:n,sku:t,isIAP:a,onClose:function(){return r()}}):null)))},r}(a.Component);I.displayName="PurchaseConfirmationModal";var T=o.default.connectStores([u.default,s.default],(function(e){var t=e.applicationId,n=e.skuId;return{application:u.default.getGame(t),sku:s.default.get(n)}}))(I);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){void 0===e&&(e=1);var t=a.default.getState().guildId;null==t?function(e){var t=a.default.getState(),n=t.channelId,r=t.path,o=t.basePath,i=u.default.getPrivateChannelIds(),s=__OVERLAY__?i:[].concat(p(),i),c=(null==n?(y=r||o,p().findIndex((function(e){return y.startsWith(e)}))):null!=n?s.indexOf(n):0)+e;var y;c>=s.length?c=0:c<0&&(c=s.length-1);var m=s[c];p().includes(m)?(_=m,h=l.default.getCurrentRoute(),_===f.Routes.APPLICATION_STORE&&null!=h?(0,d.transitionToPage)(h):(0,d.transitionToPage)(_)):v(f.ME,m);var _,h}(e):function(e,t){var n=a.default.getState().channelId,o=(0,r.default)(t).map((function(e){return e.channel.id})),i=function(e,t){if(e<0)return t-1;if(e>=t)return 0;return e}(o.indexOf(n)+e,o.length);v(t,o[i])}(e,t)};var r=c(n(8689)),a=c(n(5939)),o=c(n(120)),i=c(n(39)),l=c(n(9185)),u=c(n(699)),s=n(48),d=n(8356),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}var p=function(){return[f.Routes.FRIENDS,f.Routes.STAGE_DISCOVERY,o.default.hasLibraryApplication()&&!i.default.disableGamesTab?f.Routes.APPLICATION_LIBRARY:null,f.Routes.APPLICATION_STORE].filter(s.isNotNullish)};function v(e,t){(0,d.transitionToChannel)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CREATE_DM_GROUP=void 0;var r,a=n(8356),o=(r=n(107))&&r.__esModule?r:{default:r},i=n(121),l=n(1);var u={binds:["mod+shift+t"],comboKeysBindGlobal:!0,action:function(){return o.default.getGuildId()&&(0,a.transitionToChannel)(l.ME),i.ComponentDispatch.safeDispatch(l.ComponentActions.TOGGLE_DM_CREATE),!1}};t.CREATE_DM_GROUP=u;var s={CREATE_DM_GROUP:u};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CREATE_GUILD=void 0;var r,a=(r=n(8548))&&r.__esModule?r:{default:r},o=n(8588),i=n(41);var l={binds:["mod+shift+n"],comboKeysBindGlobal:!0,action:function(){(0,i.hasModalOpen)(a.default.CREATE_GUILD_MODAL_KEY)?a.default.updateCreateGuildModal({slide:o.CreateGuildSlideTypes.JOIN_GUILD,location:"Keyboard Shortcut"}):a.default.openCreateGuildModal({location:"Keyboard Shortcut"})}};t.CREATE_GUILD=l;var u={CREATE_GUILD:l};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOCUS_SEARCH=void 0;var r=n(121),a=n(1),o={binds:["mod+f"],comboKeysBindGlobal:!0,action:function(e){e.preventDefault(),e.stopPropagation(),r.ComponentDispatch.dispatch(a.ComponentActions.FOCUS_SEARCH,{prefillCurrentChannel:!0})}};t.FOCUS_SEARCH=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JUMP_TO_CURRENT_CALL=void 0;var r,a=n(8356),o=(r=n(94))&&r.__esModule?r:{default:r},i=n(1);var l={binds:["mod+shift+alt+v"],comboKeysBindGlobal:!0,action:function(e){e.preventDefault(),e.stopPropagation();var t=o.default.getGuildId(),n=o.default.getChannelId();return n&&(0,a.transitionToChannel)(null!=t?t:i.ME,n),!1}};t.JUMP_TO_CURRENT_CALL=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SEARCH_GIFS=void 0;var r=n(121),a=n(1),o={binds:["mod+g"],comboKeysBindGlobal:!0,action:function(){return r.ComponentDispatch.dispatchToLastSubscribed(a.ComponentActions.TOGGLE_GIF_PICKER),!1}};t.SEARCH_GIFS=o;var i={SEARCH_GIFS:o};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SEARCH_STICKERS=void 0;var r=n(121),a=n(1),o={binds:["mod+s"],comboKeysBindGlobal:!0,action:function(){return r.ComponentDispatch.dispatchToLastSubscribed(a.ComponentActions.TOGGLE_STICKER_PICKER),!1}};t.SEARCH_STICKERS=o;var i={SEARCH_STICKERS:o};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(8)),a=d(n(5939)),o=d(n(36)),i=d(n(361)),l=d(n(8690)),u=n(8356),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}var f=r.default.throttle((function(e){void 0===e&&(e=1);var t,n=i.default.getFlattenedGuildIds(),r=a.default.getState().guildId,s=-1;if(r&&(s=n.indexOf(r)),-2===(s+=e)&&(s=n.length-1),s>=n.length||s<0)(0,u.transitionToPage)(l.default.getHomeLink());else{t=n[s];var d=o.default.getChannelId(t);(0,u.transitionToChannel)(t,d===t?null:d,!1)}}),s.NAVIGATION_THROTTLE);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TOGGLE_CHANNEL_PINS=void 0;var r=n(121),a=n(1),o={binds:["mod+p"],comboKeysBindGlobal:!0,action:function(){return r.ComponentDispatch.dispatch(a.ComponentActions.TOGGLE_CHANNEL_PINS),!1}};t.TOGGLE_CHANNEL_PINS=o;var i={TOGGLE_CHANNEL_PINS:o};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TOGGLE_HELP=void 0;var r=n(93),a={binds:["mod+shift+h","f1"],comboKeysBindGlobal:!0,action:function(){return window.open(r.SUPPORT_LOCATION),!1}};t.TOGGLE_HELP=a;var o={TOGGLE_HELP:a};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MARK_TOP_INBOX_CHANNEL_READ=t.TOGGLE_INBOX_UNREADS_TAB=void 0;var r,a=(r=n(8))&&r.__esModule?r:{default:r},o=n(121),i=n(1);var l={binds:["mod+i"],comboKeysBindGlobal:!0,action:function(){return o.ComponentDispatch.dispatch(i.ComponentActions.TOGGLE_INBOX_UNREADS_TAB),!1}};t.TOGGLE_INBOX_UNREADS_TAB=l;var u={binds:["mod+shift+e"],comboKeysBindGlobal:!0,action:a.default.debounce((function(){if(o.ComponentDispatch.hasSubscribers(i.ComponentActions.MARK_TOP_INBOX_CHANNEL_READ))return o.ComponentDispatch.dispatch(i.ComponentActions.MARK_TOP_INBOX_CHANNEL_READ),!1}),100,{leading:!0})};t.MARK_TOP_INBOX_CHANNEL_READ=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TOGGLE_USERS=void 0;var r,a=(r=n(9186))&&r.__esModule?r:{default:r};var o={binds:["mod+u"],comboKeysBindGlobal:!0,action:function(){return a.default.toggleMembersSection(),!1}};t.TOGGLE_USERS=o;var i={TOGGLE_USERS:o};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(8)),a=f(n(8689)),o=f(n(5939)),i=f(n(361)),l=f(n(699)),u=n(121),s=n(8356),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e){return e===d.ME?l.default.getPrivateChannelIds():(0,a.default)(e).map((function(e){return e.channel.id}))}var p=r.default.throttle((function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=function(e,t){return!0}),void 0===n&&(n=function(e){return!0});for(var r,a=o.default.getState().guildId||d.ME,l=o.default.getState().channelId,f=function(e,t){var n=[d.ME].concat(i.default.getFlattenedGuildIds()),r=n.indexOf(e);return t>0?n.slice(r).concat(n.slice(0,r),e):(n.splice(r,0,e),n.slice(r+1).concat(n.slice(0,r+1)))}(a,e),p=e>0?0:f.length-1,v=c(a),y=v.indexOf(l)+e;a;){if(r=v[y],n(a))for(;r;){if(t(a,r))return(0,s.transitionToChannel)(a,r);r=v[y+=e]}if(!(a=f[p+=e]))break;v=c(a),y=e<0?v.length-1:0}u.ComponentDispatch.dispatch(d.ComponentActions.SHAKE_APP,{duration:200,intensity:2})}),d.NAVIGATION_THROTTLE);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.UPLOAD_FILE=void 0;var r=l(n(10)),a=l(n(36)),o=n(121),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u={binds:["mod+shift+u"],comboKeysBindGlobal:!0,action:function(){var e=r.default.getChannel(a.default.getChannelId());return null==e||e.isManaged()||o.ComponentDispatch.dispatch(i.ComponentActions.UPLOAD_FILE),!1}};t.UPLOAD_FILE=u;var s={UPLOAD_FILE:u};t.default=s},function(e,t,n){e.exports=n.p+"a29b29d9bf5197674f91f77296aae66e.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(2)),o=u(n(11)),i=u(n(10)),l=n(8769);n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c={};function p(e,t){var n=c[e];return null!=n&&(!n.has(t)&&(c[e]=new Set(n.add(t)),!0))}var v=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.initialize=function(e){this.waitFor(o.default),c={},null!=e&&Object.keys(e).forEach((function(t){var n=e[t];null!=n&&"function"==typeof n[Symbol.iterator]&&(c[t]=new Set(n))}))},a.getProgress=function(e){return c[e]},a.hasProgress=function(e){var t=c[e];return null!=t&&!t.has(l.Steps.DISMISSED)},a.getState=function(){return c},r}(r.default.PersistedStore);v.persistKey="GuildProgressStore";var y=new v(a.default,{CONNECTION_OPEN:function(e){return t=[],Object.keys(c).forEach((function(e){c[e].has(l.Steps.COMPLETED)&&t.push(e)})),void t.forEach((function(e){return p(e,l.Steps.DISMISSED)}));var t},GUILD_PROGRESS_INITIALIZE:function(e){var t=e.guildId;null==c[t]&&(c[t]=new Set),c[t].has(l.Steps.COMPLETED)||c[t].delete(l.Steps.DISMISSED)},GUILD_PROGRESS_COMPLETED_SEEN:function(e){var t=e.guildId;if(null==c[t])return!1;c[t]=new Set(c[t].add(l.Steps.COMPLETED))},GUILD_PROGRESS_DISMISS:function(e){return p(e.guildId,l.Steps.DISMISSED)},GUILD_CREATE:function(e){var t=e.guild;t.owner_id===o.default.getId()&&null!=c[t.id]&&(null!=t.icon&&c[t.id].add(l.Steps.AVATAR),t.member_count>1&&c[t.id].add(l.Steps.INVITE))},CHANNEL_CREATE:function(e){var t=e.channel;return null!=t&&null!=t.guild_id&&null!=c[t.guild_id]&&p(t.guild_id,l.Steps.CHANNEL)},CHANNEL_UPDATES:function(e){for(var t,n=!1,r=d(e.updates);!(t=r()).done;){var a=t.value.channel;null!=a&&null!=a.guild_id&&null!=c[a.guild_id]&&!1!==p(a.guild_id,l.Steps.CHANNEL)&&(n=!0)}return n},GUILD_SETTINGS_SUBMIT_SUCCESS:function(e){var t=e.guild;return null!=t&&(null!=t.id&&null!=c[t.id]&&null!=t.icon&&p(t.id,l.Steps.AVATAR))},MESSAGE_CREATE:function(e){var t=e.channelId,n=e.message,r=i.default.getChannel(t);return n.author.id===o.default.getId()&&null!=r&&null!=c[r.guild_id]&&p(r.guild_id,l.Steps.MESSAGE)},GUILD_MEMBER_LIST_UPDATE:function(e){var t=e.guildId,n=e.memberCount;return null!=c[t]&&n>1&&p(t,l.Steps.INVITE)}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=Object.freeze({"voice-conversations":{popoutOffset:{x:45,y:0}},"writing-messages":{prerequisites:["voice-conversations"],popoutOffset:{x:-36,y:0}},"direct-messages":{popoutOffset:{x:50,y:0}},"create-first-server":{popoutOffset:{x:45,y:0}},"organize-by-topic":{popoutOffset:{x:50,y:0}},"instant-invite":{prerequisites:["organize-by-topic"],popoutOffset:{x:-10,y:0}},"whos-online":{prerequisites:["instant-invite"],popoutOffset:{x:-50,y:0}},"server-settings":{prerequisites:["instant-invite"],popoutOffset:{y:32,x:0}},"friends-list":{prerequisites:["instant-invite"],popoutOffset:{x:45,y:0}},"create-more-servers":{prerequisites:["server-settings"],popoutOffset:{x:45,y:0}}});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=m(n(0)),i=v(n(9)),l=v(n(13)),u=m(n(29)),s=v(n(55)),d=v(n(8382)),f=n(1),c=v(n(6)),p=v(n(7763));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e.CENTER="center",e.LEFT="left"}(a||(a={}));var S=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={confirmed:!1},t.handleDismiss=function(){var e=t.props.onClickComplete;t.setState({confirmed:!0},(function(){return e&&e()}))},t}E(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props.uniqueId;l.default.track(f.AnalyticEvents.SHOW_TUTORIAL,{tutorial:e})},n.componentWillUnmount=function(){l.default.track(f.AnalyticEvents.CLOSE_TUTORIAL,{tutorial:this.props.uniqueId,acknowledged:this.state.confirmed})},n.render=function(){var e,t,n=this.props,r=n.renderMedia,l=n.textAlign,d=n.isLongText,v=n.title,y=n.body,m=n.forceTheme,_=n.onClickSkipAll,E="string"==typeof y?"p":"div",g=l===a.LEFT||d,S=l===a.CENTER||!g;return h(o.Fragment,{},void 0,null!=r&&h(s.default,{className:p.default.mediaContainer,justify:g?s.default.Justify.START:s.default.Justify.CENTER},void 0,r()),h("h4",{className:(0,i.default)((e={},e[p.default.titleCenter]=S,e[p.default.titleLeft]=g,e))},void 0,v),h(E,{className:(0,i.default)((t={},t[p.default.bodyCenter]=S,t[p.default.bodyLeft]=g,t))},void 0,y),h(s.default,{className:p.default.buttonContainer,justify:g?s.default.Justify.BETWEEN:s.default.Justify.CENTER},void 0,h(u.default,{size:u.ButtonSizes.SMALL,onClick:this.handleDismiss},void 0,c.default.Messages.TUTORIAL_CLOSE),h(u.default,{size:u.ButtonSizes.SMALL,look:u.default.Looks.BLANK,onClick:_,color:m===f.ThemeTypes.LIGHT?u.default.Colors.PRIMARY:u.default.Colors.WHITE,className:g?p.default.buttonSkipLeftAlign:p.default.buttonSkipCenterAlign},void 0,c.default.Messages.SKIP_ALL_TIPS)))},t}(o.PureComponent);S.displayName="TutorialPopoutContent";var O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).popoutRef=o.createRef(),t.onClickComplete=function(){t.popoutRef.current&&t.popoutRef.current.close(),t.props.onComplete()},t.onClickSkipAll=function(){var e=t.props,n=e.onSkipAll,r=e.uniqueId;t.popoutRef.current&&t.popoutRef.current.close(),n(),l.default.track(f.AnalyticEvents.DISMISS_ALL_TUTORIALS,{tutorial:r})},t.renderChildren=function(){return o.createElement(S,_({},t.props,{onClickComplete:t.onClickComplete,onClickSkipAll:t.onClickSkipAll}))},t}return E(t,e),t.prototype.render=function(){var e,t=this.props,n=t.renderMedia,r=(t.textAlign,t.onComplete,t.onSkipAll,t.isLongText),a=(t.title,t.body,t.forceTheme),l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["renderMedia","textAlign","onComplete","onSkipAll","isLongText","title","body","forceTheme"]),u=null!=n;return o.createElement(d.default,_({forceTheme:a,ref:this.popoutRef},l,{render:this.renderChildren,containerClass:(0,i.default)((e={},e[p.default.topArrow]=l.position===d.default.Positions.BOTTOM,e[p.default.contentNarrowNoMedia]=!r&&!u,e[p.default.contentNarrowWithMedia]=!r&&u,e[p.default.contentWideNoMedia]=r&&!u,e[p.default.contentWideWithMedia]=r&&u,e[p.default.leftArrow]=l.position===d.default.Positions.RIGHT,e[p.default.rightArrow]=l.position===d.default.Positions.LEFT,e))}))},t}(o.PureComponent);t.default=O,O.displayName="TutorialPopout",O.TextAlignments=a,O.defaultProps={textAlign:a.LEFT}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTutorialPopoutAttributes=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9949)),o=l(n(9950)),i=l(n(9951));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s(o.default,{}),f=s(i.default,{}),c=s(a.default,{}),p=Object.freeze({"voice-conversations":{popoutPosition:"right",highPriority:!0,textAlign:"center",media:function(){return d}},"writing-messages":{popoutPosition:"top",highPriority:!0,textAlign:"center",media:function(){return f}},"direct-messages":{popoutPosition:"right"},"create-first-server":{popoutPosition:"right",highPriority:!0},"organize-by-topic":{popoutPosition:"right",textAlign:"center",media:function(){return c}},"instant-invite":{popoutPosition:"right",highPriority:!0},"whos-online":{popoutPosition:"left"},"server-settings":{popoutPosition:"bottom"},"friends-list":{popoutPosition:"right"},"create-more-servers":{popoutPosition:"right"}});t.getTutorialPopoutAttributes=function(e){return e in p?p[e]:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(7764)),o=l(n(9019)),i=l(n(9020));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("svg",{width:"224",height:"148",viewBox:"0 0 224 148",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,s("path",{d:"M0.5 33.5H223.5V140C223.5 144.142 220.142 147.5 216 147.5H8C3.85786 147.5 0.5 144.142 0.5 140V33.5Z",fill:"#F2F3F4",stroke:"#E3E5E8"}),s("circle",{cx:"28",cy:"120",r:"16",fill:"url(#tutorial-media-channels-image1)"}),s("path",{d:"M62.104 116L61.468 107.72H59.488L57.4 113.96L55.3 107.72H53.284L52.648 116H54.076L54.496 109.892L56.584 116.024H58L60.076 109.892L60.52 116H62.104ZM65.7704 111.08C66.4664 111.08 66.8264 111.584 66.9224 112.484H64.6064C64.7144 111.548 65.1944 111.08 65.7704 111.08ZM68.3144 115.412L68.1464 114.284C67.5104 114.728 66.8984 115.004 66.1544 115.004C65.2664 115.004 64.6544 114.512 64.5944 113.384H68.3144C68.3144 113.3 68.3264 113.156 68.3264 113.036C68.3264 111.392 67.5464 110.084 65.8064 110.084C64.2944 110.084 63.1664 111.224 63.1664 113.108C63.1664 115.196 64.3784 116.12 65.9984 116.12C66.9344 116.12 67.6904 115.844 68.3144 115.412ZM72.6338 112.088C72.6338 112.724 72.2498 113.192 71.6138 113.192C70.9898 113.192 70.6058 112.736 70.6058 112.136C70.6058 111.5 70.9778 111.008 71.6138 111.008C72.2258 111.008 72.6338 111.476 72.6338 112.088ZM74.6858 116.24C74.6858 115.352 73.9418 114.98 72.7538 114.812L72.0098 114.74C71.1098 114.608 70.9298 114.56 70.9298 114.368C70.9298 114.272 71.0258 114.164 71.1698 114.056C71.3138 114.08 71.4698 114.092 71.6378 114.092C72.8858 114.092 73.9538 113.348 73.9538 112.1C73.9538 111.836 73.9058 111.572 73.7978 111.344L74.8538 111.272L74.6618 110.12L73.2458 110.624C72.8258 110.276 72.2738 110.084 71.6018 110.084C70.3058 110.084 69.2738 110.864 69.2738 112.136C69.2738 112.904 69.6818 113.504 70.3658 113.828C69.8858 114.116 69.6338 114.428 69.6338 114.752C69.6338 114.98 69.7418 115.196 69.9698 115.376C69.2498 115.784 68.8778 116.204 68.8778 116.744C68.8778 117.704 70.0658 118.184 71.6378 118.184C73.3178 118.184 74.6858 117.488 74.6858 116.24ZM71.7338 117.332C70.6418 117.332 70.1258 117.02 70.1258 116.588C70.1258 116.288 70.3178 116.012 70.7378 115.712C71.0258 115.772 71.2058 115.808 71.6018 115.856L72.3818 115.952C73.1018 116.06 73.3538 116.24 73.3538 116.552C73.3538 116.984 72.7658 117.332 71.7338 117.332ZM78.8219 114.404C78.4259 114.788 77.9579 115.028 77.4659 115.028C77.0219 115.028 76.7579 114.776 76.7579 114.356C76.7579 113.804 77.1539 113.312 78.8219 113.108V114.404ZM80.2619 116V112.028C80.2619 110.636 79.5179 110.084 78.0179 110.084C77.0939 110.084 76.3859 110.288 75.7139 110.552L75.8939 111.704C76.5179 111.428 77.1539 111.236 77.8259 111.236C78.4619 111.236 78.8219 111.476 78.8219 112.1V112.268C76.4819 112.496 75.3299 113.108 75.3299 114.512C75.3299 115.52 75.9899 116.12 76.9739 116.12C77.8379 116.12 78.4379 115.736 78.9059 115.244L79.0259 116H80.2619ZM86.633 116V111.824C86.633 110.744 86.057 110.084 84.977 110.084C84.197 110.084 83.585 110.504 83.045 111.02L82.913 110.204H81.689V116H83.129V112.088C83.549 111.644 84.005 111.356 84.449 111.356C84.977 111.356 85.193 111.704 85.193 112.208V116H86.633Z",fill:"#060607"}),s("path",{d:"M62.02 132L61.372 123.72H59.992L57.412 130.512L54.832 123.72H53.44L52.78 132H53.836L54.34 125.316L56.932 132.036H57.832L60.424 125.316L60.94 132H62.02ZM65.8287 126.996C66.6567 126.996 67.0647 127.524 67.1967 128.448H64.4367C64.6047 127.476 65.1687 126.996 65.8287 126.996ZM68.2647 131.352L68.1087 130.392C67.4847 130.884 66.8847 131.208 66.0567 131.208C65.0607 131.208 64.4367 130.584 64.3887 129.252H68.2767V129.024C68.2767 127.44 67.5087 126.156 65.8407 126.156C64.4007 126.156 63.3207 127.284 63.3207 129.12C63.3207 131.22 64.4847 132.12 65.9727 132.12C66.9207 132.12 67.6527 131.832 68.2647 131.352ZM71.073 123.72H69.789L70.077 129.54L70.773 129.384L71.073 123.72ZM71.025 132V130.572H69.825V132H71.025ZM84.7192 132L84.0712 123.72H82.6912L80.1112 130.512L77.5312 123.72H76.1392L75.4792 132H76.5352L77.0392 125.316L79.6312 132.036H80.5312L83.1232 125.316L83.6392 132H84.7192ZM89.6079 130.428C89.1279 130.92 88.5279 131.232 87.9039 131.232C87.3639 131.232 87.0519 130.932 87.0519 130.464C87.0519 129.876 87.4959 129.3 89.6079 129.096V130.428ZM90.6759 132V127.992C90.6759 126.72 90.0039 126.156 88.6119 126.156C87.7239 126.156 87.0759 126.36 86.3919 126.636L86.5359 127.56C87.1599 127.284 87.8199 127.068 88.5159 127.068C89.1759 127.068 89.6079 127.32 89.6079 128.04V128.28C87.2199 128.532 85.9959 129.096 85.9959 130.524C85.9959 131.496 86.6439 132.12 87.6759 132.12C88.6119 132.12 89.2359 131.7 89.6919 131.232L89.8119 132H90.6759ZM92.6347 134.184C93.4747 134.184 94.0987 133.872 94.5667 132.6L96.9067 126.276H95.7907L94.2907 130.728L92.7547 126.192L91.6747 126.36L93.7627 132.024L93.6187 132.408C93.3907 133.02 93.0667 133.248 92.5867 133.248C92.4187 133.248 92.2027 133.212 92.0227 133.164L92.1787 134.136C92.2867 134.16 92.4067 134.184 92.6347 134.184ZM103.068 128.976C103.068 127.068 102.048 126.156 100.812 126.156C100.032 126.156 99.4795 126.552 99.0955 126.948V123.336L98.0275 123.504V131.712C98.7835 131.94 99.3955 132.072 100.26 132.072C101.916 132.072 103.068 131.064 103.068 128.976ZM101.988 129.024C101.988 130.5 101.364 131.16 100.248 131.16C99.7195 131.16 99.4555 131.1 99.0955 130.968V128.04C99.5275 127.5 100.056 127.104 100.656 127.104C101.424 127.104 101.988 127.776 101.988 129.024ZM106.61 126.996C107.438 126.996 107.846 127.524 107.978 128.448H105.218C105.386 127.476 105.95 126.996 106.61 126.996ZM109.046 131.352L108.89 130.392C108.266 130.884 107.666 131.208 106.838 131.208C105.842 131.208 105.218 130.584 105.17 129.252H109.058V129.024C109.058 127.44 108.29 126.156 106.622 126.156C105.182 126.156 104.102 127.284 104.102 129.12C104.102 131.22 105.266 132.12 106.754 132.12C107.702 132.12 108.434 131.832 109.046 131.352ZM117.779 129.768C117.779 128.52 117.227 127.968 115.619 127.236C114.359 126.66 114.047 126.36 114.047 125.724C114.047 125.112 114.467 124.608 115.415 124.608C116.075 124.608 116.699 124.872 117.155 125.22L117.335 124.092C116.855 123.816 116.255 123.624 115.451 123.624C113.951 123.624 112.931 124.476 112.931 125.808C112.931 126.996 113.519 127.512 115.079 128.22C116.327 128.784 116.663 129.096 116.663 129.852C116.663 130.656 116.051 131.112 115.187 131.112C114.359 131.112 113.579 130.776 113.015 130.404L112.847 131.556C113.459 131.88 114.263 132.096 115.163 132.096C116.711 132.096 117.779 131.196 117.779 129.768ZM122.456 130.428C121.976 130.92 121.376 131.232 120.752 131.232C120.212 131.232 119.9 130.932 119.9 130.464C119.9 129.876 120.344 129.3 122.456 129.096V130.428ZM123.524 132V127.992C123.524 126.72 122.852 126.156 121.46 126.156C120.572 126.156 119.924 126.36 119.24 126.636L119.384 127.56C120.008 127.284 120.668 127.068 121.364 127.068C122.024 127.068 122.456 127.32 122.456 128.04V128.28C120.068 128.532 118.844 129.096 118.844 130.524C118.844 131.496 119.492 132.12 120.524 132.12C121.46 132.12 122.084 131.7 122.54 131.232L122.66 132H123.524ZM127.928 132.024L127.784 131.112C127.652 131.136 127.484 131.148 127.292 131.148C126.692 131.148 126.5 130.86 126.5 130.392V127.176H127.88L127.736 126.276H126.5V124.212L125.456 124.368V126.276H124.592V127.176H125.456V130.584C125.456 131.736 126.116 132.096 127.124 132.096C127.496 132.096 127.748 132.06 127.928 132.024ZM129.199 126.276V130.44C129.199 131.472 129.763 132.12 130.855 132.12C131.659 132.12 132.343 131.676 132.883 131.172L133.015 132H133.867V126.276H132.799V130.236C132.283 130.788 131.707 131.16 131.143 131.16C130.519 131.16 130.267 130.764 130.267 130.176V126.276H129.199ZM138.755 127.176L138.587 126.156C137.651 126.204 136.991 126.792 136.583 127.44L136.403 126.276H135.551V132H136.619V128.616C137.003 127.86 137.807 127.224 138.755 127.176ZM140.397 129.252C140.397 127.836 141.045 127.104 141.945 127.104C142.557 127.104 142.905 127.2 143.349 127.428V130.164C142.893 130.776 142.389 131.172 141.729 131.172C140.961 131.172 140.397 130.512 140.397 129.252ZM139.317 129.3C139.317 131.22 140.337 132.12 141.573 132.12C142.413 132.12 143.001 131.688 143.433 131.172L143.565 132H144.417V123.336L143.349 123.504V126.456C142.989 126.312 142.473 126.204 141.909 126.204C140.517 126.204 139.317 127.212 139.317 129.3ZM149.362 130.428C148.882 130.92 148.282 131.232 147.658 131.232C147.118 131.232 146.806 130.932 146.806 130.464C146.806 129.876 147.25 129.3 149.362 129.096V130.428ZM150.43 132V127.992C150.43 126.72 149.758 126.156 148.366 126.156C147.478 126.156 146.83 126.36 146.146 126.636L146.29 127.56C146.914 127.284 147.574 127.068 148.27 127.068C148.93 127.068 149.362 127.32 149.362 128.04V128.28C146.974 128.532 145.75 129.096 145.75 130.524C145.75 131.496 146.398 132.12 147.43 132.12C148.366 132.12 148.99 131.7 149.446 131.232L149.566 132H150.43ZM152.389 134.184C153.229 134.184 153.853 133.872 154.321 132.6L156.661 126.276H155.545L154.045 130.728L152.509 126.192L151.429 126.36L153.517 132.024L153.373 132.408C153.145 133.02 152.821 133.248 152.341 133.248C152.173 133.248 151.957 133.212 151.777 133.164L151.933 134.136C152.041 134.16 152.161 134.184 152.389 134.184ZM159.19 129.54L159.886 129.384L159.994 128.196C161.422 127.548 162.286 126.984 162.286 125.688C162.286 124.38 161.29 123.564 159.826 123.564C158.842 123.564 157.99 123.912 157.258 124.452L157.414 125.556C158.086 125.004 158.83 124.584 159.766 124.584C160.57 124.584 161.158 125.004 161.158 125.736C161.158 126.504 160.654 126.888 159.526 127.356L159.034 127.56L159.19 129.54ZM158.938 132H160.138V130.572H158.938V132Z",fill:"#2E3338"}),s("path",{d:"M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H216C220.142 0.5 223.5 3.85786 223.5 8V33.5H0.5V8Z",fill:"#F2F3F4",stroke:"#E3E5E8"}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5641 23.75C12.253 23.75 12.0174 23.4689 12.0718 23.1626L12.5 20.75H10.0951C9.78449 20.75 9.54905 20.4698 9.60259 20.1638L9.69009 19.6638C9.73196 19.4246 9.93972 19.25 10.1826 19.25H12.7625L13.5575 14.75H11.1526C10.842 14.75 10.6065 14.4698 10.6601 14.1638L10.7476 13.6638C10.7895 13.4246 10.9972 13.25 11.2401 13.25H13.82L14.2793 10.6626C14.3216 10.4239 14.5291 10.25 14.7716 10.25H15.2559C15.567 10.25 15.8026 10.5311 15.7482 10.8374L15.32 13.25H19.82L20.2793 10.6626C20.3216 10.4239 20.5291 10.25 20.7716 10.25H21.2559C21.567 10.25 21.8026 10.5311 21.7482 10.8374L21.32 13.25H23.7249C24.0355 13.25 24.271 13.5302 24.2174 13.8362L24.1299 14.3362C24.0881 14.5754 23.8803 14.75 23.6374 14.75H21.0575L20.2625 19.25H22.6674C22.978 19.25 23.2135 19.5302 23.1599 19.8362L23.0724 20.3362C23.0306 20.5754 22.8228 20.75 22.5799 20.75H20L19.5407 23.3374C19.4984 23.5761 19.2909 23.75 19.0484 23.75H18.5641C18.253 23.75 18.0174 23.4689 18.0718 23.1626L18.5 20.75H14L13.5407 23.3374C13.4984 23.5761 13.2909 23.75 13.0484 23.75H12.5641ZM15.0578 14.75L14.2628 19.25H18.7628L19.5578 14.75H15.0578Z",fill:"#4F5660"}),s("path",{d:"M41.014 22V17.128C41.014 15.868 40.384 15.098 39.11 15.098C38.2 15.098 37.458 15.588 36.856 16.19C36.604 15.532 36.086 15.098 35.12 15.098C34.21 15.098 33.524 15.588 32.894 16.19L32.74 15.238H31.312V22H32.992V17.422C33.482 16.918 33.972 16.582 34.49 16.582C35.106 16.582 35.33 16.988 35.33 17.576V22H37.01V17.422C37.5 16.918 37.99 16.582 38.508 16.582C39.124 16.582 39.334 16.988 39.334 17.576V22H41.014ZM46.3967 20.138C45.9347 20.586 45.3887 20.866 44.8147 20.866C44.2967 20.866 43.9887 20.572 43.9887 20.082C43.9887 19.438 44.4507 18.864 46.3967 18.626V20.138ZM48.0767 22V17.366C48.0767 15.742 47.2087 15.098 45.4587 15.098C44.3807 15.098 43.5547 15.336 42.7707 15.644L42.9807 16.988C43.7087 16.666 44.4507 16.442 45.2347 16.442C45.9767 16.442 46.3967 16.722 46.3967 17.45V17.646C43.6667 17.912 42.3227 18.626 42.3227 20.264C42.3227 21.44 43.0927 22.14 44.2407 22.14C45.2487 22.14 45.9487 21.692 46.4947 21.118L46.6347 22H48.0767ZM53.8857 22.098L55.6777 21.832L53.0317 18.29L55.5237 15.238H53.6197L51.4217 18.038V11.892L49.7417 12.158V22H51.4217V18.64L53.8857 22.098ZM59.1699 16.26C59.9819 16.26 60.4019 16.848 60.5139 17.898H57.8119C57.9379 16.806 58.4979 16.26 59.1699 16.26ZM62.1379 21.314L61.9419 19.998C61.1999 20.516 60.4859 20.838 59.6179 20.838C58.5819 20.838 57.8679 20.264 57.7979 18.948H62.1379C62.1379 18.85 62.1519 18.682 62.1519 18.542C62.1519 16.624 61.2419 15.098 59.2119 15.098C57.4479 15.098 56.1319 16.428 56.1319 18.626C56.1319 21.062 57.5459 22.14 59.4359 22.14C60.5279 22.14 61.4099 21.818 62.1379 21.314ZM66.9533 18.78V17.156H63.3133V18.78H66.9533ZM72.9665 18.528C72.9665 20.012 72.3085 20.726 71.4405 20.726C70.8665 20.726 70.5445 20.628 70.1385 20.432V17.534C70.5865 16.96 71.0625 16.582 71.6645 16.582C72.4205 16.582 72.9665 17.226 72.9665 18.528ZM74.6605 18.43C74.6605 16.162 73.5265 15.098 72.1125 15.098C71.1745 15.098 70.5165 15.616 70.0405 16.162L69.8865 15.238H68.4585V24.604L70.1385 24.352V21.804C70.5445 21.958 71.0625 22.07 71.7065 22.07C73.2605 22.07 74.6605 20.95 74.6605 18.43ZM77.7827 22V11.892L76.1027 12.158V22H77.7827ZM83.2561 20.138C82.7941 20.586 82.2481 20.866 81.6741 20.866C81.1561 20.866 80.8481 20.572 80.8481 20.082C80.8481 19.438 81.3101 18.864 83.2561 18.626V20.138ZM84.9361 22V17.366C84.9361 15.742 84.0681 15.098 82.3181 15.098C81.2401 15.098 80.4141 15.336 79.6301 15.644L79.8401 16.988C80.5681 16.666 81.3101 16.442 82.0941 16.442C82.8361 16.442 83.2561 16.722 83.2561 17.45V17.646C80.5261 17.912 79.1821 18.626 79.1821 20.264C79.1821 21.44 79.9521 22.14 81.1001 22.14C82.1081 22.14 82.8081 21.692 83.3541 21.118L83.4941 22H84.9361ZM92.3691 22V17.128C92.3691 15.868 91.6971 15.098 90.4371 15.098C89.5271 15.098 88.8131 15.588 88.1831 16.19L88.0291 15.238H86.6011V22H88.2811V17.436C88.7711 16.918 89.3031 16.582 89.8211 16.582C90.4371 16.582 90.6891 16.988 90.6891 17.576V22H92.3691ZM99.0642 20.012C99.0642 18.738 98.3782 18.262 96.6282 17.814C95.6202 17.548 95.3682 17.338 95.3682 16.974C95.3682 16.61 95.6762 16.358 96.3062 16.358C96.9782 16.358 97.7762 16.596 98.4482 16.974L98.6722 15.574C98.0002 15.28 97.1882 15.098 96.3062 15.098C94.7382 15.098 93.8142 15.924 93.8142 17.1C93.8142 18.332 94.5002 18.808 96.1382 19.228C97.2162 19.494 97.5102 19.69 97.5102 20.166C97.5102 20.614 97.1182 20.88 96.3902 20.88C95.5502 20.88 94.6542 20.558 93.9262 20.082L93.7022 21.482C94.3462 21.832 95.3542 22.14 96.3342 22.14C98.1122 22.14 99.0642 21.342 99.0642 20.012Z",fill:"#060607"}),s("circle",{cx:"28",cy:"62",r:"16",fill:"url(#tutorial-media-channels-image2)"}),s("path",{d:"M59.572 60V51.72H58.096V57.144L54.376 51.72H52.876V60H54.352V54.3L58.252 60H59.572ZM63.4852 55.08C64.1812 55.08 64.5412 55.584 64.6372 56.484H62.3212C62.4292 55.548 62.9092 55.08 63.4852 55.08ZM66.0292 59.412L65.8612 58.284C65.2252 58.728 64.6132 59.004 63.8692 59.004C62.9812 59.004 62.3692 58.512 62.3092 57.384H66.0292C66.0292 57.3 66.0412 57.156 66.0412 57.036C66.0412 55.392 65.2612 54.084 63.5212 54.084C62.0092 54.084 60.8812 55.224 60.8812 57.108C60.8812 59.196 62.0932 60.12 63.7132 60.12C64.6492 60.12 65.4052 59.844 66.0292 59.412ZM68.7047 60V51.336L67.2647 51.564V60H68.7047ZM71.7281 60V51.336L70.2881 51.564V60H71.7281ZM73.8635 62.184C74.9075 62.184 75.5795 61.764 76.0715 60.372L78.2915 54.204H76.8395L75.5435 58.284L74.2235 54.12L72.7235 54.312L74.8235 59.988L74.7755 60.156C74.5835 60.78 74.1995 60.996 73.7195 60.996C73.4675 60.996 73.2635 60.96 73.0835 60.912L73.2755 62.124C73.4075 62.16 73.5515 62.184 73.8635 62.184Z",fill:"#060607"}),s("path",{d:"M58.792 76.084L59.908 75.844L56.716 67.684H55.588L52.348 76H53.524L54.448 73.516H57.82L58.792 76.084ZM56.128 69.004L57.448 72.52H54.82L56.128 69.004ZM65.7697 76V71.836C65.7697 70.804 65.1937 70.156 64.1137 70.156C63.2977 70.156 62.6257 70.612 62.0857 71.104L61.9537 70.276H61.1017V76H62.1697V72.04C62.6857 71.488 63.2617 71.116 63.8257 71.116C64.4497 71.116 64.7017 71.512 64.7017 72.1V76H65.7697ZM67.7558 78.184C68.5958 78.184 69.2198 77.872 69.6878 76.6L72.0278 70.276H70.9118L69.4118 74.728L67.8758 70.192L66.7958 70.36L68.8838 76.024L68.7398 76.408C68.5118 77.02 68.1878 77.248 67.7078 77.248C67.5398 77.248 67.3238 77.212 67.1438 77.164L67.2998 78.136C67.4078 78.16 67.5278 78.184 67.7558 78.184ZM77.9291 73.144C77.9291 71.26 76.8011 70.156 75.2651 70.156C73.7411 70.156 72.6371 71.26 72.6371 73.144C72.6371 75.028 73.7411 76.12 75.2651 76.12C76.8011 76.12 77.9291 75.028 77.9291 73.144ZM76.8491 73.144C76.8491 74.344 76.3211 75.232 75.2651 75.232C74.2571 75.232 73.7171 74.32 73.7171 73.144C73.7171 71.944 74.2331 71.044 75.2651 71.044C76.2971 71.044 76.8491 71.968 76.8491 73.144ZM83.9572 76V71.836C83.9572 70.804 83.3812 70.156 82.3012 70.156C81.4852 70.156 80.8132 70.612 80.2732 71.104L80.1412 70.276H79.2892V76H80.3572V72.04C80.8732 71.488 81.4492 71.116 82.0132 71.116C82.6372 71.116 82.8892 71.512 82.8892 72.1V76H83.9572ZM87.8013 70.996C88.6293 70.996 89.0373 71.524 89.1693 72.448H86.4093C86.5773 71.476 87.1413 70.996 87.8013 70.996ZM90.2373 75.352L90.0813 74.392C89.4573 74.884 88.8573 75.208 88.0293 75.208C87.0333 75.208 86.4093 74.584 86.3613 73.252H90.2493V73.024C90.2493 71.44 89.4813 70.156 87.8133 70.156C86.3733 70.156 85.2933 71.284 85.2933 73.12C85.2933 75.22 86.4573 76.12 87.9453 76.12C88.8933 76.12 89.6253 75.832 90.2373 75.352ZM101.73 70.276H100.662L99.4503 74.512L98.1903 70.276H97.2903L96.0303 74.512L94.7823 70.192L93.7383 70.36L95.5743 76.024H96.4623L97.7223 71.704L98.9943 76.024H99.8943L101.73 70.276ZM106.014 74.428C105.534 74.92 104.934 75.232 104.31 75.232C103.77 75.232 103.458 74.932 103.458 74.464C103.458 73.876 103.902 73.3 106.014 73.096V74.428ZM107.082 76V71.992C107.082 70.72 106.41 70.156 105.018 70.156C104.13 70.156 103.482 70.36 102.798 70.636L102.942 71.56C103.566 71.284 104.226 71.068 104.922 71.068C105.582 71.068 106.014 71.32 106.014 72.04V72.28C103.626 72.532 102.402 73.096 102.402 74.524C102.402 75.496 103.05 76.12 104.082 76.12C105.018 76.12 105.642 75.7 106.098 75.232L106.218 76H107.082ZM113.406 76V71.836C113.406 70.804 112.83 70.156 111.75 70.156C110.934 70.156 110.262 70.612 109.722 71.104L109.59 70.276H108.738V76H109.806V72.04C110.322 71.488 110.898 71.116 111.462 71.116C112.086 71.116 112.338 71.512 112.338 72.1V76H113.406ZM117.815 76.024L117.671 75.112C117.539 75.136 117.371 75.148 117.179 75.148C116.579 75.148 116.387 74.86 116.387 74.392V71.176H117.767L117.623 70.276H116.387V68.212L115.343 68.368V70.276H114.479V71.176H115.343V74.584C115.343 75.736 116.003 76.096 117.011 76.096C117.383 76.096 117.635 76.06 117.815 76.024ZM124.494 76.024L124.35 75.112C124.218 75.136 124.05 75.148 123.858 75.148C123.258 75.148 123.066 74.86 123.066 74.392V71.176H124.446L124.302 70.276H123.066V68.212L122.022 68.368V70.276H121.158V71.176H122.022V74.584C122.022 75.736 122.682 76.096 123.69 76.096C124.062 76.096 124.314 76.06 124.494 76.024ZM130.71 73.144C130.71 71.26 129.582 70.156 128.046 70.156C126.522 70.156 125.418 71.26 125.418 73.144C125.418 75.028 126.522 76.12 128.046 76.12C129.582 76.12 130.71 75.028 130.71 73.144ZM129.63 73.144C129.63 74.344 129.102 75.232 128.046 75.232C127.038 75.232 126.498 74.32 126.498 73.144C126.498 71.944 127.014 71.044 128.046 71.044C129.078 71.044 129.63 71.968 129.63 73.144ZM139.375 76V71.836C139.375 70.804 138.799 70.156 137.719 70.156C136.903 70.156 136.243 70.612 135.775 71.032V67.336L134.707 67.504V76H135.775V72.04C136.291 71.488 136.867 71.116 137.431 71.116C138.055 71.116 138.307 71.512 138.307 72.1V76H139.375ZM144.299 74.428C143.819 74.92 143.219 75.232 142.595 75.232C142.055 75.232 141.743 74.932 141.743 74.464C141.743 73.876 142.187 73.3 144.299 73.096V74.428ZM145.367 76V71.992C145.367 70.72 144.695 70.156 143.303 70.156C142.415 70.156 141.767 70.36 141.083 70.636L141.227 71.56C141.851 71.284 142.511 71.068 143.207 71.068C143.867 71.068 144.299 71.32 144.299 72.04V72.28C141.911 72.532 140.687 73.096 140.687 74.524C140.687 75.496 141.335 76.12 142.367 76.12C143.303 76.12 143.927 75.7 144.383 75.232L144.503 76H145.367ZM151.692 76V71.836C151.692 70.804 151.116 70.156 150.036 70.156C149.22 70.156 148.548 70.612 148.008 71.104L147.876 70.276H147.024V76H148.092V72.04C148.608 71.488 149.184 71.116 149.748 71.116C150.372 71.116 150.624 71.512 150.624 72.1V76H151.692ZM156.484 72.136C156.484 72.82 156.028 73.36 155.296 73.36C154.588 73.36 154.132 72.844 154.132 72.184C154.132 71.488 154.576 70.936 155.296 70.936C156.004 70.936 156.484 71.452 156.484 72.136ZM158.188 76.42C158.188 75.532 157.432 75.148 156.22 74.932L155.812 74.86C154.804 74.68 154.6 74.632 154.6 74.428C154.6 74.32 154.72 74.188 154.888 74.08C155.032 74.104 155.176 74.116 155.32 74.116C156.484 74.116 157.516 73.372 157.516 72.148C157.516 71.824 157.444 71.524 157.288 71.26L158.38 71.152L158.224 70.192L156.772 70.636C156.376 70.324 155.872 70.156 155.296 70.156C154.132 70.156 153.1 70.912 153.1 72.148C153.1 72.928 153.532 73.528 154.168 73.852C153.784 74.08 153.568 74.356 153.568 74.632C153.568 74.848 153.676 75.052 153.928 75.232C153.124 75.664 152.716 76.12 152.716 76.708C152.716 77.716 153.904 78.184 155.392 78.184C156.88 78.184 158.188 77.62 158.188 76.42ZM155.44 77.416C154.324 77.416 153.736 77.08 153.736 76.624C153.736 76.228 154.036 75.892 154.708 75.556C154.936 75.604 155.104 75.64 155.416 75.7L156.1 75.82C156.916 75.964 157.18 76.204 157.18 76.552C157.18 77.032 156.556 77.416 155.44 77.416ZM167.003 73.144C167.003 71.26 165.875 70.156 164.339 70.156C162.815 70.156 161.711 71.26 161.711 73.144C161.711 75.028 162.815 76.12 164.339 76.12C165.875 76.12 167.003 75.028 167.003 73.144ZM165.923 73.144C165.923 74.344 165.395 75.232 164.339 75.232C163.331 75.232 162.791 74.32 162.791 73.144C162.791 71.944 163.307 71.044 164.339 71.044C165.371 71.044 165.923 71.968 165.923 73.144ZM168.339 70.276V74.44C168.339 75.472 168.903 76.12 169.995 76.12C170.799 76.12 171.483 75.676 172.023 75.172L172.155 76H173.007V70.276H171.939V74.236C171.423 74.788 170.847 75.16 170.283 75.16C169.659 75.16 169.407 74.764 169.407 74.176V70.276H168.339ZM177.44 76.024L177.296 75.112C177.164 75.136 176.996 75.148 176.804 75.148C176.204 75.148 176.012 74.86 176.012 74.392V71.176H177.392L177.248 70.276H176.012V68.212L174.968 68.368V70.276H174.104V71.176H174.968V74.584C174.968 75.736 175.628 76.096 176.636 76.096C177.008 76.096 177.26 76.06 177.44 76.024ZM184.119 76.024L183.975 75.112C183.843 75.136 183.675 75.148 183.483 75.148C182.883 75.148 182.691 74.86 182.691 74.392V71.176H184.071L183.927 70.276H182.691V68.212L181.647 68.368V70.276H180.783V71.176H181.647V74.584C181.647 75.736 182.307 76.096 183.315 76.096C183.687 76.096 183.939 76.06 184.119 76.024ZM190.082 76V71.836C190.082 70.804 189.506 70.156 188.426 70.156C187.61 70.156 186.95 70.612 186.482 71.032V67.336L185.414 67.504V76H186.482V72.04C186.998 71.488 187.574 71.116 188.138 71.116C188.762 71.116 189.014 71.512 189.014 72.1V76H190.082ZM193.038 68.452C193.038 68.08 192.738 67.768 192.366 67.768C191.994 67.768 191.682 68.08 191.682 68.452C191.682 68.824 191.994 69.124 192.366 69.124C192.738 69.124 193.038 68.824 193.038 68.452ZM192.894 76V70.276H191.826V76H192.894ZM198.656 74.404C198.656 73.312 198.02 72.904 196.604 72.544C195.704 72.316 195.416 72.1 195.416 71.716C195.416 71.308 195.752 71.056 196.4 71.056C197 71.056 197.636 71.26 198.14 71.548L198.308 70.54C197.768 70.3 197.132 70.156 196.424 70.156C195.176 70.156 194.408 70.828 194.408 71.74C194.408 72.76 194.948 73.168 196.292 73.504C197.324 73.756 197.648 73.948 197.648 74.476C197.648 74.956 197.216 75.232 196.484 75.232C195.704 75.232 195.008 74.944 194.468 74.572L194.312 75.58C194.804 75.856 195.644 76.12 196.4 76.12C197.876 76.12 198.656 75.448 198.656 74.404ZM60.328 86.276H59.26L58.048 90.512L56.788 86.276H55.888L54.628 90.512L53.38 86.192L52.336 86.36L54.172 92.024H55.06L56.32 87.704L57.592 92.024H58.492L60.328 86.276ZM63.5318 86.996C64.3598 86.996 64.7678 87.524 64.8998 88.448H62.1398C62.3078 87.476 62.8718 86.996 63.5318 86.996ZM65.9678 91.352L65.8118 90.392C65.1878 90.884 64.5878 91.208 63.7598 91.208C62.7638 91.208 62.1398 90.584 62.0918 89.252H65.9798V89.024C65.9798 87.44 65.2118 86.156 63.5438 86.156C62.1038 86.156 61.0238 87.284 61.0238 89.12C61.0238 91.22 62.1878 92.12 63.6758 92.12C64.6238 92.12 65.3558 91.832 65.9678 91.352ZM69.5201 86.996C70.3481 86.996 70.7561 87.524 70.8881 88.448H68.1281C68.2961 87.476 68.8601 86.996 69.5201 86.996ZM71.9561 91.352L71.8001 90.392C71.1761 90.884 70.5761 91.208 69.7481 91.208C68.7521 91.208 68.1281 90.584 68.0801 89.252H71.9681V89.024C71.9681 87.44 71.2001 86.156 69.5321 86.156C68.0921 86.156 67.0121 87.284 67.0121 89.12C67.0121 91.22 68.1761 92.12 69.6641 92.12C70.6121 92.12 71.3441 91.832 71.9561 91.352ZM76.9364 92.084L78.1004 91.904L75.4844 88.808L77.8964 86.276H76.6124L74.3924 88.676V83.336L73.3244 83.504V92H74.3924V89L76.9364 92.084ZM81.1099 86.996C81.9379 86.996 82.3459 87.524 82.4779 88.448H79.7179C79.8859 87.476 80.4499 86.996 81.1099 86.996ZM83.5459 91.352L83.3899 90.392C82.7659 90.884 82.1659 91.208 81.3379 91.208C80.3419 91.208 79.7179 90.584 79.6699 89.252H83.5579V89.024C83.5579 87.44 82.7899 86.156 81.1219 86.156C79.6819 86.156 78.6019 87.284 78.6019 89.12C78.6019 91.22 79.7659 92.12 81.2539 92.12C82.2019 92.12 82.9339 91.832 83.5459 91.352ZM89.5822 92V87.836C89.5822 86.804 89.0062 86.156 87.9262 86.156C87.1102 86.156 86.4382 86.612 85.8982 87.104L85.7662 86.276H84.9142V92H85.9822V88.04C86.4982 87.488 87.0742 87.116 87.6382 87.116C88.2622 87.116 88.5142 87.512 88.5142 88.1V92H89.5822ZM91.9983 89.252C91.9983 87.836 92.6463 87.104 93.5463 87.104C94.1583 87.104 94.5063 87.2 94.9503 87.428V90.164C94.4943 90.776 93.9903 91.172 93.3303 91.172C92.5623 91.172 91.9983 90.512 91.9983 89.252ZM90.9183 89.3C90.9183 91.22 91.9383 92.12 93.1743 92.12C94.0143 92.12 94.6023 91.688 95.0343 91.172L95.1663 92H96.0183V83.336L94.9503 83.504V86.456C94.5903 86.312 94.0743 86.204 93.5103 86.204C92.1183 86.204 90.9183 87.212 90.9183 89.3ZM99.3194 89.54L100.015 89.384L100.123 88.196C101.551 87.548 102.415 86.984 102.415 85.688C102.415 84.38 101.419 83.564 99.9554 83.564C98.9714 83.564 98.1194 83.912 97.3874 84.452L97.5434 85.556C98.2154 85.004 98.9594 84.584 99.8954 84.584C100.699 84.584 101.287 85.004 101.287 85.736C101.287 86.504 100.783 86.888 99.6554 87.356L99.1634 87.56L99.3194 89.54ZM99.0674 92H100.267V90.572H99.0674V92Z",fill:"#2E3338"}),s("defs",{},void 0,s("pattern",{id:"tutorial-media-channels-image1",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1"},void 0,s("image",{x:"0",y:"0",height:"32",width:"32",href:o.default})),s("pattern",{id:"tutorial-media-channels-image2",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1"},void 0,s("image",{x:"0",y:"0",height:"32",width:"32",href:i.default}))));function f(){return s("div",{className:a.default.container},void 0,d)}f.displayName="MediaChannels"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(7765)),o=l(n(9019)),i=l(n(9020));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("svg",{width:"248",height:"67",viewBox:"0 0 248 67",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,s("path",{d:"M1.91937 22.0819L0.353585 25.3514C0.282937 25.5093 0.265227 25.6857 0.303076 25.8544C0.311999 25.943 0.339002 26.0288 0.382429 26.1067C0.425856 26.1845 0.484791 26.2527 0.555622 26.3071C0.607907 26.38 0.675826 26.4403 0.754452 26.4838C0.833079 26.5273 0.920441 26.5529 1.0102 26.5586C1.19659 26.5915 1.38843 26.5741 1.5658 26.5083L4.74788 24.949L5.15196 24.8484L5.55603 24.949L8.73811 26.5083H9.29371L9.74829 26.2568C9.85659 26.1275 9.92655 25.9707 9.95033 25.8041C9.98818 25.6354 9.97046 25.459 9.89982 25.3011L8.33403 22.0315C8.2926 21.919 8.27539 21.799 8.28352 21.6794C8.27533 21.5434 8.29245 21.4069 8.33403 21.277L9.89982 18.1081C9.94425 18.0329 9.97177 17.949 9.98049 17.8621C9.98921 17.7753 9.97892 17.6876 9.95033 17.6051C9.93611 17.4208 9.86561 17.2453 9.74829 17.1021C9.60449 16.9853 9.42824 16.9151 9.2432 16.9009C9.16036 16.8724 9.07231 16.8622 8.98511 16.8709C8.89791 16.8796 8.81364 16.907 8.73811 16.9512L5.50552 18.5105L5.10145 18.6111L4.69737 18.5105L1.5153 16.9512C1.43095 16.9057 1.3382 16.8778 1.24269 16.8692C1.14717 16.8605 1.05089 16.8713 0.959695 16.9009C0.792331 16.9246 0.634911 16.9943 0.505112 17.1021C0.372179 17.2408 0.284186 17.416 0.252566 17.6051C0.236844 17.779 0.271925 17.9537 0.353585 18.1081L1.86886 21.3273C1.94921 21.4454 1.98499 21.5879 1.96988 21.7297C1.98577 21.7888 1.98948 21.8504 1.9808 21.9109C1.97212 21.9715 1.95122 22.0296 1.91937 22.0819Z",fill:"#AEC7FF"}),s("path",{d:"M205.949 47.6259C218.112 47.6259 227.971 37.8071 227.971 25.695C227.971 13.5829 218.112 3.76405 205.949 3.76405C193.787 3.76405 183.927 13.5829 183.927 25.695C183.927 37.8071 193.787 47.6259 205.949 47.6259Z",fill:"url(#tutorial-media-voice-channels-image2)"}),s("path",{d:"M206.106 47.5713C218.256 47.5713 228.106 37.7216 228.106 25.5713C228.106 13.4211 218.256 3.57133 206.106 3.57133C193.956 3.57133 184.106 13.4211 184.106 25.5713C184.106 37.7216 193.956 47.5713 206.106 47.5713Z",stroke:"#3ba55c",strokeWidth:"3"}),s("path",{d:"M43.8822 66.4461C56.0446 66.4461 65.9042 56.6273 65.9042 44.5152C65.9042 32.4031 56.0446 22.5843 43.8822 22.5843C31.7198 22.5843 21.8602 32.4031 21.8602 44.5152C21.8602 56.6273 31.7198 66.4461 43.8822 66.4461Z",fill:"url(#tutorial-media-voice-channels-image1)"}),s("path",{d:"M43.6684 66.0315C55.8187 66.0315 65.6684 56.1818 65.6684 44.0315C65.6684 31.8813 55.8187 22.0315 43.6684 22.0315C31.5181 22.0315 21.6684 31.8813 21.6684 44.0315C21.6684 56.1818 31.5181 66.0315 43.6684 66.0315Z",stroke:"#3ba55c",strokeWidth:"3"}),s("path",{d:"M138.597 43.8116C134.96 31.857 134.96 19.0973 138.597 7.14265",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M111.562 25.5955C115.2 37.5501 115.2 50.3098 111.562 62.2644",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M159.71 37.6246C158.509 33.6948 157.896 29.6101 157.892 25.5023C157.9 21.3782 158.513 17.2775 159.71 13.3296",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M149.154 10.2613C146.124 20.198 146.124 30.8065 149.154 40.7433",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M170.266 16.4482C169.347 19.3785 168.887 22.4324 168.903 25.5023C168.887 28.5721 169.347 31.626 170.266 34.5563",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M90.0579 56.1351C91.2957 52.1951 91.9258 48.0908 91.9267 43.9625C91.9301 39.8503 91.2999 35.7619 90.0579 31.8401",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M100.614 28.6068C103.644 38.5435 103.644 49.152 100.614 59.0887",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M79.5015 34.9084C81.3857 40.7986 81.3857 47.1263 79.5015 53.0165",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),s("path",{d:"M182.237 57.1914L184.257 56.4872C184.354 56.4431 184.436 56.3722 184.494 56.2831C184.551 56.1939 184.582 56.0902 184.582 55.9842C184.582 55.8783 184.551 55.7746 184.494 55.6854C184.436 55.5962 184.354 55.5254 184.257 55.4812L182.237 54.777C182.16 54.7552 182.088 54.7169 182.027 54.6648C181.966 54.6127 181.917 54.548 181.884 54.4752L181.176 52.4632C181.143 52.3626 181.079 52.275 180.993 52.2128C180.907 52.1507 180.803 52.1173 180.697 52.1173C180.59 52.1173 180.487 52.1507 180.4 52.2128C180.314 52.275 180.25 52.3626 180.217 52.4632L179.51 54.4752C179.476 54.548 179.427 54.6127 179.366 54.6648C179.305 54.7169 179.233 54.7552 179.156 54.777L177.186 55.4812C177.052 55.4812 176.924 55.5342 176.829 55.6286C176.734 55.7229 176.681 55.8508 176.681 55.9842C176.681 56.1176 176.734 56.2456 176.829 56.3399C176.924 56.4343 177.052 56.4872 177.186 56.4872L179.156 57.1914C179.233 57.2133 179.305 57.2516 179.366 57.3037C179.427 57.3558 179.476 57.4205 179.51 57.4933L180.217 59.5053C180.25 59.6059 180.314 59.6935 180.4 59.7556C180.487 59.8178 180.59 59.8512 180.697 59.8512C180.803 59.8512 180.907 59.8178 180.993 59.7556C181.079 59.6935 181.143 59.6059 181.176 59.5053L181.884 57.4933C181.917 57.4205 181.966 57.3558 182.027 57.3037C182.088 57.2516 182.16 57.2133 182.237 57.1914Z",fill:"#EC7DF7"}),s("path",{d:"M242.696 1.35812C242.696 0.746955 242.199 0.251511 241.585 0.251511C240.972 0.251511 240.474 0.746955 240.474 1.35812V2.4949C240.474 3.10607 240.972 3.60151 241.585 3.60151C242.199 3.60151 242.696 3.10607 242.696 2.4949V1.35812Z",fill:"#7196FF"}),s("path",{d:"M242.696 10.2613C242.696 9.65011 242.199 9.15466 241.585 9.15466C240.972 9.15466 240.474 9.65011 240.474 10.2613V11.3981C240.474 12.0092 240.972 12.5047 241.585 12.5047C242.199 12.5047 242.696 12.0092 242.696 11.3981V10.2613Z",fill:"#7196FF"}),s("path",{d:"M246.636 7.49476C247.25 7.49476 247.747 6.99933 247.747 6.38817C247.747 5.77701 247.25 5.28156 246.636 5.28156H245.495C244.881 5.28156 244.384 5.77701 244.384 6.38817C244.384 6.99933 244.881 7.49476 245.495 7.49476H246.636Z",fill:"#7196FF"}),s("path",{d:"M237.696 7.49477C238.31 7.49477 238.807 6.99931 238.807 6.38815C238.807 5.77699 238.31 5.28154 237.696 5.28154H236.555C235.941 5.28154 235.443 5.77699 235.443 6.38815C235.443 6.99931 235.941 7.49477 236.555 7.49477H237.696Z",fill:"#7196FF"}),s("path",{d:"M25.2929 2.23526C24.8786 1.82274 24.207 1.82274 23.7928 2.23526C23.3786 2.64777 23.3786 3.31659 23.7928 3.7291L24.5535 4.48669C24.9678 4.8992 25.6394 4.8992 26.0536 4.48669C26.4678 4.07418 26.4678 3.40536 26.0536 2.99285L25.2929 2.23526Z",fill:"#F7D036"}),s("path",{d:"M31.3539 8.25656C30.9397 7.84404 30.2681 7.84404 29.8538 8.25656C29.4396 8.66907 29.4396 9.33789 29.8538 9.7504L30.6146 10.508C31.0288 10.9205 31.7004 10.9205 32.1146 10.508C32.5289 10.0955 32.5289 9.42666 32.1146 9.01415L31.3539 8.25656Z",fill:"#F7D036"}),s("path",{d:"M32.109 3.71739C32.5233 3.30488 32.5233 2.63606 32.109 2.22354C31.6948 1.81103 31.0232 1.81103 30.609 2.22355L29.8482 2.98114C29.434 3.39365 29.434 4.06247 29.8482 4.47498C30.2625 4.88749 30.9341 4.88749 31.3483 4.47498L32.109 3.71739Z",fill:"#F7D036"}),s("path",{d:"M26.0985 9.73869C26.5128 9.32618 26.5128 8.65736 26.0985 8.24485C25.6843 7.83233 25.0127 7.83233 24.5985 8.24485L23.8378 9.00244C23.4235 9.41495 23.4235 10.0838 23.8378 10.4963C24.252 10.9088 24.9236 10.9088 25.3378 10.4963L26.0985 9.73869Z",fill:"#F7D036"}),s("defs",{},void 0,s("pattern",{id:"tutorial-media-voice-channels-image1",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1"},void 0,s("image",{x:"0",y:"0",height:"44",width:"44",href:o.default})),s("pattern",{id:"tutorial-media-voice-channels-image2",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1"},void 0,s("image",{x:"0",y:"0",height:"44",width:"44",href:i.default}))));function f(){return s("div",{className:a.default.container},void 0,d)}f.displayName="MediaVoiceChannels"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(8312)),o=n(3),i=n(5937),l=y(n(5939)),u=y(n(10)),s=y(n(15)),d=y(n(12)),f=y(n(371)),c=y(n(279)),p=n(150),v=y(n(7766));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_("g",{fill:"none",fillRule:"evenodd"},void 0,_("path",{fill:"#D3D6ED",d:"M7.6003,3.7337 C7.6003,3.1817 7.1533,2.7337 6.6003,2.7337 C5.7663,2.7337 5.0903,2.0577 5.0903,1.2237 C5.0903,0.6717 4.6423,0.2237 4.0903,0.2237 C3.5383,0.2237 3.0903,0.6717 3.0903,1.2237 C3.0903,2.0577 2.4133,2.7337 1.5803,2.7337 C1.0283,2.7337 0.5803,3.1817 0.5803,3.7337 C0.5803,4.2857 1.0283,4.7337 1.5803,4.7337 C2.4133,4.7337 3.0903,5.4097 3.0903,6.2437 C3.0903,6.7967 3.5383,7.2437 4.0903,7.2437 C4.6423,7.2437 5.0903,6.7967 5.0903,6.2437 C5.0903,5.4097 5.7663,4.7337 6.6003,4.7337 C7.1533,4.7337 7.6003,4.2857 7.6003,3.7337"}),_("path",{fill:"#ACB0FF",d:"M96.6157,5.4263 C96.6157,4.8743 96.1687,4.4263 95.6157,4.4263 C95.0627,4.4263 94.6157,4.8743 94.6157,5.4263 C94.6157,6.2603 93.9397,6.9363 93.1057,6.9363 C92.5537,6.9363 92.1057,7.3843 92.1057,7.9363 C92.1057,8.4883 92.5537,8.9363 93.1057,8.9363 C93.9397,8.9363 94.6157,9.6123 94.6157,10.4463 C94.6157,10.9983 95.0627,11.4463 95.6157,11.4463 C96.1687,11.4463 96.6157,10.9983 96.6157,10.4463 C96.6157,9.6123 97.2917,8.9363 98.1257,8.9363 C98.6787,8.9363 99.1257,8.4883 99.1257,7.9363 C99.1257,7.3843 98.6787,6.9363 98.1257,6.9363 C97.2917,6.9363 96.6157,6.2603 96.6157,5.4263 Z"}),_("path",{fill:"#FFF",d:"M120.7351 14.0452L119.5511 15.2282C119.1611 15.6182 119.1611 16.2512 119.5511 16.6422 119.7471 16.8372 120.0031 16.9352 120.2581 16.9352 120.5141 16.9352 120.7701 16.8372 120.9651 16.6422L122.1491 15.4592C122.5401 15.0682 122.5401 14.4362 122.1491 14.0452 121.7581 13.6542 121.1261 13.6542 120.7351 14.0452zM113.635 21.1452C113.245 21.5352 113.245 22.1682 113.635 22.5592 113.831 22.7542 114.087 22.8522 114.342 22.8522 114.598 22.8522 114.855 22.7542 115.049 22.5592L116.233 21.3752C116.624 20.9842 116.624 20.3522 116.233 19.9612 115.842 19.5702 115.209 19.5702 114.819 19.9612L113.635 21.1452zM120.9655 19.9612C120.5745 19.5702 119.9425 19.5702 119.5515 19.9612 119.1605 20.3522 119.1605 20.9842 119.5515 21.3752L120.7355 22.5592C120.9305 22.7542 121.1865 22.8522 121.4425 22.8522 121.6975 22.8522 121.9535 22.7542 122.1495 22.5592 122.5395 22.1682 122.5395 21.5352 122.1495 21.1452L120.9655 19.9612zM115.0491 14.0449C114.6591 13.6549 114.0251 13.6549 113.6351 14.0449 113.2451 14.4359 113.2451 15.0689 113.6351 15.4589L114.8191 16.6419C115.0141 16.8369 115.2701 16.9349 115.5261 16.9349 115.7821 16.9349 116.0381 16.8369 116.2331 16.6419 116.6241 16.2509 116.6241 15.6189 116.2331 15.2279L115.0491 14.0449z"}),_("rect",{width:"40",height:"25",x:"68",y:"22",fill:"#999CF4",fillRule:"nonzero",rx:"3"}),_("path",{fill:"#999CF4",fillRule:"nonzero",d:"M90,46 L90,53.8100983 C90,54.362383 90.4477153,54.8100983 91,54.8100983 C91.2501917,54.8100983 91.4912948,54.7163131 91.6757246,54.5472524 L101,46 L90,46 Z",transform:"matrix(-1 0 0 1 191 0)"}),_("g",{fill:"#FFF",fillRule:"nonzero",opacity:".902",transform:"translate(78 32)"},void 0,_("circle",{cx:"2.5",cy:"2.5",r:"2.5"}),_("circle",{cx:"10.5",cy:"2.5",r:"2.5"}),_("circle",{cx:"18.5",cy:"2.5",r:"2.5"})),_("rect",{width:"40",height:"25",x:"13",y:"9",fill:"#5865f2",fillRule:"nonzero",rx:"3"}),_("path",{fill:"#5865f2",fillRule:"nonzero",d:"M20,33 L20,40.8100983 C20,41.362383 20.4477153,41.8100983 21,41.8100983 C21.2501917,41.8100983 21.4912948,41.7163131 21.6757246,41.5472524 L31,33 L20,33 Z"}),_("g",{fill:"#FFF",fillRule:"nonzero",opacity:".902",transform:"translate(23 19)"},void 0,_("circle",{cx:"2.5",cy:"2.5",r:"2.5"}),_("circle",{cx:"10.5",cy:"2.5",r:"2.5"}),_("circle",{cx:"18.5",cy:"2.5",r:"2.5"})));function E(){var e=(0,l.default)((function(e){return{guildId:e.guildId,channelId:e.channelId}}),a.default),t=e.guildId,n=e.channelId,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGuild(t)})),y=(0,o.useStateFromStores)([u.default],(function(){return null==r?u.default.getChannel(n):null})),m=(0,o.useStateFromStores)([d.default],(function(){return d.default.getCurrentUser()})),E=y&&(0,i.getChannelIconURL)(y),g=m?m.getAvatarURL(t||void 0):p.DEFAULT_AVATARS[0],S=_(c.default,{src:g,"aria-hidden":!0,size:c.default.Sizes.SIZE_80,className:v.default.avatarSizeOverride}),O=null;return O=r?_(f.default,{guild:r}):E?_(c.default,{"aria-hidden":!0,src:E,size:c.default.Sizes.SIZE_80,className:v.default.avatarSizeOverride}):S,_("div",{className:v.default.container},void 0,_("div",{className:v.default.personAvatar},void 0,S),_("div",{className:v.default.guildAvatar},void 0,O),_("svg",{className:v.default.illustration,xmlns:"http://www.w3.org/2000/svg",width:"156",height:"70",viewBox:"0 0 123 55"},void 0,h))}E.displayName="Media"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTutorialPopoutText=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=f(n(15)),l=f(n(107)),u=f(n(8368)),s=f(n(6)),d=f(n(7767));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(){return a.createElement(a.Fragment,null,s.default.Messages.TIP_INSTANT_INVITE_BODY3.format({shareIcon:s.default.Messages.INSTANT_INVITE,shareIconHook:function(){return p(u.default,{className:d.default.icon},"icon")}}))},y=p((function(){var e=(0,o.useStateFromStores)([i.default,l.default],(function(){return i.default.getGuild(l.default.getGuildId())}),[]),t=null==e?void 0:e.name;return a.createElement(a.Fragment,null,s.default.Messages.TIP_WRITING_MESSAGES_BODY3.format({serverName:t}))}),{}),m=p(v,{});t.getTutorialPopoutText=function(e){var t,n={VOICE_CONVERSATIONS:{title:p("div",{className:d.default.voiceChannelsTitle},void 0,s.default.Messages.NUF_VOICE_CHANNELS_TITLE),body:s.default.Messages.NUF_VOICE_CHANNELS_DESCRIPTION},WRITING_MESSAGES:{title:p("div",{className:d.default.writingMessagesTitle},void 0,s.default.Messages.TIP_WRITING_MESSAGES_TITLE3),body:y},ORGANIZE_BY_TOPIC:{title:p("div",{className:d.default.channelsTitle},void 0,s.default.Messages.NUF_CHANNELS_TITLE),body:s.default.Messages.NUF_CHANNELS_DESCRIPTION},WHOS_ONLINE:{title:s.default.Messages.TIP_WHOS_ONLINE_TITLE3,body:s.default.Messages.TIP_WHOS_ONLINE_BODY3.format()},INSTANT_INVITE:{title:s.default.Messages.TIP_INSTANT_INVITE_TITLE3,body:m},SERVER_SETTINGS:{title:s.default.Messages.TIP_SERVER_SETTINGS_TITLE3,body:s.default.Messages.TIP_SERVER_SETTINGS_BODY3.format()},DIRECT_MESSAGES:{title:s.default.Messages.TIP_DIRECT_MESSAGES_TITLE3,body:s.default.Messages.TIP_DIRECT_MESSAGES_BODY3.format()},CREATE_MORE_SERVERS:{title:s.default.Messages.TIP_CREATE_MORE_SERVERS_TITLE3,body:s.default.Messages.TIP_CREATE_MORE_SERVERS_BODY3.format()},CREATE_FIRST_SERVER:{title:s.default.Messages.TIP_CREATE_FIRST_SERVER_TITLE3,body:s.default.Messages.TIP_CREATE_FIRST_SERVER_BODY3.format()},FRIENDS_LIST:{title:s.default.Messages.TIP_FRIENDS_LIST_TITLE3,body:s.default.Messages.TIP_FRIENDS_LIST_BODY3.format()}}[e.replace(/-/g,"_").toUpperCase()]||{};return{title:n.title,body:n.body,isLongText:null!==(t=n.isLongText)&&void 0!==t&&t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.guildDirectoryEntryFromServer=function(e){var t,n,a,i,l,u;return(0,r.default)(e.type===o.DirectoryEntryTypes.GUILD,"Directory entries must be connected to a guild!"),{channelId:e.directory_channel_id,guildId:e.entity_id,type:e.type,authorId:e.author_id,createdAt:e.created_at,description:e.description,name:null===(t=e.guild)||void 0===t?void 0:t.name,icon:null===(n=e.guild)||void 0===n?void 0:n.icon,splash:null===(a=e.guild)||void 0===a?void 0:a.splash,features:new Set(null===(i=e.guild)||void 0===i?void 0:i.features),approximateMemberCount:null===(l=e.guild)||void 0===l?void 0:l.approximate_member_count,approximatePresenceCount:null===(u=e.guild)||void 0===u?void 0:u.approximate_presence_count}},t.orderGuildEntries=function(e){return a.default.orderBy(e,[function(e){return e.approximateMemberCount}],["desc"])};var r=i(n(23)),a=i(n(8)),o=n(9190);function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=K(n(0)),o=Y(n(8)),i=K(n(680)),l=n(3),u=Y(n(1226)),s=Y(n(8691)),d=K(n(8357)),f=Y(n(105)),c=Y(n(9005)),p=n(1246),v=Y(n(8572)),y=Y(n(8456)),m=Y(n(9955)),_=K(n(300)),h=n(9004),E=n(1209),g=n(31),S=Y(n(1212)),O=Y(n(10)),I=Y(n(715)),T=n(86),C=Y(n(40)),b=Y(n(200)),M=Y(n(8692)),N=Y(n(181)),A=Y(n(8393)),P=Y(n(1210)),R=n(292),L=n(393),D=n(6057),w=Y(n(9956)),j=Y(n(9960)),k=Y(n(9962)),U=Y(n(9984)),G=Y(n(9985)),F=Y(n(9987)),B=Y(n(9988)),H=Y(n(9991)),x=n(1),V=Y(n(6)),W=Y(n(7790));function Y(e){return e&&e.__esModule?e:{default:e}}function z(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return z=function(){return e},e}function K(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=z();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function $(){return($=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}).apply(this,arguments)}function Z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var X={x:-36,y:7,targetWidth:232,targetHeight:40,offset:{x:0,y:0}};var J=o.default.memoize((function(e){var t=null;return e._categories.filter((function(e){return e.index>=0})).map((function(e){return e.channel.id})).some((function(n){return null!=(t=e[n].find((function(e){return e.channel.isGuildVoice()})))})),t}));J.cache=new WeakMap;var Q=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._list=null,t.unreadTopRef=a.createRef(),t.unreadBottomRef=a.createRef(),t.state={initialized:!1,isUnreadVisible:!0,topUnread:null,topMention:null,bottomUnread:null,bottomMention:null},t.setListRef=function(e){t.context.ref.current=(null==e?void 0:e.getScrollerNode())||null,t._list=e},t.jumpToChannel=function(e,n){var r=n[0],a=n[1];return t.scrollToChannel(e,!0,null!=r&&null!=a?32:8)},t.isChannelVisible=function(e,n){var r=t.getChannelSectionRow(e),a=t._list;if(null==a||null==r)return!1;var o=r.row,i=r.section,l=a.getScrollPosition(i,o),u=l[0],s=l[1],d=a.getScrollerState();return!!(n&&u+s<d.scrollTop+d.offsetHeight)||!n&&u>d.scrollTop},t.handleResize=function(){t.setState({isUnreadVisible:t.isUnreadVisible()})},t.handleListScroll=function(){var e,n=t.props.onScroll,r=(null===(e=t._list)||void 0===e?void 0:e.getScrollerState())||null;if(null!=r){var a=r.scrollTop;null!=n&&n(r),t.updateChannelListScroll(a)}null!=t.unreadTopRef.current&&t.unreadTopRef.current.calculateState(),null!=t.unreadBottomRef.current&&t.unreadBottomRef.current.calculateState()},t.updateChannelListScroll=o.default.throttle((function(e){u.default.updateChannelListScroll(t.props.guildId,e)}),100),t.handleUnreadCalculate=function(e,n,r){var a=t.isUnreadVisible();r?t.setState({isUnreadVisible:a,bottomUnread:n,bottomMention:e}):t.setState({isUnreadVisible:a,topUnread:n,topMention:e})},t.getSectionHeight=function(e){var n=t.props,r=n.categories,a=n.channels[x.ChannelTypes.GUILD_CATEGORY][e].channel;return 0===e&&r[a.id].length>0?16:0===e?0:40},t.getFooterHeight=function(e){var n=t.props,r=n.categories,a=n.channels,o=n.voiceStates,i=n.selectedVoiceChannelId,l=a[x.ChannelTypes.GUILD_CATEGORY][e].channel;return(0,R.shouldRenderVoiceUserSummary)(l.id,r,i,o)?34:0},t.getRowHeight=function(e,n){var r=null!=n?n:0,a=t.props,o=a.channels,i=a.collapsedChannels,l=a.voiceStates,u=a.categories,s=a.hoistedRows,d=a.stageChannelSpeakerVoiceStates,f=34;if(0===n&&null!=s&&(n-=s.length)<0)return f;var p=o[x.ChannelTypes.GUILD_CATEGORY][e],v=p?u[p.channel.id][r]:u.null[r];if(null==v)return 0;var y=v.channel,m=(0,h.getVisibleThreadsForChannel)({channel:y,selectedChannel:t.props.selectedChannel,activeJoinedThreads:t.props.activeJoinedThreads,activeJoinedUnreadThreads:t.props.activeJoinedUnreadThreads}).count;if((0,c.default)(y)&&0===m)return 0;if(g.THREADED_CHANNEL_TYPES.has(y.type)&&(f+=34*m),y.isGuildVoice()){var _=l[y.id];if(null!=_&&_.length>0){var E=32*_.length;(i[y.id]||S.default.isCollapsed(y.parent_id))&&(E=Math.ceil(E/5)),f+=E+8}}if(y.isGuildStageVoice()){var O,I,T=null!==(O=l[y.id])&&void 0!==O?O:[],C=null!==(I=d[y.id])&&void 0!==I?I:[];if(null!=T&&T.length>0){var b=32*C.length;i[y.id]||S.default.isCollapsed(y.parent_id)?b=Math.ceil(b/5):b+=32,f+=b+8}}return f},t.renderSection=function(e){var n=e.section,r=t.props,a=r.categories,o=r.disableManageChannels,i=r.hoistedRows,l=a._categories[n];if(null==l)return null;if(-1===l.index)return a.null.length>0||null!=i?Z("div",{style:{height:16}},"spacer"):null;var u=l.channel,s=l.index,d=null==a[u.id]||0===a[u.id].length;return Z(w.default,{channel:u,position:s,isEmpty:d,disableManageChannels:o},u.id,1===n?t.renderCachedTutorialIndicator(u.id):void 0)},t.renderCachedTutorialIndicator=(0,L.cachedFunction)((function(e){return Z(d.default,{preventInvert:!0,inlineSpecs:X,tutorialId:"organize-by-topic",position:d.TutorialIndicatorPositions.RIGHT},e)})),t.renderRow=function(e){var n,r,o=e.section,i=e.row,l=t.props,u=l.guild,s=l.selectedChannel,d=l.selectedChannelId,f=l.selectedVoiceChannelId,p=l.mutedChannels,v=l.channels,y=l.categories,m=l.collapsedChannels,_=l.voiceStates,E=l.disableManageChannels,g=l.hoistedRows,S=l.stageChannelSpeakerVoiceStates;if(0===o&&null!=g){if(i<g.length)switch(g[i]){case D.ChannelListHoistedRow.GUILD_SCHEDULED_EVENTS:return Z(B.default,{guild:u,selected:d===D.ChannelListHoistedRow.GUILD_SCHEDULED_EVENTS},D.ChannelListHoistedRow.GUILD_SCHEDULED_EVENTS);default:return null}i-=g.length}var O=v[x.ChannelTypes.GUILD_CATEGORY][o];if(null==O)return null;var I=y[O.channel.id][i];if(null==I)return null;var T=I.channel,C=(0,h.getVisibleThreadsForChannel)({channel:T,selectedChannel:s,activeJoinedThreads:t.props.activeJoinedThreads,activeJoinedUnreadThreads:t.props.activeJoinedUnreadThreads}),b=C.count,M=C.threads;if((0,c.default)(T)&&0===b)return null;var N=I.index;switch(I.channel.type){case x.ChannelTypes.GUILD_ANNOUNCEMENT:case x.ChannelTypes.GUILD_TEXT:case x.ChannelTypes.GUILD_DIRECTORY:var A=p.has(T.id);return Z(a.Fragment,{},T.id,Z(G.default,{channel:T,guild:u,position:N,selected:d===T.id,muted:A,disableManageChannels:E}),b>0?Z(j.default,{channel:T,selectedChannel:s,threads:M}):null);case x.ChannelTypes.GUILD_STAGE_VOICE:return Z(k.default,{channel:T,guild:u,position:N,selected:d===T.id,connected:f===T.id,collapsed:m[T.id],voiceStates:null!==(n=_[T.id])&&void 0!==n?n:[],speakerVoiceStates:null!==(r=S[T.id])&&void 0!==r?r:[],disableManageChannels:E},T.id);case x.ChannelTypes.GUILD_VOICE:var P=J(t.props.categories);return Z(H.default,{channel:T,guild:u,position:N,selected:d===T.id,connected:f===T.id,collapsed:m[T.id],voiceStates:_[T.id],disableManageChannels:E,showTutorial:null!=P&&P.channel===T&&P.index===N},T.id);case x.ChannelTypes.GUILD_STORE:return Z(U.default,{channel:T,guild:u,position:N,selected:d===T.id},T.id);default:return null}},t.renderFooter=function(e){var n=e.section,r=t.props,a=r.channels,o=r.categories,i=r.voiceStates,l=r.selectedVoiceChannelId,u=a[x.ChannelTypes.GUILD_CATEGORY][n];if(null==u)return null;var s=u.channel;if(!S.default.isCollapsed(s.id))return null;var d=(0,R.computeSummarizedVoiceUsers)(o[s.id],l,i);return 0===d.length?null:Z("div",{className:W.default.voiceUserSummary},n+"-footer",Z(A.default,{renderIcon:!0,users:d,max:8,showUserPopout:!0,guildId:t.props.guildId}))},t.getAnchorId=function(e,n){var r,a=t.props,o=a.categories,i=a.channels;if(null==n){var l,u,s=0===e?null:null===(l=i[x.ChannelTypes.GUILD_CATEGORY])||void 0===l||null===(u=l[e])||void 0===u?void 0:u.channel;return 0===e?"null-uncat":null==s?void 0:s.id}var d=i[x.ChannelTypes.GUILD_CATEGORY][e],f=null===(r=d?o[d.channel.id][n]:o.null[n])||void 0===r?void 0:r.channel;return null==f?void 0:f.id},t.testShouldSkipTutorial=function(){var e=t.props.categories;if(M.default.shouldShow("voice-conversations")){var n=J(e);if(null!=n){var r=n.channel,a=t._list,o=t.getChannelSectionRow(r.id);if(null!=a&&null!=o){var i=o.section,l=o.row;a.isItemVisible(i,l)&&!(0,c.default)(r)||s.default.dismiss("voice-conversations")}}else s.default.dismiss("voice-conversations")}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,q(t,n);var i=r.prototype;return i.componentDidMount=function(){this.setState({initialized:!0})},i.componentWillUnmount=function(){this.updateChannelListScroll.cancel()},i.componentDidUpdate=function(e,t){var n=this.props,r=n.scrollToChannel,a=n.guildId,o=n.channels,i=n.selectedChannelId,l=this.state.initialized,s=I.default.getGuildDimensions(a).scrollTop;null!=r?(this.scrollToChannel(r),u.default.clearChannelListScrollTo(a)):a!==e.guildId?(s||0===s)&&this.scrollTo(s):0===e.channels[T.GUILD_SELECTABLE_CHANNELS_KEY].length&&o[T.GUILD_SELECTABLE_CHANNELS_KEY].length>0||i!==e.selectedChannelId?this.scrollToChannel(i):!t.initialized&&l&&(null==s&&null!=i?this.scrollToChannel(i,!1,8,this.handleListScroll):this.scrollTo(s||0,this.handleListScroll)),this.testShouldSkipTutorial()},i.getChannelSectionRow=function(e){var t=this.props;return function(e,t,n){var r;if(null!=e&&null!=n){var a=n.indexOf(e);if(-1!==a)return{row:a,section:0}}var o=0,i=0,l=O.default.getChannel(e);if(null==l)return null;if(g.THREAD_CHANNEL_TYPES.has(l.type)&&(l=O.default.getChannel(l.parent_id)),null==l)return null;var u=l.isCategory()?l.id:null!==(r=l.parent_id)&&void 0!==r?r:"null",s=t[String(u)];return null==s?null:(t._categories.find((function(e,t){return e.channel.id===u&&(o=t,!0)})),s.find((function(e,t){return e.channel.id===l.id&&(i=t,!0)})),0===o&&null!=n&&(i+=n.length),{section:o,row:i})}(e,t.categories,t.hoistedRows)},i.scrollTo=function(e,t){var n;null===(n=this._list)||void 0===n||n.scrollTo({to:e,animate:!1,callback:t})},i.scrollToChannel=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=8);var a=this._list,o=this.getChannelSectionRow(e);null!=o&&null!=a&&a.scrollToIndex({section:o.section,row:o.row,animate:t,padding:n,callback:r})},i.isUnreadVisible=function(){var e=this.props,t=e.mutedChannels,n=e.categories,r=this._list;return null!=r&&r.getItems().some((function(e){if("row"!==e.type)return!1;var a=e.section,o=e.row,i=n._categories[a];if(null==i)return!1;var l=n[i.channel.id][o];if(null==l)return!1;var u=l.channel;if(!(0,g.isGuildTextChannelType)(u.type))return!1;var s=i.channel.id;return!(S.default.isCollapsed(s)&&N.default.isChannelMuted(u.getGuildId(),s)||t.has(u.id)||!r.isItemVisible(a,o,!0))&&b.default.hasUnread(u.id)}))},i.renderList=function(){var e=this,t=this.props,n=t.categories,r=t.guild,o=t.guildBanner,i=t.collapseMuted,l=t.mutedChannels,u=t.selectedChannel,s=t.selectedChannelId,d=t.hoistedRows,f=t.activeJoinedThreads,c=t.activeJoinedUnreadThreads,v=[];n._categories.forEach((function(e){var t=e.channel,a=n[t.id].length;if(0===a&&null!=r&&C.default.can(x.Permissions.MANAGE_CHANNELS,t)&&C.default.can(x.Permissions.VIEW_CHANNEL,t))a=1;else if(i){n[t.id].some((function(e){var t=e.channel;return t.id===s||!l.has(t.id)||(0,h.getVisibleThreadsForChannel)({channel:t,selectedChannel:u,activeJoinedThreads:f,activeJoinedUnreadThreads:c}).count>0}))||(a=0)}v.push(a)})),null!=d&&d.length>0&&(null==v[0]&&v.push(0),v[0]+=d.length);var y=this.context,m=(y.ref,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(y,["ref"]));return Z(p.FocusJumpSection,{},void 0,(function(t){return a.createElement(P.default,$({key:"guild-channels",ref:e.setListRef,className:W.default.scroller,fade:!0,sectionHeight:e.getSectionHeight,footerHeight:e.getFooterHeight,rowHeight:e.getRowHeight,paddingTop:null!=o?84:0,paddingBottom:16,renderSection:e.renderSection,renderFooter:e.renderFooter,renderRow:e.renderRow,onScroll:e.handleListScroll,sections:v,"aria-label":V.default.Messages.CHANNELS,onResize:e.handleResize,getAnchorId:e.getAnchorId},m,t))}))},i.renderTopUnread=function(){var e=this.state,t=e.topMention,n=e.bottomUnread,r=e.bottomMention,o=e.isUnreadVisible,i=this.props.guildId,l=null==t&&(o||null!=n||null!=r);return Z("div",{className:W.default.positionedContainer},void 0,a.createElement(F.default,{ref:this.unreadTopRef,textUnread:V.default.Messages.NEW_UNREADS,textMention:V.default.Messages.NEW_MENTIONS,hide:l,className:W.default.unreadTop,barClassName:W.default.unreadBar,guildId:i,isVisible:this.isChannelVisible,onJumpTo:this.jumpToChannel,onCalculate:this.handleUnreadCalculate}))},i.renderBottomUnread=function(){var e=this.props.guildId,t=this.state,n=t.bottomMention,r=t.isUnreadVisible,o=null==n&&r;return a.createElement(F.default,{reverse:!0,ref:this.unreadBottomRef,textUnread:V.default.Messages.NEW_UNREADS,textMention:V.default.Messages.NEW_MENTIONS,hide:o,className:W.default.unreadBottom,barClassName:W.default.unreadBar,guildId:e,isVisible:this.isChannelVisible,onJumpTo:this.jumpToChannel,onCalculate:this.handleUnreadCalculate})},i.render=function(){return Z(a.Fragment,{},void 0,this.renderTopUnread(),this.renderList(),this.renderBottomUnread())},r}(a.PureComponent);Q.displayName="Channels",Q.contextType=i.ListContainerContext;var ee=function(e){var t,n=e.guildId,r=e.selectedChannelId,o=(0,l.useStateFromStores)([f.default],(function(){return f.default.keyboardModeEnabled})),u=(0,E.useCanSeeThreads)(),s=(0,l.useStateFromStoresObject)([_.default],(function(){return{activeJoinedThreads:u?_.default.getActiveJoinedThreadsForGuild(n):_.NO_GUILD_JOINED_THREADS,activeJoinedUnreadThreads:u?_.default.getActiveJoinedUnreadThreadsForGuild(n):_.NO_GUILD_JOINED_THREADS}})),d=s.activeJoinedThreads,c=s.activeJoinedUnreadThreads,p=(0,l.useStateFromStores)([O.default],(function(){return O.default.getChannel(r)})),h=(0,y.default)(n),g=h.canStartEvents,S=h.canSeeEvents;((0,v.default)(n).length>0&&S||g)&&(t=[D.ChannelListHoistedRow.GUILD_SCHEDULED_EVENTS]);var I=a.useRef(null),T=a.useCallback((function(e,t){var n=I.current;null!=n&&n.scrollToChannel(t,!1,16,(function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus()}))}))}),[]),C=a.useCallback((function(){return new Promise((function(e){var t=I.current;if(null==t)return e();t.scrollTo(0,(function(){return requestAnimationFrame((function(){return e()}))}))}))}),[]),b=a.useCallback((function(){return new Promise((function(e){var t=I.current;if(null==t)return e();t.scrollTo(Number.MAX_SAFE_INTEGER,(function(){return requestAnimationFrame((function(){return e()}))}))}))}),[]),M=(0,i.default)({id:"channels",defaultFocused:null!=r?r:void 0,isEnabled:o,setFocus:T,scrollToStart:C,scrollToEnd:b}),N=M.setFocus;a.useEffect((function(){null!=r&&N(r)}),[r,N]);var A=(0,m.default)(n);return Z(i.ListNavigatorProvider,{navigator:M},void 0,a.createElement(Q,$({},e,{listNavigator:M,ref:I,activeJoinedThreads:d,activeJoinedUnreadThreads:c,selectedChannel:p,stageChannelSpeakerVoiceStates:A,hoistedRows:t})))};ee.displayName="NavigableChannels";var te=ee;t.default=te},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformParticipantToSortedVoiceState=s,t.default=function(e){return(0,a.useStateFromStores)([i.default],(function(){var t=i.default.getChannels(e);return[t.reduce((function(e,t){var n=i.default.getMutableParticipants(t.id,l.StageChannelParticipantNamedIndex.SPEAKER);return e[t.id]=n.map(s),e}),{}),t.reduce((function(e,t){var n=t.id;return e+i.default.getParticipantsVersion(n)}),0)]}),[e],u.isVersionEqual)[0]};var r,a=n(3),o=n(365),i=(r=n(302))&&r.__esModule?r:{default:r},l=n(260),u=n(734);function s(e){var t=e.voiceState,n=e.userNick;return{user:e.user,voiceState:t,nick:n,comparator:(0,o.getComparator)(t,n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(9)),i=n(680),l=n(3),u=n(8450),s=n(389),d=A(n(8458)),f=n(8463),c=A(n(9957)),p=A(n(88)),v=A(n(1212)),y=A(n(15)),m=A(n(40)),_=A(n(181)),h=A(n(29)),E=A(n(61)),g=A(n(8319)),S=A(n(149)),O=A(n(8320)),I=A(n(8536)),T=n(41),C=A(n(8436)),b=n(1),M=A(n(6)),N=A(n(7770));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function L(){return(L=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}).apply(this,arguments)}function D(e){e.stopPropagation()}var w=a.memo((function(e){var t,n,r=e.channel,f=e.connectChannelDragSource,A=e.connectChannelDropTarget,P=e.disableManageChannels,w=e.position,j=e.sortingPosition,k=e.hideIcon,U=e.children,G=(0,l.useStateFromStores)([_.default],(function(){return _.default.isChannelMuted(r.getGuildId(),r.id)})),F=(0,l.useStateFromStores)([v.default],(function(){return v.default.isCollapsed(r.id)})),B=(0,l.useStateFromStores)([m.default],(function(){return m.default.can(b.Permissions.MANAGE_CHANNELS,r)}));n=null!=j?w>j?N.default.containerDragAfter:N.default.containerDragBefore:N.default.containerDefault;var H=a.useCallback((function(){F?(0,u.categoryExpand)(r.id):(0,u.categoryCollapse)(r.id)}),[r.id,F]),x=a.useCallback((function(e){if("null"!==r.id){var t=y.default.getGuild(r.getGuildId());null!=t&&(0,s.openContextMenu)(e,(function(e){return a.createElement(c.default,L({},e,{channel:r,guild:t}))}))}}),[r]),V=a.useCallback((function(){var e=r.type===b.ChannelTypes.GUILD_CATEGORY?null:r.type,t=r.getGuildId();null!=t&&(0,T.openModal)((function(n){return a.createElement(d.default,L({},n,{channelType:e,guildId:t,categoryId:"null"!==r.id?r.id:null}))}))}),[r]),W=(0,i.useListItem)(r.id),Y=W.role,z=W.tabIndex,K=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(W,["role","tabIndex"]),$=a.useRef(null),Z=a.useRef(null),q=R("div",{className:n},void 0,R(p.default,{focusTarget:$,ringTarget:Z,offset:{left:4,right:4}},void 0,a.createElement("div",{ref:Z,className:(0,o.default)(N.default.iconVisibility,N.default.wrapper,(t={},t[N.default.collapsed]=F,t[N.default.muted]=G,t[N.default.clickable]=!0,t)),onContextMenu:x,role:Y},a.createElement(E.default,L({innerRef:$,className:N.default.mainContent,tabIndex:z},K,{onClick:H,"aria-label":M.default.Messages.CATEGORY_A11Y_LABEL.format({categoryName:r.name}),"aria-expanded":!F,focusProps:{enabled:!1}}),k?null:R(O.default,{className:N.default.icon}),R(C.default,{className:N.default.name},void 0,R(g.default,{},void 0,r.name))),R("div",{onClick:D,className:N.default.children},void 0,B&&!P?R(S.default,{text:M.default.Messages.CREATE_CHANNEL},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return R(h.default,{"aria-label":M.default.Messages.CREATE_CHANNEL,look:h.default.Looks.BLANK,size:h.default.Sizes.NONE,className:(0,o.default)(N.default.addButton,N.default.forceVisible),onClick:V,onMouseEnter:t,onMouseLeave:n,tabIndex:z,focusProps:{offset:{top:-3,right:-4,bottom:-3,left:-4}}},void 0,R(I.default,{className:N.default.addButtonIcon}))})):null))),U);return null!=A&&null!=f?A(f(q)):q})),j=(0,f.makeChannelSortable)(w);t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;h(n(0));var r,a=n(389),o=m(n(8258)),i=h(n(8253)),l=m(n(11)),u=m(n(9958)),s=m(n(9959)),d=m(n(8484)),f=m(n(8329)),c=m(n(8370)),p=m(n(8441)),v=m(n(8399)),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.channel,n=e.guild,r=e.onSelect,m=(0,p.default)(t),_=(0,v.default)(t),h=(0,s.default)(t),g=(0,u.default)(t),S=(0,c.default)(t),O=(0,d.default)(t,n),I=(0,f.default)(t),T=(0,o.default)(t.id);return l.default.isGuest()?null:E(i.default,{navId:"channel-context",onClose:a.closeContextMenu,"aria-label":y.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:r},void 0,E(i.MenuGroup,{},void 0,m),E(i.MenuGroup,{},void 0,_),E(i.MenuGroup,{},void 0,h,g,S,O),E(i.MenuGroup,{},void 0,I),E(i.MenuGroup,{},void 0,T))}g.displayName="ChannelListTextChannelContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8450),i=n(8253),l=f(n(1212)),u=f(n(10)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){return(0,a.useStateFromStores)([l.default,u.default],(function(){var t=Object.values(u.default.getMutableGuildChannels()).filter((function(t){return t.guild_id===e.guild_id&&t.type===s.ChannelTypes.GUILD_CATEGORY}));return 0===t.length||t.every((function(e){return l.default.isCollapsed(e.id)}))}))?null:p(i.MenuItem,{id:"collapse-all-categories",label:d.default.Messages.COLLAPSE_ALL_CATEGORIES,action:function(){return(0,o.categoryCollapseAll)(e.guild_id)}})}v.displayName="useCategoryCollapseAllItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8450),i=n(8253),l=s(n(1212)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.isCollapsed(e.id)}),[e.id]);return f(i.MenuCheckboxItem,{id:"collapse-category",label:u.default.Messages.COLLAPSE_CATEGORY,action:function(){return t?(0,o.categoryExpand)(e.id):(0,o.categoryCollapse)(e.id)},checked:t})}c.displayName="useCategoryCollapseItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(8)),i=n(31),l=s(n(9961)),u=s(n(7771));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.channel,n=e.selectedChannel,r=e.threads,a=(0,o.default)(r).values().sortBy("joinTimestamp").reverse().value();null==n||n.parent_id!==t.id||!i.THREAD_CHANNEL_TYPES.has(n.type)||null!=r&&n.id in r||a.unshift({channel:n,joinTimestamp:Date.now()});for(var s=1===a.length?y:2===a.length?_:E,d=[],c=a.length-3;c>0;c--)d.push(f(E,{style:{top:8+34*c+"px"}},c));return f("div",{className:u.default.container},void 0,f(s,{}),d,a.map((function(e){return f(l.default,{thread:e.channel,selected:(null==n?void 0:n.id)===e.channel.id},e.channel.id)})))}c.displayName="GuildSidebarThreadList";var p=a.memo(c);t.default=p;var v=f("path",{d:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",fill:"currentColor"}),y=function(){return f("svg",{className:u.default.spine,width:"12",height:"11",viewBox:"0 0 12 11",fill:"none"},void 0,v)};y.displayName="Spine1";var m=f("path",{d:"M2 1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V41C0 43.2091 1.79086 45 4 45H11C11.5523 45 12 44.5523 12 44C12 43.4477 11.5523 43 11 43H4C2.89543 43 2 42.1046 2 41V13C2 11.8954 2.89543 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9H4C2.89543 9 2 8.10457 2 7V1Z",fill:"currentColor"}),_=function(){return f("svg",{className:u.default.spine,width:"12",height:"45",viewBox:"0 0 12 45",fill:"none"},void 0,m)};_.displayName="Spine2";var h=f("path",{d:"M1 0C0.447715 0 0 0.447713 0 0.999998V75C0 77.2091 1.79086 79 4 79H11C11.5523 79 12 78.5523 12 78C12 77.4477 11.5523 77 11 77H4C2.89543 77 2 76.1046 2 75V47C2 45.8954 2.89543 45 4 45H11C11.5523 45 12 44.5523 12 44C12 43.4477 11.5523 43 11 43H4C2.89543 43 2 42.1046 2 41V13C2 11.8954 2.89543 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0Z",fill:"currentColor"}),E=function(e){var t=e.style;return f("svg",{className:u.default.spine,width:"12",height:"79",viewBox:"0 0 12 79",fill:"none",style:t},void 0,h)};E.displayName="Spine3"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=n(680),l=n(3),u=I(n(391)),s=n(389),d=I(n(8397)),f=I(n(88)),c=n(42),p=I(n(8265)),v=n(392),y=I(n(10)),m=I(n(200)),_=I(n(61)),h=I(n(8319)),E=n(8263),g=I(n(6)),S=I(n(7346)),O=I(n(7357));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(){return(b=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}).apply(this,arguments)}function M(e){var t,n,r=e.thread,I=e.selected,T=(0,l.useStateFromStoresObject)([m.default],(function(){return{unread:m.default.hasUnread(r.id),mentionCount:m.default.getMentionCount(r.id)}})),M=T.unread,N=T.mentionCount,A=a.useCallback((function(e){e.shiftKey?p.default.openThreadSidebarForViewing(r):(0,c.transitionToThread)(r.guild_id,r.id,v.OpenThreadAnalyticsLocations.CHANNEL_LIST)}),[r]),P=a.useCallback((function(){u.default.preload(r.guild_id,r.id)}),[r.guild_id,r.id]),R=a.useCallback((function(e){var t=y.default.getChannel(r.id);null!=t&&(0,s.openContextMenu)(e,(function(e){return a.createElement(d.default,b({},e,{channel:t}))}))}),[r.id]),L=(0,i.useListItem)(r.id),D=L.role,w=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(L,["role"]),j=a.useRef(null),k=a.useRef(null),U=(N>0?g.default.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:M?g.default.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_UNREADS:g.default.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL).format({channelName:r.name,mentionCount:N});return C("div",{className:(0,o.default)(S.default.containerDefault,(t={},t[S.default.selected]=I,t))},void 0,C(f.default,{focusTarget:j,ringTarget:k,offset:{top:2,bottom:2,right:4}},void 0,C("div",{className:(0,o.default)(S.default.iconVisibility,O.default.wrapper,O.default.typeThread,(n={},n[O.default.modeSelected]=I,n[O.default.modeUnread]=!I&&M,n)),onMouseDown:P,onContextMenu:R,role:D},void 0,M&&!I?C("div",{className:O.default.unread}):null,a.createElement("div",{className:O.default.content,ref:k},a.createElement(_.default,b({innerRef:j,className:(0,o.default)(O.default.mainContent,O.default.threadMainContent),onClick:A},w,{"aria-label":U,focusProps:{enabled:!1}}),C(h.default,{className:(0,o.default)(O.default.name,O.default.channelName),"aria-hidden":!0},void 0,r.name),C("div",{className:O.default.children},void 0,null!=N&&N>0?C("div",{className:S.default.mentionsBadge,"aria-hidden":!0},void 0,C(E.NumberBadge,{count:N})):null))))))}M.displayName="GuildSidebarThreadListEntry";var N=a.memo(M);t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=W;var r,a=j(n(0)),o=D(n(9)),i=n(3),l=n(389),u=n(8463),s=n(8671),d=D(n(8693)),f=n(42),c=n(1232),p=n(1260),v=n(260),y=D(n(81)),m=j(n(9982)),_=D(n(1212)),h=D(n(10)),E=D(n(15)),g=D(n(1219)),S=D(n(40)),O=D(n(80)),I=D(n(696)),T=D(n(24)),C=n(292),b=D(n(8537)),M=D(n(8538)),N=D(n(8763)),A=n(1),P=D(n(6)),R=D(n(7346)),L=D(n(7782));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(){return(k=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}).apply(this,arguments)}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e){var t=e.getGuildId();if(null==t)throw new Error("StageChannel, transitionTo: Channel does not have a guildId");(0,f.transitionTo)(A.Routes.CHANNEL(t,e.id))}var B=G(I.default,{width:16,height:16});function H(e){var t=e.numAudience;return G("div",{className:L.default.audienceVoiceUserContainer},void 0,G("div",{className:L.default.audienceVoiceUserIconContainer},void 0,B),G(T.default,{className:L.default.audienceVoiceUserText,size:T.default.Sizes.SIZE_14},void 0,t>0?P.default.Messages.STAGE_CHANNEL_AUDIENCE_COUNT.format({userCount:t}):P.default.Messages.STAGE_CHANNEL_NO_AUDIENCE))}H.displayName="AudienceVoiceUser";var x=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props,n=e.channel,r=e.connectAction,a=e.locked,o=e.connected;switch(a||o||(0,c.connectAndOpen)(n),__OVERLAY__||F(n),r){case m.ChannelConnectAction.NORMAL:case m.ChannelConnectAction.START_EVENT:}},t.handleContextMenu=function(e){var n=t.props.channel,r=E.default.getGuild(n.getGuildId());null!=r&&(0,l.openContextMenu)(e,(function(e){return a.createElement(d.default,k({},e,{channel:n,guild:r}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,U(t,n);var i=r.prototype;return i.getVoiceStatesCount=function(){var e,t=this.props.voiceStates;return null!==(e=null==t?void 0:t.length)&&void 0!==e?e:0},i.isFull=function(){var e=this.props.channel;return(0,C.isChannelFull)(e,O.default,E.default)},i.getModeClass=function(){var e=this.props,t=e.position,n=e.sortingPosition;return e.isUserOver?R.default.containerUserOver:null!=n?t>n?R.default.containerDragAfter:R.default.containerDragBefore:R.default.containerDefault},i.renderVoiceUsers=function(){var e=this.props,t=e.channel,n=e.voiceStates,r=e.collapsed,a=e.categoryCollapsed,o=e.tabIndex,i=e.speakerVoiceStates,l=e.numAudience,u=r||a;return G(N.default,{channel:t,voiceStates:i,collapsed:u,tabIndex:o},void 0,u||0===n.length?null:G(H,{numAudience:l}))},i.render=function(){var e,t,n=this.props,r=n.channel,a=n.selected,i=n.connected,l=n.locked,u=n.connectChannelDropTarget,s=n.connectChannelDragSource,d=n.connectUserDropTarget,f=n.connectDragPreview,c=n.canManageCategory,p=n.canMoveMembers,v=n.stageInstance,y=G("div",{className:(0,o.default)(this.getModeClass(),(e={},e[R.default.disabled]=this.isDisabled(),e))},void 0,G(M.default,{className:R.default.iconVisibility,iconClassName:(0,o.default)((t={},t[L.default.iconLive]=null!=v,t)),channel:r,selected:a,connected:i,locked:l,onClick:this.handleClick,onContextMenu:this.handleContextMenu,connectDragPreview:f,subtitle:null==v?void 0:v.topic,"aria-label":P.default.Messages.STAGE_VOICE_CHANNEL},void 0,this.renderInviteButton(),this.renderEditButton()),this.renderVoiceUsers());return p&&(y=d(y)),c&&(y=u(s(y))),y},r}(b.default);x.displayName="StageChannel";var V=(0,u.makeChannelSortable)((0,s.makeVoiceUserDroppable)(x));function W(e){var t=e.guild,n=e.channel,r=(0,i.useStateFromStoresObject)([S.default,h.default,g.default],(function(){var e=h.default.getChannel(n.parent_id),r=g.default.getCheck(n.guild_id);return{canManageChannel:t&&S.default.can(A.Permissions.MANAGE_CHANNELS,n),canManageCategory:null!=e?S.default.can(A.Permissions.MANAGE_CHANNELS,e):null!=t&&S.default.can(A.Permissions.MANAGE_CHANNELS,t),canMoveMembers:S.default.can(A.Permissions.MOVE_MEMBERS,n),locked:!S.default.can(A.Permissions.CONNECT,n),bypassLimit:S.default.can(A.Permissions.MOVE_MEMBERS,n),unverifiedAccount:!r.canChat}})),o=(0,i.useStateFromStores)([_.default],(function(){return _.default.isCollapsed(n.parent_id)})),l=(0,m.default)(n.id),u=(0,i.useStateFromStores)([y.default],(function(){return y.default.getStageInstanceByChannel(n.id)}),[n.id]),s=(0,p.useStageParticipantsCount)(n.id,v.StageChannelParticipantNamedIndex.AUDIENCE);return a.createElement(V,k({categoryCollapsed:o},r,e,{connectAction:l,numAudience:s,stageInstance:u}))}W.displayName="ConnectedStageChannel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=s(n(8768)),i=n(8253),l=s(n(9023)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.isCollapsed(e.id)}),[e.id]);return __OVERLAY__?null:f(i.MenuCheckboxItem,{id:"hide-voice-names",label:u.default.Messages.VOICE_CHANNEL_HIDE_NAMES,action:function(){return o.default.update(e.id)},checked:t})}c.displayName="useChannelHideNamesItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9965)),o=n(9966),i=n(8253),l=n(8256),u=f(n(81)),s=f(n(8431)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){a.default.trackExposure({});var t=a.default.useExperiment({})[0],n=u.default.isLive(e.id);if(!e.isGuildStageVoice()||!n||!t.reportModal)return null;return p(i.MenuItem,{id:"report-stage",label:d.default.Messages.REPORT_MODAL_REPORT_STAGE_MENU_ITEM,action:function(){return(0,o.showReportModalForStageChannel)(e)},icon:s.default,color:l.MenuItemColor.DANGER})}v.displayName="useChannelReportStageItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-05_stages_in_app_reporting_experiment",label:"Stages In App Reporting Experiment",defaultConfig:{reportModal:!1},treatments:[{id:1,label:"Can see in-app reporting modal",config:{reportModal:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showReportModalForGuild=function(e){_({name:d.ReportNames.GUILD,record:e})},t.showReportModalForMessage=function(e){_({name:d.ReportNames.MESSAGE,record:e})},t.showReportModalForStageChannel=function(e){var t=o.default.getStageInstanceByChannel(e.id);if(!t)return;_({name:d.ReportNames.STAGE_CHANNEL,record:t})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(81)),i=n(703),l=n(85),u=n(35),s=n(41),d=n(9967),f=c(n(9968));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.reportType,n=e.menu,r=e.modalProps,o=(0,l.useUID)(),s=n.nodes,c=n.root_node_id,p=n.success_node_id,v=n.fail_node_id,m=a.useState(c),_=m[0],h=m[1],E=a.useState(void 0),g=E[0],S=E[1],O=a.useState([]),I=O[0],T=O[1],C=function(e){var t=e.destination[1];T([].concat(I,[e])),S(void 0),h(t)},b=function(){return(0,d.submitReport)(n,t,I)},M=function(){var e;if(!(I.length<1)){var t=[].concat(I),n=t.pop();S(null==n||null===(e=n.multiSelect)||void 0===e?void 0:e.state),h((null==n?void 0:n.nodeRef)||c),T(t)}},N=[];for(var A in s){var P=s[A];P.id!==p&&P.id!==v&&N.push(P)}return N.push(s[p],s[v]),y(u.ModalRoot,{transitionState:r.transitionState,"aria-labelledby":o},void 0,y(i.Slides,{width:440,activeSlide:_},void 0,N.map((function(e){return y(i.Slide,{id:e.id},e.id,y(f.default,{node:e,reportType:t,history:I,onModalClose:r.onClose,onSelectChild:C,onNavigateBack:M,multiSelect:g,successNodeId:p,failNodeId:v,onSubmit:b}))}))))};m.displayName="InAppReportModal";var _=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,d.getReportMenu)(t.name);case 3:n=e.sent,(0,s.openModal)((function(e){return y(m,{menu:n,reportType:t,modalProps:e})})),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getReportMenu=function(e){return f.apply(this,arguments)},t.submitReport=function(e,t,n){return a.default.post({url:i.Endpoints.SUBMIT_REPORT_MENU(t.name),body:c(e,t,n)})},t.getTitleAsChild=t.ReportNames=void 0;var r,a=l(n(14)),o=l(n(97)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))}}function f(){return(f=d(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get({url:i.Endpoints.GET_REPORT_MENU(t)});case 2:return r=e.sent,e.abrupt("return",null!==(n=r.body)&&void 0!==n?n:JSON.parse(r.text));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.ReportNames=r,function(e){e.GUILD="guild",e.MESSAGE="message",e.STAGE_CHANNEL="stage_channel"}(r||(t.ReportNames=r={}));var c=function(e,t,n){var a=e.version,i=e.variant,l=e.language,s={id:o.default.fromTimestamp(Date.now()),version:a,variant:i,language:null!=l?l:"en",breadcrumbs:n.map((function(e){return e.destination[1]})),elements:n.reduce((function(e,t){var n,r=t.multiSelect;return null==r?e:u({},e,((n={})[r.name]=Object.keys(r.state),n))}),{})};if(t.name===r.MESSAGE){var d=t.record,f=d.channel_id,c=d.id;return u({},s,{name:t.name,channel_id:f,message_id:c,guild_id:void 0,stage_instance_id:void 0})}if(t.name===r.GUILD){var p=t.record.id;return u({},s,{name:t.name,channel_id:void 0,message_id:void 0,stage_instance_id:void 0,guild_id:p})}if(t.name===r.STAGE_CHANNEL){var v=t.record,y=v.id,m=v.guild_id,_=v.channel_id;return u({},s,{name:t.name,channel_id:_,message_id:void 0,guild_id:m,stage_instance_id:y})}return null};t.getTitleAsChild=function(e){var t;return null!==(t=e.menu_name)&&void 0!==t?t:e.header}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(55)),i=n(35),l=E(n(9969)),u=E(n(9970)),s=E(n(9971)),d=E(n(9972)),f=E(n(9973)),c=E(n(9974)),p=E(n(9975)),v=E(n(9976)),y=E(n(9977)),m=E(n(9978)),_=E(n(9979)),h=E(n(7781));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e,t){return e.elements.find((function(e){return e.type===t}))}var T=function(e){var t=e.node,n=e.reportType,r=e.history,E=e.onSelectChild,g=e.onModalClose,T=e.multiSelect,C=a.useState(!1),b=C[0],M=C[1],N=a.useState(!1),A=N[0],P=N[1],R=a.useState((function(){return{}})),L=R[0],D=R[1],w=I(t,"checkbox"),j=a.useMemo((function(){return function(e){return E({nodeRef:t.id,destination:e,multiSelect:w&&{name:w.name,state:L}})}}),[t,E,w,L]);a.useEffect((function(){T&&D(T)}),[T]);return S("div",{className:h.default.container},void 0,S(i.ModalCloseButton,{className:h.default.closeButton,onClick:g}),S(i.ModalHeader,{separator:!1,direction:o.default.Direction.VERTICAL,className:h.default.header},void 0,S(_.default,{element:I(t,"success")}),S(c.default,{node:t}),S(p.default,{node:t})),S(i.ModalContent,{className:h.default.body},void 0,I(t,"breadcrumbs")&&S(s.default,{history:r}),I(t,"message_preview")&&"message"===n.name&&S(v.default,{message:n.record}),I(t,"block_users")&&"message"===n.name&&S(u.default,{userId:n.record.author.id}),I(t,"channel_preview")&&"stage_channel"===n.name&&S(m.default,{stageInstance:n.record}),w&&S(y.default,{element:w,onChange:function(e,t){var n=O({},L);e in L?delete n[e]:n[e]=t,D(n)},state:L}),S(d.default,{node:t,onSelectChild:j}),S(f.default,{hasError:A,onClose:function(){P(!1)}})),S(l.default,{button:t.button,submitting:b,onClick:function(t){switch(t.type){case"done":case"cancel":g();break;case"next":j(["",t.target]);break;case"submit":M(!0),e.onSubmit().then((function(){P(!1),j(["",e.successNodeId])})).catch((function(){P(!0)})).finally((function(){M(!1)}))}},onBackClicked:e.onNavigateBack,canNavigateBack:!!r.length}))};T.displayName="NodeView";var C=T;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(29)),o=s(n(55)),i=n(35),l=s(n(6)),u=s(n(7772));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.button,n=e.submitting,r=e.onClick,s=e.canNavigateBack,d=e.onBackClicked,c=!!t&&"cancel"!==t.type,p=s&&"done"!==(null==t?void 0:t.type);if(!(c||p))return null;var v,y=l.default.Messages.DONE;return"submit"===(null==t?void 0:t.type)?(y=l.default.Messages.MOBILE_REPORTS_SUBMIT_REPORT,v=a.default.Colors.RED):"next"===(null==t?void 0:t.type)?y=l.default.Messages.NEXT:"cancel"===(null==t?void 0:t.type)&&(y=l.default.Messages.CANCEL,v=a.default.Colors.TRANSPARENT),f(i.ModalFooter,{direction:o.default.Direction.HORIZONTAL},void 0,p&&f(a.default,{onClick:d,color:a.default.Colors.TRANSPARENT,disabled:n},void 0,l.default.Messages.BACK),c&&f(a.default,{onClick:function(){t&&r(t)},color:v,className:u.default.actionButton,disabled:n},void 0,y))};c.displayName="InAppReportsNodeFooter";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=v(n(1217)),l=v(n(70)),u=v(n(12)),s=v(n(29)),d=v(n(279)),f=v(n(24)),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.userId,n=a.useState(!1),r=n[0],v=n[1],y=(0,o.useStateFromStores)([u.default],(function(){return u.default.getUser(t)}),[t]),_=(0,o.useStateFromStores)([l.default],(function(){return l.default.getRelationshipType(t)}),[t])===c.RelationshipTypes.BLOCKED;a.useEffect((function(){v(_)}),[_]);var h=a.useCallback((function(){v(!0),i.default.addRelationship(t,{location:"ReportMenuBlockUser-iOS"},c.RelationshipTypes.BLOCKED)}),[t]);return y?m("div",{},void 0,m(f.default,{},void 0,p.default.Messages.MOBILE_REPORTS_BLOCK_ELEMENT_HEADER),m(f.default,{},void 0,p.default.Messages.MOBILE_REPORTS_BLOCK_ELEMENT_DESCRIPTION),m(d.default,{size:d.default.Sizes.SIZE_32,src:y.getAvatarURL(void 0)}),m(f.default,{},void 0,y.username,m(f.default,{},void 0,"#",y.discriminator)),m(s.default,{onClick:function(){return h()},disabled:r,size:s.default.Sizes.SMALL,color:s.default.Colors.RED},void 0,r?p.default.Messages.BLOCKED:p.default.Messages.BLOCK)):null};_.displayName="BlockUserElement";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8),o=s(n(47)),i=s(n(24)),l=s(n(6)),u=s(n(7773));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=(0,a.flatMap)(e.history,(function(e){var t,n=e.destination[0],r=e.multiSelect,a=[null,null],o=Object.values(null!==(t=null==r?void 0:r.state)&&void 0!==t?t:{});return o.length>0&&(a[0]=o.join(", ")),""!==n&&(a[1]=n),a})).filter((function(e){return null!=e}));return 0===t.length?null:f("div",{className:u.default.container},void 0,f(o.default,{className:u.default.breadcrumbsHeader,color:i.default.Colors.HEADER_SECONDARY},void 0,l.default.Messages.MOBILE_REPORTS_BREADCRUMBS_TITLE),t.map((function(e,t){return f("div",{className:u.default.breadcrumbContainer},e+"+"+t,f("div",{className:u.default.breadcrumbDot}),f(i.default,{size:i.default.Sizes.SIZE_16,className:u.default.breadcrumbText},void 0,e))})))};c.displayName="BreadcrumbsElement";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(61)),o=u(n(683)),i=u(n(24)),l=u(n(7774));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=function(e){var t=e.child,n=e.onClick,r=t[0];return d(a.default,{className:l.default.childButton,onClick:function(){return n(t)}},void 0,d(i.default,{className:l.default.childText,size:i.default.Sizes.SIZE_16},void 0,r),d(o.default,{className:l.default.childIcon,direction:o.default.Directions.RIGHT}))};f.displayName="ChildElement";var c=function(e){var t=e.node.children,n=e.onSelectChild;if(null==t||0===t.length)return null;var r=t.map((function(e){var t=e[0],r=e[1];return d(f,{child:e,onClick:n},t+"+"+r)}));return d("div",{className:l.default.childrenContainer},void 0,r)};c.displayName="ChildrenElement";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(61)),o=s(n(5827)),i=s(n(24)),l=s(n(6)),u=s(n(7775));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.hasError,n=e.onClose;if(!t)return null;return f("div",{className:u.default.errorContainer},void 0,f(o.default,{width:20,height:20,className:u.default.errorIcon}),f(i.default,{className:u.default.errorText},void 0,l.default.Messages.MOBILE_REPORTS_SUBMIT_FAILED),f(a.default,{onClick:function(){n()},"aria-label":l.default.Messages.DISMISS,className:u.default.closeIcon}))};c.displayName="ErrorElement";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(101)),i=c(n(8295)),l=c(n(271)),u=c(n(47)),s=c(n(24)),d=c(n(6)),f=c(n(7776));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}var m=y({},o.default.defaultRules.link,{react:function(e,t,n){return v(l.default,{href:e.target,target:"_blank"},void 0,t(e.content,n))}}),_=function(e){var t=e.node,n=t.header,r=t.subheader,o=t.button,l="submit"===(null==o?void 0:o.type),c=a.useRef(i.default.reactParserFor(y({},i.default.defaultRules,{link:m})));return v("div",{className:f.default.headerContainer},void 0,n&&v(u.default,{tag:u.default.Tags.H1,size:u.default.Sizes.SIZE_24,color:s.default.Colors.HEADER_PRIMARY},void 0,n),r&&v(s.default,{size:s.default.Sizes.SIZE_16,color:s.default.Colors.HEADER_SECONDARY},void 0,c.current(r)),l&&v(s.default,{},void 0,d.default.Messages.MOBILE_REPORTS_SUBMIT_INFO_TEXT.format()))};_.displayName="HeaderElement";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;u(n(0));var r,a,o=u(n(8353)),i=(r=n(7777))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.node.info;return null==t?null:s(o.default,{className:i.default.infoBox,messageType:o.HelpMessageTypes.INFO},void 0,t)};d.displayName="InfoElement";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(24)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(e){var t=e.message;return u("div",{},void 0,u(a.default,{},void 0,o.default.Messages.MOBILE_REPORTS_MESSAGE_PREVIEW_TITLE),u(a.default,{},void 0,t.content))};s.displayName="MessagePreviewElement";var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(1160)),o=l(n(24)),i=l(n(7778));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.onChange,n=e.label,r=e.selected;return s("div",{className:i.default.checkboxRow},void 0,s(a.default,{type:a.default.Types.INVERTED,onChange:function(){return t()},value:r},void 0,s(o.default,{color:o.default.Colors.INTERACTIVE_ACTIVE,size:o.default.Sizes.SIZE_16},void 0,n)))};d.displayName="CheckboxRow";var f=function(e){var t=e.element,n=e.state,r=e.onChange;return"checkbox"!==(null==t?void 0:t.type)?null:s("div",{},void 0,t.data.map((function(e,t){var a=e[0],o=e[1];return s(d,{onChange:function(){return r(a,o)},selected:a in n,label:o},t+"+button")})))};f.displayName="MultiSelectElement";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(15)),o=d(n(371)),i=d(n(47)),l=d(n(24)),u=d(n(6)),s=d(n(7779));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=function(e){var t=e.stageInstance,n=a.default.getGuild(t.guild_id);return n?c("div",{className:s.default.container},void 0,c(i.default,{className:s.default.header},void 0,u.default.Messages.MOBILE_REPORTS_STAGE_CHANNEL_PREVIEW_TITLE),c("div",{className:s.default.guildContainer},void 0,c("div",{className:s.default.guildInfo},void 0,c(o.default,{guild:n,size:o.default.Sizes.MINI,className:s.default.guildIcon}),c(l.default,{color:l.default.Colors.HEADER_SECONDARY},void 0,n.name)),c(l.default,{size:l.default.Sizes.SIZE_16,color:l.default.Colors.HEADER_PRIMARY,className:s.default.channelTopic},void 0,t.topic))):null};p.displayName="StageChannelPreviewElement";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(7780))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var u=n(9980),s=function(e){var t=e.element;return"success"!==(null==t?void 0:t.type)?null:l("img",{alt:"",src:u,className:o.default.successImg})};s.displayName="SuccessElement";var d=s;t.default=d},function(e,t,n){e.exports=n.p+"bdbd49069c7a6d9e21adcca22803c386.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(8253),l=n(8256),u=n(301),s=n(203),d=y(n(40)),f=y(n(466)),c=n(41),p=y(n(24)),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){var n=(0,o.useStateFromStores)([d.default],(function(){return d.default.can(s.MODERATE_STAGE_CHANNEL_PERMISSIONS,e)}),[e]);if(null==t||!n)return null;return h(i.MenuItem,{id:"end-stage",label:v.default.Messages.END_STAGE,color:l.MenuItemColor.DANGER,action:function(){(0,c.openModal)((function(t){return a.createElement(f.default,_({},t,{header:v.default.Messages.END_STAGE_TITLE,confirmText:v.default.Messages.END_STAGE,cancelText:v.default.Messages.CANCEL,onConfirm:function(){return(0,u.endStage)(e)}}),h(p.default,{size:p.default.Sizes.SIZE_16,color:p.default.Colors.HEADER_SECONDARY},void 0,v.default.Messages.EXPLICIT_END_STAGE_SUBTITLE))}))}})}E.displayName="useEndStageItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStageChannelStartEvent=function(e){var t=(0,o.default)(e),n=(0,a.default)(e).moderator;return{isLive:t,isModerator:n}},t.default=function(e){var t=(0,o.default)(e),n=(0,a.default)(e).moderator;if(!t&&n)return r.START_EVENT;return r.NORMAL},t.ChannelConnectAction=void 0;var r,a=i(n(9159)),o=i(n(9983));function i(e){return e&&e.__esModule?e:{default:e}}t.ChannelConnectAction=r,function(e){e[e.NORMAL=0]="NORMAL",e[e.START_EVENT=1]="START_EVENT"}(r||(t.ChannelConnectAction=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.useStateFromStores)([o.default],(function(){return o.default.isLive(e)}),[e])};var r,a=n(3),o=(r=n(81))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=n(3),l=g(n(391)),u=n(389),s=n(8463),d=g(n(8694)),f=g(n(9025)),c=n(42),p=g(n(10)),v=g(n(15)),y=g(n(40)),m=g(n(8537)),_=g(n(8538)),h=n(1),E=g(n(7346));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e){var t=e.getGuildId();if(null==t)throw new Error("TextChannel, transitionTo: Channel does not have a guildId");(0,c.transitionTo)(h.Routes.CHANNEL(t,e.id),{state:{analyticsSource:{page:h.AnalyticsPages.GUILD_CHANNEL,section:h.AnalyticsSections.CHANNEL_LIST,object:h.AnalyticsObjects.CHANNEL}}})}function b(e,t){var n=t.getGuildId();if(null==n)throw new Error("TextChannel, preloadChannel: Channel does not have a guildId");l.default.preload(n,t.id)}var M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleContextMenu=function(e){var n=t.props.channel,r=v.default.getGuild(n.getGuildId());null!=r&&(0,u.openContextMenu)(e,(function(e){return a.createElement(f.default,I({},e,{channel:n,guild:r}))}))},t.handleClick=function(e){C(e)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n),r.prototype.render=function(){var e,t=this.props,n=t.channel,r=t.selected,a=t.connectChannelDropTarget,i=t.connectChannelDragSource,l=t.connectDragPreview,u=t.canManageCategory,s=O("div",{className:(0,o.default)(this.getClassName(),(e={},e[E.default.disabled]=this.isDisabled(),e))},void 0,O(_.default,{className:E.default.iconVisibility,channel:n,selected:r,onClick:this.handleClick,onMouseDown:b,onContextMenu:this.handleContextMenu,connectDragPreview:u?l:null,"aria-label":(0,d.default)(n)},void 0,this.renderInviteButton(),this.renderEditButton()));return u?a(i(s)):s},r}(m.default);M.displayName="StoreChannel";var N=(0,s.makeChannelSortable)(M),A=a.memo((function(e){var t=e.channel,n=e.guild,r=(0,i.useStateFromStoresObject)([p.default,y.default],(function(){var e=p.default.getChannel(t.parent_id);return{canManageChannel:y.default.can(h.Permissions.MANAGE_CHANNELS,t),canManageCategory:null!=e?y.default.can(h.Permissions.MANAGE_CHANNELS,e):y.default.can(h.Permissions.MANAGE_CHANNELS,n)}}));return a.createElement(N,I({},r,e))}));t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=L;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=n(3),l=C(n(391)),u=n(389),s=n(8463),d=C(n(8694)),f=C(n(9026)),c=n(1209),p=C(n(10)),v=C(n(86)),y=C(n(15)),m=C(n(40)),_=C(n(200)),h=C(n(278)),E=n(8263),g=C(n(9986)),S=C(n(8537)),O=C(n(8538)),I=n(1),T=C(n(7346));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={shouldShowThreadsPopout:!1},t.enterTimer=0,t.exitTimer=0,t.handleMouseEnter=function(){t.resetThreadPopoutTimers(),t.enterTimer=setTimeout((function(){t.setState({shouldShowThreadsPopout:!0})}),200)},t.handleMouseLeave=function(){t.resetThreadPopoutTimers(),t.exitTimer=setTimeout((function(){t.state.shouldShowThreadsPopout&&t.setState({shouldShowThreadsPopout:!1})}),250)},t.handleThreadsPopoutClose=function(){t.resetThreadPopoutTimers(),t.setState({shouldShowThreadsPopout:!1})},t.handleMouseDown=function(){t.handleThreadsPopoutClose();var e=t.props.channel,n=e.getGuildId();if(null==n)throw new Error("TextChannel, preloadChannel: Channel does not have a guildId");l.default.preload(n,e.id)},t.renderThreadsPopout=function(e){return a.createElement(g.default,N({},e,{channel:t.props.channel}))},t.handleContextMenu=function(e){var n=t.props.channel,r=y.default.getGuild(n.getGuildId());null!=r&&(0,u.openContextMenu)(e,(function(e){return a.createElement(f.default,N({},e,{channel:n,guild:r}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var i=r.prototype;return i.componentWillUnmount=function(){this.resetThreadPopoutTimers()},i.resetThreadPopoutTimers=function(){clearTimeout(this.enterTimer),clearTimeout(this.exitTimer)},i.renderMentionBadge=function(){var e=this.props.mentionCount;if(null!=e&&e>0)return M("div",{className:T.default.mentionsBadge,"aria-hidden":!0},void 0,M(E.NumberBadge,{count:e}))},i.render=function(){var e,t=this,n=this.props,r=n.channel,a=n.guild,i=n.selected,l=n.muted,u=n.unread,s=n.hasActiveThreads,f=n.hasActiveUnjoinedThreads,c=n.mentionCount,p=n.connectChannelDropTarget,v=n.connectChannelDragSource,y=n.connectDragPreview,m=n.canManageCategory,_=M("div",{className:(0,o.default)(this.getClassName(),(e={},e[T.default.disabled]=this.isDisabled(),e[T.default.selected]=i,e)),onMouseEnter:f?this.handleMouseEnter:void 0,onMouseLeave:f?this.handleMouseLeave:void 0},void 0,M(h.default,{position:h.default.Positions.RIGHT,renderPopout:this.renderThreadsPopout,onRequestClose:this.handleThreadsPopoutClose,spacing:0,shouldShow:f&&this.state.shouldShowThreadsPopout},void 0,(function(){return M(O.default,{className:T.default.iconVisibility,channel:r,guild:a,selected:i,muted:l,unread:u,hasActiveThreads:s,onMouseDown:t.handleMouseDown,onContextMenu:t.handleContextMenu,connectDragPreview:m?y:null,"aria-label":(0,d.default)(r,u,c)},void 0,t.renderInviteButton(),t.renderEditButton(),t.renderMentionBadge())})));return m?p(v(_)):_},r}(S.default);P.displayName="TextChannel";var R=(0,s.makeChannelSortable)(P);function L(e){var t=e.channel,n=e.guild,r=(0,i.useStateFromStores)([v.default],(function(){return t===v.default.getDefaultChannel(n.id)})),o=(0,c.useHasActiveThreads)(t),l=o.hasActiveThreads,u=o.hasActiveUnjoinedThreads,s=(0,i.useStateFromStoresObject)([_.default],(function(){return{unread:_.default.hasUnread(t.id),mentionCount:_.default.getMentionCount(t.id)}})),d=(0,i.useStateFromStoresObject)([m.default,p.default],(function(){var e=p.default.getChannel(t.parent_id);return{canManageChannel:m.default.can(I.Permissions.MANAGE_CHANNELS,t),canManageCategory:null!=e?m.default.can(I.Permissions.MANAGE_CHANNELS,e):m.default.can(I.Permissions.MANAGE_CHANNELS,n)}}));return a.createElement(R,N({},s,d,e,{isDefaultChannel:r,hasActiveThreads:l,hasActiveUnjoinedThreads:u}))}L.displayName="ConnectedTextChannel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=M(n(0)),o=C(n(8)),i=n(3),l=M(n(5957)),u=n(42),s=C(n(300)),d=C(n(8265)),f=n(392),c=n(698),p=C(n(8923)),v=C(n(40)),y=C(n(200)),m=C(n(12)),_=C(n(61)),h=n(41),E=C(n(24)),g=C(n(150)),S=C(n(97)),O=n(1),I=C(n(6)),T=C(n(7783));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e){var t=e.channel,n=(0,i.useStateFromStoresArray)([s.default,y.default,v.default],(function(){return(0,o.default)(s.default.getActiveUnjoinedThreadsForParent(t.guild_id,t.id)).values().filter((function(e){return v.default.can(O.Permissions.VIEW_CHANNEL,e)})).sort((function(e,t){var n=y.default.lastMessageId(e.id),r=y.default.lastMessageId(t.id);return S.default.compare(n,r)})).reverse().value()}));return a.useEffect((function(){(0,c.trackActiveThreadsPopoutOpened)()}),[]),A("div",{className:T.default.popout},void 0,A(E.default,{className:T.default.title,size:E.default.Sizes.SIZE_12,color:E.default.Colors.HEADER_SECONDARY},void 0,I.default.Messages.ACTIVE_THREADS_POPOUT_HEADER),n.slice(0,3).map((function(e){return A(R,{thread:e},e.id)})),A(_.default,{className:T.default.more,onClick:function(){(0,h.openModal)((function(e){return a.createElement(p.default,N({channel:t},e))}))}},void 0,A(E.default,{size:E.default.Sizes.SIZE_14,color:E.default.Colors.CUSTOM},void 0,I.default.Messages.ACTIVE_THREADS_POPOUT_LINK)))}function R(e){var t=e.thread,n=(0,i.useStateFromStores)([m.default],(function(){return m.default.getUser(t.ownerId)})),r=(0,c.getTimestampString)(S.default.extractTimestamp(y.default.lastMessageId(t.id)));return A(_.default,{className:T.default.row,onClick:function(e){e.shiftKey?d.default.openThreadSidebarForViewing(t):(0,u.transitionToThread)(t.guild_id,t.id,f.OpenThreadAnalyticsLocations.POPOUT)}},void 0,null==n?A("img",{className:T.default.avatar,src:g.default.getDefaultAvatarURL(),alt:""}):A(l.default,{className:T.default.avatar,user:n,size:l.Sizes.SIZE_16}),A(E.default,{className:T.default.name,size:E.default.Sizes.SIZE_14,color:E.default.Colors.CUSTOM},void 0,t.name),A(E.default,{className:T.default.timestamp,size:E.default.Sizes.SIZE_14,color:E.default.Colors.CUSTOM},void 0,A("span",{className:T.default.bullet},void 0,"•"),r))}P.displayName="ActiveThreadsPopout",R.displayName="Row"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=n(8689),i=f(n(10)),l=f(n(200)),u=f(n(181)),s=f(n(161)),d=f(n(9027));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e){var t=i.default.getChannel(e);return null!=t&&null!=t.getGuildId()&&(!u.default.isChannelMuted(t.getGuildId(),t.id)&&l.default.hasUnread(e))}function y(e){var t=i.default.getChannel(e);if(null==t)return!1;var n=t.getGuildId();if(null==n)return!1;var r=u.default.isGuildCollapsed(n),a=u.default.isChannelMuted(n,t.id);return(!r||!a)&&l.default.getMentionCount(e)>0}var m=r.forwardRef((function(e,t){var n=e.guildId,i=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["guildId"]),l=(0,o.useFlattenedChannelIdListWithThreads)(n),u=(0,a.useStateFromStores)([s.default],(function(){return s.default.isFocused()}));return r.createElement(d.default,p({ref:t},i,{isUnread:v,isMentioned:y,items:l,animate:u}))}));t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(9989)),l=p(n(61)),u=p(n(9192)),s=n(41),d=p(n(6)),f=p(n(7346)),c=p(n(7357));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(e){var t,n,r=e.guild,p=e.selected;return y("div",{className:(0,o.default)(f.default.containerDefault,(t={},t[f.default.selected]=p,t))},void 0,y("div",{className:(0,o.default)(f.default.iconVisibility,c.default.wrapper,(n={},n[c.default.modeSelected]=p,n))},void 0,y("div",{className:c.default.content},void 0,y(l.default,{className:c.default.mainContent,onClick:function(){(0,s.openModal)((function(e){return a.createElement(i.default,m({},e,{guildId:r.id}))}))}},void 0,y("div",{className:c.default.iconContainer},void 0,y(u.default,{className:c.default.icon})),y("div",{className:c.default.name},void 0,d.default.Messages.GUILD_STAGE_INSTANCE_DISCOVERY_TITLE)))))}_.displayName="UpcomingEventsChannelRow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(8456)),i=y(n(29)),l=n(85),u=y(n(8455)),s=n(35),d=(n(41),y(n(47))),f=y(n(8572)),c=y(n(9990)),p=(y(n(9161)),y(n(6))),v=y(n(7786));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.transitionState,n=e.guildId,r=(0,l.useUID)(),y=(0,o.default)(n),m=y.canStartEvents,h=y.canSeeEvents,E=(0,f.default)(n);if(!h)return null;return _(s.ModalRoot,{size:s.ModalSize.MEDIUM,transitionState:t,"aria-labelledby":r},void 0,_(s.ModalHeader,{className:v.default.header},void 0,_(u.default,{className:v.default.icon}),_(d.default,{size:d.default.Sizes.SIZE_16},void 0,p.default.Messages.GUILD_EVENTS),m&&a.createElement(a.Fragment,null,_("div",{className:v.default.divider},void 0,"|"),_(i.default,{size:i.default.Sizes.MIN,onClick:function(){}},void 0,p.default.Messages.SCHEDULE_EVENT))),_(s.ModalContent,{className:v.default.content},void 0,E.map((function(e){return _(c.default,{guildEvent:e},e.id)}))))}h.displayName="GuildEventsModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=g(n(9)),o=g(n(5)),i=n(3),l=g(n(8493)),u=g(n(8456)),s=n(1232),d=g(n(81)),f=g(n(10)),c=g(n(29)),p=g(n(8455)),v=g(n(291)),y=g(n(47)),m=g(n(24)),_=n(1),h=g(n(6)),E=g(n(7785));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.startTime,n=e.isLive,r=p.default,i=_.Colors.BRAND_NEW,l=(0,o.default)(t),u=(0,o.default)(),s=l<=u,d=l.diff(u,"days")>7?new Date(t).toLocaleString(void 0,{dateStyle:"full",timeStyle:"short"}):l.calendar();return n?(d=h.default.Messages.STAGE_CHANNEL_LIVE_NOW,r=v.default,i=_.Colors.STATUS_GREEN_600):s&&(d=h.default.Messages.STARTING_SOON,i=_.Colors.STATUS_RED_400),O("div",{className:(0,a.default)(E.default.inline,E.default.status)},void 0,O(r,{width:16,height:16,color:i}),O(y.default,{size:y.default.Sizes.SIZE_12,uppercase:!0,color:i,className:E.default.label},void 0,d))}function T(e){var t=e.guildEvent,n=t.id,r=t.guild_id,p=t.channel_id,v=t.name,_=t.description,g=t.scheduled_start_time,S=t.rsvped,T=(0,u.default)(r).canStartEvents,C=(0,i.useStateFromStores)([d.default],(function(){return d.default.getStageInstanceByChannel(p)}),[p]),b=(0,i.useStateFromStores)([f.default],(function(){return null!=p?f.default.getChannel(p):null}),[p]),M=null!=C,N=(0,o.default)(g)<=(0,o.default)().add(1,"hour"),A=h.default.Messages.STAGE_INSTANCE_INTERESTED_LABEL,P=c.default.Colors.GREY,R=c.default.Looks.FILLED,L=function(){S?l.default.deleteRsvpForGuildEvent(n):l.default.createRsvpForGuildEvent(n)};return M?(A=h.default.Messages.STAGE_CHANNEL_JOIN_BUTTON,P=c.default.Colors.GREEN,L=function(){(null==b?void 0:b.isGuildStageVoice())&&(0,s.connectAndOpen)(b)}):T&&N?(A=h.default.Messages.START_EVENT,P=c.default.Colors.GREEN,L=function(){}):S&&(P=c.default.Colors.BRAND,R=c.default.Looks.OUTLINED),O("div",{className:E.default.card},void 0,O(I,{startTime:g,isLive:M}),O(y.default,{size:y.default.Sizes.SIZE_20},void 0,v),O(m.default,{color:m.default.Colors.HEADER_SECONDARY,className:E.default.description},void 0,_),O("div",{className:(0,a.default)(E.default.inline,E.default.spacing)},void 0,O(c.default,{onClick:L,color:P,look:R},void 0,A)))}I.displayName="GuildEventStatus",T.displayName="GuildEvent"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=$;var r,a=B(n(0)),o=G(n(9)),i=n(3),l=n(57),u=n(389),s=G(n(132)),d=B(n(8357)),f=n(8463),c=n(8671),p=G(n(8646)),v=G(n(8967)),y=G(n(8478)),m=G(n(180)),_=G(n(8693)),h=B(n(9992)),E=n(42),g=G(n(6012)),S=G(n(1212)),O=G(n(10)),I=G(n(15)),T=G(n(1219)),C=G(n(40)),b=G(n(80)),M=G(n(278)),N=G(n(149)),A=n(292),P=G(n(8537)),R=G(n(8538)),L=G(n(9993)),D=G(n(9994)),w=G(n(8763)),j=n(1),k=G(n(6)),U=G(n(7346));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(){return(H=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}).apply(this,arguments)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function W(e){var t=e.getGuildId();if(null==t)throw new Error("VoiceChannel, transitionTo: Channel does not have a guildId");(0,E.transitionTo)(j.Routes.CHANNEL(t,e.id))}function Y(e){var t=e.channel,n=e.locked,r=e.video,a=e.selected,o=e.userCount,i=(0,g.default)(t).limit,l=-1,u=!1;return t.userLimit>0&&(l=t.userLimit),r&&i>0&&(u=l<0||i<l,l=l>0?Math.min(l,i):i),l>0&&!n&&!a?V("div",{className:U.default.userLimit},void 0,V(D.default,{users:o,total:l,videoLimit:u})):null}var z=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={shouldShowActivities:!1,shouldShowGuildVerificationPopout:!1},t.activitiesHideTimeout=new l.Timeout,t.closeGuildVerificationPopout=function(){t.setState({shouldShowGuildVerificationPopout:!1})},t.handleVoiceConnect=function(){var e=t.props,n=e.locked,r=e.connected,a=e.channel;e.unverifiedAccount&&t.setState({shouldShowGuildVerificationPopout:!0}),n||r||s.default.selectVoiceChannel(a.id),!__OVERLAY__&&r&&W(a)},t.handleContextMenu=function(e){var n=t.props.channel,r=I.default.getGuild(n.getGuildId());null!=r&&(0,u.openContextMenu)(e,(function(e){return a.createElement(_.default,H({},e,{channel:n,guild:r}))}))},t.handleMouseEnter=function(){t.activitiesHideTimeout.stop(),t.setState({shouldShowActivities:!0})},t.handleMouseLeave=function(){t.activitiesHideTimeout.start(100,(function(){return t.setState({shouldShowActivities:!1})}))},t.closePopout=function(){t.activitiesHideTimeout.stop(),t.setState({shouldShowActivities:!1})},t.handleClick=function(){t.handleVoiceConnect()},t.renderPopout=function(){var e=t.props,n=e.channel,r=e.voiceStates,a=e.sorting,o=e.isUserOver,i=t.state,l=i.shouldShowActivities,u=i.shouldShowGuildVerificationPopout;return!l||a||o||u?u?V(h.default,{type:h.GuildVerificationPopoutTypes.VOICE,guildId:n.guild_id,closePopout:t.closeGuildVerificationPopout}):void 0:V(L.default,{onAction:t.closePopout,channel:n,voiceStates:r})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var i=r.prototype;return i.componentWillUnmount=function(){this.activitiesHideTimeout.stop()},i.getVoiceStatesCount=function(){var e,t=this.props.voiceStates;return null!==(e=null==t?void 0:t.length)&&void 0!==e?e:0},i.isFull=function(){var e=this.props.channel;return(0,A.isChannelFull)(e,b.default,I.default)},i.getModeClass=function(){var e=this.props,t=e.position,n=e.sortingPosition;return e.isUserOver?U.default.containerUserOver:null!=n?t>n?U.default.containerDragAfter:U.default.containerDragBefore:U.default.containerDefault},i.renderVoiceUsers=function(){var e=this.props,t=e.channel,n=e.voiceStates,r=e.collapsed,a=e.categoryCollapsed,o=e.tabIndex;return V(w.default,{channel:t,voiceStates:n,collapsed:r||a,tabIndex:o})},i.render=function(){var e,t=this,n=this.props,r=n.channel,i=n.channelName,l=n.selected,u=n.connected,s=n.locked,f=n.video,c=n.sorting,p=n.isUserOver,y=n.embeddedApplication,m=n.embeddedActivityType,_=n.connectChannelDropTarget,h=n.connectChannelDragSource,E=n.connectUserDropTarget,g=n.connectDragPreview,S=n.canManageCategory,O=n.canMoveMembers,I=n.showTutorial,T=this.state,C=T.shouldShowActivities,b=T.shouldShowGuildVerificationPopout,A=this.getVoiceStatesCount(),P=k.default.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL.format({channelName:i});null!=r.userLimit&&r.userLimit>0?P=k.default.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL_WITH_LIMIT.format({channelName:i,userCount:A,limit:r.userLimit}):A>0&&(P=k.default.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL_WITH_USERS.format({channelName:i,userCount:A}));var L=V("div",{className:(0,o.default)(this.getModeClass(),(e={},e[U.default.disabled]=this.isDisabled(),e))},void 0,V("div",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},void 0,V(M.default,{position:M.default.Positions.RIGHT,renderPopout:this.renderPopout,spacing:0,onRequestClose:this.closeGuildVerificationPopout,shouldShow:C&&!c&&!p&&!b||b},void 0,(function(){return V(N.default,{text:t.isFull()&&!u?k.default.Messages.UNABLE_TO_JOIN_CHANNEL_FULL:null},void 0,(function(e){var n=e.onClick,o=e.onContextMenu,i=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick","onContextMenu"]);return a.createElement(R.default,H({className:U.default.iconVisibility,channel:r,selected:l,connected:u,locked:s,subtitle:null!=y&&null!=m?(0,v.default)(y.name,m):null,onClick:function(){t.handleClick(),null==n||n()},onContextMenu:function(e){t.handleContextMenu(e),null==o||o()},connectDragPreview:g,"aria-label":P},i),t.renderInviteButton(),t.renderEditButton(),V(Y,{userCount:t.getVoiceStatesCount(),video:f,channel:r,locked:s,selected:l}))}))}))),this.renderVoiceUsers());return O&&(L=E(L)),S&&(L=_(h(L))),I&&(L=V(d.default,{tutorialId:"voice-conversations",position:d.TutorialIndicatorPositions.RIGHT,offsetX:-20},void 0,L)),L},r}(P.default);z.displayName="VoiceChannel";var K=(0,f.makeChannelSortable)((0,c.makeVoiceUserDroppable)(z));function $(e){var t,n=e.guild,r=e.channel,o=(0,i.useStateFromStoresObject)([C.default,O.default,T.default],(function(){var e=O.default.getChannel(r.parent_id),t=T.default.getCheck(r.guild_id);return{canManageChannel:n&&C.default.can(j.Permissions.MANAGE_CHANNELS,r),canManageCategory:null!=e?C.default.can(j.Permissions.MANAGE_CHANNELS,e):null!=n&&C.default.can(j.Permissions.MANAGE_CHANNELS,n),canMoveMembers:C.default.can(j.Permissions.MOVE_MEMBERS,r),locked:!C.default.can(j.Permissions.CONNECT,r),bypassLimit:C.default.can(j.Permissions.MOVE_MEMBERS,r),unverifiedAccount:!t.canChat}})),l=(0,i.useStateFromStores)([b.default],(function(){return null!=r&&b.default.hasVideo(r.id)})),u=(0,i.useStateFromStores)([S.default],(function(){return S.default.isCollapsed(r.parent_id)})),s=(0,p.default)(r.id),d=(0,y.default)(s.map((function(e){return e.applicationId})))[0],f=(0,m.default)(r);return a.createElement(K,H({channelName:f,embeddedApplication:d,embeddedActivityType:null===(t=s[0])||void 0===t?void 0:t.type,video:l,categoryCollapsed:u},o,e))}$.displayName="ConnectedVoiceChannel"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GuildVerificationPopoutTypes=void 0;var r,a,o=C(n(0)),i=n(3),l=I(n(363)),u=I(n(8447)),s=C(n(735)),d=n(5831),f=I(n(1219)),c=I(n(12)),p=I(n(29)),v=I(n(282)),y=n(85),m=I(n(466)),_=n(41),h=I(n(47)),E=I(n(24)),g=n(1),S=I(n(6)),O=I(n(7787));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}t.GuildVerificationPopoutTypes=a,function(e){e[e.VOICE=0]="VOICE"}(a||(t.GuildVerificationPopoutTypes=a={}));var N=function(e){var t=e.type,r=e.guildId,I=e.closePopout,T=(0,y.useUID)(),C=(0,i.useStateFromStores)([f.default],(function(){return f.default.getCheck(r)}),[r]),N=C.notClaimed,A=C.notEmailVerified,P=C.notPhoneVerified,R=C.newAccount,L=C.newMember,D=t===a.VOICE?S.default.Messages.GUILD_VERIFICATION_VOICE_HEADER:null,w=null,j=null;if(t===a.VOICE&&(N?(w=S.default.Messages.GUILD_VERIFICATION_VOICE_NOT_CLAIMED,j=S.default.Messages.CLAIM_ACCOUNT):P?(w=S.default.Messages.GUILD_VERIFICATION_VOICE_NOT_PHONE_VERIFIED,j=S.default.Messages.VERIFY_PHONE):A?(w=S.default.Messages.GUILD_VERIFICATION_VOICE_NOT_VERIFIED,j=S.default.Messages.RESEND_VERIFICATION_EMAIL):L?(w=S.default.Messages.GUILD_VERIFICATION_VOICE_MEMBER_AGE.format({min:g.VerificationCriteria.MEMBER_AGE}),j=S.default.Messages.OKAY):R&&(w=S.default.Messages.GUILD_VERIFICATION_VOICE_ACCOUNT_AGE.format({min:g.VerificationCriteria.ACCOUNT_AGE}),j=S.default.Messages.OKAY)),null==D||null==w)return null;return M(v.default,{className:O.default.container,"aria-labelledby":T},void 0,M("img",{alt:"",className:O.default.image,src:n(8915)}),M("div",{className:O.default.content},void 0,M(h.default,{size:h.default.Sizes.SIZE_16,id:T},void 0,D),M(E.default,{color:E.default.Colors.HEADER_SECONDARY},void 0,w),M("div",{className:O.default.buttonContainer},void 0,null!=j?M(p.default,{onClick:function(){N?s.openClaimAccountModal():P?(0,_.openModal)((function(e){return o.createElement(u.default,e)}),{modalKey:d.PHONE_VERIFICATION_MODAL_KEY}):A&&(l.default.verifyResend(),(0,_.openModal)((function(e){return o.createElement(m.default,b({header:S.default.Messages.VERIFICATION_EMAIL_TITLE,confirmText:S.default.Messages.OKAY,confirmButtonColor:p.default.Colors.BRAND},e),M(E.default,{size:E.default.Sizes.SIZE_16},void 0,S.default.Messages.VERIFICATION_EMAIL_BODY.format({email:c.default.getCurrentUser().email})))}))),I()},className:O.default.primaryButton},void 0,j):null,N||P||A?M(p.default,{onClick:I,look:p.default.Looks.BLANK,className:O.default.cancel},void 0,S.default.Messages.NEVERMIND):null)))};N.displayName="GuildVerificationPopout";var A=N;t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=O(n(0)),o=g(n(9)),i=n(3),l=O(n(8556)),u=n(8298),s=g(n(399)),d=g(n(8600)),f=g(n(11)),c=g(n(256)),p=g(n(149)),v=g(n(8409)),y=g(n(279)),m=g(n(272)),_=n(150),h=n(1),E=g(n(7788));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(){return(T=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}).apply(this,arguments)}function C(e){var t=e.guildId,n=e.member,r=e.className,i=null!=n.member?(0,_.getGuildMemberAvatarURL)(n.member):null;return I(p.default,{text:n.nick,position:p.default.Positions.BOTTOM},void 0,(function(e){return a.createElement(y.default,T({src:null!=i?i:n.user.getAvatarURL(t),size:y.default.Sizes.SIZE_16,className:(0,o.default)(E.default.partyAvatar,r),"aria-label":n.nick},e))}))}function b(e){var t=e.members,n=e.guildId;return I(v.default,{className:E.default.partyMembers,guildId:n,users:t,max:6,renderUser:function(e,t,r){return I(C,{guildId:n,member:e,className:t},r)},renderMoreUsers:function(e,t,n){return I("div",{className:(0,o.default)(E.default.morePartyMembers,t)},n,e)}})}function M(e){var t=e.channel,n=e.onAction,r=e.voiceStates;!function(e,t){var n=a.useMemo((function(){var n,r;return null==t||t.length>50?{}:((r={})[e.getGuildId()]=null!==(n=t.map((function(e){return e.user.id})))&&void 0!==n?n:[],r)}),[e,t]);(0,u.useSubscribeGuildMembers)(n)}(t,r);var o=(0,i.useStateFromStores)([c.default],(function(){var e={};return null==r||r.forEach((function(t){var n=c.default.findActivity(t.user.id,(function(e){return[h.ActivityTypes.PLAYING,h.ActivityTypes.WATCHING].includes(e.type)&&(null!=e.assets||null!=e.state||null!=e.details||null!=e.party)&&(null==e.session_id||e.session_id===t.voiceState.sessionId)||e.type===h.ActivityTypes.LISTENING}));if(null!=n){var r,a,o,i,l=(null!==(r=n.application_id)&&void 0!==r?r:"")+":"+(null!==(a=null===(o=n.party)||void 0===o?void 0:o.id)&&void 0!==a?a:t.user.id),u=null!==(i=e[l])&&void 0!==i?i:[[],n];u[0].push(t),(0,s.default)(u[1],h.ActivityFlags.JOIN)||(u[1]=n),e[l]=u}})),Object.values(e)}),[r],i.statesWillNeverBeEqual);return 0===o.length?null:I(m.default,{className:E.default.container},void 0,o.map((function(e,r){var a,o,i=e[0],u=e[1];return I("div",{className:E.default.activity},r,I(l.default,{type:l.UserActivityTypes.VOICE_CHANNEL,activity:u,user:i[0].user,guildId:t.getGuildId(),channelId:t.id,renderHeaderAccessory:function(){return I(b,{guildId:t.guild_id,members:i})}}),I(d.default,{type:l.UserActivityTypes.VOICE_CHANNEL,activity:u,user:null!==(a=null===(o=i.find((function(e){return e.user.id!==f.default.getId()})))||void 0===o?void 0:o.user)&&void 0!==a?a:i[0].user,guildId:t.getGuildId(),channelId:t.id,color:E.default.button,onAction:n}))})))}C.displayName="PartyMember",b.displayName="PartyMembers",M.displayName="VoiceChannelActivities"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=l(n(8313)),i=l(n(7789));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t,n,r=e.total,l=e.users,u=e.videoLimit;return s("div",{className:i.default.wrapper},void 0,s("span",{className:(0,a.default)(i.default.users,(t={},t[i.default.video]=u,t[i.default.extraLong]=l>=100,t))},void 0,u?s(o.default,{className:i.default.videoIcon}):null,l.toString().padStart(2,"0")),s("span",{className:(0,a.default)(i.default.total,(n={},n[i.default.extraLong]=r>=100,n))},void 0,r.toString().padStart(2,"0")))}d.displayName="VoiceChannelUserLimit"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnimatedBanner=N,t.default=void 0;var r,a,o,i=T(n(0)),l=O(n(9)),u=n(122),s=O(n(8412)),d=n(123),f=O(n(61)),c=O(n(1175)),p=O(n(375)),v=O(n(149)),y=O(n(8656)),m=n(1230),_=O(n(150)),h=T(n(5935)),E=n(1),g=O(n(6)),S=O(n(7791));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(){return(C=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}).apply(this,arguments)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e){var t=e.guild,n=e.controller,r=e.guildBanner,a=n.springs.value,o=i.useContext(d.AccessibilityPreferencesContext).reducedMotion;return M(u.animated.div,{className:S.default.animatedContainer,style:{opacity:a,transform:a.to((function(e){return"translateY(-"+90*(1-e)+"px)"}))}},void 0,M(u.animated.div,{className:S.default.bannerImage,style:{backgroundImage:"url("+(_.default.getGuildBannerURL({id:t.id,banner:r})||"")+")",transform:a.to((function(e){return o.enabled?"translateY("+90*(1-e)+"px)":"translateY("+60*(1-e)+"px) scale("+(1+.2*(1-e))+")"}))}}))}N.displayName="AnimatedBanner";var A=((r={})[E.PremiumGuildTiers.NONE]=S.default.iconBackgroundTierNone,r[E.PremiumGuildTiers.TIER_1]=S.default.iconBackgroundTierOne,r[E.PremiumGuildTiers.TIER_2]=S.default.iconBackgroundTierTwo,r[E.PremiumGuildTiers.TIER_3]=S.default.iconBackgroundTierThree,r),P=((a={})[E.PremiumGuildTiers.NONE]=S.default.iconTierNone,a[E.PremiumGuildTiers.TIER_1]=S.default.iconTierOne,a[E.PremiumGuildTiers.TIER_2]=S.default.iconTierTwo,a[E.PremiumGuildTiers.TIER_3]=S.default.iconTierThree,a),R=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).showGuildSubscribeModal=function(e){e.stopPropagation(),e.preventDefault(),(0,m.openFullScreenLayer)((function(e){var n=e.transitionState,r=e.closeLayer;return M(s.default,{layerTransitionState:n,close:r,guildId:t.props.guild.id,locationSection:E.AnalyticsSections.GUILD_HEADER})}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n);var a=r.prototype;return a.hasBanner=function(){var e=this.props,t=e.renderBanner;return null!=e.guildBanner&&!t},a.renderPremiumGuildBadge=function(){var e=this,t=this.props.guild,n=t.premiumTier,r=t.premiumSubscriberCount;if(0===r)return null;var a=n===E.PremiumGuildTiers.NONE?g.default.Messages.PREMIUM_GUILD_HEADER_BADGE_NO_TIER:h.getTierName(n),o=M(i.Fragment,{},void 0,M("div",{className:S.default.tierTooltipTitle},void 0,a),M("div",{},void 0,g.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SUBSCRIBER_COUNT_TOOLTIP.format({subscriberCount:r})));return M("div",{className:S.default.guildIconContainer},void 0,M(v.default,{text:o,position:v.default.Positions.BOTTOM,"aria-label":a||""},void 0,(function(t){return i.createElement(f.default,C({},t,{className:S.default.premiumGuildIcon,onClick:e.showGuildSubscribeModal}),M(c.default,{className:(0,l.default)(A[n])},void 0,M(y.default,{tier:n,className:(0,l.default)(S.default.premiumGuildIconGem,P[n])})))})))},a.renderBadge=function(){var e,t=this.props.guild,n=this.hasBanner();return t.hasFeature(E.GuildFeatures.VERIFIED)||t.hasFeature(E.GuildFeatures.PARTNERED)?M("div",{className:S.default.guildIconContainer},void 0,M(p.default,{guild:t,tooltipPosition:v.default.Positions.BOTTOM,tooltipColor:v.default.Colors.PRIMARY,className:(0,l.default)(S.default.guildBadge,(e={},e[S.default.disableColor]=!n,e))})):this.renderPremiumGuildBadge()},a.renderHeader=function(){var e=this.props,t=e.guild,n=e.children,r=e.headerClassName;return M("header",{className:(0,l.default)(S.default.header,r)},void 0,this.renderBadge(),M("h1",{className:S.default.name},void 0,t.toString()),n)},a.renderBanner=function(){var e=this.props,t=e.guild,n=e.controller,r=e.guildBanner;return null!=r?M(N,{guild:t,guildBanner:r,controller:n}):null},a.render=function(){var e,t,n=this.props,r=n.bannerVisible,a=n.onClick,o=n.onMouseDown,i=n.onContextMenu,u=n.selected,s=n.className,d=n["aria-controls"],c=n["aria-expanded"],p=this.renderHeader(),v=this.renderBanner();return null!=a?M(f.default,{className:(0,l.default)(s,(t={},t[S.default.container]=!0,t[S.default.clickable]=!0,t[S.default.hasBanner]=this.hasBanner(),t[S.default.bannerVisible]=r,t[S.default.selected]=u,t)),"aria-controls":d,"aria-expanded":c,onClick:a,onContextMenu:i,onMouseDown:o,focusProps:{offset:{top:4,right:4,bottom:4,left:4}}},void 0,p,v):M("div",{className:(0,l.default)(s,(e={},e[S.default.container]=!0,e[S.default.hasBanner]=this.hasBanner(),e[S.default.bannerVisible]=r,e)),onMouseDown:o},void 0,p,v)},r}(i.PureComponent);R.displayName="GuildHeader",R.defaultProps={selected:!1};var L=R;t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSharedStageInstanceDiscoveryStates=void 0;var r=n(3),a=n(203),o=d(n(40)),i=d(n(5826)),l=d(n(373)),u=n(48),s=n(8423);function d(e){return e&&e.__esModule?e:{default:e}}t.useSharedStageInstanceDiscoveryStates=function(e,t,n){var d=e.sku_ids,f=(0,r.useStateFromStoresArray)([l.default],(function(){return d.map((function(e){return l.default.get(e)})).filter(u.isNotNullish)}),d),c=d.length>0,p=(0,r.useStateFromStores)([i.default],(function(){return f.some((function(e){return i.default.isEntitledToSku(null,e.id,e.applicationId)}))}),[f]),v=e.status===s.GuildScheduledEventStatus.ACTIVE,y=!s.GuildScheduledEventStatusDone.has(e.status),m=f[0],_=(0,r.useStateFromStores)([o.default],(function(){return o.default.can(a.JOIN_VOCAL_CHANNEL_PERMISSIONS,n)}));return{isTicketedEvent:c,isTicketPurchased:p,isLive:v,sku:m,canPurchaseTicket:c&&!t&&!p&&y&&!_,canJoinChannel:_}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(9)),i=n(9193),l=A(n(1243)),u=A(n(3)),s=R(n(8699)),d=A(n(8526)),f=A(n(8457)),c=A(n(105)),p=A(n(106)),v=A(n(88)),y=A(n(10)),m=A(n(86)),_=A(n(1241)),h=A(n(36)),E=A(n(278)),g=n(121),S=R(n(9033)),O=R(n(8480)),I=R(n(10013)),T=A(n(10015)),C=n(8297),b=n(1),M=A(n(6)),N=A(n(7795));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(7796);var w=(0,l.default)(s.search,500),j=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).state={focused:!1,selectedIndex:void 0},n._searchPopoutRef=a.createRef(),n.handleSetSearchQuery=function(e){var t=e.query,r=e.anchor,a=e.focus,o=e.performSearch,i=e.replace,l=n.props.editorState,u=S.getFirstTextBlock(l);" "!==t.charAt(t.length-1)&&(t+=" "),r&&" "!==u.charAt(r-1)&&" "!==t.charAt(0)&&(t=" "+t),i?(l=S.replaceAllContent(t,l),r=0):l=S.updateContent(t,l,r,a),l=S.truncateContent(l,512),l=n.tokenize(l);var s=r+t.length;l=S.setCollapsedSelection(s,l),n.setEditorState(l),o&&n.search(S.getFirstTextBlock(l))},n.handleSelectedIndexChanged=function(e){var t,r;null===(t=n._editorRef)||void 0===t||null===(r=t.editor)||void 0===r||r.setAttribute("aria-activedescendant",null!=e?"search-results-"+e:void 0),n.setState({selectedIndex:e})},n.renderPopout=function(){return a.createElement(T.default,{ref:n._searchPopoutRef,navId:"search-results",onSelectedIndexChanged:n.handleSelectedIndexChanged})},n.search=function(e){var t=n.props,r=t.searchId,a=t.isSearching;if(!e){var o=n.props.editorState;e=S.getFirstTextBlock(o)}if(r&&!a){for(var i=O.tokenizeQuery(e),l=O.getSearchQueryFromTokens(i),u=0;u<i.length;u++)O.filterHasAnswer(i[u],i[u+1])||(e=e.substring(0,i[u].start)+e.substring(i[u].end));if(!i.length||0===Object.keys(l).length)return!1;w(r,l,e),n.onBlur()}return!0},n.handleClearSearch=function(e){var t=n.props.editorState,r=n.state.focused;e.preventDefault(),e.stopPropagation(),""!==S.getFirstTextBlock(t)?(t=S.truncateContent(t,0),n.setEditorState(t),r||Promise.resolve().then((function(){return n.blurEditor()}))):n.focusEditor()},n.handleFocusSearch=function(e){var t;if(e.prefillCurrentChannel&&S.isEmpty(n.props.editorState)){var r,a=h.default.getChannelId(),o=y.default.getChannel(a);if(null===(t=o)||void 0===t?void 0:t.isThread())o=y.default.getChannel(null===(r=o)||void 0===r?void 0:r.parent_id);if(null==o||o.isPrivate())n.focusEditor();else{var i=m.default.getTextChannelNameDisambiguations(o.getGuildId())[o.id],l=null!=i?i.name:o.name;n.handleSetSearchQuery({query:f.default[b.SearchTokenTypes.FILTER_IN].key+"#"+l+" ",replace:!0})}}else n.focusEditor()},n.focusEditor=function(){var e=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)._editorRef;e&&Promise.resolve().then((function(){return e.focus()}))},n.blurEditor=function(){n._editorRef&&n._editorRef.blur()},n.setEditorRef=function(e){n._editorRef=e},n.onFocus=function(){var e=n.props.searchType;p.default.trackWithMetadata(b.AnalyticEvents.SEARCH_OPENED,{search_type:e}),n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1},(function(){S.isEmpty(n.props.editorState)&&n.clearSearch()}))},n.handleReturn=function(e){e.preventDefault();var t=n._searchPopoutRef.current;return null!=t&&t.selectOption()||n.search(),!0},n.handleBeforeInput=function(e){var t=n.props.editorState,r=n.state.focused;return S.getFirstTextBlock(t).length>=512||(t=S.updateContent(e,t),t=S.truncateContent(t,512),t=n.tokenize(t),n.setEditorState(t),r||n.setState({focused:!0})),!0},n.handleKeyCommand=function(e){var t=n.props.editorState,r=n.state.focused;switch(e){case"backspace":case"backspace-word":case"backspace-to-start-of-line":case"delete":case"delete-word":return t=S.deleteContent(e,t),t=n.tokenize(t),n.setEditorState(t),r||n.setState({focused:!0}),!0;case"transpose-characters":case"move-selection-to-start-of-block":case"move-selection-to-end-of-block":return t=S.miscCommand(e,t),t=n.tokenize(t),n.setEditorState(t),!0;case"split-block":case"underline":case"bold":case"italic":return!0}},n.handlePastedText=function(e){var t=n.props.editorState,r=n.state.focused;return e=null!=e?e.replace(/\n/g,""):"",t=S.updateContent(e,t),t=S.truncateContent(t,512),t=n.tokenize(t),r||n.setState({focused:!0}),n.setEditorState(t),!0},n.setEditorState=function(e){var t=n.props.searchId;s.setSearchState(t,e)},n.handleKeyBind=function(e){var t=e.key,r=e.metaKey,a=e.shiftKey,o=n.props,i=o.editorState,l=o.searchId,u=o.keyboardModeEnabled;if(e.stopPropagation(),"Escape"===t){if(e.preventDefault(),S.isEmpty(i))n.blurEditor();else{var d=S.clearContent(i);s.setSearchState(l,d),n.setState({focused:!0})}return!0}if("ArrowUp"===t){e.preventDefault();var f=n._searchPopoutRef.current;return null!=f&&f.focusPreviousOption(),!0}if("ArrowDown"===t){e.preventDefault();var c=n._searchPopoutRef.current;return null!=c&&c.focusNextOption(),!0}if("Tab"===t){if(u)return;e.preventDefault();var p=n._searchPopoutRef.current;return null!=p&&p.selectOption(),!0}return"Home"===t||"ArrowLeft"===t&&r?(e.preventDefault(),i=a?S.setToStartSelection(i):S.setCollapsedStartSelection(i),n.setEditorState(i),!0):"End"===t||"ArrowRight"===t&&r?(e.preventDefault(),i=a?S.setToEndSelection(i):S.setCollapsedEndSelection(i),n.setEditorState(i),!0):S.getDefaultKeyBinding(e)},O.clearTokenCache(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,D(t,n);var l=r.prototype;return l.componentDidMount=function(){g.ComponentDispatch.subscribe(b.ComponentActions.PERFORM_SEARCH,this.search),g.ComponentDispatch.subscribe(b.ComponentActions.SET_SEARCH_QUERY,this.handleSetSearchQuery),g.ComponentDispatch.subscribe(b.ComponentActions.FOCUS_SEARCH,this.handleFocusSearch)},l.componentDidUpdate=function(e){var t=this.props,n=t.editorState,r=t.searchId;if(n!==e.editorState){var a=O.tokenizeQuery(S.getFirstTextBlock(n)),o=I.getSelectionScope(a,n);s.updateAutocompleteQuery(r,a,o),this._editorRef&&S.scrollCursorIntoView(this._editorRef.editor)}},l.componentWillUnmount=function(){g.ComponentDispatch.unsubscribe(b.ComponentActions.PERFORM_SEARCH,this.search),g.ComponentDispatch.unsubscribe(b.ComponentActions.SET_SEARCH_QUERY,this.handleSetSearchQuery),g.ComponentDispatch.unsubscribe(b.ComponentActions.FOCUS_SEARCH,this.handleFocusSearch)},l.tokenize=function(e){var t=O.tokenizeQuery(S.getFirstTextBlock(e)).filter((function(e){return e.type!==d.default.NON_TOKEN_TYPE}));return S.applyTokensAsEntities(t,e,f.default)},l.clearSearch=function(){var e=this.props.searchId;e&&s.clearSearchState(e)},l.handlePastedFiles=function(){return!0},l.handleDroppedFiles=function(){return!0},l.handleDrop=function(){return!0},l.renderInput=function(){var e=this.props.editorState;return a.createElement(i.Editor,{ref:this.setEditorRef,onBlur:this.onBlur,onFocus:this.onFocus,handleReturn:this.handleReturn,handleBeforeInput:this.handleBeforeInput,handleKeyCommand:this.handleKeyCommand,handlePastedText:this.handlePastedText,handlePastedFiles:this.handlePastedFiles,handleDroppedFiles:this.handleDroppedFiles,handleDrop:this.handleDrop,keyBindingFn:this.handleKeyBind,placeholder:M.default.Messages.SEARCH,editorState:e,onChange:this.setEditorState})},l.render=function(){var e=this,t=this.props,n=t.searchId,r=t.editorState,a=t.hasResults,i=t.className,l=this.state.focused,u=!!S.getFirstTextBlock(r).length;return n?L(E.default,{renderPopout:this.renderPopout,position:E.default.Positions.BOTTOM,animation:E.default.Animation.NONE,shouldShow:l,autoInvert:!1},void 0,(function(t,r){var s;return L("div",{className:i},void 0,L("div",{className:(0,o.default)(N.default.search,(s={},s[N.default.open]=u||l,s[N.default.focused]=l,s))},void 0,L(v.default,{within:!0},void 0,L("div",{className:N.default.searchBar,role:"combobox","aria-label":M.default.Messages.SEARCH,"aria-owns":"search-results","aria-expanded":r},n,e.renderInput(),L(C.SearchBarIcon,{onClear:e.handleClearSearch,hasContent:u||a,className:N.default.icon})))))})):null},r}(a.PureComponent);j.displayName="Search";var k=u.default.connectStores([c.default,_.default],(function(){var e=_.default.getCurrentSearchId(),t=_.default.getSearchType(),n=!!e&&_.default.isSearching(e),r=e&&_.default.getEditorState(e)||S.createEmptyEditorState(I.generateDecorators(f.default)),a=c.default.keyboardModeEnabled;return{searchId:e,searchType:t,isSearching:n,editorState:r,hasResults:_.default.hasResults(e),keyboardModeEnabled:a}}))(j);t.default=k},,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchColonGroup=c,t.generateDecorators=function(e){void 0===e&&(e={});var t=[];return Object.keys(e).forEach((function(n){var r=e[n];t.push({strategy:function(e,t,r){return c(r,e,t,n)},component:f[r.componentType]})})),t},t.cleanQueryTokens=function(e,t){var n=!1,r=[];if(e.forEach((function(t,a){var o=e[a];r.push(t.getFullMatch()),d.IS_SEARCH_ANSWER_TOKEN.test(t.type)&&(o&&o.type!==i.default.NON_TOKEN_TYPE||!o)&&(n=!0,r.push(" "))})),!n)return t;return(0,u.replaceAllContent)(r.join(""),t)},t.getSelectionScope=function(e,t){var n=t.getSelection(),r=n.focusOffset,a=n.anchorOffset;return(0,s.getSelectionScope)(e,r,a)},t.Components=void 0;var r,a,o=n(10014),i=(r=n(8526))&&r.__esModule?r:{default:r},l=n(8457),u=n(9033),s=n(8480),d=n(1);var f=((a={})[l.ComponentTypes.FILTER]=o.Filter,a[l.ComponentTypes.ANSWER]=o.Answer,a);function c(e,t,n,r){t.findEntityRanges((function(t){var n=t.getEntity();return null!==n&&e.getEntity(n).getType()===r}),n)}t.Components=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Answer=t.Filter=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(7792))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e,t){return l("span",{className:t},void 0,e.children)}u.displayName="renderToken";t.Filter=function(e){return u(e,o.default.searchFilter)};t.Answer=function(e){return u(e,o.default.searchAnswer)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SearchPopoutComponent=t.GroupData=void 0;var r,a,o=H(n(0)),i=F(n(9)),l=F(n(23)),u=F(n(8)),s=F(n(5)),d=n(1303),f=n(3),c=n(8699),p=n(8526),v=H(n(8457)),y=n(180),m=n(8328),_=F(n(10)),h=F(n(56)),E=F(n(70)),g=F(n(10016)),S=F(n(36)),O=F(n(107)),I=F(n(160)),T=F(n(39)),C=F(n(12)),b=F(n(271)),M=F(n(61)),N=F(n(149)),A=F(n(10017)),P=F(n(10018)),R=F(n(8536)),L=n(121),D=F(n(93)),w=H(n(8480)),j=H(n(10019)),k=n(1),U=F(n(6)),G=F(n(7794));function F(e){return e&&e.__esModule?e:{default:e}}function B(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return B=function(){return e},e}function H(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=B();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function W(){return(W=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}).apply(this,arguments)}function Y(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var z=(0,s.default)("2015-05-15").local(),K=(0,d.makeLazy)({createPromise:function(){return Promise.resolve().then(n.t.bind(null,1316,7))},webpackId:1316});function $(e){var t=!0,n=e.trim();return(0,u.default)(v.default).forOwn((function(e){e.key&&n===e.key&&(t=!1)})),t}var Z=function(e,t,n){var r,a,o=n.user,i=n.text;if(null==o)return Y("strong",{},void 0,i);var l=_.default.getChannel(e),u=(null==l?void 0:l.isPrivate())?E.default.getNickname(o.id):null,s=null!==(r=null!==(a=h.default.getNick(e,o.id))&&void 0!==a?a:u)&&void 0!==r?r:o.username,d=o.avatarURL||o.getAvatarURL();return[Y("img",{alt:"",className:G.default.displayAvatar,src:d},"avatar-"+t+"-"+o.id),Y("span",{className:G.default.displayedNick},"display-nick-"+t+"-"+o.id,s),Y("span",{className:G.default.displayUsername},"display-username-"+t+"-"+o.id,I.default.enabled?o.username:i)]},q=function(e,t,n){var r=n.channel,a=n.text;if(null==r)return Y("strong",{},void 0,a);var o=_.default.getChannel(r.parent_id),i=(0,m.getChannelIconComponent)(r);return Y("div",{className:G.default.resultChannel},void 0,null!=i?Y(i,{className:G.default.searchResultChannelIcon}):null,Y("strong",{},void 0,(0,y.computeChannelName)(r,C.default,E.default)),null!=o?Y("span",{className:G.default.searchResultChannelCategory},void 0,(0,y.computeChannelName)(o,C.default,E.default)):null)};q.displayName="renderChannel";var X=function(e){var t,n,r,a=e.id,o=e.searchId,l=e.result,u=e.group,s=e.selected,d=e.className,f=e.role,c=e.tabIndex,p=e["aria-selected"],y=e.onSelect,m=e.onFocus,_=e.showFilter,h=e.renderResult;return _&&(n=Y("span",{className:G.default.filter},void 0,v.default[u].key||"addme:")),r=h?h(o,u,l):Y("strong",{},void 0,l.text),Y(M.default,{className:(0,i.default)(G.default.option,d,(t={},t[G.default.selected]=s,t)),onClick:y,onMouseOver:m,onFocus:m,id:a,role:f,tabIndex:c,"aria-selected":p},void 0,n,r,Y(R.default,{className:G.default.plusIcon}))};X.displayName="ResultComponent";var J=function(e){return o.createElement(X,W({},e,{className:G.default.user,renderResult:Z}))};J.displayName="UserResultComponent";var Q=function(e){return o.createElement(X,W({},e,{renderResult:q}))};function ee(e){var t,n=e.selected,r=e.onSelect,a=e.onFocus,l=e.result,u=(e.showFilter,e.searchId,e.renderResult,e.group,V(e,["selected","onSelect","onFocus","result","showFilter","searchId","renderResult","group"])),s="",d=o.useMemo((function(){return e=l.text,w.tokenizeQuery(e).map((function(e,t,n){return w.filterHasAnswer(e,n[t+1])?e:new p.Token(e.getFullMatch(),p.NON_TOKEN_TYPE)}));var e}),[l.text]).map((function(e){var t,n=e.getFullMatch();if(""===n.trim())return null;var r=k.IS_SEARCH_FILTER_TOKEN.test(e.type),a=k.IS_SEARCH_ANSWER_TOKEN.test(e.type),o=!r&&!a;return s+=n,Y("span",{className:(0,i.default)((t={},t[G.default.filter]=r,t[G.default.answer]=a,t[G.default.nonText]=o,t))},e.type+n,n)}));return o.createElement(M.default,W({className:(0,i.default)(G.default.option,G.default.history,(t={},t[G.default.selected]=n,t)),onClick:r,onMouseOver:a,onFocus:a},u,{"aria-label":U.default.Messages.SEARCH_FROM_SUGGESTIONS.format({suggestion:s})}),d,Y(R.default,{className:G.default.plusIcon}))}Q.displayName="ChannelResultComponent",ee.displayName="HistoryComponent";var te=Y(A.default,{}),ne=Y(P.default,{}),re=((r={})[k.SearchTokenTypes.FILTER_FROM]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_FROM},component:J},r[k.SearchTokenTypes.FILTER_MENTIONS]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_MENTIONS},component:J},r[k.SearchTokenTypes.FILTER_HAS]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_HAS}},r[k.SearchTokenTypes.FILTER_FILE_TYPE]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_FILE_TYPE}},r[k.SearchTokenTypes.FILTER_IN]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_CHANNELS},component:Q},r[k.SearchAutocompleteGroups.DATES]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_DATES}},r[k.SearchAutocompleteGroups.HISTORY]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_HISTORY},groupTip:function(e){var t=e.searchId;return Y(N.default,{text:U.default.Messages.SEARCH_CLEAR_HISTORY,position:N.default.Positions.LEFT},void 0,(function(e){var n=e.onMouseEnter,r=e.onMouseLeave;return Y(M.default,{onClick:function(){return(0,c.clearHistory)(t)},onMouseEnter:n,onMouseLeave:r,className:G.default.searchClearHistory,title:U.default.Messages.SEARCH_CLEAR_HISTORY,"aria-label":U.default.Messages.SEARCH_CLEAR_HISTORY},void 0,te)}))},component:ee},r[k.SearchAutocompleteGroups.SEARCH_OPTIONS]={titleText:function(){return U.default.Messages.SEARCH_GROUP_HEADER_SEARCH_OPTIONS},groupTip:function(){return Y(N.default,{text:U.default.Messages.LEARN_MORE,position:N.default.Positions.LEFT},void 0,(function(e){return o.createElement("div",W({className:G.default.searchLearnMore},e),Y(b.default,{href:D.default.getArticleURL(k.HelpdeskArticles.USING_SEARCH),title:U.default.Messages.LEARN_MORE},void 0,ne))}))},component:function(e){var t,n,r=e.result,a=e.selected,l=e.onSelect,u=e.onFocus,s=(e.showFilter,e.searchId,V(e,["result","selected","onSelect","onFocus","showFilter","searchId"])),d=w.getSearchOptionAnswer(r.token||"");return o.createElement(M.default,W({className:(0,i.default)(G.default.option,G.default.searchOption,(t={},t[G.default.selected]=a,t)),onClick:l,onMouseOver:u,onFocus:u},s),Y("span",{className:G.default.filter},void 0,r.text),Y("span",{className:(0,i.default)((n={},n[G.default.answer]=d,n))},void 0,d),Y(R.default,{className:G.default.plusIcon}))}},r);t.GroupData=re;var ae=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={dateHint:(0,v.getRandomDateShortcut)(),selectedIndex:-1},t.handleDateChange=function(e){t.setSearchQuery(e.format(k.SEARCH_DATE_FORMAT)+" ",!0)},t.keepCurrentOptionSelected=function(e,n){var r=t.state.selectedIndex,a=t.props,o=a.resultsState,i=a.totalResults,l=o.mode,u=o.autocompletes,s=e.resultsState;if(l.type!==s.mode.type)t.setSelectedIndex(-1);else if(n.selectedIndex>=0&&(n.selectedIndex===r||s.autocompletes.length!==u.length)){var d=w.getFlattenedStringArray(s.autocompletes,s.mode.type)[n.selectedIndex-1],f=w.getFlattenedStringArray(u,l.type).indexOf(d);-1!==f?t.setSelectedIndex(f):n.selectedIndex>=i&&t.setSelectedIndex(i-1)}},t.focusNextOption=function(){t.focusOtherOption(1)},t.focusPreviousOption=function(){t.focusOtherOption(-1)},t.focusOtherOption=function(e){var n=t.state.selectedIndex,r=t.props.resultsState;w.showDatePicker(r.mode.filter)||t.focusOption(n+e)},t.focusOption=function(e){var n=e,r=t.props.resultsState.autocompletes,a=t.shouldShowSearchQuery();n<-1||!a&&n<0?n=w.getTotalResults(r)-1:a&&n>=w.getTotalResults(r)?n=-1:!a&&n>=w.getTotalResults(r)&&(n=0),t.setSelectedIndex(n)},t.selectOption=function(e){var n=e;if(null==n&&(n=t.state.selectedIndex),n<0)return!1;var r=t.props.resultsState,a=r.autocompletes,o=r.mode;if(!w.showDatePicker(o.filter)){var i=w.getFlattenedStringArray(a,o.type);if(n>=i.length)return!1;var l=i[n],u=$(l);return t.setSearchQuery(l,u),!0}},t.setSearchQuery=function(e,n){void 0===n&&(n=!1);var r=t.props.resultsState,a=r.mode,o=r.cursorScope,i=0;a.token?i=a.token.start:o&&o.currentToken&&(i=o.currentToken.end);var l=a.token?a.token.end:i;L.ComponentDispatch.dispatch(k.ComponentActions.SET_SEARCH_QUERY,{query:e,anchor:i,focus:l,performSearch:n}),t.setSelectedIndex(-1)},t.shouldShowSearchQuery=function(){var e=t.props.resultsState.mode;return e.type!==k.SearchPopoutModes.FILTER&&e.type!==k.SearchPopoutModes.EMPTY&&!w.showDatePicker(e.filter)},t.renderDatePicker=function(){return Y("div",{className:G.default.datePicker},void 0,Y(K,{locale:t.props.locale,onSelect:t.handleDateChange,maxDate:(0,s.default)().local(),minDate:z}),Y("div",{className:G.default.datePickerHint},void 0,Y("span",{className:G.default.hint},void 0,U.default.Messages.SEARCH_DATE_PICKER_HINT," "),Y(M.default,{tag:"span",className:G.default.hintValue,onClick:t.handleHintClick},void 0,t.state.dateHint)))},t.handleHintClick=function(){t.setSearchQuery(t.state.dateHint,!0)},t.performSearch=function(){L.ComponentDispatch.dispatch(k.ComponentActions.PERFORM_SEARCH)},t.renderAutocompletes=function(){var e=t.state.selectedIndex,n=t.props,r=n.navId,a=n.searchId,i=t.props.resultsState,l=i.autocompletes,u=i.mode;if(w.showDatePicker(u.filter))return t.renderDatePicker();var s=-1;return l.map((function(n){if(!n||!n.results.length)return null;var i,l=re[n.group]||{};l.titleText&&(i=Y("div",{className:G.default.header},void 0,l.titleText()));var d=l.groupTip||null,f=d?Y(d,{searchId:a}):null,c=l.component||X,p=u.type===k.SearchPopoutModes.FILTER_ALL||!1;return Y("div",{className:G.default.resultsGroup},n.group,i,f,n.results.map((function(i){if(!i||!n)return null;var l=e===(s+=1);return o.createElement(c,W({key:n.group+"-"+i.text+"-"+(i.key||""),searchId:a,group:i.group||n.group,result:i,showFilter:p,selected:l,onSelect:t.selectOption.bind(null,s),onFocus:t.focusOption.bind(null,s)},(0,j.getListboxOptionProps)(r,s,l)))})))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var a=r.prototype;return a.componentDidUpdate=function(e,t){var n=this.props,r=n.resultsState,a=n.totalResults,o=r.mode,i=e.resultsState;o.filter&&!i.mode.filter&&a?this.setSelectedIndex(0):o.type===k.SearchPopoutModes.FILTER_ALL&&i.mode.type!==o.type?this.setSelectedIndex(-1):this.keepCurrentOptionSelected(e,t)},a.setSelectedIndex=function(e){var t=this;this.setState({selectedIndex:e},(function(){return t.props.onSelectedIndexChanged(e)}))},a.render=function(){var e=this,t=this.state.selectedIndex,n=this.props,r=n.navId,a=n.resultsState,o=n.totalResults;return Y(j.default,{numResults:o,query:a.query,navId:r,hideQuery:!this.shouldShowSearchQuery(),focusedIndex:t,renderCustomResults:this.renderAutocompletes,renderInitialState:this.renderAutocompletes,onHighlightQuery:function(){return e.focusOption(-1)},onSelectQuery:this.performSearch,renderNoResults:function(){return null}})},r}(o.PureComponent);t.SearchPopoutComponent=ae,ae.displayName="SearchPopoutComponent";var oe=o.forwardRef((function(e,t){var n=(0,f.useStateFromStoresArray)([O.default,S.default,g.default],(function(){var e=O.default.getGuildId(),t=S.default.getChannelId(),n=e||t;(0,l.default)(null!=n,"SearchPopout.getStateFromStores - invalid searchId");var r=g.default.getState(n);return[n,r,w.getTotalResults(r.autocompletes)]})),r=n[0],a=n[1],i=n[2],u=(0,f.useStateFromStores)([T.default],(function(){return T.default.locale}));return o.createElement(ae,W({},e,{searchId:r,resultsState:a,totalResults:i,locale:u,ref:t}))}));t.default=oe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_(n(3)),a=_(n(2)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8457)),i=_(n(1186)),l=_(n(697)),u=_(n(723)),s=n(8480),d=_(n(56)),f=_(n(1238)),c=_(n(1241)),p=_(n(160)),v=_(n(12)),y=n(1);function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E={},g={};function S(e,t,n,r,a,o){var l=g[e];return null==l&&(l={results:[],context:i.default.getSearchContext(O.bind(null,e))},g[e]=l),{query:t||"",mode:n||{type:y.SearchPopoutModes.EMPTY,filter:null,token:null},tokens:r||[],cursorScope:a||null,autocompletes:o||[]}}function O(e,t){var n=t.results,r=g[e],a=E[e];if(null!=r&&null!=a){var o=a.mode,i=o.type,l=o.filter;if(i!==y.SearchPopoutModes.EMPTY&&(i!==y.SearchPopoutModes.FILTER||l===y.SearchTokenTypes.FILTER_FROM||l===y.SearchTokenTypes.FILTER_MENTIONS)){var u=3;a.mode.type===y.SearchPopoutModes.FILTER&&(u=10),r.results=function(e,t){void 0===t&&(t=10);(e=e.reduce((function(e,t){var n=v.default.getUser(t.id);return null==n||e.push({id:n.id,text:n.tag,user:n}),e}),[])).length>t&&(e.length=t);return e}(n,u);var s=a.query,d=a.mode,f=a.tokens,c=a.cursorScope,p=a.autocompletes;p=b(e,d),E[e]=S(e,s,d,f,c,p),P.emitChange()}}}function I(e,t,n,r){if(void 0===r&&(r=10),!e)return null;var a;if(e===y.SearchTokenTypes.FILTER_FROM||e===y.SearchTokenTypes.FILTER_MENTIONS){var i=g[n];null==i?a=null:(null!=t&&0!==t.getFullMatch().trim().length||(i.results=l.default.getRecentlyTalked(n,10).map((function(e){var t=e.user;return{user:t,text:t.tag}}))),a=i.results)}else{var u,s=o.default[e]&&o.default[e].getAutocompletions,d=(null!=t?t.getFullMatch():"").trim();a=s?s(d,n,null!==(u=r)&&void 0!==u?u:10):[]}return a&&a.length?{group:e,results:a}:null}function T(e){var t,n=(null!=e?e.getFullMatch():"").trim(),r=((t={})[y.SearchTokenTypes.FILTER_FROM]=!p.default.hidePersonalInformation,t[y.SearchTokenTypes.FILTER_MENTIONS]=!p.default.hidePersonalInformation,t[y.SearchTokenTypes.FILTER_HAS]=!0,t[y.SearchTokenTypes.FILTER_BEFORE]=!0,t[y.SearchTokenTypes.FILTER_AFTER]=!0,t[y.SearchTokenTypes.FILTER_ON]=!0,t[y.SearchTokenTypes.FILTER_IN]=c.default.getSearchType()===y.SearchTypes.GUILD,t),a=(0,o.getFilterAutocompletions)(n).filter((function(e){return null!=r[e.token]}));return{group:y.SearchAutocompleteGroups.SEARCH_OPTIONS,results:a}}function C(e,t){var n=(null!=e?e.getFullMatch():"").trim(),r=[];return n&&(function(e){var t=c.default.getSearchType(e),n=[y.SearchTokenTypes.FILTER_HAS];return p.default.hidePersonalInformation||(n.push(y.SearchTokenTypes.FILTER_FROM),n.push(y.SearchTokenTypes.FILTER_MENTIONS)),t===y.SearchTypes.GUILD&&n.push(y.SearchTokenTypes.FILTER_IN),n}(t).forEach((function(n){if(n){var a=I(n,e,t,3);a&&r.push(a)}})),r.push(function(e,t){var n=(null!=e?e.getFullMatch():"").trim();if(n){var r=o.default[y.SearchTokenTypes.FILTER_BEFORE].getAutocompletions(n,t,1)[0],a=o.default[y.SearchTokenTypes.FILTER_ON].getAutocompletions(n,t,1)[0],i=o.default[y.SearchTokenTypes.FILTER_AFTER].getAutocompletions(n,t,1)[0];if(!r)return null;var l=[r,a,i];return{group:y.SearchAutocompleteGroups.DATES,results:l}}}(e,t))),(0,s.getTotalResults)(r)<5&&r.push(T(e)),r}function b(e,t){var n=[];return t.type===y.SearchPopoutModes.FILTER?n.push(I(t.filter,t.token,e,10)):t.type===y.SearchPopoutModes.FILTER_ALL?n=C(t.token,e):t.type===y.SearchPopoutModes.EMPTY&&(n.push(T(t.token)),n.push(function(e){if(p.default.hidePersonalInformation)return null;var t=c.default.getHistory(e);return t?{group:y.SearchAutocompleteGroups.HISTORY,results:t.map((function(e){return{text:e}}))}:null}(e))),n}function M(){(0,s.clearTokenCache)()}function N(e){var t=E[e];if(t){var n=t.query,r=t.mode,a=t.tokens,o=t.cursorScope,i=t.autocompletes;E[e]=S(e,n,r,a,o,i.map((function(e){return e&&e.group===y.SearchAutocompleteGroups.HISTORY?null:e})))}}function A(){if(f.default.isOpen(y.SEARCH_POPOUT_ID)){var e=c.default.getCurrentSearchId();if(e&&E[e]){var t=E[e],n=t.query,r=t.mode,a=t.tokens,o=t.cursorScope;E[e]=S(e,n,r,a,o,b(e,r))}}}var P=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(d.default,p.default,f.default)},a.getState=function(e){return E[e]||S(e)},r}(r.default.Store))(a.default,{SEARCH_AUTOCOMPLETE_QUERY_UPDATE:function(e){var t,n=e.searchId,r=e.tokens,a=e.cursorScope,o=(0,s.getQueryFromTokens)(r),i=(0,s.getAutocompleteMode)(a,r),l=E[n]||{},d=g[n],f=!0;if(o!==l.query||l.mode&&l.mode.filter!==i.filter){if(i.type===y.SearchPopoutModes.EMPTY||i.type===y.SearchPopoutModes.FILTER&&i.filter!==y.SearchTokenTypes.FILTER_FROM&&i.filter!==y.SearchTokenTypes.FILTER_MENTIONS)null!=d&&(d.context.clearQuery(),d.results=[]),t=b(n,i);else if(null!=d){var c=i.token;null!=c&&c.getFullMatch().trim().length>0?(u.default.requestMembers(n,c.getFullMatch(),10),d.context.setQuery(c.getFullMatch().trim(),{guild:n}),t=l.autocompletes,f=!1):(d.context.clearQuery(),t=b(n,i))}}else t=l.autocompletes,f=!1;return E[n]=S(n,o,i,r,a,t),f},SEARCH_EDITOR_STATE_CLEAR:function(e){var t=e.searchId,n=g[t];null!=n&&(n.context.destroy(),n.results=[],delete g[t]),delete E[t]},CHANNEL_CREATE:function(e){return M()},CHANNEL_DELETE:function(e){return M()},STREAMER_MODE_UPDATE:function(e){return A()},POPOUT_OPEN:function(e){return A()},SEARCH_MODAL_OPEN:function(e){return A()},SEARCH_CLEAR_HISTORY:function(e){var t=e.searchId;null!=t?N(t):Object.keys(E).forEach(N)},LOGOUT:function(e){Object.keys(E).forEach(N)}}),R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 18 18"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M7.5 7.5h-6V9h6V7.5zm3-3h-9V6h9V4.5zm3.3106602 6.75l2.1213203-2.12132034-1.0606602-1.06066018L12.75 10.1893398l-2.1213203-2.12132032-1.06066022 1.06066018L11.6893398 11.25l-2.12132032 2.1213203 1.06066022 1.0606602L12.75 12.3106602l2.1213203 2.1213203 1.0606602-1.0606602L13.8106602 11.25zM1.5 12h6v-1.5h-6V12z"})))}d.displayName="ClearHistory"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 18 18"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,d:"M8.25 13.5h1.5V12h-1.5v1.5zM9 1.5C4.86 1.5 1.5 4.86 1.5 9c0 4.14 3.36 7.5 7.5 7.5 4.14 0 7.5-3.36 7.5-7.5 0-4.14-3.36-7.5-7.5-7.5zM9 15c-3.3075 0-6-2.6925-6-6s2.6925-6 6-6 6 2.6925 6 6-2.6925 6-6 6zM9 4.5c-1.6575 0-3 1.3425-3 3h1.5C7.5 6.675 8.175 6 9 6s1.5.675 1.5 1.5c0 1.5-2.25 1.3125-2.25 3.75h1.5C9.75 9.5625 12 9.375 12 7.5c0-1.6575-1.3425-3-3-3z"})))}d.displayName="HelpOutline"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getListboxOptionProps=_,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(61)),l=f(n(1257)),u=f(n(6)),s=f(n(5710)),d=f(n(7793));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){e.stopPropagation(),e.preventDefault()}function _(e,t,n){return{id:e+"-"+t,role:"option",tabIndex:-1,"aria-selected":n}}var h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var f=r.prototype;return f.renderQuery=function(e){var t,n=this.props,r=n.query,f=n.navId,c=n.focusedIndex,y=n.onSelectQuery,m=n.onHighlightQuery,h=n.hideQuery;if(e||h)return null;var E=-1===c;return a.createElement(i.default,p({className:(0,o.default)(d.default.queryContainer,(t={},t[d.default.focused]=E,t))},_(f,-1,E),{onMouseEnter:m,onClick:y}),v("div",{className:d.default.queryText},void 0,u.default.Messages.SEARCH_FOR_VALUE.format({value:r})),v("div",{className:d.default.queryShortcut,"aria-hidden":!0},void 0,v(l.default,{shortcut:"return",className:(0,o.default)(s.default.dim,s.default.keybindShortcutSearchPopout)})))},f.renderResults=function(e){var t=this.props,n=t.numResults,r=t.renderNoResults,a=t.renderInitialState,o=t.renderResult,i=t.renderCustomResults;if(e)return a();if(0===n)return r();if(null!=o)return Array.from({length:n}).map((function(e,t){return o(t)}));if(null!=i)return i();throw new Error("SearchResultsPopout.renderResults: Flow should never allow this...")},f.render=function(){var e=this.props,t=e.query,n=e.focusedIndex,r=e.navId,a=e.width,o=""===t.trim();return v("div",{className:d.default.container,style:{width:a},onMouseDown:m,role:"listbox",id:r,tabIndex:-1,"aria-activedescendant":r+"-"+n},void 0,this.renderQuery(o),this.renderResults(o))},r}(a.PureComponent);h.displayName="SearchResultsPopout",h.defaultProps={renderInitialState:function(){return null},hideQuery:!1,width:320};var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=v(n(12)),i=v(n(271)),l=v(n(5999)),u=n(8282),s=v(n(13)),d=n(93),f=n(716),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){var e=(0,a.useStateFromStores)([o.default],(function(){return o.default.getNullableCurrentUser()})),t=(0,f.isNewUser)(e);return m(i.default,{href:d.SUPPORT_LOCATION,target:"_blank",tabIndex:-1},void 0,m(u.Icon,{color:t?c.Colors.STATUS_GREEN_600:"currentColor",onClick:function(){return s.default.track(c.AnalyticEvents.HELP_CLICKED,{highlighted:t})},icon:l.default,tooltip:p.default.Messages.HELP}))}_.displayName="HelpButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(3)),i=_(n(154)),l=n(1228),u=_(n(10022)),s=_(n(94)),d=_(n(8376)),f=_(n(10023)),c=n(8282),p=n(10024),v=n(1),y=_(n(6)),m=_(n(7387));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={memoizedMode:t.props.mode,clicked:!1},t.handleInstallDownload=function(){s.default.isConnected()?i.default.show({title:y.default.Messages.UPDATE_DURING_CALL_TITLE,body:y.default.Messages.UPDATE_DURING_CALL_BODY,onConfirm:t.doUpdate,cancelText:y.default.Messages.CANCEL,confirmText:y.default.Messages.UPDATE_DURING_CALL_CONTINUE}):t.doUpdate()},t.doUpdate=function(){t.state.clicked||(t.setState({clicked:!0}),(0,p.quitAndInstall)())},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n),r.getDerivedStateFromProps=function(e,t){return e.mode!==t.memoizedMode?{memoizedMode:e.mode,clicked:!1}:null};var a=r.prototype;return a.handleDownloadApps=function(){(0,l.showAppDownloadModal)("Links")},a.render=function(){switch(this.props.mode){case v.ActionTypes.UPDATE_AVAILABLE:return E(c.Icon,{hideOnClick:!1,tooltip:y.default.Messages.UPDATE_AVAILABLE,foreground:m.default.downloadArrow,background:m.default.cloud,icon:f.default});case v.ActionTypes.UPDATE_MANUALLY:case v.ActionTypes.UPDATE_DOWNLOADED:return E(c.Icon,{tooltip:y.default.Messages.UPDATE_DOWNLOADED,foreground:m.default.updateIconForeground,onClick:this.handleInstallDownload,icon:d.default});case v.ActionTypes.UPDATE_NOT_AVAILABLE:case v.ActionTypes.UPDATE_ERROR:case v.ActionTypes.CHECKING_FOR_UPDATES:default:return null}},r}(a.PureComponent);S.displayName="UpdateButton";var O=o.default.connectStores([u.default],(function(){return{mode:u.default.getState()}}))(S);t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=n(1).ActionTypes.UPDATE_NOT_AVAILABLE;function u(e){l=e.type}var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getState=function(){return l},r}(r.default.Store))(a.default,{CHECKING_FOR_UPDATES:u,UPDATE_NOT_AVAILABLE:u,UPDATE_AVAILABLE:u,UPDATE_MANUALLY:u,UPDATE_ERROR:u,UPDATE_DOWNLOADED:u});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=e.background,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","background"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:c,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M13 0C16.5198 0 19.4422 2.61306 19.9288 6.00063C19.9525 6.00021 19.9762 6 20 6C22.2091 6 24 7.79086 24 10C24 10.7708 23.782 11.4907 23.4043 12.1013C21.9807 10.7964 20.0834 10 18 10C15.0389 10 12.4535 11.6088 11.0703 14H5C2.243 14 0 11.757 0 9C0 6.243 2.243 4 5 4C6.393 4 7.678 4.454 9.175 6.58L9.992 6.004C9.018 4.62 7.987 3.815 7.022 3.357C8.26 1.31 10.49 0 13 0Z"}),s("path",{className:f,fill:d,d:"M21.293 17.292L19 19.585V13.999H17V19.585L14.707 17.292L13.293 18.706L18 23.413L22.707 18.706L21.293 17.292Z"}))}d.displayName="Downloading"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.checkForUpdates=function(e){void 0===e&&(e=!1);return a.checkForUpdates(e)},t.quitAndInstall=function(){a.quitAndInstall()};var a=new(((r=n(10025))&&r.__esModule?r:{default:r}).default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(14)),a=p(n(28)),o=p(n(2)),i=p(n(10026)),l=n(307),u=p(n(26)),s=p(n(16)),d=p(n(164)),f=p(n(43)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var y=a.default.get("lastNonRequiredUpdateShown",Date.now()),m=new u.default("AutoUpdateManager"),_=function(){function e(e){var t=this;void 0===e&&(e=36e5),this.updateAvailable=!1,this.hasNativeUpdate=!1,this._callbacks=[],this._bootstrapNewUpdater=!1,this._bootstrapper=null,this.checkForUpdates=function(e){if(void 0===e&&(e=!1),e||!t.hasNativeUpdate)if(s.default.embedded){var n="win32"===s.default.platform&&f.default.canBootstrapNewUpdater;n&&i.default.trackExposure({}),t._bootstrapNewUpdater&&n?t._requestNewUpdaterBootstrap():f.default.send("CHECK_FOR_UPDATES")}else t._handleNativeUpdateNotAvailable();return new Promise((function(e){t.updateAvailable?e(!0):t._callbacks.push(e)}))},this._handleCheckingForUpdates=function(){o.default.dispatch({type:c.ActionTypes.CHECKING_FOR_UPDATES})},this._handleNativeUpdateNotAvailable=function(){t._handleCheckingForUpdates(),r.default.get({url:location.protocol+"//"+location.host+"/assets/version."+window.GLOBAL_ENV.RELEASE_CHANNEL+".json",query:{_:Date.now()/1e3/60/5|0},oldFormErrors:!0}).then((function(e){if(null==e.body||"337b0b53d10875228a5b553e10dbfb3f270aa0dd"===e.body.hash)return t._handleUpdateNotAvailable();if(e.body.required||(0,l.probablyHasBuildOverride)())return t._handleUpdateDownloaded(!1);var n="stable"===window.GLOBAL_ENV.RELEASE_CHANNEL?6048e5:864e5;return Date.now()-y>n?(a.default.set("lastNonRequiredUpdateShown",Date.now()),t._handleUpdateDownloaded(!1)):void 0}),(function(){return t._handleUpdateError()}))},this._handleUpdateNotAvailable=function(){o.default.dispatch({type:c.ActionTypes.UPDATE_NOT_AVAILABLE}),t._emitCallbacks()},this._handleUpdateAvailable=function(e){t.updateAvailable=!0,t.hasNativeUpdate=e,o.default.dispatch({type:c.ActionTypes.UPDATE_AVAILABLE})},this._handleUpdateManually=function(){t.updateAvailable=!0,t.hasNativeUpdate=!0,o.default.dispatch({type:c.ActionTypes.UPDATE_MANUALLY})},this._handleUpdateError=function(e){t.updateAvailable=!1,o.default.dispatch({type:c.ActionTypes.UPDATE_ERROR,message:e})},this._handleUpdateDownloaded=function(e,n,r,a,i){t._handleUpdateAvailable(e),o.default.dispatch({type:c.ActionTypes.UPDATE_DOWNLOADED,releaseNotes:n,releaseName:r,releaseDate:a,updateURL:i}),t._emitCallbacks()},s.default.embedded&&(f.default.on(c.ActionTypes.CHECKING_FOR_UPDATES,this._handleCheckingForUpdates),f.default.on(c.ActionTypes.UPDATE_NOT_AVAILABLE,this._handleNativeUpdateNotAvailable),f.default.on(c.ActionTypes.UPDATE_AVAILABLE,(function(){return t._handleUpdateAvailable(!0)})),f.default.on(c.ActionTypes.UPDATE_ERROR,this._handleUpdateError),f.default.on(c.ActionTypes.UPDATE_DOWNLOADED,(function(){return t._handleUpdateDownloaded(!0)})),f.default.on(c.ActionTypes.UPDATE_MANUALLY,this._handleUpdateManually)),i.default.subscribe({},(function(e){t._bootstrapNewUpdater=e.bootstrapNewUpdater,o.default.wait((function(){t._bootstrapNewUpdater&&t.checkForUpdates()}))})),this._checkInterval=setInterval(this.checkForUpdates,e)}var t=e.prototype;return t.destroy=function(){clearInterval(this._checkInterval)},t.quitAndInstall=function(){this.updateAvailable&&(this.hasNativeUpdate?null!=this._bootstrapper?this._bootstrapper.finishBootstrap():f.default.send("QUIT_AND_INSTALL"):location.reload(!0))},t._requestNewUpdaterBootstrap=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m.log("Bootstrapping new updater host..."),e.prev=1,e.next=4,f.default.ensureModule("discord_updater_bootstrap");case 4:t=f.default.requireModule("discord_updater_bootstrap"),this._bootstrapper=t,e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(1),this._handleNativeUpdateNotAvailable(),e.abrupt("return");case 12:return e.prev=12,this._handleCheckingForUpdates(),e.next=16,t.bootstrap(f.default.releaseChannel,"win");case 16:this.updateAvailable=!0,this.hasNativeUpdate=!0,this._handleUpdateDownloaded(!0),e.next=26;break;case 21:e.prev=21,e.t1=e.catch(12),m.log("Failed to bootstrap new updater:",e.t1),this._handleNativeUpdateNotAvailable(),d.default.captureException(e.t1);case 26:case"end":return e.stop()}}),e,this,[[1,8],[12,21]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),t._emitCallbacks=function(){var e=this;this._callbacks.forEach((function(t){return t(e.updateAvailable)})),this._callbacks=[]},e}();t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2020-08_new_desktop_user",label:"New Desktop Updater Bootstrap",defaultConfig:{bootstrapNewUpdater:!1},treatments:[{id:1,label:"Update button runs new updater bootstrap",config:{bootstrapNewUpdater:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFormattedEventDateAndTime=function(e){var t,n=(0,r.default)(e.scheduled_start_time),i=(0,r.default)();t=(0,a.isSameDay)(n,i)?o.default.Messages.STAGE_INSTANCE_TODAY_LABEL+" · "+l(n,"h:mm A","h A"):l(n,"MMM D · h:mm A","MMM D · h A");if(null!=e.scheduled_end_time){var u=(0,r.default)(e.scheduled_end_time),s=(0,a.isSameDay)(n,u)?l(u,"h:mm A","h A"):l(u,"MMM D · h:mm A","MMM D · h A");t=t+" - "+s}return t},t.isEventReadyToStart=function(e){return(0,r.default)(e.scheduled_start_time).valueOf()-(0,r.default)().valueOf()<6e5},t.getFormattedEventDateAndTimeForConfirmation=function(e){var t=(0,r.default)(e.scheduled_start_time),n=t.format("MMM D"),a=l(t,"h:mm A","h A");return{eventDate:n,eventTime:a}};var r=i(n(5)),a=n(1161),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e,t,n){return 0===e.minutes()?e.format(n):e.format(t)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var n=t.id,o=t.image,i=t.size;if(null==o)return null;null==i&&(i=window.screen.width*(0,r.getDevicePixelRatio)());i=(0,r.getBestMediaProxySize)(i);var l,u=window.GLOBAL_ENV.CDN_HOST;l=null!=u?(e.env.API_PROTOCOL||location.protocol)+"//"+u+"/guild-events/"+n+"/"+o:location.protocol+window.GLOBAL_ENV.API_ENDPOINT+a.Endpoints.GUILD_EVENT_IMAGE(n,o,"png");return l+="?size="+i};var r=n(193),a=n(1)}).call(this,n(100))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=he(n(0)),o=me(n(9)),i=me(n(8)),l=n(5941),u=n(67),s=n(192),d=he(n(680)),f=he(n(3)),c=me(n(184)),p=n(57),v=me(n(469)),y=n(389),m=me(n(1226)),_=me(n(274)),h=me(n(491)),E=n(8771),g=n(1228),S=me(n(688)),O=me(n(180)),I=me(n(8548)),T=n(1246),C=me(n(10030)),b=n(10031),M=n(8444),N=me(n(8445)),A=me(n(5939)),P=me(n(163)),R=me(n(11)),L=me(n(10)),D=me(n(715)),w=me(n(155)),j=me(n(405)),k=me(n(9035)),U=me(n(298)),G=me(n(1223)),F=me(n(15)),B=me(n(690)),H=me(n(10035)),x=me(n(94)),V=me(n(200)),W=me(n(70)),Y=me(n(36)),z=me(n(361)),K=me(n(12)),$=me(n(9208)),Z=me(n(80)),q=me(n(161)),X=me(n(5959)),J=me(n(8690)),Q=me(n(9027)),ee=n(41),te=n(468),ne=n(393),re=n(48),ae=he(n(136)),oe=me(n(16)),ie=n(259),le=n(8358),ue=me(n(10036)),se=he(n(8540)),de=me(n(9036)),fe=n(10042),ce=me(n(10049)),pe=n(1),ve=me(n(6)),ye=me(n(7809));function me(e){return e&&e.__esModule?e:{default:e}}function _e(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _e=function(){return e},e}function he(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_e();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ge(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function Se(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Te(e,t)}function Te(e,t){return(Te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function be(){return(be=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}).apply(this,arguments)}var Me=oe.default.isWindows()?4:oe.default.isOSX()?0:12,Ne=Me+0+10;function Ae(){return window.location.pathname.startsWith(pe.Routes.GUILD_DISCOVERY)}function Pe(){return window.location.pathname.startsWith(pe.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(""))}function Re(e){var t=G.default.getMentionCounts();return"app-download-item"!==e&&"add-server-item"!==e&&(null!=t[e]?t[e]>0:e===pe.ViewHistoryKeys.SERVER_DISCOVERY_BADGE&&!$.default.hasViewed(pe.ViewHistoryKeys.SERVER_DISCOVERY_BADGE))}function Le(){return!1}function De(){(0,g.showAppDownloadModal)("Guilds")}function we(){(0,M.isAtGuildCapAndNonPremium)()?(0,N.default)({analyticsSource:pe.AnalyticsLocations.CREATE_JOIN_GUILD_MODAL,analyticsLocation:{page:pe.AnalyticsLocations.CREATE_JOIN_GUILD_MODAL,section:pe.AnalyticsSections.GUILD_CAP_UPSELL_MODAL}}):I.default.openCreateGuildModal({location:"Guild List"})}var je=(0,ne.cachedFunction)((function(e,t){return["null"].concat(t,e,["add-server-item",pe.ViewHistoryKeys.E3_SERVER_DISCOVERY_BADGE,"app-download-item"])})),ke=a.forwardRef((function(e,t){var n=(0,f.useStateFromStoresArray)([z.default,H.default,G.default],(function(){return je(z.default.guildFolders,H.default.getUnreadPrivateChannelIds(),G.default.getMentionCounts())})),r=(0,f.useStateFromStores)([q.default],(function(){return q.default.isFocused()})),o=(0,f.useStateFromStores)([k.default],(function(){return k.default.getExpandedFolders()}));return a.createElement(Q.default,be({},e,{ref:t,items:n,isUnread:Le,textUnread:"",textMention:ve.default.Messages.NEW,isMentioned:Re,animate:r,expandedFolders:o}))}));function Ue(e){var t=e.showDMsOnly,n=e.isOnOtherSidebarRoute,r=(0,f.useStateFromStores)([j.default,w.default],(function(){var e=(0,E.getDispatchApplicationStates)(j.default.activeItems,w.default),t=ae.getCombinedProgress(e),n=t.total,r=t.progress,a=ae.calculateProgressPercentage(r,n);return a>0&&a<100})),a=(0,f.useStateFromStores)([W.default],(function(){return W.default.getPendingCount()})),o=(0,f.useStateFromStores)([X.default],(function(){return X.default.getUnacknowledgedOffers().length})),i=(0,A.default)((function(e){return e.guildId})),l=(0,f.useStateFromStores)([K.default],(function(){return K.default.getCurrentUser()}));return Ce(fe.DefaultHomeButton,{showDMsOnly:t,selected:null==i&&!n,user:l,selectedChannelId:Y.default.getChannelId(pe.ME),badge:a+o,link:J.default.getHomeLink(),showProgressBadge:r})}Ue.displayName="ConnectedHomeButton";var Ge=f.default.connectStores([B.default],(function(){return{selected:B.default.isModalOpen(h.default)}}))(le.AppDownloadButton),Fe=function(e){var t=(0,f.useStateFromStores)([F.default],(function(){return F.default.getGuilds()})),n=(0,f.useStateFromStores)([K.default],(function(){return K.default.getCurrentUser()})),r=a.useMemo((function(){return i.default.some(t,(function(e){return e.isOwner(n)}))}),[t,n]),o=(0,ee.useModalsStore)((function(e){return(0,ee.hasModalOpenSelector)(e,I.default.CREATE_GUILD_MODAL_KEY)}));return a.createElement(le.CreateJoinGuildButton,be({},e,{isOwnerOfAny:r,selected:o}))};function Be(e){var t=e.lurkingGuildIds;return a.createElement(a.Fragment,null,t.map((function(e){return Ce(He,{guildId:e},e)})))}Fe.displayName="ConnectedCreateJoinGuildButton";var He=a.forwardRef((function(e){var t=e.guildId,n=(0,f.useStateFromStores)([F.default],(function(){return null!=t?F.default.getGuild(t):null})),r=(0,f.useStateFromStores)([q.default],(function(){return q.default.isFocused()})),a=t===(0,A.default)((function(e){return e.guildId}));return Ce(se.LurkingGuild,{guildId:t,animatable:r,guild:n,selected:a})})),xe=a.forwardRef((function(e,t){var n=e.channel.id,r=(0,O.default)(e.channel),o=(0,f.useStateFromStores)([x.default],(function(){return x.default.getChannelId()}),[]),i=(0,f.useStateFromStores)([S.default],(function(){return null!=o?S.default.getMode(o):pe.ChannelModes.VOICE}),[o]),l=(0,f.useStateFromStores)([P.default],(function(){return P.default.getAllApplicationStreamsForChannel(n).length>0})),u=(0,f.useStateFromStores)([Y.default],(function(){return Y.default.getChannelId()}),[]),s=(0,f.useStateFromStores)([V.default],(function(){return V.default.getMentionCount(n)}),[n]),d=o===n,c=!1,p=!1;return d&&(c=i===pe.ChannelModes.VOICE,p=i===pe.ChannelModes.VIDEO),a.createElement(ue.default,be({},e,{ref:t,channelName:r,unread:s>0,selected:u===n,badge:s,audio:c,video:p,stream:l,isCurrentUserInThisDMCall:d}))})),Ve=function(e){function t(){return e.apply(this,arguments)||this}Ie(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!(0,c.default)(e,this.props,["channels"])},n.render=function(){var e=this.props,t=e.channels,n=e.unreadPrivateChannelIds,r=e.selectedVoiceGuildId,o=e.selectedVoiceChannelId,i=n.map((function(e){var n=t[e];return null==n||n.id===o?null:Ce(xe,{channel:n},n.id)}));if(!r&&o){var l=t[o];null!=l&&i.unshift(Ce(xe,{channel:l},l.id))}return Ce(v.default,{component:a.Fragment},void 0,i)},t}(a.Component);Ve.displayName="UnreadDMs";var We=function(){var e=L.default.getMutablePrivateChannels(),t=(0,f.useStateFromStores)([L.default],(function(){return L.default.getPrivateChannelsVersion()})),n=(0,f.useStateFromStoresArray)([H.default],(function(){return H.default.getUnreadPrivateChannelIds()})),r=(0,f.useStateFromStoresObject)([x.default],(function(){return{selectedVoiceGuildId:x.default.getGuildId(),selectedVoiceChannelId:x.default.getChannelId()}})),a=r.selectedVoiceGuildId,o=r.selectedVoiceChannelId,i=(0,f.useStateFromStores)([Y.default],(function(){return Y.default.getChannelId(pe.ME)}));return Ce(Ve,{channels:e,unreadPrivateChannelIds:n,privateChannelsVersion:t,selectedVoiceGuildId:a,selectedVoiceChannelId:o,selectedPrivateChannelId:i})};We.displayName="ConnectedUnreadDMs";var Ye,ze=a.forwardRef((function(e,t){var n,r=e.guildIds,o=e.folderId,i=ge(e,["guildIds","folderId"]),l=(0,A.default)((function(e){return e.guildId})),u=(0,f.useStateFromStores)([x.default],(function(){return x.default.getGuildId()})),s=null!=u&&r.includes(u),d=!1,c=!1,p=!1,v=(0,f.useStateFromStores)([x.default],(function(){return x.default.getChannelId()})),y=(0,f.useStateFromStores)([L.default],(function(){return L.default.getChannel(v)}),[v]),m=(0,f.useStateFromStores)([Z.default],(function(){return null!=v&&Z.default.hasVideo(v)}),[v]),_=(0,f.useStateFromStores)([P.default,R.default],(function(){return P.default.getActiveStreamForUser(R.default.getId())}));s&&(d=!m,c=m,p=null!=_&&null!=_.guildId&&r.includes(_.guildId),n=null==y?void 0:y.type);var h=function(e){for(var t,n=2*pe.MAX_GUILD_FOLDER_NAME_LENGTH,r=[],a=Se(e);!(t=a()).done;){var o=t.value;(o.length<n||0===r.length)&&(r.push(o),n-=o.length)}return r.join(", ")+(r.length<e.length?", ...":"")}(r.map((function(e){var t=F.default.getGuild(e);return null!=t?t.name:null})).filter(re.isNotNullish)),E=(0,f.useStateFromStoresObject)([G.default],(function(){return{badge:r.map((function(e){return G.default.getMentionCount(e)})).reduce((function(e,t){return e+t}),0),unread:r.some((function(e){return G.default.hasUnread(e)}))}})),g=E.badge,S=E.unread;return a.createElement(de.default,be({ref:t},i,{guildIds:r,folderId:o,expanded:(0,f.useStateFromStores)([k.default],(function(){return k.default.isFolderExpanded(o)})),selected:null!=l&&r.includes(l),badge:g,unread:S,audio:d,video:c,screenshare:p,currentActiveVoiceType:n,defaultFolderName:h}))})),Ke=(Ye=ze,(0,l.DragSource)(pe.GuildsBarDragTypes.FOLDER,{beginDrag:function(e){return{folderIndex:e.index}},endDrag:function(e){e.onDragEnd(),_.default.updateRemoteSettings({guildFolders:z.default.guildFolders})}},(function(e,t){return{connectDragSource:e.dragSource(),dragging:t.isDragging()}}),{arePropsEqual:c.default})(Ye)),$e=f.default.connectStores([U.default,F.default],(function(){return{unavailableGuilds:U.default.unavailableGuilds.filter((function(e){return null==F.default.getGuild(e)})).length}}))(le.UnavailableGuildsButton),Ze=Ce(fe.GuestHomeButton,{}),qe=Ce(We,{}),Xe=Ce(ce.default,{}),Je=Ce(le.GuildCapUpsell,{}),Qe=Ce(le.Separator,{}),et=Ce($e,{}),tt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isScrolling:!1,isSorting:!1,draggingGuildId:null},t.initialized=!1,t.scroller=null,t.guildRefs={},t.folderRefs={},t.guildDiscoveryRef=a.createRef(),t.unreadTopRef=a.createRef(),t.unreadBottomRef=a.createRef(),t.timeout=new p.Timeout,t.handleJumpToGuild=function(e){t.scrollToGuild(e,!0)},t.handleScrollComplete=function(){return t.setState({isScrolling:!1})},t.handleScroll=function(){t.state.isScrolling||t.setState({isScrolling:!0}),t.timeout.start(200,t.handleScrollComplete),t._handleScroll()},t._handleScroll=i.default.debounce((function(){if(null!=t.scroller){var e=t.scroller.getScrollerState().scrollTop;m.default.updateGuildListScrollTo(e),null!=t.unreadTopRef.current&&t.unreadTopRef.current.calculateState(),null!=t.unreadBottomRef.current&&t.unreadBottomRef.current.calculateState()}}),200),t.handleStartSorting=function(e){t.setState({isSorting:!0,draggingGuildId:e})},t.handleStopSorting=function(){t.setState({isSorting:!1,draggingGuildId:null})},t.isItemVisible=function(e,n,r){var a=Ee(t).scroller,o=r.findIndex((function(t){return"string"==typeof t||null==t?t===e:t.includes(e)}));if(o<0||null==a)return!1;var i=56*o+Ne;n||(i+=40);var l=a.getScrollerState();return!!(!n&&i>=l.scrollTop||n&&i+56<=l.scrollTop+l.offsetHeight)},t.setGuildRef=function(e,n){t.guildRefs[e]=n},t.setFolderRef=function(e,n){t.folderRefs[e]=n},t.setScrollerRef=function(e){t.scroller=e},t}Ie(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t){return!!e.isVisible&&(!(0,c.default)(e,this.props)||!(0,c.default)(t,this.state))},n.componentDidMount=function(){var e=this.props.guildFolders,t=this.initialized,n=this.scroller,r=D.default.getGuildListDimensions().scrollTop;!t&&e.length&&null!=n&&(Ae()?this.scrollToGuild(null,!1):n.scrollTo({to:r,animate:!1}),this.initialized=!0)},n.componentDidUpdate=function(){var e,t=this,n=this.props.guildFolders,r=this.initialized,a=A.default.getState().guildId;!r&&n.length&&(this.scrollToGuild(a,!1),this.initialized=!0,this._unlisten=A.default.subscribe((e=null,function(n){var r=n.guildId;r!==e&&(e=r,t.scrollToGuild(e,!1))})))},n.componentWillUnmount=function(){var e;null===(e=this._unlisten)||void 0===e||e.call(this),this.timeout.stop()},n.scrollToGuild=function(e,t){var n=this.scroller,r=this.props.guildFolders;if(null!=n){var a,o=null==e&&Ae()||e===pe.ViewHistoryKeys.SERVER_DISCOVERY_BADGE||e===pe.ViewHistoryKeys.E3_SERVER_DISCOVERY_BADGE?this.guildDiscoveryRef.current:this.guildRefs[e],i=(0,u.findDOMNode)(o);if(null!=e){var l=r.find((function(t){return t.guildIds.includes(e)}));null!=l&&null!=l.folderId&&(a=this.folderRefs[l.folderId])}null!=o&&null!=i&&i instanceof HTMLElement?n.scrollIntoViewNode({node:i,animate:t,padding:8}):null!=a&&a instanceof HTMLElement?n.scrollIntoViewNode({node:a,animate:t,padding:8}):n.scrollTo({to:0,animate:t})}},n.render=function(){var e=this,t=this.props,n=t.guildFolders,r=t.disableAppDownload,i=t.isOverlay,l=t.isGuest,u=t.className,f=t.lurkingGuildIds,c=t.isStaff,p=t.themeOverride,v=t.isAppFullscreen,y=this.state,m=y.isSorting,_=y.draggingGuildId,h=y.isScrolling,E=n.map((function(t,n){var r=t.folderId,a=t.guildIds,o=t.muteConfig,i=t.folderName,l=t.folderColor;return null!=r?Ce(Ke,{folderId:r,folderName:i,folderColor:l,muteConfig:o,setGuildRef:e.setGuildRef,setFolderRef:e.setFolderRef,guildIds:a,draggable:!0,index:n,sorting:m,draggingGuildId:_,onDragStart:e.handleStartSorting,onDragEnd:e.handleStopSorting},r):Ce(se.default,{setRef:e.setGuildRef,guildId:a[0],draggable:!0,folderIndex:n,sorting:m,draggingGuildId:_,onDragStart:e.handleStartSorting,onDragEnd:e.handleStopSorting},a[0])})),g=Ce(Be,{lurkingGuildIds:f});return Ce(d.ListNavigatorContainer,{},void 0,(function(t){var d,y=t.ref,m=ge(t,["ref"]);return Ce("nav",{className:(0,o.default)(ye.default.wrapper,u,(0,ie.getThemeClass)(p),(d={},d[ye.default.hidden]=v,d)),"aria-label":ve.default.Messages.GUILDS_BAR_A11Y_LABEL},void 0,Ce(T.FocusJumpSection,{},void 0,(function(t){var u;return a.createElement("ul",be({ref:y},m,t,{role:"tree",className:ye.default.tree}),a.createElement(ke,{ref:e.unreadTopRef,isVisible:e.isItemVisible,onJumpTo:e.handleJumpToGuild,className:ye.default.unreadMentionsIndicatorTop,barClassName:ye.default.unreadMentionsBar}),a.createElement(te.AdvancedScrollerNone,{className:(0,o.default)((u={},u[ye.default.scroller]=!0,u[ye.default.scrolling]=h,u)),ref:e.setScrollerRef,onScroll:e.handleScroll},Ce(s.Route,{path:"*",render:function(){return l?Ze:Ce(Ue,{showDMsOnly:i,isOnOtherSidebarRoute:Ae()||window.location.pathname.startsWith(pe.Routes.GUILD_MEMBER_VERIFICATION(""))||Pe()})}}),Ce(s.Route,{path:"*",render:function(){return Ce(b.HubVerification,{isOnHubVerificationRoute:Pe()})}}),qe,g,c?Xe:null,Je,Qe,Ce("div",{"aria-label":ve.default.Messages.SERVERS},void 0,E),l||i?null:Ce(Fe,{disableTooltip:f.length>0,onContextMenu:e.handleContextMenu,onClick:we,folderIndex:n.length}),i?null:Ce(s.Route,{path:"*",render:function(){return a.createElement(le.GuildDiscovery,{ref:e.guildDiscoveryRef,selected:Ae()})}}),et,Ce(Ge,{disable:l||r,onClick:De})),a.createElement(ke,{reverse:!0,ref:e.unreadBottomRef,isVisible:e.isItemVisible,onJumpTo:e.handleJumpToGuild,className:ye.default.unreadMentionsIndicatorBottom,barClassName:ye.default.unreadMentionsBar}))})))}))},n.handleContextMenu=function(e){(0,y.openContextMenu)(e,(function(e){return a.createElement(C.default,e)}))},t}(a.Component);function nt(e){var t=a.useCallback((function(){return Promise.resolve()}),[]),n=a.useCallback((function(){return Promise.resolve()}),[]),r=(0,d.default)({id:"guildsnav",isEnabled:!0,scrollToStart:t,scrollToEnd:n});return Ce(d.ListNavigatorProvider,{navigator:r},void 0,a.createElement(tt,e))}tt.displayName="Guilds",tt.defaultProps={isOverlay:!1,disableAppDownload:oe.default.embedded,isVisible:!0,isAppFullscreen:!1},nt.displayName="NavigableGuilds";var rt=a.memo(nt);t.default=rt},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;c(n(0));var r,a=n(389),o=d(n(8548)),i=n(8588),l=c(n(8253)),u=d(n(11)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.onSelect;return u.default.isGuest()?null:p(l.default,{navId:"guild-context","aria-label":s.default.Messages.GUILD_ACTIONS_MENU_LABEL,onClose:a.closeContextMenu,onSelect:t},void 0,p(l.MenuItem,{id:"join",label:s.default.Messages.JOIN_SERVER_BUTTON_CTA,action:function(){return o.default.openCreateGuildModal({initialSlide:i.CreateGuildSlideTypes.JOIN_GUILD,location:"Guild List - ContextMenu"})}}),p(l.MenuItem,{id:"create",label:s.default.Messages.CREATE_SERVER_BUTTON_CTA,action:function(){return o.default.openCreateGuildModal({location:"Guild List - ContextMenu"})}}))}v.displayName="GuildIconNewContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HubVerification=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(54),o=n(3),i=n(8358),l=n(8540),u=f(n(162)),s=f(n(1174)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=p(i.HubDefault,{}),y=function(e){var t=e.isOnHubVerificationRoute,n=(0,a.matchPath)(window.location.pathname||"",{path:d.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(":guildId",":inviteCode")}),r=(0,o.useStateFromStores)([s.default],(function(){if(null==n)return null;var e=n.params.inviteCode;return null!=e?s.default.getInvite(e):null})),i=null!=(null==r?void 0:r.guild)?new u.default(null==r?void 0:r.guild):null;return t?null!=i&&null!=r?p(l.HubGuild,{guild:i,invite:r}):v:null};t.HubVerification=y,y.displayName="HubVerification"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?32:t,r=e.height,a=void 0===r?32:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 12 12",fill:"none"}),s("path",{d:"M7.25 1H4.75V7.25H7.25V1Z",fill:d}),s("path",{d:"M4.75 9.75C4.75 10.4167 5.33333 11 6 11C6.66667 11 7.25 10.4167 7.25 9.75C7.25 9.08333 6.66667 8.5 6 8.5C5.33333 8.5 4.75 9.08333 4.75 9.75Z",fill:d}))}d.displayName="Alert"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=E(n(0)),o=n(389),i=_(n(8258)),l=_(n(8294)),u=E(n(8253)),s=n(8256),d=n(42),f=_(n(107)),c=_(n(466)),p=n(41),v=_(n(24)),y=n(1),m=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.guild,n=e.onSelect,r=t.id,_=(0,i.default)(t.id),h=function(){l.default.removeGuildJoinRequest(r),f.default.getGuildId()===r&&(0,d.transitionTo)(y.Routes.ME)};return S(u.default,{navId:"join-request-guild-context",onClose:o.closeContextMenu,"aria-label":m.default.Messages.GUILD_ACTIONS_MENU_LABEL,onSelect:n},void 0,S(u.MenuItem,{id:"leave-guild",label:m.default.Messages.LEAVE_SERVER,action:function(){(0,p.openModal)((function(e){return a.createElement(c.default,g({header:m.default.Messages.LEAVE_SERVER_TITLE.format({name:t.name}),confirmText:m.default.Messages.LEAVE_SERVER,cancelText:m.default.Messages.CANCEL,onConfirm:h},e),S(v.default,{size:v.default.Sizes.SIZE_16},void 0,m.default.Messages.LEAVE_SERVER_BODY.format({name:t.name})))}))},color:s.MenuItemColor.DANGER}),S(u.MenuGroup,{},void 0,_))}O.displayName="JoinRequestGuildContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.guild,n=e.show,r=e.active,f=e.onAnimationStart,c=e.onAnimationRest,v={},y={};v.transform="translate3d(10px, 10px, 0) scale3d(3, 3, 1)",y.transform="translate3d(0, 0, 0) scale3d(1, 1, 1)",r&&null==t.icon&&(v.backgroundColor=s.Colors.BRAND,y.backgroundColor=s.Colors.PRIMARY_DARK_630);var m=(0,i.useTransition)(n,{from:v,enter:y,leave:v,config:{duration:100},onStart:f,onRest:c});return a.createElement(a.Fragment,null,m((function(e,n,r){return n&&p("div",{className:(0,o.default)(d.default.folder,d.default.hover)},r.key,p("div",{className:d.default.folderIconWrapper},void 0,p("div",{className:d.default.closedFolderIconWrapper},void 0,p(i.animated.div,{className:d.default.folderIconPreview,style:e},void 0,p(l.default,{guild:t,size:l.default.Sizes.SMOL,className:d.default.guildIcon})),p(u.DragPlaceholder,{className:d.default.miniPlaceholder}))))})))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(122),l=f(n(371)),u=n(8358),s=n(1),d=f(n(7388));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(3)),a=f(n(2)),o=n(31),i=n(393),l=f(n(10)),u=f(n(200)),s=f(n(36)),d=f(n(699));n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=[];function m(){var e=d.default.getPrivateChannelIds().filter((function(e){return u.default.getMentionCount(e)>0}));return e.length>20&&(e.length=20),!(0,i.areArraysShallowlyEqual)(e,y)&&(y=e,!0)}function _(){return m()}function h(e){var t=e.channelId,n=l.default.getChannel(t);return!(null==n||!(0,o.isPrivate)(n.type))&&m()}var E=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(d.default,l.default,s.default,u.default)},a.getUnreadPrivateChannelIds=function(){return y},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return _()},OVERLAY_INITIALIZE:function(e){return _()},MESSAGE_CREATE:h,MESSAGE_ACK:h,CHANNEL_SELECT:function(e){var t=e.channelId,n=l.default.getChannel(t);return!(null==n||!(0,o.isPrivate)(n.type))&&m()},CHANNEL_DELETE:function(e){var t=e.channel.id,n=l.default.getChannel(t);return!(null==n||!(0,o.isPrivate)(n.type))&&m()},WINDOW_FOCUS:function(e){return!(null==(t=l.default.getChannel(s.default.getChannelId()))||!(0,o.isPrivate)(t.type))&&m();var t},CHANNEL_CREATE:function(e){var t=e.channel.id,n=l.default.getChannel(t);return!(null==n||!(0,o.isPrivate)(n.type))&&m()},CHANNEL_UPDATES:function(e){for(var t,n=!1,r=p(e.updates);!(t=r()).done;){var a=t.value.channel.id,i=l.default.getChannel(a);null!=i&&(0,o.isPrivate)(i.type)&&(n=!0)}return!!n&&m()}});t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(122),i=n(680),l=n(389),u=n(5937),s=g(n(8703)),d=g(n(8476)),f=g(n(12)),c=g(n(161)),p=g(n(8464)),v=n(8263),y=g(n(8465)),m=g(n(8702)),_=n(8358),h=n(1),E=g(n(7804));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(){return(T=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}).apply(this,arguments)}var C={friction:28,tension:600};function b(e){switch(e){case"height":case"opacity":return T({duration:150},C);case"scale":return T({},C);default:throw new Error("DirectMessage: getSpringConfigs() - Invalid spring "+String(e))}}var M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={hovered:!1,animating:!0,controller:new o.Controller({scale:0,height:0,opacity:0,config:b})},t.handleContextMenu=function(e){var n=t.props.channel,r=n.type===h.ChannelTypes.DM?f.default.getUser(n.getRecipientId()):null;(0,l.openContextMenu)(e,(function(e){return null!=r?a.createElement(d.default,T({},e,{channel:n,user:r})):a.createElement(s.default,T({},e,{channel:n,selected:!1}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var g=r.prototype;return g.componentWillEnter=function(e){var t=this,n=this.state.controller;e(),n.update({immediate:!c.default.isFocused(),height:1,opacity:1,scale:1,config:b}).start().then((function(){return t.setState({animating:!1})}))},g.componentWillAppear=function(e){this.state.controller.update({immediate:!0,scale:1,opacity:1,height:1,config:b}).start().then(e)},g.componentWillLeave=function(e){var t=this.state.controller;this.setState({animating:!0},(function(){return t.update({immediate:!c.default.isFocused(),height:0,opacity:0,scale:0,config:b}).start().then(e)}))},g.componentWillUnmount=function(){this.state.controller.dispose()},g.getAnimatedStyle=function(){var e=this.state.controller.springs,t=e.opacity,n=e.height,r=e.scale;return{opacity:t,height:n.to([0,1],[0,56]),transform:r.to([0,1],[.5,1]).to((function(e){return"scale("+e+")"}))}},g.getChannelIcon=function(){var e=this.props.channel,t=e.type===h.ChannelTypes.DM?f.default.getUser(e.getRecipientId()):null;return null!=t?t.getAvatarURL(void 0,!1):(0,u.getChannelIconURL)(e)},g.render=function(){var e=this,t=this.props,n=t.channel,r=t.channelName,l=t.selected,u=t.badge,s=t.audio,d=t.video,f=t.stream,c=t.isCurrentUserInThisDMCall,g=t.unread,S=this.state,I=S.hovered,C=S.animating;return O(o.animated.div,{style:this.getAnimatedStyle()},void 0,(0,_.renderListItem)(O(a.Fragment,{},void 0,O(p.default,{hovered:!C&&I,selected:!C&&l,unread:!C&&g,className:E.default.pill}),O(_.ListItemTooltip,{text:null!=r?r:""},void 0,O(y.default,{selected:l||I,lowerBadge:u>0?(0,_.renderMentionBadge)(u):null,upperBadge:(0,_.renderIconBadge)({audio:s,video:d,screenshare:f,participating:c}),lowerBadgeWidth:(0,v.getBadgeWidthForValue)(u)},void 0,O(i.ListNavigatorItem,{id:n.id},void 0,(function(t){return a.createElement(m.default,T({to:h.Routes.CHANNEL(h.ME,n.id),onMouseEnter:function(){return e.setState({hovered:!0})},onMouseLeave:function(){return e.setState({hovered:!1})},icon:e.getChannelIcon(),selected:l||I,ariaLabel:null!=r?r:"",onContextMenu:e.handleContextMenu},t))})))))))},r}(a.PureComponent);M.displayName="DirectMessage",M.defaultProps={badge:0,audio:!1,video:!1,isCurrentUserInThisDMCall:!1};var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=j(n(0)),o=D(n(9)),i=D(n(8)),l=D(n(3)),u=D(n(14)),s=D(n(1211)),d=D(n(8416)),f=D(n(8300)),c=j(n(8332)),p=n(106),v=D(n(8569)),y=D(n(89)),m=D(n(10)),_=D(n(160)),h=D(n(39)),E=D(n(29)),g=D(n(8685)),S=j(n(8302)),O=D(n(55)),I=D(n(151)),T=n(131),C=n(35),b=D(n(24)),M=D(n(13)),N=n(1),A=D(n(6)),P=D(n(7803)),R=D(n(7347)),L=D(n(370));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function G(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,F(e,t)}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var B=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRevokeInvite=function(){var e=t.props,n=e.onRevoke,r=e.invite;null!=n&&n(r)},t}return G(t,e),t.prototype.render=function(){var e=this.props,t=e.invite,n=e.hideDiscriminator,r=e.hideInviteCode,a=new y.default(t.inviter);return U(O.default,{className:(0,o.default)(P.default.row,R.default.card)},void 0,U(O.default,{align:O.default.Align.CENTER,className:P.default.userColumn},void 0,U(c.default,{user:a,size:c.Sizes.SIZE_24,className:P.default.avatar}),U(f.default,{user:a,hideDiscriminator:n,usernameClass:P.default.username,discriminatorClass:P.default.discrimClass})),U(O.default,{align:O.default.Align.CENTER,grow:0,shrink:0,basis:100,className:P.default.boostZIndex},void 0,U(b.default,{className:P.default.code},void 0,r?"...":t.code)),U(O.default,{basis:100,grow:0,shrink:0,align:O.default.Align.CENTER,justify:O.default.Justify.END,className:P.default.boostZIndex},void 0,U(b.default,{className:P.default.countdown},void 0,U(g.default,{deadline:t.getExpiresAt(),showDays:!1})),U(d.default,{className:P.default.revokeInvite,onClick:this.handleRevokeInvite})))},t}(a.PureComponent);B.displayName="InviteRow";var H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={loading:!0,invites:null},t.handleRevoke=function(e){s.default.revokeInvite(e),t.setState({invites:t.state.invites.filter((function(t){return t!==e}))})},t.handleClose=function(){var e=t.props.onClose;e&&e()},t}G(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this,t=this.props.channelId;u.default.get({url:N.Endpoints.INSTANT_INVITES(t),retries:3,oldFormErrors:!0}).then((function(t){var n=t.body.map((function(e){return new v.default(k({},e,{maxUses:e.max_uses,maxAge:e.max_age,createdAt:e.created_at}))}));e.setState({loading:!1,invites:n})})),M.default.track(N.AnalyticEvents.OPEN_MODAL,k({},(0,p.collectChannelAnalyticsMetadata)(m.default.getChannel(t)),{type:"Group DM Invites",source:"Group DM Menu"}))},r.renderContent=function(){var e=this.state,t=e.loading,n=e.invites;return t||null==n?U(I.default,{className:L.default.marginTop20,type:I.default.Type.SPINNING_CIRCLE}):i.default.isEmpty(n)?this.renderEmpty():U("div",{className:P.default.container},void 0,this.renderHeader(),this.renderInvites())},r.renderEmpty=function(){return U(S.default,{theme:this.props.theme},void 0,U(S.EmptyStateImage,{darkSrc:n(8997),lightSrc:n(8998),width:256,height:130,style:{marginBottom:0}}),U(S.EmptyStateText,{className:L.default.marginTop20},void 0,A.default.Messages.NO_INVITES_CAPTION))},r.renderHeader=function(){return U(O.default,{},void 0,U(O.default.Child,{wrap:!0},void 0,U(T.FormTitle,{},void 0,A.default.Messages.INSTANT_INVITE_INVITER)),U(O.default.Child,{wrap:!0,grow:0,shrink:0,basis:100},void 0,U(T.FormTitle,{},void 0,A.default.Messages.INSTANT_INVITE_INVITE_CODE)),U(O.default.Child,{wrap:!0,grow:0,shrink:0,basis:100},void 0,U(T.FormTitle,{className:P.default.alignRight},void 0,A.default.Messages.INSTANT_INVITE_EXPIRES)))},r.renderInvites=function(){var e=this,t=this.props,n=t.hideDiscriminators,r=t.hideInviteCodes;return(0,i.default)(this.state.invites).sortBy((function(e){return(e.inviter.username||"").toLocaleLowerCase()})).map((function(t){return U(B,{invite:t,hideDiscriminator:n,hideInviteCode:r,onRevoke:e.handleRevoke},t.code)})).value()},r.render=function(){return U(C.ModalRoot,{transitionState:this.props.transitionState,"aria-label":A.default.Messages.INVITES,size:C.ModalSize.MEDIUM},void 0,U(C.ModalHeader,{direction:O.default.Direction.VERTICAL,align:O.default.Align.START,separator:!1},void 0,U(T.FormTitle,{tag:T.FormTitleTags.H1},void 0,A.default.Messages.INVITES),U(T.FormText,{type:T.FormTextTypes.DESCRIPTION},void 0,A.default.Messages.SETTINGS_INVITE_TIP_WITHOUT_CREATE)),U(C.ModalContent,{},void 0,this.renderContent()),U(C.ModalFooter,{},void 0,U(E.default,{onClick:this.handleClose},void 0,A.default.Messages.DONE)))},t}(a.PureComponent);H.displayName="InviteSettingsModal";var x=l.default.connectStores([_.default,h.default],(function(){return{hideDiscriminators:_.default.hidePersonalInformation,hideInviteCodes:_.default.hideInstantInvites,theme:h.default.theme}}))(H);t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(8327))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var d=o.forwardRef((function(e,t){var n=o.useRef(null);return o.useImperativeHandle(t,(function(){return{focus:function(){return null},activate:function(){var e;return null===(e=n.current)||void 0===e||e.activateUploadDialogue(),!1}}}),[]),u("div",{style:{position:"relative"}},void 0,o.createElement(i.default,s({ref:n},e)))}));t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(391)),i=n(8253),l=n(8256),u=p(n(466)),s=n(41),d=p(n(24)),f=p(n(180)),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){var n=(0,f.default)(e),r=a.useCallback((function(){var r=c.default.Messages.LEAVE_GROUP_DM_TITLE.format({name:n}),i=c.default.Messages.LEAVE_GROUP_DM_BODY.format({name:n});e.isManaged()&&(r=c.default.Messages.LEAVE_GROUP_DM_MANAGED_TITLE.format({name:n}),i=c.default.Messages.LEAVE_GROUP_DM_MANAGED_BODY.format({name:n})),(0,s.openModal)((function(n){return a.createElement(u.default,y({header:r,confirmText:c.default.Messages.LEAVE_GROUP_DM,cancelText:c.default.Messages.CANCEL,onConfirm:function(){return o.default.closePrivateChannel(e.id,t)}},n),m(d.default,{size:d.default.Sizes.SIZE_16},void 0,i))}))}),[e,n,t]);return m(i.MenuItem,{id:"leave-channel",label:c.default.Messages.LEAVE_GROUP_DM,action:r,color:l.MenuItemColor.DANGER})}_.displayName="useChannelLeaveItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=y(n(0)),o=n(389),i=p(n(10041)),l=y(n(8253)),u=p(n(11)),s=p(n(361)),d=n(41),f=p(n(8669)),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.folderId,n=e.folderName,r=e.folderColor,p=e.unread,v=e.onSelect;if(u.default.isGuest())return null;return _(l.default,{navId:"guild-context","aria-label":c.default.Messages.GUILD_ACTIONS_MENU_LABEL,onClose:o.closeContextMenu,onSelect:v},void 0,_(l.MenuGroup,{},void 0,_(l.MenuItem,{id:"mark-folder-read",label:c.default.Messages.SERVER_FOLDER_MARK_AS_READ,action:function(){var e=s.default.getGuildFolderById(t);if(null!=e){var n=e.guildIds;(0,f.default)(n)}},disabled:!p})),_(l.MenuGroup,{},void 0,_(l.MenuItem,{id:"folder-settings",label:c.default.Messages.SERVER_FOLDER_SETTINGS,action:function(){return(0,d.openModal)((function(e){return a.createElement(i.default,m({},e,{folderId:t,folderName:n,folderColor:r}))}))}})))}h.displayName="GuildFolderContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(274)),i=n(277),l=n(9037),u=h(n(361)),s=h(n(29)),d=h(n(55)),f=h(n(153)),c=n(131),p=n(35),v=h(n(47)),y=n(1),m=h(n(6)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=(0,i.makeLazy)({createPromise:function(){return Promise.all([n.e(0),n.e(9),n.e(15)]).then(n.t.bind(null,8421,7))},webpackId:8421}),T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={name:t.props.folderName||"",color:t.props.folderColor},t.close=function(){t.props.onClose()},t.handleNameChange=function(e){t.setState({name:e})},t.handleColorChange=function(e){t.setState({color:e})},t.handleSubmit=function(e){e.preventDefault();var n=t.props.folderId,r=t.state,a=r.name,i=r.color,l=u.default.guildFolders.map((function(e){return e.folderId===n?S({},e,{folderName:a,folderColor:i}):e}));o.default.updateRemoteSettings({guildFolders:l}),t.close()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n),r.prototype.render=function(){var e=this.props.transitionState,t=this.state,n=t.name,r=t.color,a=(0,l.getDefaultFolderColor)();return g(p.ModalRoot,{transitionState:e,"aria-label":m.default.Messages.SERVER_FOLDER_SETTINGS,size:p.ModalSize.DYNAMIC},void 0,g(p.ModalHeader,{justify:d.default.Justify.BETWEEN,separator:!1},void 0,g(v.default,{tag:v.default.Tags.H2,size:v.default.Sizes.SIZE_20},void 0,m.default.Messages.SERVER_FOLDER_SETTINGS),g(p.ModalCloseButton,{onClick:this.close})),g(p.ModalContent,{},void 0,g("form",{onSubmit:this.handleSubmit},void 0,g(c.FormItem,{title:m.default.Messages.GUILD_FOLDER_NAME,className:_.default.marginBottom20},void 0,g(f.default,{maxLength:y.MAX_GUILD_FOLDER_NAME_LENGTH,value:n,onChange:this.handleNameChange,placeholder:m.default.Messages.SERVER_FOLDER_PLACEHOLDER,autoFocus:!0})),g(c.FormItem,{title:m.default.Messages.GUILD_FOLDER_COLOR,className:_.default.marginBottom20},void 0,g(I,{defaultColor:a,colors:y.ROLE_COLORS,value:null!=r?r:a,onChange:this.handleColorChange})))),g(p.ModalFooter,{},void 0,g(s.default,{type:"submit",onClick:this.handleSubmit},void 0,m.default.Messages.DONE)))},r}(a.PureComponent);T.displayName="GuildFolderSettingsModal";var C=T;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultHomeButton=t.GuestHomeButton=void 0;var r,a=P(n(0)),o=n(680),i=n(3),l=N(n(28)),u=P(n(8357)),s=N(n(8771)),d=n(9209),f=n(9210),c=N(n(10047)),p=n(395),v=P(n(1220)),y=N(n(702)),m=N(n(9038)),_=N(n(149)),h=N(n(10048)),E=N(n(8464)),g=n(8263),S=N(n(8465)),O=N(n(8702)),I=n(1247),T=n(8358),C=n(1),b=N(n(6)),M=N(n(7807));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var D={x:-16,y:0,targetWidth:48,targetHeight:48,offset:{x:0,y:0}};function w(e){e.preventDefault(),(0,f.open)(C.AnalyticsLocations.HOME_BUTTON,d.open)}function j(){return L(s.default,{className:M.default.downloadProgress,determineOwnVisibility:!1})}t.GuestHomeButton=function(){var e=a.useState(!1),t=e[0],n=e[1];return(0,T.renderListItem)(L(a.Fragment,{},void 0,L(E.default,{hovered:t,className:M.default.pill}),L(T.ListItemTooltip,{text:b.default.Messages.HOME},void 0,L(S.default,{selected:t},void 0,L(O.default,{to:"#",selected:t,onClick:w,onMouseEnter:function(){return n(!0)},onMouseLeave:function(){return n(!1)},ariaLabel:b.default.Messages.HOME},void 0,L(h.default,{className:M.default.homeIcon}))))))},j.displayName="renderInstallProgress";var k=function(e){var t=e.selected,n=e.user,r=e.badge,s=e.link,d=e.showDMsOnly,f=e.showProgressBadge,N=a.useState(!1),A=N[0],P=N[1],w=a.useState(!1),k=w[0],U=w[1],G=a.useState(null),F=G[0],B=G[1],H=a.useState(0),x=H[0],V=H[1],W=c.default.getCurrentConfig({}).showStageDiscoveryTooltip,Y=(0,m.default)(),z=(0,i.useStateFromStores)([y.default],(function(){return y.default.hasHotspot(p.HotspotLocations.STAGE_DISCOVERY)})),K=W&&z&&Y;a.useEffect((function(){t&&K&&v.hideHotspot(p.HotspotLocations.STAGE_DISCOVERY)}),[t]);var $=function(){B(null),V(0),clearTimeout(F)},Z=function(){if(!__OVERLAY__&&(null!=F&&clearTimeout(F),B(setTimeout($,500)),V(x+1),15===x)){$();var e=!l.default.get(C.DISCODO_STORAGE_KEY);l.default.set(C.DISCODO_STORAGE_KEY,e),e?(0,I.playSound)("discodo"):(0,I.playSound)("user_leave"),U(!0),setTimeout((function(){U(!1)}),1e3)}};if(null==n)return null;var q=d?b.default.Messages.DIRECT_MESSAGES:b.default.Messages.HOME;return k?q=l.default.get(C.DISCODO_STORAGE_KEY)?b.default.Messages.DISCODO_ENABLED:b.default.Messages.DISCODO_DISABLED:K&&(q=b.default.Messages.STAGE_DISCOVERY_TOOLTIP),L("div",{className:M.default.tutorialContainer},void 0,L(u.default,{inlineSpecs:D,tutorialId:"friends-list",position:u.TutorialIndicatorPositions.RIGHT},void 0,(0,T.renderListItem)(L(a.Fragment,{},void 0,L(E.default,{selected:t,hovered:A,className:M.default.pill}),L(T.ListItemTooltip,{color:K?_.default.Colors.BRAND:_.default.Colors.PRIMARY,shouldShow:K||void 0,forceOpen:K,hideOnClick:!0,text:q},void 0,L(S.default,{selected:t||A,lowerBadge:r>0?(0,T.renderMentionBadge)(r):null,upperBadge:!t&&f?j():null,lowerBadgeWidth:(0,g.getBadgeWidthForValue)(r)},void 0,L(o.ListNavigatorItem,{id:"home"},void 0,(function(e){return a.createElement(O.default,R({onMouseEnter:function(){return P(!0)},onMouseLeave:function(){return P(!1)},onClick:Z,selected:t||A,ariaLabel:d?b.default.Messages.DIRECT_MESSAGES:b.default.Messages.HOME},e,{to:{pathname:s,state:{analyticsSource:{page:C.AnalyticsPages.GUILD_CHANNEL,section:C.AnalyticsSections.NAVIGATION,object:C.AnalyticsObjects.BUTTON_HOME}}}}),L(h.default,{className:M.default.homeIcon}))}))))))))};t.DefaultHomeButton=k,k.displayName="DefaultHomeButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PhoneRegistrationVariant=void 0;var r,a=n(50),o=n(5964);t.PhoneRegistrationVariant=r,function(e){e[e.Control=0]="Control",e[e.CombinedInput=1]="CombinedInput",e[e.SplitTabInputs=2]="SplitTabInputs",e[e.SubtleInputSwitcher=3]="SubtleInputSwitcher"}(r||(t.PhoneRegistrationVariant=r={}));var i=(0,a.createExperiment)({kind:"user",id:"2021-06_desktop_phone_registration",label:"Desktop: Phone Registration",defaultConfig:{variant:r.Control},treatments:[{id:1,label:"Combined Email/Phone Input",config:{variant:r.CombinedInput}},{id:2,label:"Split Tab Inputs: Email Default",config:{variant:r.SplitTabInputs,defaultInputMode:o.PhoneOrEmailSelectorForceMode.EMAIL}},{id:3,label:"Split Tab Inputs: Phone Default",config:{variant:r.SplitTabInputs,defaultInputMode:o.PhoneOrEmailSelectorForceMode.PHONE}},{id:4,label:"Subtle Link to Switch Inputs",config:{variant:r.SubtleInputSwitcher,defaultInputMode:o.PhoneOrEmailSelectorForceMode.PHONE}}]});t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;p(n(0));var r,a=n(42),o=f(n(29)),i=p(n(475)),l=f(n(93)),u=n(1),s=f(n(6)),d=f(n(7805));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(){return(0,a.transitionTo)(u.Routes.LOGIN)},m=function(e){var t=e.authBoxClassName,r=e.underageMessage,a=e.fromRegister;return v(i.default,{className:t},void 0,v("img",{alt:"",src:n(9085),className:d.default.img}),v(i.Title,{className:d.default.title},void 0,s.default.Messages.AGE_GATE_UNDERAGE_HEADER),v(i.SubTitle,{className:d.default.subtitle},void 0,a?s.default.Messages.AGE_GATE_UNDERAGE_BODY_POST_REGISTER_MESSAGE:s.default.Messages.AGE_GATE_UNDERAGE_BODY.format({underageMessage:r||s.default.Messages.AGE_GATE_UNDERAGE_BODY_DEFAULT_MESSAGE,helpURL:l.default.getArticleURL(u.HelpdeskArticles.AGE_GATE)})),v(o.default,{fullWidth:!0,onClick:y},void 0,s.default.Messages.AGE_GATE_UNDERAGE_BACK_TO_LOGIN))};m.displayName="AgeGateUnderage";var _=m;t.default=_},function(e,t,n){"use strict";var r,a;Object.defineProperty(t,"__esModule",{value:!0}),t.RegistrationSteps=t.RegistrationTransitionActionTypes=void 0,t.RegistrationTransitionActionTypes=r,function(e){e.VIEWED="viewed",e.SUBMITTED="submitted",e.RESEND_CODE="resend_code",e.RESEND_CODE_CALL="resend_code_call",e.INPUT_ERROR="input_error",e.RESPONSE_ERROR="response_error",e.SUCCESS="success"}(r||(t.RegistrationTransitionActionTypes=r={})),t.RegistrationSteps=a,function(e){e.IDENTITY="identity",e.ACCOUNT_INFORMATION="account_information",e.FULL="full",e.AGE_GATE="age_gate",e.CAPTCHA="captcha",e.INVITE="invite",e.SMS_VERIFY="sms_verify"}(a||(t.RegistrationSteps=a={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerPhone=function(e){return m.apply(this,arguments)},t.registerDeferred=function(e){a.default.dispatch({type:d.ActionTypes.REGISTER_SAVE_FORM,form:e})},t.default=function(e){var t=e.invite,n=void 0===t?null:t,r=e.giftCodeSKUId,a=void 0===r?null:r,o=e.captchaKey,i=void 0===o?null:o;return _(p({},function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["invite","giftCodeSKUId","captchaKey"]),{invite:n,giftCodeSKUId:a,captchaKey:i}))},t.registerFull=_;var r=n(95),a=c(n(2)),o=c(n(195)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1314)),l=c(n(11)),u=c(n(482)),s=c(n(1369)),d=n(1);function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))}}function m(){return(m=y(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.phone,e.prev=1,e.next=4,u.default.post({url:d.Endpoints.REGISTER_PHONE,body:{phone:n},oldFormErrors:!0,trackedActionData:{event:r.NetworkActionNames.USER_REGISTER_PHONE}});case 4:return e.abrupt("return",e.sent);case 7:throw e.prev=7,e.t0=e.catch(1),i=new o.default(e.t0),a.default.dispatch({type:d.ActionTypes.REGISTER_FAILURE,error:i}),e.t0;case 12:case"end":return e.stop()}}),e,null,[[1,7]])})))).apply(this,arguments)}function _(e){var t=e.email,n=e.phoneToken,f=e.username,c=e.consent,p=e.password,v=e.guildTemplateCode,y=e.birthday,m=e.invite,_=void 0===m?null:m,h=e.giftCodeSKUId,E=void 0===h?null:h,g=e.captchaKey,S=void 0===g?null:g,O=e.multiStep,I=void 0!==O&&O;return a.default.dispatch({type:d.ActionTypes.REGISTER,birthday:I?y:null}),null!=y&&(0,s.default)(y,d.AnalyticsSections.REGISTER),u.default.post({url:d.Endpoints.REGISTER,body:{fingerprint:l.default.getFingerprint(),email:t,username:f,password:p,invite:_,consent:c,phone_token:n,date_of_birth:null==y?void 0:y.format("YYYY-MM-DD"),gift_code_sku_id:E,guild_template_code:v,captcha_key:S},oldFormErrors:!0,trackedActionData:{event:r.NetworkActionNames.USER_REGISTER,metadata:{invite_code:_}}}).then((function(e){a.default.dispatch({type:d.ActionTypes.REGISTER_SUCCESS,token:e.body.token})}),(function(e){var t=new o.default(e);throw a.default.dispatch({type:d.ActionTypes.REGISTER_FAILURE,error:t}),t.fields.hasOwnProperty("date_of_birth")&&i.preventUnderageRegistration(),e}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-05_stage_discovery_tooltip",label:"Stage Discovery Tooltip",defaultConfig:{showStageDiscoveryTooltip:!1},treatments:[{id:1,label:"Shows the Stage Discovery tooltip for users",config:{showStageDiscoveryTooltip:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?28:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 28 20"}),s("path",{className:f,fill:d,d:"M23.0212 1.67671C21.3107 0.879656 19.5079 0.318797 17.6584 0C17.4062 0.461742 17.1749 0.934541 16.9708 1.4184C15.003 1.12145 12.9974 1.12145 11.0283 1.4184C10.819 0.934541 10.589 0.461744 10.3368 0.00546311C8.48074 0.324393 6.67795 0.885118 4.96746 1.68231C1.56727 6.77853 0.649666 11.7538 1.11108 16.652C3.10102 18.1418 5.3262 19.2743 7.69177 20C8.22338 19.2743 8.69519 18.4993 9.09812 17.691C8.32996 17.3997 7.58522 17.0424 6.87684 16.6135C7.06531 16.4762 7.24726 16.3387 7.42403 16.1847C11.5911 18.1749 16.408 18.1749 20.5763 16.1847C20.7531 16.3332 20.9351 16.4762 21.1171 16.6135C20.41 17.0369 19.6639 17.3997 18.897 17.691C19.3052 18.4993 19.7718 19.2689 20.3021 19.9945C22.6677 19.2689 24.8929 18.1364 26.8828 16.6466H26.8893C27.43 10.9731 25.9665 6.04728 23.0212 1.67671ZM9.68041 13.6383C8.39754 13.6383 7.34085 12.4453 7.34085 10.994C7.34085 9.54272 8.37155 8.34973 9.68041 8.34973C10.9893 8.34973 12.0395 9.54272 12.0187 10.994C12.0187 12.4453 10.9828 13.6383 9.68041 13.6383ZM18.3161 13.6383C17.0332 13.6383 15.9765 12.4453 15.9765 10.994C15.9765 9.54272 17.0124 8.34973 18.3161 8.34973C19.6184 8.34973 20.6751 9.54272 20.6543 10.994C20.6543 12.4453 19.6184 13.6383 18.3161 13.6383Z"}))}d.displayName="Discord"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=m(n(8294)),l=m(n(1233)),u=m(n(107)),s=m(n(10050)),d=m(n(10051)),f=n(8540),c=m(n(9036)),p=n(1),v=m(n(6)),y=m(n(7808));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(){var e=a.useState(!1),t=e[0],n=e[1],r=(0,o.useStateFromStores)([u.default],(function(){return u.default.getGuildId()})),m=(0,o.useStateFromStores)([l.default],(function(){return l.default.hasFetchedRequestToJoinGuilds})),_=(0,d.default)();if(a.useEffect((function(){t&&!m&&i.default.fetchRequestToJoinGuilds()}),[t,m]),0===_.length)return null;var E=null!=r&&_.includes(r);return h(c.default,{guildIds:null!=_?_:[],folderId:-1,index:-1,folderName:v.default.Messages.MEMBER_VERIFICATION_FOLDER_NAME,expanded:t,useCircleMask:!t&&!E,selected:E,draggable:!1,sorting:!1,dragging:!1,onClickOverride:function(){return n(!t)},onContextClickOverride:p.NOOP,folderIconOverride:h(s.default,{width:24,height:24,className:y.default.pendingIcon}),guildNodeOverride:f.JoinRequestGuild})};E.displayName="PendingGuildJoinRequestsFolder";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M7 1C6.73479 1.00003 6.48045 1.10539 6.29292 1.29292C6.10539 1.48045 6.00003 1.73479 6 2V6C6.00009 6.23417 6.08234 6.46088 6.23242 6.64062L10.6992 12L6.23242 17.3594C6.08234 17.5391 6.00009 17.7658 6 18V22C6.00003 22.2652 6.10539 22.5195 6.29292 22.7071C6.48045 22.8946 6.73479 23 7 23H17C17.2652 23 17.5195 22.8946 17.7071 22.7071C17.8946 22.5195 18 22.2652 18 22V18C17.9999 17.7658 17.9177 17.5391 17.7676 17.3594L13.3008 12L17.7676 6.64062C17.9177 6.46088 17.9999 6.23417 18 6V2C18 1.73479 17.8946 1.48045 17.7071 1.29292C17.5195 1.10539 17.2652 1.00003 17 1H7ZM12 13.5625L16 18.3613V21H8V18.3613L12 13.5625Z"}))}d.displayName="Pending"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.useStateFromStoresArray)([a.default,o.default],(function(){var e=a.default.computeGuildIds(),t=o.default.getGuilds();return e.filter((function(e){return null==t[e]}))}))};var r=n(3),a=i(n(1233)),o=i(n(15));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHomeLink=function(e){a.default.dirtyDispatch({type:o.ActionTypes.APP_VIEW_SET_HOME_LINK,link:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={search:function(e,t){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY,query:e,channelId:t})},clear:function(e){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY,query:"",channelId:e})},select:function(e){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_INVITE_SELECT,row:e})},addUser:function(e){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_ADD_USER,userId:e})},removeUser:function(e){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_REMOVE_USER,userId:e})},open:function(e){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_INVITE_OPEN,channelId:e})},close:function(){a.default.dispatch({type:o.ActionTypes.PRIVATE_CHANNEL_RECIPIENTS_INVITE_CLOSE})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-04_longer_group_dm_invites",label:"Longer Group DM Invites",defaultConfig:{inviteMaxAgeSeconds:86400},treatments:[{id:1,label:"Makes group DM invites expire after 1 week.",config:{inviteMaxAgeSeconds:604800}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(8)),a=p(n(3)),o=p(n(2)),i=p(n(1186)),l=p(n(31)),u=p(n(1385)),s=p(n(10)),d=p(n(70)),f=p(n(12)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y,m=!1,_="",h=0,E=[],g=!1,S=new Set,O=null;function I(){_="",h=0,E=[],S=new Set,m=!1,O=null}function T(e){_=e,h=0,C()}function C(){if(!m)return!1;var e=s.default.getChannel(O);if(0===_.trim().length)return null!=y&&y.clearQuery(),E=function(e){var t=d.default.getFriendIDs();null!=e&&(t=t.filter((function(t){return!e.recipients.includes(t)})));return t.reduce((function(e,t){var n=f.default.getUser(t);return null==n||e.push({user:n}),e}),[]).sort(M)}(e),!0;var t,n,r,a=null!=e?e.recipients:[];return null!=y&&y.setQuery(_,{friends:!0},a,(t=u.default.getFrequently().filter((function(e){return e instanceof l.default&&e.type===c.ChannelTypes.DM})),n=Math.max.apply(Math,t.map((function(e){var t=e.id;return u.default.getScore(t)}))),r={},t.forEach((function(e){var t=u.default.getScore(e.id),a=e.getRecipientId(),o=d.default.isFriend(a)?.2:0,i=s.default.getDMFromUserId(a)?.1:0;r[a]=1+t/n+o+i})),r)),!1}function b(){if(!m)return!1;var e=g;return(g=r.default.some(d.default.getRelationships(),(function(e){return e===c.RelationshipTypes.FRIEND})))!==e}function M(e,t){return e.user.usernameNormalized.localeCompare(t.user.usernameNormalized)}function N(e){var t=e.results;m&&""!==_&&(E=t.map((function(e){var t=e.user,n=e.id,r=e.score,a=e.comparator;return{user:null!=t?t:f.default.getUser(n),score:r,comparator:a}})),R.emitChange())}function A(e){m=!0,b(),y=i.default.getSearchContext(N,1e3),O=e.channelId,T("")}function P(){null!=y&&(y.destroy(),y=null),I()}var R=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(f.default,s.default,d.default),this.syncWith([f.default,s.default],C),this.syncWith([d.default],b)},a.getResults=function(){return E},a.hasFriends=function(){return g},a.getSelectedUsers=function(){return S},a.getQuery=function(){return _},a.getState=function(){return{query:_,selectedRow:h,selectedUsers:S,results:E,hasFriends:g}},r}(a.default.Store))(o.default,{CONNECTION_OPEN:function(e){I()},CHANNEL_SELECT:function(e){var t=e.guildId,n=e.channelId;if(null!=t)return!1;var r=m;return I(),m=r,O=n,C()},MODAL_PUSH:A,SHOW_ACTION_SHEET:A,PRIVATE_CHANNEL_RECIPIENTS_INVITE_OPEN:A,MODAL_POP:function(e){return P()},HIDE_ACTION_SHEET:function(e){return P()},PRIVATE_CHANNEL_RECIPIENTS_INVITE_CLOSE:function(e){return P()},PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY:function(e){O=e.channelId,T(e.query)},PRIVATE_CHANNEL_RECIPIENTS_INVITE_SELECT:function(e){h=e.row},PRIVATE_CHANNEL_RECIPIENTS_ADD_USER:function(e){var t=e.userId;S.add(t),S=new Set(S)},PRIVATE_CHANNEL_RECIPIENTS_REMOVE_USER:function(e){var t=e.userId;S.delete(t),S=new Set(S)}}),L=R;t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M20.998 0V3H23.998V5H20.998V8H18.998V5H15.998V3H18.998V0H20.998ZM2.99805 20V24L8.33205 20H14.998C16.102 20 16.998 19.103 16.998 18V9C16.998 7.896 16.102 7 14.998 7H1.99805C0.894047 7 -0.00195312 7.896 -0.00195312 9V18C-0.00195312 19.103 0.894047 20 1.99805 20H2.99805Z"}))}d.displayName="ChatNew"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(9)),o=n(3),i=y(n(8300)),l=y(n(8332)),u=y(n(256)),s=y(n(1160)),d=y(n(61)),f=y(n(55)),c=y(n(24)),p=n(1),v=y(n(7810));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t,n=e.user,r=e.row,y=e.hideDiscriminator,m=e.comparator,h=e.selected,E=e.checked,g=e.onClick,S=e.onMouseEnter,O=e["aria-setsize"],I=e["aria-posinset"],T=(0,o.useStateFromStores)([u.default],(function(){return u.default.getStatus(n.id)}));return _(d.default,{tabIndex:-1,onClick:function(){null!=g&&g(n.id)},onMouseEnter:function(){null!=S&&S(r)},className:v.default.friendWrapper,"aria-selected":h,role:"option",id:"user-row-"+r,"aria-setsize":O,"aria-posinset":I},void 0,_(f.default,{align:f.default.Align.CENTER,className:(0,a.default)(v.default.friend,(t={},t[v.default.friendSelected]=h,t))},void 0,_(l.default,{user:n,status:T,className:v.default.avatar}),_(f.default,{className:v.default.match,align:f.default.Align.BASELINE},void 0,_(c.default,{tag:"strong",className:v.default.nickname},void 0,null!=m&&m===n.tag?n.username:m||n.username),_(i.default,{user:n,hideDiscriminator:y,className:v.default.discordTag,usernameClass:v.default.weightMedium,discriminatorClass:v.default.weightMedium})),_(s.default,{displayOnly:!0,color:p.Colors.PRIMARY_DARK,size:22,value:E,className:v.default.checkbox})))}h.displayName="InviteModalUserRow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,l=e.padded,u=void 0===l||l,d=e.inset,f=void 0!==d&&d,c=e.active,p=void 0!==c&&c,v=e.className,y=e.children,m=e.onClick,_=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["padded","inset","active","className","children","onClick"]);return null!=m?r.createElement(o.default,s({onClick:m,tabIndex:null!=m?0:-1,className:(0,a.default)(v,(t={},t[i.default.outer]=!f,t[i.default.inset]=f,t[i.default.padded]=u,t[i.default.active]=p,t[i.default.interactive]=null!=m,t))},_),y):r.createElement("div",s({className:(0,a.default)(v,(n={},n[i.default.outer]=!f,n[i.default.inset]=f,n[i.default.padded]=u,n[i.default.active]=p,n))},_),y)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(9)),o=l(n(61)),i=l(n(8049));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHeader=function(e){var t,n=e.application_id;if(!n)return;var r=f[n];if(r&&!1!==(null===(t=r.shouldShow)||void 0===t?void 0:t.call(r,e)))return r.createHeader(e)},t.createBody=function(e){var t,n=e.application_id;if(!n)return;var r=f[n];if(r&&r.body&&!1!==(null===(t=r.shouldShow)||void 0===t?void 0:t.call(r,e))){var a=r.body;return d("section",{className:u.default.section},"delegate-"+n,d(a,{activity:e}))}},t.shouldShowActivity=function(e){var t,n=e.application_id;if(!n)return!0;var r=f[n];return null==r||!1!==(null===(t=r.shouldShow)||void 0===t?void 0:t.call(r,e))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o,i=n(134),l=n(11263),u=(r=n(7812))&&r.__esModule?r:{default:r};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=((a={})[i.STAGE_APPLICATION_ID]=new l.StageChannelNowPlayingDelegate,a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=D(n(9)),i=D(n(133)),l=D(n(8935)),u=D(n(9109)),s=D(n(183)),d=D(n(1332)),f=D(n(732)),c=D(n(1333)),p=D(n(1277)),v=D(n(707)),y=D(n(1334)),m=D(n(180)),_=D(n(88)),h=D(n(8524)),E=D(n(61)),g=D(n(8432)),S=D(n(10058)),O=D(n(8762)),I=D(n(8825)),T=D(n(9111)),C=D(n(8276)),b=D(n(279)),M=D(n(24)),N=D(n(8414)),A=D(n(11266)),P=n(1),R=D(n(6)),L=D(n(7812));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(){return(j=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}).apply(this,arguments)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var G=64,F=160,B=[14,14,12,12,10,8,6],H=function(e,t){return void 0===t&&(t=null),U(M.default,{className:(0,o.default)(L.default.sectionTitle,L.default.textContent,t),size:M.default.Sizes.SIZE_14},void 0,e)};H.displayName="renderSectionTitle";var x=function(e,t){return void 0===t&&(t=null),U(M.default,{className:(0,o.default)(L.default.textContent,t),size:M.default.Sizes.SIZE_12},void 0,e)};x.displayName="renderSectionText";var V=(0,u.default)((function(e){var t=e.message;return U("div",{className:L.default.timestamp},void 0,t)})),W=function(e){var t=e.children;return U("section",{className:L.default.section},void 0,t)};W.displayName="Section";var Y=function(e){var t,n=e.inset,r=e.className;return U("div",{className:(0,o.default)(L.default.separator,(t={},t[L.default.inset]=n,t),r)})};Y.displayName="Separator";var z=function(e){var t,r;function a(){return e.apply(this,arguments)||this}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,k(t,r);var i=a.prototype;return i.renderTimePlayed=function(){var e,t=this.props.activity,n=t.timestamps;return null==n||!(0,c.default)(t)||(0,p.default)(t)?null:(e=(0,f.default)(t)?U(V,{timestamps:n}):U(g.default,{start:n.start,end:n.end,location:g.default.Locations.USER_ACTIVITY,className:L.default.playTime}),x(e))},i.render=function(){var e,t=this.props,r=t.activity,a=r.assets,i=r.details,l=r.state,u=r.application_id,s=t.getAssetImage;return U(W,{},void 0,U("div",{className:L.default.activitySection},void 0,null!=a&&0!==Object.keys(a).length?U("div",{className:L.default.activitySectionAssets},void 0,U("img",{alt:a.large_text||"",src:s(u,a.large_image,[F,F]),className:(0,o.default)(L.default.largeImage,(e={},e[L.default.largeImageMask]=null!=a.small_image,e))}),null!=a.small_image?U("img",{alt:a.small_text||"",src:s(u,a.small_image,[G,G]),className:L.default.smallImage}):null):U("div",{className:L.default.activitySectionAssets},void 0,U("img",{alt:"",src:n(10441),className:L.default.largeImage})),U("div",{},void 0,H(i||R.default.Messages.USER_ACTIVITY_HEADER_PLAYING),null!=l?x(l):null,this.renderTimePlayed())))},a}(a.Component);z.displayName="RichPresenceSection";var K=U("div",{}),$=function(e){var t,n=e.activity,r=n.assets,a=n.details,i=n.state,l=n.application_id,u=e.partySize,s=e.members,d=e.isSolo,f=e.getAssetImage;return U(W,{},void 0,U("div",{className:L.default.spotifySection},void 0,null!=r?U("div",{className:L.default.activitySectionAssets},void 0,U("img",{alt:r.large_text||"",src:f(l,r.large_image,[F,F]),className:(0,o.default)(L.default.largeImage,(t={},t[L.default.largeImageMask]=null!=r.small_image,t))}),d?null:U(I.default,{className:L.default.smallImage,color:P.Colors.SPOTIFY})):K,U("div",{},void 0,null!=a?H(a):null,null!=i?x(i):null),U(A.default,{minAvatarsShown:d?2:1,partySize:u,members:s})))};$.displayName="SpotifySection";var Z=function(e){var t,r,a=e.activity,i=e.user,l=e.getAssetImage,u=e.guildId,f=a.name,c=a.details,p=a.assets,y=a.application_id;return null!=p&&(0,v.default)(a)&&(r=U(h.default,{className:L.default.twitchSectionPreviewWrapper,aspectRatio:16/9},void 0,U(E.default,{href:(0,d.default)(a),tag:"a",target:"_blank"},void 0,U("img",{alt:p.large_text||"",src:l(y,p.large_image,[900,500]),className:L.default.twitchSectionPreview}),U("img",{src:n(11268),className:L.default.twitchSectionPlayButton,alt:""})))),U(W,{},void 0,U("div",{className:(0,o.default)((t={},t[L.default.twitchSectionSimple]=null==i,t[L.default.twitchSectionFull]=null!=i,t))},void 0,U("img",{alt:"",src:s.default.get(P.PlatformTypes.TWITCH).icon.color,className:L.default.twitchSectionIcon}),U("div",{},void 0,H(f),null!=c?x(c):null),null!=i?U(b.default,{src:i.getAvatarURL(u),"aria-label":i.username,className:L.default.twitchSectionAvatar,size:b.default.Sizes.SIZE_24}):null),r)};Z.displayName="TwitchSection";var q=function(e){var t=e.guild,n=e.channel,r=e.onGuildClick,i=e.partySize,l=e.members,u=e.onChannelContextMenu,s=a.useRef(null),d=(0,m.default)(n,!0);return U(W,{},void 0,a.createElement("div",{className:L.default.voiceSection,ref:s,onContextMenu:function(e){return u(e,n)}},U(E.default,{onClick:r,focusProps:{ringTarget:s}},void 0,U("div",{className:L.default.voiceSectionAssets},void 0,null!=t.getIconURL()?U("img",{alt:"",src:t.getIconURL()||void 0,className:(0,o.default)(L.default.voiceSectionGuildImage,L.default.largeImageMask)}):U("div",{className:L.default.voiceSectionNoGuildImageWrapper},void 0,U("div",{className:L.default.voiceSectionNoGuildImage,style:{fontSize:B[t.acronym.length]||B[B.length-1]}},void 0,t.acronym)),U("div",{className:L.default.voiceSectionIconWrapper},void 0,U(C.default,{className:L.default.voiceSectionIcon})))),U(E.default,{onClick:r,tabIndex:-1},void 0,U("div",{className:L.default.voiceSectionDetails},void 0,H(t.toString(),L.default.voiceSectionText),x(d,L.default.voiceSectionText))),U(A.default,{partySize:i,members:l,guildId:t.id})))};q.displayName="VoiceSection";var X=function(e){var t=e.title;return U(W,{},void 0,U("div",{className:L.default.xboxSection},void 0,U(T.default,{className:L.default.xboxSectionIcon}),U("div",{className:L.default.xboxSectionDetails},void 0,H(t),x(R.default.Messages.GAME_FEED_ACTIVITY_PLAYING_XBOX))))};X.displayName="XboxSection";var J=function(e){var t=e.icon,n=e.name,r=e.partySize,a=e.members;return U(W,{},void 0,U("div",{className:L.default.gameSection},void 0,null!=t?U("img",{alt:"",src:t,className:L.default.gameSectionIcon}):null,U("div",{},void 0,H(n),x(R.default.Messages.ACTIVITY_FEED_SINGLE_MEMBER_LIST_HEADER.format({memberCount:r.totalSize}))),U(A.default,{partySize:r,members:a})))};J.displayName="GameSection";var Q=function(e){var t=e.activity,n=e.user,r=e.applicationStream,a=e.onPreviewClick,o=e.guildId,i=U(h.default,{className:L.default.applicationStreamingPreviewWrapper,aspectRatio:16/9},void 0,U(E.default,{onClick:a,className:L.default.applicationStreamingPreviewSize},void 0,U(l.default,{stream:r,className:L.default.applicationStreamingPreviewSize}),U("div",{className:L.default.applicationStreamingHoverWrapper},void 0,U("div",{className:L.default.applicationStreamingHoverText},void 0,R.default.Messages.WATCH_STREAM)))),u=(0,y.default)(t,r)||R.default.Messages.SHARING_SCREEN;return U(W,{},void 0,U("div",{className:L.default.applicationStreamingSection},void 0,U(b.default,{size:b.default.Sizes.SIZE_32,src:n.getAvatarURL(o),"aria-label":n.username,className:L.default.applicationStreamingAvatar}),U("div",{},void 0,H(n.toString()),x(u)),U(N.default,{size:N.default.Sizes.SMALL})),i)};Q.displayName="ApplicationStreamingSection";var ee=(0,i.default)({XBOX:null,SPOTIFY:null,MULTIPLE:null}),te=function(e){var t,n=e.src,r=e.onClick,a=e.onContextMenu;switch(n){case ee.XBOX:t=U(T.default,{className:L.default.headerIcon,color:P.Colors.PRIMARY_DARK_300});break;case ee.SPOTIFY:t=U(I.default,{className:L.default.headerIcon,color:P.Colors.SPOTIFY});break;case ee.MULTIPLE:t=U("div",{className:L.default.multipleIconWrapper},void 0,U(O.default,{className:(0,o.default)(L.default.headerIcon,L.default.multipleIcon),color:P.Colors.PRIMARY_DARK_300}));break;default:t=U("img",{src:n||void 0,alt:"",className:L.default.headerIcon})}return null!=r||null!=a?U(E.default,{onClick:r,className:(0,o.default)(null!=r?L.default.clickableIcon:""),onContextMenu:a},void 0,t):t};te.Src=ee;var ne=function(e){var t=e.priorityUser,n=e.title,r=e.subtitle,a=e.icon,i=e.onContextMenu,l=e.guildId;return U("header",{className:null!=a?L.default.headerFull:L.default.headerSimple},void 0,U(b.default,{src:t.user.getAvatarURL(l),"aria-label":t.user.username,size:b.default.Sizes.SIZE_32,className:L.default.headerAvatar,status:t.status,onContextMenu:i}),U("div",{className:L.default.headerDetails},void 0,U(M.default,{className:(0,o.default)(L.default.sectionTitle,L.default.textContent),size:M.default.Sizes.SIZE_16},void 0,n),U(M.default,{color:M.default.Colors.HEADER_SECONDARY,className:L.default.textContent},void 0,r)),null!=a?a:null)};ne.displayName="NowPlayingHeader",ne.Icon=te;var re=function(e){var t=e.children;return U(S.default,{inset:!0,padded:!1,className:L.default.body},void 0,t)};re.displayName="NowPlayingBody";var ae=function(e){var t=e.children,n=e.className,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","className"]);return U(_.default,{},void 0,a.createElement(S.default,j({className:(0,o.default)(n,L.default.wrapper),padded:!0},r),t))};ae.displayName="NowPlayingItem",ae.Header=ne,ae.Body=re,ae.Separator=Y,ae.VoiceSection=q,ae.GameSection=J,ae.RichPresenceSection=z,ae.XboxSection=X,ae.SpotifySection=$,ae.TwitchSection=Z,ae.ApplicationStreamingSection=Q;var oe=ae;t.default=oe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Rows=t.Row=void 0;var r=y(n(8)),a=y(n(3)),o=y(n(2)),i=y(n(1217)),l=y(n(62)),u=y(n(163)),s=y(n(56)),d=y(n(15)),f=y(n(256)),c=y(n(70)),p=y(n(12)),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(){return(m=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}).apply(this,arguments)}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,E(e,t)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=p.default.getUser(e);return{user:t,usernameLower:null!=t?t.username.toLowerCase():null}}function S(e){return{status:f.default.getStatus(e),isMobile:f.default.isMobileOnline(e),activities:f.default.getActivities(e),applicationStream:u.default.getStreamForUser(e)}}var O=function(e){function t(t){var n;return(n=e.call(this)||this).key=t.key,n.type=t.type,n.status=t.status,n.activities=t.activities,n.applicationStream=t.applicationStream,n.user=t.user,n.isMobile=t.isMobile,n.usernameLower=t.usernameLower,n.mutualGuildsLength=t.mutualGuildsLength,n.mutualGuilds=t.mutualGuilds,n.nickname=t.nickname,n}var n,r,a;return h(t,e),n=t,(r=[{key:"comparator",get:function(){var e,t;return[this.type,null!==(e=null===(t=this.nickname)||void 0===t?void 0:t.toLowerCase())&&void 0!==e?e:this.usernameLower]}}])&&_(n.prototype,r),a&&_(n,a),t}(l.default);t.Row=O;var I=function(){function e(e){void 0===e&&(e=[]),this._rows=e}var t=e.prototype;return t.reset=function(){return new e(r.default.map(c.default.getRelationships(),(function(e,t){return new O(m({key:t,type:e,nickname:c.default.getNickname(t)},g(t),{},S(t),{},function(e){var t=[];return(0,r.default)(s.default.memberOf(e)).map(d.default.getGuild).sortBy((function(e){return null!=e?e.name.toLowerCase():null})).forEach((function(e){null!=e&&t.push(e)})),{mutualGuildsLength:t.length,mutualGuilds:t.slice(0,v.MAX_MUTUAL_GUILDS)}}(t)))})))},t.clone=function(){return new e(this._rows)},t.update=function(e){for(var t=!1,n=0;n<this._rows.length;n++){var r=this._rows[n],a=r.merge(e(r.key));t=t||a!==r,this._rows[n]=a}return t},t.filter=function(e){return(0,r.default)(this._rows).filter((function(e){return null!=e.user})).filter((function(t){switch(e){case v.FriendsSections.ONLINE:return t.type===v.RelationshipTypes.FRIEND&&t.status!==v.StatusTypes.OFFLINE;case v.FriendsSections.PENDING:return t.type===v.RelationshipTypes.PENDING_INCOMING||t.type===v.RelationshipTypes.PENDING_OUTGOING;case v.FriendsSections.BLOCKED:return t.type===v.RelationshipTypes.BLOCKED;case v.FriendsSections.ALL:default:return t.type===v.RelationshipTypes.FRIEND}})).sortBy((function(e){return e.comparator})).value()},t.getRelationshipCounts=function(){var e,t=((e={})[v.RelationshipTypes.FRIEND]=0,e[v.RelationshipTypes.PENDING_INCOMING]=0,e[v.RelationshipTypes.PENDING_OUTGOING]=0,e[v.RelationshipTypes.BLOCKED]=0,e);return this._rows.forEach((function(e){null!=e.user&&null!=t[e.type]&&t[e.type]++})),t},e}();t.Rows=I;var T=!0,C=!1,b=v.FriendsSections.ONLINE,M=new I,N=!0;function A(e){void 0===e&&(e=!1),T&&(e||b!==v.FriendsSections.ONLINE&&b!==v.FriendsSections.ADD_FRIEND)&&!C&&(T=!1,C=!0,i.default.fetchRelationships())}function P(){T=!0,N?C=!1:A();var e=(M=M.reset()).getRelationshipCounts();b=0===e[v.RelationshipTypes.FRIEND]?0!==e[v.RelationshipTypes.PENDING_INCOMING]?v.FriendsSections.PENDING:v.FriendsSections.ADD_FRIEND:v.FriendsSections.ONLINE}function R(){M=N?new I:M.reset()}function L(e){return function(){return!N&&(!!M.update(e)&&(M=M.clone(),!0))}}var D=new(function(e){function t(){return e.apply(this,arguments)||this}h(t,e);var n=t.prototype;return n.initialize=function(){this.waitFor(c.default,f.default,p.default,d.default,s.default,u.default),this.syncWith([c.default],R),this.syncWith([p.default],L(g)),this.syncWith([f.default,u.default],L(S)),P()},n.getState=function(){return{fetching:C,section:b,pendingCount:c.default.getPendingCount(),rows:M}},t}(a.default.Store))(o.default,{CONNECTION_OPEN:function(e){P()},FRIENDS_SET_SECTION:function(e){b=e.section,A()},CHANNEL_SELECT:function(e){var t=e.channelId;return N=null!=t,R(),!N},LOAD_RELATIONSHIPS_SUCCESS:function(e){C=!1},LOAD_RELATIONSHIPS_FAILURE:function(e){return T=!0,void(C=!0)},DRAWER_SELECT_TAB:function(e){var t=e.tab;return N=t!==v.DrawerTabTypes.FRIENDS,R(),!N}});t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=d(n(9)),l=d(n(61)),u=d(n(149)),s=d(n(8058));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.icon,n=e.tooltip,r=e.onClick,d=e.actionType,f=void 0===d?a.DEFAULT:d,v=e.shouldHighlight;return p(u.default,{text:n},void 0,(function(e){var u;return o.createElement(l.default,c({},e,{"aria-label":n,onClick:r,className:(0,i.default)(s.default.actionButton,(u={},u[s.default.actionAccept]=f===a.ACCEPT,u[s.default.actionDeny]=f===a.DENY,u[s.default.highlight]=v,u))}),p(t,{className:s.default.icon}))}))}!function(e){e[e.ACCEPT=0]="ACCEPT",e[e.DENY=1]="DENY",e[e.DEFAULT=2]="DEFAULT"}(a||(a={})),v.displayName="ActionButton",v.ActionTypes=a;var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(273)),l=n(680),u=n(389),s=p(n(88)),d=p(n(8351)),f=n(10064),c=p(n(8059));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={height:new i.default.Value(f.PEOPLE_LIST_ITEM_HEIGHT),opacity:new i.default.Value(1),hovered:!1,isContextMenuActive:!1},t.handleMouseEnter=function(){var e=t.props,n=e.isFocused,r=e.isActive,a=e.onOtherHover,o=t.state.isContextMenuActive;t.setState({hovered:n}),!n||r||o||a&&a()},t.handleMouseLeave=function(){t.setState({hovered:!1})},t.handleContextMenu=function(e,n){t.setState({isContextMenuActive:!0}),(0,u.openContextMenu)(e,(function(e){return a.createElement(d.default,m({},e,{user:n}))}),{onClose:function(){t.setState({isContextMenuActive:!1})}})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var p=r.prototype;return p.componentWillLeave=function(e){i.default.parallel([i.default.timing(this.state.opacity,{toValue:0,duration:200}),i.default.timing(this.state.height,{toValue:0,duration:200})]).start(e)},p.componentWillEnter=function(e){this.state.opacity.setValue(0),this.state.height.setValue(0),i.default.parallel([i.default.timing(this.state.opacity,{toValue:1,duration:200}),i.default.timing(this.state.height,{toValue:f.PEOPLE_LIST_ITEM_HEIGHT,duration:200})]).start(e)},p.render=function(){var e=this,t=this.state,n=t.height,r=t.opacity,u=t.hovered,d=t.isContextMenuActive,f=this.props,p=f.children,v=f.user,_=f.onClick,h=f.isActive;return y(l.ListNavigatorItem,{id:v.id},void 0,(function(t){var l;return y(s.default,{offset:{left:-8,right:-8}},void 0,a.createElement(i.default.div,m({className:(0,o.default)(c.default.peopleListItem,(l={},l[c.default.active]=h||d,l)),onContextMenu:function(t){return e.handleContextMenu(t,v)},onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,onClick:null!=_?_:void 0,style:{height:n,opacity:r}},t),p(u||h||d)))}))},r}(a.PureComponent);h.displayName="PeopleListItem";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STATUS_HEADER_HEIGHT=t.PEOPLE_LIST_ITEM_HEIGHT=t.RELATIONSHIP_COUNT_ANIMATION_THRESHOLD=void 0;t.RELATIONSHIP_COUNT_ANIMATION_THRESHOLD=64;t.PEOPLE_LIST_ITEM_HEIGHT=62;t.STATUS_HEADER_HEIGHT=24},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(9)),o=n(3),i=d(n(8300)),l=d(n(8332)),u=d(n(70)),s=d(n(8060));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t,n=e.user,r=e.hovered,d=e.subText,f=e.status,p=e.isMobile,v=e.className,y=(0,o.useStateFromStores)([u.default],(function(){return u.default.getNickname(n.id)}));return c("div",{className:(0,a.default)(s.default.userInfo,v,(t={},t[s.default.hovered]=r,t))},void 0,c(l.default,{user:n,className:s.default.avatar,animate:r,status:f,isMobile:p}),c("div",{className:s.default.text},void 0,c(i.default,{nick:y,user:n,className:s.default.discordTag,usernameClass:s.default.username,discriminatorClass:s.default.discriminator}),c("div",{className:s.default.subtext},void 0,d)))}p.displayName="UserInfo";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"20",height:"16"});function f(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.className,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({className:c,width:n,height:a,viewBox:"0 0 20 16"},(0,i.default)(v)),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:p,fill:f,d:"M1,14.1538462 L1.95,14.1538462 C3.73125,14.1538462 5.5125,13.5384615 6.81875,12.4307692 C5.15625,12.4307692 3.73125,11.2 3.1375,9.6 C3.375,9.6 3.6125,9.72307692 3.85,9.72307692 C4.20625,9.72307692 4.5625,9.72307692 4.91875,9.6 C3.1375,9.23076923 1.7125,7.63076923 1.7125,5.66153846 C2.1875,5.90769231 2.78125,6.15384615 3.49375,6.15384615 C2.425,5.41538462 1.83125,4.18461538 1.83125,2.70769231 C1.83125,1.96923077 2.06875,1.23076923 2.30625,0.615384615 C4.20625,3.07692308 7.05625,4.67692308 10.38125,4.8 C10.2625,4.67692308 10.2625,4.30769231 10.2625,4.06153846 C10.2625,1.84615385 12.04375,0 14.18125,0 C15.25,0 16.31875,0.492307692 17.03125,1.23076923 C17.8625,1.10769231 18.8125,0.738461538 19.525,0.246153846 C19.2875,1.23076923 18.575,1.96923077 17.8625,2.46153846 C18.575,2.46153846 19.2875,2.21538462 20,1.84615385 C19.525,2.70769231 18.8125,3.32307692 18.1,3.93846154 L18.1,4.43076923 C18.1,9.84615385 14.18125,16 6.9375,16 C4.68125,16 2.6625,15.3846154 1,14.1538462 Z"}),d))}f.displayName="Twitter"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=n(8253),i=n(1163),l=(r=n(6))&&r.__esModule?r:{default:r};function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){return i.SUPPORTS_COPY?s(o.MenuItem,{id:"copy-channel-topic",label:l.default.Messages.COPY_CHANNEL_TOPIC,action:function(){return(0,i.copy)(e.topic)}}):null}d.displayName="useChannelCopyTopicItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePermissions=function(e,t){return(0,r.useStateFromStoresObject)([c.default],(function(){return{canInvite:(0,p.canViewInviteModal)(c.default,t,e),canCustomize:null!=t&&c.default.can(y.Permissions.MANAGE_GUILD,t),canMessage:null!=e&&c.default.can(y.Permissions.SEND_MESSAGES,e),canCreateChannel:null!=t&&c.default.can(y.Permissions.MANAGE_CHANNELS,t)}}),[t,e])},t.useGuildChannelCreated=h,t.useGuildPopulated=E,t.useGuildPersonalized=g,t.useChannelMessaged=S,t.useCompletedStates=function(e,t){return{guildPopulated:E(t),guildMessaged:S(e),guildPersonalized:g(t),guildChannelCreated:h(t)}};var r=n(3),a=_(n(685)),o=_(n(11)),i=_(n(10)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(86)),u=_(n(684)),s=_(n(15)),d=_(n(694)),f=_(n(201)),c=_(n(40)),p=n(8286),v=_(n(97)),y=n(1);function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){return e&&e.__esModule?e:{default:e}}function h(e){return(0,r.useStateFromStores)([l.default],(function(){var t=l.default.getChannels(null==e?void 0:e.id),n=t[l.GUILD_VOCAL_CHANNELS_KEY];function r(t){return null!=e&&v.default.extractTimestamp(t.channel.id)-v.default.extractTimestamp(e.id)>500}return t[l.GUILD_SELECTABLE_CHANNELS_KEY].some(r)||n.some(r)}),[e])}function E(e){var t=(0,r.useStateFromStores)([i.default],(function(){return i.default.getChannel(null==e?void 0:e.systemChannelId)})),n=(0,r.useStateFromStoresArray)([f.default],(function(){return null!=t?f.default.getMessages(t.id).toArray():[]}));return(0,r.useStateFromStores)([u.default],(function(){var t,r=null!==(t=u.default.getMemberCount(null==e?void 0:e.id))&&void 0!==t&&t,a=n.some((function(e){return e.type===y.MessageTypes.USER_JOIN}));return r>1||a}),[e,n])}function g(e){var t=(0,r.useStateFromStores)([d.default],(function(){return d.default.hasLayers()})),n=(0,r.useStateFromStores)([s.default],(function(){return s.default.getGuild(null==e?void 0:e.id)}));return null!=(null==n?void 0:n.icon)&&!t}function S(e){var t=(0,r.useStateFromStoresArray)([f.default],(function(){return null!=e?f.default.getMessages(e.id).toArray():[]}));return(0,r.useStateFromStores)([o.default],(function(){return t.some((function(e){return e.author.id===o.default.getId()&&!(0,a.default)(e)}))}),[t])}},function(e,t,n){e.exports=n.p+"472c7d0bdf6d64d6268ac6ccec5bef02.svg"},function(e,t,n){e.exports=n.p+"99fa9665e3eb82012f301396f6061bc7.svg"},function(e,t,n){e.exports=n.p+"8d2b5dee096a9060d3eccc4eea89a520.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=v(n(88)),l=v(n(61)),u=v(n(153)),s=v(n(686)),d=v(n(5968)),f=v(n(24)),c=v(n(6)),p=v(n(8080));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._textInputRef=a.createRef(),t._containerRef=a.createRef(),t.handleClear=function(){var e=t.props,n=e.onClear,r=e.forwardedRef,a=(null!=r?r:t._textInputRef).current;null!=a&&a.focus(),null!=n&&n()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n),r.prototype.render=function(){var e=this.props,t=e.autoFocus,n=e.label,r=e.placeholder,v=e.searchTerm,y=e.inputClassName,m=e.className,h=e.onChange,E=e.onFocus,g=e.onBlur,S=e.onKeyPress,O=e.autoComplete,I=e.forwardedRef,T=e.closeIconClassName,C=e.searchIconClassName,b=e.cta,M=null!=v&&v.length>0,N=null!=I?I:this._textInputRef;return _(i.default,{focusTarget:N,ringTarget:this._containerRef},void 0,a.createElement("div",{className:(0,o.default)(p.default.searchBox,m),ref:this._containerRef},_(u.default,{inputRef:N,focusProps:{enabled:!1},name:"search",maxLength:100,className:p.default.searchBoxInputWrapper,inputClassName:(0,o.default)(p.default.searchBoxInput,y),onChange:h,onFocus:E,onBlur:g,onKeyPress:S,value:M?v:"",placeholder:r,autoFocus:t,"aria-label":n,autoComplete:O?"on":"off"}),null!=b?_(f.default,{color:f.default.Colors.MUTED,size:f.default.Sizes.SIZE_12,className:p.default.cta},void 0,b):null,M?_(l.default,{onClick:this.handleClear,className:p.default.clear},void 0,_(s.default,{className:(0,o.default)(p.default.clearIcon,T)})):_(d.default,{className:(0,o.default)(p.default.searchIcon,C),"aria-label":c.default.Messages.SEARCH})))},r}(a.Component);E.displayName="SearchBox",E.defaultProps={autoComplete:!1};var g=a.forwardRef((function(e,t){return a.createElement(E,m({forwardedRef:t},e))}));t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(8)),i=h(n(8495)),l=h(n(106)),u=n(682),s=h(n(29)),d=h(n(1162)),f=h(n(151)),c=h(n(476)),p=h(n(474)),v=n(35),y=h(n(47)),m=n(1),_=h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._isMounted=!1,t.headerID=o.default.uniqueId(),t.state={loading:!0,submitting:!1,reasons:[],selectedReason:null},t.handleReasonChange=function(e){var n=e.value;t.setState({selectedReason:n})},t.handleReport=function(e){e.preventDefault(),t.setState({submitting:!0});var n=t.props.onReport,r=t.getReportData();l.default.trackWithMetadata(m.AnalyticEvents.MESSAGE_REPORTED,{reason_enum:r.reason,location_object:"admin_delete_message_modal",guild_id:r.guild_id,channel_id:r.channel_id,message_id:r.message_id}),i.default.report(r).then((function(){n&&n(),t.close()}),(function(){return t.setState({submitting:!1})}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this;this._isMounted=!0,i.default.getReasons(this.getReportData()).then((function(t){e._isMounted&&e.setState({reasons:t,loading:!1})}))},a.componentWillUnmount=function(){this._isMounted=!1},a.close=function(){(0,this.props.onClose)()},a.renderHeader=function(){var e,t=this.props,n=t.guild,r=t.message,a=t.user;return n?e=_.default.Messages.REPORT_SERVER.format({name:n.toString()}):r?e=_.default.Messages.REPORT_MESSAGE.format({name:(0,u.getMessageAuthor)(r).nick}):a&&(e=_.default.Messages.REPORT_USER.format({name:a.tag})),g(v.ModalHeader,{separator:!1},void 0,g(y.default,{id:this.headerID,tag:y.default.Tags.H2,size:y.default.Sizes.SIZE_20},void 0,e))},a.getReportData=function(){var e=this.props,t=e.guild,n=e.channel,r=e.message,a=e.user,o=this.state.selectedReason,i={};return null!=r?(i.channel_id=r.getChannelId(),i.message_id=r.id):null!=a?i.user_id=a.id:null!=t&&(i.guild_id=t.id),null==i.guild_id&&null!=n&&(i.guild_id=n.getGuildId()),null!=o&&(i.reason=o),i},a.renderReasons=function(){var e=this.state,t=e.loading,n=e.reasons,r=e.selectedReason;if(t)return g(f.default,{style:{height:100}});var a=n.map((function(e){var t=e.reason;return{name:e.label,desc:e.description,value:t}}));return g(d.default,{value:r,onChange:this.handleReasonChange,options:a})},a.renderFooter=function(){var e=this,t=this.state,n=t.loading,r=t.selectedReason,a=t.submitting,o=n||a||null==r;return g(v.ModalFooter,{},void 0,g(s.default,{type:"submit",disabled:o,submitting:a},void 0,_.default.Messages.REPORT),g(s.default,{look:s.default.Looks.LINK,color:s.default.Colors.PRIMARY,onClick:function(){return e.close()}},void 0,_.default.Messages.CANCEL))},a.render=function(){var e=this.props.transitionState;return g(v.ModalRoot,{"aria-labelledby":this.headerID,transitionState:e},void 0,g("form",{onSubmit:this.handleReport},void 0,this.renderHeader(),g(v.ModalContent,{},void 0,g(c.default,{title:_.default.Messages.FORM_LABEL_REPORT_REASON},void 0,this.renderReasons()),g(p.default,{type:p.default.Types.DESCRIPTION},void 0,_.default.Messages.FORM_REPORT_HELP_TEXT.format({guidelinesURL:m.MarketingURLs.GUIDELINES}))),this.renderFooter()))},r}(a.Component);O.displayName="Report";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(2)),a=i(n(13)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={dismissForApplicationId:function(e){r.default.dispatch({type:o.ActionTypes.ACTIVITY_INVITE_EDUCATION_DISMISS,key:e,value:!0}),a.default.track(o.AnalyticEvents.CLOSE_TUTORIAL,{tutorial:"activity-invite-nux-inline",application_id:e,acknowledged:!0})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=n(3),l=n(10076),u=n(8277),s=n(10077),d=v(n(12)),f=n(8342),c=v(n(6)),p=v(n(7816));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(){var e,t=(0,i.useStateFromStores)([d.default],(function(){return d.default.getNullableCurrentUser()})),n=(0,l.useApplicationCommandCalloutExperiment)((0,f.isEligibleForCallout)(t))[0],r=n.shouldShowMessageEducation,v=n.shouldShowInfoIcon,y=(0,s.useShouldShowHotspot)(u.HotspotLocations.APPLICATION_COMMAND_TOOLTIP),_=a.useState(!1),h=_[0],E=_[1];a.useEffect((function(){var e=setTimeout((function(){E(!0)}),100);return function(){return clearTimeout(e)}}),[]);return r&&y?m("div",{className:(0,o.default)(p.default.applicationCommandEducation,(e={},e[p.default.applicationCommandEducationFadeIn]=h,e))},void 0,m("div",{className:v?p.default.applicationCommandEducationInfo:p.default.applicationCommandEducationArrow}),m("div",{className:(0,o.default)(p.default.applicationCommandEducationPrompt)},void 0,c.default.Messages.APPLICATION_COMMAND_EDUCATION.format({dismissOnClick:function(){(0,u.hideHotspot)(u.HotspotLocations.APPLICATION_COMMAND_TOOLTIP)}}))):null};_.displayName="ApplicationCommandEducation";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.useApplicationCommandCalloutExperiment=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-05_application_command_callout",label:"Application Command Callout experiment",defaultConfig:{shouldShowTooltip:!1,shouldShowMessageEducation:!1,shouldShowInfoIcon:!1},treatments:[{id:1,label:"Show Tooltip",config:{shouldShowTooltip:!0,shouldShowMessageEducation:!1,shouldShowInfoIcon:!1}},{id:2,label:"Show Message Education",config:{shouldShowTooltip:!1,shouldShowMessageEducation:!0,shouldShowInfoIcon:!1}},{id:3,label:"Show Message Education Info Icon",config:{shouldShowTooltip:!1,shouldShowMessageEducation:!0,shouldShowInfoIcon:!0}}]});t.useApplicationCommandCalloutExperiment=function(e){return e&&r.trackExposure({}),r.useExperiment({},{disable:!e})};var a=r;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useShouldShowHotspot=function(e){return(0,r.useStateFromStores)([a.default,o.default,i.default],(function(){return!a.default.hasLayers()&&null==o.default.getModal()&&i.default.hasHotspot(e)}))};var r=n(3),a=l(n(694)),o=l(n(690)),i=l(n(702));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r.prototype.shouldShowEducation=function(e){return!0!==this.get(e)},r}(r.default.CachedStore))(a.default,"ActivityInviteEducationExperimentStore",o.ActionTypes.ACTIVITY_INVITE_EDUCATION_DISMISS,{});t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:f,fill:d,fillRule:"nonzero",d:"M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})))}d.displayName="Timer"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(9)),i=n(3),l=T(n(8589)),u=T(n(399)),s=n(1209),d=T(n(40)),f=T(n(479)),c=T(n(29)),p=T(n(278)),v=T(n(1256)),y=T(n(9042)),m=n(121),_=n(8289),h=T(n(10081)),E=T(n(9043)),g=T(n(8735)),S=n(1),O=T(n(6)),I=T(n(7820));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=a.memo((function(e){var t=e.className,n=e.channel,r=e.draftType,T=a.useRef(null),C=(0,i.useStateFromStores)([f.default],(function(){return f.default.getActivities()})),N=n.isPrivate(),A=(0,i.useStateFromStores)([d.default],(function(){return N||d.default.can(S.Permissions.ATTACH_FILES,n)}));a.useEffect((function(){var e=function(){var e;return null===(e=T.current)||void 0===e?void 0:e.activateUploadDialogue()};return m.ComponentDispatch.subscribe(S.ComponentActions.UPLOAD_FILE,e),function(){m.ComponentDispatch.unsubscribe(S.ComponentActions.UPLOAD_FILE,e)}}));var P=(0,s.useCanStartPublicThread)(n),R=(0,s.useCanStartPrivateThread)(n),L=P||R,D=(0,E.default)(A,L,n,C);if(0===D.length)return null;var w=C.some((function(e){return(0,u.default)(e,S.ActivityFlags.SYNC)})),j=C.some((function(e){return(0,u.default)(e,S.ActivityFlags.JOIN)&&!(0,u.default)(e,S.ActivityFlags.EMBEDDED)}))||w?M(y.default,{className:I.default.attachButtonIcon,foreground:I.default.attachButtonPlay,background:I.default.attachButtonPlus,width:24,height:24}):M(v.default,{className:I.default.attachButtonIcon,foreground:I.default.attachButtonPlus,width:24,height:24}),k=M(p.default,{renderPopout:function(e){var t=e.closePopout,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["closePopout"]);return a.createElement(h.default,b({},r,{onClose:t,options:D,channel:n,onFileUpload:function(){var e;return null===(e=T.current)||void 0===e?void 0:e.activateUploadDialogue()}}))},position:p.default.Positions.TOP,align:p.default.Align.LEFT,animation:p.default.Animation.NONE},void 0,(function(e){return a.createElement(c.default,b({look:c.default.Looks.BLANK,size:c.default.Sizes.NONE,className:(0,o.default)(I.default.attachButton,t),innerClassName:I.default.attachButtonInner,"aria-label":O.default.Messages.CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:A?function(){var e;return null===(e=T.current)||void 0===e?void 0:e.activateUploadDialogue()}:void 0,role:"menubutton"},e),j)}));return a.createElement(a.Fragment,null,M("div",{className:I.default.uploadInput},void 0,a.createElement(l.default,{ref:T,onChange:function(e){var t,a;t=e.currentTarget.files,(0,g.default)(t,n,r,!1,!0,a),e.currentTarget.value=""},multiple:n.rateLimitPerUser<=0,tabIndex:-1,maxSize:(0,_.maxFileSize)(n.getGuildId())})),M("div",{className:I.default.attachWrapper},void 0,k))}));t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=_(n(0)),o=y(n(10082)),i=_(n(8253)),l=y(n(8265)),u=y(n(1256)),s=n(41),d=y(n(13)),f=n(9043),c=n(1),p=y(n(6)),v=y(n(7819));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}function g(e,t,n){(0,s.openModal)((function(r){return a.createElement(o.default,E({},r,{activity:e,channel:t,activityActionType:n}))}))}function S(e){var t=e.channel,n=e.options,r=e.onFileUpload,o=e.onClose,s=e.onSelect;function y(){l.default.openThreadSidebarForCreating(t,void 0,"Plus Button")}return a.useEffect((function(){d.default.track(c.AnalyticEvents.OPEN_POPOUT,{type:"Send Attachment"})}),[]),h(i.default,{onSelect:s,navId:"channel-attach",onClose:o,"aria-label":p.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,className:v.default.menu},void 0,n.map((function(e){var n=h("div",{className:v.default.optionLabel},void 0,h(e.icon,{className:v.default.optionIcon}),h("div",{className:v.default.optionName},void 0,e.display));switch(e.type){case f.AttachmentTypes.UPLOAD_A_FILE:return h(i.MenuItem,{id:"upload-file",label:n,subtext:h("span",{className:v.default.tipSubtext},void 0,p.default.Messages.UPLOAD_FILE_SUBTEXT.format({icon:function(e,t){return h(u.default,{className:v.default.tipIcon},t)}})),action:r},"upload-file");case f.AttachmentTypes.INVITE_TO_PLAY_GAME:return h(i.MenuItem,{id:"play",label:n,action:function(){return n=e.activity,d.default.track(c.AnalyticEvents.OPEN_MODAL,{type:"Send Join Invite",application_id:n.application_id,location:c.AnalyticsSections.CHANNEL_TEXT_AREA}),void g(n,t,c.ActivityActionTypes.JOIN);var n}},"play");case f.AttachmentTypes.INVITE_TO_LISTEN:return h(i.MenuItem,{id:"listen",label:n,action:function(){return n=e.activity,d.default.track(c.AnalyticEvents.OPEN_MODAL,{type:"Send Listen Invite",location:c.AnalyticsSections.CHANNEL_TEXT_AREA}),void g(n,t,c.ActivityActionTypes.LISTEN);var n}},"listen");case f.AttachmentTypes.INVITE_TO_WATCH:return h(i.MenuItem,{id:"watch",label:n,action:function(){return n=e.activity,d.default.track(c.AnalyticEvents.OPEN_MODAL,{type:"Send Watch Invite",location:c.AnalyticsSections.CHANNEL_TEXT_AREA}),void g(n,t,c.ActivityActionTypes.WATCH);var n}},"watch");case f.AttachmentTypes.CREATE_THREAD:return h(i.MenuItem,{id:"THREAD",label:n,action:y},"THREAD");default:return null}})))}S.displayName="ChannelAttachMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(8325)),i=b(n(3)),l=b(n(478)),u=b(n(390)),s=b(n(8309)),d=b(n(8905)),f=b(n(106)),c=b(n(8391)),p=b(n(1216)),v=n(1264),y=b(n(71)),m=b(n(1238)),_=b(n(1242)),h=b(n(29)),E=b(n(149)),g=n(35),S=b(n(47)),O=n(8381),I=n(1),T=b(n(6)),C=b(n(7818));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P="popout-channel-text-area-shouting",R=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).channelTextAreaRef=a.createRef(),t.state={textValue:"",richValue:o.default.deserialize(""),textFocused:!0},t.trackInvite=function(e){if(null!=e&&e.ok){var n=t.props,r=n.activity,a=n.channel,o="";switch(n.activityActionType){case I.ActivityActionTypes.JOIN:o="Invite to Join";break;case I.ActivityActionTypes.LISTEN:o="Invite to Listen";break;case I.ActivityActionTypes.WATCH:o="Invite to Watch"}return f.default.trackWithMetadata(I.AnalyticEvents.INVITE_SENT,{location:"Channel Text Area - "+o,invite_type:r.type===I.ActivityTypes.LISTENING?I.InviteTypes.SPOTIFY:I.InviteTypes.APPLICATION,application_id:r.application_id,guild_id:a.getGuildId(),channel_id:a.id,message_id:null!=e?e.body.id:null}),Promise.resolve()}},t.handleTextChange=function(e,n,r){t.setState({textValue:n,richValue:r})},t.handleShare=function(){var e=t.props,n=e.channel,r=e.activity,a=e.activityActionType,o=e.cooldown,i=e.onClose,l=t.state.textValue;if(o>0)return Promise.resolve({shouldClear:!1,shouldRefocus:!0});var d=p.default.parse(n,l),f={activity:r,type:a};return m.default.isOpen(P)?(s.default.close(P),u.default.sendMessage(n.id,d,!0,{activityAction:f}).then((function(e){return t.trackInvite(e)})),i(),Promise.resolve({shouldClear:!0,shouldRefocus:!0})):(0,O.applyChatRestrictions)({target:t.channelTextAreaRef.current,type:I.TextareaTypes.FORM,content:l,channel:n}).then((function(e){return e.valid?(u.default.sendMessage(n.id,d,!0,{activityAction:f}).then((function(e){return t.trackInvite(e)})),i(),{shouldClear:!1,shouldRefocus:!1}):{shouldClear:!1,shouldRefocus:!1}}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var i=r.prototype;return i.componentDidMount=function(){this.fetchApplication()},i.componentDidUpdate=function(e){this.props.activity.application_id!==e.activity.application_id&&this.fetchApplication()},i.fetchApplication=function(){var e=this.props,t=e.activity,n=e.application;null!=t.application_id&&null==n&&l.default.fetchApplication(t.application_id)},i.renderTitle=function(){switch(this.props.activity.type){case I.ActivityTypes.LISTENING:return T.default.Messages.INVITE_EMBED_LISTENING_INVITE;case I.ActivityTypes.PLAYING:case I.ActivityTypes.STREAMING:default:return T.default.Messages.INVITE_EMBED_GAME_INVITE}},i.render=function(){var e=this,t=this.state,n=t.textValue,r=t.richValue,o=t.textFocused,i=this.props,l=i.activity,u=i.channel,s=i.activityActionType,f=i.cooldown,p=i.application,v=i.transitionState,y=i.onClose,m=f>0,_=m?T.default.Messages.CHANNEL_SLOWMODE_COOLDOWN.format({seconds:Math.round((f+1e3)/1e3)}):null;return N(g.ModalRoot,{size:g.ModalSize.SMALL,transitionState:v,"aria-label":this.renderTitle()},void 0,N(g.ModalHeader,{separator:!1},void 0,N(S.default,{tag:S.default.Tags.H2,size:S.default.Sizes.SIZE_20},void 0,this.renderTitle())),N(g.ModalContent,{},void 0,N("div",{className:C.default.subHeader},void 0,T.default.Messages.MESSAGE_PREVIEW),N(d.default,{activityActionType:s,activity:l,className:C.default.preview,application:p,partyId:null!=l.party?l.party.id:null,isPreview:!0}),N("div",{className:C.default.subHeader},void 0,T.default.Messages.ADD_A_COMMENT_OPTIONAL),a.createElement(c.default,{className:C.default.textArea,textValue:n,richValue:r,focused:o,channel:u,onChange:this.handleTextChange,onSubmit:this.handleShare,type:I.TextareaTypes.FORM,ref:this.channelTextAreaRef})),N(g.ModalFooter,{},void 0,N(E.default,{text:_},void 0,(function(t){return a.createElement("div",t,N(h.default,{disabled:m,onClick:e.handleShare},void 0,T.default.Messages.INVITE_EMBED_SEND_INVITE))})),N(h.default,{look:h.default.Looks.LINK,onClick:y},void 0,T.default.Messages.CANCEL)))},r}(a.PureComponent);R.displayName="ActivityInvite";var L=i.default.connectStores([_.default,y.default],(function(e){var t=e.channel,n=e.activity;return{cooldown:_.default.getSlowmodeCooldownGuess(t.id),application:null!=n.application_id?y.default.getGame(n.application_id):v.SpotifyApplication}}))(R);t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M9 16h6v-6h4l-7-7-7 7h4v6zm-4 2h14v2H5v-2z"}))}d.displayName="Upload"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=P(n(9)),i=n(680),l=n(3),u=P(n(105)),s=n(1246),d=P(n(712)),f=P(n(8333)),c=P(n(1219)),p=P(n(201)),v=P(n(40)),y=P(n(200)),m=P(n(10085)),_=P(n(39)),h=n(8467),E=P(n(10086)),g=n(8349),S=P(n(10088)),O=n(9045),I=P(n(9220)),T=P(n(10090)),C=P(n(10091)),b=P(n(10122)),M=n(1),N=P(n(6)),A=P(n(7838));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n(8709);function j(e){var t,n,r,f,c,p=e.className,y=e.messageGroupSpacing,m=e.scrollerClassName,_=e.channel,h=e.messages,S=e.unreadCount,I=e.showNewMessagesBar,P=e.messageDisplayCompact,R=e.channelStream,j=e.uploads,k=e.hasUnreads,U=e.editingMessageId,G=e.fontSize,F=e.keyboardModeEnabled,B=a.useMemo((function(){return P?(0,O.generateMessageSpecs)(!0,30,4,8,G,y):(0,O.generateMessageSpecs)(!1,26,4,8,G,y)}),[P,G,y]),H=(0,C.default)({messages:h,channel:_,compact:P,hasUnreads:k,focusId:U,placeholderHeight:B.totalHeight}),x=(0,T.default)({scrollerRef:H.ref,isEditing:null!=U,keyboardModeEnabled:F,hasMoreAfter:h.hasMoreAfter}),V=function(e){return(0,l.useStateFromStores)([d.default],(function(){return v.default.can(M.Permissions.READ_MESSAGE_HISTORY,e)?null:d.default.getViewingRolesTimestamp(e.getGuildId())}))}(_),W=(0,b.default)({channel:_,messages:h,unreadCount:S,showNewMessagesBar:I,messageDisplayCompact:P,channelStream:R,uploads:j,loadMore:H.loadMore,scrollManager:H,specs:B,viewingRolesMessageHistoryHackTimestamp:V}),Y=W.channelStreamMarkup,z=W.newMessagesBar,K=W.jumpToPresentBar;n=H.ref,r=a.useCallback((function(){var e;return null===(e=n.current)||void 0===e?void 0:e.scrollToBottom()}),[n]),f=a.useCallback((function(){var e;return null===(e=n.current)||void 0===e?void 0:e.scrollPageUp({animate:!u.default.useReducedMotion})}),[n]),c=a.useCallback((function(){var e;return null===(e=n.current)||void 0===e?void 0:e.scrollPageDown({animate:!u.default.useReducedMotion})}),[n]),(0,g.useComponentAction)({event:M.ComponentActions.SCROLLTO_PRESENT,handler:r}),(0,g.useComponentAction)({event:M.ComponentActions.SCROLL_PAGE_UP,handler:f}),(0,g.useComponentAction)({event:M.ComponentActions.SCROLL_PAGE_DOWN,handler:c});var $=(0,s.useFocusJumpSection)(),Z=(0,i.getContainerPropsFromNavigator)(x),q=Z.ref,X=w(Z,["ref"]),J=a.useCallback((function(e){var t;H.ref.current=e,q.current=null!==(t=null==e?void 0:e.getScrollerNode())&&void 0!==t?t:null}),[]);return D(i.ListNavigatorProvider,{navigator:x},void 0,D("div",{className:(0,o.default)(A.default.messagesWrapper,p,"group-spacing-"+y)},void 0,z,a.createElement(E.default,L({ref:J,className:(0,o.default)(m,A.default.scroller),contentClassName:A.default.scrollerContent,onResize:H.handleResize,onScroll:H.handleScroll,onMouseDown:H.handleMouseDown,onMouseUp:H.handleMouseUp},$,{tabIndex:-1}),a.createElement("div",L({className:A.default.scrollerInner,"aria-label":N.default.Messages.CHANNEL_MESSAGES_A11Y_LABEL.format({channelName:_.name})},X,{role:"log","aria-describedby":F?"messagesNavigationDescription":void 0,"aria-live":"off"}),D("span",{className:A.default.navigationDescription,id:"messagesNavigationDescription","aria-hidden":!0},void 0,N.default.Messages.CHANNEL_MESSAGES_A11Y_DESCRIPTION),Y,D("div",{className:(0,o.default)((t={},t[A.default.scrollerSpacer]=!0,t[A.default.empty]=0===h.length&&!h.loadingMore,t))}))),K))}j.displayName="Messages";var k=a.memo(j,(function(e,t){return null!=e.isHidden&&null!=t.isHidden&&e.isHidden&&t.isHidden}));var U=a.memo((function(e){var t=e.channel,n=e.forceCompact,r=void 0!==n&&n,o=w(e,["channel","forceCompact"]),i=function(e){var t=e.getGuildId(),n=(0,l.useStateFromStores)([c.default],(function(){return null==t||c.default.canChatInGuild(t)}),[t]),r=(0,l.useStateFromStoresObject)([v.default],(function(){return{canManageMessages:v.default.can(M.Permissions.MANAGE_MESSAGES,e),permissionVersion:null!=t?v.default.getGuildVersion(t):null}}),[e,t]),a=r.canManageMessages;return{canChat:n,permissionVersion:r.permissionVersion,canManageMessages:a}}(t),s=i.canManageMessages,d=i.permissionVersion,E=i.canChat,g=function(){var e=(0,l.useStateFromStoresObject)([_.default],(function(){return{messageDisplayCompact:_.default.messageDisplayCompact,renderSpoilers:_.default.renderSpoilers}})),t=e.messageDisplayCompact,n=e.renderSpoilers,r=(0,l.useStateFromStoresObject)([u.default],(function(){return{messageGroupSpacing:u.default.messageGroupSpacing,fontSize:u.default.fontSize,keyboardModeEnabled:u.default.keyboardModeEnabled}}));return{messageGroupSpacing:r.messageGroupSpacing,messageDisplayCompact:t,renderSpoilers:n,fontSize:r.fontSize,keyboardModeEnabled:r.keyboardModeEnabled}}(),O=g.messageGroupSpacing,T=g.fontSize,C=g.messageDisplayCompact,b=g.renderSpoilers,N=g.keyboardModeEnabled,A=function(e){var t=(0,l.useStateFromStores)([p.default],(function(){return p.default.getMessages(e.id)}),[e.id]),n=(0,l.useStateFromStores)([y.default],(function(){return y.default.getOldestUnreadMessageId(e.id)||null}),[e]),r=a.useMemo((function(){return(0,S.default)({messages:t,oldestUnreadMessageId:n})}),[t,e,n]),o=(0,l.useStateFromStores)([f.default],(function(){var t;return null===(t=f.default.getEditingMessage(e.id))||void 0===t?void 0:t.id}));return{messages:t,channelStream:r,oldestUnreadMessageId:n,editingMessageId:o}}(t),P=A.messages,R=A.channelStream,j=A.oldestUnreadMessageId,U=A.editingMessageId;return D(h.SpoilerDisplayContext.Provider,{value:(0,I.default)(b,s)},void 0,a.createElement(k,L({},o,{messageGroupSpacing:O,showNewMessagesBar:!0,channel:t,messageDisplayCompact:r||C,messages:P,channelStream:R,permissionVersion:d,uploads:(0,l.useStateFromStores)([m.default],(function(){return m.default.getFiles(t.id)}),[t]),unreadCount:(0,l.useStateFromStores)([y.default],(function(){return y.default.getUnreadCount(t.id)}),[t]),hasUnreads:null!=j,canChat:E,editingMessageId:U,fontSize:T,keyboardModeEnabled:N})))}));t.default=U},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(201));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s=Object.freeze([]),d={},f={},c={},p={};function v(e,t){var n=d[e];return null!=n&&(d[e]=n.filter((function(e){return e.id!==t})),delete f[t],delete c[t],n.length!==d[e].length)}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(o.default)},a.getFiles=function(e){return d[e]||s},a.getMessageForFile=function(e){return c[e]},a.getUrisForMessageId=function(e){return p[e]},r}(r.default.Store))(a.default,{UPLOAD_START:function(e){var t=e.channelId,n=e.file,r=e.uploader,a=e.message,o=d[t]||s;f[n.id]=r,d[t]=[].concat(o,[n]),c[n.id]=a;var i=n.uris;null!=i&&(p[a.id]=u({},n,{uris:i}))},UPLOAD_PROGRESS:function(e){var t=e.channelId,n=e.file,r=d[t];if(null==r)return!1;d[t]=r.map((function(e){return e.id===n.id?u({},e,{},n):e}));var a=c[n.id];null!=a&&p[a.id]&&(p[a.id]=u({},p[a.id],{},n))},UPLOAD_COMPLETE:function(e){return v(e.channelId,e.file.id)},UPLOAD_FAIL:function(e){return v(e.channelId,e.file.id)},UPLOAD_CANCEL_REQUEST:function(t){var n=t.file,r=f[n.id];if(null==r)return!1;e((function(){return r.cancel()}))},UPLOAD_RESTORE_FAILED_UPLOAD:function(e){var t=e.file,n=e.messageId;p[n]=t}});t.default=y}).call(this,n(68).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ManagedReactiveScrollerRef",{enumerable:!0,get:function(){return o.ManagedReactiveScrollerRef}}),Object.defineProperty(t,"ManagedReactiveScrollerProps",{enumerable:!0,get:function(){return o.ManagedReactiveScrollerProps}}),Object.defineProperty(t,"ScrollerState",{enumerable:!0,get:function(){return o.ScrollerState}}),Object.defineProperty(t,"ScrollEvent",{enumerable:!0,get:function(){return o.ScrollEvent}}),t.default=t.PinToBottomScrollerAuto=void 0;var r=n(741),a=u(n(9)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10087)),i=u(n(381));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var s=(0,o.default)((0,a.default)(i.default.auto,i.default.disableScrollAnchor),ResizeObserver||r.ResizeObserver);t.PinToBottomScrollerAuto=s;var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,l.getScrollbarSpecs)(e),r=new Map,s=new t((function(e){e.forEach((function(e){var t,n=e.target;null===(t=r.get(n))||void 0===t||t(e)}))}));return a.forwardRef((function(t,d){var p,v=t.children,y=t.className,m=t.onResize,_=t.contentClassName,h=t.onScroll,E=t.dir,g=void 0===E?"ltr":E,S=t.paddingFix,O=void 0===S||S,I=t.style,T=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["children","className","onResize","contentClassName","onScroll","dir","paddingFix","style"]),C=a.useRef(null),b=a.useRef(null),M=a.useState(!1),N=M[0],A=M[1],P=(0,l.useUncachedScrollerState)(),R=P.scrollerRef,L=P.getScrollerState,D=(0,l.useScrollSpring)(R);a.useImperativeHandle(d,(function(){return c({getScrollerNode:function(){return R.current},isScrolling:function(){return null!=C.current},getScrollerState:L},(0,l.getAnimatedScrollHelpers)(R,L,D))}),[R,L,D]);var w=a.useCallback((function(e){null==C.current?A(!0):clearTimeout(C.current),C.current=setTimeout((function(){C.current=null,A(!1)}),200),null!=h&&h(e)}),[h]);return(0,l.usePaddingFixes)({paddingFix:O,dir:g,className:y,scrollerRef:R,specs:n}),(0,l.useResizeObserverSubscription)({ref:R,key:"container",onUpdate:m,resizeObserver:s,listenerMap:r}),(0,l.useResizeObserverSubscription)({ref:b,key:"content",onUpdate:m,resizeObserver:s,listenerMap:r}),a.createElement("div",c({ref:R,className:(0,o.default)(y,(p={},p[e]=!0,p[u.default.scrolling]=N,p)),style:(0,l.getMergedOrientationStyles)(I),dir:g,onScroll:w},T),a.useMemo((function(){return f(i.FocusRingScope,{containerRef:b},void 0,a.createElement("div",{ref:b,className:(0,o.default)(_,u.default.content)},v))}),[v,_]))}))},Object.defineProperty(t,"ScrollerState",{enumerable:!0,get:function(){return l.ScrollerState}}),Object.defineProperty(t,"ScrollEvent",{enumerable:!0,get:function(){return l.ScrollEvent}});var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=n(88),l=n(414),u=s(n(381));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r=e.messages,u=e.oldestUnreadMessageId,s=[],d=null!=u?o.default.extractTimestamp(u):null;return r.forEach((function(e){var f=(0,a.dateFormat)(e.timestamp,"LL");f!==t&&(null!=t&&s.push({type:l.ChannelStreamTypes.DIVIDER,content:f,contentKey:f}),t=f);var c,p=s[s.length-1];e.blocked&&(null==p||p.type!==l.ChannelStreamTypes.MESSAGE_GROUP_BLOCKED?(c={type:l.ChannelStreamTypes.MESSAGE_GROUP_BLOCKED,content:[],key:e.id},s.push(c)):p=(c=p).content[c.content.length-1]),u===e.id&&null!=d?null!=p&&p.type===l.ChannelStreamTypes.DIVIDER?(p.unreadId=e.id,d=null):e.blocked&&c?(c.content.push({type:l.ChannelStreamTypes.DIVIDER,unreadId:e.id}),c.hasUnread=!0,d=null):(s.push({type:l.ChannelStreamTypes.DIVIDER,unreadId:e.id}),d=null):null!=d&&o.default.extractTimestamp(e.id)>d&&(s.push({type:l.ChannelStreamTypes.DIVIDER,unreadId:e.id}),d=null),(0,i.isNewGroupItem)(p,e)&&(n=e.id);var v={type:e.type===l.MessageTypes.THREAD_STARTER_MESSAGE?l.ChannelStreamTypes.THREAD_STARTER_MESSAGE:l.ChannelStreamTypes.MESSAGE,content:e,groupId:n},y=r.jumpSequenceId,m=r.jumpFlash,_=r.jumpTargetId;m&&e.id===_&&null!=y&&(v.flashKey=y),r.jumpTargetId===e.id&&(v.jumpTarget=!0),e.blocked&&c?(c.content.push(v),v.jumpTarget&&(c.hasJumpTarget=!0)):s.push(v)})),s};var r,a=n(1161),o=(r=n(97))&&r.__esModule?r:{default:r},i=n(8667),l=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.messages,n=e.groupSpacing,r=void 0===n?0:n,o=e.compact,l=void 0!==o&&o,u=e.attachmentSpecs,s=null!=u?i.default.random(0,t-1):-1,d=i.default.random(80,120),p=i.default.random(.1,.2);return a.createElement(a.Fragment,null,new Array(t).fill(null).map((function(e,t){return f(m,{compact:l,usernameWidth:d,usernameOpacity:p,groupStart:0===t,attachmentSpecs:t===s?u:void 0,style:0===t?{marginTop:c(r)}:void 0},t)})))},t.HEIGHT_ATTACHMEMT_PADDING=t.HEIGHT_COMPACT_MESSAGE=t.HEIGHT_COMPACT_MESSAGE_START=t.HEIGHT_COZY_MESSAGE=t.HEIGHT_COZY_MESSAGE_START=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(8)),l=u(n(7821));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){return e/16+"rem"}function p(){return f("div",{className:l.default.avatar,style:{opacity:.08}})}function v(e){var t,n=e.width,r=e.opacity,a=e.className;return f("div",{className:(0,o.default)(a,(t={},t[l.default.blob]=!0,t)),style:{width:c(n),opacity:null!=r?r:i.default.random(.02,.08)}})}p.displayName="Avatar",v.displayName="ContentBlob";var y=f(p,{});function m(e){var t,n,r=e.groupStart,u=void 0!==r&&r,s=e.compact,c=void 0!==s&&s,p=e.attachmentSpecs,m=e.usernameWidth,_=e.usernameOpacity,h=e.className,E=e.style,g=c?50:i.default.random(40,50);if(!c&&u)n=a.createElement(a.Fragment,null,y,f("h2",{className:l.default.header},void 0,f(v,{width:m,opacity:_,className:l.default.username})));else if(c){var S;n=a.createElement(a.Fragment,null,c&&f(v,{width:g,className:(0,o.default)((S={},S[l.default.compactTimestamp]=!0,S[l.default.hidden]=!u,S))}),f("h2",{className:l.default.header},void 0,f(v,{width:m,opacity:_})))}return f("div",{"aria-hidden":!0,className:(0,o.default)(h,(t={},t[l.default.wrapper]=!0,t[l.default.compact]=c,t[l.default.cozy]=!c,t)),style:E},void 0,f("div",{className:l.default.contents},void 0,n,f("div",{className:l.default.content},void 0,new Array(i.default.random(3,8)).fill(null).map((function(){return i.default.random(30,80)})).map((function(e,t){return f(v,{width:e,opacity:.06},t)})))),null!=p&&f("div",{className:l.default.attachmentContainer},void 0,f("div",{className:l.default.attachment,style:d({opacity:.03},p)})))}m.displayName="MessagePlaceholder";t.HEIGHT_COZY_MESSAGE_START=44;t.HEIGHT_COZY_MESSAGE=22;t.HEIGHT_COMPACT_MESSAGE_START=26;t.HEIGHT_COMPACT_MESSAGE=26;t.HEIGHT_ATTACHMEMT_PADDING=6},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.scrollerRef,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["scrollerRef"]),s=r.useCallback((function(){var e=t.current;return null==e?Promise.resolve():new Promise((function(t){e.scrollToBottom({callback:function(){return requestAnimationFrame(t)}})}))}),[]),d=r.useCallback((function(){var e=t.current;return null==e?Promise.resolve():new Promise((function(t){e.scrollToTop({callback:function(){return requestAnimationFrame(t)}})}))}),[]),f=r.useCallback((function(e){var r;if(n.keyboardModeEnabled){var a=document.querySelector(e);null!=a&&(null===(r=t.current)||void 0===r||r.scrollIntoViewNode({node:a,padding:4*i.MESSAGE_PADDING,callback:function(){return null==a?void 0:a.focus()}}))}}),[n.keyboardModeEnabled]),c=r.useCallback((function(){n.hasMoreAfter||o.ComponentDispatch.dispatch(u.ComponentActions.TEXTAREA_FOCUS)}),[n.hasMoreAfter]),p=(0,a.default)({id:l.MESSAGE_ID_PREFIX,preserveFocusPosition:!1,setFocus:f,isEnabled:n.keyboardModeEnabled&&!n.isEditing,scrollToStart:d,scrollToEnd:s,onNavigateNextAtEnd:c});return r.useLayoutEffect((function(){var e=function(e){var t=e.atEnd;void 0!==t&&t?p.focusLastVisibleItem():p.focusFirstVisibleItem()};return o.ComponentDispatch.subscribe(u.ComponentActions.FOCUS_MESSAGES,e),function(){o.ComponentDispatch.unsubscribe(u.ComponentActions.FOCUS_MESSAGES,e)}}),[p]),p},Object.defineProperty(t,"ListNavigator",{enumerable:!0,get:function(){return a.ListNavigator}});var r=d(n(0)),a=d(n(680)),o=n(121),i=n(1254),l=n(8541),u=n(1);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logMessageChanges=function(e,t){0},t.default=function(e){var t=e.messages,n=e.channel,a=e.compact,o=e.hasUnreads,i=e.focusId,l=e.placeholderHeight,u=r.useState((function(){return new S({messages:t,channel:n,compact:a,hasUnreads:o,focusId:i,placeholderHeight:l})}))[0];return u.getSnapshotBeforeUpdate(i),r.useLayoutEffect((function(){return u.mergePropsAndUpdate({messages:t,channel:n,compact:a,hasUnreads:o,focusId:i,placeholderHeight:l})})),r.useEffect((function(){return function(){return u.cleanup()}}),[u]),u},t.MessagesScrollManager=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=m(n(8)),o=m(n(1226)),i=m(n(390)),l=n(8321),u=m(n(105)),s=n(42),d=m(n(715)),f=m(n(97)),c=n(1254),p=n(8707),v=m(n(10121)),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e){if(null==e.jumpTargetId||!e.ready)return null;var t=e.jumpTargetId,n=e.jumpTargetOffset;if(e.has(t)||!e.hasMoreBefore&&t===e.channelId){if(0===n)return t;var r=e.getByIndex(e.indexOf(t)+n);return(null==r?void 0:r.id)||t}var a=[t].concat(e.map((function(e){return e.id}))).sort(f.default.compare),o=a.indexOf(t),i=a[o+(Math.abs(n)>0?n:1)]||a[o-1];return null!=i?i:null}var g={scrollTop:0,scrollHeight:0,offsetHeight:0},S=function(){function e(e){var t=this;this.ref=r.createRef(),this.automaticAnchor=null,this.messageFetchAnchor=null,this.focusAnchor=null,this.jumping=!1,this.attemptedFetch=!1,this.dragging=!1,this.prevScrollTop=null,this.anchorTimeout=null,this.initialScrollTop=null,this.acking=!1,this.scrollCounter=0,this.offsetHeightCache=0,this.scrollHeightCache=0,this.scrollTopCache=-1,this.handleScroll=function(e){var n;if(t.isInitialized()){var r=t.getScrollerState();if(r.offsetHeight!==t.offsetHeightCache||r.scrollHeight!==t.scrollHeightCache)t.scrollCounter=0,clearTimeout(t.anchorTimeout),t.isPinned()||(null==t.automaticAnchor?t.automaticAnchor=t.findAnchor():t.updateAutomaticAnchor(r.scrollTop,!0)),clearTimeout(t.anchorTimeout),t.fixScrollPosition(r.offsetHeight,r.scrollHeight),t.scrollTopCache=r.scrollTop;else{if(null!=e&&e.target!==(null===(n=t.ref.current)||void 0===n?void 0:n.getScrollerNode()))return;t.scrollTopCache!==r.scrollTop&&(t.pinned=t.isScrolledToBottom(r),t.scrollCounter=Math.min(t.scrollCounter+1,5),t.pinned?t.cleanAutomaticAnchor():t.automaticAnchor?t.updateAutomaticAnchor(r.scrollTop,!0):t.automaticAnchor=t.findAnchor(),t.scrollTopCache=r.scrollTop,clearTimeout(t.anchorTimeout),t.anchorTimeout=setTimeout((function(){t.scrollCounter=0,t.anchorTimeout=null,t.prevScrollTop=null;var e=t.getScrollerState(),n=e.scrollHeight,r=e.offsetHeight;t.isHeightChange(r,n)?t.handleScroll():(t.cleanAutomaticAnchor(),t.isPinned()||(t.automaticAnchor=t.findAnchor()))}),35))}if(t.handleFocusAnchorScroll(r.scrollTop,r.offsetHeight),t.updateStoreDimensionsDebounced(),t.isScrollLoadingDisabled())return t.handleScrollSpeed(r);var a=t.isInScrollTriggerLoadingRegion(r);1===a?t.loadMore():2===a?t.loadMore(!0):t.enableAutomaticAck(),t.handleScrollSpeed(r)}},this.handleResize=function(e,n){var r=t.offsetHeightCache,a=t.scrollHeightCache;"container"===n?r=e.contentRect.height:"content"===n&&(a=e.contentRect.height),t.isHeightChange(r,a)&&t.fixScrollPosition(r,a)},this.handleMouseDown=function(e){e.target===e.currentTarget&&(t.dragging=!0)},this.handleMouseUp=function(){t.dragging=!1,t.handleScroll()},this.loadMore=function(e){void 0===e&&(e=!1);var n,r,a=t.props.messages;if(e){var o=a.last();null!=o&&(r=o.id)}else{var l=a.first();null!=l&&(n=l.id)}t.messageFetchAnchor=t.findFetchAnchor(e),t.loading=!0,i.default.fetchMessages({channelId:t.props.channel.id,before:n,after:r,limit:y.MAX_MESSAGES_PER_CHANNEL,truncate:!0})},this.updateStoreDimensionsDebounced=a.default.debounce(this.updateStoreDimensions,200),this.props=e,this.loading=e.messages.loadingMore;var n=d.default.getChannelDimensions(e.channel.id);null!=e.messages.jumpTargetId?this.pinned=!1:(this.initialScrollTop=(null==n?void 0:n.scrollTop)||null,this.pinned=null==n)}var t=e.prototype;return t.isReady=function(){return this.props.messages.ready},t.isLoading=function(){return this.loading||this.props.messages.loadingMore},t.isPinned=function(){return this.pinned},t.isJumping=function(){return this.jumping},t.isDragging=function(){return this.dragging},t.isInitialized=function(){return void 0===this.initialScrollTop},t.isScrollLoadingDisabled=function(){return this.isLoading()||!this.isInitialized()||this.isJumping()||this.isDragging()},t.isActivelyScrolling=function(){return this.scrollCounter>=5},t.isScrolledToBottom=function(e){var t=void 0===e?this.getScrollerState():e;return t.scrollTop>=t.scrollHeight-t.offsetHeight-c.MESSAGE_PADDING&&!this.props.messages.hasMoreAfter},t.mergePropsAndUpdate=function(e){var t=this.props.messages,n=this.props.focusId;this.props=h({},e);var r=this.getScrollerState(),a=r.offsetHeight,o=r.scrollHeight,l=this.isHeightChange(a,o);if(this.offsetHeightCache=a,this.scrollHeightCache=o,this.loading=e.messages.loadingMore,!this.isInitialized()&&!this.isReady())return null==e.messages.jumpTargetId&&this.scrollTo(Number.MAX_SAFE_INTEGER),void(this.isLoading()||e.messages.error||this.attemptedFetch||(this.attemptedFetch=!0,i.default.fetchMessages({channelId:e.channel.id,limit:y.MAX_MESSAGES_PER_CHANNEL,truncate:!0})));if(this.isInitialized()){if(null!=e.messages.jumpTargetId){if(this.isLoading())return;var u=E(e.messages);if(null!=u&&!this.isJumping()&&e.messages.jumpSequenceId!==t.jumpSequenceId){var s,d=t.first();return null!=d&&e.messages.last()!==t.last()&&e.messages.first()!==t.first()&&(s=f.default.extractTimestamp(d.id)),void this.scrollToMessage(u,!0,s)}if(this.isJumping())return void(null!=u?this.scrollToMessage(u,!0):this.jumping=!1)}if(e.messages.jumpedToPresent&&t.jumpSequenceId!==e.messages.jumpSequenceId)return this.jumping=!0,this.scrollTo(0),void this.setScrollToBottom(!0);var v=e.messages.last();if(null==v||v.state!==y.MessageStates.SENDING){var m=this.props.focusId;if(null!=m&&n!==m){var _,g=(0,p.getElementFromMessageId)(m);if(null!=g)return void(null===(_=this.ref.current)||void 0===_||_.scrollIntoViewNode({node:g,padding:c.MESSAGE_PADDING,callback:this.handleScroll}))}l&&this.fixScrollPosition(a,o)}else this.setScrollToBottom()}else this.restoreScroll()},t.getAnchorData=function(e,t,n){var r,a=(0,p.getElementFromMessageId)(e),o=null===(r=this.ref.current)||void 0===r?void 0:r.getScrollerNode();if(!(a instanceof HTMLElement)||null==o)return null;var i=a.offsetHeight,l=(0,v.default)(a,o),u=l-t;return null!=n&&(u=Math.max(-i,Math.min(n,u))),{id:e,offsetFromTop:u,offsetTop:l,offsetHeight:i,clamped:null!=u}},t.cleanAutomaticAnchor=function(){this.automaticAnchor=null},t.findAnchor=function(){for(var e,t=this.props,n=t.messages,r=t.hasUnreads,a=t.channel,o=this.getScrollerState().scrollTop,i=r&&o>=c.NEW_MESSAGE_BAR_BUFFER?c.NEW_MESSAGE_BAR_BUFFER:0,l=null,u=function(e){var t;return-1===e?a.id:null===(t=n._array[e])||void 0===t?void 0:t.id},s=-1;e=u(s);s++){var d=this.getAnchorData(e,o);if(null!=d&&(d.offsetTop>=o+i||s===n.length-1)){l=d;break}}return l},t.findFetchAnchor=function(e){for(var t,n=this.props.messages,r=this.getScrollerState().scrollTop,a=e?-1:1,o=null,i=n._array.length-1,l=e?i:0;t=n._array[l];l+=a){var u=this.getAnchorData(t.id,r);if(null!=u){o=u;break}}return o},t.getAnchorFixData=function(){for(var e=0,t=[this.focusAnchor,this.isLoading()?null:this.messageFetchAnchor,this.automaticAnchor];e<t.length;e++){var n=t[e];if(null!=n){var r=(0,p.getElementFromMessageId)(n.id);if(r instanceof HTMLElement){var a=n===this.messageFetchAnchor?n.offsetHeight-r.offsetHeight:0;return{node:r,fixedScrollTop:r.offsetTop-(n.offsetFromTop+a)}}}}return null},t.fixAnchorScrollPosition=function(){var e=this.getAnchorFixData();if(null!=e){var t,n=e.node,r=e.fixedScrollTop;if(this.focusAnchor)this.isPinned()?this.scrollTo(Number.MAX_SAFE_INTEGER,!1,this.handleScroll):this.mergeTo(r,this.handleScroll),null===(t=this.ref.current)||void 0===t||t.scrollIntoViewNode({node:n,padding:c.MESSAGE_PADDING,callback:this.handleScroll});else this.mergeTo(r,this.handleScroll);this.isActivelyScrolling()?this.automaticAnchor=null:this.automaticAnchor=this.findAnchor(),this.isLoading()||(this.messageFetchAnchor=null)}else this.handleScroll()},t.hasAnchor=function(){return null!=this.focusAnchor||null!=this.messageFetchAnchor||null!=this.automaticAnchor},t.updateFocusAnchor=function(e,t,n){var r=this.focusAnchor=null!=e?this.getAnchorData(e,t):null;null!=r&&(r.offsetFromTop>=n||t>r.offsetTop+r.offsetHeight)&&(this.focusAnchor=null)},t.handleFocusAnchorScroll=function(e,t){var n;this.updateFocusAnchor(null===(n=this.focusAnchor)||void 0===n?void 0:n.id,e,t)},t.updateFetchAnchor=function(e,t,n){var r,a=null===(r=this.ref.current)||void 0===r?void 0:r.getScrollerNode();null!=this.messageFetchAnchor&&null!=a&&(this.messageFetchAnchor=this.getAnchorData(this.messageFetchAnchor.id,e,this.isInPlaceholderRegion({scrollTop:e,offsetHeight:t,scrollHeight:n})>0?t:void 0))},t.updateAutomaticAnchor=function(e,t){var n;void 0===t&&(t=!1);var r=null===(n=this.ref.current)||void 0===n?void 0:n.getScrollerNode();if(null!=this.automaticAnchor&&null!=r){var a=this.getAnchorData(this.automaticAnchor.id,e);t&&null!=a&&null!=this.automaticAnchor&&(a.offsetFromTop=this.automaticAnchor.offsetFromTop),this.automaticAnchor=a}},t.getScrollerState=function(){var e;return(null===(e=this.ref.current)||void 0===e?void 0:e.getScrollerState())||g},t.isHeightChange=function(e,t){return e!==this.offsetHeightCache||t!==this.scrollHeightCache},t.isInPlaceholderRegion=function(e){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,a=this.props,o=a.messages,i=a.placeholderHeight,l=i,u=r-n-i;return o.hasMoreBefore&&t<l&&r>n?1:o.hasMoreAfter&&t>=u?2:0},t.isInScrollTriggerLoadingRegion=function(e){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,a=this.props.messages;return a.hasMoreBefore&&t<=this.getOffsetToTriggerLoading("top",e)&&r>n?1:a.hasMoreAfter&&t>=this.getOffsetToTriggerLoading("bottom",e)?2:0},t.handleScrollSpeed=function(e){if(!this.isJumping()&&!this.isDragging()){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,a=this.prevScrollTop,o=this.props.placeholderHeight;if(this.prevScrollTop=t,null!=a){var i=this.isInPlaceholderRegion(e),l=t-a;0!==i&&(1===i&&t+l<=0?(this.mergeTo(o-n),this.prevScrollTop=o-n):2===i&&t+l>=r-n&&(this.mergeTo(r-o),this.prevScrollTop=r-o))}}},t.enableAutomaticAck=function(){var e=this;this.isInitialized()&&!this.acking&&(this.acking=!0,this.updateStoreDimensions((function(){(0,l.enableAutomaticAck)(e.props.channel.id)})))},t.fixScrollPosition=function(e,t){this.offsetHeightCache=e,this.scrollHeightCache=t,this.fixJumpTarget(),this.isPinned()&&null==this.messageFetchAnchor&&null==this.focusAnchor?this.scrollTo(Number.MAX_SAFE_INTEGER,!1,this.handleScroll):this.fixAnchorScrollPosition()},t.fixJumpTarget=function(){if(this.isJumping()){var e=this.props,t=e.messages,n=e.hasUnreads;if(null!=t.jumpTargetId){var r=E(t);if(null==r)return;var a=(0,p.getElementFromMessageId)(r);a instanceof HTMLElement?this.scrollTo(this.getOffsetOrientationFromNode(a,"middle",n?c.NEW_MESSAGE_BAR_BUFFER:c.MESSAGE_PADDING),!0):this.scrollToNewMessages(!0,"middle")}else this.scrollTo(Number.MAX_SAFE_INTEGER,!0)}},t.scrollToNewMessages=function(e,t,n){var r=this;void 0===e&&(e=!1),void 0===t&&(t="top");var a=document.getElementById(c.NEW_MESSAGE_BAR_ID),o=function(){r.jumping=!1,r.automaticAnchor=r.findAnchor(),null!=n&&n(),r.handleScroll()};this.pinned=!1,this.jumping=e,null!=a?this.scrollTo(this.getOffsetOrientationFromNode(a,t,c.NEW_MESSAGE_BAR_BUFFER),e,o):this.scrollTo(this.getOffsetToPreventLoading("top"),e,o)},t.getOffsetOrientationFromNode=function(e,t,n){var r;void 0===n&&(n=0);var a=null===(r=this.ref.current)||void 0===r?void 0:r.getScrollerNode();if(null==a)return 0;var o=this.getScrollerState(),i=(0,v.default)(e,a);return"middle"===t?Math.min(i-.5*o.offsetHeight+.5*e.offsetHeight-8,i-n):i-n},t.restoreScroll=function(){if(!this.isInitialized()){var e=this.initialScrollTop;this.initialScrollTop=void 0;var t=E(this.props.messages);null!=t?this.scrollToMessage(t,!1):this.props.hasUnreads?this.scrollToNewMessages():null!=e?this.scrollTo(e+this.props.placeholderHeight,!1,this.handleScroll):this.setScrollToBottom()}},t.scrollTo=function(e,t,n){var r;void 0===t&&(t=!1),null===(r=this.ref.current)||void 0===r||r.scrollTo({to:e,animate:!u.default.useReducedMotion&&t,callback:n}),this.isPinned()?this.updateStoreDimensions():this.updateStoreDimensionsDebounced()},t.mergeTo=function(e,t){var n;null===(n=this.ref.current)||void 0===n||n.mergeTo({to:e,callback:t}),this.isPinned()?this.updateStoreDimensions():this.updateStoreDimensionsDebounced()},t.setScrollToBottom=function(e){var t=this;void 0===e&&(e=!1);var n=this.props,r=n.messages,a=n.channel;r.hasMoreAfter?function(e){i.default.jumpToPresent(e.id,y.MAX_MESSAGES_PER_CHANNEL),(0,s.transitionToGuild)(e.getGuildId()||y.ME,e.id)}(a):this.scrollTo(Number.MAX_SAFE_INTEGER,e,(function(){t.jumping=!1,t.handleScroll()}))},t.updateStoreDimensions=function(e){if(!this.isJumping()&&this.isInitialized()){var t=this.props.channel;if(this.isPinned())o.default.clearChannelDimensions(t.id,e);else{var n=this.props.placeholderHeight,r=this.getScrollerState(),a=r.scrollTop,i=r.scrollHeight,l=r.offsetHeight;o.default.updateChannelDimensions(t.id,a-n,i-n,l,e)}}},t.scrollIntoViewRect=function(){},t.scrollPageUp=function(e){var t;void 0===e&&(e=!1),null===(t=this.ref.current)||void 0===t||t.scrollPageUp({animate:e})},t.scrollPageDown=function(e){var t;void 0===e&&(e=!1),null===(t=this.ref.current)||void 0===t||t.scrollPageDown({animate:e})},t.scrollToMessage=function(e,t,n){var r=this;if(void 0===t&&(t=!1),null!=this.ref.current){var a=(0,p.getElementFromMessageId)(e);if(!this.isJumping()&&t&&null!=n&&!u.default.useReducedMotion)f.default.extractTimestamp(e)>n?this.scrollTo(0):this.scrollTo(Number.MAX_SAFE_INTEGER);this.pinned=!1,this.jumping=!0;var o=function(){r.jumping=!1,a instanceof HTMLElement&&u.default.keyboardModeEnabled&&a.focus({preventScroll:!0}),r.scrollCounter=0,r.handleScroll()};a instanceof HTMLElement?this.scrollTo(this.getOffsetOrientationFromNode(a,"middle",this.props.hasUnreads?c.NEW_MESSAGE_BAR_BUFFER:c.MESSAGE_PADDING),t,o):this.scrollToNewMessages(t,"middle",o)}},t.getOffsetToTriggerLoading=function(e,t){var n=t.scrollHeight,r=t.offsetHeight,a=this.props,o=a.messages,i=a.hasUnreads,l=a.placeholderHeight;return"top"===e?o.hasMoreBefore?i?l-c.PLACEHOLDER_BUFFER-2:l+500:0:o.hasMoreAfter?n-r-l-500:n-r},t.getOffsetToPreventLoading=function(e){var t=this.props.messages,n=0;return"top"===e&&t.hasMoreBefore?n=2:"bottom"===e&&t.hasMoreAfter&&(n=-2),this.getOffsetToTriggerLoading(e,this.getScrollerState())+n},t.getSnapshotBeforeUpdate=function(e){if(this.hasAnchor()||null!=e){var t=this.getScrollerState(),n=t.scrollTop,r=t.offsetHeight,a=t.scrollHeight;this.updateFocusAnchor(e,n,r),this.updateFetchAnchor(n,r,a),this.updateAutomaticAnchor(n)}},t.cleanup=function(){this.acking=!1,this.updateStoreDimensionsDebounced.cancel(),(0,l.disableAutomaticAck)(this.props.channel.id)},e}();t.MessagesScrollManager=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(122),i=n(483),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=(0,i.hexWithOpacity)(l.HEXColors.BRAND,.2),f=(0,i.hexWithOpacity)(l.HEXColors.BRAND,0);function c(e){var t=e.children,n=e.className,r=e.flashKey,i=(0,o.useSpring)((function(){return{immediate:!0,from:{backgroundColor:d}}})),l=i[0],u=i[1];return a.useEffect((function(){u({reset:!0,immediate:!0,to:{backgroundColor:d}}),u({delay:1e3,immediate:!1,to:{backgroundColor:f}})}),[r,u]),s(o.animated.div,{style:l,className:n},void 0,t)}c.displayName="BackgroundFlash"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=j;D(n(0));var r,a=n(389),o=n(286),i=n(9046),l=R(n(8258)),u=n(141),s=R(n(1320)),d=D(n(8253)),f=R(n(8773)),c=R(n(8632)),p=R(n(8395)),v=R(n(8471)),y=R(n(8340)),m=R(n(10094)),_=R(n(8774)),h=R(n(8775)),E=R(n(10095)),g=R(n(8776)),S=R(n(9222)),O=R(n(10096)),I=R(n(10097)),T=R(n(10098)),C=R(n(10099)),b=R(n(10100)),M=R(n(10101)),N=R(n(10102)),A=R(n(10103)),P=R(n(6));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e){var t,n,r,R,L=e.channel,D=e.message,j=e.target,k=e.attachment,U=e.onSelect,G=(0,s.default)(i.ExperimentInAppReporting),F=j;if(k)r=n=k.url;else for(;F instanceof Node;)F instanceof HTMLImageElement&&null!=F.src&&(r=F.src),F instanceof HTMLAnchorElement&&null!=F.href&&(n=F.href,R=F.textContent),F=F.parentNode;var B=null===(t=document.getSelection())||void 0===t?void 0:t.toString(),H=(0,f.default)(B),x=(0,v.default)(B),V=(0,O.default)(D,L),W=(0,m.default)(D,L),Y=(0,E.default)(D,L),z=(0,S.default)(D,L),K=(0,M.default)(D,L),$=(0,g.default)(D,L),Z=(0,I.default)(D),q=(0,_.default)(D,L),X=(0,T.default)(D,L),J=(0,h.default)(D,L),Q=(0,b.default)(D,L),ee=(0,N.default)(D,L),te=(0,p.default)(n||r,R),ne=(0,c.default)(r),re=(0,l.default)(D.id,D.channel_id+"-"+D.id),ae=(0,C.default)(D,L),oe=(0,A.default)(D,L),ie=(0,y.default)(o.ApplicationCommandTarget.MESSAGE,L.id),le=G===u.ExperimentBuckets.TREATMENT_1;return w(d.default,{navId:"message",onClose:a.closeContextMenu,"aria-label":P.default.Messages.MESSAGE_ACTIONS_MENU_LABEL,onSelect:U},void 0,w(d.MenuGroup,{},void 0,H),w(d.MenuGroup,{},void 0,x),w(d.MenuGroup,{},void 0,""===B?V:null,W,Z,Y,z,ae,oe,ie,K,$,q,ee,X,J,le&&Q),w(d.MenuGroup,{},void 0,ne),w(d.MenuGroup,{},void 0,te),w(d.MenuGroup,{},void 0,re))}j.displayName="MessageContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(1235),l=n(123),u=n(8253),s=E(n(249)),d=E(n(40)),f=E(n(39)),c=E(n(8651)),p=E(n(150)),v=n(121),y=E(n(261)),m=n(724),_=n(1),h=E(n(6));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){var n=a.useContext(l.AccessibilityPreferencesContext).reducedMotion,r=(0,o.useStateFromStores)([d.default],(function(){return(t.isPrivate()||d.default.can(_.Permissions.ADD_REACTIONS,t))&&!t.isArchivedThread()}),[t]);if(!f.default.renderReactions||!r||e.type===_.MessageTypes.GUILD_INVITE_REMINDER)return null;var E=t.getGuildId(),g=s.default.getDisambiguatedEmojiContext(E).getEmojiInPriorityOrder().filter((function(e){return!y.default.isEmojiPremiumLocked(e,t,_.EmojiIntention.REACTION)&&!y.default.isEmojiFiltered(e,t,_.EmojiIntention.REACTION)})).slice(0,12).map((function(r,a){var o,l,s;return S(u.MenuItem,{id:null!==(o=null!==(l=null!==(s=r.id)&&void 0!==s?s:r.optionallyDiverseSequence)&&void 0!==l?l:r.name)&&void 0!==o?o:":"+r.name+":",label:null==r.id?r.name:":"+r.name+":",imageUrl:function(e){var t,a=e.isFocused;return null!=r.id?p.default.getEmojiURL({id:r.id,animated:r.animated&&(!n.enabled||a)}):y.default.getURL(null!==(t=r.optionallyDiverseSequence)&&void 0!==t?t:"")},action:function(){return(0,i.addReaction)(t.id,e.id,(0,m.toReactionEmoji)(r))}},a)}));return S(u.MenuItem,{id:"add-reaction",label:h.default.Messages.ADD_REACTION,action:function(){return v.ComponentDispatch.dispatch(_.ComponentActions.TOGGLE_REACTION_POPOUT(e.id),!0)}},void 0,g,S(u.MenuItem,{id:"other-reactions",label:h.default.Messages.OTHER_REACTIONS,icon:c.default,action:function(){return v.ComponentDispatch.dispatch(_.ComponentActions.TOGGLE_REACTION_POPOUT(e.id),!0)}}))}O.displayName="useMessageAddReactionItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(390)),o=n(8253),i=d(n(12)),l=n(297),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){var n=i.default.getCurrentUser();return e.state===u.MessageStates.SEND_FAILED||e.author.id!==n.id||!(0,l.canEditMessageWithStickers)(e)||t.isArchivedThread()?null:c(o.MenuItem,{id:"edit",label:s.default.Messages.EDIT_MESSAGE,action:function(){return a.default.startEditMessage(t.id,e.id,e.content)}})}p.displayName="useMessageEditItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.useStateFromStoresArray)([s.default],(function(){var e=s.default.getDisambiguatedEmojiContext(t.guild_id).getEmojiInPriorityOrder().filter((function(e){return!(e.useSpriteSheet&&I.indexOf(e.uniqueName||"")>=0)&&!v.default.isEmojiPremiumLocked(e,t,m.EmojiIntention.REACTION)}));return e.length>4&&(e.length=4),e}),[t]);return(0,i.useStateFromStores)([d.default,f.default],(function(){return f.default.renderReactions&&!t.isArchivedThread()&&(t.isPrivate()||d.default.can(m.Permissions.ADD_REACTIONS,t))}),[t])&&n.length>0?S(u.MenuGroup,{className:h.default.wrapper},void 0,n.map((function(n,r){var a;return S(u.MenuItem,{id:"quickreact-"+(null!==(a=n.id)&&void 0!==a?a:r),render:function(e){var t=e.isFocused;return S(T,{emoji:n,isFocused:t})},action:function(){return(0,l.addReaction)(t.id,e.id,(0,y.toReactionEmoji)(n))}},r)}))):null};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=n(3),l=n(1235),u=n(8253),s=E(n(249)),d=E(n(40)),f=E(n(39)),c=E(n(149)),p=E(n(150)),v=E(n(261)),y=n(724),m=n(1),_=E(n(6)),h=E(n(7823));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var I=["slight_smile","frowning","smile","stuck_out_tongue","wink"];function T(e){var t=e.emoji,n=e.isFocused,r=t.animated,i=t.src,l=t.surrogates;return null==i&&null!=t.id?i=p.default.getEmojiURL({id:t.id,animated:!!r}):null==i&&(i=v.default.getURL(l)),S(c.default,{text:t.allNamesString,hideOnClick:!0,spacing:16,forceOpen:n},t.id||t.name,(function(e){var r;return a.createElement("div",O({"aria-label":_.default.Messages.ADD_REACTION_NAMED.format({emojiName:t.name}),className:(0,o.default)(h.default.button,(r={},r[h.default.focused]=n,r))},e),null==i||""===i.trim()?a.createElement("span",O({className:(0,o.default)("emoji","emoji-text",h.default.icon)},e),l):S("img",{className:h.default.icon,src:i,alt:""}))}))}T.displayName="EmojiButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9047)),i=n(8253),l=n(41),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e){return e.reactions&&0!==e.reactions.length?f(i.MenuItem,{id:"reactions",label:u.default.Messages.REACTIONS,action:function(){return(0,l.openModal)((function(t){return a.createElement(o.default,c({},t,{message:e}))}))}}):null}p.displayName="useMessageReactionsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(154)),i=n(1235),l=n(8253),u=n(8256),s=c(n(40)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(0,a.useStateFromStores)([s.default],(function(){return s.default.can(d.Permissions.MANAGE_MESSAGES,t)&&!t.isArchivedThread()}),[t])&&e.reactions&&0!==e.reactions.length?v(l.MenuItem,{id:"remove-reactions",label:f.default.Messages.REMOVE_ALL_REACTIONS,action:function(n){n.shiftKey?(0,i.removeAllReactions)(t.id,e.id):o.default.show({title:f.default.Messages.REMOVE_ALL_REACTIONS_CONFIRM_TITLE,body:f.default.Messages.REMOVE_ALL_REACTIONS_CONFIRM_BODY,confirmText:f.default.Messages.YES_TEXT,cancelText:f.default.Messages.NO_TEXT,onConfirm:function(){(0,i.removeAllReactions)(t.id,e.id)}})},color:u.MenuItemColor.DANGER}):null}y.displayName="useMessageRemoveReactionsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=n(8253),i=n(8708),l=n(8466),u=(r=n(6))&&r.__esModule?r:{default:r};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(0,i.useCanReplyToMessage)(t,e)?d(o.MenuItem,{id:"reply",label:u.default.Messages.MESSAGE_ACTION_REPLY,action:function(n){(0,l.replyToMessage)(t,e,n)}}):null}f.displayName="useMessageReplyItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(8495)),o=n(8253),i=n(8256),l=n(8705),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(0,l.canReportMessage)(e)?f(o.MenuItem,{id:"report",label:u.default.Messages.REPORT_MESSAGE_MENU_OPTION,action:function(){return a.default.openReportMessageModal(t,e)},color:i.MenuItemColor.DANGER}):null}c.displayName="useMessageReportItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8253),o=s(n(9048)),i=s(n(9049)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return e.state!==l.MessageStates.SEND_FAILED?null:f(a.MenuItem,{id:"resend",label:u.default.Messages.RESEND_MESSAGE,action:function(){return(0,i.default)(t,e,void 0,o.default.getOptions(e.id))}})}c.displayName="useMessageResendItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=s(n(8709)),l=n(8466),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){var n=(0,a.useStateFromStores)([i.default],(function(){return i.default.isSpeakingMessage(t.id,e.id)}),[t,e]);return""===e.content?null:f(o.MenuItem,{id:"tts",label:n?u.default.Messages.STOP_SPEAKING_MESSAGE:u.default.Messages.SPEAK_MESSAGE,action:function(){return n?(0,l.stopSpeakingMessage)():(0,l.speakMessage)(t,e)}})}c.displayName="useMessageSpeakItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=n(8253),i=n(1209),l=n(8466),u=(r=n(6))&&r.__esModule?r:{default:r};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(0,i.useCanStartPublicThread)(t,e)?d(o.MenuItem,{id:"thread",label:u.default.Messages.CREATE_THREAD,action:function(){(0,l.createThread)(t,e)}}):null}f.displayName="useMessageStartThreadItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;m(n(0));var r,a=n(389),o=v(n(8258)),i=m(n(8253)),l=v(n(8773)),u=v(n(8395)),s=v(n(8471)),d=v(n(8774)),f=v(n(8775)),c=v(n(8776)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t,n,r,v,y=e.channel,m=e.message,h=e.target,E=e.attachment,g=e.onSelect,S=h;if(E)r=n=E.url;else for(;S instanceof Node;)S instanceof HTMLImageElement&&null!=S.src&&(r=S.src),S instanceof HTMLAnchorElement&&null!=S.href&&(n=S.href,v=S.textContent),S=S.parentNode;var O=null===(t=document.getSelection())||void 0===t?void 0:t.toString(),I=(0,l.default)(O),T=(0,s.default)(O),C=(0,c.default)(m,y),b=(0,d.default)(m,y),M=(0,f.default)(m,y),N=(0,u.default)(n||r,v),A=(0,o.default)(m.id,m.channel_id+"-"+m.id);return _(i.default,{navId:"message",onClose:a.closeContextMenu,"aria-label":p.default.Messages.MESSAGE_ACTIONS_MENU_LABEL,onSelect:g},void 0,_(i.MenuGroup,{},void 0,I),_(i.MenuGroup,{},void 0,T),_(i.MenuGroup,{},void 0,C,b,M),_(i.MenuGroup,{},void 0,N),_(i.MenuGroup,{},void 0,A))}h.displayName="SystemMessageContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=O(n(390)),o=O(n(182)),i=n(8708),l=O(n(8265)),u=n(1209),s=O(n(11)),d=O(n(10)),f=O(n(8333)),c=O(n(1219)),p=O(n(201)),v=O(n(40)),y=O(n(39)),m=n(121),_=n(1163),h=O(n(685)),E=O(n(8645)),g=n(8466),S=n(1);function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){return v.default.can(S.Permissions.MANAGE_MESSAGES,e)}var C=function(e,t,n){var O=r.useRef(n);return O.current=n,r.useCallback((function(n){if(O.current&&n.target===n.currentTarget){var r=!(n.altKey||n.ctrlKey||n.metaKey||n.shiftKey),I=n.altKey&&!(n.ctrlKey||n.metaKey||n.shiftKey),C=n.metaKey&&!(n.altKey||n.ctrlKey||n.shiftKey),b=n.shiftKey&&!(n.altKey||n.ctrlKey||n.metaKey),M=p.default.getMessage(t,e),N=d.default.getChannel(t);if(null!=M&&null!=N){var A=s.default.getId(),P=M.author.id===A;switch(n.key.toLowerCase()){case"backspace":r&&(T(N)||P)&&(n.preventDefault(),(0,g.deleteMessage)(N,M,n));break;case"c":C&&_.SUPPORTS_COPY&&(n.preventDefault(),(0,_.copy)(M.content));break;case"e":r&&function(e,t,n){return!t.isSystemDM()&&!(0,h.default)(n)&&n.author.id===e}(A,N,M)&&(n.preventDefault(),(0,g.editMessage)(N,M));break;case"p":(r||b)&&function(e,t){return!e.isSystemDM()&&!(0,h.default)(t)&&(T(e)||e.isPrivate())}(N,M)&&(n.preventDefault(),(0,g.pinMessage)(N,M,n));break;case"+":(r||b)&&function(e){var t=null==e.guild_id||c.default.canChatInGuild(e.guild_id),n=y.default.renderReactions;return!(0,E.default)({channel:e,canChat:t,renderReactions:n,canAddNewReactions:t&&v.default.can(S.Permissions.ADD_REACTIONS,e),isLurking:null!=e.guild_id&&o.default.isLurking(e.guild_id)}).disableReactionCreates&&n}(N)&&(n.preventDefault(),m.ComponentDispatch.dispatch(S.ComponentActions.TOGGLE_REACTION_POPOUT(M.id),!0));break;case"r":r&&(0,i.canReplyToMessage)(N,M,v.default)&&(n.preventDefault(),(0,g.replyToMessage)(N,M,n));break;case"t":if(r)if((0,u.computeCanStartPublicThread)(N,M))n.preventDefault(),l.default.openThreadSidebarForCreating(N,M,"Message Shortcut");else if(M.hasFlag(S.MessageFlags.HAS_THREAD)&&(0,u.computeCanSeeThreads)()){var R=d.default.getChannel(M.id);null!=R&&(n.preventDefault(),l.default.openThreadSidebarForViewing(R))}break;case"enter":I&&(n.preventDefault(),(0,g.markMessageUnread)(N,M));break;case"escape":f.default.isEditing(N.id,M.id)?a.default.endEditMessage(N.id):m.ComponentDispatch.dispatch(S.ComponentActions.TEXTAREA_FOCUS)}}}}),[e,t])};t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e.message,s=e.channel,d=e.groupId,c=e.compact,p=void 0!==c&&c,v=n.emojiPicker,y=n.moreUtilities,m=r.state===l.MessageStates.SENDING,_=r.id===d,h=(0,a.hasFlag)(r.flags,l.MessageFlags.EPHEMERAL),E=r.state===l.MessageStates.SEND_FAILED;return m||h&&!E?null:f(i.default,{className:u.default.buttons,isHeader:!p&&_&&!(0,o.default)(r),channel:s,message:r,setPopout:t,showEmojiPicker:v,showMoreUtilities:y})};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(99),o=s(n(685)),i=s(n(10107)),l=n(1),u=s(n(7343));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useConnectedUtilitiesProps=_e,t.default=void 0;var r,a=ae(n(0)),o=ne(n(9)),i=n(3),l=n(1235),u=n(286),s=n(9046),d=ne(n(8408)),f=n(141),c=ne(n(1320)),p=ne(n(182)),v=ae(n(8253)),y=n(8256),m=n(8708),_=n(1209),h=ne(n(8340)),E=ne(n(11)),g=ne(n(8333)),S=ne(n(15)),O=ne(n(1219)),I=ne(n(40)),T=ne(n(8709)),C=ne(n(39)),b=ae(n(278)),M=ne(n(149)),N=ne(n(8651)),A=ne(n(10108)),P=ne(n(5954)),R=ne(n(8431)),L=ne(n(8745)),D=ne(n(736)),w=ne(n(10109)),j=ne(n(8345)),k=ne(n(8331)),U=ne(n(1215)),G=ne(n(9225)),F=ne(n(10110)),B=ne(n(9215)),H=ne(n(10111)),x=ne(n(8287)),V=ne(n(8676)),W=ae(n(10112)),Y=n(724),z=n(8705),K=n(1163),$=n(297),Z=ne(n(685)),q=ne(n(8645)),X=n(8466),J=ne(n(8965)),Q=n(1),ee=ne(n(6)),te=ne(n(7826));function ne(e){return e&&e.__esModule?e:{default:e}}function re(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return re=function(){return e},e}function ae(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=re();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function oe(){return(oe=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}).apply(this,arguments)}function ie(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function le(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ue(e){e.stopPropagation()}function se(e){var t=e.message,n=e.channel,r=e.canCopy,a=e.canPin,o=e.canDelete,i=e.canReport,l=e.canConfigureJoin,s=e.canEdit,d=e.canReply,f=e.canStartThread,c=e.hasReactions,p=e.hasDeveloperMode,m=e.canSpeakMessage,_=e.isSpeakingMessage,E=e.onClose,g=e.isGuildInviteReminder,S=e.onSelect;return le(v.default,{onSelect:S,navId:"message-actions",onClose:E,style:v.MenuStyle.FLEXIBLE,"aria-label":ee.default.Messages.MESSAGE_UTILITIES_A11Y_LABEL},void 0,s&&le(v.MenuItem,{id:"edit",label:ee.default.Messages.EDIT_MESSAGE,icon:U.default,action:function(){return(0,X.editMessage)(n,t)}}),a&&le(v.MenuItem,{id:"pin",label:t.pinned?ee.default.Messages.UNPIN_MESSAGE:ee.default.Messages.PIN_MESSAGE,icon:G.default,action:function(e){return(0,X.pinMessage)(n,t,e)}}),d&&le(v.MenuItem,{id:"reply",label:ee.default.Messages.MESSAGE_ACTION_REPLY,icon:F.default,action:function(e){return(0,X.replyToMessage)(n,t,e)}}),f?le(v.MenuItem,{id:"thread",label:ee.default.Messages.CREATE_THREAD,icon:x.default,action:function(){return(0,X.createThread)(n,t)}}):t.hasFlag(Q.MessageFlags.HAS_THREAD)?le(v.MenuItem,{id:"goto-thread",label:ee.default.Messages.VIEW_THREAD,icon:x.default,action:function(){return(0,X.gotoThread)(n,t)}}):null,(0,h.default)(u.ApplicationCommandTarget.MESSAGE,n.id),le(v.MenuItem,{id:"mark-unread",label:ee.default.Messages.MARK_UNREAD,icon:w.default,action:function(){return(0,X.markMessageUnread)(n,t)}}),c&&le(v.MenuItem,{id:"reactions",label:ee.default.Messages.REACTIONS,icon:P.default,action:function(){return(0,X.showReactionsModal)(n,t)}}),l&&le(v.MenuItem,{id:"configure",label:ee.default.Messages.CONFIGURE,icon:L.default,action:function(){return(0,X.configureJoin)(n)}}),r&&!g&&le(v.MenuItem,{id:"copy-link",label:ee.default.Messages.COPY_MESSAGE_LINK,icon:D.default,action:function(){return(0,X.copyLink)(n,t)}}),m&&le(v.MenuItem,{id:"tts",label:_?ee.default.Messages.STOP_SPEAKING_MESSAGE:ee.default.Messages.SPEAK_MESSAGE,icon:H.default,action:function(){return _?(0,X.stopSpeakingMessage)():(0,X.speakMessage)(n,t)}}),o&&le(v.MenuItem,{id:"delete",label:ee.default.Messages.DELETE_MESSAGE,icon:V.default,action:function(e){return(0,X.deleteMessage)(n,t,e)},color:y.MenuItemColor.DANGER}),i&&le(v.MenuItem,{id:"report",label:ee.default.Messages.REPORT_MESSAGE_MENU_OPTION,icon:R.default,action:function(){return(0,X.reportMessage)(n,t)},color:y.MenuItemColor.DANGER}),r&&p&&le(v.MenuItem,{id:"copy-id",label:ee.default.Messages.COPY_ID,icon:A.default,action:function(e){return(0,X.copyId)(n,t,e)}}))}function de(e){var t=e.label,n=e.icon,r=e.channel,o=e.message,i=e.onClick,l=e.key,u=e.disabled,s=e.dangerous,d=ie(e,["label","icon","channel","message","onClick","key","disabled","dangerous"]);return le(M.default,{text:t,hideOnClick:!0},l,(function(e){var l=e.onMouseEnter,f=e.onMouseLeave,c=e.onClick;return a.createElement(W.Button,oe({onMouseEnter:l,onMouseLeave:f,onClick:function(e){null!=c&&c(),i(r,o,e)},"aria-label":t,disabled:u,dangerous:s},d),le(n,{className:te.default.icon}))}))}se.displayName="MessageActionsMenu",de.displayName="renderIconButton";var fe=le(W.Separator,{}),ce=le(W.Separator,{}),pe=le(W.Separator,{});function ve(e){var t=e.channel,n=e.message,r=e.expanded,o=e.canCopy,i=e.canPin,l=e.canDelete,u=e.canReport,s=e.canReact,d=e.canConfigureJoin,f=e.canEdit,c=e.canPublish,p=e.canReply,v=e.canStartThread,y=e.forceOpen,m=void 0!==y&&y,_=e.showMoreUtilities,h=e.showEmojiPicker,E=e.canSpeakMessage,g=e.isSpeakingMessage,S=e.setPopout,O=e.hasDeveloperMode,I=e.isGuildInviteReminder,T=n.reactions.length>0,C=a.useCallback((function(e){var r=e.closePopout;return le(se,{message:n,channel:t,canCopy:o,canPin:i,canDelete:l,canReport:u,canConfigureJoin:d,canEdit:f,canPublish:c,canReply:p,canStartThread:v,hasReactions:T,hasDeveloperMode:O,canSpeakMessage:E,isSpeakingMessage:g,onClose:r,isGuildInviteReminder:I})}),[n,t,o,i,l,u,d,f,c,p,v,T,O,E,g,I]),M=a.useCallback((function(){return S({moreUtilities:!_})}),[_,S]),R=a.useCallback((function(){S({emojiPicker:!h})}),[h,S]),B=n.hasFlag(Q.MessageFlags.CROSSPOSTED);return r&&!h&&!_||m?a.createElement(a.Fragment,null,c&&m?a.createElement(a.Fragment,null,de({key:"publish",label:B?ee.default.Messages.NEWS_CHANNEL_PUBLISHED:ee.default.Messages.NEWS_CHANNEL_PUBLISH,icon:j.default,channel:t,message:n,disabled:B,onClick:X.publishMessage}),pe):null,p?de({key:"reply",label:ee.default.Messages.MESSAGE_ACTION_REPLY,icon:F.default,channel:t,message:n,onClick:X.replyToMessage}):null,f?de({key:"edit",label:ee.default.Messages.EDIT,icon:U.default,channel:t,message:n,onClick:X.editMessage}):null,v?de({key:"thread",label:ee.default.Messages.CREATE_THREAD,icon:x.default,channel:t,message:n,onClick:X.createThread}):n.hasFlag(Q.MessageFlags.HAS_THREAD)?de({key:"view-thread",label:ee.default.Messages.VIEW_THREAD,icon:x.default,channel:t,message:n,onClick:X.gotoThread}):null,de({key:"mark-unread",label:ee.default.Messages.MARK_UNREAD,icon:w.default,channel:t,message:n,onClick:X.markMessageUnread}),i?de({key:"pin",label:n.pinned?ee.default.Messages.UNPIN_MESSAGE:ee.default.Messages.PIN_MESSAGE,icon:G.default,channel:t,message:n,onClick:X.pinMessage}):null,o?a.createElement(a.Fragment,null,I?null:de({key:"copy-link",label:ee.default.Messages.COPY_LINK,icon:D.default,channel:t,message:n,onClick:X.copyLink}),de({key:"copy-id",label:ee.default.Messages.COPY_ID,icon:A.default,channel:t,message:n,onClick:X.copyId})):null,T?de({key:"reactions-modal",label:ee.default.Messages.REACTIONS,icon:P.default,channel:t,message:n,onClick:X.showReactionsModal}):null,l?de({key:"delete",label:ee.default.Messages.DELETE,icon:V.default,dangerous:!0,channel:t,message:n,onClick:X.deleteMessage}):null,d?de({key:"configure",label:ee.default.Messages.CONFIGURE,icon:L.default,channel:t,message:n,onClick:X.configureJoin}):null):a.createElement(a.Fragment,null,s&&!I?le(b.default,{renderPopout:function(e){var r=e.closePopout;return me(t,n,r)},shouldShow:h,onRequestClose:R,position:b.Positions.LEFT,align:b.Align.TOP},void 0,(function(e,r){e.onClick;var a=ie(e,["onClick"]);return de(oe({key:"add-reaction",label:ee.default.Messages.ADD_REACTION,icon:N.default,channel:t,selected:r,message:n,onClick:R},a))})):null,p&&!f?de({key:"reply",label:ee.default.Messages.MESSAGE_ACTION_REPLY,icon:F.default,channel:t,message:n,onClick:X.replyToMessage}):null,f?de({key:"edit",label:ee.default.Messages.EDIT,icon:U.default,channel:t,message:n,onClick:X.editMessage}):null,v?de({key:"thread",label:ee.default.Messages.CREATE_THREAD,icon:x.default,channel:t,message:n,onClick:X.createThread}):n.hasFlag(Q.MessageFlags.HAS_THREAD)?de({key:"view-thread",label:ee.default.Messages.VIEW_THREAD,icon:x.default,channel:t,message:n,onClick:X.gotoThread}):null,c?a.createElement(a.Fragment,null,de({key:"publish",label:B?ee.default.Messages.NEWS_CHANNEL_PUBLISHED:ee.default.Messages.NEWS_CHANNEL_PUBLISH,icon:j.default,channel:t,message:n,disabled:B,onClick:X.publishMessage}),fe):null,l&&I?a.createElement(a.Fragment,null,de({key:"delete",label:ee.default.Messages.DELETE,icon:V.default,dangerous:!0,channel:t,message:n,onClick:X.deleteMessage}),ce):null,le(b.default,{renderPopout:C,shouldShow:_,onRequestClose:M,position:b.Positions.LEFT,align:b.Align.TOP,animation:b.default.Animation.NONE},void 0,(function(e,r){e.onClick;var a=ie(e,["onClick"]);return de(oe({key:"more",label:ee.default.Messages.MORE,icon:k.default,channel:t,message:n,selected:r,onClick:M},a))})))}function ye(e){var t=e.channel,n=e.message;return a.createElement(a.Fragment,null,de({key:"retry",label:ee.default.Messages.RETRY,icon:B.default,channel:t,message:n,onClick:X.retrySendMessage}),de({key:"delete-usent",label:ee.default.Messages.DELETE,icon:V.default,channel:t,message:n,onClick:X.deleteMessage}))}function me(e,t,n){return le(d.default,{channel:e,pickerIntention:Q.EmojiIntention.REACTION,closePopout:n,onSelectEmoji:function(r,a){!function(e,t,n){null!=e&&(0,l.addReaction)(t.id,n.id,(0,Y.toReactionEmoji)(e))}(r,e,t),a&&n()}})}function _e(e){var t=e.channel,n=e.message,r=e.isHeader,a=e.showEmojiPicker,o=e.showMoreUtilities,l=e.setPopout,u=n.author,d=(0,i.useStateFromStores)([S.default],(function(){return S.default.getGuild(t.guild_id)}),[t.guild_id]),v=(0,i.useStateFromStores)([E.default],(function(){return E.default.getId()})),y=(0,c.default)(s.ExperimentInAppReporting),h=(0,i.useStateFromStoresObject)([C.default],(function(){return{renderReactions:C.default.renderReactions,developerMode:C.default.developerMode}})),b=h.renderReactions,M=h.developerMode,N=(0,i.useStateFromStores)([O.default],(function(){return null==t.guild_id||O.default.canChatInGuild(t.guild_id)}),[t]),A=(0,i.useStateFromStoresObject)([I.default],(function(){return{canAddNewReactions:N&&I.default.can(Q.Permissions.ADD_REACTIONS,t),canManageMessages:I.default.can(Q.Permissions.MANAGE_MESSAGES,t)}}),[t,N]),P=A.canManageMessages,R=A.canAddNewReactions,L=(0,m.useCanReplyToMessage)(t,n),D=(0,_.useCanStartPublicThread)(t,n),w=(0,i.useStateFromStores)([p.default],(function(){return null!=t.guild_id&&p.default.isLurking(t.guild_id)}),[t]),j=u.id===v,k=(P||j)&&!t.isArchivedThread()&&n.type in Q.MessageTypesDeletable,U=(0,z.canReportMessage)(n)&&null!=y&&y===f.ExperimentBuckets.TREATMENT_1,G=!t.isSystemDM()&&!(0,Z.default)(n),F=G&&(P||t.isPrivate())&&!t.isArchivedThread(),B=G&&j&&(0,$.canEditMessageWithStickers)(n)&&!t.isArchivedThread(),H=(0,q.default)({channel:t,canChat:N,renderReactions:b,canAddNewReactions:R,isLurking:w}).disableReactionCreates,x=t.type===Q.ChannelTypes.GUILD_ANNOUNCEMENT&&null!=d&&d.hasFeature(Q.GuildFeatures.NEWS)&&(j||P)&&n.type===Q.MessageTypes.DEFAULT,V=t.getGuildId(),W=null!=V&&(n.type===Q.MessageTypes.USER_JOIN||n.type===Q.MessageTypes.GUILD_INVITE_REMINDER)&&I.default.canWithPartialContext(Q.Permissions.MANAGE_GUILD,{guildId:V}),Y=t.id,X=n.id,J=(0,i.useStateFromStores)([g.default],(function(){return g.default.isEditing(Y,X)}),[Y,X]),ee=(0,i.useStateFromStores)([T.default],(function(){return T.default.isSpeakingMessage(Y,X)}),[Y,X]),te=""!==n.content;return{channel:t,message:n,isHeader:r,canPin:F,canEdit:B,canDelete:k,canReport:U,canReply:L,canStartThread:D,canCopy:K.SUPPORTS_COPY,hasDeveloperMode:M,canReact:!H&&b,canPublish:x,canConfigureJoin:W,isEditing:J,showEmojiPicker:a,showMoreUtilities:o,canSpeakMessage:te,isSpeakingMessage:ee,setPopout:l,experimentBucket:y,isGuildInviteReminder:n.type===Q.MessageTypes.GUILD_INVITE_REMINDER}}me.displayName="renderEmojiPicker";var he=a.memo((function(e){var t,n,r,i,l=_e(e),u=l.isHeader,s=l.isEditing,d=(0,J.default)(),f=(r=(n=l).channel,(i=n.message).state===Q.MessageStates.SEND_FAILED?le(ye,{channel:r,message:i}):null),c=function(e,t){return e.message.state!==Q.MessageStates.SEND_FAILED?a.createElement(ve,oe({},e,{expanded:t})):null}(l,d);return s||null==f&&null==c?null:le("div",{className:(0,o.default)(e.className,(t={},t[te.default.container]=!0,t[te.default.isHeader]=u,t)),onClick:ue,onContextMenu:ue,"aria-label":ee.default.Messages.MESSAGE_UTILITIES_A11Y_LABEL},void 0,le(W.default,{},void 0,f,c))}));t.default=he},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M5 2C3.34315 2 2 3.34315 2 5V19C2 20.6569 3.34315 22 5 22H19C20.6569 22 22 20.6569 22 19V5C22 3.34315 20.6569 2 19 2H5ZM8.79741 7.72V16H6.74541V7.72H8.79741ZM13.2097 7.72C16.0897 7.72 17.5897 9.388 17.5897 11.848C17.5897 14.308 16.0537 16 13.2577 16H10.3537V7.72H13.2097ZM13.1497 14.404C14.6137 14.404 15.5257 13.636 15.5257 11.86C15.5257 10.12 14.5537 9.316 13.1497 9.316H12.4057V14.404H13.1497Z"}))}d.displayName="CopyID"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f||void 0,fill:d,d:"M14 3H20C21 3 22.0001 4 22.0001 5V19.0003C22.0001 20 21 21 20 21H14C13 21 6 13 6 13H2V11H6C6 11 13 3 14 3Z"}))}d.displayName="MarkUnread"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,i=e.color,l=void 0===i?"currentColor":i;return o("svg",{className:e.className,width:n,height:a,viewBox:"0 0 24 24"},void 0,o("path",{d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z",className:e.foreground,fill:l}))}i.displayName="Reply"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M2.99805 4.8C2.99805 3.8055 3.80445 3 4.79805 3H19.198C20.1925 3 20.998 3.8055 20.998 4.8V15.6C20.998 16.5936 20.1925 17.4 19.198 17.4H11.098L7.49805 21V17.4H4.79805C3.80445 17.4 2.99805 16.5936 2.99805 15.6V4.8ZM11.5737 5.16264C11.7336 5.00375 11.9739 4.95652 12.183 5.04208C12.3921 5.12708 12.5279 5.33098 12.5279 5.55487V14.444C12.5279 14.669 12.3921 14.8718 12.183 14.9579C11.9739 15.0435 11.7336 14.9963 11.5737 14.8374L9.1739 12.2217H7.4969C7.18945 12.2217 6.9379 11.9717 6.9379 11.6662V8.33273C6.9379 8.02772 7.18945 7.77716 7.4969 7.77716H9.1739L11.5737 5.16264ZM13.6459 7.22159V6.11044C15.8037 6.11044 17.5589 7.85549 17.5589 9.99944C17.5589 12.1445 15.8037 13.8884 13.6459 13.8884V12.7773C15.1871 12.7773 16.4409 11.5312 16.4409 9.99944C16.4409 8.46829 15.1871 7.22159 13.6459 7.22159ZM15.3229 9.99944C15.3229 9.08108 14.5705 8.33273 13.6459 8.33273V9.44387C13.9539 9.44387 14.2049 9.69332 14.2049 9.99944C14.2049 10.3056 13.9539 10.555 13.6459 10.555V11.6662C14.5705 11.6662 15.3229 10.9189 15.3229 9.99944Z"}))}d.displayName="SpeakMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Separator=c,t.Button=p,t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(61)),l=u(n(7825));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.className;return f("div",{className:(0,o.default)(t,l.default.separator)})}function p(e){var t,n=e.onClick,r=e.onContextMenu,u=e.className,s=e.selected,f=void 0!==s&&s,c=e.children,p=e.disabled,v=void 0!==p&&p,y=e.dangerous,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick","onContextMenu","className","selected","children","disabled","dangerous"]);return a.createElement(i.default,d({onClick:v?void 0:n,onContextMenu:v?void 0:r,className:(0,o.default)(u,(t={},t[l.default.button]=!0,t[l.default.selected]=f,t[l.default.disabled]=v,t[l.default.dangerous]=y,t))},m),c)}function v(e){var t=e.className,n=e.children;return f("div",{className:(0,o.default)(t,l.default.wrapper)},void 0,n)}c.displayName="Separator",p.displayName="Button",v.displayName="MiniPopover";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,a){var o=e.message,i=e.compact,u=e.channel,s=e.groupId,d=n.usernameProfile,f=n.avatarProfile;if((0,l.default)(o))return null;var c=o.id===s;return c||i||null!=r?v(y,{message:o,channel:u,compact:i,subscribeToGroupId:s,isGroupStart:c,groupId:s,setPopout:t,usernameProfile:d,avatarProfile:f,repliedMessage:a}):v(m,{compact:!0,timestamp:o.timestamp,isInline:!1,isVisibleOnlyOnHover:!0,cozyAlt:!0})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(8918)),i=c(n(8443)),l=c(n(685)),u=c(n(682)),s=c(n(9050)),d=n(8542),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=a.memo((function(e){var t=e.message,n=e.channel,r=e.compact,i=void 0!==r&&r,l=e.groupId,c=e.isGroupStart,p=e.usernameProfile,y=e.avatarProfile,m=e.setPopout,_=e.repliedMessage,h=(0,d.useContextMenuUser)(t.author.id,n.id),E=(0,d.useClickMessageAuthorUsername)(t,n,p,m),g=(0,d.useClickMessageAuthorAvatar)(y,m),S=a.useCallback((function(){return m({usernameProfile:!1,avatarProfile:!1,referencedUsernameProfile:!1})}),[m]),O=(0,u.default)(t);return v(o.default,{guildId:n.guild_id,message:t,repliedMessage:_,author:O,compact:i,subscribeToGroupId:l,showTimestampOnHover:!c&&i&&t.type!==f.MessageTypes.REPLY,renderPopout:s.default,showAvatarPopout:y,showUsernamePopout:p,onClickAvatar:g,onClickUsername:E,onContextMenu:h,onPopoutRequestClose:S})})),m=a.memo(i.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(55)),i=v(n(1175)),l=v(n(149)),u=v(n(47)),s=v(n(24)),d=n(8643),f=n(1),c=v(n(6)),p=v(n(7827));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(){return _(o.default,{align:o.default.Align.CENTER,justify:o.default.Justify.CENTER,direction:o.default.Direction.VERTICAL,className:p.default.popout},void 0,_("img",{alt:"",src:(0,d.getPublicSystemMessageAvatar)(),className:p.default.avatar}),_(o.default,{align:o.default.Align.CENTER,justify:o.default.Justify.CENTER,className:p.default.nameWrapper},void 0,_(l.default,{text:c.default.Messages.STAFF_BADGE_TOOLTIP},void 0,(function(e){return a.createElement(i.default,m({color:f.Colors.BRAND,size:16},e),_("div",{className:p.default.staffBadge}))})),_(u.default,{className:p.default.header,size:s.default.Sizes.SIZE_16},void 0,c.default.Messages.ANNOUNCEMENT_GUILD_POPOUT_NAME)),_(s.default,{className:p.default.description,color:s.default.Colors.HEADER_SECONDARY},void 0,c.default.Messages.ANNOUNCEMENT_GUILD_DESCRIPTION),_(s.default,{className:p.default.description,color:s.default.Colors.HEADER_SECONDARY},void 0,c.default.Messages.ANNOUNCEMENT_GUILD_HERE_TO_HELP))};h.displayName="PublicGuildAnnouncementPopout";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e.message,a=e.channel;return n?O(C,{channel:a,message:r}):O(p.default,{message:r,content:t})};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(390)),l=g(n(8487)),u=g(n(8391)),s=g(n(11)),d=g(n(8333)),f=g(n(15)),c=g(n(40)),p=g(n(8515)),v=g(n(10116)),y=n(121),m=n(99),_=n(8381),h=n(1),E=g(n(7343));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}function T(e){var t=e.value,n=e.channel;return(0,_.applyChatRestrictions)({target:null,type:h.TextareaTypes.EDIT,content:t,channel:n,restrictMentions:!1,respectCooldown:!1})}function C(e){var t=e.channel,n=e.message,r=t.id,u=n.id,p=t.getGuildId(),y=(0,o.useStateFromStores)([f.default],(function(){return f.default.getGuild(p)}),[p]),_=t.type===h.ChannelTypes.GUILD_ANNOUNCEMENT,g=null!=y&&y.hasFeature(h.GuildFeatures.NEWS),S=_&&g,O=(0,o.useStateFromStoresObject)([d.default],(function(){return{editingMessage:d.default.getEditingMessage(r),editingTextValue:d.default.getEditingTextValue(r),editingRichValue:d.default.getEditingRichValue(r)}}),[r,u]),C=O.editingMessage,M=O.editingTextValue,N=O.editingRichValue,A=(0,o.useStateFromStores)([s.default],(function(){return s.default.getId()})),P=a.useCallback((function(e,n,r){var a=r.content,o=c.default.can(h.Permissions.MANAGE_MESSAGES,t),u=null!=C&&null!=C.author?C.author.id:null;S&&(u===A||o)&&null!=C&&(0,m.hasFlag)(C.flags,h.MessageFlags.CROSSPOSTED)?l.default.confirmEdit(e,n,a):i.default.editMessage(e,n,{content:a})}),[C,S,A,t]),R=a.useCallback((function(e){return a.createElement(b,I({},e,{className:E.default.channelTextArea,key:u}))}),[u]);return null!=M&&null!=N?a.createElement(v.default,{ref:void 0,channel:t,message:n,textValue:M,richValue:N,onCancel:i.default.endEditMessage,onChange:i.default.updateEditMessage,onConfirmDelete:l.default.confirmDelete,saveMessage:P,validateEdit:T},R):null}function b(e){var t=e.textValue,n=e.richValue,r=e.message,o=e.channel,i=e.onChange,l=e.onSubmit,s=e.onKeyDown,d=a.useState(!0),f=d[0],c=d[1],p=a.useCallback((function(){return c(!0)}),[]),v=a.useCallback((function(){return c(!1)}),[]);return a.useEffect((function(){return y.ComponentDispatch.subscribe(h.ComponentActions.TEXTAREA_FOCUS,p),y.ComponentDispatch.subscribe(h.ComponentActions.TEXTAREA_BLUR,v),function(){y.ComponentDispatch.unsubscribe(h.ComponentActions.TEXTAREA_FOCUS,p),y.ComponentDispatch.unsubscribe(h.ComponentActions.TEXTAREA_BLUR,v)}}),[p,v]),O(u.default,{className:E.default.channelTextArea,textValue:t,richValue:n,channel:o,type:h.TextareaTypes.EDIT,onChange:i,onSubmit:l,onKeyDown:s,focused:f,onFocus:p,onBlur:v},r.id)}b.displayName="MessageEditorInner"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(1216)),i=n(1),l=s(n(6)),u=s(n(7828));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){e.stopPropagation()}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).node=a.createRef(),t.onClickSave=function(){var e=t.props.textValue;t.onSubmit(e)},t.onSubmit=function(e){var n=t.props,r=n.message,a=n.channel,i=n.onConfirmDelete,l=n.onCancel,u=n.saveMessage,s=n.validateEdit;return 0===e.length?(i(a,r),l(a.id),Promise.resolve({shouldClear:!1,shouldRefocus:!1})):s({value:e,channel:a}).then((function(n){if(!n.valid)return Promise.resolve({shouldClear:!1,shouldRefocus:!1});var r=o.default.parse(t.props.channel,e,!0);return r.content!==t.props.message.content&&u(t.props.channel.id,t.props.message.id,r),l(a.id),Promise.resolve({shouldClear:!0,shouldRefocus:!0})}))},t.onChange=function(e,n,r){var a=t.props,o=a.channel;(0,a.onChange)(o.id,n,r)},t.onKeyDown=function(e){if(e.keyCode===i.KeyboardKeys.ESCAPE&&!e.shiftKey){var n=t.props,r=n.channel,a=n.onCancel;e.preventDefault(),a(r.id)}},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e=this.props,t=e.className,n=e.textValue,r=e.richValue,o=e.message,i=e.channel,s=e.onCancel,d=e.children;return a.createElement("div",{className:t,ref:this.node,onContextMenu:p},d({textValue:n,richValue:r,message:o,channel:i,onChange:this.onChange,onSubmit:this.onSubmit,onKeyDown:this.onKeyDown}),f("div",{className:u.default.operations},void 0,l.default.Messages.EDIT_TEXTAREA_HELP.format({onCancel:function(){return s(i.id)},onSave:this.onClickSave})))},r}(a.PureComponent);t.default=v,v.displayName="MessageEditor"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e.message,a=e.channel,o=e.compact,i=n.interactionUsernameProfile,l=n.interactionAvatarProfile,u=n.interactionData;return null!=r.interaction?f(c,{message:r,channel:a,compact:o,setPopout:t,interactionUsernameProfile:i,interactionAvatarProfile:l,interactionData:u}):null};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=s(n(70)),l=s(n(10118)),u=n(8542);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=a.memo((function(e){var t,n=e.message,r=e.channel,s=e.compact,d=void 0!==s&&s,c=e.interactionUsernameProfile,p=e.interactionAvatarProfile,v=e.interactionData,y=e.setPopout,m=(0,o.useStateFromStores)([i.default],(function(){return null!=n.interaction&&i.default.isBlocked(n.interaction.user.id)}),[n.interaction]),_=(0,u.useContextMenuUser)(null===(t=n.interaction)||void 0===t?void 0:t.user.id,r.id),h=(0,u.useClickInteractionUserUsername)(n.interaction,r,c,y),E=(0,u.useClickInteractionUserAvatar)(p,y),g=(0,u.useClickInteractionCommandName)(v,y),S=a.useCallback((function(){return y({interactionUsernameProfile:!1,interactionAvatarProfile:!1,interactionData:!1})}),[y]);return f(l.default,{message:n,channel:r,content:"ExecutedCommand",compact:d,isInteractionUserBlocked:m,showAvatarPopout:p,showUsernamePopout:c,showDataPopout:v,onClickAvatar:E,onClickUsername:h,onClickCommand:g,onUserContextMenu:_,onPopoutRequestClose:S})}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(5)),l=n(682),u=h(n(8644)),s=h(n(8268)),d=h(n(61)),f=h(n(278)),c=h(n(150)),p=n(1161),v=h(n(10119)),y=h(n(8641)),m=h(n(6)),_=h(n(7341));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.width,n=void 0===t?6:t,r=e.height,a=void 0===r?10:r,o=e.color,i=void 0===o?"currentColor":o;return S("svg",{className:e.className,width:n,height:a,viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,S("path",{d:"M4.61241 0L6 0.845294L1.38759 10L0 9.15471L4.61241 0Z",className:e.foreground,fill:i}))}function I(e,t,n,r,a,i){var l;return S("img",{alt:"",src:null!=n?n:e.getAvatarURL(t),onClick:r,onContextMenu:a,onMouseDown:i,className:(0,o.default)((l={},l[_.default.executedCommandAvatar]=!0,l[_.default.clickable]=null!=r,l))})}function T(e,t,n){var r,a=e.message,o=e.showUsernamePopout,i=e.onClickUsername,l=e.onUserContextMenu,u=e.onPopoutRequestClose;return S(y.default,{compact:!0,author:t,message:a,userOverride:null===(r=a.interaction)||void 0===r?void 0:r.user,showPopout:o,renderPopout:n,onClick:i,onContextMenu:l,onPopoutRequestClose:u,hideTag:!0})}function C(e,t){var n=e.showDataPopout,r=e.message,i=e.onClickCommand,l=e.onPopoutRequestClose;return S(f.default,{renderPopout:t,shouldShow:n,position:f.default.Positions.TOP,align:f.default.Align.CENTER,onRequestClose:l,animation:f.default.Animation.FADE,positionKey:null!=r.interactionData?"ready":"loading"},void 0,(function(e){e.onClick;var t=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick"]);return a.createElement(d.default,g({},t,{tag:"span",onClick:i}),S("div",{className:(0,o.default)(_.default.commandName,_.default.clickable)},void 0,"/"+r.interaction.name))}))}function b(e){var t,n=e.message,r=e.channel,d=a.useMemo((function(){return function(e,t){return null!=r&&null!=t?a.createElement(s.default,g({},e,{channelId:r.id,guildId:r.guild_id,userId:t.id})):null}}),[r]),y=a.useMemo((function(){return function(e){return null!=r?a.createElement(v.default,g({},e,{channel:r,messageId:n.id,interactionData:n.interactionData})):null}}),[r,n.id,n.interactionData]),h=(0,l.useNullableUserAuthor)(null===(t=n.interaction)||void 0===t?void 0:t.user,r),E=a.useMemo((function(){return e.compact?(0,u.default)((0,p.dateFormat)((0,i.default)(),"LT")):null}),[e.compact]);if(null==n.interaction||null==h)return null;var b=function(e,t){var n,r=e.message,a=e.compact,o=e.channel,i=e.isInteractionUserBlocked,u=e.showAvatarPopout,s=e.onClickAvatar,d=e.onUserContextMenu,p=e.onPopoutRequestClose;if(a||i)return S("div",{className:_.default.replyBadge},void 0,S(O,{className:_.default.commandIcon}));if(null!=r.interaction){var v,y,m,h=(0,l.getUserAuthor)(r.interaction.user,o);n=null!==(v=c.default.getGuildMemberAvatarURL({guildMemberAvatar:null!==(y=h.guildMemberAvatar)&&void 0!==y?y:void 0,userId:r.interaction.user.id,guildId:null!==(m=null==o?void 0:o.guild_id)&&void 0!==m?m:""}))&&void 0!==v?v:void 0}var E=function(){return null!=r.interaction&&I(r.interaction.user,o.guild_id,n,s,d)};return null!=t&&null!=u?S(f.default,{renderPopout:t,shouldShow:u,position:f.default.Positions.RIGHT,onRequestClose:p},void 0,E):E()}(e,(function(e){var t;return d(e,null===(t=n.interaction)||void 0===t?void 0:t.user)})),M=T(e,h,(function(e){var t;return d(e,null===(t=n.interaction)||void 0===t?void 0:t.user)})),N=C(e,y),A=S(a.Fragment,{},"user",b,M),P=S(a.Fragment,{},"command",N),R=m.default.Messages.APPLICATION_COMMAND_USED_SHORT.format({userHook:function(){return A},commandHook:function(){return P}});return S("div",{className:(0,o.default)(_.default.repliedMessage,_.default.executedCommand,E),"aria-hidden":!e.compact},void 0,R)}O.displayName="CommandIcon",I.displayName="baseRenderUserAvatar",T.displayName="renderUsername",C.displayName="renderCommand",b.displayName="ExecutedCommand"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=S(n(0)),o=E(n(9)),i=n(3),l=n(8260),u=n(8278),s=S(n(8612)),d=n(682),f=n(8310),c=E(n(10)),p=E(n(15)),v=E(n(12)),y=E(n(8426)),m=E(n(151)),_=E(n(24)),h=E(n(7829));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function I(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var b={tag:"span",size:_.default.Sizes.SIZE_16,color:_.default.Colors.HEADER_SECONDARY},M={className:(0,o.default)("mention",h.default.mention)};function N(e,t,n,r){var o,i,s=null!=r?r+" "+e.name:e.name;if(e.type===l.ApplicationCommandOptionType.SUB_COMMAND||e.type===l.ApplicationCommandOptionType.SUB_COMMAND_GROUP){for(var p,m=[C(a.Fragment,{},s," ",a.createElement(_.default,b,e.name))],h=I(null!==(E=e.options)&&void 0!==E?E:[]);!(p=h()).done;){var E,g=p.value;m=m.concat(N(g,t,n,s))}return m}if(null!=e.value)switch(e.type){case l.ApplicationCommandOptionType.USER:var S=e.value.toString(),T=v.default.getUser(S);if(null!=T){var A=(0,d.getUserAuthor)(T,t);o=a.createElement(y.default,O({},M,{onClick:function(){return(0,f.openUserProfileModal)({userId:T.id,guildId:t.guild_id||void 0})}}),u.MENTION_SENTINEL,A.nick)}break;case l.ApplicationCommandOptionType.CHANNEL:var P=e.value.toString(),R=c.default.getChannel(P);null!=R&&(o=a.createElement(y.default,M,u.CHANNEL_SENTINEL,R.name));break;case l.ApplicationCommandOptionType.ROLE:var L=e.value.toString(),D=null!=(null==n?void 0:n.roles)?n.roles[L]:null;null!=D&&(o=a.createElement(y.default,M,u.MENTION_SENTINEL,D.name));break;case l.ApplicationCommandOptionType.MENTIONABLE:var w=e.value.toString(),j=null!=(null==n?void 0:n.roles)?n.roles[w]:null;if(null!=j)o=C(y.default,{},void 0,u.MENTION_SENTINEL,j.name);else{var k=v.default.getUser(w);if(null!=k){var U=(0,d.getUserAuthor)(k,t);o=a.createElement(y.default,O({},M,{onClick:function(){return(0,f.openUserProfileModal)({userId:k.id,guildId:t.guild_id||void 0})}}),u.MENTION_SENTINEL,U.nick)}}}null==o&&(o=a.createElement(_.default,O({},b,{color:_.default.Colors.HEADER_PRIMARY}),null===(i=e.value)||void 0===i?void 0:i.toString()));return[C(a.Fragment,{},s,a.createElement(_.default,b," ",e.name,": "),o)]}function A(e){var t,n=e.channel,r=e.messageId,o=e.interactionData,l=(0,i.useStateFromStores)([p.default],(function(){return p.default.getGuild(n.guild_id)}),[n.guild_id]);if(a.useEffect((function(){null==o&&s.fetchMessageInteractionData(n.id,r)}),[n.id,r,o]),null==o)t=C(m.default,{type:m.default.Type.SPINNING_CIRCLE,className:h.default.spinner});else{for(var u,d=[],f=I(null!==(c=o.options)&&void 0!==c?c:[]);!(u=f()).done;){var c,v=u.value;d=d.concat(N(v,n,l,null))}t=a.createElement(a.Fragment,null,a.createElement(_.default,b,"/",o.name),d)}return C("div",{className:h.default.container},void 0,C("div",{className:h.default.tooltip},void 0,t),C("div",{className:h.default.tooltipPointer}))}A.displayName="ExecutedCommandPopout";var P=a.memo(A);t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){var i=e.message,l=e.channel,u=e.compact,s=n.referencedUsernameProfile,d=n.referencedAvatarProfile,f=i.type===y.MessageTypes.REPLY&&null!=r&&h(E,{baseMessage:i,replyReference:r,referencedMessage:o,channel:l,compact:u,setPopout:t,referencedUsernameProfile:s,referencedAvatarProfile:d});return a.createElement(a.Fragment,null,f)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(718),l=n(706),u=m(n(70)),s=m(n(8442)),d=m(n(8659)),f=m(n(8361)),c=n(682),p=m(n(9050)),v=n(8542),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=a.memo((function(e){var t=e.baseMessage,n=e.referencedMessage,r=e.channel,m=e.compact,_=void 0!==m&&m,E=e.referencedUsernameProfile,g=e.referencedAvatarProfile,S=e.setPopout,O=n.state===l.ReferencedMessageState.LOADED?n.message:void 0,I=a.useMemo((function(){return null!=O&&O.type===y.MessageTypes.USER_JOIN?(0,i.astToString)(d.default.getSystemMessageUserJoin(O.id).astFormat({username:O.author.username,usernameOnClick:y.NOOP})):null!=O&&O.content?(0,f.default)(O,{formatInline:!0}).content:null}),[O]),T=(0,o.useStateFromStores)([u.default],(function(){return null!=O&&u.default.isBlocked(O.author.id)}),[O]),C=(0,v.useContextMenuUser)(null==O?void 0:O.author.id,r.id),b=(0,v.useClickReply)(t,O,T),M=(0,v.useClickReferencedMessageAuthorUsername)(O,r,E,S),N=(0,v.useClickReferencedMessageAuthorAvatar)(g,S),A=a.useCallback((function(){return S({referencedUsernameProfile:!1,referencedAvatarProfile:!1})}),[S]),P=(0,c.useNullableMessageAuthor)(O),R=(0,c.useNullableMessageAuthor)(t);return h(s.default,{author:P,baseMessage:t,baseAuthor:R,referencedMessage:n,content:I,compact:_,isReplyAuthorBlocked:T,showAvatarPopout:g,showUsernamePopout:E,renderPopout:p.default,onClickAvatar:N,onClickUsername:M,onClickReply:b,onContextMenu:C,onPopoutRequestClose:A})}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.offsetTop,r=e.offsetParent;for(;null!=r&&r!==t&&r instanceof HTMLElement;)n+=r.offsetTop||0,r=r.offsetParent||null;return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r=e.channel,l=e.messages,y=e.unreadCount,I=e.showNewMessagesBar,R=e.messageDisplayCompact,L=e.channelStream,D=e.uploads,F=e.scrollManager,B=e.specs,H=e.viewingRolesMessageHistoryHackTimestamp,x=v.default.getCurrentUser(),V=function(){return F.isInitialized()||l.ready},W=(0,S.useShowConvoStarterInDM)(r),Y=L.map((function(e,t){if(e.type===A.ChannelStreamTypes.DIVIDER){var n=null!=e.unreadId;return null!=H?null:j(C.default,{isUnread:n,isBeforeGroup:null==e.content&&k(L[t+1]),id:n?_.NEW_MESSAGE_BAR_ID:void 0},"divider-"+(e.contentKey||e.unreadId||t),e.content)}if(e.type===A.ChannelStreamTypes.MESSAGE_GROUP_BLOCKED)return j(O.default,{unreadId:_.NEW_MESSAGE_BAR_ID,messages:e,channel:r,compact:R},e.key);if(!(null!=H&&H>1e3*e.content.timestamp.unix())){var a=c.default.can(A.Permissions.CREATE_INSTANT_INVITE,r);if(!(0,E.default)(e.content,a))return j(e.type===A.ChannelStreamTypes.THREAD_STARTER_MESSAGE?T.ThreadStarterChatMessage:T.default,{compact:R,channel:r,message:e.content,groupId:e.groupId,flashKey:e.flashKey,id:(0,h.getMessageDOMId)(e.content.id)},e.content.id)}})),z=L[L.length-1];if(D.forEach((function(e,t){var n=0===t&&(0,g.isNewGroupItem)(z,new f.default({type:A.MessageTypes.DEFAULT,author:x}));Y.push(j(U,{file:e,channel:r,user:x,isGroupStart:n},"upload-"+e.id))})),l.hasMoreBefore){l.length>0&&Y.unshift(j("div",{style:{height:_.PLACEHOLDER_BUFFER,flex:"0 0 auto"}},"buffer"));var K=u.default.useReducedMotion;(K&&V()||!K)&&Y.unshift(a.createElement(M.default,w({key:"has-more",compact:R},B)))}l.hasMoreBefore||Y.unshift(j(s.default,{channel:r},"empty-message"));l.hasMoreAfter&&Y.push(a.createElement(M.default,w({key:"has-more-after",compact:R},B)));W&&V()&&Y.push(j(N.default,{channel:r}));if(y>0&&I&&V()){var $,Z=p.default.getOldestUnreadTimestamp(r.id),q=(0,m.isSameDay)((0,o.default)(),(0,o.default)(new Date(Z)));$=p.default.isEstimated(r.id)?q?P.default.Messages.NEW_MESSAGES_ESTIMATED:P.default.Messages.NEW_MESSAGES_ESTIMATED_WITH_DATE:q?P.default.Messages.NEW_MESSAGES:P.default.Messages.NEW_MESSAGES_WITH_DATE,t=j(b.NewMessagesBar,{content:$.format({count:y,timestamp:Z}),channelId:r.id})}if(l.error)n=j(b.ErrorLoadingBar,{loading:l.loadingMore,onClick:function(){return e=r.id,void i.default.fetchMessages({channelId:e,limit:A.MAX_MESSAGES_PER_CHANNEL,truncate:!0});var e}});else if(l.hasMoreAfter&&V()){var X=l.jumpReturnTargetId;n=l.loadingMore&&l.jumpedToPresent?G:j(b.JumpToPresentBar,null!=X?{type:b.JumpBarType.REPLY,onClick:function(){return function(e,t){i.default.jumpToMessage({channelId:e.id,messageId:t,flash:!0})}(r,X)}}:{onClick:function(){return function(e){i.default.jumpToPresent(e.id,A.MAX_MESSAGES_PER_CHANNEL),(0,d.transitionToGuild)(e.getGuildId()||A.ME,e.id)}(r)}})}return{channelStreamMarkup:Y,newMessagesBar:t,jumpToPresentBar:n}};var r,a=D(n(0)),o=R(n(5)),i=R(n(390)),l=R(n(8558)),u=R(n(105)),s=R(n(10123)),d=n(42),f=R(n(1307)),c=R(n(40)),p=R(n(200)),v=R(n(12)),y=n(8904),m=n(1161),_=n(1254),h=n(8541),E=R(n(8590)),g=n(8667),S=n(10132),O=R(n(10133)),I=R(n(8375)),T=D(n(8707)),C=R(n(9053)),b=n(8308),M=R(n(9045)),N=R(n(10134)),A=n(1),P=R(n(6));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(e){return null!=e&&e.type===A.ChannelStreamTypes.MESSAGE&&e.content.id===e.groupId}var U=a.memo((function(e){var t=e.file,n=e.channel,r=e.user,a=e.isGroupStart;return j(I.default,{isGroupStart:a,channel:n,message:new f.default({id:t.id,key:"pending-upload-"+t.id,type:A.MessageTypes.DEFAULT,author:r,channel_id:n.id,customRenderedContent:{hasSpoilerEmbeds:!1,content:j(y.AttachmentUpload,{filename:t.name,progress:null!=t.progress?t.progress:0,size:t.size,onCancelUpload:function(){l.default.cancel(t)}})}})})})),G=j(b.JumpToPresentBar,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=C(n(0)),o=n(3),i=I(n(2)),l=n(1150),u=I(n(180)),s=n(8574),d=I(n(8363)),f=n(31),c=I(n(86)),p=I(n(40)),v=I(n(10124)),y=C(n(8373)),m=I(n(10125)),_=I(n(10126)),h=I(n(10129)),E=I(n(10130)),g=I(n(9218)),S=n(1),O=I(n(6));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e){var t=e.canManageRoles,n=e.channel,r=t&&(0,s.isPrivateGuildChannel)(n),a=(0,o.useStateFromStores)([c.default],(function(){return null!=n.guild_id&&n===c.default.getDefaultChannel(n.guild_id)}),[n]);return f.THREAD_CHANNEL_TYPES.has(n.type)?b(E.default,{channel:n}):b(a?g.default:r?_.default:h.default,{channel:n})}function N(e){var t=e.channel,n=(0,u.default)(t),r=t.type,s=t.getRecipientId(),f=(0,o.useStateFromStoresObject)([p.default],(function(){return{canManageRoles:p.default.can(S.Permissions.MANAGE_ROLES,t),canReadMessageHistory:p.default.can(S.Permissions.READ_MESSAGE_HISTORY,t)}})),c=f.canManageRoles,_=f.canReadMessageHistory,h=(0,o.useStateFromStores)([d.default],(function(){return r===S.ChannelTypes.DM?d.default.getMutualGuilds(s):null}),[r,s]);return a.useEffect((function(){r===S.ChannelTypes.DM&&null==h&&i.default.wait((function(){return(0,l.fetchProfile)(s,{withMutualGuilds:!0})}))}),[h,r,s]),t.isSystemDM()?b(m.default,{channel:t},void 0,O.default.Messages.SYSTEM_DM_EMPTY_MESSAGE):r===S.ChannelTypes.DM?b(m.default,{channel:t},void 0,O.default.Messages.BEGINNING_DM.format({username:n}),b(v.default,{userId:s})):t.isMultiUserDM()?t.isManaged()?b(y.default,{channelId:t.id},void 0,b(y.EmptyMessageHeader,{},void 0,O.default.Messages.BEGINNING_CHANNEL_WELCOME.format({channelName:n})),b(y.EmptyMessageBody,{},void 0,O.default.Messages.BEGINNING_GROUP_DM_MANAGED)):b(m.default,{channel:t},void 0,O.default.Messages.BEGINNING_GROUP_DM.format({name:n})):_?b(M,{channel:t,canManageRoles:c}):b(y.default,{channelId:t.id},void 0,b(y.EmptyMessageBody,{},void 0,O.default.Messages.BEGINNING_CHANNEL_NO_HISTORY.format({channelName:n})))}M.displayName="TextChannelEmptyMessageWrapper",N.displayName="EmptyMessages"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(1217)),l=n(8433),u=g(n(8363)),s=n(8310),d=g(n(70)),f=g(n(12)),c=g(n(29)),p=g(n(61)),v=g(n(248)),y=g(n(24)),m=g(n(150)),_=n(1),h=g(n(6)),E=g(n(7830));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t=e.userId,n=(0,o.useStateFromStores)([u.default],(function(){return u.default.getMutualGuilds(t)}),[t]),r=a.useMemo((function(){return null!=n?n.slice(0,3).map((function(e,t){var r=e.guild,a=null!=r?m.default.getGuildIconURL({id:r.id,icon:r.icon,size:24}):null;if(null==a)return null;var o=t===(n.length>3?3:n.length)-1,i=O("img",{src:a,alt:"",className:E.default.avatar},t);return o?i:O(v.default,{className:E.default.avatarMask,mask:v.default.Masks.VOICE_USER_SUMMARY_ITEM,width:24,height:24},t,i)})).filter((function(e){return null!=e})):[]}),[n]);if(null==n||0===n.length)return O(y.default,{color:y.default.Colors.HEADER_SECONDARY},void 0,h.default.Messages.NO_MUTUAL_GUILDS);return a.createElement(a.Fragment,null,O("div",{className:E.default.avatarContainer},void 0,r),O(p.default,{onClick:function(){(0,s.openUserProfileModal)({userId:t,section:l.UserProfileSections.MUTUAL_GUILDS})}},void 0,O(y.default,{className:E.default.mutualGuilds},void 0,h.default.Messages.USER_PROFILE_MUTUAL_GUILDS.format({count:n.length}))))},T=function(e){var t,n=e.relationshipType,r=e.userId,o=null===(t=f.default.getUser(r))||void 0===t?void 0:t.bot,l=function(){i.default.removeRelationship(r,{location:_.AnalyticsPages.DM_CHANNEL})},u=function(){i.default.addRelationship(r,{location:_.AnalyticsPages.DM_CHANNEL})},s=O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,color:c.default.Colors.PRIMARY,onClick:function(){i.default.addRelationship(r,{location:_.AnalyticsPages.DM_CHANNEL},_.RelationshipTypes.BLOCKED)}},void 0,h.default.Messages.BLOCK);switch(n){case _.RelationshipTypes.NONE:return a.createElement(a.Fragment,null,!o&&O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,onClick:u},void 0,h.default.Messages.ADD_FRIEND),s);case _.RelationshipTypes.FRIEND:return a.createElement(a.Fragment,null,O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,onClick:l,color:c.default.Colors.PRIMARY},void 0,h.default.Messages.REMOVE_FRIEND),s);case _.RelationshipTypes.BLOCKED:return O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,onClick:l,color:c.default.Colors.PRIMARY},void 0,h.default.Messages.UNBLOCK);case _.RelationshipTypes.PENDING_INCOMING:return a.createElement(a.Fragment,null,O(y.default,{className:E.default.action,color:y.default.Colors.HEADER_SECONDARY},void 0,h.default.Messages.FRIEND_REQUEST_RECEIVED),O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,onClick:u},void 0,h.default.Messages.FRIEND_REQUEST_ACCEPT),O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,color:c.default.Colors.PRIMARY,onClick:l},void 0,h.default.Messages.FRIEND_REQUEST_IGNORE),s);case _.RelationshipTypes.PENDING_OUTGOING:return a.createElement(a.Fragment,null,O(c.default,{className:E.default.action,size:c.default.Sizes.TINY,disabled:!0},void 0,h.default.Messages.ADD_FRIEND_BUTTON_AFTER),s);default:return null}},C=function(e){var t=e.userId,n=(0,o.useStateFromStores)([d.default],(function(){return d.default.getRelationshipType(t)}),[t]);return O("div",{className:E.default.container},void 0,O(I,{userId:t}),O("div",{className:E.default.divider}),O(T,{relationshipType:n,userId:t}))};C.displayName="DMRelationshipStatus";var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=f(n(0)),o=n(5937),i=s(n(180)),l=s(n(279)),u=f(n(8373));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t,n=e.channel,r=e.children,s=a.useState(!1),d=s[0],f=s[1],p=null!==(t=(0,i.default)(n))&&void 0!==t?t:"";return c(u.default,{channelId:n.id,onMouseEnter:function(){return f(!0)},onMouseLeave:function(){return f(!1)}},void 0,c(l.default,{"aria-label":p,size:l.default.Sizes.SIZE_80,src:(0,o.getChannelIconURL)(n,d)}),c(u.EmptyMessageHeader,{},void 0,p),c(u.EmptyMessageBody,{},void 0,r))}p.displayName="PrivateChannelEmptyMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=H;var r,a=j(n(0)),o=D(n(9)),i=D(n(8)),l=D(n(63)),u=n(202),s=n(3),d=D(n(8330)),f=D(n(8254)),c=n(286),p=D(n(180)),v=D(n(8482)),y=D(n(8295)),m=D(n(15)),_=D(n(40)),h=D(n(12)),E=D(n(1215)),g=D(n(696)),S=D(n(35)),O=D(n(279)),I=D(n(10127)),T=D(n(9051)),C=D(n(24)),b=D(n(78)),M=D(n(9052)),N=j(n(8373)),A=D(n(10128)),P=n(1),R=D(n(6)),L=D(n(7835));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var G=U(g.default,{width:16,height:16}),F=U(E.default,{width:16,height:16}),B=U(N.EmptyMessageIcon,{locked:!0});function H(e){var t=e.channel,n=a.useState(!1),r=n[0],E=n[1],g=(0,p.default)(t,!0),D=(0,s.useStateFromStores)([m.default],(function(){return m.default.getGuild(t.guild_id)})),w=(0,s.useStateFromStores)([h.default],(function(){return h.default.getUser(null==D?void 0:D.ownerId)})),j=a.useMemo((function(){return null!=D?(0,i.default)(D.roles).sortBy((function(e){return-e.position})).filter((function(e){return e.id!==D.id})).value():[]}),[D]),H=a.useMemo((function(){return(0,i.default)(j).filter((function(e){var n;if(null==D)return!1;var r=b.default.computePermissionsForRoles(((n={})[e.id]=e,n),t);return l.default.has(r,P.Permissions.ADMINISTRATOR)||l.default.has(r,P.Permissions.VIEW_CHANNEL)})).value()}),[t,D,j]),x=(0,s.useStateFromStoresArray)([h.default],(function(){var e={};null!=w&&(e[w.id]=w);for(var n=0,r=Object.values(t.permissionOverwrites);n<r.length;n++){var a=r[n];if(a.type===c.PermissionOverwriteType.MEMBER&&null==e[a.id]){var o=h.default.getUser(a.id);null!=o&&(e[o.id]=o)}}return(0,i.default)(e).filter((function(e){var n,r=b.default.can(P.Permissions.ADMINISTRATOR,e,t),a=null!==(n=t.permissionOverwrites[e.id])&&void 0!==n?n:b.default.NONE,o=l.default.has(a.allow,P.Permissions.VIEW_CHANNEL);return r||o})).value()}),[t,w]),V=_.default.can(P.Permissions.MANAGE_CHANNELS,t)||_.default.can(P.Permissions.MANAGE_ROLES,t);function W(){d.default.open(t.id)}var Y=a.useCallback((function(){return E(!1)}),[]);return U(N.default,{channelId:t.id},void 0,B,U(N.EmptyMessageHeader,{},void 0,R.default.Messages.BEGINNING_CHANNEL_WELCOME.format({channelName:g})),U(N.EmptyMessageBody,{},void 0,R.default.Messages.BEGINNING_ROLE_REQUIRED_CHANNEL_DESCRIPTION.format({channelName:g,topicHook:function(){return y.default.parseTopic(t.topic,!0,{channelId:t.id})}})),V?U("div",{className:L.default.channelSettingButtons},void 0,U(M.default,{label:R.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE,onClick:function(){return E(!0)},icon:G}),U(M.default,{label:R.default.Messages.EDIT_CHANNEL,onClick:W,icon:F})):null,U("div",{className:L.default.members},void 0,function(){if(1!==x.length||H.length>0)return U(A.default,{guildId:t.guild_id,className:L.default.avatars,maxUsers:5,users:x});var e=x[0],n=e.toString();return U("div",{className:L.default.avatars},void 0,U(O.default,{src:e.getAvatarURL(t.guild_id),"aria-label":n,size:O.default.Sizes.SIZE_24}),U(C.default,{tag:"span",className:L.default.singleUserName,size:C.default.Sizes.SIZE_16},void 0,n)," ",U(C.default,{tag:"span",size:C.default.Sizes.SIZE_16,color:C.default.Colors.MUTED},void 0,R.default.Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE))}(),H.map((function(e,n){var r,a,i,l=null!==(r=e.colorString)&&void 0!==r?r:(0,u.int2hex)(P.DEFAULT_ROLE_COLOR);return V?U(I.default,{className:(0,o.default)(L.default.role,(a={},a[L.default.last]=n===H.length-1,a)),roleName:e.name,roleColor:l,disabled:!V,onClick:function(){f.default.open(t.guild_id,P.GuildSettingsSections.MEMBERS),f.default.selectRole(e.id)}},e.id):U(T.default,{className:(0,o.default)(L.default.role,(i={},i[L.default.last]=n===H.length-1,i)),roleName:e.name,roleColor:l},e.id)}))),r?U(S.default,{renderModal:function(e){return a.createElement(v.default,k({},e,{onClose:Y,channelId:t.id}))},onCloseRequest:function(){return E(!1)}}):null)}H.displayName="RoleRequiredEmptyMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=s(n(29)),i=s(n(255)),l=s(n(9051)),u=s(n(7832));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.className,n=e.roleColor,r=e.roleName,s=e.hasRemoveIcon,d=void 0!==s&&s,c=e.onClick,p=e.disabled,v=void 0!==p&&p;return f(o.default,{className:(0,a.default)(t,u.default.button),look:o.default.Looks.BLANK,size:o.default.Sizes.NONE,onClick:c,disabled:v},void 0,f(l.default,{className:u.default.role,roleColor:n,roleName:r},void 0,d&&f(i.default,{height:6,width:6,className:u.default.removeRole,foreground:u.default.removeRoleIcon})))}c.displayName="RoleButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=_(n(8)),l=n(389),u=_(n(9143)),s=_(n(8351)),d=_(n(29)),f=_(n(282)),c=_(n(278)),p=n(149),v=_(n(279)),y=_(n(272)),m=_(n(7834));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}function S(e){var t,n,r=e.className,_=e.maxUsers,h=e.users,S=e.guildId,O=a.useState(!1),I=O[0],T=O[1];function C(){return E(f.default,{className:m.default.popoutWrapper},void 0,E(y.default,{className:m.default.scroller},void 0,h.map((function(e){return E(u.default,{guildId:S,user:e,nick:e.toString(),onContextMenu:function(t){return(0,l.openContextMenu)(t,(function(t){return a.createElement(s.default,g({},t,{user:e}))}),{onClose:function(){return T(!1)}})}},e.id)}))))}return h.length<=0?null:E("div",{className:(0,o.default)(r,m.default.avatars)},void 0,(t=(0,i.default)(h).take(_).map((function(e){var t=e.toString();return E(p.TooltipContainer,{text:t,className:m.default.avatar},e.id,E(v.default,{src:e.getAvatarURL(S),"aria-label":t,size:v.default.Sizes.SIZE_24}))})).value(),(n=h.length-_)>0&&(t[t.length-1]=E(c.default,{renderPopout:C,shouldShow:I,position:c.default.Positions.BOTTOM,onRequestClose:function(){return T(!1)}},"overflow",(function(){return E(d.default,{className:(0,o.default)(m.default.avatar,m.default.overflow),onClick:function(){return T(!0)},look:d.default.Looks.BLANK,size:d.default.Sizes.NONE},void 0,"+",n+1)}))),t))}S.displayName="StackedAvatars"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;h(n(0));var r,a=n(3),o=m(n(8330)),i=m(n(180)),l=m(n(8295)),u=n(31),s=m(n(40)),d=m(n(1215)),f=m(n(9052)),c=h(n(8373)),p=n(1),v=m(n(6)),y=m(n(7836));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=E(c.EmptyMessageIcon,{}),S=E(d.default,{width:16,height:16});function O(e){var t=e.channel,n=(0,i.default)(t,!0),r=(0,a.useStateFromStores)([s.default],(function(){return s.default.can(p.Permissions.MANAGE_CHANNELS,t)&&u.EDITABLE_CHANNEL_TYPES.has(t.type)}));return E(c.default,{channelId:t.id},void 0,g,E(c.EmptyMessageHeader,{},void 0,v.default.Messages.BEGINNING_CHANNEL_WELCOME.format({channelName:n})),E(c.EmptyMessageBody,{},void 0,v.default.Messages.BEGINNING_CHANNEL_DESCRIPTION.format({channelName:n,topicHook:function(){return l.default.parseTopic(t.topic,!0,{channelId:t.id})}})),r?E("div",{className:y.default.buttonContainer},void 0,E(f.default,{label:v.default.Messages.EDIT_CHANNEL,onClick:function(){o.default.open(t.id)},icon:S})):null)}O.displayName="TextChannelEmptyMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=C(n(0)),o=I(n(23)),i=n(3),l=n(389),u=I(n(8449)),s=n(8566),d=I(n(9226)),f=I(n(8264)),c=I(n(8268)),p=I(n(56)),v=I(n(12)),y=I(n(61)),m=I(n(278)),_=I(n(8287)),h=I(n(24)),E=C(n(8373)),g=n(1),S=I(n(6)),O=I(n(7405));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(){return(M=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}).apply(this,arguments)}function N(e){var t,n,r=e.userId,u=e.channel,s=(0,i.useStateFromStores)([v.default],(function(){return v.default.getUser(r)})),_=(0,i.useStateFromStores)([p.default],(function(){return null!=r?p.default.getMember(u.guild_id,r):null}));function h(e){if(null==s)return null;(0,l.openContextMenu)(e,(function(e){return a.createElement(d.default,M({},e,{user:s,guildId:u.guild_id,channelId:u.id}))}))}var E=null!==(t=null!==(n=null==_?void 0:_.nick)&&void 0!==n?n:null==s?void 0:s.username)&&void 0!==t?t:"???",g=null==_?void 0:_.colorString;return b(m.default,{preload:null==s?void 0:function(){return(0,f.default)(s.id,s.getAvatarURL(u.guild_id))},renderPopout:function(e){return(0,o.default)(null!=s,"Unexpected missing user"),a.createElement(c.default,M({userId:s.id,guildId:u.guild_id,channelId:u.id},e))},position:m.default.Positions.RIGHT},void 0,(function(e){return a.createElement(y.default,M({},e,{tag:"span",className:O.default.threadCreatorName,style:null!=g?{color:g}:void 0,onContextMenu:h}),E)}))}function A(e){var t=e.channel,n=t.threadMetadata;return null==n?b("div",{style:{marginTop:-8}}):a.createElement(a.Fragment,null,b(h.default,{size:h.default.Sizes.SIZE_16,color:h.default.Colors.HEADER_SECONDARY},void 0,b("div",{className:O.default.subtitle},void 0,S.default.Messages.THREAD_STARTED_BY.format({usernameHook:function(e,n){return b(N,{userId:t.ownerId,channel:t},n)}})),S.default.Messages.BEGINNING_THREAD_ARCHIVE_DESCRIPTION.format({autoArchiveDurationHook:function(e,t){return b("span",{className:O.default.autoArchiveDuration},t,(0,s.getAutoArchiveDurationText)(n.autoArchiveDuration))}})),t.type===g.ChannelTypes.PRIVATE_THREAD?b(h.default,{size:h.default.Sizes.SIZE_16,color:h.default.Colors.HEADER_SECONDARY},void 0,S.default.Messages.EMPTY_MESSAGE_PRIVATE_THREAD_INSTRUCTIONS):null)}function P(e){var t,n=e.channel,r=null!==(t=(0,u.default)(n))&&void 0!==t?t:_.default;return b(E.default,{channelId:n.id},void 0,b("div",{className:O.default.iconWrapper},void 0,b(r,{className:O.default.icon})),b(E.EmptyMessageHeader,{},void 0,n.name),b(A,{channel:n}))}N.displayName="Username",P.displayName="ThreadEmptyMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=a.useMemo((function(){var n;return(n={})[t]=[e.id],n}),[t,e.id]);(0,u.useSubscribeGuildMembers)(r),(0,o.useStateFromStores)([m.default],(function(){return m.default.getGuildVersion(t)}),[t]);var S=(0,o.useStateFromStores)([v.default],(function(){return v.default.getChannel(n)})),O=(0,o.useStateFromStores)([y.default],(function(){return y.default.getGuild(t)}),[t]),C=(0,o.useStateFromStores)([_.default],(function(){return _.default.getNullableCurrentUser()})),b=(0,s.default)(S,"Context Menu"),M=(0,p.useIsThreadModerator)(S);if((null==C?void 0:C.id)===e.id)return[b];if(null==O||null==S||null==C)return[];var N=M||S.ownerId===C.id&&S.type===E.ChannelTypes.PRIVATE_THREAD;return[N?T(d.MenuItem,{id:"remove",label:g.default.Messages.REMOVE_USER_FROM_THREAD.format({user:e.username}),color:f.MenuItemColor.DANGER,action:function(){return c.default.removeMember(S,e.id,"Context Menu")}}):null,m.default.canManageUser(E.Permissions.KICK_MEMBERS,e,O)?T(d.MenuItem,{id:"kick",label:N?g.default.Messages.KICK_USER_FROM_SERVER.format({user:e.username}):g.default.Messages.KICK_USER.format({user:e.username}),color:f.MenuItemColor.DANGER,action:function(){return(0,h.openModal)((function(t){return a.createElement(l.default,I({},t,{guildId:O.id,user:e}))}))}}):null,m.default.canManageUser(E.Permissions.BAN_MEMBERS,e,O)?T(d.MenuItem,{id:"ban",label:N?g.default.Messages.BAN_USER_FROM_SERVER.format({user:e.username}):g.default.Messages.BAN_USER.format({user:e.username}),color:f.MenuItemColor.DANGER,action:function(){return(0,h.openModal)((function(t){return a.createElement(i.default,I({},t,{guildId:O.id,user:e}))}))}}):null]};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=S(n(8604)),l=S(n(8828)),u=n(8298),s=S(n(8639)),d=n(8253),f=n(8256),c=S(n(8265)),p=n(1209),v=S(n(10)),y=S(n(15)),m=S(n(40)),_=S(n(12)),h=n(41),E=n(1),g=S(n(6));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useShowConvoStarterInDM=function(e){var t=e.isDM()&&!e.isSystemDM()&&!e.rawRecipients.some((function(e){return e.bot}));return(0,a.useStateFromStores)([o.default],(function(){if(!t)return!1;var n=o.default.getMessages(e.id);return n.ready&&!n.hasMoreBefore&&!n.hasMoreAfter&&n.length<25&&!o.default.hasCurrentUserSentMessage(e.id)}),[e.id,t])},t.MAX_MESSAGES_ALLOWED_FOR_GREETING=void 0;var r,a=n(3),o=(r=n(201))&&r.__esModule?r:{default:r};t.MAX_MESSAGES_ALLOWED_FOR_GREETING=25},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=h(n(0)),o=m(n(9)),i=m(n(61)),l=m(n(255)),u=m(n(8424)),s=m(n(8266)),d=h(n(8707)),f=m(n(9053)),c=n(1),p=m(n(6)),v=m(n(7379)),y=m(n(7343));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.expanded,n=e.onClick,r=e.count,a=e.compact;return E(u.default,{compact:a,role:"group",childrenMessageContent:E(s.default,{compact:a,className:v.default.blockedSystemMessage,iconNode:E(l.default,{className:v.default.blockedIcon})},void 0,E("div",{className:v.default.blockedMessageText},void 0,p.default.Messages.BLOCKED_MESSAGE_COUNT.format({count:r})," —"," ",E(i.default,{tag:"span",onClick:n,className:v.default.blockedAction},void 0,t?p.default.Messages.BLOCKED_MESSAGES_HIDE.format({count:r}):p.default.Messages.BLOCKED_MESSAGES_SHOW.format({count:r}))))})}function S(e){var t,n,r=e.messages,i=e.channel,l=e.compact,u=void 0!==l&&l,s=e.unreadId,p=r.hasJumpTarget,m=void 0!==p&&p,_=a.useState(m),h=_[0],S=_[1],O=a.useCallback((function(){return S((function(e){return!e}))}),[]),I=r.hasUnread?r.content.length-1:r.content.length;return E("div",{className:(0,o.default)((t={},t[y.default.groupStart]=!0,t[v.default.expanded]=h,t))},void 0,!r.hasUnread||h&&(null===(n=r.content[0])||void 0===n?void 0:n.type)!==c.ChannelStreamTypes.DIVIDER?null:E(f.default,{isUnread:!0,id:s},"divider"),E(g,{count:I,compact:u,expanded:h,onClick:O},"blocked-message-item"),h?r.content.map((function(e,t){if(e.type===c.ChannelStreamTypes.DIVIDER&&t>0){var n,a,o=null!==(n=null===(a=r.content[t+1])||void 0===a?void 0:a.isGroupStart)&&void 0!==n&&n;return E(f.default,{isUnread:!0,isBeforeGroup:o,id:s},"divider")}if(e.type===c.ChannelStreamTypes.MESSAGE||e.type===c.ChannelStreamTypes.THREAD_STARTER_MESSAGE)return E(e.type===c.ChannelStreamTypes.THREAD_STARTER_MESSAGE?d.ThreadStarterChatMessage:d.default,{className:v.default.blocked,compact:u,channel:i,message:e.content,groupId:e.groupId,flashKey:e.flashKey},e.content.id)})):null)}g.displayName="BlockedItemMessage",S.displayName="BlockedMessages";var O=a.memo(S);t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.channel,n=a.useState(""),r=n[0],O=n[1];a.useEffect((function(){(0,u.fetchStickerPack)("749043879713701898",!0)}),[]);var I=(0,i.useStateFromStores)([c.default,f.default],(function(){return Boolean((0,o.default)(c.default.getMessages(t.id).toArray()).reverse().find((function(e){return e.author.id!==f.default.getId()&&e.state===E.MessageStates.SENT&&!(0,h.default)(e)})))})),C=(0,i.useStateFromStores)([p.default],(function(){var e;return(null===(e=p.default.getUser(t.getRecipientId()))||void 0===e?void 0:e.username)||g.default.Messages.WAVE_DEFAULT_RECIPIENT})),M=(0,i.useStateFromStores)([s.default],(function(){return s.default.getStickerById("749054660769218631")})),N=a.useCallback(b(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,l.default.sendGreetMessage(t.id,"749054660769218631");case 5:_.default.track(E.AnalyticEvents.DM_EMPTY_ACTION,{channel_id:t.id,channel_type:t.type,source:"Wave",type:"Send wave"}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),e.t0.ok||429!==e.t0.status||O(g.default.Messages.RATE_LIMITED);case 11:case"end":return e.stop()}}),e,null,[[2,8]])}))),[t.id,t.type,r]),A=g.default.Messages.WAVE_TO.format({username:C}),P=r?T(m.default,{className:S.default.error,color:m.default.Colors.ERROR},void 0,r):null;return I?T("div",{className:S.default.containerCompact},void 0,T(y.default,{className:r?S.default.compactButtonDisabled:S.default.compactButton,"aria-label":g.default.Messages.SEND_WAVE,onClick:N},void 0,T(d.default,{sticker:M,size:24}),T(m.default,{className:S.default.text,size:m.default.Sizes.SIZE_16},void 0,A)),P):T("div",{className:S.default.containerExpanded},void 0,T(d.default,{sticker:M,size:160}),T(v.default,{className:S.default.button,onClick:N,disabled:Boolean(r)},void 0,A),P)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(8)),i=n(3),l=O(n(390)),u=n(5940),s=O(n(362)),d=O(n(5936)),f=O(n(11)),c=O(n(201)),p=O(n(12)),v=O(n(29)),y=O(n(61)),m=O(n(24)),_=O(n(13)),h=O(n(685)),E=n(1),g=O(n(6)),S=O(n(7837));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){C(o,r,a,i,l,"next",e)}function l(e){C(o,r,a,i,l,"throw",e)}i(void 0)}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=f(n(1217)),i=f(n(70)),l=f(n(93)),u=f(n(9054)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){var t=e.channel,f=e.children,c=(0,a.useStateFromStores)([i.default],(function(){return i.default.isBlocked(t.getRecipientId())})),p=t.isSystemDM(),v=c&&!p&&!t.isMultiUserDM(),y={};return p?(y.message=d.default.Messages.SYSTEM_DM_CHANNEL_DESCRIPTION,y.subtitle=d.default.Messages.SYSTEM_DM_CHANNEL_DESCRIPTION_SUBTEXT,y.buttonText=d.default.Messages.LEARN_MORE,y.onButtonClick=function(){return open(l.default.getArticleURL(s.HelpdeskArticles.SYSTEM_DMS))},y.imageSrc=n(10136)):v&&(y.message=d.default.Messages.DM_VERIFICATION_TEXT_BLOCKED,y.buttonText=d.default.Messages.UNBLOCK,y.onButtonClick=function(){o.default.removeRelationship(t.getRecipientId())}),r.createElement(u.default,y,f)}p.displayName="DMVerification"},function(e,t,n){e.exports=n.p+"808cc31ed06de30bacc3bbc88437b0f8.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=$(n(0)),o=z(n(3)),i=z(n(363)),l=z(n(8514)),u=z(n(199)),s=z(n(105)),d=$(n(735)),f=z(n(8294)),c=n(8262),p=z(n(1233)),v=z(n(10138)),y=z(n(9227)),m=z(n(8398)),_=z(n(10140)),h=z(n(182)),E=$(n(10141)),g=$(n(8914)),S=n(5831),O=n(42),I=z(n(11)),T=z(n(8897)),C=z(n(56)),b=z(n(15)),M=z(n(1219)),N=z(n(40)),A=z(n(39)),P=z(n(12)),R=$(n(29)),L=z(n(61)),D=z(n(278)),w=n(8382),j=z(n(466)),k=z(n(35)),U=n(41),G=z(n(24)),F=z(n(78)),B=z(n(9054)),H=z(n(9228)),x=z(n(8447)),V=n(1),W=z(n(6)),Y=z(n(7844));function z(e){return e&&e.__esModule?e:{default:e}}function K(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return K=function(){return e},e}function $(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=K();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Z(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Z(o,r,a,i,l,"next",e)}function l(e){Z(o,r,a,i,l,"throw",e)}i(void 0)}))}}function X(){return(X=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}).apply(this,arguments)}function J(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ee=function(e){var t,r;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).chatInputRef=a.createRef(),t.state={submitting:!1,shouldShowLurkerModeUpsellPopout:!1},t.handleCancelApplication=function(){var e=t.props.guild;null!=e&&(0,U.openModal)((function(t){return a.createElement(j.default,X({header:W.default.Messages.MODIFY_FOLLOWED_NEWS_HEADER,confirmText:W.default.Messages.CONFIRM,cancelText:W.default.Messages.CANCEL,onConfirm:function(){return f.default.removeGuildJoinRequest(e.id)},confirmButtonColor:R.default.Colors.BRAND},t),J(G.default,{size:G.default.Sizes.SIZE_16},void 0,W.default.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION_SUBTITLE))}))},t.handleViewApplicationRejection=function(){(0,U.openModal)((function(e){var n=t.props.guild;if(null!=n)return a.createElement(y.default,X({guildId:n.id},e))}))},t.handleShowMemberVerification=function(){var e=t.props.guild;null!=e&&(0,m.default)(e.id)},t.handleClaimAccount=function(){d.openClaimAccountModal()},t.handleVerifyPhone=function(){(0,U.openModal)((function(e){return a.createElement(x.default,e)}),{modalKey:S.PHONE_VERIFICATION_MODAL_KEY})},t.handleResendVerification=function(){i.default.verifyResend(),(0,U.openModal)((function(e){return a.createElement(j.default,X({},e,{header:W.default.Messages.VERIFICATION_EMAIL_TITLE,confirmText:W.default.Messages.OKAY,confirmButtonColor:R.default.Colors.BRAND}),J(G.default,{size:G.default.Sizes.SIZE_16},void 0,W.default.Messages.VERIFICATION_EMAIL_BODY.format({email:P.default.getCurrentUser().email})))}))},t.handleTextAreaClick=function(){var e=t.props.showLurkerModeUpsellPopout;t.setState({shouldShowLurkerModeUpsellPopout:e})},t.handleJoinServer=q(regeneratorRuntime.mark((function e(){var n,r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props.hasVerificationGate,t.setState({submitting:!0}),r=t.props.channel.getGuildId(),e.prev=3,e.next=6,u.default.joinGuild(r,!1,V.JoinGuildSources.CHAT_INPUT_BLOCKER);case 6:o=e.sent,n&&null!=(null===(a=o.body)||void 0===a?void 0:a.member_verification_form)&&null!=r&&(0,m.default)(r),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),t.setState({submitting:!1});case 13:case"end":return e.stop()}}),e,null,[[3,10]])}))),t.handleGoBack=function(){t.setState({submitting:!0}),(0,O.getHistory)().goBack()},t.handleFollowAnnouncement=function(){var e=t.props.channel;(0,U.openModal)((function(t){return a.createElement(H.default,X({channel:e},t))}))},t.closeLurkerModeUpsellPopout=function(){t.setState({shouldShowLurkerModeUpsellPopout:!1})},t.renderLurkerModeUpsellPopout=function(){var e=t.props.guild;return null==e?null:J(g.default,{type:g.LurkerModeUpsellPopoutTypes.CHAT,guild:e,closePopout:t.closeLurkerModeUpsellPopout})},t.renderMemberVerificationSuccessModal=function(){var e=t.props,n=e.guild,r=e.guildJoinRequest,o=(null==r?void 0:r.applicationStatus)===c.GuildJoinRequestApplicationStatuses.APPROVED&&null!=(null==r?void 0:r.lastSeen);if(null==(null==n?void 0:n.id)||(null==r?void 0:r.applicationStatus)!==c.GuildJoinRequestApplicationStatuses.APPROVED||o)return null;var i=function(){f.default.ackUserGuildJoinRequest(null==n?void 0:n.id)};return J(k.default,{renderModal:function(e){return a.createElement(v.default,X({},e,{onAccept:i,guildName:null==n?void 0:n.name}))},onCloseRequest:i})},t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,Q(t,r);var s=o.prototype;return s.componentDidMount=function(){var e=this.props,t=e.isFollowable,n=e.channelFollowingUsersSeen,r=e.channel;t&&null==n&&l.default.fetchChannelFollowerStats(r.id)},s.componentDidUpdate=function(e){var t=this.props,n=t.shouldShowLurkerModeSuccessPopout,r=t.guild;t.showMemberVerificationModal||e.shouldShowLurkerModeSuccessPopout||!n||null==this.chatInputRef.current||(0,w.openPopout)(this.chatInputRef.current,{closeOnScroll:!1,backdrop:!0,shadow:!1,position:"top-left",animationType:"default",render:function(e){return a.createElement(E.default,X({},e,{guild:r}))}},E.LURKER_MODE_SUCCESS_POPOUT_KEY)},s.render=function(){var e=this,t=this.props,r=t.isFollowable,o=t.isLurking,i=t.notClaimed,l=t.notPhoneVerified,u=t.notEmailVerified,s=t.newMember,d=t.memberDeadline,f=t.newAccount,p=t.accountDeadline,v=t.theme,y=t.children,m=t.canSendMessages,_=t.channelFollowingUsersSeen,h=t.showLurkerModeUpsellPopout,E=t.showMemberVerificationModal,g=t.useReducedMotion,S=t.isStaff,O=t.guildJoinRequest,I=this.state.shouldShowLurkerModeUpsellPopout,T={theme:v,useReducedMotion:g};if(r&&!m){if(T.message=W.default.Messages.FOLLOW_NEWS_CHAT_INPUT_MESSAGE,null!=_&&_>=1e3){var C=1e3*Math.floor(_/1e3);T.subtitle=W.default.Messages.FOLLOW_NEWS_CHAT_INPUT_SUBTITLE.format({count:C.toLocaleString()})}T.buttonText=W.default.Messages.FOLLOW,T.onButtonClick=this.handleFollowAnnouncement,T.imageSrc=n(10150),o&&(T.onSecondaryButtonClick=this.handleJoinServer,T.secondaryButtonText=W.default.Messages.LURKER_MODE_CHAT_INPUT_BUTTON)}else if(i)T.message=W.default.Messages.GUILD_VERIFICATION_TEXT_NOT_CLAIMED,T.buttonText=W.default.Messages.CLAIM_ACCOUNT,T.onButtonClick=E?this.handleShowMemberVerification:this.handleClaimAccount,T.imageSrc=n(9055);else if(E)switch(null==O?void 0:O.applicationStatus){case c.GuildJoinRequestApplicationStatuses.PENDING:T.message=W.default.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_TITLE,T.subtitle=W.default.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_SUBTITLE,T.buttonText=W.default.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION,T.onButtonClick=this.handleCancelApplication,T.imageSrc=n(10151);break;case c.GuildJoinRequestApplicationStatuses.REJECTED:T.message=W.default.Messages.MEMBER_VERIFICATION_REJECTED_TITLE,T.buttonText=W.default.Messages.MEMBER_VERIFICATION_LEARN_MORE,T.onButtonClick=this.handleViewApplicationRejection,T.imageSrc=n(10152);break;default:T.message=W.default.Messages.MEMBER_VERIFICATION_CHAT_BLOCKER_TEXT,T.buttonText=W.default.Messages.MEMBER_VERIFICATION_NOTICE_CTA,T.buttonColor=R.ButtonColors.BRAND,T.onButtonClick=this.handleShowMemberVerification;T.animationSrc=function(){return n.e(20).then(n.t.bind(null,9259,3)).then((function(e){return e.default}))}}else l&&!S?(T.message=W.default.Messages.GUILD_VERIFICATION_TEXT_NOT_PHONE_VERIFIED,T.buttonText=W.default.Messages.VERIFY_PHONE,T.onButtonClick=this.handleVerifyPhone,T.imageSrc=n(10153)):u?(T.message=W.default.Messages.GUILD_VERIFICATION_TEXT_NOT_VERIFIED,T.buttonText=W.default.Messages.RESEND_VERIFICATION_EMAIL,T.onButtonClick=this.handleResendVerification,T.imageSrc=n(9055)):s?(T.message=W.default.Messages.GUILD_VERIFICATION_TEXT_MEMBER_AGE.format({min:V.VerificationCriteria.MEMBER_AGE}),T.countdown=d):f&&(T.message=W.default.Messages.GUILD_VERIFICATION_TEXT_ACCOUNT_AGE.format({min:V.VerificationCriteria.ACCOUNT_AGE}),T.countdown=p);return a.createElement("div",{ref:this.chatInputRef},a.createElement(B.default,T,J(a.Fragment,{},void 0,this.renderMemberVerificationSuccessModal(),J(D.default,{renderPopout:this.renderLurkerModeUpsellPopout,shouldShow:I,position:D.default.Positions.TOP},void 0,(function(t){return h?a.createElement(L.default,X({},t,{className:Y.default.clickableChannelTextArea,onClick:e.handleTextAreaClick}),y):a.createElement("div",t,y)})))))},o}(a.PureComponent);ee.displayName="GuildVerification";var te=o.default.connectStores([b.default,M.default,h.default,A.default,T.default,I.default,_.default,N.default,C.default,P.default,p.default,s.default],(function(e){var t,n,r,a,o=e.channel,i=o.getGuildId(),l=b.default.getGuild(i),u=M.default.getCheck(i),d=o.type===V.ChannelTypes.GUILD_ANNOUNCEMENT&&null!=l&&l.hasFeature(V.GuildFeatures.NEWS),f=d?T.default.getFollowerStatsForChannel(o.id):null,v=h.default.isLurking(i),y=P.default.getCurrentUser(),m=null!==(t=null==y?void 0:y.isStaff())&&void 0!==t&&t,E=null!=y&&(null!==(n=null===(r=C.default.getMember(i,y.id))||void 0===r?void 0:r.isPending)&&void 0!==n&&n),g=null!=l&&l.hasFeature(V.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED)&&l.hasFeature(V.GuildFeatures.COMMUNITY),S=(E||u.notClaimed)&&g,O=p.default.getRequest(i);return X({},u,{guild:l,isLurking:v,isGuest:I.default.isGuest(),isFollowable:d,shouldShowLurkerModeSuccessPopout:_.default.shouldShowPopout(i),showLurkerModeUpsellPopout:v&&null!=l&&F.default.canEveryoneRole(V.Permissions.SEND_MESSAGES,o),theme:A.default.theme,canSendMessages:N.default.can(V.Permissions.SEND_MESSAGES,o),channelFollowingUsersSeen:null!=f?f.usersSeenEver:null,hasVerificationGate:g,showMemberVerificationModal:S,guildJoinRequestStatus:null!==(a=null==O?void 0:O.applicationStatus)&&void 0!==a?a:c.GuildJoinRequestApplicationStatuses.STARTED,guildJoinRequest:O,useReducedMotion:s.default.useReducedMotion,isStaff:m})}))(ee);t.default=te},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(276),i=v(n(98)),l=v(n(29)),u=v(n(8649)),s=n(35),d=v(n(47)),f=v(n(24)),c=v(n(6)),p=v(n(7841));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(){return n.e(17).then(n.t.bind(null,10573,3)).then((function(e){return e.default}))},E=function(){return n.e(18).then(n.t.bind(null,10574,3)).then((function(e){return e.default}))},g=function(){return n.e(19).then(n.t.bind(null,10575,3)).then((function(e){return e.default}))},S=function(e){var t=(0,o.useLazyValue)((function(){return i.default.v4()}))[0];return a.createElement(s.ModalRoot,m({},e,{transitionState:e.transitionState,"aria-labelledby":t}),_("div",{className:p.default.animationContainer},void 0,_(u.default,{importData:h,className:p.default.animationLeft}),_(u.default,{importData:E,className:p.default.animationMiddle}),_(u.default,{importData:g,className:p.default.animationRight})),_(s.ModalContent,{},void 0,_("div",{className:p.default.container},void 0,_(d.default,{size:f.default.Sizes.SIZE_24,className:p.default.header,id:t},void 0,c.default.Messages.MEMBER_VERIFICATION_APPROVED_APPLICATION_MODAL_TITLE.format({guildName:e.guildName})),_(f.default,{size:f.default.Sizes.SIZE_14,color:f.default.Colors.HEADER_SECONDARY},void 0,c.default.Messages.MEMBER_VERIFICATION_APPROVED_APPLICATION_MODAL_DESC),_(l.default,{className:p.default.button,onClick:function(){e.onAccept(),e.onClose()}},void 0,c.default.Messages.MEMBER_VERIFICATION_APPROVED_APPLICATION_MODAL_CONFIRM))))};S.displayName="MemberVerificationSuccessModal";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,r.getHistory)();e.length?e.goBack():(0,r.transitionTo)(a.Routes.ME)};var r=n(42),a=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=i(n(182));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=null,s=null;function d(){var e=o.default.mostRecentLurkedGuildId();null!=e?(u=e,s=null):null!=u?(s=u,u=null):(s=null,u=null)}var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.initialize=function(){this.syncWith([o.default],d)},a.shouldShowPopout=function(e){return s===e},r}(r.default.Store))(a.default);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LURKER_MODE_SUCCESS_POPOUT_KEY=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(8309)),o=d(n(29)),i=d(n(47)),l=d(n(24)),u=d(n(6)),s=d(n(7374));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}t.LURKER_MODE_SUCCESS_POPOUT_KEY="LURKER_MODE_SUCCESS_POPOUT";var p=function(){a.default.close("LURKER_MODE_SUCCESS_POPOUT")},v=function(e){var t=e.guild;return c("div",{className:s.default.container},void 0,c("img",{alt:"",className:s.default.image,src:n(10142)}),c("div",{className:s.default.content},void 0,c(i.default,{size:i.default.Sizes.SIZE_16},void 0,u.default.Messages.LURKER_MODE_POPOUT_SUCCESS_HEADER.format({guild:t.name})),c(l.default,{color:l.default.Colors.HEADER_SECONDARY},void 0,u.default.Messages.LURKER_MODE_POPOUT_SUCCESS_BODY),c("div",{className:s.default.buttonContainer},void 0,c(o.default,{onClick:p},void 0,u.default.Messages.LURKER_MODE_POPOUT_SUCCESS_BUTTON))))};v.displayName="LurkerModeSuccessPopout";var y=v;t.default=y},function(e,t,n){e.exports=n.p+"7750f287cdbdc519ace5f3c8854c6f6c.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=O(n(8)),i=n(276),l=O(n(1166)),u=O(n(29)),s=n(85),d=n(35),f=O(n(47)),c=O(n(24)),p=n(1),v=O(n(6)),y=O(n(7842)),m=O(n(10144)),_=O(n(10145)),h=O(n(10146)),E=O(n(10147)),g=O(n(10148)),S=O(n(10149));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=((r={})[p.ThemeTypes.LIGHT]=[E.default,g.default,S.default],r[p.ThemeTypes.DARK]=[m.default,_.default,h.default],r),b=[v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_01,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_02,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_03,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_04,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_05,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_06,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_07,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_08,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_09,v.default.Messages.FOLLOW_SUCCESS_MODAL_HEADER_10],M=function(e){var t=e.transitionState,n=e.onClose,r=(0,l.default)(),a=(0,s.useUID)(),p=(0,i.useStableMemo)((function(){return o.default.sample(C[r])}),[r]),m=(0,i.useStableMemo)((function(){return o.default.sample(b)}),[]);return T(d.ModalRoot,{transitionState:t,className:y.default.root,"aria-labelledby":a},void 0,T("img",{alt:"",src:p,className:y.default.image}),T(d.ModalContent,{className:y.default.modal},void 0,T(f.default,{size:f.default.Sizes.SIZE_24,className:y.default.followSuccessHeader,id:a},void 0,m),T(c.default,{color:c.default.Colors.MUTED,size:c.default.Sizes.SIZE_16,className:y.default.body},void 0,v.default.Messages.FOLLOW_SUCCESS_MODAL_BODY),T(u.default,{onClick:n},void 0,v.default.Messages.TUTORIAL_CLOSE)))};M.displayName="FollowSuccessModal";var N=M;t.default=N},function(e,t,n){e.exports=n.p+"3d5742be4e4344542d190d09e7848ad9.svg"},function(e,t,n){e.exports=n.p+"519c307aa0e0541936a1efe408a0a898.svg"},function(e,t,n){e.exports=n.p+"097e4735ce238a3adbdb1b90c146aea5.svg"},function(e,t,n){e.exports=n.p+"35462ef5c4e67741bc865a7f09b7d2b4.svg"},function(e,t,n){e.exports=n.p+"4688672f33ab19dd400c5714f9a2074d.svg"},function(e,t,n){e.exports=n.p+"0aab05e7b7f37e6eb593a32ce06efb2c.svg"},function(e,t,n){e.exports=n.p+"dc7e9e55b3a6d39d24acdd650ecc2ef3.svg"},function(e,t,n){e.exports=n.p+"4987d30459fadaa3c0268cbc178bdd3f.svg"},function(e,t,n){e.exports=n.p+"fb6dd8fcf4c9cec036103f1aa358eeea.svg"},function(e,t,n){e.exports=n.p+"ea12bc00248d8242d5b5a0ed93d3ef5a.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TooltipPositions",{enumerable:!0,get:function(){return d.Positions}}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(3)),l=y(n(707)),u=y(n(256)),s=y(n(149)),d=n(250),f=n(1312),c=n(716),p=y(n(43)),v=y(n(7845));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}var E=p.default.getEnableHardwareAcceleration()?f.AnimatedStatus:f.Status,g=function(e){var t=e.streaming,n=e.status,r=e.hideTooltip,i=e.className,l=e.style,u=e.isMobile,p=e.size,y=e.defaultStatus,m=e.position,g=void 0===m?d.Positions.TOP:m,S=t?f.StatusTypes.STREAMING:n||y,O=_(E,{isMobile:u,status:S,size:p});return _(s.default,{text:r?null:(0,c.humanizeStatus)(S),position:g},void 0,(function(e){return a.createElement("div",h({},e,{className:(0,o.default)(i,v.default.disableFlex),style:l}),O)}))};g.displayName="Status";var S=i.default.connectStores([u.default],(function(e){var t=e.userId,n=e.defaultStatus;return{status:null!=t?u.default.getStatus(t,null,n):null,streaming:null!=t&&(0,l.default)(u.default.getActivities(t))}}))(g);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=function(e){var t=(0,i.useStateFromStores)([f.default],(function(){return f.default.getUser(e)}),[e]),n=a.useState((function(){return new M(e,t||void 0)}))[0];return n.updateData(e,t||void 0),n}(e.channel.getRecipientId());if(0===t.getNicknameGuildPairs().length&&0===t.getAvatarGuildPairs().length)return b("div",{className:O.default.spacer});return a.createElement(a.Fragment,null,N,b(m.TextBadge,{text:S.default.Messages.AKA,disableColor:!0,className:O.default.akaBadge}),t.getAvatarGuildPairs().length>0?b(h.default,{size:16,users:t.getUsersArray(),showUserPopout:!1,renderUser:t.renderUser,renderMoreUsers:t.renderMoreAvatars,guildId:void 0,max:3,className:O.default.avatars}):null,t.getNicknameGuildPairs().length>0?b(p.default,{position:p.Positions.BOTTOM,className:O.default.nicknames},void 0,t.renderNicknamePairs()):null)};var r,a=C(n(0)),o=I(n(8)),i=n(3),l=n(8433),u=n(8310),s=I(n(56)),d=I(n(15)),f=I(n(12)),c=I(n(61)),p=C(n(8319)),v=n(149),y=I(n(1256)),m=n(8263),_=n(8282),h=I(n(8393)),E=n(393),g=n(48),S=I(n(6)),O=I(n(7846));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M=function(){function e(e,t){var n=this;this.generateNicknameGuildPairs=(0,E.cachedFunction)((function(e){var t;return(0,o.default)(s.default.getNicknameGuildsMapping(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:n.userId)).toPairs().map((function(e){return[e[0],e[1].map((function(e){var t;return null===(t=d.default.getGuild(e))||void 0===t?void 0:t.name})).filter(g.isNotNullish)]})).value()})),this.generateAvatarGuildPairs=(0,E.cachedFunction)((function(e){var t;return(0,o.default)(s.default.getAvatarGuildsMapping(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:n.userId)).toPairs().map((function(e){return[e[0],e[1][0]]})).value()})),this.generateUsersArray=(0,E.cachedFunction)((function(e){return new Array(e.length).fill(null)})),this.renderMoreAvatars=function(){return b(v.TooltipContainer,{text:S.default.Messages.AKA_MORE_AVATARS_OVERFLOW,position:p.Positions.BOTTOM},"more-avatars",b(c.default,{className:O.default.moreAvatars,onClick:n.handleClick},void 0,b(y.default,{className:O.default.plusIcon})))},this.renderUser=function(e,t,r){var a,o=n.user,i=n.getAvatarGuildPairs()[r];return null==i||null==o?null:b(v.TooltipContainer,{text:null===(a=d.default.getGuild(i[1]))||void 0===a?void 0:a.name,position:p.Positions.BOTTOM},i[1],b("img",{alt:"",className:O.default.avatar,onClick:n.handleClick,src:o.getAvatarURL(i[1]),"aria-hidden":!0}))},this.handleClick=function(){(0,u.openUserProfileModal)({userId:n.userId,section:l.UserProfileSections.MUTUAL_GUILDS})},this.userId=e,this.user=t}var t=e.prototype;return t.updateData=function(e,t){this.userId=e,this.user=t},t.getNicknameGuildPairs=function(){return this.generateNicknameGuildPairs(this.user)},t.getAvatarGuildPairs=function(){return this.generateAvatarGuildPairs(this.user)},t.getUsersArray=function(){return this.generateUsersArray(this.getAvatarGuildPairs())},t.renderNicknamePairs=function(){var e=this;return this.getNicknameGuildPairs().map((function(t,n){var r=t[0],o=t[1],i=b(c.default,{tag:"span",onClick:e.handleClick},void 0,r);return o.length>0&&(i=b(v.TooltipContainer,{className:O.default.tooltip,text:o.join(", "),position:p.Positions.BOTTOM},void 0,i)),b(a.Fragment,{},n,0!==n?", ":null,i)}))},e}();var N=b(_.Divider,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(391)),o=s(n(10157)),i=s(n(180)),l=n(1),u=s(n(7848));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.channel,n=(0,i.default)(t);return f("div",{className:u.default.container,onDoubleClick:function(e){return e.stopPropagation()}},void 0,f(o.default,{minLen:1,maxLen:l.MAX_CHANNEL_NAME_LENGTH,className:u.default.channelName,name:"channel_name",autoComplete:"off",value:null!=n?n:"",onBlur:function(e){n!==e.currentTarget.value&&a.default.setName(t.id,e.currentTarget.value)}}))};c.displayName="ChannelName";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=n(1),l=u(n(7847));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).inputRef=a.createRef(),t.state={focused:!1,lastGoodValue:t.props.value,value:t.props.value},t.handleChange=function(e){var n=t.props.onChange;t.setState({value:e.currentTarget.value}),null==n||n(e)},t.handleFocus=function(e){var n=t.props.onFocus;t.setState({focused:!0,lastGoodValue:e.currentTarget.value}),null==n||n(e)},t.handleBlur=function(e){if(p("",t.props,t.state)){t.setState({focused:!1});var n=t.props.onBlur;null==n||n(e)}else t.setState({focused:!1,value:t.state.lastGoodValue})},t.handleKeyPress=function(e){var n;e.which===i.KeyboardKeys.ENTER&&(null===(n=t.inputRef.current)||void 0===n||n.blur())},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var u=r.prototype;return u.componentDidUpdate=function(e,t){var n;t.focused!==this.state.focused&&this.state.focused&&(null===(n=this.inputRef.current)||void 0===n||n.focus());null!==this.props.value&&this.props.value!==e.value&&this.props.value!==this.state.value&&p(this.props.value,this.props,this.state)&&this.setState({value:this.props.value})},u.render=function(){var e,t=this.props,n=t.className,r=t.name,i=t.autoComplete,u=t.maxLen,s={position:"absolute",left:0,width:"100%",opacity:1};return this.state.focused?e={visibility:"hidden",pointerEvents:"none"}:s.opacity=0,d("div",{className:(0,o.default)(l.default.outer,n)},void 0,d("div",{className:l.default.container},void 0,a.createElement("input",{type:"text",className:l.default.input,ref:this.inputRef,style:s,value:this.state.value,name:r,maxLength:u,autoComplete:i,onKeyPress:this.handleKeyPress,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur}),d("div",{className:l.default.input,style:e},void 0,this.state.value)))},r}(a.Component);function p(e,t,n){void 0===e&&(e="");var r=e||n.value||"";return!(t.minLen&&r.length<t.minLen||t.maxLen&&r.length>t.maxLen)}t.default=c,c.displayName="InputAutosize"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=n(389),l=g(n(9216)),u=g(n(180)),s=g(n(9217)),d=g(n(8295)),f=g(n(61)),c=n(35),p=n(41),v=g(n(47)),y=g(n(24)),m=g(n(8318)),_=n(1),h=g(n(6)),E=g(n(7849));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e){var t=e.channel,n=e.onClose,r=e.transitionState,a=(0,u.default)(t,!0);return T(c.ModalRoot,{transitionState:r,"aria-label":h.default.Messages.FORM_LABEL_CHANNEL_TOPIC},void 0,T(c.ModalContent,{},void 0,T(l.default,{selectable:!0,onClose:n,renderHeader:function(){return T(v.default,{tag:v.default.Tags.H2,size:v.default.Sizes.SIZE_20},void 0,a)}},void 0,T(y.default,{selectable:!0,size:y.default.Sizes.SIZE_16,className:E.default.content},void 0,d.default.parseTopic(t.topic,!0,{channelId:t.id})))))}C.displayName="ChannelTopicModal";var b=T(m.default.Divider,{}),M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._mouseDown=!1,t._mouseUp=!1,t.handleOpenTopic=function(e){!(e.target.matches("a")||e.target.parentNode.matches("a")||"highlight"===e.target.className||"highlight"===e.target.parentNode.className)&&(0,p.openModal)((function(e){return a.createElement(C,O({},e,t.props))}))},t.onMouseDown=function(){t._mouseDown=!0},t.onMouseMove=function(){t._mouseDown&&(t._mouseDown=!1)},t.onMouseUp=function(e){t._mouseDown&&e.button!==_.MouseButtons.SECONDARY&&t.handleOpenTopic(e),t._mouseUp=!0,t._mouseDown=!1},t.handleContextMenu=function(e){var n=t.props,r=n.channel,o=n.guild;(0,i.openContextMenu)(e,(function(e){return a.createElement(s.default,O({},e,{channel:r,guild:o,includeTopic:!0}))}))},t.handleClick=function(e){t._mouseUp?t._mouseUp=!1:t.handleOpenTopic(e)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n),r.prototype.render=function(){var e=this.props.channel;return e.isMultiUserDM()||null==e.topic||0===e.topic.length?null:T(a.Fragment,{},void 0,b,T(f.default,{className:(0,o.default)(E.default.topic,E.default.expandable),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseUp:this.onMouseUp,onContextMenu:this.handleContextMenu,onClick:this.handleClick},void 0,d.default.parseTopic(e.topic,!0,{channelId:e.id})))},r}(a.Component);M.displayName="ChannelTopic";var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(3)),l=y(n(199)),u=y(n(12)),s=y(n(9056)),d=y(n(468)),f=y(n(93)),c=n(1),p=y(n(6)),v=y(n(7851));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).scroller=a.createRef(),t.handleDisagree=function(){var e=t.props.guild;null!=e&&l.default.nsfwReturnToSafety(e.id)},t.handleAgree=function(){var e=t.props.guild;null!=e&&l.default.nsfwAgree(e.id)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var i=r.prototype;return i.componentDidMount=function(){var e=this.scroller.current;null==e||e.scrollToBottom()},i.render=function(){var e=this.props.nsfwDisallowed,t=p.default.Messages.NSFW_DESCRIPTION;t=e?p.default.Messages.AGE_GATE_NSFW_UNDERAGE_BODY.format({helpURL:f.default.getArticleURL(c.HelpdeskArticles.NSFW_AGE_GATING)}):p.default.Messages.AGE_GATE_NSFW_DESCRIPTION;var n=_(s.default,e?{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:p.default.Messages.AGE_GATE_NSFW_UNDERAGE_HEADER,description:t,agreement:null,disagreement:p.default.Messages.BACK,imageClassName:v.default.ageGatedImage}:{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:p.default.Messages.NSFW_TITLE,description:t,agreement:p.default.Messages.NSFW_ACCEPT,disagreement:p.default.Messages.NSFW_DECLINE});return a.createElement(d.default,{ref:this.scroller,className:v.default.scroller},_("div",{className:(0,o.default)(this.props.className,v.default.wrapper)},void 0,n))},r}(a.PureComponent);E.displayName="GuildNSFW";var g=i.default.connectStores([u.default],(function(){var e;return{nsfwDisallowed:!1===(null===(e=u.default.getNullableCurrentUser())||void 0===e?void 0:e.nsfwAllowed)}}))(E);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateLocation=function(e){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.APPLICATION_STORE_LOCATION_CHANGE,location:e})}))},t.handleDirectoryUnmount=function(e,t){a.default.dispatch({type:o.ActionTypes.APPLICATION_STORE_DIRECTORY_UNMOUNT,scrollTop:e,directoryLocation:t})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APPLICATION_STORE_LAYOUT=void 0;var r,a=n(9057),o=n(8535),i=n(1);function l(){return(l=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}).apply(this,arguments)}var u=l({},o.DEFAULT_LAYOUT,((r={})[i.KeybindActions.CAROUSEL_NEXT]=a.CAROUSEL_NEXT,r[i.KeybindActions.CAROUSEL_PREV]=a.CAROUSEL_PREV,r));t.APPLICATION_STORE_LAYOUT=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(137)),i=n(192),l=f(n(8273)),u=f(n(13)),s=f(n(10163)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._applicationIdsViewed=new Set,t._skuIdsViewed=new Set,t.handleSKUViewed=function(e){t._applicationIdsViewed.add(e.applicationId),t._skuIdsViewed.add(e.id)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var l=r.prototype;return l.componentDidMount=function(){var e=this.props,t=e.location,n=e.analyticsContext,r=null!=t.search?o.default.parse(t.search.slice(1)):null;u.default.track(d.AnalyticEvents.PREMIUM_MARKETING_PAGE_VIEWED,{load_id:n.loadId,source:null!=t.state?t.state.analyticsSource:d.DIRECT_ANALYTICS_LOCATION,location:n.location.page,utm_campaign_current:null!=r?r.utm_campaign_current:null})},l.componentWillUnmount=function(){var e=this.props.analyticsContext,t=e.loadId,n=e.loadDate;if(null==n)throw new Error("loadDate was null during unmount");u.default.track(d.AnalyticEvents.PREMIUM_MARKETING_PAGE_EXITED,{load_id:t,duration_ms:Date.now()-n,application_ids_viewed:Array.from(this._applicationIdsViewed),sku_ids_viewed:Array.from(this._skuIdsViewed)})},l.render=function(){return p(i.Switch,{},void 0,p(i.Route,{path:d.Routes.APPLICATION_STORE,exact:!0,render:function(e){return a.createElement(s.default,e)}}),p(i.Redirect,{to:d.Routes.APP}))},r}(a.Component);y.displayName="ApplicationStoreDirectory";var m=(0,l.default)(y);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(262),i=n(192),l=S(n(3)),u=S(n(8257)),s=S(n(8318)),d=S(n(8273)),f=S(n(8543)),c=S(n(9231)),p=S(n(12)),v=S(n(55)),y=S(n(151)),m=S(n(5686)),_=n(272),h=n(1),E=S(n(6)),g=S(n(7864));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=I(c.default,{}),b=I(o.Helmet,{title:"Discord"}),M=I(s.default.Icon,{icon:m.default,"aria-hidden":!0}),N=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n);var a=r.prototype;return a.renderLoading=function(){return I(v.default,{align:v.default.Align.CENTER,justify:v.default.Justify.CENTER},void 0,I(y.default,{className:g.default.spinner}))},a.renderPremiumPage=function(){return I("div",{className:g.default.premiumContainer},void 0,C)},a.render=function(){var e=this.props,t=e.isAuthenticated,n=e.user;return t?I("div",{className:g.default.homeWrapperNormal},void 0,b,I(u.default,{section:h.AnalyticsSections.NAVIGATION},void 0,I(s.default,{isAuthenticated:t,className:g.default.headerBar},void 0,M,I(s.default.Title,{},void 0,E.default.Messages.PREMIUM))),I(_.ScrollerAuto,{className:g.default.scroller},void 0,null==n?this.renderLoading():this.renderPremiumPage())):I(i.Redirect,{to:h.Routes.LOGIN})},r}(a.PureComponent);N.displayName="ApplicationStoreHome";var A=l.default.connectStores([p.default],(function(){return{user:p.default.getNullableCurrentUser()}}))((0,f.default)((0,d.default)(N)));t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=O(n(0)),o=g(n(9)),i=g(n(23)),l=O(n(5691)),u=n(10165),s=n(5688),d=g(n(271)),f=O(n(29)),c=g(n(149)),p=g(n(5998)),v=g(n(1151)),y=O(n(96)),m=g(n(9060)),_=n(1),h=g(n(6)),E=g(n(7855));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b={page:_.AnalyticsPages.USER_SETTINGS,section:_.AnalyticsSections.SETTINGS_PREMIUM,object:_.AnalyticsObjects.CARD},M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).unsubscribe=function(){var e=t.props.subscription;e.status!==_.SubscriptionStatusTypes.ACTIVE&&e.status!==_.SubscriptionStatusTypes.PAST_DUE||t.showCancelModal()},t.showCancelModal=function(){var e=t.props.subscription;(0,u.openPremiumSubscriptionCancellationModal)(e)},t.showSwitchPlans=function(){(0,s.openPremiumSelectPlanModal)({analyticsLocation:b})},t.resubscribe=function(){var e=t.props,n=e.paymentSource,r=e.subscription;null!=r&&(null!=n?l.resubscribe(r,n):(0,s.openPremiumSelectPlanModal)({initialPlanId:r.planId,analyticsLocation:b}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var g=r.prototype;return g.renderSubscriptionInfo=function(e){var t=this.props,n=t.subscription,r=t.renewalInvoicePreview;return(0,i.default)(null!=r,"Expected renewalInvoicePreview"),T("div",{className:E.default.planInfo},void 0,(0,y.getPlanDescriptionFromInvoice)({planId:e,subscription:n,renewalInvoicePreview:r}))},g.renderButtons=function(){var e=this,t=this.props,n=t.busy,r=t.subscription,i=r.status;if(r.isPurchasedExternally){var l=(0,y.getExternalSubscriptionMethodUrl)(r.paymentGateway,"SUBSCRIPTION_MANAGEMENT");return T(d.default,{href:l,useDefaultUnderlineStyles:!1},void 0,T(f.default,{className:(0,o.default)(E.default.toolsButton,E.default.externalButton),size:f.default.Sizes.SMALL,look:f.ButtonLooks.OUTLINED,color:f.ButtonColors.WHITE,submitting:n},void 0,h.default.Messages.BILLING_MANAGE_SUBSCRIPTION))}if(y.default.isBaseSubscriptionCanceled(r))return T(f.default,{className:E.default.toolsButton,size:f.default.Sizes.SMALL,look:f.ButtonLooks.INVERTED,color:f.ButtonColors.BRAND,submitting:n,onClick:this.resubscribe},void 0,h.default.Messages.RESUBSCRIBE);if(i===_.SubscriptionStatusTypes.ACTIVE||i===_.SubscriptionStatusTypes.PAST_DUE){var u=!1,s=null;return null!=r.renewalMutations&&(u=!0,s=r.renewalMutations.planId!==r.planId?h.default.Messages.PREMIUM_SWITCH_PLAN_DISABLED_PENDING_MUTATION_PLAN:h.default.Messages.PREMIUM_SWITCH_PLAN_DISABLED_PENDING_MUTATION_PREMIUM_GUILD_SUBSCRIPTION),null!=r.trialEndsAt&&(u=!0,s=h.default.Messages.PREMIUM_SWITCH_PLAN_DISABLED_IN_TRIAL),i===_.SubscriptionStatusTypes.PAST_DUE&&(u=!0),T("div",{className:E.default.toolsButtons},void 0,T(f.default,{className:E.default.toolsButton,size:f.default.Sizes.SMALL,look:f.ButtonLooks.LINK,color:f.ButtonColors.WHITE,submitting:n,onClick:this.unsubscribe},void 0,h.default.Messages.CANCEL),T(c.default,{text:s},void 0,(function(t){return a.createElement(m.default,I({},t,{disabled:u,className:E.default.toolsButton,onClick:e.showSwitchPlans}),h.default.Messages.PREMIUM_SWITCH_PLANS)})))}},g.render=function(){var e,t=this.props,n=t.subscription,r=t.renewalInvoicePreview,i=y.default.getPlanIdFromInvoice(n,r);if(y.default.isNoneSubscription(i))return null;var l=y.default.getStatusFromInvoice(n,r),u=y.default.getPremiumType(i),s=y.default.isGrandfathered(i),d=((e={})[E.default.tierGrandfathered]=y.default.isSubscriptionStatusActive(l)&&s,e[E.default.tier1]=!(y.default.isSubscriptionStatusActive(l)&&s||u!==_.PremiumTypes.TIER_1),e[E.default.tier2]=!(y.default.isSubscriptionStatusActive(l)&&s||u!==_.PremiumTypes.TIER_2),e[E.default.canceled]=l===_.SubscriptionStatusTypes.CANCELED,e[E.default.failedPayment]=(0,y.isSubscriptionStatusFailedPayment)(l),e);return T("div",{className:(0,o.default)(E.default.banner,d)},void 0,T("div",{className:E.default.bannerBackgroundImage}),T("div",{className:E.default.image}),T("div",{className:E.default.details},void 0,u===_.PremiumTypes.TIER_2||s?T(p.default,{className:E.default.planName,"aria-label":h.default.Messages.PREMIUM_TITLE}):a.createElement(a.Fragment,null,T(v.default,{className:E.default.discordWordmark,"aria-label":h.default.Messages.PREMIUM_TIER_1}),T("div",{className:E.default.classicWordmark})),this.renderSubscriptionInfo(i)),T("div",{className:E.default.buttons},void 0,this.renderButtons()))},r}(a.Component);M.displayName="SubscriptionHeader";var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=V,t.openPremiumSubscriptionCancellationModal=function(e){(0,h.openModal)((function(t){return o.createElement(V,D({},t,{premiumSubscription:e}))}))};var r,a,o=L(n(0)),i=P(n(9)),l=P(n(23)),u=n(3),s=n(287),d=P(n(257)),f=P(n(29)),c=P(n(55)),p=P(n(1164)),v=P(n(151)),y=n(85),m=n(131),_=n(35),h=n(41),E=L(n(96)),g=n(281),S=n(1169),O=n(1237),I=P(n(5695)),T=n(5676),C=P(n(6e3)),b=n(5700),M=n(1),N=P(n(6)),A=P(n(7854));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(){return(D=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}).apply(this,arguments)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){j(o,r,a,i,l,"next",e)}function l(e){j(o,r,a,i,l,"throw",e)}i(void 0)}))}}function U(e){return G.apply(this,arguments)}function G(){return(G=k(regeneratorRuntime.mark((function e(t){var n,r,a,o,i,l,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.premiumSubscription,r=t.onClose,a=t.setHasError,o=t.setIsCancelling,e.prev=1,o(!0),a(!1),n.status!==M.SubscriptionStatusTypes.PAST_DUE){e.next=9;break}return e.next=7,(0,s.cancelSubscription)(n.id);case 7:e.next=12;break;case 9:return u=null!==(i=null===(l=n.renewalMutations)||void 0===l?void 0:l.items)&&void 0!==i?i:n.items,e.next=12,(0,s.updateSubscription)(n,{items:(0,E.getItemsWithoutPremiumPlanItem)(u)});case 12:r(),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(1),a(!0),o(!1);case 19:case"end":return e.stop()}}),e,null,[[1,15]])})))).apply(this,arguments)}function F(e){var t=e.premiumSubscription,n=e.hasAdditionalPlans,r=e.headerId,i=e.setStep,l=e.onClose,u=o.useState(!1),s=u[0],d=u[1],v=o.useState(!1),y=v[0],h=v[1],g=E.default.getPremiumType(t.planId),S=n?w(f.default,{onClick:function(){return i(a.PREVIEW)}},void 0,N.default.Messages.NEXT):w(f.default,{color:f.default.Colors.RED,disabled:s,onClick:k(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U({setHasError:h,onClose:l,premiumSubscription:t,setIsCancelling:d});case 2:case"end":return e.stop()}}),e)})))},void 0,N.default.Messages.PREMIUM_CANCEL_CONFIRM_NEW.format({planPremiumType:E.default.getDisplayPremiumType(t.planId)}));return o.createElement(o.Fragment,null,w(_.ModalHeader,{separator:!1,id:r},void 0,w(m.FormTitle,{tag:m.FormTitleTags.H4},void 0,N.default.Messages.PREMIUM_CANCEL_CONFIRM_TITLE.format({planPremiumType:E.default.getDisplayPremiumType(t.planId)})),w(_.ModalCloseButton,{onClick:l})),w(_.ModalContent,{className:A.default.body},void 0,y?w(p.default,{className:A.default.errorBlock},void 0,N.default.Messages.BILLING_ERROR_GENERIC):null,w("div",{className:A.default.cancelImage}),w("div",{},void 0,t.status===M.SubscriptionStatusTypes.PAST_DUE?N.default.Messages.PREMIUM_CANCEL_PAST_DUE_CONFIRM_BODY:g===M.PremiumTypes.TIER_1?N.default.Messages.PREMIUM_CANCEL_CONFIRM_BODY_TIER_1.format({date:t.currentPeriodEnd}):N.default.Messages.PREMIUM_CANCEL_CONFIRM_BODY_TIER_2.format({date:t.currentPeriodEnd}))),w(_.ModalFooter,{justify:c.default.Justify.START},void 0,S,w(f.default,{look:f.default.Looks.LINK,color:f.default.Colors.WHITE,onClick:l},void 0,N.default.Messages.CANCEL)))}!function(e){e[e.START=1]="START",e[e.PREVIEW=2]="PREVIEW"}(a||(a={}));var B=w(O.PremiumInvoiceTableDivider,{});function H(e){var t=e.premiumSubscription,n=(0,S.useSubscriptionInvoicePreview)({subscriptionId:t.id,items:(0,E.getItemsWithoutPremiumPlanItem)(t.items),renewal:!0})[0],r=(0,u.useStateFromStores)([d.default],(function(){return d.default.getHardcoded(t.planId)}));if(null==n)return w(v.default,{className:A.default.loading});var a=E.default.getIntervalForInvoice(n);return w("div",{className:A.default.bodyText},void 0,w("div",{className:A.default.renewalInvoiceDate},void 0,0!==n.total?N.default.Messages.BILLING_SWITCH_PLAN_CHANGE_DATE_WITH_CHARGE.format({renewalDate:n.subscriptionPeriodStart,rate:(0,g.formatRate)((0,g.formatPrice)(n.total,n.currency),a)}):N.default.Messages.BILLING_SWITCH_PLAN_CHANGE_DATE.format({renewalDate:n.subscriptionPeriodStart})),w(O.PremiumInvoiceTable,{},void 0,w(O.PremiumInvoiceTableHeader,{},void 0,N.default.Messages.PREMIUM_SUBSCRIPTION_UPDATES),w(O.PremiumInvoiceTableRow,{label:N.default.Messages.PREMIUM_SUBSCRIPTION_CANCELLED.format({planName:E.default.getDisplayName(r.id)}),value:(0,E.getFormattedRateForPlan)(r),className:A.default.invoiceCancelRow}),B,w(T.SubscriptionInvoiceFooter,{premiumSubscription:t,renewalInvoice:n,isUpdate:!0})))}function x(e){var t=e.premiumSubscription,n=e.headerId,r=e.onBack,a=e.onClose,u=o.useState(!1),s=u[0],d=u[1],v=o.useState(!1),y=v[0],m=v[1],h=E.default.getPremiumType(t.planId);return(0,l.default)(null!=h,"Should not be cancelling Nitro without premiumType"),o.createElement(o.Fragment,null,w(C.default,{premiumType:h,onClose:a,headerId:n}),w(_.ModalContent,{className:(0,i.default)(A.default.previewStep,A.default.body)},void 0,y?w(p.default,{className:A.default.errorBlock},void 0,N.default.Messages.BILLING_ERROR_GENERIC):null,w(H,{premiumSubscription:t})),w(_.ModalFooter,{align:c.default.Align.CENTER,justify:c.default.Justify.BETWEEN},void 0,w(f.default,{color:f.default.Colors.RED,disabled:s,onClick:k(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U({setHasError:m,onClose:a,premiumSubscription:t,setIsCancelling:d});case 2:case"end":return e.stop()}}),e)})))},void 0,N.default.Messages.PREMIUM_CANCEL_CONFIRM_NEW.format({planPremiumType:E.default.getDisplayPremiumType(t.planId)})),w(I.default,{onClick:r})))}function V(e){var t=e.premiumSubscription,n=e.transitionState,r=e.onClose,i=o.useState(a.START),l=i[0],u=i[1],s=null!=t.additionalPlans&&(null==t.renewalMutations||null==t.renewalMutations.additionalPlans);(0,b.useUnsupportedExternalSubscriptionModalHandler)(t,r,!1);var d,f=(0,y.useUID)();switch(l){case a.START:d=w(F,{premiumSubscription:t,hasAdditionalPlans:s,headerId:f,setStep:u,onClose:r});break;case a.PREVIEW:d=w(x,{premiumSubscription:t,headerId:f,onBack:function(){return u(a.START)},onClose:r});break;default:throw new Error("Unexpected step: "+l)}return w(_.ModalRoot,{transitionState:n,"aria-labelledby":f},void 0,d)}H.displayName="CancelInvoicePreview",V.displayName="PremiumSubscriptionCancellationModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=I(n(0)),o=S(n(23)),i=n(92),l=S(n(3)),u=I(n(5691)),s=S(n(6007)),d=S(n(5674)),f=S(n(160)),c=S(n(693)),p=S(n(1147)),v=S(n(271)),y=S(n(29)),m=n(131),_=n(41),h=n(96),E=S(n(6)),g=S(n(7856));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).setSubscriptionPaymentSource=function(e){var n=t.props.subscription;null!=n&&null!=e&&u.changePaymentSource(n,e)},t.handlePaymentSourceChange=function(e){t.setSubscriptionPaymentSource(e)},t.handlePaymentSourceAdded=function(e){t.setSubscriptionPaymentSource(e)},t.handlePaymentSourceAdd=function(){(0,_.openModal)((function(e){return a.createElement(s.default,C({},e,{onAddPaymentSource:t.handlePaymentSourceAdded}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n);var l=r.prototype;return l.renderDropdown=function(){var e=this.props,t=e.paymentSources,n=e.hidePersonalInformation,r=e.premiumSubscriptionPaymentSourceId;return T("div",{className:g.default.dropdown},void 0,T(d.default,{prependOption:null==r?{label:E.default.Messages.ATTACH_PAYMENT_SOURCE_PROMPT_OPTION,value:null}:null,paymentSources:t,hidePersonalInformation:n,selectedPaymentSourceId:r,onChange:this.handlePaymentSourceChange,onPaymentSourceAdd:this.handlePaymentSourceAdd}))},l.renderAddButton=function(){return T(y.default,{fullWidth:!0,look:y.default.Looks.FILLED,color:y.default.Colors.PRIMARY,onClick:this.handlePaymentSourceAdd},void 0,E.default.Messages.BILLING_ADD_PAYMENT_METHOD)},l.renderManagedExternally=function(e){(0,o.default)(null!=e.paymentGateway,"Expected payment gateway when managed externally");var t=(0,h.getExternalSubscriptionMethodUrl)(e.paymentGateway,"PAYMENT_SOURCE_MANAGEMENT");return T("div",{className:g.default.externalContainer},void 0,T(m.FormTitle,{tag:m.FormTitle.Tags.H3,className:g.default.header},void 0,E.default.Messages.BILLING_MANAGED_BY_PAYMENT_GATEWAY.format({paymentGatewayName:i.PaymentGatewayToFriendlyName[e.paymentGateway]})),T(v.default,{href:t,useDefaultUnderlineStyles:!1,className:g.default.externalLink},void 0,T(y.default,{fullWidth:!0,look:y.default.Looks.FILLED,color:y.default.Colors.PRIMARY},void 0,E.default.Messages.BILLING_MANAGE_BILLING)))},l.render=function(){var e=this.props,t=e.paymentSources,n=e.subscription;return T("div",{className:e.className},void 0,T("div",{},void 0,n.isPurchasedExternally?this.renderManagedExternally(n):T("div",{},void 0,T(m.FormTitle,{tag:m.FormTitle.Tags.H3,className:g.default.header},void 0,E.default.Messages.BILLING_PAY_FOR_IT_WITH),t.length>0?this.renderDropdown():this.renderAddButton())),T("div",{className:g.default.finePrint},void 0,E.default.Messages.BILLING_APPLIES_TO_ALL_SUBSCRIPTIONS))},r}(a.Component);M.displayName="SubscriptionPaymentSource";var N=l.default.connectStores([f.default,c.default,p.default],(function(){var e=p.default.getPremiumTypeSubscription(),t=null!=e?e.paymentSourceId:null;return{paymentSources:Object.values(c.default.paymentSources).filter((function(e){return!e.invalid})),hidePersonalInformation:f.default.hidePersonalInformation,premiumSubscriptionPaymentSourceId:t,defaultPaymentSourceId:c.default.defaultPaymentSourceId}}))(M);t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r,a=T(n(0)),o=O(n(9)),i=O(n(23)),l=n(3),u=n(287),s=O(n(39)),d=O(n(257)),f=O(n(271)),c=O(n(29)),p=O(n(55)),v=n(131),y=O(n(5827)),m=T(n(35)),_=T(n(96)),h=n(281),E=n(1),g=O(n(6)),S=O(n(7857));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){b(o,r,a,i,l,"next",e)}function l(e){b(o,r,a,i,l,"throw",e)}i(void 0)}))}}function N(e){var t=e.subscription,n=e.renewalMutations,r=e.transitionState,a=e.onClose,o=(0,l.useStateFromStores)([s.default],(function(){return s.default.theme}));function f(){return(f=M(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.upgradeSubscription)(t,t.planId);case 2:a();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y=d.default.get(t.planId);(0,i.default)(null!=y,"Missing subscriptionPlan");var O=(0,h.formatRate)((0,h.formatPrice)(y.price,y.currency),y.interval);return C(m.ModalRoot,{transitionState:r,"aria-label":g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_CANCEL_HEADER},void 0,C(m.ModalHeader,{justify:p.default.Justify.BETWEEN,separator:!1},void 0,C(v.FormTitle,{tag:v.FormTitleTags.H4},void 0,g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_CANCEL_HEADER),C(m.ModalCloseButton,{onClick:a})),C(m.ModalContent,{className:S.default.modalBody},void 0,_.default.isNoneSubscription(t.planId)?g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_CANCEL_BODY_NO_EXISTING_PLAN.format({downgradedPlan:_.default.getDisplayName(n.planId),existingRate:O}):g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_CANCEL_BODY.format({existingPlan:_.default.getDisplayName(t.planId),downgradedPlan:_.default.getDisplayName(n.planId),existingRate:O})),C(m.ModalFooter,{},void 0,C(c.default,{onClick:function(){return f.apply(this,arguments)}},void 0,g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_CANCEL_BUTTON),C(c.default,{look:c.default.Looks.LINK,color:o===E.ThemeTypes.LIGHT?c.default.Colors.PRIMARY:c.default.Colors.WHITE,onClick:a},void 0,g.default.Messages.NEVERMIND)))}function A(e){var t=e.subscription,n=e.renewalMutations,r=e.className,i=a.useState(!1),l=i[0],u=i[1],s=(0,_.isUpgradingFromGrandfathered)(t);return C("div",{className:(0,o.default)(S.default.root,r)},void 0,C(y.default,{className:S.default.infoIcon}),C("div",{className:S.default.text},void 0,s?g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_NOTICE_GRANDFATHERED_UPGRADE.format({date:_.default.GRANDFATHERED_YEARLY_END_DATE}):g.default.Messages.PREMIUM_PENDING_PLAN_CHANGE_NOTICE.format({planName:t.hasExternalPlanChange?(0,_.getExternalPlanDisplayName)(n):_.default.getDisplayName(n.planId),date:t.currentPeriodEnd})),t.isPurchasedExternally?null:C(f.default,{onClick:function(e){u(!0),e.preventDefault()},className:S.default.cancelLink},void 0,g.default.Messages.CANCEL),l?C(m.default,{renderModal:function(e){var r=e.transitionState;return C(N,{subscription:t,renewalMutations:n,transitionState:r,onClose:function(){return u(!1)}})},onCloseRequest:function(){return u(!1)}}):null)}N.displayName="SubscriptionCancelDowngradeModal",A.displayName="SubscriptionPendingMutation"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_guild_subscriptions_payment_flow_test_page",label:"Test page for guild subscription payment flows",defaultConfig:{enableTestPage:!1},treatments:[{id:1,label:"Test page for guild subscription payment flows",config:{enableTestPage:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=a.useContext(l.AccessibilityPreferencesContext).reducedMotion,t=(0,o.useSpring)({from:{transform:"translateX(-40px)",opacity:0},to:{transform:"translateX(0px)",opacity:1},delay:550,config:o.config.stiff});return(0,d.useAndTrackExposureToExperiment)()?m(o.animated.div,{className:p.default.banner,style:e.enabled?{}:t},void 0,m(s.default,{size:s.default.Sizes.SIZE_14,className:p.default.description},void 0,c.default.Messages.INCENTIVIZED_INSTALL_PREMIUM_SETTINGS_BANNER.format()),m(u.default,{look:u.default.Looks.INVERTED,className:p.default.button,onClick:_},void 0,c.default.Messages.DOWNLOAD)):null};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(122),i=n(1228),l=n(123),u=v(n(29)),s=v(n(24)),d=n(8796),f=n(1),c=v(n(6)),p=v(n(7859));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){(0,i.showAppDownloadModal)(f.AnalyticsSections.SETTINGS_PREMIUM)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("title",{},void 0,"Nitro Classic"),f=s("path",{d:"M75.4829 6.68251L74.5173 13.1841C74.2956 14.7208 72.5637 15.4357 70.9694 15.4357C69.4817 15.4357 68.025 14.7208 68.2186 13.322L69.1842 6.68251C69.406 5.23022 71.1378 4.48437 72.7321 4.48437C74.3236 4.48437 75.7046 5.23022 75.4829 6.68251ZM73.49 0.0120925H63.1185C62.849 0.0120925 62.6273 0.203479 62.5908 0.46523L62.0856 3.90176C62.0406 4.22543 62.2849 4.5097 62.6133 4.5097H64.5051C64.696 4.5097 64.8279 4.70109 64.7493 4.8784C64.5107 5.43286 64.3423 6.03236 64.2441 6.67688L63.2785 13.3163C62.6582 17.7745 66.3745 19.9952 70.4136 19.9952C74.652 19.9952 78.8063 17.7745 79.4434 13.3248L80.409 6.68533C81.0321 2.32563 77.4449 0.104972 73.49 0.0120925ZM11.7242 8.7343L11.7775 11.9232C11.7775 11.9935 11.7326 12.047 11.6708 12.0611L10.5986 8.21924C10.5986 8.2108 10.5986 8.20517 10.5902 8.20517L7.27242 0.332948C7.18821 0.133117 7.00296 0.00927734 6.78963 0.00927734H3.02558C2.76454 0.00927734 2.55121 0.200665 2.51192 0.462416L0.00535493 18.6245C-0.0395555 18.9398 0.204645 19.224 0.519018 19.224H4.26623C4.52727 19.224 4.74902 19.0326 4.77989 18.7709L5.76231 11.5545C5.76231 11.546 5.76231 11.5404 5.76231 11.5319L5.70898 7.82802L5.81564 7.79706L6.9412 11.6389C6.9412 11.6473 6.9412 11.6473 6.94963 11.653L10.0541 18.9004C10.1383 19.0917 10.3235 19.2156 10.5284 19.2156H14.59C14.851 19.2156 15.0728 19.0242 15.1037 18.7624L17.6187 0.603142C17.6636 0.296359 17.4194 0.0120925 17.105 0.0120925H13.3802C13.1192 0.0120925 12.8974 0.203479 12.8666 0.46523L11.7242 8.71178C11.7242 8.72023 11.7242 8.72586 11.7242 8.7343ZM18.9379 19.2268H22.8788C23.1539 19.2268 23.384 19.0355 23.4233 18.7737L26.059 0.611585C26.0983 0.296359 25.8457 0.0120925 25.5145 0.0120925H21.5736C21.2985 0.0120925 21.0683 0.203479 21.029 0.46523L18.3934 18.6273C18.3541 18.9426 18.6067 19.2268 18.9379 19.2268ZM28.8715 0.456787L28.3663 3.85392C28.3214 4.16914 28.574 4.45341 28.894 4.45341H32.9499C33.2783 4.45341 33.5254 4.73768 33.4776 5.0529L31.5689 18.6273C31.5296 18.9426 31.7767 19.2268 32.1051 19.2268H36.0375C36.307 19.2268 36.5372 19.0355 36.5652 18.7737L38.5132 4.90936C38.5525 4.64761 38.7743 4.45622 39.0409 4.45622H43.4028C43.6723 4.45622 43.894 4.26484 43.9305 4.01153L44.4358 0.622844C44.4891 0.299173 44.2449 0.0149065 43.9137 0.0149065H29.3964C29.1382 0.012092 28.908 0.203479 28.8715 0.456787ZM56.2584 6.71347C56.1209 7.82802 55.2395 8.94257 53.721 8.94257H51.4446C51.1218 8.94257 50.8692 8.65831 50.9169 8.34308L51.3997 4.99943C51.4306 4.73768 51.6607 4.54629 51.9274 4.54629H54.3582C55.8121 4.54629 56.396 5.54544 56.2584 6.71347ZM54.9083 0.0120925H47.5739C47.3044 0.0120925 47.0827 0.203479 47.0462 0.46523L44.4638 18.6273C44.4189 18.9426 44.6631 19.2268 44.9915 19.2268H48.9016C49.171 19.2268 49.3928 19.0355 49.4292 18.7737L50.1871 13.3473C50.2011 13.2178 50.3162 13.1165 50.4566 13.1165H50.9618C51.0544 13.1165 51.1387 13.1615 51.1836 13.2404L54.9167 18.982C55.015 19.1368 55.1862 19.2268 55.3686 19.2268H60.1965C60.626 19.2268 60.887 18.7512 60.6344 18.3966L56.7188 12.8857C56.6261 12.7563 56.6739 12.5705 56.817 12.5001C59.3151 11.2927 60.7719 10.0628 61.2463 6.63467C61.7993 2.1258 58.9334 0.0120925 54.9083 0.0120925Z"}),c=s("path",{d:"M97.7021 13.8447L100.93 15.4434C101.107 15.5278 101.174 15.7417 101.09 15.919C101.082 15.9331 101.068 15.9584 101.059 15.9725C98.7379 19.0995 96.0629 19.9917 93.7163 19.9917C89.9214 19.9917 86.4268 17.771 87.0247 13.3522L87.9509 6.65645C88.5488 2.26016 92.6946 0.00854492 96.5737 0.00854492C98.8417 0.00854492 101.432 0.931708 102.592 4.02768C102.684 4.27255 102.561 4.55118 102.317 4.64969L98.968 5.94156C98.7379 6.02599 98.4852 5.94156 98.3561 5.73328C97.8284 4.89456 96.8236 4.5343 95.8103 4.5343C94.4152 4.56526 93.0286 5.33362 92.8349 6.648L91.9087 13.3409C91.7178 14.6018 92.9192 15.4012 94.2861 15.4012C95.2966 15.4012 96.4165 14.979 97.107 13.9855C97.2362 13.8081 97.4944 13.7378 97.7021 13.8447Z"}),p=s("path",{d:"M188.225 13.8447L191.453 15.4434C191.63 15.5278 191.697 15.7417 191.613 15.919C191.604 15.9331 191.59 15.9584 191.582 15.9725C189.261 19.0995 186.586 19.9917 184.239 19.9917C180.444 19.9917 176.95 17.771 177.547 13.3522L178.474 6.65645C179.072 2.26016 183.22 0.00854492 187.097 0.00854492C189.367 0.00854492 191.958 0.931708 193.115 4.02768C193.207 4.27255 193.084 4.55118 192.839 4.64969L189.488 5.94156C189.258 6.02599 189.005 5.94156 188.876 5.73328C188.346 4.89456 187.344 4.5343 186.33 4.5343C184.935 4.56526 183.549 5.33362 183.355 6.648L182.429 13.3409C182.238 14.6018 183.439 15.4012 184.803 15.4012C185.817 15.4012 186.934 14.979 187.624 13.9855C187.759 13.8081 188.02 13.7378 188.225 13.8447Z"}),v=s("path",{d:"M102.724 18.6885L105.177 1.07236C105.239 0.627666 105.621 0.287109 106.075 0.287109H109.157C109.654 0.287109 110.061 0.695214 110.061 1.19338C110.061 1.23842 110.061 1.27782 110.053 1.31722L108.298 13.8221C108.228 14.3203 108.573 14.7763 109.073 14.8523C109.112 14.8607 109.157 14.8607 109.197 14.8607H114.984C115.481 14.8607 115.888 15.2688 115.888 15.767C115.888 15.8064 115.888 15.8514 115.88 15.8908L115.467 18.9333C115.405 19.3865 115.024 19.7186 114.569 19.7186H103.622C103.122 19.7186 102.718 19.3105 102.718 18.8123C102.715 18.7729 102.715 18.725 102.724 18.6885Z"}),y=s("path",{d:"M135 18.6181L131.191 1.002C131.099 0.588262 130.731 0.287109 130.31 0.287109H127.152C126.807 0.287109 126.493 0.48694 126.341 0.793723L117.78 18.4098C117.718 18.5337 117.687 18.6716 117.687 18.8095C117.687 19.3105 118.094 19.7158 118.591 19.7158H121.794C122.153 19.7158 122.476 19.499 122.622 19.1782L123.863 16.3665C124.009 16.0372 124.331 15.8289 124.691 15.8289H128.508C128.946 15.8289 129.322 16.1357 129.398 16.5663L129.858 18.9868C129.942 19.4174 130.313 19.7242 130.748 19.7242H134.122C134.184 19.7242 134.254 19.7158 134.313 19.7017C134.796 19.5947 135.107 19.1106 135 18.6181ZM125.816 11.4551L127.947 5.77543H128.138L128.713 11.4551H125.816Z"}),m=s("path",{d:"M136.988 15.9809L139.157 14.1739C139.534 13.8587 140.078 13.8728 140.446 14.2049C141.341 15.0183 142.624 15.4348 143.794 15.4348C145.105 15.4348 146.256 14.9648 146.447 13.9516C146.663 12.7442 144.976 12.2235 143.421 11.9983C140.392 11.5058 137.656 9.06277 138.341 5.38137C139.076 1.39882 142.571 0 146.121 0C148.235 0 150.222 0.537574 151.817 2.43738C152.083 2.76105 152.047 3.24514 151.724 3.52097C151.71 3.53504 151.685 3.55193 151.671 3.566L149.363 5.17309C149.041 5.39544 148.611 5.38137 148.305 5.14213C147.508 4.51168 146.472 4.2049 145.552 4.18238C144.325 4.15142 143.284 4.62145 143.177 5.61216C143.039 6.73515 144.019 7.23332 145.498 7.56544C148.855 8.19589 152.137 9.48776 151.233 14.3203C150.52 18.1086 147.247 20 143.07 20C140.985 20 138.456 19.0459 136.892 17.1573C136.589 16.7971 136.634 16.2736 136.988 15.9809Z"}),_=s("path",{d:"M153.419 15.9809L155.589 14.1739C155.965 13.8587 156.518 13.8728 156.877 14.2049C157.776 15.0183 159.053 15.4348 160.226 15.4348C161.537 15.4348 162.685 14.9648 162.879 13.9516C163.095 12.7442 161.408 12.2235 159.85 11.9983C156.824 11.5058 154.087 9.06277 154.769 5.38137C155.505 1.39882 158.999 0 162.55 0C164.664 0 166.651 0.537574 168.245 2.43738C168.512 2.76105 168.475 3.24514 168.153 3.52097C168.139 3.53504 168.113 3.55193 168.099 3.566L165.792 5.17309C165.469 5.39544 165.04 5.38137 164.734 5.14213C163.937 4.51168 162.904 4.2049 161.983 4.18238C160.757 4.15142 159.715 4.62145 159.608 5.61216C159.471 6.73515 160.451 7.23332 161.93 7.56544C165.287 8.19589 168.568 9.48776 167.664 14.3203C166.951 18.1086 163.678 20 159.502 20C157.419 20 154.887 19.0459 153.324 17.1573C153.021 16.7971 153.066 16.2736 153.419 15.9809Z"}),h=s("path",{d:"M176.537 1.31722L174.084 18.9333C174.022 19.378 173.64 19.7186 173.186 19.7186H170.129C169.629 19.7186 169.225 19.3105 169.225 18.8123C169.225 18.7729 169.225 18.7279 169.234 18.6885L171.687 1.07236C171.748 0.627666 172.13 0.287109 172.585 0.287109H175.642C176.138 0.287109 176.548 0.695214 176.548 1.19338C176.545 1.23279 176.545 1.27782 176.537 1.31722Z"});function E(e){var t=e.width,n=void 0===t?194:t,r=e.height,a=void 0===r?20:r,l=e.color,E=void 0===l?"currentColor":l,g=e.foreground,S=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(S),{width:n,height:a,viewBox:"0 0 194 20"}),d,s("g",{fill:E,className:g,fillRule:"evenodd",clipRule:"evenodd","aria-hidden":!0},void 0,f,c,p,v,y,m,_,h))}E.displayName="NitroClassicHorizontal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(10172),l=p(n(257)),u=p(n(1147)),s=p(n(29)),d=p(n(153)),f=n(5688),c=p(n(7392));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y("div",{},void 0,"header"),_=function(e){var t=e.skuId,n=e.skuGroup,r=(0,o.useStateFromStoresObject)([l.default],(function(){return{plansForSku:l.default.getForSKU(t),plansInSkuGroup:l.default.getPlanIdsForSkus(n)}})),a=r.plansForSku,i=r.plansInSkuGroup,d=(0,o.useStateFromStores)([u.default],(function(){return u.default.getSubscriptionForPlanIds(i)}));return y("ul",{},void 0," ",a.map((function(e){return y("li",{},e.id,y(s.default,{onClick:function(){(0,f.openGuildSelectPlanModal)({activeSubscription:null!=d?d:void 0,renderHeader:function(){return m},initialPlanId:e.id,planGroup:i,renderPurchaseConfirmation:function(e,t){return y("div",{},void 0,"You bought ",null==e?void 0:e.name)}})}},void 0,"Buy "+e.name+": "+t))}))," ")};function h(){var e=a.useState(""),t=e[0],n=e[1],r=a.useState([]),o=r[0],l=r[1],u=o.map((function(e){return y("li",{},e,y(_,{skuId:e,skuGroup:o}))}));return y("div",{},void 0,y("div",{className:c.default.marketingRefreshTitle},void 0,"Server Subscriptions"),y(d.default,{placeholder:"Enter skus in sku group",value:t,onChange:function(e){return n(e)}}),y(s.default,{onClick:function(){var e=t.split(",").map((function(e){return e.trim()}));e.forEach((function(e){return(0,i.fetchSubscriptionPlansForSKU)(e)})),l(e)}},void 0,"Fetch Plans"),y("ul",{},void 0,u))}_.displayName="GuildSubscriptionButtons",h.displayName="GuildSubscriptionsTestButtonsGenerator"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchSubscriptionPlansForSKU=function(e){return d.apply(this,arguments)};var r=l(n(2)),a=l(n(195)),o=n(289),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}function d(){return(d=s(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.default.dispatch({type:i.ActionTypes.SUBSCRIPTION_PLANS_FETCH,skuId:t}),e.prev=1,e.next=4,(0,o.httpGetWithCountryCodeQuery)({url:i.Endpoints.STORE_PUBLISHED_LISTINGS_SUBSCRIPTION_PLANS(t),oldFormErrors:!0});case 4:n=e.sent,r.default.dispatch({type:i.ActionTypes.SUBSCRIPTION_PLANS_FETCH_SUCCESS,skuId:t,subscriptionPlans:n.body}),e.next=12;break;case 8:throw e.prev=8,e.t0=e.catch(1),r.default.dispatch({type:i.ActionTypes.SUBSCRIPTION_PLANS_FETCH_FAILURE,skuId:t}),new a.default(e.t0);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return a.createElement(a.Fragment,null,U,N(_.default,{className:T.default.featuresHeader,size:_.default.Sizes.SIZE_32},void 0,I.default.Messages.PREMIUM_MARKETING_FEATURE_HEADER),G)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=n(3),l=C(n(473)),u=n(5943),s=C(n(39)),d=C(n(29)),f=C(n(61)),c=C(n(149)),p=C(n(1236)),v=C(n(10174)),y=C(n(22)),m=n(8263),_=C(n(47)),h=C(n(24)),E=n(281),g=n(280),S=n(9062),O=n(1),I=C(n(6)),T=C(n(7861));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A={page:O.AnalyticsPages.USER_SETTINGS,section:O.AnalyticsSections.SETTINGS_PREMIUM},P={look:d.default.Looks.INVERTED,color:d.default.Colors.BRAND};function R(){return N("div",{className:T.default.hero},void 0,N(v.default,{className:T.default.heroIcon}),N(_.default,{className:T.default.heroHeader,size:_.default.Sizes.SIZE_24},void 0,I.default.Messages.PREMIUM_MARKETING_HERO_HEADER),N(h.default,{color:h.default.Colors.CUSTOM,className:T.default.heroBody,size:h.default.Sizes.SIZE_16},void 0,I.default.Messages.PREMIUM_MARKETING_HERO_BODY),N(S.PremiumTier2Buttons,{className:T.default.heroButtons,premiumModalAnalyticsLocation:A,subscribeButtonProps:P,giftButtonProps:P}))}function L(e){var t=e.title,n=e.description,r=e.className,i=e.imgSrc,l=e.children,u=e.isNew,s=void 0!==u&&u;return N("li",{className:(0,o.default)(T.default.feature,r)},void 0,s?N(j,{className:T.default.featureNewBadge}):null,N(_.default,{className:T.default.featureTitle,size:_.default.Sizes.SIZE_20},void 0,t),N(h.default,{className:T.default.featureDescription,size:h.default.Sizes.SIZE_14},void 0,n),a.createElement(a.Fragment,null,null!=i?N("div",{className:T.default.featureImageWrapper},void 0,N("img",{className:T.default.featureImage,src:i,alt:""})):null,null!=l?N("div",{className:T.default.featureChildrenWrapper},void 0,l):null))}R.displayName="Hero",L.displayName="Feature";var D=N("path",{d:"M9.30705 8.36284L13.5731 6.46363C13.5889 6.45487 13.6022 6.44203 13.6114 6.42644C13.6206 6.41086 13.6255 6.39309 13.6255 6.375C13.6255 6.35691 13.6206 6.33914 13.6114 6.32356C13.6022 6.30797 13.5889 6.29513 13.5731 6.28637L9.30705 4.38716C9.29358 4.38716 9.28066 4.38183 9.27114 4.37233C9.26162 4.36283 9.25627 4.34995 9.25627 4.33652L7.3518 0.0569762C7.30102 -0.0189921 7.19944 -0.0189921 7.17405 0.0569762L5.26958 4.33652C5.24419 4.36184 5.24419 4.38716 5.2188 4.38716L0.927401 6.28637C0.911525 6.29513 0.898291 6.30797 0.889077 6.32356C0.879862 6.33914 0.875 6.35691 0.875 6.375C0.875 6.39309 0.879862 6.41086 0.889077 6.42644C0.898291 6.44203 0.911525 6.45487 0.927401 6.46363L5.2188 8.36284C5.24419 8.36284 5.24419 8.38816 5.26958 8.41348L7.17405 12.693C7.19944 12.769 7.30102 12.769 7.3518 12.693L9.25627 8.41348C9.25627 8.40005 9.26162 8.38717 9.27114 8.37767C9.28066 8.36817 9.29358 8.36284 9.30705 8.36284Z",fill:"currentColor"});function w(e){return a.createElement("svg",M({},(0,y.default)(M({},e)),{width:"14",height:"13",viewBox:"0 0 14 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),D)}function j(e){var t=e.className;return N("span",{className:(0,o.default)(T.default.newBadgeContainer,t)},void 0,N(m.TextBadge,{disableColor:!0,className:T.default.newBadge,text:I.default.Messages.NEW}),N(w,{className:T.default.sparkleStarTopRight}),N(w,{className:T.default.sparkleStarRight}),N(w,{className:T.default.sparkleStarBottomLeft}))}function k(){var e=(0,u.useAndTriggerGuildMemberAvatarExperiment)(),t=(0,i.useStateFromStores)([s.default],(function(){return s.default.locale})),r=a.useRef(null);return a.createElement("div",{ref:r,className:T.default.featureGrid},N(L,{isNew:!0,title:I.default.Messages.PREMIUM_FEATURES_PROFILE_CUSTOMIZATION_HEADER,description:I.default.Messages.PREMIUM_FEATURES_PROFILE_CUSTOMIZATION_SUBHEADER,className:T.default.featureProfile,imgSrc:n(10175)}),N(L,{isNew:!0,title:I.default.Messages.PREMIUM_MARKETING_FEATURE_STICKERS_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_STICKERS_DESCRIPTION.format({infoHook:function(e,t){return N(c.default,{text:I.default.Messages.PREMIUM_MARKETING_FEATURE_STICKERS_INFO},t,(function(e){return a.createElement(p.default,M({},e,{className:T.default.itemInfoIcon}))}))}}),className:T.default.stickers,imgSrc:n(10176)}),e?N(L,{isNew:!0,title:I.default.Messages.PER_GUILD_AVATARS_PREMIUM_FEATURE_TITLE,description:I.default.Messages.PER_GUILD_AVATARS_PREMIUM_FEATURE_DESCRIPTION,className:T.default.featurePerGuildAvatar,imgSrc:n(10177)}):null,N(L,{title:I.default.Messages.PREMIUM_MARKETING_FEATURE_EMOJI_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_EMOJI_DESCRIPTION,className:T.default.featureEmoji,imgSrc:n(10178)}),N(L,{title:I.default.Messages.PREMIUM_MARKETING_FEATURE_PROFILE_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_PROFILE_DESCRIPTION,className:T.default.featureProfile,imgSrc:n(10179)}),N(L,{title:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_GUILD_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_GUILD_DESCRIPTION.format({numFreeGuildSubscriptions:g.NUM_FREE_GUILD_SUBSCRIPTIONS_WITH_PREMIUM,percentageOff:(0,E.formatPercent)(t,g.PREMIUM_GUILD_FOR_PREMIUM_USER_DISCOUNT_PERCENT/100),learnMoreHook:function(e,t){return N(f.default,{className:T.default.learnMoreLink,tag:"span",onClick:function(){return l.default.open(O.UserSettingsSections.PREMIUM_GUILD_SUBSCRIPTION)}},t,e)}}),className:T.default.featurePremiumGuild,imgSrc:n(10180)}),N(L,{title:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_BADGE_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_BADGE_DESCRIPTION,className:T.default.featureBadge,imgSrc:n(10181)}),N(L,{title:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_UPLOAD_SIZE_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_UPLOAD_SIZE_DESCRIPTION,className:T.default.featureUploadSize,imgSrc:n(10182)}),N(L,{title:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_GO_LIVE_TITLE,description:I.default.Messages.PREMIUM_MARKETING_FEATURE_PREMIUM_GO_LIVE_DESCRIPTION.format({infoHook:function(e,t){return N(c.default,{text:I.default.Messages.MARKETING_REFRESH_PREMIUM_FEATURES_GO_LIVE_INFO},t,(function(e){return a.createElement(p.default,M({},e,{className:T.default.itemInfoIcon}))}))}}),className:T.default.featureGoLive,imgSrc:n(10183)}),N(L,{title:I.default.Messages.PREMIUM_FEATURES_MESSAGE_LENGTH_HEADING,description:I.default.Messages.PREMIUM_FEATURES_MESSAGE_LENGTH_SUBHEADING,className:T.default.featureLongerMessageContent,imgSrc:n(10184)}),N(L,{title:I.default.Messages.GUILD_CAP_PREMIUM_FEATURE_TITLE,description:I.default.Messages.GUILD_CAP_PREMIUM_FEATURE_DESCRIPTION,className:T.default.featureMoreServers,imgSrc:n(10185)}))}w.displayName="BadgeSparkleStar",j.displayName="NewBadge",k.displayName="FeatureGrid";var U=N(R,{}),G=N(k,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(){return(i=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}).apply(this,arguments)}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var u=l("path",{d:"M135.444 24.5787H117.119C116.652 24.5787 116.243 24.9294 116.184 25.397L115.307 31.4759C115.22 32.0312 115.658 32.5572 116.243 32.5572H119.603C119.954 32.5572 120.159 32.9079 120.042 33.2002C119.633 34.1646 119.311 35.246 119.165 36.3858L117.47 48.1637C116.359 56.0546 122.906 59.9708 130.066 59.9708C137.548 59.9708 144.913 56.0253 146.023 48.1637L147.718 36.3858C148.771 28.6702 142.429 24.754 135.444 24.5787ZM138.951 36.415L137.256 47.9299C136.876 50.6478 133.807 51.9045 130.972 51.9045C128.342 51.9045 125.77 50.6478 126.121 48.1637L127.816 36.3858C128.196 33.8139 131.264 32.4988 134.099 32.4988C136.934 32.4988 139.36 33.8139 138.951 36.415Z"}),s=l("path",{d:"M33.7681 24.5787H26.9294C26.4618 24.5787 26.0526 24.9294 25.9942 25.397L23.8899 40.3897V40.4189L23.9776 46.2056C23.9776 46.3225 23.8899 46.4394 23.773 46.4686L21.8149 39.4837V39.4545L15.7068 25.1632C15.5606 24.8125 15.2099 24.5787 14.83 24.5787H7.90356C7.43595 24.5787 7.0268 24.9294 6.96835 25.397L2.35071 58.4218C2.26304 59.0063 2.73064 59.5032 3.28593 59.5032H10.1832C10.6508 59.5032 11.0599 59.1525 11.1184 58.6849L12.9304 45.5626V45.5334L12.8427 38.8115L13.0473 38.7531L15.1223 45.7379V45.7672L20.8212 58.9479C20.9674 59.2986 21.3181 59.5324 21.698 59.5324H29.1797C29.6474 59.5324 30.0565 59.1817 30.115 58.7141L34.7326 25.6892C34.8203 25.1047 34.3527 24.5787 33.7681 24.5787Z"}),d=l("path",{d:"M48.7314 24.5787H41.8342C41.3666 24.5787 40.9575 24.9294 40.899 25.397L36.2814 58.3926C36.1937 58.9771 36.6613 59.474 37.2166 59.474H44.1138C44.5814 59.474 44.9906 59.1232 45.049 58.6556L49.6667 25.66C49.7543 25.1047 49.316 24.5787 48.7314 24.5787Z"}),f=l("path",{d:"M81.0843 24.5787H55.2782C54.8106 24.5787 54.4014 24.9294 54.343 25.397L53.437 31.5636C53.3493 32.1481 53.7877 32.6449 54.3722 32.6449H61.5909C62.1754 32.6449 62.6138 33.1418 62.5261 33.7263L59.1359 58.3926C59.0483 58.9771 59.5159 59.474 60.0712 59.474H67.0561C67.5237 59.474 67.9328 59.1232 67.9913 58.6556L71.4691 33.4632C71.5276 32.9956 71.9367 32.6449 72.4043 32.6449H80.1491C80.6167 32.6449 81.0259 32.2942 81.0843 31.8266L81.9903 25.66C82.1364 25.1047 81.6688 24.5787 81.0843 24.5787Z"}),c=l("path",{d:"M100.811 24.5787H87.6892C87.2216 24.5787 86.8124 24.9294 86.754 25.397L82.1364 58.3926C82.0487 58.9771 82.5163 59.4739 83.0716 59.4739H90.0565C90.5241 59.4739 90.9332 59.1232 90.9917 58.6556L92.3361 48.8066C92.3653 48.5728 92.5699 48.3975 92.8037 48.3975H93.7097C93.885 48.3975 94.0312 48.4851 94.1188 48.6313L100.782 59.0648C100.958 59.3278 101.25 59.5032 101.601 59.5032H110.251C111.011 59.5032 111.479 58.6264 111.04 58.0127L104.026 47.9883C103.851 47.7545 103.939 47.4038 104.202 47.2869C108.673 45.095 111.274 42.8738 112.122 36.6196C113.115 28.4364 108.001 24.5787 100.811 24.5787ZM103.208 36.7657C102.974 38.7823 101.396 40.7988 98.678 40.7988H94.6157C94.0311 40.7988 93.5928 40.2728 93.6804 39.7175L94.5572 33.6386C94.6157 33.171 95.0248 32.8203 95.4924 32.8203H99.847C102.419 32.8203 103.471 34.6615 103.208 36.7657Z"}),p=l("path",{d:"M59.8372 3.6824H64.8055C66.0037 3.6824 67.0266 3.85776 67.845 4.23769C68.6048 4.55917 69.2478 5.11445 69.7154 5.81587C70.1246 6.51728 70.3584 7.30637 70.3291 8.09546C70.3291 8.91377 70.1246 9.70286 69.6862 10.4043C69.2186 11.1349 68.5171 11.6902 67.7281 12.0409C66.8513 12.4501 65.7407 12.6546 64.4548 12.6546H59.8372V3.6824V3.6824ZM64.3963 10.3458C65.2147 10.3458 65.8284 10.1412 66.2668 9.73209C66.7052 9.2937 66.939 8.70919 66.9097 8.06623C66.939 7.48172 66.7344 6.92644 66.3252 6.51728C65.9453 6.13735 65.3608 5.93277 64.5717 5.93277H63.0227V10.3166H64.3963V10.3458Z"}),v=l("path",{d:"M77.8109 12.6254C77.1679 12.4501 76.5249 12.187 75.9404 11.8363V9.70286C76.4373 10.0828 77.0218 10.3458 77.6063 10.4919C78.2785 10.6965 78.9507 10.7842 79.6521 10.8134C79.8859 10.8134 80.1197 10.7842 80.3535 10.6965C80.4996 10.6088 80.5873 10.5212 80.5873 10.4043C80.5873 10.2874 80.5581 10.1705 80.4704 10.0828C80.3243 9.96589 80.1489 9.90743 79.9735 9.87821L78.4538 9.5275C77.5771 9.32292 76.9633 9.03067 76.5834 8.67996C76.2035 8.30003 75.9989 7.77397 76.0281 7.24791C76.0281 6.7803 76.2035 6.31269 76.5249 5.96199C76.9049 5.55283 77.3725 5.26058 77.8985 5.11445C78.5707 4.90987 79.2721 4.79297 80.0028 4.82219C80.675 4.82219 81.3179 4.88064 81.9609 5.056C82.4869 5.1729 82.9838 5.37748 83.4514 5.64051V7.65707C83.013 7.39404 82.5454 7.21869 82.0778 7.10178C81.5517 6.95566 80.9964 6.89721 80.4704 6.89721C79.6813 6.89721 79.2721 7.04333 79.2721 7.30636C79.2721 7.42326 79.3306 7.54017 79.4475 7.59862C79.6521 7.68629 79.8859 7.74475 80.1197 7.8032L81.4056 8.037C82.2239 8.18313 82.8669 8.44616 83.276 8.79686C83.6852 9.14757 83.8898 9.70286 83.8898 10.4043C83.8898 11.1641 83.5098 11.8655 82.8669 12.2455C82.1947 12.6839 81.2302 12.9177 79.9735 12.9177C79.2137 12.8884 78.483 12.8008 77.8109 12.6254Z"}),y=l("path",{d:"M86.8417 12.3624C86.1696 12.0409 85.585 11.5441 85.1759 10.9011C84.796 10.2874 84.6206 9.55675 84.6206 8.82612C84.6206 8.09548 84.796 7.39407 85.2051 6.78033C85.6143 6.13737 86.1988 5.66976 86.9002 5.34828C87.7477 4.99757 88.6537 4.79299 89.5597 4.82222C90.8456 4.82222 91.8978 5.08525 92.7453 5.64053V7.97858C92.4238 7.774 92.0731 7.59864 91.6932 7.48174C91.284 7.36484 90.8456 7.27716 90.4073 7.27716C89.6182 7.27716 89.0044 7.42329 88.5368 7.71555C87.8939 8.06625 87.6893 8.85534 88.04 9.4983C88.1569 9.70288 88.3322 9.87824 88.5368 9.99514C88.9752 10.2874 89.5889 10.4335 90.4365 10.4335C90.8749 10.4335 91.284 10.3751 91.6932 10.2582C92.0731 10.1413 92.4238 9.99514 92.7453 9.79056V12.0409C91.7516 12.6254 90.6411 12.9177 89.5013 12.8885C88.5953 12.9177 87.6893 12.7423 86.8417 12.3624Z"}),m=l("path",{d:"M95.931 12.3624C95.2295 12.0409 94.645 11.5441 94.2359 10.9011C93.8559 10.2874 93.6514 9.55674 93.6514 8.8261C93.6514 8.09547 93.8267 7.39405 94.2359 6.78032C94.645 6.16658 95.2295 5.66975 95.931 5.37749C97.5968 4.70531 99.4965 4.70531 101.162 5.37749C101.835 5.66975 102.419 6.16658 102.828 6.78032C103.208 7.39405 103.413 8.12469 103.413 8.8261C103.413 9.55674 103.208 10.2874 102.828 10.9011C102.419 11.5441 101.835 12.0409 101.162 12.3624C99.4965 13.0638 97.5968 13.0638 95.931 12.3624ZM99.818 10.0828C100.139 9.76132 100.315 9.29371 100.286 8.85533C100.315 8.38772 100.139 7.94934 99.818 7.62786C99.4673 7.30638 98.9996 7.16025 98.532 7.16025C98.0644 7.13102 97.5968 7.30638 97.2461 7.62786C96.9246 7.94934 96.7493 8.38772 96.7785 8.85533C96.7493 9.32294 96.9246 9.76132 97.2461 10.0828C97.5968 10.4043 98.0644 10.5796 98.532 10.5504C98.9996 10.5796 99.4673 10.4043 99.818 10.0828Z"}),_=l("path",{d:"M111.099 5.28981V8.06624C110.719 7.83243 110.281 7.71553 109.842 7.74476C109.17 7.74476 108.644 7.94934 108.264 8.35849C107.913 8.76765 107.709 9.41061 107.709 10.2874V12.6254H104.582V5.14369H107.65V7.51095C107.826 6.63419 108.089 5.99123 108.469 5.58207C108.848 5.17291 109.375 4.93911 109.93 4.96833C110.339 4.96833 110.748 5.08523 111.099 5.28981Z"}),h=l("path",{d:"M121.474 3.41937V12.6254H118.347V10.9596C118.113 11.5441 117.675 12.0701 117.149 12.3916C116.535 12.7423 115.863 12.9177 115.161 12.8884C114.518 12.9177 113.875 12.7131 113.32 12.3624C112.794 12.0117 112.356 11.5148 112.093 10.9303C111.8 10.2874 111.654 9.58596 111.654 8.88455C111.625 8.15391 111.8 7.42327 112.093 6.78031C112.385 6.16657 112.853 5.66974 113.408 5.31903C113.992 4.96833 114.665 4.79297 115.337 4.79297C116.827 4.79297 117.821 5.43593 118.347 6.72186V3.41937H121.474ZM117.909 10.0243C118.23 9.70286 118.405 9.26448 118.376 8.82609C118.376 8.38771 118.201 7.94933 117.909 7.65707C117.178 7.04334 116.126 7.04334 115.366 7.65707C115.044 7.97855 114.869 8.38771 114.898 8.82609C114.869 9.26448 115.044 9.70286 115.366 10.0243C115.717 10.3458 116.155 10.4919 116.623 10.4919C117.09 10.5212 117.558 10.3458 117.909 10.0243Z"}),E=l("path",{d:"M48.2932 1.46128C46.7735 0.789089 45.1661 0.292255 43.5002 0C43.2664 0.409157 43.0618 0.818315 42.8865 1.2567C41.133 0.993668 39.321 0.993668 37.5674 1.2567C37.3921 0.818315 37.1875 0.409157 36.9537 0C35.2879 0.292255 33.6804 0.789089 32.1607 1.4905C29.1213 5.96201 28.303 10.3458 28.7121 14.642C30.4949 15.9571 32.4822 16.9508 34.5864 17.5938C35.054 16.9508 35.4924 16.2786 35.8431 15.5772C35.171 15.3142 34.4988 14.9927 33.8558 14.642C34.0312 14.5251 34.1773 14.4082 34.3526 14.2913C38.0643 16.0448 42.3604 16.0448 46.1013 14.2913C46.2474 14.4082 46.4228 14.5543 46.5981 14.642C45.9552 15.0219 45.3122 15.3434 44.6108 15.5772C44.9615 16.2786 45.3999 16.9508 45.8675 17.5938C47.9717 16.9508 49.9591 15.9571 51.7418 14.642C52.2386 9.64442 50.9235 5.31904 48.2932 1.46128ZM36.3984 11.9825C35.2586 11.9825 34.2942 10.9303 34.2942 9.67365C34.2942 8.41695 35.2002 7.3356 36.3692 7.3356C37.5382 7.3356 38.4734 8.38772 38.4734 9.67365C38.4734 10.9596 37.5674 11.9825 36.3984 11.9825ZM44.114 11.9825C42.9742 11.9825 42.0389 10.9303 42.0389 9.67365C42.0389 8.41695 42.9449 7.3356 44.114 7.3356C45.283 7.3356 46.2182 8.38772 46.189 9.67365C46.1597 10.9596 45.2538 11.9825 44.114 11.9825Z"}),g=l("path",{d:"M72.9889 5.96202C73.8444 5.96202 74.5378 5.33396 74.5378 4.5592C74.5378 3.78444 73.8444 3.15637 72.9889 3.15637C72.1334 3.15637 71.4399 3.78444 71.4399 4.5592C71.4399 5.33396 72.1334 5.96202 72.9889 5.96202Z"}),S=l("path",{d:"M71.4104 6.92645C72.4041 7.33561 73.5439 7.33561 74.5375 6.92645V12.6839H71.4104V6.92645Z"});function O(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.foreground,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["color","foreground"]);return a.createElement("svg",i({},o,{viewBox:"0 0 149 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),l("g",{className:r,fill:n},void 0,u,s,d,f,c,p,v,y,m,_,h,E,g,S))}O.displayName="NitroStackedIcon"},function(e,t,n){e.exports=n.p+"d7ff363b09ab2d8cec4f4a4933fcd589.svg"},function(e,t,n){e.exports=n.p+"9e6263705c5d39cd4f3c26b353208b29.svg"},function(e,t,n){e.exports=n.p+"07f041fc91c18e7ce56a6d12c568acdc.png"},function(e,t,n){e.exports=n.p+"ac6a1118b3a9266551ac5fe1cc6f05ca.svg"},function(e,t,n){e.exports=n.p+"844d97f0961fcfd35bb12d450f21b076.svg"},function(e,t,n){e.exports=n.p+"d4053689db0ab9e30abcfd4737017598.svg"},function(e,t,n){e.exports=n.p+"dfbe1ee67ae724b485a7d61961457f17.svg"},function(e,t,n){e.exports=n.p+"ee4463cea419cc2442892787bc27c435.png"},function(e,t,n){e.exports=n.p+"d14825a72be9bc05e41a5579c03d8e94.png"},function(e,t,n){e.exports=n.p+"cb42ba50d7cf18fc9853d40ecd26bf8f.svg"},function(e,t,n){e.exports=n.p+"6bb6b608827debf8ff08b1ae403acc59.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=_(n(9)),o=_(n(8)),i=n(3),l=_(n(12)),u=_(n(257)),s=_(n(1147)),d=_(n(5686)),f=_(n(47)),c=_(n(24)),p=_(n(96)),v=n(1),y=_(n(6)),m=_(n(7862));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.user,n=e.planId,r=e.count,a=e.userPremiumSubscription,o=(0,i.useStateFromStoresArray)([u.default],(function(){return[u.default.get(n),null!=a?u.default.get(a.planId):null]})),l=o[0],s=o[1];if(null==l||p.default.getInterval(n)!==v.SubscriptionIntervalTypes.MONTH)return null;var _=null!=s?s.skuId:null,h=l.skuId===_,g=p.default.getDisplayName(n);return E("div",{className:m.default.accountCreditRow},void 0,E("div",{className:l.skuId===v.PremiumSubscriptionSKUs.TIER_2?m.default.iconBackgroundTier2:m.default.iconBackgroundTier1},void 0,E(d.default,{className:m.default.icon})),E("div",{className:m.default.rowDetails},void 0,E(f.default,{size:f.default.Sizes.SIZE_16},void 0,y.default.Messages.PREMIUM_SUBSCRIPTION_CREDIT.format({planName:g})),t.hasFreePremium()?null:E(f.default,{muted:!0,className:m.default.rowApplied},void 0,h&&null!=a?y.default.Messages.PREMIUM_SUBSCRIPTION_CREDIT_APPLIED_ON.format({date:a.currentPeriodEnd}):y.default.Messages.PREMIUM_SUBSCRIPTION_CREDIT_APPLIED_MISMATCHED_PLAN.format({planName:g}))),E(c.default,{className:m.default.rowCreditCount,size:c.default.Sizes.SIZE_16},void 0,y.default.Messages.PREMIUM_SUBSCRIPTION_CREDIT_COUNT_MONTHS.format({count:r})))}function S(e){var t=e.className,n=e.entitlements,r=(0,o.default)(Array.from(n)).filter((function(e){var t=e.subscriptionPlanId,n=e.parentId,r=e.consumed;return null!=t&&null!=n&&!r})).groupBy((function(e){return e.subscriptionPlanId})).value(),u=(0,i.useStateFromStores)([s.default],(function(){return s.default.getPremiumSubscription()})),d=(0,i.useStateFromStores)([l.default],(function(){return l.default.getCurrentUser()}));return E("div",{className:(0,a.default)(t,m.default.premiumSubscriptionAccountCredit)},void 0,Object.keys(r).map((function(e){return E(g,{planId:e,count:r[e].length,userPremiumSubscription:u,user:d},e)})))}g.displayName="AccountCreditRow",S.displayName="PremiumSubscriptionAccountCredit";var O=S;t.default=O},function(e,t,n){e.exports=n.p+"5a4ac7879fb43bc2509169b8fac68a4a.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(8344),l=(r=n(9233))&&r.__esModule?r:{default:r};function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).fetchStoreListing=function(e){var n=t.props,r=n.storeListingId,a=n.skuId,o=n.applicationId,l=null!=e?e:a;return null!=r?(0,i.fetchStoreListingById)(r):null!=l?(0,i.fetchStoreListingForSku)(l):null!=o?(0,i.fetchStoreListingForApplication)(o):void 0},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.componentDidMount=function(){this.fetchStoreListing()},a.render=function(){var e=this.props,t=e.skuId,n=e.applicationId,r=e.slug,a=e.storeListingId,o=e.pageSize,i=e.location;return s(l.default,{inputSkuId:t,applicationId:n,fetchStoreListing:this.fetchStoreListing,slug:r,storeListingId:a,location:i,pageSize:o})},r}(o.Component);f.displayName="DirectoryStoreListing";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchStatisticsForApplication=function(e){return d.apply(this,arguments)};var r=l(n(14)),a=l(n(2)),o=l(n(195)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}function d(){return(d=s(regeneratorRuntime.mark((function e(t){var n,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.default.dispatch({type:i.ActionTypes.APPLICATION_ACTIVITY_STATISTICS_FETCH_START,applicationId:t}),e.prev=1,e.next=4,r.default.get({url:i.Endpoints.APPLICATION_ACTIVITY_STATISTICS(t),oldFormErrors:!0});case 4:return n=e.sent,l=n.body,a.default.dispatch({type:i.ActionTypes.APPLICATION_ACTIVITY_STATISTICS_FETCH_SUCCESS,statistics:l,applicationId:t}),e.abrupt("return",l);case 10:throw e.prev=10,e.t0=e.catch(1),a.default.dispatch({type:i.ActionTypes.APPLICATION_ACTIVITY_STATISTICS_FETCH_FAIL,applicationId:t}),new o.default(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(7865))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(){return l("div",{className:o.default.divider})}u.displayName="Divider"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}function d(e){return function e(t){return Object.keys(t).forEach((function(n){null==t[n]?delete t[n]:"object"==typeof t[n]&&(t[n]=e(t[n]))})),t}(function(e){var t;try{t=JSON.parse(JSON.stringify(e))}catch(e){throw new Error("[JSONLD] Invalid object format")}return t}(e))}function f(e,t){return s({"@type":e},d(t))}function c(e){return f(a.THING,e)}!function(e){e.THING="Thing",e.PERSON="Person",e.PRODUCT="Product",e.OFFER="Offer",e.AGGREGATE_OFFER="AggregateOffer",e.RATING="Rating",e.AGGREGATE_RATING="AggregateRating",e.ORGANIZATION="Organization",e.ITEM_PAGE="ItemPage",e.UNIT_PRICE_SPECIFICATION="UnitPriceSpecification",e.QUANTITATIVE_VALUE="QuantitativeValue"}(a||(a={}));var p,v,y,m=c;function _(e){return f(a.PRODUCT,e)}function h(e){return f(a.OFFER,e)}function E(e){return f(a.QUANTITATIVE_VALUE,e)}_.Image=function(e){if(null==e)return null;var t=e.filter((function(e){return null!=e&&""!==e}));return 0===t.length?null:1===t.length?t[0]:t},function(e){e.DAMAGED="http://schema.org/DamagedCondition",e.NEW="http://schema.org/NewCondition",e.REFURBISHED="http://schema.org/RefurbishedCondition",e.USED="http://schema.org/UsedCondition"}(p||(p={})),function(e){e.DISCONTINUED="http://schema.org/Discontinued",e.IN_STOCK="http://schema.org/InStock",e.IN_STORE_ONLY="http://schema.org/InStoreOnly",e.LIMITED_AVAILABILITY="http://schema.org/LimitedAvailability",e.ONLINE_ONLY="http://schema.org/OnlineOnly",e.OUT_OF_STOCK="http://schema.org/OutOfStock",e.PREORDER="http://schema.org/PreOrder",e.PRESALE="http://schema.org/PreSale",e.SOLD_OUT="http://schema.org/SoldOut"}(v||(v={})),h.ItemConditions=p,h.ItemAvailability=v,function(e){e.YEARLY="ANN",e.MONTHLY="MON"}(y||(y={})),E.UnitCodes=y;var g=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),r.prototype.render=function(){var e=this.props,t=(e.debug,e.data);return l("script",{type:"application/ld+json"},void 0,JSON.stringify(s({"@context":"http://schema.org"},t)))},r}(o.Component);g.displayName="JSONLD",g.Thing=c,g.Brand=m,g.Person=function(e){return f(a.PERSON,e)},g.Organization=function(e){return f(a.ORGANIZATION,e)},g.ItemPage=function(e){return f(a.ITEM_PAGE,e)},g.Product=_,g.Offer=h,g.Rating=function(e){return f(a.RATING,e)},g.AggregateRating=function(e){return f(a.AGGREGATE_RATING,e)},g.AggregateOffer=function(e){return f(a.AGGREGATE_OFFER,e)},g.QuantitativeValue=E,g.UnitPriceSpecification=function(e){return f(a.UNIT_PRICE_SPECIFICATION,e)};var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=c(n(1227)),l=c(n(10193)),u=c(n(55)),s=n(1),d=c(n(6)),f=c(n(7867));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=((r={})[s.ContentRatingAgencies.ESRB]={1:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_ALCOHOL_REFERENCE,2:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_ANIMATED_BLOOD,3:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_BLOOD,4:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_BLOOD_AND_GORE,5:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_CARTOON_VIOLENCE,6:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_COMIC_MISCHIEF,7:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_CRUDE_HUMOR,8:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_DRUG_REFERENCE,9:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_FANTASY_VIOLENCE,10:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_INTENSE_VIOLENCE,11:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_LANGUAGE,12:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_LYRICS,13:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MATURE_HUMOR,14:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_NUDITY,15:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_PARTUAL_NUDITY,16:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_REAL_GAMBLING,17:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_SEXUAL_CONTENT,18:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_SEXUAL_THEMES,19:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_SEXUAL_VIOLENCE,20:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_SIMULATED_GAMBLING,21:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_STRONG_LANGUAGE,22:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_STRONG_LYRICS,23:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_STRONG_SEXUAL_CONTENT,24:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_SUGGESTIVE_THEMES,25:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_TOBACCO_REFERENCE,26:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_USE_OF_ALCOHOL,27:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_USE_OF_DRUGS,28:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_USE_OF_TOBACCO,29:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_VIOLENCE,30:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_VIOLENT_REFERENCES,31:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_IN_GAME_PURCHASES,32:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_USERS_INTERACT,33:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_SHARES_LOCATION,34:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_UNRESTRICTED_INTERNET,35:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_BLOOD,36:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_CARTOON_VIOLENCE,37:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_FANTASY_VIOLENCE,38:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_LANGUAGE,39:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_LYRICS,40:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_SEXUAL_THEMES,41:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_SUGGESTIVE_THEMES,42:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_MILD_VIOLENCE,43:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_ESRB_ANIMATED_VIOLENCE},r[s.ContentRatingAgencies.PEGI]={1:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_VIOLENCE,2:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_BAD_LANGUAGE,3:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_FEAR,4:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_GAMBLING,5:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_SEX,6:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_DRUGS,7:d.default.Messages.APPLICATION_STORE_RATING_DESCRIPTORS_PEGI_DISCRIMINATION},r),_=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.renderContentRatingImage=function(){var e=this.props.sku,t=e.contentRating,n=e.contentRatingAgency;return null==t||null==n?null:v(l.default,{className:f.default.rating,agency:n,rating:t.rating})},a.render=function(){var e=this.props,t=e.sku,n=t.contentRating,r=t.contentRatingAgency,a=e.className;if(null==n||null==r)return null;var o=n.descriptors.map((function(e){return m[r][e]})).join(", ");return v("div",{className:a},void 0,v(i.default,{},void 0,d.default.Messages.APPLICATION_STORE_SECTION_TITLE_RATINGS),v(u.default,{className:f.default.content},void 0,this.renderContentRatingImage(),v("div",{className:f.default.info},void 0,o)))},r}(o.PureComponent);_.displayName="ApplicationContentRating";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Categories=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o,i,l=d(n(9)),u=n(1),s=d(n(7866));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,r){i||(i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var l=new Array(o),u=0;u<o;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:i,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p={ESRB:{EVERYONE:"1",EVERYONE_TEN_PLUS:"2",TEEN:"3",MATURE:"4",ADULT:"5",RATING_PENDING:"6"},PEGI:{THREE:"1",SEVEN:"2",TWELVE:"3",SIXTEEN:"4",EIGHTEEN:"5"}};t.Categories=p;var v=((o={})[u.ContentRatingAgencies.ESRB]=((r={})[p.ESRB.EVERYONE]=s.default.esrbEveryone,r[p.ESRB.EVERYONE_TEN_PLUS]=s.default.esrbEveryoneTenPlus,r[p.ESRB.TEEN]=s.default.esrbTeen,r[p.ESRB.MATURE]=s.default.esrbMature,r[p.ESRB.ADULT]=s.default.esrbAdult,r[p.ESRB.RATING_PENDING]=s.default.esrbRatingPending,r),o[u.ContentRatingAgencies.PEGI]=((a={})[p.PEGI.THREE]=s.default.pegiThree,a[p.PEGI.SEVEN]=s.default.pegiSeven,a[p.PEGI.TWELVE]=s.default.pegiTwelve,a[p.PEGI.SIXTEEN]=s.default.pegiSixteen,a[p.PEGI.EIGHTEEN]=s.default.pegiEighteen,a),o),y=function(e){var t=e.agency,n=e.rating,r=e.className,a=v[t][n];return null==a?null:c("div",{className:(0,l.default)(s.default.contentRating,a,r)})};y.displayName="ContentRating";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(101)),l=p(n(29)),u=p(n(1227)),s=p(n(1392)),d=n(289),f=p(n(6)),c=p(n(7868));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}var h=/^!\[([^\]]*)\]\(asset:\/\/(\d+)\)/,E=_({},s.default.rules,{heading:_({},s.default.rules.heading,{react:function(e,t,n){var r="h"+Math.min(Math.max(2,e.level+1),4);return m(u.default,{tag:r},n.key,t(e.content,n))}}),assetImage:{order:5,match:function(e,t){var n=e.match(h);if(null!=n){var r=n[2],a=t.assets.find((function(e){return e.id===r}));return null!=a&&[].concat(n,[a,t.applicationId])}return!1},parse:function(e){return{asset:e[3],alt:e[1],applicationId:e[4]}},react:function(e,t,n){return m("div",{className:c.default.assetWrapper},n.key,m("img",{alt:e.alt,src:(0,d.getAssetURL)(e.applicationId,e.asset,800),className:c.default.asset}))}}}),g=i.default.parserFor(E),S=i.default.reactFor(i.default.ruleOutput(E,"react")),O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={collapsed:!0,collapsable:!0},t.handleToggleCollapse=function(){t.setState({collapsed:!t.state.collapsed})},t.setContentContainerRef=function(e){t._container=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var i=r.prototype;return i.componentDidMount=function(){if(null!=this._container){var e=this._container.getBoundingClientRect().height>400;this.setState({collapsable:e})}},i.render=function(){var e,t=this.props,n=t.applicationId,r=t.description,i=t.blurb,u=t.className,d=t.assets,p=this.state,v=p.collapsed,y=p.collapsable;return m("div",{className:u},void 0,m("div",{className:(0,o.default)((e={},e[c.default.collapsed]=y&&v,e))},void 0,a.createElement("div",{ref:this.setContentContainerRef},m("div",{className:c.default.blurb},void 0,i),m(s.default,{className:c.default.description,parser:g,output:S,state:{assets:d,applicationId:n}},void 0,r))),y?m(l.default,{className:c.default.toggleCollapseButton,onClick:this.handleToggleCollapse,color:l.default.Colors.PRIMARY},void 0,v?f.default.Messages.APPLICATION_STORE_DESCRIPTION_READ_MORE:f.default.Messages.APPLICATION_STORE_DESCRIPTION_READ_LESS):null)},r}(a.PureComponent);O.displayName="ApplicationDescription";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(1227)),i=S(n(149)),l=S(n(8313)),u=S(n(372)),s=S(n(9235)),d=S(n(9044)),f=S(n(10196)),c=S(n(696)),p=S(n(8577)),v=S(n(9042)),y=S(n(8804)),m=S(n(10197)),_=S(n(9236)),h=n(1),E=S(n(6)),g=S(n(7869));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}var b=[{feature:h.SKUFeatureTypes.SINGLE_PLAYER,getText:function(){return E.default.Messages.APPLICATION_STORE_SINGLE_PLAYER},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_SINGLE_PLAYER_TOOLTIP},IconComponent:p.default},{feature:h.SKUFeatureTypes.LOCAL_MULTIPLAYER,getText:function(){return E.default.Messages.APPLICATION_STORE_LOCAL_MULTIPLAYER},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_LOCAL_MULTIPLAYER_TOOLTIP},IconComponent:c.default},{feature:h.SKUFeatureTypes.ONLINE_MULTIPLAYER,getText:function(){return E.default.Messages.APPLICATION_STORE_ONLINE_MULTIPLAYER},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_ONLINE_MULTIPLAYER_TOOLTIP},IconComponent:c.default},{feature:h.SKUFeatureTypes.PVP,getText:function(){return E.default.Messages.APPLICATION_STORE_PVP},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_PVP_TOOLTIP},IconComponent:f.default},{feature:h.SKUFeatureTypes.LOCAL_COOP,getText:function(){return E.default.Messages.APPLICATION_STORE_LOCAL_COOP},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_LOCAL_COOP_TOOLTIP},IconComponent:c.default},{feature:h.SKUFeatureTypes.ONLINE_COOP,getText:function(){return E.default.Messages.APPLICATION_STORE_ONLINE_COOP},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_ONLINE_COOP_TOOLTIP},IconComponent:c.default},{feature:h.SKUFeatureTypes.CROSS_PLATFORM,getText:function(){return E.default.Messages.APPLICATION_STORE_CROSS_PLATFORM},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_CROSS_PLATFORM_TOOLTIP},IconComponent:_.default},{feature:h.SKUFeatureTypes.RICH_PRESENCE,getText:function(){return E.default.Messages.APPLICATION_STORE_RICH_PRESENCE},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_RICH_PRESENCE_TOOLTIP},IconComponent:y.default},{feature:h.SKUFeatureTypes.DISCORD_GAME_INVITES,getText:function(){return E.default.Messages.APPLICATION_STORE_DISCORD_GAME_INVITES},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_DISCORD_GAME_INVITES_TOOLTIP},IconComponent:v.default},{feature:h.SKUFeatureTypes.SPECTATOR_MODE,getText:function(){return E.default.Messages.APPLICATION_STORE_SPECTATOR_MODE},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_SPECTATOR_MODE_TOOLTIP},IconComponent:l.default},{feature:h.SKUFeatureTypes.CONTROLLER_SUPPORT,getText:function(){return E.default.Messages.APPLICATION_STORE_CONTROLLER_SUPPORT},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_CONTROLLER_SUPPORT_TOOLTIP},IconComponent:d.default},{feature:h.SKUFeatureTypes.CLOUD_SAVES,getText:function(){return E.default.Messages.APPLICATION_STORE_CLOUD_SAVES},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_CLOUD_SAVES_TOOLTIP},IconComponent:s.default},{feature:h.SKUFeatureTypes.SECURE_NETWORKING,getText:function(){return E.default.Messages.APPLICATION_STORE_SECURE_NETWORKING},getTooltip:function(){return E.default.Messages.APPLICATION_STORE_SECURE_NETWORKING_TOOLTIP},IconComponent:m.default}],M=function(e){var t=e.IconComponent,n=e.text,r=e.tooltip;return T("div",{className:g.default.row},void 0,T(i.default,{text:r},void 0,(function(e){return a.createElement(t,C({className:g.default.featureIcon},e))})),T("span",{className:g.default.featureText},void 0,n),T(u.default,{className:g.default.checkmarkIcon}))};M.displayName="ApplicationFeature";var N=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n),r.prototype.render=function(){var e=this.props.sku,t=b.filter((function(t){var n=t.feature;return e.features.has(n)})).map((function(e){var t=e.feature,n=e.IconComponent,r=e.getText,a=e.getTooltip;return T(M,{IconComponent:n,text:r(),tooltip:a()},t)}));return 0===t.length?null:T("div",{className:g.default.features},void 0,T(o.default,{},void 0,E.default.Messages.APPLICATION_STORE_SECTION_TITLE_FEATURES),t)},r}(a.PureComponent);N.displayName="ApplicationFeatureFlags";var A=N;t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M6.2,2.44 L18.1,14.34 L20.22,12.22 L21.63,13.63 L19.16,16.1 L22.34,19.28 C22.73,19.67 22.73,20.3 22.34,20.69 L21.63,21.4 C21.24,21.79 20.61,21.79 20.22,21.4 L17,18.23 L14.56,20.7 L13.15,19.29 L15.27,17.17 L3.37,5.27 L3.37,2.44 L6.2,2.44 Z M15.89,10 L20.63,5.26 L20.63,2.44 L17.8,2.44 L13.06,7.18 L15.89,10 Z M10.94,15 L8.11,12.13 L5.9,14.34 L3.78,12.22 L2.37,13.63 L4.84,16.1 L1.66,19.29 C1.27,19.68 1.27,20.31 1.66,20.7 L2.37,21.41 C2.76,21.8 3.39,21.8 3.78,21.41 L7,18.23 L9.44,20.7 L10.85,19.29 L8.73,17.17 L10.94,15 Z"}),d))}f.displayName="Moderation"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"24",height:"24"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4zm-2.28 8c.04.33.08.66.08 1 0 2.08-.8 3.97-2.1 5.39-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H7v-2h2c.55 0 1-.45 1-1V8h2c1.1 0 2-.9 2-2V3.46c-.95-.3-1.95-.46-3-.46C5.48 3 1 7.48 1 13s4.48 10 10 10 10-4.48 10-10c0-.34-.02-.67-.05-1h-2.03zM10 20.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L8 16v1c0 1.1.9 2 2 2v1.93z"}),d))}f.displayName="SecureNetworking"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(1227)),i=u(n(6)),l=u(n(7870));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),r.prototype.render=function(){var e=this.props,t=e.className,n=e.sku;return null==n.legalNotice?null:d("div",{className:t},void 0,d(o.default,{},void 0,i.default.Messages.APPLICATION_STORE_SECTION_TITLE_COPYRIGHT),d("div",{className:l.default.content},void 0,n.legalNotice))},r}(a.PureComponent);c.displayName="ApplicationLegalInfo";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=f(n(397)),o=f(n(9064)),i=f(n(10200)),l=f(n(690)),u=f(n(10202)),s=n(8403),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(){return(v=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}).apply(this,arguments)}function y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function h(e){return e.split("?")[0]+"?size=2048"}var E=function(e){for(var t,n=e.index,a=e.items,o=_(e,["index","items"]),l=a[n],u=0,s=[],f=y(a);!(t=f()).done;){var c=t.value;if(c.type===d.CarouselMediaTypes.IMG){var p=c.width,m=c.height,E=c.src;c===l&&(u=s.length),s.push({src:h(E),width:p,height:m})}}return r.createElement(i.default,v({},o,{items:s,startWith:u}))};E.displayName="ZoomedCarousel";var g=function(e){var t,n;function i(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).handleCurrentItemClick=function(e,n){e.type!==d.CarouselMediaTypes.IMG||l.default.hasModalOpen()||a.default.push((function(e){return r.createElement(E,v({},e,{index:n,items:t.props.items}))}))},t}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),i.prototype.render=function(){var e=this.props,t=e.pageSize,n=_(e,["pageSize"]),a=t===s.PageSizes.SMALL?u.default:o.default;return r.createElement(a,v({},n,{onCurrentItemClick:this.handleCurrentItemClick}))},i}(r.Component);g.displayName="ApplicationStoreListingCarousel";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(1243)),i=y(n(273)),l=y(n(469)),u=y(n(9230)),s=n(10201),d=y(n(403)),f=n(9065),c=n(193),p=n(1),v=y(n(7874));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S={friction:10,tension:100};function O(e,t){return(e%t+t)%t}var I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={translate:new i.default.Value(0),opacity:new i.default.Value(1)},t}E(t,e);var n=t.prototype;return n.componentWillEnter=function(e){var t=this.props.directionHistory,n=this.state,r=n.translate,a=n.opacity;r.setValue(t[t.length-1]),a.setValue(0),e(),i.default.parallel([i.default.timing(a,{toValue:1,easing:i.default.Easing.out(i.default.Easing.linear),duration:200}),i.default.spring(r,h({toValue:0},S))]).start()},n.componentWillLeave=function(e){var t=this.props.directionHistory,n=this.state,r=n.opacity,a=n.translate;i.default.parallel([i.default.timing(r,{toValue:0,easing:i.default.Easing.in(i.default.Easing.linear),duration:200}),i.default.spring(a,h({toValue:-1*t[t.length-1]},S))]).start(e)},n.getStyle=function(){var e=this.state,t=e.translate,n=e.opacity;return i.default.accelerate({opacity:n,transform:[{translateX:t.interpolate({inputRange:[0,1],outputRange:["0px","300px"]})}]})},n.render=function(){var e=this.props.item;return _(i.default.img,{src:e.src,alt:"",className:v.default.slide,style:this.getStyle()})},t}(a.Component);I.displayName="ModalCarouselItem";var T=function(e){function t(t){var n;return(n=e.call(this,t)||this).gotoNext=function(){var e=n.state.currentIndex;n.navigateTo(e+1)},n.gotoPrev=function(){var e=n.state.currentIndex;n.navigateTo(e-1)},n.state={currentIndex:t.startWith,directionHistory:[]},n}E(t,e);var n=t.prototype;return n.componentDidMount=function(){this.preloadNextImages(),d.default.disable(),d.default.enableTemp(s.MODAL_CAROUSEL_LAYOUT)},n.componentWillUnmount=function(){d.default.disableTemp()},n.preloadNextImages=function(){var e=this.state.currentIndex,t=this.props.items,n=O(e+1,t.length),r=O(e-1,t.length);this.preloadImage(t[n]),this.preloadImage(t[r])},n.preloadImage=function(e){(0,c.loadImage)(e.src)},n.componentDidUpdate=function(e,t){this.state.currentIndex!==t.currentIndex&&this.preloadNextImages()},n.navigateTo=function(e){var t=this.state,n=t.directionHistory,r=t.currentIndex;n.push(e-r),e=O(e,this.props.items.length),this.setState({currentIndex:e,directionHistory:n})},n.render=function(){var e=this.props.onClose,t=this.state,n=t.currentIndex,r=t.directionHistory;return _(l.default,{component:"div",className:v.default.wrapper,onClick:e},void 0,_(f.CarouselPrevious,{className:v.default.navPrev,onClick:this.gotoPrev}),_(I,{item:this.props.items[n],directionHistory:r},this.props.items[n].src),_(f.CarouselNext,{className:v.default.navNext,onClick:this.gotoNext}))},t}(a.Component);T.displayName="ModalCarousel",T.defaultProps={startWith:0};var C=(0,u.default)((function(e,t){var n;return(n={})[p.ComponentActions.MODAL_CAROUSEL_NEXT]=(0,o.default)(t.gotoNext,300),n[p.ComponentActions.MODAL_CAROUSEL_PREV]=(0,o.default)(t.gotoPrev,300),n}))(T);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MODAL_CAROUSEL_LAYOUT=void 0;var r,a=n(9057),o=n(1),i=((r={})[o.KeybindActions.MODAL_CAROUSEL_NEXT]=a.MODAL_CAROUSEL_NEXT,r[o.KeybindActions.MODAL_CAROUSEL_PREV]=a.MODAL_CAROUSEL_PREV,r);t.MODAL_CAROUSEL_LAYOUT=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(9)),i=n(9064),l=n(8308),u=m(n(10203)),s=m(n(61)),d=n(8516),f=m(n(8337)),c=m(n(8801)),p=n(8403),v=n(1),y=m(n(7877));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}var S=function(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className"]);return a.createElement(c.default,g({},n,{className:(0,o.default)(y.default.sizedToParent,t),mediaPlayerClassName:y.default.sizedToParent,renderLinkComponent:l.renderMaskedLinkComponent}))};S.displayName="renderVideoComponent";var O=function(e){return a.createElement(f.default,e)};O.displayName="renderImageComponent";var I={width:1280,height:720},T={width:640,height:360},C=function(e){var t,n,r=e.item,a=e.onPlay,o=e.volume,u=e.onVolumeChange,s=e.onMute,f=e.isMuted;if(r.type===v.CarouselMediaTypes.YOUTUBE_VIDEO)t=g({url:(0,v.YOUTUBE_PREVIEW_URL)(r.youtubeVideoId)},I),n=g({url:(0,v.YOUTUBE_EMBED_URL)(r.youtubeVideoId)+"?rel=0&iv_load_policy=3&showinfo=0&modestbranding=1"},T);else{var c=null!=r.width?r.width:0,m=null!=r.height?r.height:0;t={url:r.thumbnailSrc,width:c,height:m},n={url:r.src,proxyURL:r.src,width:c,height:m}}return E("div",{className:y.default.embedContainer},void 0,E(d.EmbedVideo,{className:y.default.sizedToParent,href:null,thumbnail:t,video:n,maxHeight:i.ItemSizes.SMALL.height,maxWidth:p.PageSizes.SMALL,onPlay:a,playable:!0,volume:o,onVolumeChange:u,autoMute:f,onMute:s,autoPlay:!0,renderImageComponent:O,renderVideoComponent:S,renderLinkComponent:l.renderMaskedLinkComponent}))};C.displayName="Video";var b=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={hasInteracted:!1,isVideoPlaying:!1,isMuted:!0,volume:1},t.handlePlay=function(e){t.setState({isVideoPlaying:!0,hasInteracted:!e})},t.handleVolumeChange=function(e){t.setState({volume:e,hasInteracted:!0})},t.handleMute=function(e){t.setState({isMuted:e,hasInteracted:!0})},t.handleChangeItem=function(){t.setState({isVideoPlaying:!1})},t.handleIntentionalChange=function(e,n,r,a){t.setState({hasInteracted:!0});var o=t.props.onIntentionalChange;null!=o&&o(e,n,r,a)},t.renderItem=function(e,n){var r,a=t.state,o=a.isMuted,i=a.volume;switch(e.type){case v.CarouselMediaTypes.YOUTUBE_VIDEO:case v.CarouselMediaTypes.VIDEO:r=E(C,{item:e,onPlay:t.handlePlay,isMuted:o,volume:i,onVolumeChange:t.handleVolumeChange,onMute:t.handleMute});break;case v.CarouselMediaTypes.IMG:r=E("img",{className:y.default.smallCarouselImage,src:e.src,alt:""});break;default:throw new Error("Unexpected MediaType")}return E(s.default,{className:y.default.smallCarouselItem,onClick:function(){return t.handleCurrentItemClick(e,n)}},void 0,r)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.handleCurrentItemClick=function(e,t){var n=this.props.onCurrentItemClick;null!=n&&n(e,t),this.setState({hasInteracted:!0})},a.render=function(){var e=this.props,t=e.items,n=e.autoplayInterval,r=e.paused,a=this.state.hasInteracted;return E(u.default,{items:t.slice(0,12),delay:n,paused:r||a,renderItem:this.renderItem,className:y.default.smallCarousel,onIntentionalChange:this.handleIntentionalChange,onChangeItem:this.handleChangeItem})},r}(a.PureComponent);b.displayName="SmallMediaCarousel",b.defaultProps={paused:!1};var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(8)),l=n(57),u=n(121),s=y(n(9066)),d=y(n(8524)),f=y(n(55)),c=y(n(10204)),p=n(1),v=y(n(7876));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,E(e,t)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g="jump",S="next",O="previous",I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleDotClick=function(e){var n=t.props,r=n.onSetItem,a=n.onIntentionalChange,o=n.current;a&&a(o,e,g),r(e)},t.handleNext=function(){var e=t.props,n=e.onIntentionalChange,r=e.current,a=(0,e.onChangePage)(1);n&&n(r,a,S)},t.handlePrevious=function(){var e=t.props,n=e.onIntentionalChange,r=e.current,a=(0,e.onChangePage)(-1);n&&n(r,a,O)},t}h(t,e);var n=t.prototype;return n.componentDidMount=function(){u.ComponentDispatch.subscribe(p.ComponentActions.CAROUSEL_PREV,this.handlePrevious),u.ComponentDispatch.subscribe(p.ComponentActions.CAROUSEL_NEXT,this.handleNext)},n.componentWillUnmount=function(){u.ComponentDispatch.unsubscribe(p.ComponentActions.CAROUSEL_PREV,this.handlePrevious),u.ComponentDispatch.unsubscribe(p.ComponentActions.CAROUSEL_NEXT,this.handleNext)},n.render=function(){var e,t=this,n=this.props,r=n.current,a=n.count,l=n.includeHitboxPadding,u=i.default.times(a,(function(e){return _("button",{onClick:function(){return t.handleDotClick(e)},className:e===r?v.default.dotSelected:v.default.dotNormal},"dot-"+e)})),d=(0,o.default)(v.default.arrowHitbox,((e={})[v.default.arrowHitboxPadding]=l,e));return _(f.default,{className:this.props.className,justify:f.default.Justify.BETWEEN,align:f.default.Align.CENTER},void 0,_("button",{className:d,onClick:this.handlePrevious},void 0,_(s.default,{className:v.default.arrow,direction:s.default.Directions.LEFT})),_("div",{className:v.default.dots},void 0,u),_("button",{className:d,onClick:this.handleNext},void 0,_(s.default,{className:v.default.arrow,direction:s.default.Directions.RIGHT})))},t}(a.PureComponent);I.displayName="PaginationController",I.defaultProps={includeHitboxPadding:!0};var T=function(e){function t(t){var n;return(n=e.call(this,t)||this).timer=new l.Interval,n.getCurrentDirection=function(){return n.state.direction},n.nextItem=function(){var e=n.props.items;n.changeItem(e,1)},n.previousItem=function(){var e=n.props.items;n.changeItem(e,-1)},n.handleSetItem=function(e){var t=n.state.visibleIndex,r=n.props.items;n.changeItem(r,e-t)},n.handleMouseEnter=function(){n.setState({hovered:!0})},n.handleMouseLeave=function(){n.setState({hovered:!1})},n.handleIntentionalChange=function(e,t,r){var a=n.props,o=a.items,i=a.onIntentionalChange;return i&&i(o[t],e,t,r)},n.state={visibleIndex:!0===t.randomize?i.default.random(0,t.items.length-1):0,direction:1,hovered:!1},n}h(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.paused||this.state.hovered||this.startTimer()},n.componentWillUnmount=function(){this.stopTimer()},n.componentDidUpdate=function(e,t){var n=function(e,t){return!e.paused&&!t.hovered},r=n(this.props,this.state),a=n(e,t);r&&!a?this.startTimer():!r&&a&&this.stopTimer();var o=this.props.items;null==o[this.state.visibleIndex]&&this.changeItem(o,1)},n.startTimer=function(){this.timer.start(this.props.delay,this.nextItem)},n.stopTimer=function(){this.timer.stop()},n.changeItem=function(e,t){var n=this.state.visibleIndex+t;n<0?n=e.length-1:n>e.length-1&&(n=0);var r=this.props.onChangeItem;return r&&r(e[n],this.state.visibleIndex,n),this.setState({visibleIndex:n,direction:t>0?1:-1}),n},n.render=function(){var e=this,t=this.props,n=t.items,r=t.renderItem,a=t.className,i=t.paginationClassName,l=t.themedPagination,u=t.includeHitboxPadding,s=t.style,f=this.state.visibleIndex;return _("div",{className:(0,o.default)(v.default.root,a),style:s,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},void 0,_(d.default,{aspectRatio:16/9},void 0,_(c.default,{step:f,getDirection:this.getCurrentDirection,className:v.default.carousel},void 0,r(n[f],f))),_(I,{className:(0,o.default)(i,l?v.default.themedPagination:v.default.pagination),includeHitboxPadding:u,current:f,count:n.length,onChangePage:function(t){return e.changeItem(n,t)},onSetItem:this.handleSetItem,onIntentionalChange:this.handleIntentionalChange}))},t}(a.PureComponent);T.displayName="CarouselWithSlide";var C=T;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(273)),l=s(n(469)),u=s(n(7875));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v={friction:7,tension:40,overshootClamping:!0},y=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this)._animated=new i.default.Value(-1*t.getDirection()),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.componentWillEnter=function(e){this._animated.setValue(-this.props.getDirection()),i.default.spring(this._animated,c({toValue:0},v)).start(e)},a.componentDidAppear=function(){this._animated.setValue(0)},a.componentWillLeave=function(e){i.default.spring(this._animated,c({toValue:this.props.getDirection()},v)).start(e)},a.getStyle=function(){return i.default.accelerate({transform:[{translateX:this._animated.interpolate({inputRange:[0,1],outputRange:["0%","-100%"]})}]})},a.render=function(){return f(i.default.div,{style:this.getStyle(),className:u.default.item},void 0,this.props.children)},r}(a.PureComponent);y.displayName="Item";var m=function(e){var t=e.children,n=e.step,r=e.getDirection,a=e.className;return f(l.default,{component:"div",className:(0,o.default)(u.default.animator,a)},void 0,f(y,{getDirection:r},n,t))};m.displayName="SlideAnimator";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8344),i=s(n(9056)),l=s(n(6)),u=s(n(7878));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleDisagree=function(){(0,o.matureDisagree)()},t.handleAgree=function(){(0,o.matureAgree)()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e=this.props.game.name;return f("div",{className:u.default.matureListing},void 0,f(i.default,{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:l.default.Messages.MATURE_LISTING_TITLE.format({name:e}),description:l.default.Messages.MATURE_LISTING_DESCRIPTION,agreement:l.default.Messages.MATURE_LISTING_ACCEPT,disagreement:l.default.Messages.MATURE_LISTING_DECLINE}))},r}(a.PureComponent);p.displayName="ApplicationStoreListingMature";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ApplicationStorePurchaseUnit=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=w(n(9)),i=n(192),l=n(3),u=n(5829),s=w(n(8470)),d=w(n(8636)),f=n(42),c=w(n(120)),p=w(n(12)),v=w(n(5826)),y=w(n(10207)),m=w(n(29)),_=w(n(55)),h=w(n(1151)),E=w(n(8508)),g=w(n(5845)),S=w(n(96)),O=n(281),I=n(8366),T=w(n(10208)),C=w(n(10209)),b=w(n(9067)),M=w(n(10210)),N=n(8893),A=w(n(10211)),P=n(1),R=w(n(6)),L=w(n(7884)),D=w(n(7371));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var F=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._applicationBuyButtonRef=a.createRef(),t.handleViewLibrary=function(e){var n=t.props.libraryApplication;null!=n&&n.isHidden()&&(e.preventDefault(),(0,f.transitionTo)(P.Routes.APPLICATION_LIBRARY_SETTINGS))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,G(t,n);var l=r.prototype;return l.componentDidMount=function(){var e=this.props,t=e.isEntitled,n=e.isFetchingEntitlementsForApplication,r=e.sku,a=e.currentUser;null!=t||n||null==a||r.type===P.SKUTypes.DURABLE_PRIMARY||(0,u.fetchUserEntitlementsForApplication)(r.applicationId)},l.getApplicationBuyButton=function(){return this._applicationBuyButtonRef.current},l.getActionText=function(){var e=this.props,t=e.sku,n=e.isEntitled,r=e.storeListing,a=function(e){switch(e.type){case P.SKUTypes.DURABLE:return{distribution:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_DISTRIBUTION_DLC,free:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_FREE_DLC,preorder:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_DLC,preorderEntitled:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_ENTITLED};case P.SKUTypes.CONSUMABLE:return{distribution:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_DISTRIBUTION_CONSUMABLE,free:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_FREE_CONSUMABLE,preorder:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_CONSUMABLE,preorderEntitled:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_ENTITLED};case P.SKUTypes.BUNDLE:return{distribution:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_DISTRIBUTION_BUNDLE,free:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_FREE_BUNDLE,preorder:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_BUNDLE,preorderEntitled:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_ENTITLED};case P.SKUTypes.DURABLE_PRIMARY:default:return{distribution:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_DISTRIBUTION_APPLICATION,free:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_FREE_APPLICATION,preorder:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_APPLICATION,preorderEntitled:R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_PREORDER_ENTITLED}}}(t),o=null!=r.entitlementBranchId;return!t.available&&t.premium?R.default.Messages.APPLICATION_STORE_COMING_SOON:t.isPreorder()&&!o?n?a.preorderEntitled:a.preorder:t.requiresPayment&&!o?a.distribution:a.free},l.renderHeader=function(){var e=this.props,t=e.isEntitled,n=e.libraryApplication,r=e.sku,a=e.currentUser;if(!0===t){var o=null!=n&&n.isHidden();return U(i.Link,{className:L.default.entitledHeader,to:{pathname:P.Routes.APPLICATION_LIBRARY,state:{applicationId:null!=n?n.id:null}},onClick:this.handleViewLibrary},void 0,U(E.default,{className:L.default.entitledHeaderIcon}),U("div",{},void 0,o?R.default.Messages.APPLICATION_STORE_PURCHASE_IN_LIBRARY_HIDDEN:R.default.Messages.APPLICATION_STORE_PURCHASE_IN_LIBRARY))}return r.exclusive?U("div",{className:L.default.exclusiveHeader},void 0,U("div",{className:L.default.exclusiveHeaderExclusive},void 0,R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_FIRST_ON),U(h.default,{className:L.default.exclusiveHeaderIcon})):r.premium?U("div",{className:L.default.premiumHeader},void 0,U(g.default,{className:L.default.premiumHeaderIcon}),S.default.canInstallPremiumApplications(a)?null:U("div",{className:L.default.premiumHeaderPrice},void 0,R.default.Messages.BILLING_PRICE_PER_MONTH.format({price:(0,O.formatPrice)(P.SubscriptionPlanInfo[P.SubscriptionPlans.PREMIUM_MONTH_TIER_2].price,P.CurrencyCodes.USD)}))):null},l.renderAlternativeSkus=function(){var e=this.props,t=e.storeListing,n=e.sku,r=e.guildId,o=e.channelId;return null!=t.entitlementBranchId||0===t.alternativeSkuIds.length?null:U(a.Fragment,{},void 0,U("div",{className:L.default.actionText},void 0,R.default.Messages.APPLICATION_STORE_LISTING_SELECT_EDITION),U(T.default,{storeListing:t,selectedSkuId:n.id,className:L.default.alternativeSkus,guildId:r,channelId:o}))},l.renderAccuratePreorderInfo=function(){var e=this.props,t=e.isEntitled,n=e.sku,r=e.isFocused;return n.isPreorder()&&null!=n.preorderReleaseAt&&t?U("div",{className:L.default.countdownSection},void 0,U("div",{className:L.default.countdownHeader},void 0,R.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_TIME_LEFT_UNTIL_RELEASE),U(y.default,{endTime:n.preorderReleaseAt.valueOf(),interval:r?1e3:6e4})):null},l.renderApproximatePreorderInfo=function(){var e=this.props,t=e.isEntitled,n=e.sku;if(!n.isPreorder()||null==n.preorderApproximateReleaseDate&&null!=n.preorderReleaseAt&&t)return null;var r=(0,I.getReadablePreorderReleaseDate)(n);return U("div",{className:L.default.releaseDate},void 0,R.default.Messages.APPLICATION_STORE_PURCHASE_AVAILABLE_DATE.format({releaseDate:r}))},l.renderPrice=function(){var e=this.props,t=e.sku,n=e.storeListing,r=e.isEntitled;if(t.restricted)return U("div",{className:L.default.price},void 0,R.default.Messages.APPLICATION_STORE_RESTRICTED);var a=null!=n.entitlementBranchId;return t.available&&(t.premium||null!=t.getPrice())||a?U("div",{className:L.default.price},void 0,U(d.default,{type:d.default.Types.LISTING,inLibrary:!0===r,sku:t,hasEntitlementBranch:a}),this.renderApproximatePreorderInfo()):!t.available&&t.premium?U("div",{className:(0,o.default)(L.default.price,D.default.listingPrice)},void 0,R.default.Messages.APPLICATION_STORE_FREE_WITH_PREMIUM):U("div",{className:L.default.price},void 0,R.default.Messages.APPLICATION_STORE_COMING_SOON)},l.renderBody=function(){var e=this.props,t=e.sku,n=e.game,r=e.channelId,o=e.isEntitled,i=e.isUserPremium,l=e.storeListing,u=t.isGiftable(),d=null!=l.entitlementBranchId;return U(a.Fragment,{},void 0,this.renderAccuratePreorderInfo(),U(_.default,{justify:_.default.Justify.BETWEEN,align:_.default.Align.CENTER,className:L.default.headerBar},void 0,U("div",{className:L.default.actionText},void 0,this.getActionText()),U(N.OperatingSystemSection,{systems:t.supportedOperatingSystems})),this.renderPrice(),!0!==o||!u||d?U(a.Fragment,{},void 0,a.createElement(s.default,{ref:this._applicationBuyButtonRef,skuId:t.id,applicationId:n.id,channelId:r,entitlementBranchId:l.entitlementBranchId,fullWidth:!0,onStoreListing:!0}),t.premium&&!i&&t.isAvailableForDistribution()&&!d?U(s.default,{skuId:t.id,applicationId:n.id,channelId:r,color:m.default.Colors.PRIMARY,className:L.default.secondaryBuyButton,forceDistribution:!0,shouldRenderPrice:!0,fullWidth:!0,onStoreListing:!0}):null):null,u&&!d?U(s.default,{asGift:!0,className:L.default.secondaryBuyButton,skuId:t.id,applicationId:n.id,channelId:r,fullWidth:!0,onStoreListing:!0,color:!0===o?m.default.Colors.GREEN:m.default.Colors.PRIMARY,hover:m.default.Hovers.DEFAULT}):null,U(b.default,{className:L.default.purchaseError}),U(M.default,{className:L.default.warning,sku:t}))},l.render=function(){var e=this.props,t=e.game,n=e.storeListing,r=e.sku,a=e.guildId,o=e.channelId,i=e.fetchStoreListing;return U("div",{className:e.className},void 0,this.renderHeader(),U("div",{className:L.default.bodySection},void 0,this.renderAlternativeSkus(),this.renderBody()),null==n.entitlementBranchId?U("div",{className:L.default.bodySection},void 0,U(A.default,{storeListing:n,sku:r,guildId:a,channelId:o,fetchStoreListing:i})):null,U("div",{className:L.default.bodySection},void 0,U(C.default,{game:t,sku:r})))},r}(a.PureComponent);t.ApplicationStorePurchaseUnit=F,F.displayName="ApplicationStorePurchaseUnit";var B=a.forwardRef((function(e,t){var n=e.storeListing,r=e.game,o=e.sku,i=null!=n.entitlementBranchId?n.entitlementBranchId:r.id,u=(0,l.useStateFromStoresArray)([p.default,v.default],(function(){var e=p.default.getNullableCurrentUser();return[e,S.default.canInstallPremiumApplications(e),v.default.isEntitledToSku(e,o.id,r.id,i),v.default.applicationIdsFetching.has(o.applicationId)]})),s=u[0],d=u[1],f=u[2],y=u[3],m=(0,l.useStateFromStores)([c.default],(function(){return c.default.getLibraryApplication(r.id,i)}));return a.createElement(F,k({},e,{currentUser:s,isUserPremium:d,isEntitled:f,isFetchingEntitlementsForApplication:y,libraryApplication:m,ref:t}))}));t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(57),l=n(1161),u=f(n(8917)),s=f(n(6)),d=f(n(7879));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={now:Date.now()},t.interval=new i.Interval,t.handleIntervalUpdate=function(){t.setState({now:Date.now()})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.componentDidMount=function(){this.interval.start(this.props.interval,this.handleIntervalUpdate)},a.componentWillUnmount=function(){this.interval.stop()},a.componentDidUpdate=function(e){this.props.interval!==e.interval&&this.interval.start(this.props.interval,this.handleIntervalUpdate)},a.renderSection=function(e,t,n){return p("div",{className:n?d.default.unitClose:d.default.unitNormal},void 0,p(u.default,{className:d.default.duration,value:e,padStartLength:2,forcePosition:u.default.Positions.ABOVE}),p("div",{className:d.default.header},void 0,t))},a.render=function(){var e=this.props,t=e.endTime,n=e.className,r=(0,l.diffAsUnits)(this.state.now,t),a=r.days<1;return p("div",{className:(0,o.default)(d.default.countdown,n)},void 0,this.renderSection(r.days,s.default.Messages.APPLICATION_STORE_COUNTDOWN_DAYS,a),this.renderSection(r.hours,s.default.Messages.APPLICATION_STORE_COUNTDOWN_HOURS,a),this.renderSection(r.minutes,s.default.Messages.APPLICATION_STORE_COUNTDOWN_MINUTES,a),this.renderSection(r.seconds,s.default.Messages.APPLICATION_STORE_COUNTDOWN_SECONDS,a))},r}(a.Component);y.displayName="ApplicationStoreCountdown",y.defaultProps={interval:1e3};var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(192),i=m(n(3)),l=m(n(8273)),u=m(n(8440)),s=m(n(373)),d=m(n(149)),f=m(n(372)),c=n(48),p=n(289),v=n(1),y=m(n(7880));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var i,l,s,c=r.prototype;return c.renderSku=function(e,t){var n=this,r=this.props,i=r.selectedSkuId,l=r.guildId,s=r.channelId,c=e.id===i;return E(d.default,{text:(0,u.default)(e)},e.id,(function(r){return a.createElement(o.Link,h({className:c?y.default.alternativeSkuSelected:y.default.alternativeSkuDefault,to:(0,p.getStoreListingLocation)(e.id,{guildId:l,channelId:s,slug:e.slug,analyticsSource:n.analyticsLocation})},r),c?E(f.default,{className:y.default.selectedIcon}):null,t)}))},c.render=function(){var e=this,t=this.props,n=t.skus,r=t.className;return 0===n.length?null:E("div",{className:r},void 0,E("div",{className:y.default.alternativeSkus},void 0,n.map((function(t){return e.renderSku(t,t.name)}))))},i=r,(l=[{key:"analyticsLocation",get:function(){return h({},this.props.analyticsContext.location,{object:v.AnalyticsObjects.ALTERNATIVE_SKU})}}])&&g(i.prototype,l),s&&g(i,s),r}(a.PureComponent);O.displayName="AlternativeSkus";var I=i.default.connectStores([s.default],(function(e){return{skus:e.storeListing.alternativeSkuIds.map((function(e){return s.default.get(e)})).filter(c.isNotNullish)}}))((0,l.default)(O));t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=p(n(0)),o=f(n(9)),i=f(n(1227)),l=p(n(1161)),u=n(8366),s=f(n(6)),d=f(n(7881));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.label,n=e.value;return y("div",{className:d.default.row},void 0,y("label",{className:d.default.label},void 0,t,":"),y("span",{className:d.default.info},void 0,n))};m.displayName="Row";var _=y("span",{},void 0,", "),h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var f=r.prototype;return f.renderReleaseDate=function(){var e=this.props.sku;return null==e.releaseDate?null:y(m,{label:s.default.Messages.APPLICATION_STORE_DETAILS_RELEASE_DATE,value:l.dateFormat(e.releaseDate,"LL")})},f.renderGenres=function(){var e=this.props.sku;if(null==e.genres||0===e.genres.size)return null;var t=[];return e.genres.forEach((function(n){t.push(y(a.Fragment,{},n,(0,u.getGenreText)(n),t.length<e.genres.size-1?_:null))})),y(m,{label:s.default.Messages.APPLICATION_STORE_DETAILS_GENRES,value:t})},f.renderDevelopers=function(){var e=this.props.game;if(0===e.developers.length)return null;var t=e.developers.map((function(e){return e.name})).join(", ");return y(m,{label:s.default.Messages.APPLICATION_STORE_DETAILS_DEVELOPER,value:t})},f.renderPublishers=function(){var e=this.props.game;if(0===e.publishers.length)return null;var t=e.publishers.map((function(e){return e.name})).join(", ");return y(m,{label:s.default.Messages.APPLICATION_STORE_DETAILS_PUBLISHER,value:t})},f.render=function(){var e=this.props.className;return y("div",{className:(0,o.default)(e,d.default.details)},void 0,y(i.default,{className:d.default.contentHeader},void 0,s.default.Messages.APPLICATION_STORE_SECTION_TITLE_DETAILS),this.renderReleaseDate(),this.renderGenres(),this.renderDevelopers(),this.renderPublishers())},r}(a.Component);h.displayName="ApplicationDetails";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=C(n(0)),i=I(n(9)),l=n(192),u=I(n(3)),s=n(5672),d=n(1228),f=I(n(39)),c=I(n(12)),p=I(n(5826)),v=I(n(373)),y=I(n(61)),m=I(n(93)),_=C(n(16)),h=n(289),E=n(299),g=n(1),S=I(n(6)),O=I(n(7882));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e[e.RESTRICTED_IN_REGION=1]="RESTRICTED_IN_REGION",e[e.REQUIRES_DESKTOP_APP=2]="REQUIRES_DESKTOP_APP",e[e.UNAVAILABLE_OPERATING_SYSTEM=3]="UNAVAILABLE_OPERATING_SYSTEM",e[e.DLC_REQUIRES_BASE_APPLICATION=4]="DLC_REQUIRES_BASE_APPLICATION",e[e.EARLY_ACCESS=5]="EARLY_ACCESS",e[e.UNAVAILABLE_IN_LANGUAGE=6]="UNAVAILABLE_IN_LANGUAGE"}(a||(a={}));var N=m.default.getArticleURL(g.HelpdeskArticles.APPLICATION_STORE_OVERVIEW),A=m.default.getArticleURL(g.HelpdeskArticles.APPLICATION_STORE_EARLY_ACCESS),P=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var o=r.prototype;return o.componentDidMount=function(){var e=this.props,t=e.sku,n=e.dependentSku;null!=t.dependentSkuId&&null==n&&(0,s.fetchSKU)(t.applicationId,t.dependentSkuId)},o.getTitle=function(e){switch(e){case a.RESTRICTED_IN_REGION:return S.default.Messages.APPLICATION_STORE_WARNING_RESTRICTED_IN_REGION_TITLE;case a.REQUIRES_DESKTOP_APP:return S.default.Messages.APPLICATION_STORE_WARNING_REQUIRES_DESKTOP_APP_TITLE;case a.UNAVAILABLE_OPERATING_SYSTEM:switch(_.default.getPlatform()){case _.PlatformTypes.WINDOWS:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_WINDOWS_TITLE;case _.PlatformTypes.OSX:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_MAC_OS_TITLE;case _.PlatformTypes.LINUX:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_LINUX_TITLE;default:return S.default.Messages.APPLICATION_STORE_WARNING_REQUIRES_DESKTOP_APP_TITLE}case a.DLC_REQUIRES_BASE_APPLICATION:return S.default.Messages.APPLICATION_STORE_WARNING_DLC_REQUIRES_BASE_APPLICATION_TITLE;case a.EARLY_ACCESS:return S.default.Messages.APPLICATION_STORE_WARNING_EARLY_ACCESS_TITLE;case a.UNAVAILABLE_IN_LANGUAGE:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_IN_LANGUAGE_TITLE}},o.getDescription=function(e){var t=this;switch(e){case a.RESTRICTED_IN_REGION:return S.default.Messages.APPLICATION_STORE_WARNING_RESTRICTED_IN_REGION_DESCRIPTION.format({helpArticle:N});case a.REQUIRES_DESKTOP_APP:return S.default.Messages.APPLICATION_STORE_WARNING_REQUIRES_DESKTOP_APP_DESCRIPTION.format({downloadHook:function(e,n){return E.isMobile?e:b(y.default,{className:O.default.link,tag:"a",onClick:t.handleDownloadApps},n,e)}});case a.UNAVAILABLE_OPERATING_SYSTEM:switch(_.default.getPlatform()){case _.PlatformTypes.LINUX:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_LINUX_DESCRIPTION;default:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_OS_DESCRIPTION}case a.DLC_REQUIRES_BASE_APPLICATION:var n=this.props.dependentSku;return null==n?null:S.default.Messages.APPLICATION_STORE_WARNING_DLC_REQUIRES_BASE_APPLICATION_DESCRIPTION.format({baseName:n.name,helpArticle:N,baseHook:function(e,t){return b(l.Link,{to:{pathname:g.Routes.APPLICATION_STORE_LISTING_SKU(n.id),state:{analyticsSource:g.AnalyticsLocations.APPLICATION_STORE_WARNING}}},t,e)}});case a.EARLY_ACCESS:return S.default.Messages.APPLICATION_STORE_WARNING_EARLY_ACCESS_DESCRIPTION.format({helpArticle:A});case a.UNAVAILABLE_IN_LANGUAGE:return S.default.Messages.APPLICATION_STORE_WARNING_UNAVAILABLE_IN_LANGUAGE_DESCRIPTION}},o.handleDownloadApps=function(){(0,d.showAppDownloadModal)(g.AnalyticsLocations.APPLICATION_STORE_WARNING)},o.getColorClass=function(e){switch(e){case a.RESTRICTED_IN_REGION:return O.default.red;default:return O.default.yellow}},o.renderWarning=function(e){var t=this.getTitle(e),n=this.getDescription(e);return b("div",{className:(0,i.default)(O.default.warning,this.getColorClass(e))},e,b("div",{className:O.default.title},void 0,t),b("div",{className:O.default.description},void 0,n))},o.render=function(){var e=this.props,t=e.sku,n=e.dependentSku,r=e.isEntitledToDependentSku,o=e.className,i=[];return t.restricted&&i.push(this.renderWarning(a.RESTRICTED_IN_REGION)),_.default.isWeb()?i.push(this.renderWarning(a.REQUIRES_DESKTOP_APP)):t.supportedOperatingSystems.includes((0,h.nativePlatformTypeToSKUOperatingSystem)(_.default.getPlatform()))||i.push(this.renderWarning(a.UNAVAILABLE_OPERATING_SYSTEM)),null==n||r||i.push(this.renderWarning(a.DLC_REQUIRES_BASE_APPLICATION)),t.accessType===g.SKUAccessTypes.EARLY_ACCESS&&i.push(this.renderWarning(a.EARLY_ACCESS)),0===i.length?null:b("div",{className:o},void 0,i)},r}(o.PureComponent);P.displayName="ApplicationStoreWarning";var R=u.default.connectStores([f.default,v.default,p.default,c.default],(function(e){var t=e.sku,n=null!=t.dependentSkuId?v.default.get(t.dependentSkuId):null;return{locale:f.default.locale,dependentSku:n,isEntitledToDependentSku:null!=t.dependentSkuId&&!0===p.default.isEntitledToSku(c.default.getNullableCurrentUser(),t.dependentSkuId,t.applicationId)}}))(P);t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(192),i=E(n(3)),l=n(5672),u=E(n(8273)),s=E(n(8440)),d=E(n(71)),f=E(n(373)),c=E(n(8364)),p=E(n(29)),v=n(48),y=n(289),m=n(1),_=E(n(6)),h=E(n(7883));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t){var n=e.applicationId,r=(0,y.getPrimarySKUForApplication)(n,d.default,f.default);return null!=r?c.default.getForSKU(r.id,t):null}var b=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={isCollapsed:!0},t.handleCollapsedToggle=function(){t.setState({isCollapsed:!t.state.isCollapsed})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n);var i=r.prototype;return i.componentDidMount=function(){var e=this.props,t=e.sku,n=e.fetchStoreListing;null==C(t,e.channelId)&&n(t.id)},i.componentDidUpdate=function(e){var t=this.props,n=t.sku,r=t.relatedSkuIds;if(null!=r&&r!==e.relatedSkuIds)for(var a,o=O(r);!(a=o()).done;){var i=a.value;(0,l.fetchSKU)(n.applicationId,i)}},i.renderSection=function(e,t,n){var r=this.props,i=r.sku,l=r.channelId,u=r.guildId,d=r.analyticsContext,f=this.state.isCollapsed,c=5===t.length?5:4,v=f?t.slice(0,c):t,E=v.map((function(e,t){return S(o.Link,{className:n&&t===v.length-1?h.default.skuLast:h.default.skuNormal,to:(0,y.getStoreListingLocation)(e.id,{guildId:u,channelId:l,slug:e.slug,analyticsSource:d.location})},e.id,S("div",{className:h.default.name},void 0,e.name),S("div",{className:h.default.price},void 0,null!=e.getPrice()?(0,s.default)(e):null))}));return 0===E.length?null:S(a.Fragment,{},void 0,S("div",{className:h.default.title},void 0,function(e,t){if(e===t)switch(e){case m.SKUTypes.DURABLE_PRIMARY:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_GAMES_SAME;case m.SKUTypes.DURABLE:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_DLC_SAME;case m.SKUTypes.CONSUMABLE:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_CONSUMABLES_SAME;case m.SKUTypes.BUNDLE:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_BUNDLES_SAME}else switch(e){case m.SKUTypes.DURABLE_PRIMARY:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_GAMES_DIFFERENT;case m.SKUTypes.DURABLE:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_DLC_DIFFERENT;case m.SKUTypes.CONSUMABLE:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_CONSUMABLES_DIFFERENT;case m.SKUTypes.BUNDLE:return _.default.Messages.APPLICATION_STORE_PURCHASE_HEADER_BUNDLES_DIFFERENT}}(e,i.type)),E,c<t.length&&f?S(p.default,{color:p.default.Colors.PRIMARY,size:p.default.Sizes.SMALL,onClick:this.handleCollapsedToggle,className:h.default.collapseButton},void 0,_.default.Messages.APPLICATION_STORE_EXPAND_DOWNLOADABLE_CONTENT):null)},i.render=function(){var e=this.props.relatedSKUs;if(0===e.length)return null;var t=e.filter((function(e){return e.type===m.SKUTypes.BUNDLE})),n=e.filter((function(e){return e.type===m.SKUTypes.DURABLE})),r=e.filter((function(e){return e.type===m.SKUTypes.CONSUMABLE}));return S("div",{},void 0,this.renderSection(m.SKUTypes.BUNDLE,t,0===n.length&&0===r.length),this.renderSection(m.SKUTypes.DURABLE,n,0===r.length),this.renderSection(m.SKUTypes.CONSUMABLE,r,!0))},r}(a.PureComponent);b.displayName="RelatedContent";var M=(0,u.default)(i.default.connectStores([f.default],(function(e){var t=e.sku,n=e.channelId,r=C(t,n);if(null==r)return{relatedSkuIds:void 0,relatedSKUs:[]};var a=r.childSkuIds.filter((function(e){return t.id!==e})).map(f.default.get).filter(v.isNotNullish).filter((function(e){return!e.isPremiumPerk()}));return{relatedSkuIds:a.map((function(e){return e.id})),relatedSKUs:a}}))(b));t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=E(n(3)),l=E(n(10213)),u=E(n(160)),s=E(n(12)),d=E(n(9063)),f=E(n(373)),c=E(n(8364)),p=E(n(10214)),v=n(289),y=E(n(10216)),m=E(n(10217)),_=E(n(6)),h=E(n(7888));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a=r.prototype;return a.renderReasons=function(e,t,n){return 0===e.length&&0===t.length?null:S("div",{className:h.default.section},void 0,S("div",{className:h.default.sectionContent},void 0,e.map((function(e){return S("div",{className:h.default.unit},e.type,S(y.default,{reason:e,hidePersonalInformation:n}))})),t.map((function(e){return S("div",{className:h.default.unit},e.type,S(p.default,{reason:e}))}))))},a.getReviewToRender=function(){var e=this.props.storeListing;return null!=e.staffNotes?{type:m.default.Types.STAFF_NOTES,staffNotes:e.staffNotes}:null},a.render=function(){var e=this.props,t=e.socialReasons,n=e.nonSocialReasons,r=e.storeListing,a=e.hidePersonalInformation,i=e.className;if(0===t.length&&0===n.length&&null==r.staffNotes)return null;var l=n,u=this.getReviewToRender();return S("div",{className:(0,o.default)(h.default.root,i)},void 0,S("div",{className:h.default.header},void 0,_.default.Messages.APPLICATION_STORE_SECTION_TITLE_RECOMMENDATION),this.renderReasons(t,l,a),null!=u?S(m.default,{data:u,className:h.default.review}):null)},r}(a.Component);I.displayName="ApplicationWhyYouMightLikeIt";var T=i.default.connectStores([f.default,s.default,c.default,l.default,d.default,u.default],(function(e){var t=e.sku;return{socialReasons:(0,v.getSocialRecommendationReasons)(t.id,f.default,s.default,l.default,d.default),nonSocialReasons:(0,v.getNonSocialRecommendationReasons)(t.id,f.default,c.default),hidePersonalInformation:u.default.hidePersonalInformation}}))(I);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(3)),a=d(n(2)),o=d(n(9212)),i=d(n(256)),l=d(n(8415)),u=d(n(12)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){return(p=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}).apply(this,arguments)}var v=!1,y={},m={};function _(e){var t=!1;return e.forEach((function(e){t=!1!==E(e)||t})),t}function h(e){var t=m[e];if(null==t)return!1;var n=t.gameId;return y[n]&&(delete(y=p({},y))[n][e],0===Object.values(y[n]).length&&delete y[n]),delete(m=p({},m))[e],!0}function E(e){var t=e.user,n=e.activities;if(null==t||!l.default.getUserAffinitiesUserIds().has(t.id))return!1;var r=n.find((function(e){return e.type!==s.ActivityTypes.CUSTOM_STATUS}));if(null==r)return h(t.id);var a=(0,o.default)(r);if(null==a)return h(t.id);var i=m[t.id];i&&i.gameId!==a&&h(t.id);var u=null!=r.timestamps&&r.timestamps.start||Date.now();return function(e,t){var n,r,a;y=p({},y,((r={})[e]=p({},y[e],((n={})[t.userId]=t,n)),r)),m=p({},m,((a={})[t.userId]={gameId:e,startedPlaying:t.startedPlaying},a))}(a,{userId:t.id,activity:r,startedPlaying:u}),!0}function g(){var e=!1;return l.default.needsRefresh()||v||(e=function(){y={},m={};var e=!1;return i.default.getUserIds().forEach((function(t){var n=u.default.getUser(t);null!=n&&(e=E({user:n,activities:i.default.getActivities(t)})||e)})),e}()),v=!l.default.needsRefresh(),e}var S=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var a,o,i,u=r.prototype;return u.initialize=function(){this.waitFor(l.default),this.syncWith([l.default],g)},u.getNowPlaying=function(e){return y[e]},u.getUserGame=function(e){return m[e]},a=r,(o=[{key:"games",get:function(){return y}},{key:"usersPlaying",get:function(){return m}},{key:"gameIds",get:function(){return Object.keys(y)}}])&&f(a.prototype,o),i&&f(a,i),r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){return y={},void(m={})},CONNECTION_OPEN_SUPPLEMENTAL:function(e){return _(e.presences)},LOGOUT:function(e){return y={},void(m={})},PRESENCE_UPDATE:function(e){return E(e)},PRESENCES_REPLACE:function(e){return _(e.presences)}});t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=n(1161),l=v(n(8455)),u=v(n(372)),s=v(n(10215)),d=v(n(5686)),f=n(1),c=v(n(6)),p=v(n(7885));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(e){var t=e.IconComponent,n=e.className;return _("div",{className:(0,o.default)(p.default.iconCircle,n)},void 0,_(t,{className:p.default.icon}))};h.displayName="IconCircle";var E=function(e){var t=e.circle,n=e.smallHeader,r=e.text,a=e.className;return _("div",{className:(0,o.default)(p.default.recommendationReason,a)},void 0,t,_("div",{className:p.default.description},void 0,null!=n?_("div",{className:p.default.smallHeader},void 0,n):null,_("div",{className:p.default.text},void 0,r)))};E.displayName="Unit";var g=_(h,{IconComponent:l.default}),S=_(h,{IconComponent:l.default}),O=_(h,{IconComponent:u.default}),I=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.reason,n=e.className;return t.type===f.StoreRecommendationTypes.RECENT_RELEASE_DATE?_(E,{className:n,circle:g,smallHeader:c.default.Messages.APPLICATION_STORE_NEW_RELEASE,text:(0,i.dateFormat)(t.releaseDate,"LL")}):t.type===f.StoreRecommendationTypes.RELEASE_DATE?_(E,{className:n,circle:S,smallHeader:c.default.Messages.APPLICATION_STORE_DETAILS_RELEASE_DATE,text:(0,i.dateFormat)(t.releaseDate,"LL")}):t.type===f.StoreRecommendationTypes.EARLY_ACCESS?null!=t.releaseDate?_(E,{className:n,circle:_(h,{IconComponent:s.default,className:p.default.earlyAccess}),smallHeader:c.default.Messages.APPLICATION_STORE_EARLY_ACCESS,text:(0,i.dateFormat)(t.releaseDate,"LL")}):_(E,{className:n,circle:_(h,{IconComponent:s.default,className:p.default.earlyAccess}),text:c.default.Messages.APPLICATION_STORE_EARLY_ACCESS}):t.type===f.StoreRecommendationTypes.FLAVOR_TEXT?_(E,{circle:O,text:t.flavorText,className:n}):t.type===f.StoreRecommendationTypes.HAS_FREE_PREMIUM_CONTENT?_(E,{className:n,circle:_(h,{IconComponent:d.default,className:p.default.premiumCircle}),text:c.default.Messages.APPLICATION_STORE_FREE_PREMIUM_CONTENT}):null},r}(a.Component);t.default=I,I.displayName="StoreRecommendationReason"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?12:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 12 16"}),s("path",{className:f,fill:d,d:"M9.9047619 5H10c1.1045695 0 2 .8954305 2 2v7c0 1.1045695-.8954305 2-2 2H2c-1.1045695 0-2-.8954305-2-2V7c0-1.1045695.8954305-2 2-2h6.45714286V3.80952381c0-1.30285714-1.05904762-2.36190476-2.36190476-2.36190476-1.01858607 0-1.88814941.64731751-2.21911842 1.55238095H2.3720229c.37146099-1.71441439 1.89811833-3 3.7232152-3 2.10285714 0 3.8095238 1.70666667 3.8095238 3.80952381V5zM6 12.5c1.1045695 0 2-.8954305 2-2s-.8954305-2-2-2-2 .8954305-2 2 .8954305 2 2 2z"}))}d.displayName="EarlyAccess"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=_(n(9)),l=_(n(8264)),u=_(n(8268)),s=_(n(8432)),d=_(n(278)),f=_(n(149)),c=_(n(8409)),p=_(n(279)),v=n(1),y=_(n(6)),m=_(n(7886));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=((r={})[v.StoreRecommendationTypes.NOW_PLAYING]={single:function(e,t){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_NOW_PLAYING_SINGLE.format({user1:e.username,user1Hook:function(){return t(e)}})},double:function(e,t,n){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_NOW_PLAYING_DOUBLE.format({user1:e.username,user1Hook:function(){return n(e)},user2:t.username,user2Hook:function(){return n(t)}})},other:function(e){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_NOW_PLAYING_OTHER.format({count:e})}},r[v.StoreRecommendationTypes.RECENTLY_PLAYED]={single:function(e,t){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_RECENTLY_PLAYED_SINGLE.format({user1:e.username,user1Hook:function(){return t(e)}})},double:function(e,t,n){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_RECENTLY_PLAYED_DOUBLE.format({user1:e.username,user1Hook:function(){return n(e)},user2:t.username,user2Hook:function(){return n(t)}})},other:function(e){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_RECENTLY_PLAYED_OTHER.format({count:e})}},r[v.StoreRecommendationTypes.EVER_PLAYED]={single:function(e,t){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_EVER_PLAYED_SINGLE.format({user1:e.username,user1Hook:function(){return t(e)}})},double:function(e,t,n){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_EVER_PLAYED_DOUBLE.format({user1:e.username,user1Hook:function(){return n(e)},user2:t.username,user2Hook:function(){return n(t)}})},other:function(e){return y.default.Messages.APPLICATION_STORE_RECOMMENDATION_EVER_PLAYED_OTHER.format({count:e})}},r),I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderUserPopout=function(e,t){return o.createElement(u.default,g({},t,{userId:e.id}))},t.renderUserTooltip=function(e,t,n,r){return E("div",{className:m.default.tooltip},void 0,E("div",{},void 0,t?e.username:e.tag),E(s.default,{className:m.default.tooltipTimestamp,start:n,end:r,location:s.default.Locations.ACTIVITY_FEED}))},t.renderPlayer=function(e,n,r,a){var u=e;if(null==u)return null;var s=t.props.reason.userInfo.find((function(e){return e.user===u}));return null==s?null:E(d.default,{preload:function(){return(0,l.default)(u.id,u.getAvatarURL(void 0))},renderPopout:function(e){return t.renderUserPopout(u,e)},position:d.default.Positions.RIGHT},u.id,(function(e){return E(f.default,{text:t.renderUserTooltip(u,t.props.hidePersonalInformation,s.startTime,s.endTime),"aria-label":u.tag},void 0,(function(t){var n;return o.createElement(p.default,g({className:(0,i.default)(m.default.playerAvatar,(n={},n[m.default.avatarMasked]=!a,n)),src:u.getAvatarURL(void 0),"aria-label":u.username,size:p.default.Sizes.SIZE_32},t,e))}))}))},t.renderPlayerOverflow=function(e,t,n){return E("div",{className:m.default.playerOverflow},n,e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var a=r.prototype;return a.renderDescription=function(e,t){var n=this,r=O[e];return 1===t.length?r.single(t[0].user,(function(e){return n.renderActivityDiscordTag(e)})):2===t.length?r.double(t[0].user,t[1].user,(function(e){return n.renderActivityDiscordTag(e)})):r.other(t.length)},a.renderActivityDiscordTag=function(e){var t=this;return E(d.default,{preload:function(){return(0,l.default)(e.id,e.getAvatarURL(void 0))},renderPopout:function(n){return t.renderUserPopout(e,n)},position:d.default.Positions.RIGHT},e.id,(function(t){return o.createElement("span",g({className:m.default.username},t),e.username)}))},a.render=function(){var e=this.props,t=e.reason,n=e.className,r=t.type,a=t.userInfo;return 0===a.length?null:E("div",{className:(0,i.default)(m.default.recommendationActivity,n)},void 0,E(c.default,{className:m.default.players,users:a.map((function(e){return e.user})),renderUser:this.renderPlayer,max:4,renderMoreUsers:this.renderPlayerOverflow}),E("div",{className:m.default.description},void 0,this.renderDescription(r,a)))},r}(o.PureComponent);I.displayName="ApplicationRecommendationActivity";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;p(n(0));var r,a,o=f(n(9)),i=f(n(3)),l=p(n(8332)),u=f(n(161)),s=f(n(6)),d=f(n(7887));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e[e.STAFF_NOTES=1]="STAFF_NOTES"}(a||(a={}));var y=function(e){var t=e.user,n=e.className,r=e.animate;return v("div",{className:(0,o.default)(d.default.staffReviewHeader,n)},void 0,v(l.default,{size:l.Sizes.SIZE_32,user:t,animate:r}),v("div",{className:d.default.headerText},void 0,v("div",{className:d.default.label},void 0,s.default.Messages.APPLICATION_STORE_STAFF_PICK),v("div",{className:d.default.username},void 0,t.username)))};y.displayName="StaffReason";var m=i.default.connectStores([u.default],(function(){return{animate:u.default.isFocused()}}))(y),_=function(e){var t=e.data,n=e.className;if(t.type===a.STAFF_NOTES){if(null==t.staffNotes)return null;var r=t.staffNotes,o=r.user,i=r.content;return null==o?null:v("div",{className:n},void 0,v(m,{user:o,className:d.default.header}),v("div",{className:d.default.notes},void 0,i))}throw new Error("Unknown type")};_.Types=a;var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(3)),i=n(5672),l=y(n(8318)),u=y(n(8273)),s=n(42),d=y(n(71)),f=y(n(373)),c=y(n(5690)),p=n(1),v=y(n(7889));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(e){var n=t.props.sku;(0,s.transitionTo)(e.id,{state:{analyticsSource:{object:p.AnalyticsObjects.NAVIGATION_LINK,section:p.AnalyticsSections.NAVIGATION,page:null==n?p.AnalyticsPages.STORE_DIRECTORY_BROWSE:p.AnalyticsPages.STORE_LISTING}}})},t.renderCustomBreadcrumb=function(e,t){return _(l.default.Title,{className:t?null:v.default.breadcrumb,muted:!t},void 0,e.label)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.sku,n=e.primarySkuId,r=e.isFetchingPrimarySku;null==n||r||null==t||(0,i.fetchSKU)(t.applicationId,n)},a.render=function(){var e=this.props,t=e.sku,n=e.primarySku,r=[],a=null;if(null!=t){var o=p.Routes.APPLICATION_STORE_LISTING_SKU(t.id,t.slug);a=o,null!=n&&r.push({id:p.Routes.APPLICATION_STORE_LISTING_SKU(n.id,n.slug),label:n.name}),r.push({id:o,label:t.name})}return _(c.default,{renderCustomBreadcrumb:this.renderCustomBreadcrumb,onBreadcrumbClick:this.handleClick,breadcrumbs:r,activeId:a})},r}(a.PureComponent);E.displayName="StoreBreadcrumbs";var g=(0,u.default)(o.default.connectStores([d.default,f.default],(function(e){var t=e.sku,n=null!=t?d.default.getGame(t.applicationId):null,r=null!=n&&null!=n.primarySkuId&&n.primarySkuId!==t.id?n.primarySkuId:null;return{primarySkuId:r,isFetchingPrimarySku:null!=r&&f.default.isFetching(r),primarySku:null!=r?f.default.get(r):null}}))(E));t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=g(n(0)),l=h(n(9)),u=h(n(29)),s=h(n(1227)),d=h(n(55)),f=n(380),c=n(48),p=g(n(16)),v=n(8403),y=n(1),m=h(n(6)),_=h(n(7890));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,I(e,t)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=((r={})[y.OperatingSystems.WINDOWS]=m.default.Messages.WINDOWS,r[y.OperatingSystems.MACOS]=m.default.Messages.MACOS,r[y.OperatingSystems.LINUX]=m.default.Messages.LINUX,r),C=((a={})[y.OperatingSystems.WINDOWS]=p.PlatformTypes.WINDOWS,a[y.OperatingSystems.MACOS]=p.PlatformTypes.OSX,a[y.OperatingSystems.LINUX]=p.PlatformTypes.LINUX,a),b=function(e){function t(){return e.apply(this,arguments)||this}return O(t,e),t.prototype.render=function(){var e,t=this.props,n=t.active,r=t.children,a=t.pageSize,o=t.onClick,i=a===v.PageSizes.LARGE;return S(u.default,{size:i?u.default.Sizes.MIN:u.default.Sizes.LARGE,fullWidth:!i,color:n?_.default.tabSelectedColor:_.default.tabNotSelectedColor,className:(0,l.default)((e={},e[_.default.tabPageLarge]=i,e[_.default.tabPageSmall]=!i,e[_.default.tabSelected]=n,e[_.default.tabNotSelected]=!n,e)),onClick:o},void 0,r)},t}(i.PureComponent);b.displayName="Tab";var M=function(e){function t(t){var n;(n=e.call(this,t)||this).handleSelectOperatingSystem=function(e){n.setState({selectedOperatingSystem:e})};for(var r=p.default.getPlatform(),a=Object.keys(t.systemRequirements),o=a[0],i=0,l=a;i<l.length;i++){var u=l[i];C[u]===r&&(o=u)}return n.state={selectedOperatingSystem:o},n}O(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.systemRequirements,r=t.selectedOperatingSystem,a=Object.keys(n);return a.includes(r)?null:{selectedOperatingSystem:a[0]}};var n=t.prototype;return n.renderTabs=function(){var e=this,t=this.props,n=t.pageSize,r=t.systemRequirements,a=this.state.selectedOperatingSystem,o=Object.keys(r);return 1===o.length?null:S(d.default,{className:_.default.tabs},void 0,S("div",{className:_.default.separator}),o.map((function(t){return S(b,{active:t===a,onClick:function(){return e.handleSelectOperatingSystem(t)},pageSize:n},t,T[t])})))},n.renderRequirementsSection=function(e,t){if(null==e)return null;var n=function(e){return[{key:m.default.Messages.APPLICATION_STORE_SPECS_OS,value:e.operating_system_version},{key:m.default.Messages.APPLICATION_STORE_SPECS_CPU,value:e.cpu},{key:m.default.Messages.APPLICATION_STORE_SPECS_MEMORY,value:null!=e.ram?m.default.Messages.APPLICATION_STORE_SPECS_MEMORY_VALUE.format({size:(0,f.formatSize)(1e3*e.ram,{showDecimalForGB:!1})}):null},{key:m.default.Messages.APPLICATION_STORE_SPECS_VIDEO,value:e.gpu},{key:m.default.Messages.APPLICATION_STORE_SPECS_STORAGE,value:null!=e.disk?(0,f.formatSize)(1e3*e.disk,{showDecimalForGB:!1}):null},{key:m.default.Messages.APPLICATION_STORE_SPECS_SOUND,value:e.sound_card},{key:m.default.Messages.APPLICATION_STORE_SPECS_NETWORK,value:e.network},{key:m.default.Messages.APPLICATION_STORE_SPECS_NOTES,value:e.notes}]}(e).map((function(e,t){var n=null!=e.value?e.value.trim():null;return null==n||0===n.length?null:S("div",{className:_.default.requirement},t,S("span",{className:_.default.requirementKey},void 0,e.key,":"),n)})).filter(c.isNotNullish);return S("div",{className:_.default.requirements},void 0,S(s.default,{tag:"h4"},void 0,t),n)},n.renderBody=function(){var e=this.props.systemRequirements[this.state.selectedOperatingSystem],t=e.minimum,n=e.recommended;return S("div",{className:_.default.requirementsContainer},void 0,this.renderRequirementsSection(t,m.default.Messages.APPLICATION_STORE_SPECS_MINIMUM),this.renderRequirementsSection(n,m.default.Messages.APPLICATION_STORE_SPECS_RECOMMENDED))},n.render=function(){return S("div",{className:this.props.className},void 0,S(s.default,{},void 0,m.default.Messages.APPLICATION_STORE_SECTION_TITLE_SYSTEM_REQUIREMENTS),this.renderTabs(),this.renderBody())},t}(i.PureComponent);M.displayName="SystemRequirements";var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TestModeStoreListingButtonEnums=void 0;var r,a=p(n(0)),o=f(n(3)),i=p(n(389)),l=f(n(9238)),u=p(n(8253)),s=f(n(8364)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _={DropdownSizes:l.default.DropdownSizes,Sizes:l.default.Sizes,Colors:l.default.Colors,Looks:l.default.Looks};t.TestModeStoreListingButtonEnums=_;var h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderContextMenu=function(){var e=t.props,n=e.storeListings,r=e.onStoreListingSelect,a=e.currentStoreListingId,o=e.onMenuSelect,l=n.map((function(e){return e.id!==a?y(u.MenuItem,{id:""+e.id,label:e.id,action:function(){i.closeContextMenu(),r&&r(e)}}):null}));return y(u.default,{onSelect:o,navId:"test-store-listing","aria-label":d.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onClose:i.closeContextMenu},void 0,l)},t.handleContextMenu=function(e){e.stopPropagation(),i.openContextMenu(e,t.renderContextMenu)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.storeListings,n=e.primaryStoreListing,r=(e.skuId,e.onStoreListingSelect,e.currentStoreListingId,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["storeListings","primaryStoreListing","skuId","onStoreListingSelect","currentStoreListingId"])),o=null!=n?1:0;return(o+=t.length)<2?null:a.createElement(l.default,v({onClick:this.handleContextMenu,onDropdownClick:this.handleContextMenu,onContextMenu:this.handleContextMenu},r),d.default.Messages.APPLICATION_TEST_MODE_VIEW_OTHER_LISTINGS)},r}(a.PureComponent);h.displayName="TestModeStoreListingButton";var E=o.default.connectStores([s.default],(function(e){var t=e.skuId;return{storeListings:s.default.getUnpublishedForSKU(t),primaryStoreListing:s.default.getForSKU(t)}}))(h);t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(9)),i=n(394),l=C(n(3)),u=C(n(199)),s=n(8344),d=C(n(8543)),f=C(n(182)),c=n(42),p=C(n(162)),v=C(n(15)),y=C(n(36)),m=C(n(29)),_=C(n(1227)),h=C(n(55)),E=C(n(371)),g=C(n(372)),S=n(8403),O=n(1),I=C(n(6)),T=C(n(7892));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){N(o,r,a,i,l,"next",e)}function l(e){N(o,r,a,i,l,"throw",e)}i(void 0)}))}}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var R=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleJoinOrView=A(regeneratorRuntime.mark((function e(){var n,r,a,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,r=n.guild,a=n.skuId,o=n.isInGuild,i=n.isLurking,l=function(){return(0,c.transitionTo)(O.Routes.CHANNEL(r.id,y.default.getChannelId(r.id)))},!i){e.next=6;break}(0,s.joinPublishedStoreListingSkuGuild)(a).then(l),e.next=18;break;case 6:if(!o){e.next=10;break}l(),e.next=18;break;case 10:return e.prev=10,e.next=13,u.default.joinGuild(r.id,!0,O.JoinGuildSources.APPLICATION_STORE);case 13:l(),e.next=18;break;case 16:e.prev=16,e.t0=e.catch(10);case 18:case"end":return e.stop()}}),e,null,[[10,16]])}))),t.handleLogin=function(){var e={redirect_to:O.Routes.APPLICATION_STORE_LISTING_SKU(t.props.skuId)};(0,c.transitionTo)(O.Routes.LOGIN,{search:(0,i.stringify)(e)})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,P(t,n);var a=r.prototype;return a.renderMemberInfo=function(){var e=this.props.guild,t=e.approximateMemberCount,n=e.approximatePresenceCount;return null==t||null==n?null:M(h.default,{className:T.default.memberInfo,align:h.default.Align.CENTER},void 0,M("div",{className:T.default.dotOnline}),M("span",{className:T.default.memberText},void 0,I.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:n})),M("div",{className:T.default.dotOffline}),M("span",{className:T.default.memberText},void 0,I.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:t})))},a.render=function(){var e=this.props,t=e.guild,n=e.inChannel,r=e.isInGuild,a=e.isLurking,i=e.isAuthenticated,l=e.className,u=e.pageSize;if(n&&r)return null;var s=new p.default(t),d=I.default.Messages.LURKER_MODE_VIEW_GUILD,f=this.handleJoinOrView,c=m.default.Looks.FILLED,v=m.default.Colors.PRIMARY;return i?r?(c=m.default.Looks.OUTLINED,v=T.default.buttonColorInGuild,d=M(h.default,{align:h.default.Align.CENTER},void 0,M("div",{},void 0,I.default.Messages.JOINED_GUILD),M(g.default,{className:T.default.joinedCheckmark}))):a&&n&&(d=I.default.Messages.JOIN_GUILD):(d=I.default.Messages.LOGIN,f=this.handleLogin),M("div",{className:(0,o.default)(l,u===S.PageSizes.SMALL?T.default.inviteSmall:T.default.inviteLarge)},void 0,M(_.default,{},void 0,I.default.Messages.APPLICATION_STORE_SECTION_TITLE_VERIFIED_GUILD),M("div",{className:T.default.content},void 0,M("div",{className:T.default.info},void 0,M(E.default,{guild:s,active:!0,size:E.default.Sizes.LARGE,className:T.default.guildIcon}),M("div",{className:T.default.infoText},void 0,M("div",{className:T.default.name},void 0,t.name),this.renderMemberInfo())),M(m.default,{size:m.default.Sizes.SMALL,className:T.default.actionButton,fullWidth:!0,color:v,look:c,onClick:f},void 0,d)))},r}(a.PureComponent);R.displayName="VerifiedGuildInvite";var L=(0,d.default)(l.default.connectStores([v.default,f.default],(function(e){var t=e.guild,n=f.default.isLurking(t.id);return{isInGuild:null!=v.default.getGuild(t.id)&&!n,isLurking:n}}))(R));t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return r.NotificationOptions}}),t.default=void 0;var r=n(10460),a=n(10460).default;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(1243)),i=n(8404),l=n(3),u=b(n(184)),s=b(n(1226)),d=b(n(9039)),f=b(n(105)),c=b(n(106)),p=n(1246),v=b(n(10)),y=b(n(256)),m=b(n(699)),_=b(n(278)),h=b(n(149)),E=b(n(8536)),g=b(n(8436)),S=b(n(1210)),O=n(9239),I=n(1),T=b(n(6)),C=b(n(7896));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(){return(N=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}).apply(this,arguments)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var R;!function(e){e[e.PAGES=0]="PAGES",e[e.DMS=1]="DMS"}(R||(R={}));var L=P("rect",{x:40,y:6,width:144,height:20,rx:10}),D=P("circle",{cx:16,cy:16,r:16}),w=P("rect",{x:40,y:50,width:144,height:20,rx:10,opacity:.9}),j=P("circle",{cx:16,cy:60,r:16,opacity:.9}),k=P("rect",{x:40,y:94,width:144,height:20,rx:10,opacity:.8}),U=P("circle",{cx:16,cy:104,r:16,opacity:.8}),G=P("rect",{x:40,y:138,width:144,height:20,rx:10,opacity:.7}),F=P("circle",{cx:16,cy:148,r:16,opacity:.7}),B=P("rect",{x:40,y:182,width:144,height:20,rx:10,opacity:.6}),H=P("circle",{cx:16,cy:192,r:16,opacity:.6}),x=P("rect",{x:40,y:226,width:144,height:20,rx:10,opacity:.5}),V=P("circle",{cx:16,cy:236,r:16,opacity:.5}),W=P("rect",{x:40,y:270,width:144,height:20,rx:10,opacity:.4}),Y=P("circle",{cx:16,cy:280,r:16,opacity:.4}),z=P("rect",{x:40,y:314,width:144,height:20,rx:10,opacity:.3}),K=P("circle",{cx:16,cy:324,r:16,opacity:.3}),$=P("rect",{x:40,y:358,width:144,height:20,rx:10,opacity:.2}),Z=P("circle",{cx:16,cy:368,r:16,opacity:.2}),q=P("rect",{x:40,y:402,width:144,height:20,rx:10,opacity:.1}),X=P("circle",{cx:16,cy:412,r:16,opacity:.1}),J=P(a.memo((function(){return P("svg",{width:"184",height:"428",viewBox:"0 0 184 428",className:C.default.empty},void 0,L,D,w,j,k,U,G,F,B,H,x,V,W,Y,z,K,$,Z,q,X)})),{},"no-private-channels"),Q=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={initialized:!1,preRenderedChildren:0,nonNullChildren:[]},t._list=null,t.hasReportedAnalytics=!1,t.reportAnalytics=function(){var e;if(!t.hasReportedAnalytics){var n=null===(e=t._list)||void 0===e?void 0:e.getScrollerState();if(null!=n){var r=t.props,o=r.privateChannelIds,i=r.channels;if(0!==o.length){var l=44*a.Children.count(t.props.children);if(null!=n){var u=Math.round((n.offsetHeight-l)/44),s=u>o.length?o.slice(0,u+1):o,d=s.map((function(e){return null!=i[e]?i[e].getRecipientId():null})),f={num_users_visible:s.length,num_users_visible_with_mobile_indicator:d.filter((function(e){return null!=e&&y.default.isMobileOnline(e)})).length};t.hasReportedAnalytics=!0,c.default.trackWithMetadata(I.AnalyticEvents.DM_LIST_VIEWED,N({},f))}}}}},t.getSectionHeight=function(e){var n=t.props.showDMHeader;return e===R.PAGES?0:n?40:0},t.setList=function(e){t._list=e,t.props.listRef.current=e,t.props.listNavigator.getContainerProps().ref.current=(null==e?void 0:e.getScrollerNode())||null},t.handleScroll=(0,o.default)((function(){if(null!=t._list){var e=t._list.getScrollerNode();null!=e&&s.default.updateChannelListScroll(I.ME,e.scrollTop)}}),100),t.renderDM=function(e,n,r){var o=t.props,i=o.privateChannelIds,l=o.channels,u=o.selectedChannelId,s=o.listNavigator,d=l[i[n]];if(null==d)return null;var f=d.isMultiUserDM()?O.GroupDM:O.DirectMessage;return a.createElement(f,N({key:d.id,channel:d,selected:d.id===u},s.getItemProps({index:r})))},t.renderChild=function(e,n){var r=t.props.listNavigator,a=t.state.nonNullChildren[e];return null!=a?a(r.getItemProps,n):null},t.renderRow=function(e){var n=e.section,r=e.row,a=e.rowIndex,o=t.props.privateChannelIds;return n===R.PAGES?t.renderChild(r,a):0===r&&0===o.length?J:t.renderDM(n,r,a)},t.renderSection=function(e){var n=e.section,r=t.props.showDMHeader;return n!==R.PAGES&&r?P(g.default,{className:C.default.privateChannelsHeaderContainer},n,P("span",{className:C.default.headerText},void 0,T.default.Messages.DIRECT_MESSAGES),P(d.default,{tooltip:T.default.Messages.CREATE_DM,tooltipPosition:h.default.Positions.TOP,popoutAlign:_.default.Align.LEFT,iconClassName:C.default.privateChannelRecipientsInviteButtonIcon,icon:E.default,subscribeToGlobalHotkey:!0})):null},t.getRowHeight=function(e,n){var r=t.props.privateChannelIds;return e===R.DMS&&0===n&&0===r.length?428:44},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n),r.getDerivedStateFromProps=function(e){var t=e.children;if(null==t)return{preRenderedChildren:0,nonNullChildren:[]};var n=t.filter((function(e){return null!=e}));return{preRenderedChildren:n.length,nonNullChildren:n}};var i=r.prototype;return i.componentDidMount=function(){var e=this.props,t=e.selectedChannelId,n=e.homeLink;null!=t&&null!=n&&n.indexOf(t)>=0&&this.scrollToChannel(t),this.reportAnalytics()},i.shouldComponentUpdate=function(e){return!(0,u.default)(this.props,e,["children"])},i.componentDidUpdate=function(e){var t=this.props,n=t.selectedChannelId,r=t.homeLink;null!=n&&n!==e.selectedChannelId?this.scrollToChannel(n):null==n&&r!==e.homeLink&&this.scrollToChannel(null),this.reportAnalytics()},i.scrollToChannel=function(e){if(null!=this._list){var t=this.props.padding,n=this.state.preRenderedChildren,r=null!=e?this.props.privateChannelIds.indexOf(e):-1,a=0;r<0||null==e?this._list.scrollTo({to:a}):(a+=44*(r+n)+t,this._list.scrollIntoViewRect({start:Math.max(a-8,0),end:a+44+8}))}},i.render=function(){var e=this,t=this.props,n=t.privateChannelIds,r=t.padding,o=t.listNavigator,i=this.state.preRenderedChildren,l=o.getContainerProps(),u=(l.ref,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(l,["ref"]));return P(p.FocusJumpSection,{},void 0,(function(t){return a.createElement(S.default,N({fade:!0,ref:e.setList,onScroll:e.handleScroll,className:C.default.scroller,sectionHeight:e.getSectionHeight,paddingTop:r,paddingBottom:8,rowHeight:e.getRowHeight,renderSection:e.renderSection,renderRow:e.renderRow,sections:[i,n.length||1]},u,t))}))},r}(a.Component);Q.displayName="PrivateChannelsList",Q.defaultProps={padding:8};var ee=function(e){var t=e.version,n=e.theme,r=e.children,o=e.showDMHeader,u=e.selectedChannelId,s=a.Children.count(r),d=v.default.getMutablePrivateChannels(),c=(0,l.useStateFromStoresObject)([m.default,v.default,f.default],(function(){return{privateChannelIds:m.default.getPrivateChannelIds(),theme:f.default.darkSidebar?I.ThemeTypes.DARK:n,keyboardModeEnabled:f.default.keyboardModeEnabled,version:null!=t?t+":"+v.default.getPrivateChannelsVersion():v.default.getPrivateChannelsVersion()}})),p=c.privateChannelIds,y=a.useRef(null),_=a.useCallback((function(e,t){var n=y.current;if(null!=n)if(null!=t){var r=n.getSectionRowFromIndex(t),a=r[0],o=r[1];n.scrollToIndex({section:a,row:o,padding:176,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.getElementById(e))||void 0===t?void 0:t.focus()}))}})}else{var i;null===(i=document.getElementById(e))||void 0===i||i.focus({preventScroll:!0})}}),[]),h=a.useCallback((function(e){var t=y.current;if(null==t)return e;for(var n=t.getItems(),r=0;r<n.length;r++){var a=n[r];if("row"===a.type){var o=a.section,i=a.row,l=a.rowIndex;if(null!=i&&null!=l&&t.isItemVisible(o,i,!0))return l}}return e}),[]),E=o?1:0,g=s+p.length+E,S=s+E,O=(0,i.useListNavigator)({navId:"private-channels",itemCount:g,focusedIndex:S,setFocus:_,getNewFocusIndex:h,enabled:c.keyboardModeEnabled});return a.createElement(Q,N({channels:d,selectedChannelId:u,listRef:y,theme:n,version:t,children:r},e,c,{listNavigator:O}))};ee.displayName="ConnectedPrivateChannelsList";var te=ee;t.default=te},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var i=function(e){var t=e.id,n=e.startColor,r=e.stopColor,a=e.color,i=e.stop;return o("linearGradient",{id:t},void 0,o("stop",{offset:"0",stopColor:n}),o("stop",{offset:i,stopColor:r}),o("stop",{offset:i,stopColor:a}),o("stop",{offset:"1",stopColor:a}))};i.displayName="Gradient";var l=i;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(9)),i=l(n(8114));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),r.prototype.render=function(){var e,t=this.props,n=t.tag,r=t.children,l=t.hoverText,u=t.className,f=t.forceHover,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["tag","children","hoverText","className","forceHover"]);return a.createElement("div",s({},c,{className:(0,o.default)(u,i.default.hoverRoll,(e={},e[i.default.disabled]=null==l,e[i.default.forceHover]=f,e))}),d(n,{className:i.default.hovered},void 0,l),d(n,{className:i.default.default},void 0,r))},r}(a.PureComponent);c.displayName="HoverRoll",c.defaultProps={tag:"div",forceHover:!1};var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){r.default.push(a.default,{title:l.default.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:l.default.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:(0,o.sizeString)(i.MAX_IMAGE_UPLOAD_FILESIZE_BYTES)})})};var r=u(n(397)),a=u(n(8422)),o=n(8289),i=n(9240),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P,t.CustomColorPicker=t.CustomColorButton=t.DefaultColorButton=void 0;var r,a=g(n(0)),o=h(n(9)),i=g(n(680)),l=n(202),u=h(n(88)),s=h(n(10228)),d=h(n(282)),f=h(n(153)),c=h(n(372)),p=h(n(9241)),v=n(1),y=h(n(6)),m=h(n(7901)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=function(){return Promise.resolve()};function b(e){var t,n=e.color,r=e.isDefault,s=void 0!==r&&r,d=e.isCustom,f=void 0!==d&&d,y=e.isSelected,_=void 0!==y&&y,h=e.disabled,E=void 0!==h&&h,g=e.style,S=void 0===g?{}:g,O=e.onClick,C=(0,i.useListItem)("color-"+n),b=null!=n?(0,l.int2hex)(n):S.backgroundColor,M=!1;return f&&!_?M=!0:(f||_)&&(M=(0,l.getDarkness)(n)>.1),T(u.default,{offset:-2},void 0,a.createElement("button",I({type:"button",className:(0,o.default)(m.default.colorPickerSwatch,(t={},t[m.default.disabled]=E,t[m.default.default]=s,t[m.default.custom]=f,t[m.default.noColor]=null==n,t)),disabled:E,onClick:function(){return null==O?void 0:O(n)},style:I({},S,{backgroundColor:b})},C),f?T(p.default,{className:m.default.colorPickerDropper,foreground:m.default.colorPickerDropperFg,width:14,height:14,color:M?v.Colors.WHITE:v.Colors.BLACK}):null,function(){var e=16,t=16;if((f||s)&&(e=32,t=24),_)return T(c.default,{width:e,height:t,color:M?v.Colors.WHITE:v.Colors.BLACK})}()))}b.displayName="Swatch";var M=function(e){function t(){return e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){var e=this.props,t=e.color,n=e.onChange,r=e.value;return T(b,{isDefault:!0,color:t,isSelected:t===r||0===r,onClick:n,disabled:e.disabled})},t}(a.PureComponent);t.DefaultColorButton=M,M.displayName="DefaultColorButton";var N=function(e){function t(){return e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){var e=this.props,t=e.customColor;return T(b,{isCustom:!0,color:t,isSelected:e.value===t,disabled:e.disabled})},t}(a.PureComponent);t.CustomColorButton=N,N.displayName="CustomColorButton";var A=function(e){function t(t){var n;(n=e.call(this,t)||this).handleHexChange=function(e){var t="#"===e[0]?e:"#"+e,r=(0,l.isValidHex)(t);n.setState({color:t,validColor:r?t:n.state.validColor}),r&&n.callOnChange(t)},n.handleOnChange=function(e){n.setState({color:e.hex,validColor:e.hex})},n.handleOnChangeComplete=function(e){n.callOnChange(e.hex)};var r=t.value,a=(0,l.int2hex)(null!=r?r:0);return n.state={color:a,validColor:a},n}S(t,e);var n=t.prototype;return n.componentWillUnmount=function(){var e=this.props.onClose;e&&e()},n.render=function(){var e=this.state,t=e.color,n=e.validColor;return T(d.default,{"aria-label":y.default.Messages.PICK_A_COLOR,className:m.default.colorPickerCustom},void 0,T(s.default,{onChangeComplete:this.handleOnChangeComplete,onChange:this.handleOnChange,color:n}),T(f.default,{className:(0,o.default)(m.default.customColorPickerInput,_.default.marginTop8),value:t,onChange:this.handleHexChange,maxLength:7}))},n.callOnChange=function(e){(0,this.props.onChange)((0,l.hex2int)(e))},t}(a.PureComponent);function P(e){var t=e.className,n=e.defaultColor,r=e.customColor,l=e.colors,u=e.value,s=e.disabled,d=e.onChange,f=e.renderDefaultButton,c=e.renderCustomButton,p=e.colorContainerClassName,v=function(e){return T("div",{className:m.default.colorPickerRow},void 0,e.map((function(e){return T(b,{color:e,isSelected:e===u,onClick:d,disabled:s},e)})))},y=l.slice(0,l.length/2),_=l.slice(l.length/2,l.length),h=(0,i.default)({id:"color-picker",isEnabled:!0,scrollToStart:C,scrollToEnd:C});return T(i.ListNavigatorProvider,{navigator:h},void 0,T(i.ListNavigatorContainer,{},void 0,(function(e){var i=e.ref,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement("div",I({className:(0,o.default)(m.default.container,t),ref:i},l),T("div",{className:(0,o.default)(m.default.defaultContainer,p)},void 0,f({value:u,color:n,onChange:d,disabled:s})),T("div",{className:(0,o.default)(m.default.customContainer,p)},void 0,c({value:u,customColor:r,disabled:s})),T("div",{className:m.default.presets},void 0,v(y),v(_)))})))}t.CustomColorPicker=A,A.displayName="CustomColorPicker",P.displayName="ColorPicker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(10472),l=n(8285),u=(r=n(7900))&&r.__esModule?r:{default:r};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){return f("div",{className:u.default.wrapper},void 0,f("div",{className:u.default.saturation},void 0,o.createElement(l.Saturation,this.props)),f("div",{className:u.default.hue},void 0,o.createElement(l.Hue,d({},this.props,{direction:"horizontal"}))))},r}(o.PureComponent);p.displayName="ColorPickerControl";var v=(0,i.CustomPicker)(p);t.default=v},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(8)),a=l(n(211)),o=l(n(3)),i=l(n(2));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=!1,f=[];var c=new(function(e){var t,n,r,a,o;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),i.prototype.getBackupCodes=function(){return f},r=i,(a=[{key:"togglingSMS",get:function(){return d}}])&&u(r.prototype,a),o&&u(r,o),i}(o.default.Store))(i.default,{MFA_ENABLE_SUCCESS:function(e){var t=e.token,n=e.codes;a.default.setToken(t),f=n},MFA_DISABLE_SUCCESS:function(e){var t=e.token;a.default.setToken(t)},MFA_SMS_TOGGLE:function(e){d=!0},MFA_SMS_TOGGLE_COMPLETE:function(e){d=!1},MFA_CLEAR_BACKUP_CODES:function(e){f=[]},MFA_VIEW_BACKUP_CODES:function(e){var t=e.codes;f=r.default.sortBy(t,"code")}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatExpiration=f,t.default=void 0;var r,a=(r=n(11608))&&r.__esModule?r:{default:r};var o={type:"",gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},i=/[^0-9]/g,l=/[^0-9/]/g;function u(e){for(var t=s(e).split(""),n=d(e),r=0;r<n.gaps.length;){var a=n.gaps[r]+r;if(!(a<t.length))break;t.splice(a,0," "),r+=1}return t.join("")}function s(e){return e.replace(i,"")}function d(e){var t=s(e);return t&&(0,a.default)(t)[0]||o}function f(e){var t=e.replace(l,"").split("/"),n=t[0],r=t[1],a=[];return parseInt(n,10)>12&&(n=n.substring(0,1)),a.push(n),(parseInt(n,10)>1||2===n.length||r)&&a.push("/"),r&&parseInt(r,10)>99&&(r=(r+"").substring(0,2)),a.push(r),a.join("")}var c={DEFAULT_CARD_TYPE:o,prettifyCreditCardNumber:u,formatCreditCardNumber:function(e){var t=s(e);return d(t),u(t)},getCreditCardType:d,cleanCardNumber:s,validateCardNumber:function(e){var t=d(e);if(null==t)throw new Error("Could not recognize card type.");if(!t.lengths.includes(e.length))throw new Error("Card number length is incorrect.")},getTypeInfo:function(e){return a.default.getTypeInfo(e)},formatExpiration:f};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=y(n(0)),o=p(n(9)),i=p(n(88)),l=y(n(474)),u=p(n(8978)),s=n(1),d=p(n(6)),f=p(n(7903)),c=p(n(370));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=0,h=function(e){switch(e){case s.OverlayNotificationPositions.TOP_LEFT:return d.default.Messages.OVERLAY_NOTIFICATIONS_TOP_LEFT;case s.OverlayNotificationPositions.TOP_RIGHT:return d.default.Messages.OVERLAY_NOTIFICATIONS_TOP_RIGHT;case s.OverlayNotificationPositions.BOTTOM_LEFT:return d.default.Messages.OVERLAY_NOTIFICATIONS_BOTTOM_LEFT;case s.OverlayNotificationPositions.BOTTOM_RIGHT:return d.default.Messages.OVERLAY_NOTIFICATIONS_BOTTOM_RIGHT;default:return d.default.Messages.OVERLAY_NOTIFICATIONS_DISABLED}},E=[s.OverlayNotificationPositions.DISABLED,s.OverlayNotificationPositions.TOP_LEFT,s.OverlayNotificationPositions.TOP_RIGHT,s.OverlayNotificationPositions.BOTTOM_LEFT,s.OverlayNotificationPositions.BOTTOM_RIGHT];function g(e){var t,n=e.position,r=e.onChange,p=a.useState((function(){return"notification-position-selector-"+_++}))[0],v=n===s.OverlayNotificationPositions.DISABLED?d.default.Messages.OVERLAY_NOTIFICATION_SETTINGS_DISABLED:d.default.Messages.OVERLAY_NOTIFICATION_SETTINGS_POSITION.format({position:h(n)});return m("div",{},void 0,m(i.default,{within:!0,offset:-2},void 0,m("div",{className:(0,o.default)(f.default.wrapper,(t={},t[f.default.disabledSelected]=n===s.OverlayNotificationPositions.DISABLED,t))},void 0,E.map((function(e){var t;return m("label",{className:(0,o.default)((t={},t[f.default.selected]=e===n,t[f.default.disabled]=e===s.OverlayNotificationPositions.DISABLED,t[f.default.topRight]=e===s.OverlayNotificationPositions.TOP_RIGHT,t[f.default.topLeft]=e===s.OverlayNotificationPositions.TOP_LEFT,t[f.default.bottomRight]=e===s.OverlayNotificationPositions.BOTTOM_RIGHT,t[f.default.bottomLeft]=e===s.OverlayNotificationPositions.BOTTOM_LEFT,t))},e,h(e),e===s.OverlayNotificationPositions.DISABLED?m(u.default,{className:f.default.disabledIcon}):null,m("input",{type:"radio",name:p,value:e,onChange:function(t){return r(t,e)},className:f.default.hiddenInput}))})))),m(l.default,{type:l.Types.DESCRIPTION,className:c.default.marginTop8},void 0,v))}g.displayName="NotificationSettings",g.Positions=s.OverlayNotificationPositions;var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(1234)),i=p(n(391)),l=n(42),u=p(n(10)),s=p(n(10237)),d=n(1),f=p(n(6)),c=p(n(7909));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).sendToChannel=function(e){var n=t.props,r=n.activity,a=n.onClose,i=e.record.id,s=u.default.getChannel(i);if(null!=s){switch(s.type){case d.ChannelTypes.DM:case d.ChannelTypes.GROUP_DM:(0,l.transitionTo)(d.Routes.CHANNEL(d.ME,s.id));break;case d.ChannelTypes.GUILD_TEXT:(0,l.transitionTo)(d.Routes.CHANNEL(s.guild_id,s.id))}setTimeout((function(){return o.default.sendActivityInvite({channelId:i,type:d.ActivityActionTypes.JOIN,activity:r,location:"Activity Panel- Invite to Join"}).then(a,a)}),200)}},t.sendToUser=function(e){var n=t.props,r=n.activity,a=n.onClose,l=e.record.id;i.default.openPrivateChannel(l).then((function(){o.default.sendActivityInviteUser({userId:l,type:d.ActivityActionTypes.JOIN,activity:r,location:"Activity Panel- Invite to Join"}).then(a,a)}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.activity,n=e.transitionState,r=e.onClose;return y(s.default,{title:f.default.Messages.USER_ACTIVITY_INVITE_TO_JOIN.format({name:t.name}),sendToChannel:this.sendToChannel,sendToUser:this.sendToUser,className:c.default.modal,onClose:r,transitionState:n})},r}(a.PureComponent);t.default=_,_.displayName="UserActivityInviteModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=T(n(0)),o=O(n(9)),i=O(n(8297)),l=T(n(714)),u=O(n(10)),s=O(n(15)),d=O(n(12)),f=O(n(699)),c=n(9071),p=O(n(151)),v=O(n(159)),y=n(35),m=O(n(1210)),_=n(121),h=n(1),E=O(n(6)),g=O(n(7908)),S=O(n(370));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(){var e=[];return f.default.getPrivateChannelIds().forEach((function(t){var n=u.default.getChannel(t);if(null!=n)if(n.type===h.ChannelTypes.DM){var r=n.getRecipientId(),a=null!=r?d.default.getUser(r):null;null!=a&&e.push({type:l.AutocompleterResultTypes.USER,record:a,score:0})}else n.isMultiUserDM()&&e.push({type:l.AutocompleterResultTypes.GROUP_DM,record:n,score:0})})),e}var N=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._scrollerRef=a.createRef(),t.state={autocompleter:null,results:[],query:"",selectedRow:0,sendingRecordId:null,keyboardMode:!0},t.scrollPageUp=function(){var e;null===(e=t._scrollerRef.current)||void 0===e||e.scrollPageUp({animate:!0})},t.scrollPageDown=function(){var e;null===(e=t._scrollerRef.current)||void 0===e||e.scrollPageDown({animate:!0})},t.handleResultsChange=function(e,n){var r=""===n.trim()?M():e;t.setState({results:r})},t.handleKeyDown=function(){t.state.keyboardMode||t.setState({keyboardMode:!0})},t.disableKeyboardMode=function(){t.setState({keyboardMode:!1})},t.handleMouseEnter=function(e){t.state.keyboardMode||t.setState({selectedRow:e})},t.handleSend=function(e){var n=t.props,r=n.sendToChannel,a=n.sendToUser,o=t.state.results[e],i=null!=o?o.record:null,u=t.state.sendingRecordId;if(null!=i&&null!=i.id&&null!=o&&null==u)switch(t.setState({sendingRecordId:i.id}),o.type){case l.AutocompleterResultTypes.GROUP_DM:case l.AutocompleterResultTypes.TEXT_CHANNEL:r(o);break;case l.AutocompleterResultTypes.USER:a(o)}},t.handleSelect=function(e,n){null==n?t.handleClear():t.handleSend(n)},t.handleSelectionChange=function(e,n){t.setState({selectedRow:n})},t.handleQueryChange=function(e){t.query(e)},t.handleClear=function(){t.query("")},t.getRowHeight=function(e,n){return e>0?0:null!=t.state.results[n]?34:0},t.renderRow=function(e){var n=e.section,r=e.row;if(n>0)return null;var a=t.state.results[r];return null!=a?t.renderResult(a,r):null},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n);var u=r.prototype;return u.componentDidMount=function(){var e=new l.default(this.handleResultsChange,[l.AutocompleterResultTypes.TEXT_CHANNEL,l.AutocompleterResultTypes.GROUP_DM,l.AutocompleterResultTypes.USER],100);e.search("");var t=e.results;this.setState((function(){return{autocompleter:e,results:t}})),_.ComponentDispatch.subscribe(h.ComponentActions.SCROLL_PAGE_UP,this.scrollPageUp),_.ComponentDispatch.subscribe(h.ComponentActions.SCROLL_PAGE_DOWN,this.scrollPageDown)},u.componentDidUpdate=function(e,t){var n=this.state.query,r=this._scrollerRef.current;n!==t.query&&null!=r&&r.scrollTo({to:0})},u.componentWillUnmount=function(){var e=this.state.autocompleter;null!=e&&e.destroy()},u.query=function(e){var t=this.state,n=t.results,r=t.autocompleter;null!=r&&(r.search(e),n=r.results),this.setState({query:e,selectedRow:0,results:n}),_.ComponentDispatch.unsubscribe(h.ComponentActions.SCROLL_PAGE_UP,this.scrollPageUp),_.ComponentDispatch.unsubscribe(h.ComponentActions.SCROLL_PAGE_DOWN,this.scrollPageDown)},u.scrollIntoView=function(e){var t=this.state.keyboardMode,n=this._scrollerRef.current;t&&null!=n&&n.scrollToIndex({section:0,row:e,padding:10})},u.renderResult=function(e,t){var n=this,r=this.state,a=r.selectedRow,o=r.sendingRecordId;switch(e.type){case l.AutocompleterResultTypes.TEXT_CHANNEL:var i=s.default.getGuild(e.record.guild_id);return C(c.Channel,{focused:a===t,onClick:function(){return n.handleSend(t)},onFocus:function(){return n.scrollIntoView(t)},onMouseEnter:function(){return n.handleMouseEnter(t)},channel:e.record},e.type+"-"+e.record.id,C("div",{className:g.default.miscContainer},void 0,o===e.record.id?C(p.default,{type:p.default.Type.PULSING_ELLIPSIS}):null!=i?i.name:null));case l.AutocompleterResultTypes.GROUP_DM:return C(c.GroupDM,{focused:a===t,onClick:function(){return n.handleSend(t)},onFocus:function(){return n.scrollIntoView(t)},onMouseEnter:function(){return n.handleMouseEnter(t)},channel:e.record,mentions:0},e.type+"-"+e.record.id,o===e.record.id?C(p.default,{type:p.default.Type.PULSING_ELLIPSIS}):null);case l.AutocompleterResultTypes.USER:return C(c.User,{focused:a===t,onClick:function(){return n.handleSend(t)},onFocus:function(){return n.scrollIntoView(t)},onMouseEnter:function(){return n.handleMouseEnter(t)},user:e.record,mentions:0,comparator:e.comparator},e.type+"-"+e.record.id,o===e.record.id?C(p.default,{type:p.default.Type.PULSING_ELLIPSIS}):null)}},u.renderSection=function(){return null},u.render=function(){var e=this.props,t=e.className,n=e.renderFooter,r=e.title,l=e.onClose,u=e.transitionState,s=this.state,d=s.query,f=s.selectedRow,c=s.results,p=s.keyboardMode;return C("div",{className:g.default.wrapper,onMouseMove:p?this.disableKeyboardMode:void 0},void 0,C(y.ModalRoot,{transitionState:u,size:y.ModalSize.DYNAMIC,className:(0,o.default)(g.default.modalSize,t),"aria-label":r},void 0,C(y.ModalHeader,{},void 0,C(y.ModalCloseButton,{className:g.default.closeButton,onClick:l}),C("div",{className:g.default.header},void 0,C(v.default,{tag:v.default.Tags.H2,className:S.default.marginBottom8},void 0,r),C(i.default,{size:i.default.Sizes.MEDIUM,query:d,selectedSection:0,selectedRow:f,sections:[c.length],className:g.default.queryInput,onSelect:this.handleSelect,onSelectionChange:this.handleSelectionChange,onQueryChange:this.handleQueryChange,onKeyDown:this.handleKeyDown,placeholder:E.default.Messages.ACTIVITY_FEED_SHARE_MODAL_SEARCH_PLACEHOLDER,autoFocus:!0,onClear:this.handleClear}))),0===c.length?C("div",{className:g.default.noResults}):a.createElement(m.default,{ref:this._scrollerRef,sections:[c.length],renderSection:this.renderSection,sectionHeight:0,renderRow:this.renderRow,rowHeight:this.getRowHeight,paddingBottom:20}),null!=n?n():null))},r}(a.PureComponent);t.default=N,N.displayName="ChannelSelectModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"m4 3.33325h6.9167c-.0834.25-.0834.58334-.0834.83334 0 3.25 2.5834 5.83333 5.8334 5.83333.25 0 .5833 0 .8333-.08334v3.91672c0 .8333-.6667 1.5-1.5 1.5h-6.75l-3 3v-3h-2.25c-.83333 0-1.5-.6667-1.5-1.5v-9.00005c0-.83333.66667-1.5 1.5-1.5z"}),s("path",{className:f,fill:d,d:"m20.0002 4.08325-3.5-3.499998-1 1.083338 1.6666 1.66666h-3.8333v1.5h3.8333l-1.6666 1.66667 1.0833 1.08333z"}))}d.displayName="GoToMessage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),u=g(n(9)),s=g(n(3)),d=g(n(94)),f=g(n(39)),c=g(n(29)),p=g(n(278)),v=g(n(149)),y=g(n(10240)),m=g(n(8778)),_=g(n(9246)),h=n(1),E=g(n(7913));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t,n,r){i||(i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var l=new Array(o),u=0;u<o;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:i,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=((r={})[h.RTCConnectionQuality.UNKNOWN]=v.default.Colors.BLACK,r[h.RTCConnectionQuality.BAD]=v.default.Colors.RED,r[h.RTCConnectionQuality.AVERAGE]=v.default.Colors.YELLOW,r[h.RTCConnectionQuality.FINE]=v.default.Colors.GREEN,r),b=((a={})[h.ConnectionStatus.CONNECTED]=E.default.rtcConnectionStatusConnected,a[h.ConnectionStatus.CONNECTING]=E.default.rtcConnectionStatusConnecting,a[h.ConnectionStatus.ERROR]=E.default.rtcConnectionStatusError,a),M=((o={})[h.RTCConnectionQuality.FINE]=E.default.rtcConnectionQualityFine,o[h.RTCConnectionQuality.AVERAGE]=E.default.rtcConnectionQualityAverage,o[h.RTCConnectionQuality.BAD]=E.default.rtcConnectionQualityBad,o[h.RTCConnectionQuality.UNKNOWN]=null,o),N=s.default.connectStores([d.default,f.default],(function(){return{theme:f.default.theme,connectionState:d.default.getState(),hostname:d.default.getHostname(),averagePing:d.default.getAveragePing(),lastPing:d.default.getLastPing(),outboundLossRate:d.default.getOutboundLossRate()}}))(_.default),A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderPopout=function(e){return l.createElement(N,e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n);var a=r.prototype;return a.renderPopoutTarget=function(e){return I(p.default,{renderPopout:this.renderPopout,position:p.default.Positions.TOP},void 0,e)},a.renderStatus=function(){var e=this.props,t=e.statusTextClassName,n=e.hasVideo,r=e.state,a=m.default.getStatus(r,n),o=a.connectionStatus,i=a.connectionStatusText;return this.renderPopoutTarget((function(e){var n=e.onClick;return I(c.default,{look:c.default.Looks.BLANK,size:c.default.Sizes.NONE,className:(0,u.default)(t,b[o]),onClick:n},void 0,i)}))},a.render=function(){var e,t=this.props,n=t.quality,r=t.smallPing,a=t.lastPing,o=t.state,i=t.className,s=t.children;return o===h.RTCConnectionStates.RTC_CONNECTED&&(e=I(v.default,{text:n!==h.RTCConnectionQuality.UNKNOWN&&null!=a?a.toFixed(0)+" ms":null,color:C[n]},void 0,(function(e){var t;return l.createElement(y.default,O({className:(0,u.default)(E.default.ping,(t={},t[E.default.smallPing]=r,t)),foreground:E.default.pingForeground},e))}))),I("div",{},void 0,I("div",{className:(0,u.default)(E.default.rtcConnectionStatus,M[n],i)},void 0,e,I("div",{className:E.default.labelWrapper},void 0,this.renderStatus())),s)},r}(l.PureComponent);A.displayName="RTCConnectionStatus";var P=A;t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{d:"M7.19999 18C7.19999 17.3364 6.77 16.8 6.24019 16.8H3.3598C2.82999 16.8 2.39999 17.3364 2.39999 18V20.4C2.39999 21.0636 2.82999 21.6 3.3598 21.6H6.23923C6.76904 21.6 7.19903 21.0636 7.19903 20.4V18H7.19999Z",fill:d,className:f}),s("path",{d:"M14.4 10.6909C14.4 10.0876 13.9699 9.6 13.44 9.6H10.56C10.0301 9.6 9.60001 10.0876 9.60001 10.6909V20.5091C9.60001 21.1124 10.0301 21.6 10.56 21.6H13.44C13.9699 21.6 14.4 21.1124 14.4 20.5091V10.6909Z",fill:d,className:f}),s("path",{d:"M21.6 3.46667C21.6 2.8768 21.1699 2.4 20.64 2.4H17.76C17.2301 2.4 16.8 2.8768 16.8 3.46667V20.5333C16.8 21.1232 17.2301 21.6 17.76 21.6H20.64C21.1699 21.6 21.6 21.1232 21.6 20.5333V3.46667Z",fill:d,className:f}))}d.displayName="Ping"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Item=S,t.valueRenderers=t.hidden=t.graphs=t.labelRenderers=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8794)),o=l(n(11738)),i=l(n(10494));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d={accelerateRate:"Accelerate Rate",audioDetected:"Audio Detected",audioLevel:"Audio Level",availableOutgoingBitrate:"Available Outgoing Bitrate",averageDecodeTime:"Average Decode Time",averageEncodeTime:"Average Encode Time",bandwidthLimitedResolution:"Bandwidth Limited Resolution",bitrate:"Bitrate",bitrateTarget:"Bitrate (Target)",bytesReceived:"Bytes Received",bytesSent:"Bytes Sent",capturedFramesCount:"Captured Frames per Second",capturedFramesDropped:"Captured Frames Dropped",capturedFramesMean:"Captured Frames Mean (ms)",capturedFramesStdev:"Captured Frames Standard Deviation (ms)",codec:"Codec",cpuLimitedResolution:"CPU Limited Resolution",currentDelay:"Current Delay",decoderImplementationName:"Decoder",decodingCNG:"Decoding CNG",decodingMutedOutput:"Decoding Muted Output",decodingNormal:"Decoding Normal",decodingPLC:"Decoding PLC",decodingPLCCNG:"Decoding PLC CNG",decryptionFailures:"Decryption Failures",delayEstimate:"Delay Estimate",encoderImplementationName:"Encoder",encodeUsage:"Encode Usage",expandRate:"Expand Rate",firCount:"FIR",fractionLost:"Packet Loss",frameRateDecode:"Frame Rate (Decode)",frameRateEncode:"Frame Rate (Encode)",frameRateInput:"Frame Rate (Input)",frameRateNetwork:"Frame Rate (Network)",frameRateRender:"Frame Rate (Render)",framesDecoded:"Frames Decoded",framesDropped:"Frames Dropped",framesEncoded:"Frames Encoded",framesReceived:"Frames Received",framesSent:"Frames Sent",hostname:"Hostname",hybridDxgiFrames:"Hybrid DXGI Frames",hybridGdiFrames:"Hybrid GDI Frames",hybridVideohookFrames:"Hybrid Videohook Frames",inboundBitrateEstimate:"Inbound Bitrate Estimate",jitter:"Jitter",jitterBuffer:"Jitter Buffer",jitterBufferPreferred:"Jitter Buffer (Preferred)",localAddress:"Local Address",minPlayoutDelay:"Minimum Playout Delay",nackCount:"NACK",opAccelerate:"Accelerated Frames",opCNG:"CNG Frames",opExpand:"Expand Frames",opMerge:"Merge Frames",opNormal:"Normal Frames",opPreemptiveExpand:"Preemptive Expand Frames",opSilence:"Silent Frames",outboundBitrateEstimate:"Outbound Bitrate Estimate",pacerDelay:"Pacer Delay",packetsLost:"Packets Lost",packetsReceived:"Packets Received",packetsSent:"Packets Sent",ping:"Ping",pliCount:"PLI",preemptiveExpandRate:"Pre-emptive Expand Rate",qpSum:"qpSum",receiverBitrateEstimate:"Receiver Bitrate Estimate (REMB)",relativePlayoutDelay:"Relative Playout Delay",relativeReceptionDelay:"Relative Reception Delay",renderDelay:"Render Delay",resolution:"Resolution",screenshareFrames:"WebRTC Frames",secondaryDecodedRate:"Secondary Decode Rate",sinkWant:"Sink Quality Level",speechExpandRate:"Speech Expand Rate",ssrc:"SSRC",targetDelay:"Target Delay",videohookBackend:"Videohook Backend",videohookFrames:"Videohook Frames"};function f(e){return(e/1e3).toFixed(2)+" Kbps"}function c(e){return a.default.filesize(e)}function p(e){return e}function v(e){return e+" ms"}function y(e){return e.toFixed(0)+"%"}function m(e){return e?"Yes":"No"}function _(e){return e.last+" ms"}t.labelRenderers=d;var h={availableOutgoingBitrate:!0,bitrate:!0,bitrateTarget:!0,bytesReceived:!0,bytesSent:!0,encodeUsage:!0,frameRateDecode:!0,frameRateEncode:!0,frameRateInput:!0,frameRateNetwork:!0,frameRateRender:!0,inboundBitrateEstimate:!0,packetsLost:!0,packetsReceived:!0,packetsSent:!0,ping:!0};t.graphs=h;t.hidden={audioJitterBuffer:!0,audioJitterDelay:!0,audioJitterTarget:!0,audioPlayoutUnderruns:!0,fractionLost:!0,framesCaptured:!0,framesRendered:!0,noiseCancellerProcessTime:!0,timestamp:!0,type:!0,videoJitterBuffer:!0,videoJitterDelay:!0,videoJitterTarget:!0,voiceActivityDetectorProcessTime:!0};var E={accelerateRate:y,audioDetected:m,audioLevel:function(e){return Math.max(e,0).toFixed(2)+" dB"},availableOutgoingBitrate:f,averageDecodeTime:v,averageEncodeTime:v,bandwidthLimitedResolution:m,bitrate:f,bitrateTarget:f,bytesReceived:c,bytesSent:c,codec:function(e){var t=e.id,n=e.name;return""+(n=n||"unknown")[0].toUpperCase()+n.slice(1)+" ("+t+")"},cpuLimitedResolution:m,currentDelay:v,decoderImplementationName:p,delayEstimate:v,encoderImplementationName:p,encodeUsage:y,expandRate:y,fractionLost:y,inboundBitrateEstimate:f,jitter:v,jitterBuffer:v,jitterBufferPreferred:v,minPlayoutDelay:v,outboundBitrateEstimate:f,pacerDelay:v,ping:v,preemptiveExpandRate:y,receiverBitrateEstimate:f,relativePlayoutDelay:_,relativeReceptionDelay:_,renderDelay:v,resolution:function(e){return e.width+"x"+e.height},secondaryDecodedRate:y,speechExpandRate:y,targetDelay:v,videohookBackend:function(e){var t=["N/A","Direct3D 9","Direct3D 10","Direct3D 11","Direct3D 12","OpenGL","Vulkan"];return e<t.length?t[e]:"Unknown"}};function g(e){return s(o.default,{datapoint:e})}function S(e){var t=e.label,n=e.value,r=e.section,a=E[t]||function(e){return e};return s(i.default,{label:t,valueRendered:a(n),section:r,renderGraph:h[t]&&g.bind(null,n)},void 0,d[t]||t)}t.valueRenderers=E,g.displayName="renderGraph",S.displayName="Item"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=R(n(9)),l=R(n(23)),u=R(n(8)),s=R(n(273)),d=R(n(3)),f=R(n(469)),c=R(n(1327)),p=n(8535),v=n(9249),y=R(n(403)),m=R(n(105)),_=R(n(1397)),h=R(n(61)),E=R(n(1165)),g=R(n(47)),S=R(n(24)),O=n(468),I=n(121),T=n(1247),C=R(n(10245)),b=R(n(1257)),M=n(1),N=R(n(6)),A=R(n(7916)),P=R(n(5710));function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(){return(D=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}).apply(this,arguments)}function w(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,j(e,t)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var U=((r={})[M.Arrows.UP]=u.default.throttle((function(){return(0,T.playSound)("ddr-up")}),100),r[M.Arrows.DOWN]=u.default.throttle((function(){return(0,T.playSound)("ddr-down")}),100),r[M.Arrows.LEFT]=u.default.throttle((function(){return(0,T.playSound)("ddr-left")}),100),r[M.Arrows.RIGHT]=u.default.throttle((function(){return(0,T.playSound)("ddr-right")}),100),r),G=(0,u.default)((0,p.getDefaultLayoutContent)()).groupBy((function(e){return e.group})).value();function F(e){switch(e.keyCode){case M.KeyboardKeys.ARROW_UP:return M.Arrows.UP;case M.KeyboardKeys.ARROW_DOWN:return M.Arrows.DOWN;case M.KeyboardKeys.ARROW_LEFT:return M.Arrows.LEFT;case M.KeyboardKeys.ARROW_RIGHT:return M.Arrows.RIGHT;default:return null}}function B(){var e=[p.KeybindGroup.MESSAGE,p.KeybindGroup.NAVIGATION,p.KeybindGroup.VOICE_AND_VIDEO,p.KeybindGroup.CHAT,p.KeybindGroup.MISCELLANEOUS];return k("div",{className:A.default.keyboardShortcutList},void 0,e.map((function(t,n){var r,a=n===e.length-1,o=0===n,l=G[t],u=(0,p.getNameForKeybindGroup)(t),s=(0,p.getDescriptionForKeybindGroup)(t);return k("div",{className:(0,i.default)(A.default.keyboardShortcutListGroup,(r={},r[A.default.firstGroup]=o,r))},void 0,k("div",{className:(0,i.default)(A.default.keybindGroup)},t,k(g.default,{size:g.default.Sizes.SIZE_16},void 0,u),null!=s&&k(S.default,{className:A.default.keybindGroupDescription},void 0,s)),l.map((function(e,t){var n;return!1===(null===(n=e.predicate)||void 0===n?void 0:n.call(e))?null:k("div",{className:(0,i.default)(A.default.keybindGroup)},t,k("div",{className:A.default.keybindDescription},void 0,e.description),k("div",{className:"keybind-shortcuts"},void 0,e.binds.map((function(e){return k(b.default,{shortcut:e},e)}))))})),!a&&k(E.default,{className:A.default.keybindGroupDivider}))})))}B.displayName="HotkeyLayoutContent";var H=k(B,{}),x=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={UP:!1,DOWN:!1,LEFT:!1,RIGHT:!1,opacity:new s.default.Value(1),scaleX:new s.default.Value(1),scaleY:new s.default.Value(0),animating:!1},t.scrollerRef=o.createRef(),t.lastInputedKeys=[],t.scrollPageUp=function(){var e=t.scrollerRef.current;(0,l.default)(null!=e,"Scroller is pagedUp when not mounted"),e.scrollPageUp({animate:!0})},t.scrollPageDown=function(){var e=t.scrollerRef.current;(0,l.default)(null!=e,"Scroller is pagedDown when not mounted"),e.scrollPageDown({animate:!0})},t.arrowUp=function(e){var n,r=e.direction;t.setState(((n={})[r]=!1,n))},t.arrowDown=function(e){var n,r=e.direction;U[r](),t.setState(((n={})[r]=!0,n))},t.componentWillLeave=function(e){t.setState({animating:!0}),t.state.opacity.setValue(1),t.state.scaleX.setValue(.5),t.state.scaleY.setValue(1),s.default.sequence([s.default.timing(t.state.opacity,{toValue:.7,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:1,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:.7,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:1,duration:1e3/60*2}),s.default.timing(t.state.opacity,{delay:300,toValue:.7,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:1,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:.7,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:1,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:.7,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:1,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:.7,duration:1e3/60*2}),s.default.timing(t.state.opacity,{toValue:1,duration:1e3/60*2}),s.default.timing(t.state.scaleY,{delay:100,toValue:.005,duration:1e3/60*8,easing:s.default.Easing.in(s.default.Easing.ease)}),s.default.parallel([s.default.timing(t.state.scaleX,{toValue:1,duration:1e3/60*10,easing:s.default.Easing.out(s.default.Easing.ease)}),s.default.timing(t.state.opacity,{toValue:0,duration:200})])]).start(e)},t.toggleOpacity=function(){1===t.state.opacity._value?t.state.opacity.setValue(0):t.state.opacity.setValue(1)},t.getStyles=function(){return{opacity:t.state.opacity.interpolate({inputRange:[0,1],outputRange:[0,1]}),transform:[{scaleX:t.state.scaleX.interpolate({inputRange:[0,1],outputRange:[0,2]})},{scaleY:t.state.scaleY.interpolate({inputRange:[0,1],outputRange:[0,1]})}]}},t.handleKeyDown=function(e){if(t.lastInputedKeys.push(e.keyCode),t.lastInputedKeys=t.lastInputedKeys.slice(-5),t.lastInputedKeys[0]===M.KeyboardKeys.H&&t.lastInputedKeys[1]===M.KeyboardKeys.H&&t.lastInputedKeys[2]===M.KeyboardKeys.ARROW_RIGHT&&t.lastInputedKeys[3]===M.KeyboardKeys.N&&t.lastInputedKeys[4]===M.KeyboardKeys.K&&t.props.activateRagingDemon(),!t.props.keyboardModeEnabled){var n=F(e);null!==n&&(e.stopPropagation(),e.preventDefault(),t.arrowDown({direction:n}))}},t.handleKeyUp=function(e){if(!t.props.keyboardModeEnabled){var n=F(e);null!==n&&(e.stopPropagation(),e.preventDefault(),t.arrowUp({direction:n}))}},t.onArrowClick=function(e){t.arrowDown({direction:e})},t}w(t,e);var n=t.prototype;return n.componentDidMount=function(){this.lastInputedKeys=[],I.ComponentDispatch.subscribe(M.ComponentActions.SCROLL_PAGE_UP,this.scrollPageUp),I.ComponentDispatch.subscribe(M.ComponentActions.SCROLL_PAGE_DOWN,this.scrollPageDown),window.addEventListener("keydown",this.handleKeyDown,{capture:!0}),window.addEventListener("keyup",this.handleKeyUp,{capture:!0})},n.componentWillUnmount=function(){I.ComponentDispatch.unsubscribe(M.ComponentActions.SCROLL_PAGE_UP,this.scrollPageUp),I.ComponentDispatch.unsubscribe(M.ComponentActions.SCROLL_PAGE_DOWN,this.scrollPageDown),window.removeEventListener("keydown",this.handleKeyDown,{capture:!0}),window.removeEventListener("keyup",this.handleKeyUp,{capture:!0})},n.render=function(){var e=this.state,t=e.UP,n=e.DOWN,r=e.LEFT,a=e.RIGHT;return k(s.default.div,{className:A.default.keyboardShortcutsModal,style:this.getStyles()},void 0,k("h1",{className:A.default.modalTitle},void 0,k("div",{className:A.default.content},void 0,N.default.Messages.KEYBIND_DESCRIPTION_MODAL_TITLE),k(b.default,{shortcut:"mod+/",className:(0,i.default)(P.default.keyboardShortcuts)})),k("div",{className:A.default.modalSubtitle},void 0,N.default.Messages.KEYBIND_DESCRIPTION_MODAL_SUBTITLE),k("div",{className:A.default.ddrArrows},void 0,k(V,{arrow:M.Arrows.LEFT,isActive:r,className:A.default.left},void 0,"left"),k(V,{arrow:M.Arrows.DOWN,isActive:n,className:A.default.down},void 0,"down"),k(V,{arrow:M.Arrows.UP,isActive:t,className:A.default.up},void 0,"up"),k(V,{arrow:M.Arrows.RIGHT,isActive:a,className:A.default.right},void 0,"right")),o.createElement(O.AdvancedScrollerAuto,{ref:this.scrollerRef,fade:!0},H))},t}(o.PureComponent);function V(e){var t,n=e.isActive,r=e.arrow,a=e.className,l=e.children,u=o.useState(n),s=u[0],d=u[1],f=o.useCallback((function(){U[r](),d(!0)}),[r]);return o.useEffect((function(){if(s){var e=setTimeout((function(){return d(!1)}),500);return function(){return clearTimeout(e)}}}),[s]),k(h.default,{onClick:f,className:(0,i.default)(A.default.arrow,a,(t={},t[A.default.active]=n||s,t))},void 0,l)}x.displayName="HotkeyLayout",V.displayName="DDRArrow";var W=k(C.default,{},"raging-demo"),Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={content:__OVERLAY__?(0,v.getOverlayLayoutContent)():(0,p.getDefaultLayoutContent)()},t}w(t,e);var n=t.prototype;return n.close=function(){c.default.hide()},n.activateRagingDemon=function(){y.default.disable(),c.default.activateRagingDemon()},n.render=function(){var e;return e=this.props.ragingDemon?W:k(x,{content:this.state.content,keyboardModeEnabled:this.props.keyboardModeEnabled,activateRagingDemon:this.activateRagingDemon},"modal"),k(f.default,{component:"div"},void 0,e)},t}(o.PureComponent);Y.displayName="KeyboardShortcuts";var z=d.default.connectStores([_.default,m.default],(function(){return D({},_.default.getState(),{keyboardModeEnabled:m.default.keyboardModeEnabled})}),{forwardRef:!0})(Y);z.modalConfig={store:_.default};var K=z;t.default=K},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QUICKSWITCHER_SHOW=void 0;var r=n(1272),a={binds:["mod+k","mod+t"],comboKeysBindGlobal:!0,action:function(){return(0,r.show)("KEYBIND",""),!1}};t.QUICKSWITCHER_SHOW=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(8)),l=f(n(1327)),u=n(121),s=n(1),d=f(n(7915));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(){return!0},E=function(){return!0},g=function(){return _("div",{className:d.default.symbol},"symbol",_("div",{className:d.default.symbolBackground}),_("img",{alt:"",src:n(10246)}))};g.displayName="Symbol";var S=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._renderSecondaryTimeout=null,t._doneTimeout=null,t.state={animating:!1,renderSecondary:!1,scale:i.default.random(.6,1,!0),offsetX:i.default.random(0,140,!1)-70,offsetY:i.default.random(0,140,!1)-70},t.done=function(){t.props.onAnimationComplete(t.props.componentId)},t}y(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this;this.setState({animating:!0}),this._renderSecondaryTimeout=setTimeout((function(){e.setState({renderSecondary:!0})}),120),this._doneTimeout=setTimeout(this.done,1e3),h()},r.componentDidUpdate=function(e,t){this.state.renderSecondary&&!t.renderSecondary&&E()},r.componentWillUnmount=function(){clearTimeout(this._renderSecondaryTimeout),clearTimeout(this._doneTimeout)},r.renderPrimary=function(){return _("div",{className:d.default.primaryExplosion},"primary-explosion",_("img",{alt:"",className:d.default.circleInner,src:n(10247),width:70,height:69}),_("img",{alt:"",className:d.default.circleOuter,src:n(10248),width:96,height:95}),_("img",{alt:"",className:d.default.linesSecondary,src:n(10249),width:183,height:104}),_("img",{alt:"",className:d.default.linesMain,src:n(10250),width:69,height:180}))},r.renderSecondary=function(e,t){return _("div",{className:d.default.secondaryExplosion,style:{top:t,left:e}},"secondary-explosion",_("img",{alt:"",className:d.default.circleInner,src:n(10251),width:61,height:58},"circle-inner"),_("img",{alt:"",className:d.default.circleOuter,src:n(10252),width:85,height:85},"circle-outer"),_("img",{alt:"",className:d.default.linesSecondary,src:n(10253),width:162,height:173},"lines-secondary"),_("img",{alt:"",className:d.default.linesMain,src:n(10254),width:156,height:306},"lines-main"))},r.render=function(){var e,t=this.state,n=t.renderSecondary,r=t.offsetX,a=t.offsetY,i=t.animating,l=t.scale,u=[this.renderPrimary()];return n&&u.push(this.renderSecondary(r,a)),_("div",{className:(0,o.default)(d.default.container,(e={},e[d.default.animate]=i,e)),style:{top:this.props.top,left:this.props.left,transform:"scale("+l+")"}},void 0,u)},t}(a.PureComponent);S.displayName="Explosion";var O=_(g,{},"symbol"),I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._timeouts=[],t.children=[],t.state={explosions:0},t.setTimeout=function(e,n){var r=setTimeout(e,n);return t._timeouts.push(r),r},t.removeExplosion=function(e){var n=t.children,r=n.findIndex((function(t){if(t.type!==S)return!1;var n=t.props;return null!=n.componentId&&n.componentId===e}));r>=0&&n.splice(r,1),t.forceUpdate()},t.createExplosion=function(){var e=t.children,n=window.innerWidth/2>>0,r=window.innerHeight/2>>0;if(t.state.explosions<8){var a="expl-"+t.state.explosions;e.push(_(S,{componentId:a,top:i.default.random(r-100,r+100,!1),left:i.default.random(n-200,n+200,!1),onAnimationComplete:t.removeExplosion},a)),t.setTimeout(t.createExplosion,240),t.setState({explosions:t.state.explosions+1})}else t.setTimeout(t.addSymbol,750)},t.addSymbol=function(){t.children=[O],t.forceUpdate(),t.setTimeout(t.delayedClose,3e3)},t}y(t,e);var n=t.prototype;return n.componentDidMount=function(){this.setTimeout((function(){return u.ComponentDispatch.dispatch(s.ComponentActions.SHAKE_APP,{duration:2400})}),1800),this.setTimeout(this.createExplosion,1800)},n.componentWillUnmount=function(){this.children.length=0;for(var e,t=p(this._timeouts);!(e=t()).done;){var n=e.value;clearTimeout(n)}},n.delayedClose=function(){l.default.hide()},n.render=function(){return _("div",{className:d.default.ragingDemon},void 0,this.children)},t}(a.PureComponent);I.displayName="RagingDemon";var T=I;t.default=T},function(e,t,n){e.exports=n.p+"597156b41950001366498e8d03915086.svg"},function(e,t,n){e.exports=n.p+"2fa100868d36281cf16e9b488d6783e6.png"},function(e,t,n){e.exports=n.p+"343d87c6185c5a798189dbe0454338d2.png"},function(e,t,n){e.exports=n.p+"8d32a8a24b95bbb21533636279d44c4c.png"},function(e,t,n){e.exports=n.p+"d848be8a53ceaaf74385fa2240c277fe.png"},function(e,t,n){e.exports=n.p+"156b50b1934142012e13cddb292be82f.png"},function(e,t,n){e.exports=n.p+"37168b17cb52c41180fc7dc3464416e3.png"},function(e,t,n){e.exports=n.p+"264c4f75df7b5cfca2445a01ac303e4c.png"},function(e,t,n){e.exports=n.p+"b2609efe7eaf6066ccf83c63b831b9f5.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(9)),i=A(n(10256)),l=A(n(5961)),u=A(n(8567)),s=n(8444),d=n(280),f=A(n(8445)),c=A(n(379)),p=A(n(10257)),v=A(n(61)),y=A(n(55)),m=n(1149),_=A(n(149)),h=n(475),E=A(n(5686)),g=A(n(272)),S=A(n(13)),O=A(n(150)),I=A(n(16)),T=A(n(43)),C=n(1),b=A(n(6)),M=A(n(7917)),N=A(n(370));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return a.useEffect((function(){S.default.track(C.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:d.PremiumUpsellTypes.GUILD_CAP_INLINE_INVITE_MODAL,location:{page:C.AnalyticsPages.NATIVE_INVITE_MODAL}})}),[]),L(v.default,{onClick:function(){return(0,f.default)({analyticsSource:C.AnalyticsLocations.EXTERNAL_INVITE_LINK_MODAL,analyticsLocation:{page:C.AnalyticsLocations.EXTERNAL_INVITE_LINK_MODAL,section:C.AnalyticsSections.GUILD_CAP_UPSELL_MODAL}})},className:M.default.experimentUpsellError},void 0,L(E.default,{width:24,height:24,className:M.default.experimentUpsellIcon,color:m.GradientCssUrls.PREMIUM_TIER_2}),L("span",{className:M.default.experimentUpsellText},void 0,b.default.Messages.GUILD_CAP_UPSELL_TOOLTIP),L("span",{className:M.default.experimentGetNitro},void 0,b.default.Messages.GUILD_CAP_UPSELL_GET_NITRO))}D.displayName="GuildCapNitroUpsell";var w=L(D,{}),j=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).acceptInvite=function(){var e=t.props.invite;i.default.acceptInvite(e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var a=r.prototype;return a.componentDidMount=function(){__OVERLAY__||(I.default.isWindows()?T.default.minimize():T.default.restore(),T.default.focus())},a.close=function(){i.default.close()},a.render=function(){var e=this,t=this.props,n=t.invite,r=t.error,a=t.submitting;if(null==n||null==n.channel)return null;var i,d,f=n.guild,p=n.channel,v=n.inviter,m=n.target_application,E=null!=f,S=null!=n.stage_instance;if(null!=m)i=null==f?void 0:f.name,d=c.default.createFromServer(m).getCoverImageURL(1024);else if(null!=f)i=f.name,d=O.default.getGuildSplashURL({id:f.id,splash:f.splash});else if((i=p.name)||null==v||(i=v.username),null==i)throw new Error("no name for group DM invite");var I=(0,s.isAtGuildCapAndNonPremium)(),T=S?b.default.Messages.INSTANT_INVITE_ACCEPT_STAGE:b.default.Messages.INVITE_MODAL_BUTTON.format({guildName:i});return L("div",{className:M.default.container},void 0,L("div",{className:M.default.contentWrapper},void 0,L(g.default,{className:M.default.scroller},void 0,L(y.default,{className:M.default.inviteContent,direction:y.default.Direction.VERTICAL,justify:y.default.Justify.BETWEEN},void 0,L("div",{className:N.default.marginBottom20},void 0,L(l.default,{invite:n,disableUser:E,error:r})),S&&null!=f?L("div",{className:(0,o.default)(N.default.marginBottom20,M.default.stage)},void 0,L(u.default,{isCard:!0,stageInstance:n.stage_instance,guild:f})):null,L("div",{},void 0,I?w:null,null==m?L(_.default,{text:I?b.default.Messages.TOO_MANY_USER_GUILDS_DESCRIPTION:null,position:_.default.Positions.BOTTOM},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return L(h.Button,{size:h.Button.Sizes.LARGE,onClick:e.acceptInvite,submitting:a,disabled:I,color:S?h.Button.Colors.GREEN:h.Button.Colors.BRAND,onMouseEnter:n,onMouseLeave:r},void 0,I?b.default.Messages.GUILD_CAP_INVITE_MODAL_BUTTON:T)})):L("div",{className:M.default.buttonGroup},void 0,L(h.Button,{size:h.Button.Sizes.LARGE,onClick:this.acceptInvite,submitting:a},void 0,b.default.Messages.PLAY),L(h.Button,{color:h.Button.Colors.PRIMARY,size:h.Button.Sizes.LARGE,onClick:this.acceptInvite,submitting:a},void 0,b.default.Messages.SPECTATE)),L(y.default,{justify:y.default.Justify.CENTER,className:N.default.marginTop8},void 0,L(h.Button,{look:h.Button.Looks.LINK,className:M.default.noThanksButton,onClick:this.close,color:S?h.Button.Colors.TRANSPARENT:h.Button.Colors.BRAND},void 0,b.default.Messages.INIVTE_MODAL_NO_THANKS)))))),null!=d&&L("div",{className:M.default.inviteSplash,style:{backgroundImage:"url("+d+")"}}))},r}(a.PureComponent);j.displayName="Invite",j.modalConfig={closable:!0,store:p.default};var k=j;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=n(8491),o=l(n(1211)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u={acceptInvite:function(e){var t=this,n=o.default.getInviteContext("Desktop Invite Modal",e);o.default.acceptInvite(e.code,n).then((function(e){null==e||null==e.guild||null==e.channel||__OVERLAY__||o.default.transitionToInvite(e),t.close()}),(function(e){r.default.dispatch({type:i.ActionTypes.INVITE_MODAL_ERROR,message:(0,a.getInviteError)(e.code)})}))},close:function(){r.default.dispatch({type:i.ActionTypes.INVITE_MODAL_CLOSE})}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=y(n(3)),a=y(n(2)),o=n(481),i=n(42),l=n(31),u=y(n(162)),s=y(n(43)),d=y(n(10)),f=y(n(15)),c=y(n(1174)),p=y(n(12)),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(){return(_=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}).apply(this,arguments)}var h,E=v.AppContext.APP,g=!1,S=!1,O=[];function I(){g=!0}var T=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(f.default,c.default,p.default)},a.isOpen=function(){var e=__OVERLAY__?v.AppContext.OVERLAY:v.AppContext.APP;return g&&O.length&&E===e},a.getProps=function(){var e;return{invite:O.length>0?O[0][0]:null,error:h||null,submitting:S,premiumType:null===(e=p.default.getNullableCurrentUser())||void 0===e?void 0:e.premiumType}},r}(r.default.Store))(a.default,{OVERLAY_INITIALIZE:function(e){return I()},CONNECTION_OPEN:function(e){return I()},CONNECTION_CLOSED:function(e){g=!1},INVITE_MODAL_OPEN:function(e){var t=e.invite;if(null==t)return!1;var n=t.channel,r=t.guild;if(null==n)return!1;var a=t.target_type===o.InviteTargetTypes.STREAM&&null!=t.target_user;if((0,l.isMultiUserDM)(n.type)){if(null!=d.default.getChannel(n.id))return(0,i.transitionToGuild)(v.ME,n.id),s.default.focus(),!1}else{if(null==r)return!1;if(null!=f.default.getGuild(r.id)&&!a)return(0,i.transitionToGuild)(r.id),s.default.focus(),!1}if(O.some((function(e){return e[0].code===y})))return!1;var c=t.approximate_member_count,p=t.approximate_presence_count,y=t.code,m=t.target_type,h=t.target_user,g=t.target_application,I=t.stage_instance;E=e.context,S=!1;var T={code:y,approximate_member_count:c,approximate_presence_count:p,target_type:m,target_user:h,target_application:g,channel:_({},n),stage_instance:I};null!=r&&(T.guild=new u.default(r)),t.inviter&&(T.inviter=_({},t.inviter)),O.push([T,e.resolve])},INVITE_MODAL_CLOSE:function(e){return function(){if(h=null,S=!1,O.length>0){var e=O.shift()[1];null!=e&&e()}}()},INVITE_ACCEPT:function(e){S=!0},INVITE_MODAL_ERROR:function(e){var t=e.message;h=t,S=!1},CURRENT_USER_UPDATE:function(e){return!0}});t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=G(n(3)),i=n(389),l=n(1272),u=G(n(10259)),s=n(9069),d=G(n(403)),f=n(714),c=G(n(9025)),p=G(n(9026)),v=G(n(8397)),y=G(n(8693)),m=G(n(8703)),_=G(n(10263)),h=G(n(88)),E=G(n(8573)),g=G(n(8351)),S=G(n(10)),O=G(n(1223)),I=G(n(15)),T=G(n(1323)),C=G(n(200)),b=G(n(36)),M=G(n(365)),N=G(n(271)),A=G(n(8525)),P=n(9071),R=G(n(149)),L=n(1210),D=n(121),w=G(n(93)),j=n(1),k=G(n(6)),U=G(n(7919));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(){return(B=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}).apply(this,arguments)}function H(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,x(e,t)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var W=15,Y=10,z=function(){return V("div",{className:U.default.emptyState},void 0,V("div",{className:U.default.emptyStateNote},void 0,k.default.Messages.QUICKSWITCHER_EMPTY_TEXT),V("div",{className:U.default.emptyStateCTA},void 0,V(N.default,{href:w.default.getArticleURL(j.HelpdeskArticles.QUICK_SWITCHER_TUTORIAL)},void 0,k.default.Messages.QUICKSWITCHER_EMPTY_CTA)))};z.displayName="QuickSwitcherNoResults";var K=function(e){function t(){return e.apply(this,arguments)||this}return H(t,e),t.prototype.render=function(){var e=I.default.getGuild(this.props.channel.guild_id);return a.createElement(P.Channel,this.props,V("div",{className:U.default.miscContainer},void 0,null!=e?e.name:null))},t}(a.Component);K.displayName="ExtendedChannel",K.defaultProps={unread:!1};var $=o.default.connectStores([C.default,S.default],(function(e){var t=e.channel;return{unread:C.default.hasUnread(t.id),mentions:C.default.getMentionCount(t.id),category:S.default.getChannel(t.parent_id)}}))(K),Z=o.default.connectStores([M.default],(function(e){var t=e.channel;if(null==t.guild_id)throw new Error("ConnectedVoiceChannel - somehow we got a voice channel with no guild_id...");return{voiceStates:M.default.getVoiceStates(t.guild_id)[t.id]}}))(K),q=o.default.connectStores([O.default],(function(e){var t=e.guild;return{unread:O.default.hasUnread(t.id)}}))(P.Guild),X=o.default.connectStores([C.default],(function(e){var t=e.channel;return{mentions:C.default.getMentionCount(t.id)}}))(P.GroupDM),J=o.default.connectStores([S.default,C.default],(function(e){var t=e.user,n=S.default.getDMFromUserId(t.id);return{mentions:null!=n?C.default.getMentionCount(n):0}}))(P.User);function Q(e,t,n){return V(R.default,{text:n},e,(function(e){return a.createElement("span",B({},e,{className:U.default.autocompleteQuerySymbol}),t)}))}function ee(e,t){var n=I.default.getGuild(e.getGuildId());if(null!=n)switch(e.type){case j.ChannelTypes.GUILD_TEXT:case j.ChannelTypes.GUILD_ANNOUNCEMENT:return a.createElement(p.default,B({},t,{channel:e,guild:n,onSelect:l.hide}));case j.ChannelTypes.GUILD_VOICE:case j.ChannelTypes.GUILD_STAGE_VOICE:return a.createElement(y.default,B({},t,{channel:e,guild:n,onSelect:l.hide}));case j.ChannelTypes.ANNOUNCEMENT_THREAD:case j.ChannelTypes.PUBLIC_THREAD:case j.ChannelTypes.PRIVATE_THREAD:return a.createElement(v.default,B({},t,{channel:e,onSelect:l.hide}));case j.ChannelTypes.GUILD_STORE:return a.createElement(c.default,B({},t,{channel:e,guild:n,onSelect:l.hide}))}}Q.displayName="renderAutocompleteQuerySymbol";var te=V(z,{}),ne=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).scrollerRef=a.createRef(),t.inputRef=a.createRef(),t.state={query:t.props.query,mouseFocusDisabled:!0},t.handleInputChange=function(){var e=t.inputRef.current;null!=e&&t.search(e.value)},t.handleMouseMove=function(){!1!==t.state.mouseFocusDisabled&&t.setState({mouseFocusDisabled:!1})},t.focusResult=function(e){t.state.mouseFocusDisabled||(0,l.selectResult)(t.props.results.indexOf(e))},t.selectResult=function(e){(0,l.switchToResult)(e)},t.handleContextMenu=function(e){var n=t.props.results[t.props.selectedIndex];(0,i.openContextMenu)(e,(function(e){switch(n.type){case f.AutocompleterResultTypes.GUILD:return a.createElement(E.default,B({},e,{guild:n.record,onSelect:l.hide}));case f.AutocompleterResultTypes.TEXT_CHANNEL:case f.AutocompleterResultTypes.VOICE_CHANNEL:return ee(n.record,e);case f.AutocompleterResultTypes.GROUP_DM:return a.createElement(m.default,B({},e,{channel:n.record,selected:b.default.getChannelId()===n.record.id,onSelect:l.hide}));case f.AutocompleterResultTypes.USER:return a.createElement(g.default,B({},e,{user:n.record,onSelect:l.hide}))}}))},t.handleKeyDown=function(e){var n=t.state,r=n.mouseFocusDisabled,a=n.query,o=t.props.results;!1===r&&t.setState({mouseFocusDisabled:!0});var i=e.key.toLowerCase(),u=t.props.selectedIndex;switch(i){case"escape":return e.preventDefault(),e.stopPropagation(),void(a.length>0?t.search(""):(0,l.hide)());case"k":return void(!0!==e.ctrlKey&&!0!==e.metaKey||(e.preventDefault(),e.stopPropagation(),(0,l.hide)()));case"enter":if(-1===u)return;if(e.preventDefault(),e.altKey)return t.handleContextMenu(e);var s=o[u];return void(null!=s&&t.selectResult(s));case"arrowup":u=(0,f.findNextSelectedResult)(f.FindResultDirections.UP,u,o);break;case"arrowdown":u=(0,f.findNextSelectedResult)(f.FindResultDirections.DOWN,u,o);break;case"n":if(!e.ctrlKey)return;u=(0,f.findNextSelectedResult)(f.FindResultDirections.DOWN,u,o);break;case"p":if(!e.ctrlKey)return;u=(0,f.findNextSelectedResult)(f.FindResultDirections.UP,u,o);break;default:return}e.preventDefault(),(0,l.selectResult)(u)},t.renderRow=function(e){var n=e.row,r=t.props.results[n],a=t.props.selectedIndex,o=_.default.getCurrentConfig({}).showScores;switch(r.type){case f.AutocompleterResultTypes.HEADER:return V(P.Header,{},r.type+"-"+r.record.id,r.record.text);case f.AutocompleterResultTypes.TEXT_CHANNEL:return V($,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,onContextMenu:t.handleContextMenu,channel:r.record,score:o?r.score:void 0},r.type+"-"+r.record.id);case f.AutocompleterResultTypes.VOICE_CHANNEL:return V(Z,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,onContextMenu:t.handleContextMenu,channel:r.record,score:o?r.score:void 0},r.type+"-"+r.record.id);case f.AutocompleterResultTypes.GUILD:return V(q,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,onContextMenu:t.handleContextMenu,guild:r.record,score:o?r.score:void 0},r.type+"-"+r.record.id);case f.AutocompleterResultTypes.USER:return V(J,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,onContextMenu:t.handleContextMenu,user:r.record,comparator:r.comparator,score:o?r.score:void 0},r.type+"-"+r.record.id);case f.AutocompleterResultTypes.GROUP_DM:return V(X,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,onContextMenu:t.handleContextMenu,channel:r.record,score:o?r.score:void 0},r.type+"-"+r.record.id);case f.AutocompleterResultTypes.APPLICATION:return V(P.Application,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,application:r.record},r.type+"-"+r.record.id);case f.AutocompleterResultTypes.LINK:return V(P.Link,{focused:a>=0&&n===a,onClick:function(){return t.selectResult(r)},onMouseEnter:function(){return t.focusResult(r)},onFocus:t.focusNode,onContextMenu:t.handleContextMenu,link:r.record,score:o?r.score:void 0},r.type+"-"+r.record.id);default:return null}},t}H(t,e);var n=t.prototype;return n.componentDidMount=function(){d.default.disable(),d.default.enableTemp(s.SETTINGS_LAYERS_LAYOUT)},n.componentWillUnmount=function(){d.default.disableTemp(),d.default.enable()},n.componentDidUpdate=function(e,t){var n=this.state,r=n.mouseFocusDisabled,a=n.query,o=this.props.selectedIndex,i=this.scrollerRef.current;null!=i&&(a!==t.query?i.scrollTo({to:0}):r&&o>=0&&i.scrollToIndex({section:0,row:o,padding:10}))},n.close=function(){(0,l.hide)()},n.search=function(e){this.setState({query:e}),(0,l.search)(e)},n.renderInput=function(){return V(h.default,{},void 0,a.createElement("input",{className:U.default.input,ref:this.inputRef,type:"text",placeholder:k.default.Messages.QUICKSWITCHER_PLACEHOLDER,onChange:this.handleInputChange,onKeyDown:this.handleKeyDown,value:this.state.query,spellCheck:!1,autoFocus:!0}))},n.renderSection=function(){return null},n.renderResults=function(){var e=this.state.query,t=this.props.results;return 0===t.length&&e.length>0?te:0===t.length?null:a.createElement(L.ListAuto,{ref:this.scrollerRef,sectionHeight:0,rowHeight:34,paddingTop:W,paddingBottom:Y,sections:[t.length],className:U.default.scroller,renderRow:this.renderRow,renderSection:this.renderSection})},n.focusNode=function(e){D.ComponentDispatch.dispatch(j.ComponentActions.QUICKSWITCHER_RESULT_FOCUS,{node:e})},n.renderProtip=function(){return V(A.default,{className:U.default.protip,type:A.default.Types.INLINE},void 0,k.default.Messages.QUICKSWITCHER_PROTIP.format({userSymbolHook:function(e,t){return Q(t,f.AutocompleterQuerySymbols.USER,k.default.Messages.QUICKSWITCHER_PROTIP_USERNAMES)},textChannelSymbolHook:function(e,t){return Q(t,f.AutocompleterQuerySymbols.TEXT_CHANNEL,k.default.Messages.QUICKSWITCHER_PROTIP_TEXT_CHANNELS)},voiceChannelSymbolHook:function(e,t){return Q(t,f.AutocompleterQuerySymbols.VOICE_CHANNEL,k.default.Messages.QUICKSWITCHER_PROTIP_VOICE_CHANNELS)},guildSymbolHook:function(e,t){return Q(t,f.AutocompleterQuerySymbols.GUILD,k.default.Messages.QUICKSWITCHER_PROTIP_GUILDS)},helpdeskArticle:w.default.getArticleURL(j.HelpdeskArticles.QUICK_SWITCHER_TUTORIAL)}))},n.renderTutorial=function(){var e=this.state.query,t=this.props,n=t.seenTutorial,r=t.results;return n?null:V(u.default,{hasQuery:e.length>0&&r.length>0})},n.render=function(){return V("div",{className:U.default.container},void 0,V("div",{className:U.default.quickswitcher,onMouseMove:this.handleMouseMove},void 0,this.renderInput(),this.renderResults(),this.renderProtip(),this.renderTutorial()))},t}(a.PureComponent);ne.displayName="QuickSwitcher",ne.modalConfig={disableAnimation:!0,backdropInstant:!0,store:T.default};var re=ne;t.default=re},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(273)),l=n(57),u=n(121),s=n(1),d=c(n(6)),f=c(n(7918));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _={friction:15,tension:100},h=function(e){var t,r;function c(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={shown:!1,translateY:new i.default.Value(0)},t.rootRef=a.createRef(),t.focusTimeout=new l.Timeout,t.handleResultFocus=function(e){var n=e.node;t.focusTimeout.start(1,(function(){if(t.props.hasQuery&&null!=n&&null!=t.rootRef.current){var e=t.rootRef.current.getBoundingClientRect().top,r=n.getBoundingClientRect().top,a=Math.abs(e-r);t.springTo(a-118+9)}else t.springTo(0)}))},t}r=e,(t=c).prototype=Object.create(r.prototype),t.prototype.constructor=t,m(t,r);var p=c.prototype;return p.componentDidMount=function(){this.setState({shown:!0}),u.ComponentDispatch.subscribe(s.ComponentActions.QUICKSWITCHER_RESULT_FOCUS,this.handleResultFocus)},p.componentWillUnmount=function(){this.focusTimeout.stop(),u.ComponentDispatch.unsubscribe(s.ComponentActions.QUICKSWITCHER_RESULT_FOCUS,this.handleResultFocus)},p.componentDidUpdate=function(){this.props.hasQuery||this.springTo(0)},p.springTo=function(e){i.default.spring(this.state.translateY,y({toValue:Math.min(e,250)},_)).start()},p.renderArrowGroup=function(e){return v("div",{className:(0,o.default)(f.default.arrowGroup,e)},void 0,v(i.default.div,{className:(0,o.default)(f.default.arrowContainer,f.default.horizontal),style:this.getStyle()},void 0,v("img",{alt:"",src:n(10260),className:f.default.arrowIcon})),v("div",{className:(0,o.default)(f.default.arrowContainer,f.default.diag1)},void 0,v("img",{alt:"",src:n(10261),className:f.default.arrowIcon})),v("div",{className:(0,o.default)(f.default.arrowContainer,f.default.diag2)},void 0,v("img",{alt:"",src:n(10262),className:f.default.arrowIcon})))},p.renderContent=function(){return v("div",{className:f.default.tutorialMessages},void 0,v("div",{className:f.default.searchMessage},void 0,d.default.Messages.QUICKSWITCHER_TUTORIAL_MESSAGE_SEARCH),v("div",{className:f.default.selectMessage},void 0,d.default.Messages.QUICKSWITCHER_TUTORIAL_MESSAGE_SELECT))},p.render=function(){var e,t=this.props.hasQuery,n=this.state.shown;return a.createElement("div",{ref:this.rootRef,className:(0,o.default)(f.default.tutorial,(e={},e[f.default.shown]=n,e[f.default.hasQuery]=t,e))},this.renderContent(),this.renderArrowGroup(f.default.left),this.renderArrowGroup(f.default.right))},p.getStyle=function(){return{transform:[{translateY:this.state.translateY.interpolate({inputRange:[0,250],outputRange:["0px","250px"]})},{translateZ:0}]}},c}(a.PureComponent);h.displayName="QuickSwitcherTutorial";var E=h;t.default=E},function(e,t,n){e.exports=n.p+"85761f5edbfdfbeba087f67ced11fe8e.svg"},function(e,t,n){e.exports=n.p+"86deade60ada88b092a0de67a3800ce8.svg"},function(e,t,n){e.exports=n.p+"7c5e2c588b7325c8433db1ac2a03a6b6.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-02_staff_qc_debugging",label:"Display QS scores in results. Not a real experiment",defaultConfig:{showScores:!1},treatments:[{id:1,label:"Show scores in QS results",config:{showScores:!0}}]});t.default=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallBranchPrompt=function(e,t,n){!function(e,t){var n=a.default.getGame(e);if(!n)return void new r.default("DispatchUninstallActionCreators").log("Application not found for game "+e);(0,o.openModal)((function(e){return s(u({game:n,onConfirmUninstall:t},e))}))}(e,(function(){return(0,i.uninstallApplication)(e,t,n)}))};var r=l(n(26)),a=l(n(71)),o=n(41),i=n(266);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=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}).apply(this,arguments)}var s=function(){return null};s=n(10775).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_hub_email_connection",label:"Hub Email Connection",defaultConfig:{showModal:!1,showTab:!1,forceShowModal:!1},treatments:[{id:1,label:"Show email connection modal",config:{showModal:!0,showTab:!0,forceShowModal:!1}},{id:2,label:"Force show email connection modal",config:{showModal:!0,showTab:!0,forceShowModal:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"activityembed:"+e+":"+t}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2020-06_voice_panel_introduction",label:"Voice Panel Introduction",defaultConfig:{showPopout:!1},treatments:[{id:1,label:"Show voice panel introduction",config:{showPopout:!0}}]});t.default=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userNeedsAgeGate=function(){var e=a.default.getNullableCurrentUser();return null!=e&&o.default.extractTimestamp(e.id)>l.getTime()&&!e.isClaimed()&&null==e.nsfwAllowed},t.AgeRestrictedGuildsExperiment=void 0;var r=n(50),a=i(n(12)),o=i(n(97));function i(e){return e&&e.__esModule?e:{default:e}}var l=new Date("06/16/2020");var u=(0,r.createExperiment)({id:"2021-05_age_restricted_guilds",label:"Process age restricted guilds",kind:"user",defaultConfig:{enabled:!1},treatments:[{id:1,label:"On",config:{enabled:!0}}]});t.AgeRestrictedGuildsExperiment=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=h(n(0)),i=m(n(3)),l=h(n(8788)),u=m(n(10929)),s=m(n(5952)),d=m(n(10961)),f=m(n(8789)),c=m(n(39)),p=m(n(161)),v=m(n(10355)),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=((r={})[y.PictureInPictureComponents.VIDEO]=d.default,r[y.PictureInPictureComponents.EMBED_IFRAME]=u.default,r),O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleWindowMove=function(e,t){l.moveTo(e,t)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n),r.prototype.render=function(){var e=this.props,t=e.selectedPIPWindow,n=e.pipWindows,r=e.maxX,a=e.maxY,o=e.theme,i=e.dockedRect;return E(v.default,{pictureInPictureComponents:S,selectedPIPWindow:t,pipWindows:n,maxX:r,maxY:a,dockedRect:i,theme:o,onWindowMove:this.handleWindowMove})},r}(o.PureComponent);O.displayName="PictureInPictureContainer";var I=i.default.connectStores([f.default,s.default,p.default,c.default],(function(e){var t=e.showInPopoutWindow,n=void 0!==t&&t,r=s.default.getWindowOpen(y.PopoutWindowKeys.CHANNEL_CALL_POPOUT),a=p.default.windowSize();if(r){var o=s.default.getWindow(y.PopoutWindowKeys.CHANNEL_CALL_POPOUT);a=null==o?a:{width:o.innerWidth,height:o.innerHeight}}var i=f.default.pipWindows,l=r&&!n?null:f.default.pipWindow;return{selectedPIPWindow:l,pipWindows:i,maxX:a.width,maxY:a.height,theme:c.default.theme,dockedRect:null!=l?f.default.getDockedRect(l.id):null}}))(O);t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FORCE_HIDE_PARTICIPANTS_WIDTH=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(9)),i=n(122),l=n(3),u=M(n(8299)),s=M(n(294)),d=n(691),f=M(n(10930)),c=M(n(10346)),p=M(n(11)),v=M(n(51)),y=M(n(8524)),m=M(n(55)),_=n(121),h=n(48),E=M(n(9137)),g=M(n(8934)),S=M(n(10944)),O=M(n(10946)),I=M(n(10950)),T=M(n(10952)),C=n(1),b=M(n(7954));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(){return(P=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}).apply(this,arguments)}function R(e){var t,n=e.onSelectParticipant,r=e.onContextMenuParticipant,u=e.onFullscreenParticipant,f=e.participants,m=e.filteredParticipants,O=e.popoutWindow,I=e.inCall,M=e.channel,N=e.selectedParticipant,R=e.showParticipants,L=void 0===R||R,D=e.className,w=e.paused,j=e.width,k=e.height,U=e.layout,G=e.idle,F=null!=O,B=j<=456,H=L&&!B,x=v.default.getVideoComponent(),V=p.default.getId(),W=(0,l.useStateFromStores)([s.default],(function(){return s.default.getSelfEmbeddedActivityForChannel(M.id)})),Y=a.useState({width:0,height:0}),z=Y[0],K=Y[1],$=a.useState(!1),Z=$[0],q=$[1],X=(0,i.useSpring)({value:H?1:0,config:P({},i.config.stiff,{clamp:!0}),onStart:function(){return q(!0)},onChange:function(){return _.ComponentDispatch.dispatch(C.ComponentActions.REMEASURE_TARGET)},onRest:function(){q(!1),_.ComponentDispatch.dispatch(C.ComponentActions.REMEASURE_TARGET)}}),J=(0,i.useTransition)(N,{keys:function(e){return null==e?void 0:e.id},config:P({},i.config.stiff,{clamp:!0}),initial:null,from:{opacity:0},enter:{opacity:1},leave:{opacity:0}}),Q=a.useCallback((function(e){K(e)}),[]),ee=N.type===d.ParticipantTypes.ACTIVITY&&(null==W?void 0:W.applicationId)===N.id,te=N.type!==d.ParticipantTypes.ACTIVITY&&null!=N.streamId&&z.width>0&&z.height>0?z.width/z.height:16/9,ne=H||w||null==N||N.type===d.ParticipantTypes.ACTIVITY?[]:[N.type===d.ParticipantTypes.STREAM?f.find((function(e){return e.type===d.ParticipantTypes.USER&&e.id===(null==N?void 0:N.user.id)&&e.id!==V&&(0,E.default)(e)})):null,N.type===d.ParticipantTypes.USER?f.find((function(e){return e.type===d.ParticipantTypes.STREAM&&e.user.id===(null==N?void 0:N.user.id)&&null!=e.streamId})):null,N.id!==V?f.find((function(e){return e.type===d.ParticipantTypes.USER&&e.id===V&&(0,E.default)(e)})):null].filter(h.isNotNullish),re=Math.min(k,k-(N.type===d.ParticipantTypes.ACTIVITY?144:0))*te,ae=H?j-228:j;return A(i.animated.div,{style:{paddingLeft:X.value.to((function(e){return 8*e+"px"})),paddingRight:X.value.to((function(e){return 228*e+8*e+"px"}))},className:(0,o.default)(b.default.root,b.default.flexCenter,D)},void 0,A("div",{className:b.default.videoFrame},void 0,A("div",{style:{maxWidth:re+"px"},className:b.default.videoWrapper},void 0,A(y.default,{className:b.default.videoSizer,aspectRatio:te},void 0,J((function(e,t,a){var o=a.key;return null!=t?A(i.animated.div,{className:b.default.videoWrapperAnimated,style:e},o,A(g.default,{focused:!0,noBorder:!H,channel:M,className:b.default.focusedVideo,videoComponent:x,paused:w,width:ae,participant:t,onClick:n,onDoubleClick:u,onContextMenu:r,onVideoResize:Q,inCall:I,inPopout:F})):null})))),B||U===C.ChannelLayouts.MINIMUM||U===C.ChannelLayouts.NORMAL||ee?null:A(c.default,{channelId:M.id,isParticipantsOpen:L,className:(0,o.default)(b.default.participantsButton,(t={},t[b.default.idle]=G,t))})),A(i.animated.div,{className:b.default.participantsWrapperAnimated,style:{transform:X.value.to((function(e){return"translateX("+-1*e*228+"px)"})),visibility:X.value.to((function(e){return 0===e?"hidden":"visible"}))}},void 0,A(T.default,{channel:M,onClick:n,onContextMenu:r,onDoubleClick:u,participants:m,selectedParticipantId:N.id,inCall:I,paused:w||Z||!H,popoutWindow:O})),ne.length>0?A(S.default,{onContextMenuParticipant:r,width:j,height:k,channel:M,participants:ne}):null)}t.FORCE_HIDE_PARTICIPANTS_WIDTH=456,R.displayName="FocusedView";var L=(0,u.default)((function(e){var t=e.participants,n=e.filteredParticipants,r=e.selectedParticipant,i=e.participantsVersion,l=e.layout,u=e.onSelectParticipant,s=e.onContextMenuParticipant,c=e.onFullscreenParticipant,v=e.channel,y=e.className,_=e.inCall,h=e.showParticipants,E=void 0===h||h,g=e.paused,S=void 0!==g&&g,T=e.width,M=e.height,N=e.idle,P=e.mode,L=e.popoutWindow,D=a.useMemo((function(){return n.filter((function(e){return e.type!==d.ParticipantTypes.ACTIVITY||!e.participants.has(p.default.getId())}))}),[n,i]);if(P===C.ChannelModes.VOICE)return A(f.default,{guildId:v.guild_id,width:T,className:b.default.voiceCallWrapper,participants:t,onContextMenu:s});n=_?n:t;var w=null!=L;return null==r?0===n.length?A(I.default,{className:(0,o.default)(b.default.videoGrid,b.default.hiddenParticipants),channelId:v.id,width:T}):A(m.default,{className:b.default.videoGridWrapper,justify:m.default.Justify.CENTER,align:m.default.Align.CENTER},void 0,A(O.default,{channel:v,className:b.default.videoGrid,participants:D,totalNumberOfParticipants:t.length,layout:l,onClick:u,onDoubleClick:c,onContextMenu:s,paused:S,inCall:_,inPopout:w})):A(R,{onFullscreenParticipant:c,onContextMenuParticipant:s,onSelectParticipant:u,selectedParticipant:r,filteredParticipants:D,participants:t,popoutWindow:L,className:y,idle:N,height:M,width:T,layout:l,inCall:_,channel:v,showParticipants:E})}));t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(705)),i=f(n(8320)),l=f(n(696)),u=f(n(8288)),s=f(n(6)),d=f(n(7938));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.className;return p("div",{className:d.default.iconContainer},void 0,p(i.default,{className:(0,a.default)(d.default.leftCaret,t)}),p(l.default,{className:(0,a.default)(d.default.members,t)}))}function y(e){var t=e.className;return p("div",{className:d.default.iconContainer},void 0,p(i.default,{className:(0,a.default)(d.default.rightCaret,t)}))}function m(e){var t=e.channelId,n=e.className,r=e.isParticipantsOpen;return p(u.default,{label:r?s.default.Messages.VIDEO_CALL_HIDE_MEMBERS:s.default.Messages.VIDEO_CALL_SHOW_MEMBERS,className:(0,a.default)(d.default.participantsButton,n),onClick:function(){o.default.toggleParticipants(t,!r)},iconComponent:r?y:v})}v.displayName="OpenIcon",y.displayName="CloseIcon",m.displayName="ToggleParticipantsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){if(e.state===a.ApplicationStreamStates.ENDED||e.state===a.ApplicationStreamStates.FAILED)return null;if(e.state===a.ApplicationStreamStates.RECONNECTING)return{mainText:o.default.Messages.STREAM_RECONNECTING_ERROR,supportingText:o.default.Messages.STREAM_RECONNECTING_ERROR_SUBTEXT};if(e.state===a.ApplicationStreamStates.PAUSED)return n?{mainText:o.default.Messages.STREAM_CAPTURE_PAUSED,supportingText:o.default.Messages.STREAM_CAPTURE_PAUSED_DETAILS}:{mainText:o.default.Messages.STREAM_CAPTURE_PAUSED,supportingText:o.default.Messages.STREAM_CAPTURE_PAUSED_DETAILS_VIEWER.format({username:r.default.getName(e.guildId,e.channelId,t)})};if(i)return{mainText:o.default.Messages.STREAM_PREVIEW_PAUSED,supportingText:o.default.Messages.STREAM_PREVIEW_PAUSED_SUBTEXT};return null};var r=i(n(258)),a=n(1),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.useStateFromStores)([i.default,o.default,a.default],(function(){return null!=e?(0,l.default)(i.default.getQuality(),i.default.getStatsHistory(e,e===a.default.getId()),null!=o.default.getHookError(u.MediaEngineHookTypes.SOUND)):null}),[e])};var r=n(3),a=s(n(11)),o=s(n(1407)),i=s(n(1270)),l=s(n(10937)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;d(n(0));var r,a,o=n(364),i=n(140),l=d(n(8753)),u=(r=n(6))&&r.__esModule?r:{default:r};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=n(10939);function p(e){var t=e.stream,n=e.width,r=e.noArt,a=void 0!==r&&r,s=e.selected,d=void 0!==s&&s;return f(l.default,{artURL:c,noArt:a,selected:d,size:(0,l.getSizeForWidth)(n),header:u.default.Messages.STREAM_ENDED,onCTAClick:function(){return(0,o.closeStream)((0,i.encodeStreamKey)(t))},callToAction:u.default.Messages.CLOSE_STREAM})}p.displayName="StreamEnded"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;c(n(0));var r,a=n(364),o=n(140),i=d(n(93)),l=c(n(8753)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=n(10351);function y(e){var t=e.stream,n=e.width,r=e.selected,d=void 0!==r&&r,f=e.noArt,c=void 0!==f&&f;return p(l.default,{artURL:v,header:s.default.Messages.STREAM_FAILED_TITLE,size:(0,l.getSizeForWidth)(n),noArt:c,selected:d,description:s.default.Messages.STREAM_FAILED_DESCRIPTION.format({helpUrl:i.default.getArticleURL(u.HelpdeskArticles.STREAM_FAILED)}),onCTAClick:function(){return(0,a.closeStream)((0,o.encodeStreamKey)(t))},callToAction:s.default.Messages.CLOSE_STREAM})}y.displayName="StreamFailed"},function(e,t,n){e.exports=n.p+"2ceb472e89545af8543aa44b072b910d.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.streamerId,n=e.className,r=function(e){if(null==e)return null;return i.default.isDeveloper?e.message+" ("+e.errorType+")":e.message}((0,a.default)(t));return null!=r?s(o.default,{className:n,errorMessage:r}):null};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(10348)),o=l(n(10940)),i=l(n(759));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVideoCompact=function(e){return e<=220},t.isNamesCompact=function(e){return e<=200}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(8555)),i=f(n(10942)),l=f(n(55)),u=f(n(279)),s=n(1),d=f(n(7947));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e){var t=e.style,n=e.src,r=e.backgroundSrc,f=e.pulseSpeakingIndicator,c=void 0!==f&&f,y=e.speaking,m=void 0!==y&&y,_=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["style","src","backgroundSrc","pulseSpeakingIndicator","speaking"]),h=null!=r?r:n,E=(0,o.default)(h,s.Colors.PRIMARY_DARK_800);if(null==n)return null;var g=a.createElement(u.default,v({className:d.default.avatarWrapper,src:n},_));return p(l.default,{style:v({},t,{backgroundColor:E}),className:d.default.background,justify:l.default.Justify.CENTER,align:l.default.Align.CENTER},void 0,c?p(i.default,{shouldAnimate:m},void 0,g):g)}y.displayName="VideoBackground",y.AvatarSizes=u.default.Sizes;var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PictureInPictureWindow=void 0;var r,a=v(n(0)),o=c(n(9)),i=n(67),l=v(n(16)),u=c(n(10945)),s=n(1),d=c(n(7948)),f=c(n(5958));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=80,h=132,E=80,g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).ensureIsInPosition=function(){t.setPosition(t.props.position)},t.handleSetInnerDivRef=function(e){var n;(t._innerDiv=e,null!=e)&&(t._resizeObserver=new ResizeObserver(t.ensureIsInPosition),null===(n=t._resizeObserver)||void 0===n||n.observe(e))},t.handleSetDraggableRef=function(e){t._draggable=e},t.handleDragStart=function(e,n){t._velocityX=0,t._velocityY=0,t._lastMoveX=e,t._lastMoveY=n,t._lastMoveTime=new Date},t.handleDrag=function(e,n){var r=new Date,a=r-t._lastMoveTime;t._velocityX=(e-t._lastMoveX)/a,t._velocityY=(n-t._lastMoveY)/a,t._lastMoveX=e,t._lastMoveY=n,t._lastMoveTime=r},t.handleDragEnd=function(e,n){var r,a=t.props,o=a.maxX,i=a.maxY,l=t.calculateDecayingPosition(e,n,t._velocityX,t._velocityY),u=!0,d=!0;if(l.x>o/2&&(d=!1),l.y>i/2&&(u=!1),r=u&&d?s.PictureInPicturePositions.TOP_LEFT:u&&!d?s.PictureInPicturePositions.TOP_RIGHT:!u&&d?s.PictureInPicturePositions.BOTTOM_LEFT:s.PictureInPicturePositions.BOTTOM_RIGHT,t.animateToPosition(r,t.ensureIsInPosition),r!==t.props.position){var f=t.props,c=f.id,p=f.onMove;p&&p(c,r)}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var c=r.prototype;return c.componentDidMount=function(){this.setPosition(this.props.position)},c.componentDidUpdate=function(e){e.edgeOffsetTop===this.props.edgeOffsetTop&&e.edgeOffsetLeft===this.props.edgeOffsetLeft&&e.edgeOffsetBottom===this.props.edgeOffsetBottom&&e.edgeOffsetRight===this.props.edgeOffsetRight&&e.maxX===this.props.maxX&&e.maxY===this.props.maxY&&e.dockedRect===this.props.dockedRect||this.ensureIsInPosition()},c.componentWillUnmount=function(){var e;null===(e=this._resizeObserver)||void 0===e||e.disconnect()},c.getPosition=function(e){var t=(0,i.findDOMNode)(this._innerDiv);if(null!=t){var n=t.getBoundingClientRect();this._width=n.width,this._height=n.height}var r,a,o=this.props,u=o.edgeOffsetTop,d=o.edgeOffsetLeft,f=o.edgeOffsetBottom,c=o.edgeOffsetRight,p=o.maxX,v=o.maxY,y=o.dockedRect,m=u,_=v-f-this._height,h=d,E=p-c-this._width,g=l.default.getPlatform()===l.PlatformTypes.WINDOWS?22:0;if(null!=y)return{y:(null!==(r=null==y?void 0:y.y)&&void 0!==r?r:0)-g,x:null!==(a=null==y?void 0:y.x)&&void 0!==a?a:0};switch(e){case s.PictureInPicturePositions.TOP_LEFT:return{y:m,x:h};case s.PictureInPicturePositions.BOTTOM_LEFT:return{y:_,x:h};case s.PictureInPicturePositions.TOP_RIGHT:return{y:m,x:E};default:return{y:_,x:E}}},c.setPosition=function(e){var t,n=this.getPosition(e),r=n.x,a=n.y;null===(t=this._draggable)||void 0===t||t.setPosition(r,a)},c.animateToPosition=function(e,t){var n,r=this.getPosition(e),a=r.x,o=r.y;null===(n=this._draggable)||void 0===n||n.animateToPosition(a,o,{},t)},c.calculateDecayingPosition=function(e,t,n,r){return{x:e+200*n,y:t+200*r}},c.getXOffset=function(){var e=this.props,t=e.position,n=e.edgeOffsetLeft,r=e.edgeOffsetRight;switch(t){case s.PictureInPicturePositions.TOP_LEFT:case s.PictureInPicturePositions.BOTTOM_LEFT:return-n;default:return r}},c.getYOffset=function(){var e=this.props,t=e.position,n=e.edgeOffsetTop,r=e.edgeOffsetBottom;switch(t){case s.PictureInPicturePositions.TOP_LEFT:case s.PictureInPicturePositions.TOP_RIGHT:return-n;default:return r}},c.render=function(){var e,t=this.props,n=t.maxX,r=t.maxY,i=t.dockedRect,l=t.hidden,s={};return null!=i&&(s={transform:"translate3d("+i.x+", "+i.y+", 0)",width:i.width,height:i.height}),a.createElement(u.default,{dragAnywhere:!0,ref:this.handleSetDraggableRef,className:(0,o.default)(d.default.pictureInPictureWindow,(e={},e[d.default.hidden]=l,e)),maxX:n,maxY:r,disabled:null!=i,onDragStart:this.handleDragStart,onDrag:this.handleDrag,onDragEnd:this.handleDragEnd},a.createElement("div",{ref:this.handleSetInnerDivRef,className:f.default.elevationHigh,style:s},this.props.children))},r}(a.PureComponent);t.PictureInPictureWindow=g,g.displayName="PictureInPictureWindow",g.defaultProps={hidden:!1};var S=function(e){var t=e.selectedPIPWindow,n=e.pipWindows,r=e.maxX,o=e.maxY,i=e.onWindowMove,l=e.dockedRect,u=e.pictureInPictureComponents;return y("div",{className:d.default.pictureInPicture},void 0,function(){if(null==t)return null;var e=Array.from(n.values()).map((function(e){if(e.id!==t.id&&e.component!==s.PictureInPictureComponents.EMBED_IFRAME)return null;var n="string"==typeof e.component?u[e.component]:e.component;return a.createElement(n,e.props)}));return y(g,{position:t.position,id:t.id,hidden:t.hidden,onMove:i,maxX:r,maxY:o,dockedRect:l,edgeOffsetTop:_,edgeOffsetBottom:h,edgeOffsetLeft:E,edgeOffsetRight:_},void 0,e)}())};S.displayName="PictureInPicture";var O=a.memo(S);t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OPCODES=void 0;var r=p(n(64)),a=p(n(1398)),o=p(n(26)),i=p(n(267)),l=n(121),u=p(n(689)),s=n(8452),d=p(n(9659)),f=p(n(9660)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=new o.default("RPCServer:PostMessage"),h=new Map,E=new Set,g={HANDSHAKE:0,FRAME:1,CLOSE:2,HELLO:3};t.OPCODES=g;var S=a.default.object().required().keys({v:a.default.number().min(1).max(1).required(),encoding:a.default.string().equal("json").optional(),client_id:a.default.string().required(),frame_id:a.default.string().required()}),O=a.default.object().required().keys({code:a.default.number().valid(Object.values(c.RPCCloseCodes)).required(),message:a.default.string().optional()});function I(e,t,n){e.postMessage([g.CLOSE,n],t)}var T=function(e){function t(t,n,r,a,o){var i;if(i=e.call(this,c.TransportTypes.POST_MESSAGE,a,o)||this,-1===["etf","json"].indexOf(o))throw new u.default(c.RPCCloseCodes.INVALID_ENCODING,"Invalid Encoding: "+o);if("etf"===o)throw new u.default(c.RPCCloseCodes.INVALID_ENCODING,"Erlpack cannot be used on this client");return i.eventSource=n,i.origin=t,i.frameId=r,i}y(t,e);var n=t.prototype;return n.send=function(e){(i.default.isLoggingOverlayEvents||e.cmd!==c.RPCCommands.OVERLAY&&e.evt!==c.RPCEvents.OVERLAY)&&_.info("Socket Emit: "+this.id,(0,d.default)(e)),this.eventSource.postMessage([g.FRAME,e],this.origin)},n.close=function(e,t){I(this.eventSource,this.origin,{code:e,message:t})},t}(f.default),C=new(function(e){function t(){var t;return(t=e.call(this)||this).disconnectSocket=function(e,n,r){var a,o;void 0===r&&(r=!1),t.emit("disconnect",e,r?void 0:n),e.close(n.code,null!==(a=n.message)&&void 0!==a?a:"Unknown");var i=(null!==(o=Array.from(h.entries()).find((function(t){t[0];return t[1]===e})))&&void 0!==o?o:[null,null])[0];null!=i&&h.delete(i)},t.handleIFrameMount=function(e){var t=e.id;E.add(t)},t.handleIFrameUnmount=function(e){var n,r=e.id;E.delete(r);var a=null!==(n=Array.from(h.entries()).find((function(e){e[0];return e[1].frameId===r})))&&void 0!==n?n:[null,null],o=a[0],i=a[1];null!=i&&null!=o&&(t.disconnectSocket(i,{code:c.RPCCloseCodes.CLOSE_NORMAL,message:"iFrame gone"},!0),h.delete(o))},t.handleMessage=function(e){if(window!==e.source)if(null!=e.source&&null!=!e.source.postMessage){var n=e.source,r=e.data,a=e.origin,o=h.get(n);try{t.routeEvent(o,n,a,r)}catch(e){null!=o?t.disconnectSocket(o,{code:e.code,message:e.message},!0):I(n,a,{code:e.code,message:e.message})}}else _.error("Unknown event source")},t.handleFrame=function(e,n,r){if(e!==n.origin)throw new u.default(c.RPCCloseCodes.INVALID_ORIGIN,"Origin has changed");var a;try{a="string"==typeof r?JSON.parse(r):r}catch(e){throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Payload not recognized encoding")}(i.default.isLoggingOverlayEvents||a.cmd!==c.RPCCommands.OVERLAY)&&_.info("Socket Message: "+n.id,(0,d.default)(a)),t.emit("request",n,a)},t.handleHandshake=function(){var e,n=(e=regeneratorRuntime.mark((function e(n,r,o){var i,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,a.default.assert(o,S),e.next=7;break;case 4:throw e.prev=4,e.t0=e.catch(0),new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,e.t0.message);case 7:if(l=(i=o).frame_id,E.has(l)){e.next=13;break}throw _.error("Unrecognized frame ID "+l),new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Unrecognized frame ID "+l);case 13:e.prev=13,d=new T(r,n,i.frame_id,Number(i.v),i.encoding||"json"),e.next=21;break;case 17:throw e.prev=17,e.t1=e.catch(13),_.error("Error opening window socket "+e.t1),e.t1;case 21:return _.info("Socket Opened: "+d.id),e.prev=22,e.next=25,(0,s.validateSocketClient)(d,r,i.client_id);case 25:h.set(n,d),E.delete(l),t.emit("connect",d),_.info("Socket Validated: "+d.id),e.next=35;break;case 31:throw e.prev=31,e.t2=e.catch(22),_.info("Socket Closed: "+d.id+", "+e.t2.message),e.t2;case 35:case"end":return e.stop()}}),e,null,[[0,4],[13,17],[22,31]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e,t,r){return n.apply(this,arguments)}}(),t.handleClose=function(e,n){try{a.default.assert(n,O)}catch(e){throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,e.message)}var r=n;t.disconnectSocket(e,r)},window.addEventListener("message",t.handleMessage),l.ComponentDispatch.subscribe(c.ComponentActions.IFRAME_MOUNT,t.handleIFrameMount),l.ComponentDispatch.subscribe(c.ComponentActions.IFRAME_UNMOUNT,t.handleIFrameUnmount),t}return y(t,e),t.prototype.routeEvent=function(e,t,n,r){if(!Array.isArray(r))throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Protocol error");var a=r,o=a[0],i=a[1];switch(o){case g.HANDSHAKE:if(null!=e)throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Already connected");return this.handleHandshake(t,n,i);case g.FRAME:if(null==e)throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Not connected");return this.handleFrame(n,e,i);case g.CLOSE:if(null==e)throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Not connected");return this.handleClose(e,i);default:throw new u.default(c.RPCCloseCodes.CLOSE_UNSUPPORTED,"Invalid opcode")}},t}(r.default));t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(29)),i=n(35),l=f(n(47)),u=f(n(24)),s=f(n(6)),d=f(n(7955));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,r;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleConfirm=function(){var e=t.props,n=e.onConfirm,r=e.onClose;null==r||r(),null==n||n()},t.handleDismiss=function(){var e=t.props,n=e.onDismiss,r=e.onClose;null==r||r(),null==n||n()},t}return r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,v(t,r),a.prototype.render=function(){var e=this.props,t=e.transitionState,r=e.header,a=e.body,f=e.confirmText;return p(i.ModalRoot,{transitionState:t,"aria-label":r},void 0,p(i.ModalContent,{className:d.default.content},void 0,p("img",{src:n(10958),alt:r}),p(l.default,{size:l.default.Sizes.SIZE_24,className:d.default.header},void 0,r),p(u.default,{size:u.default.Sizes.SIZE_16},void 0,a)),p(i.ModalFooter,{className:d.default.footer},void 0,p(o.default,{size:o.default.Sizes.SMALL,onClick:this.handleConfirm},void 0,f),p(o.default,{size:o.default.Sizes.SMALL,look:o.default.Looks.LINK,color:o.default.Colors.PRIMARY,onClick:this.handleDismiss},void 0,s.default.Messages.CLOSE)))},a}(a.PureComponent);y.displayName="VideoDevicesWarningModal";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPictureHeader=I,t.default=T;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=n(3),l=E(n(469)),u=E(n(94)),s=E(n(61)),d=E(n(55)),f=n(10959),c=E(n(8853)),p=E(n(47)),v=E(n(10960)),y=E(n(9658)),m=n(1),_=E(n(6)),h=E(n(7378));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.title,n=e.onJumpToChannel,r=e.idle,a=e.preventIdleComponent,o=(0,i.useStateFromStores)([u.default],(function(){return u.default.getChannelId()})),l=null!=o?O(v.default,{voiceChannelId:o,idle:r}):null;return O(a,{className:h.default.headerIdleContainer},void 0,O(s.default,{className:h.default.headerTitle,onClick:n},void 0,O(c.default,{"aria-label":_.default.Messages.OPEN_IN_THEATER,className:h.default.backButton,width:20,height:20}),O(p.default,{className:h.default.headerText,size:p.default.Sizes.SIZE_16,color:m.Colors.WHITE},void 0,t)),l)}function T(e){var t,n=e.children,r=e.idle,i=e.onJumpToChannel,u=e.backgroundKey,s=e.onActive,c=e.onForceIdle,p=e.renderBottomLeftControls,v=e.renderBottomRightControls,m=e.screenMessage,_=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","idle","onJumpToChannel","backgroundKey","onActive","onForceIdle","renderBottomLeftControls","renderBottomRightControls","screenMessage"]);return O("div",{onMouseMove:s,onMouseDown:s,onMouseLeave:c,className:(0,o.default)(h.default.pictureInPictureVideo,(t={},t[h.default.idle]=r,t)),onDoubleClick:i},void 0,O(l.default,{},void 0,O(f.BackgroundTransition,{},u,n)),null!=m?a.createElement(y.default,S({size:"small"},m)):null,O("div",{className:h.default.videoControls},void 0,O("div",{className:h.default.topControls},void 0,a.createElement(I,S({idle:r,onJumpToChannel:i},_))),O("div",{className:h.default.bottomControls},void 0,O(d.default,{grow:0,shrink:1,basis:"50%",align:d.default.Align.CENTER},void 0,null==p?void 0:p()),O(d.default,{grow:0,shrink:1,justify:d.default.Justify.END,basis:"50%",align:d.default.Align.CENTER},void 0,null==v?void 0:v()))))}I.displayName="PictureInPictureHeader",T.displayName="PictureInPictureVideo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=s(n(0)),a=l(n(10360)),o=s(n(8288)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.centerButton,n=void 0!==t&&t,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["centerButton"]),u=n?o.CenterControlButton:o.default;return r.createElement(u,d({},l,{iconComponent:a.default,label:i.default.Messages.EMBEDDED_ACTIVITIES_LEAVE_ACTIVITY}))}f.displayName="LeaveCallButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M18 2H7C5.897 2 5 2.898 5 4V11H12.59L10.293 8.708L11.706 7.292L16.414 11.991L11.708 16.706L10.292 15.294L12.582 13H5V20C5 21.103 5.897 22 7 22H18C19.103 22 20 21.103 20 20V4C20 2.898 19.103 2 18 2Z"}))}d.displayName="Logout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=N(n(9)),i=N(n(8)),l=n(3),u=n(57),s=n(389),d=N(n(9143)),f=N(n(8257)),c=N(n(8351)),p=N(n(163)),v=N(n(12)),y=N(n(282)),m=N(n(278)),_=n(149),h=N(n(8475)),E=N(n(279)),g=N(n(47)),S=N(n(272)),O=n(48),I=N(n(258)),T=n(691),C=n(1),b=N(n(6)),M=N(n(7961));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(){return(P=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}).apply(this,arguments)}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function L(e,t){switch(e){case T.ParticipantTypes.ACTIVITY:return b.default.Messages.EMBEDDED_ACTIVITIES_NUM_PARTICIPANTS.format({numUsers:t});case T.ParticipantTypes.STREAM:return b.default.Messages.SPECTATORS.format({numViewers:t});default:throw new Error("Unknown participant type.")}}function D(e){var t=e.users,n=e.disableInteraction,r=e.guildId,a=e.participantType,i=e.channelId,l=e.handleUserContextMenu,u=L(a,t.length);return R(y.default,{"aria-label":u,className:M.default.popoutWrapper},void 0,R(S.default,{className:M.default.scroller},void 0,R(g.default,{size:g.default.Sizes.SIZE_12,className:M.default.memberListHeader},void 0,u),R("div",{},void 0,t.map((function(e){var t;return R(d.default,{guildId:r||void 0,className:(0,o.default)(M.default.memberListItem,(t={},t[M.default.popoutDisabled]=n,t)),textClassName:M.default.memberListItemText,user:e,disablePopout:n,nick:I.default.getNickname(r,i,e),onContextMenu:function(t){return n?null:l(t,e)}},e.id)})))))}function w(e){var t=e.users,n=e.guildId,r=e.channelId,a=e.maxVisibleUsers,i=void 0===a?3:a,l=e.className,u=L(e.participantType,t.length),s=t.length<i?t.map((function(e){return R("div",{className:M.default.viewersTooltipItem},e.id,I.default.getName(n,r,e))})):u;return R(_.TooltipContainer,{text:s,"aria-label":u,color:_.TooltipColors.GREY},void 0,R("div",{className:(0,o.default)(M.default.viewers,l)},void 0,R(h.default,{className:M.default.viewersIcon}),R("span",{"aria-hidden":"true"},void 0,t.length)))}D.displayName="PopoutList",w.displayName="CompactUsers";var j=[];function k(e){var t=e.channelId,n=e.guildId,r=e.participant,d=e.className,y=e.compact,_=void 0!==y&&y,h=e.disableInteraction,g=void 0!==h&&h,S=e.maxVisibleUsers,I=void 0===S?3:S,b=a.useState(!1),N=b[0],A=b[1],L=a.useRef(new u.DelayedCall(150,(function(){return A(!1)}))),k=(0,l.useStateFromStoresArray)([p.default,v.default],(function(){if(r.type===T.ParticipantTypes.STREAM){var e=p.default.getViewerIds(r.id);return e.length>0?e.map((function(e){return v.default.getUser(e)})).filter(O.isNotNullish):j}return r.type===T.ParticipantTypes.ACTIVITY&&r.participants.size>0?Array.from(r.participants).map((function(e){return v.default.getUser(e)})).filter(O.isNotNullish):j}),[r]),U=a.useCallback((function(){L.current.cancel(),A(!0)}),[]),G=a.useCallback((function(){L.current.delay()}),[]),F=a.useCallback((function(e,t){U(),(0,s.openContextMenu)(e,(function(e){return a.createElement(c.default,P({},e,{user:t}))}),{onClose:G})}),[G,U]);if(0===k.length)return null;if(_)return R(w,{maxVisibleUsers:I,users:k,guildId:n,channelId:t,className:d,participantType:r.type});var B=(0,i.default)(k).take(I).map((function(e){return R(E.default,{src:e.getAvatarURL(n||void 0),"aria-label":e.username,size:E.default.Sizes.SIZE_24,className:M.default.viewer},e.id)})).value();return k.length>I&&(B[B.length-1]=R("div",{className:M.default.overflow},"overflow","+",k.length-I+1)),R(f.default,{section:C.AnalyticsSections.STREAM_VIEWER_POPOUT},void 0,R("div",{onMouseEnter:U,onMouseLeave:G},void 0,R(m.default,{renderPopout:function(){return R(D,{participantType:r.type,handleUserContextMenu:F,guildId:n,channelId:t,users:k,disableInteraction:g})},shouldShow:N,position:m.default.Positions.TOP},void 0,(function(){return R("div",{className:(0,o.default)(M.default.viewers,d)},void 0,B)}))))}k.displayName="ParticipantsForSelectedParticipant"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=s(n(0)),a=l(n(8938)),o=s(n(8288)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.centerButton,n=void 0!==t&&t,l=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["centerButton"]),u=n?o.CenterControlButton:o.default;return r.createElement(u,d({},l,{iconComponent:a.default,label:i.default.Messages.DISCONNECT_SELF}))}f.displayName="LeaveCallButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=d(n(0)),a=u(n(8520)),o=u(n(9144)),i=d(n(8288)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(){return(f=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}).apply(this,arguments)}function c(e){return e?l.default.Messages.STOP_STREAMING:l.default.Messages.STOP_WATCHING}function p(e){var t=e.isSelfStream,n=e.centerButton,l=void 0!==n&&n,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["isSelfStream","centerButton"]),s=l?i.CenterControlButton:i.default;return r.createElement(s,f({label:c(t),iconComponent:t?a.default:o.default},u))}p.displayName="StopStreamButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=s(n(0)),a=l(n(8939)),o=s(n(8288)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.hasPermission,n=e.centerButton,l=void 0!==n&&n,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["hasPermission","centerButton"]),s=l?o.CenterControlButton:o.default,f=t?i.default.Messages.SHARE_YOUR_SCREEN:i.default.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_VOICE;return r.createElement(s,d({label:f,disabled:!t,iconComponent:a.default},u))}f.displayName="StreamButton"},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=N(n(9)),i=N(n(23)),l=n(3),u=N(n(1345)),s=N(n(1201)),d=N(n(754)),f=N(n(6126)),c=n(285),p=N(n(105)),v=N(n(1434)),y=N(n(1291)),m=N(n(5952)),_=N(n(39)),h=N(n(161)),E=n(165),g=n(41),S=n(217),O=P(n(745)),I=n(248),T=N(n(16)),C=n(259),b=n(1),M=N(n(7964));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function L(){return(L=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}).apply(this,arguments)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var w=R(I.MaskLibrary,{}),j=R(O.default,{}),k=R(E.AppLayerContainer,{}),U=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).rootRef=a.createRef(),t.handleContextMenu=function(e){e.preventDefault()},t.handleKeyboardUsage=function(e){var n=t.props.guestWindow;if(null==n)throw new Error("");!0===e.ctrlKey||!0===e.altKey||!0===e.metaKey||e.keyCode!==b.KeyboardKeys.TAB||((0,c.enableKeyboardMode)(),n.addEventListener("mousedown",t.handleMouseUsage),n.removeEventListener("keydown",t.handleKeyboardUsage))},t.handleMouseUsage=function(){var e=t.props.guestWindow;(0,i.default)(e),(0,c.disableKeyboardMode)(),e.addEventListener("keydown",t.handleKeyboardUsage),e.removeEventListener("mousedown",t.handleMouseUsage)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,D(t,n);var l=r.prototype;return l.componentDidMount=function(){var e=this.props,t=e.guestWindow,n=e.keyboardModeEnabled,r=t.document;null==r.querySelector("title")&&null!=r.head&&r.head.appendChild(r.createElement("title")),this.updateTitle(),this.updateFontScale(),this.updateLocale(),r.addEventListener("contextmenu",this.handleContextMenu,!0),n?t.addEventListener("mousedown",this.handleMouseUsage):t.addEventListener("keydown",this.handleKeyboardUsage)},l.componentDidUpdate=function(e){var t=this.props,n=t.title,r=t.fontScale,a=t.locale;e.title!==n&&this.updateTitle(),e.fontScale!==r&&this.updateFontScale(),e.locale!==a&&this.updateLocale()},l.componentWillUnmount=function(){var e=this.props.guestWindow,t=e.document;e.removeEventListener("keydown",this.handleKeyboardUsage),e.removeEventListener("mousedown",this.handleMouseUsage),t.removeEventListener("contextmenu",this.handleContextMenu,!0),g.useModalsStore.setState((function(e){var t;return L({},e,((t={})[S.POPOUT_MODAL_CONTEXT]=[],t))}))},l.updateLocale=function(){var e=this.props,t=e.locale,n=e.guestWindow.document.documentElement;(0,i.default)(null!=n,"Window document element was null"),n.lang=t},l.updateTitle=function(){var e=this.props,t=e.title,n=e.guestWindow.document.querySelector("title");null!=n&&(n.innerText=t)},l.updateFontScale=function(){var e=this.props,t=e.fontScale,n=e.guestWindow.document.documentElement;(0,i.default)(null!=n,"Window document element was null"),n.style.fontSize=t+"%"},l.render=function(){var e=this.props,t=e.theme,n=e.focused,r=e.appFocused,i=e.children,l=e.windowKey,f=e.keyboardModeEnabled,c=e.fontScaleClass,p=e.saturation,m=e.withTitleBar,_=T.default.getPlatform(),h=(0,o.default)(c,{"keyboard-mode":f,"app-focused":n||r,"low-saturation":p<=.4});return a.createElement("div",{"data-popout-root":!0,ref:this.rootRef,className:(0,o.default)((0,C.getThemeClass)(t),(0,v.default)(),h)},R(y.default,{containerRef:this.rootRef},void 0,R(u.default,{},void 0,w,R(E.AppLayerProvider,{},void 0,R(O.ModalProvider,{contextKey:S.POPOUT_MODAL_CONTEXT},void 0,R("div",{className:M.default.popout},void 0,m&&null!=_?R(s.default,{appContext:b.AppContext.POPOUT,focused:n,type:_,windowKey:l,macOSFrame:!0}):null,R("div",{className:M.default.content},void 0,i)),j,R(d.default,{context:b.AppContext.POPOUT}),k)))))},r}(a.Component);function G(e,t){var n=(0,l.useStateFromStoresObject)([m.default],(function(){return{guestWindow:m.default.getWindow(e.windowKey),focused:m.default.getWindowFocused(e.windowKey)}})),r=n.guestWindow,o=n.focused,i=(0,l.useStateFromStores)([h.default],(function(){return h.default.isFocused()})),u=(0,l.useStateFromStoresObject)([_.default],(function(){return{locale:_.default.locale,theme:_.default.theme}})),s=u.locale,d=u.theme,f=(0,l.useStateFromStoresObject)([p.default],(function(){return{fontScale:p.default.fontScale,keyboardModeEnabled:p.default.keyboardModeEnabled,fontScaleClass:p.default.fontScaleClass,saturation:p.default.saturation}})),c=f.fontScale,v=f.keyboardModeEnabled,y=f.fontScaleClass,E=f.saturation;return null==r?null:a.createElement(U,L({ref:t},e,{guestWindow:r,focused:o,appFocused:i,locale:s,theme:d,fontScale:c,keyboardModeEnabled:v,fontScaleClass:y,saturation:E}))}U.displayName="PopoutWindow",U.defaultProps={withTitleBar:!0},G.displayName="ConnectedPopoutWindow";var F=(0,f.default)(a.forwardRef(G));t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=Se(n(0)),l=Ee(n(9)),u=Ee(n(23)),s=Ee(n(1243)),d=n(3),f=n(34),c=n(57),p=Ee(n(2)),v=Ee(n(705)),y=n(389),m=Ee(n(132)),_=n(364),h=Ee(n(1439)),E=Ee(n(10964)),g=Ee(n(8257)),S=Ee(n(754)),O=Ee(n(9699)),I=Se(n(9124)),T=n(106),C=n(140),b=n(484),M=Ee(n(10966)),N=Se(n(1293)),A=Ee(n(5952)),P=n(42),R=Ee(n(8476)),L=Ee(n(8930)),D=Ee(n(8322)),w=Ee(n(10967)),j=Ee(n(10345)),k=Ee(n(10974)),U=Ee(n(8661)),G=Ee(n(8400)),F=Ee(n(10374)),B=Ee(n(10975)),H=Ee(n(10976)),x=Ee(n(9148)),V=Ee(n(9142)),W=Ee(n(10978)),Y=Ee(n(10979)),z=Ee(n(163)),K=Ee(n(11)),$=Ee(n(303)),Z=Ee(n(15)),q=Ee(n(51)),X=Ee(n(40)),J=Ee(n(200)),Q=Ee(n(36)),ee=Ee(n(12)),te=Ee(n(80)),ne=Ee(n(55)),re=n(165),ae=n(8263),oe=Ee(n(13)),ie=n(121),le=Ee(n(16)),ue=n(259),se=Ee(n(43)),de=n(733),fe=n(691),ce=Ee(n(688)),pe=Ee(n(9138)),ve=Ee(n(10980)),ye=Ee(n(10361)),me=n(1),_e=Ee(n(6)),he=Ee(n(7977));function Ee(e){return e&&e.__esModule?e:{default:e}}function ge(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ge=function(){return e},e}function Se(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ge();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Oe(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function Ie(){return(Ie=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}).apply(this,arguments)}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function be(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Me=((r={})[me.ChannelLayouts.NORMAL]=he.default.normal,r[me.ChannelLayouts.MINIMUM]=he.default.minimum,r[me.ChannelLayouts.NO_CHAT]=he.default.noChat,r[me.ChannelLayouts.FULL_SCREEN]=he.default.fullScreen,r),Ne=((a={})[me.AppContext.POPOUT]=he.default.popout,a[me.AppContext.APP]=null,a[me.AppContext.OVERLAY]=null,a);function Ae(e){var t=e.resizableNode,n=e.onResize,r=e.maxHeight,a=i.useState(null),o=a[0],l=a[1];return i.useEffect((function(){var e,n;l(null!==(e=null===(n=t.current)||void 0===n?void 0:n.offsetHeight)&&void 0!==e?e:null)}),[t]),be("div",{onMouseDown:(0,I.default)({initialElementDimension:o,minDimension:200,maxDimension:r,resizableDomNodeRef:t,onElementResize:n,orientation:I.ResizeOrientation.VERTICAL}),className:he.default.resizeHandle})}function Pe(e){var t;return(null!==(t=null==e?void 0:e.window)&&void 0!==t?t:window).document.querySelector("#app-mount")}Ae.displayName="ResizeHandle";var Re=be(re.AppLayerContainer,{}),Le=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._prevLayout=me.ChannelLayouts.MINIMUM,t._wrapperRef=i.createRef(),t._contentRef=i.createRef(),t._timeout=new c.Timeout,t._lastIdleProps=null,t._rootNode=Pe(t.props.popoutWindow),t.state={maxHeight:window.innerHeight-200,resizedHeight:null},t.handleFullScreenChange=function(){var e=t._rootNode;null!=e&&((0,de.isFullScreen)(e,t.currentDocument)||t.props.layout!==me.ChannelLayouts.FULL_SCREEN||t.handleFullScreen())},t.handleFullScreen=function(){var e=t._rootNode;null!=e&&(t.props.layout!==me.ChannelLayouts.FULL_SCREEN?(t._prevLayout=t.props.layout,t.handleChangeLayout(me.ChannelLayouts.FULL_SCREEN),(0,de.requestFullScreen)(e,h.default.resized)):t.maybeLeaveFullScreen())},t.maybeLeaveFullScreen=function(){var e=t._rootNode;null!=e&&t.props.layout===me.ChannelLayouts.FULL_SCREEN&&(t.handleChangeLayout(t._prevLayout),(0,de.exitFullScreen)(e,h.default.resized,t.currentDocument))},t.handleToggleLayout=function(){t.handleChangeLayout(t.props.layout===me.ChannelLayouts.NORMAL?me.ChannelLayouts.NO_CHAT:me.ChannelLayouts.NORMAL)},t.handleChangeLayout=function(e){var n=t.props,r=n.channel,a=n.appContext;n.layout!==e&&(v.default.updateLayout(r.id,e,a),e===me.ChannelLayouts.FULL_SCREEN&&r.isPrivate()&&ie.ComponentDispatch.dispatch(me.ComponentActions.TEXTAREA_BLUR))},t.handleDisconnect=function(){t.props.layout===me.ChannelLayouts.FULL_SCREEN&&t.handleFullScreen()},t.handleContextMenu=function(e,n){var r,a,o=t.props,l=o.channel,s=o.appContext,d=o.layout,f=!(d===me.ChannelLayouts.FULL_SCREEN)&&!t.inPopout,c={onClose:function(){var e;return null===(e=t._lastIdleProps)||void 0===e?void 0:e.onAllowIdle("menu")},context:s};switch(null===(r=t._lastIdleProps)||void 0===r||r.onPreventIdle("menu"),null===(a=t._lastIdleProps)||void 0===a||a.onActive(),e.type){case fe.ParticipantTypes.STREAM:return void(0,y.openContextMenu)(n,(function(n){return i.createElement(M.default,Ie({},n,{stream:e.stream,exitFullscreen:t.maybeLeaveFullScreen,appContext:s}))}),c);case fe.ParticipantTypes.USER:var p=ee.default.getUser(e.id);if(null!=p)switch(l.type){case me.ChannelTypes.DM:return(0,y.openContextMenu)(n,(function(e){return i.createElement(R.default,Ie({},e,{showChannelCallItems:!0,showMediaItems:!0,user:p,channel:l,showModalItems:f}))}),c);case me.ChannelTypes.GROUP_DM:return(0,y.openContextMenu)(n,(function(e){return i.createElement(L.default,Ie({},e,{showChannelCallItems:!0,showMediaItems:!0,showChatItems:d===me.ChannelLayouts.MINIMUM||d===me.ChannelLayouts.NORMAL,user:p,channel:l,showModalItems:f}))}),c);case me.ChannelTypes.GUILD_VOICE:var v=l.getGuildId();return(0,u.default)(null!=v,"GuildID null for guild voice channel"),(0,y.openContextMenu)(n,(function(e){return i.createElement(D.default,Ie({},e,{showMediaItems:!0,showChannelCallItems:!0,showChatItems:!1,user:p,channelId:l.id,guildId:v,showModalItems:f}))}),c)}}},t.handleCallResize=function(e){t.setState({resizedHeight:e})},t.handleWindowResize=(0,s.default)((function(){t.setState({maxHeight:window.innerHeight-200})}),300),t.handleSelectParticipant=function(e,n){var r=t.props,a=r.channel,o=r.selectedParticipant,i=r.allActiveStreams,l=r.inCall,u=r.mode;if(e.type===fe.ParticipantTypes.STREAM&&(m.default.selectVoiceChannel(a.id),0===i.filter((function(t){return(0,C.encodeStreamKey)(t)===e.id&&t.state!==me.ApplicationStreamStates.ENDED})).length)){if(!(0,b.canWatchStream)(a,te.default,Z.default,X.default))return;(0,_.watchStream)((0,C.decodeStreamKey)(e.id),{forceMultiple:n.shiftKey})}l&&u===me.ChannelModes.VIDEO&&((null==o?void 0:o.id)===e.id?v.default.selectParticipant(a.id,null):v.default.selectParticipant(a.id,e.id))},t.handleOpenPopout=function(){var e=t.props,n=e.channel,r=e.mostRecentSelectedTextChannelId,a=n.getGuildId();null!=a&&null!=r&&(0,P.transitionToGuild)(a,r),N.openChannelCallPopout(n)},t.handleStayOnTop=function(e){N.setAlwaysOnTop(me.PopoutWindowKeys.CHANNEL_CALL_POPOUT,e)},t.handleClosePopout=function(){N.close(me.PopoutWindowKeys.CHANNEL_CALL_POPOUT)},t.handleFullscreenParticipant=function(e,n){var r=t.props,a=r.layout,o=r.selectedParticipant,i=a===me.ChannelLayouts.FULL_SCREEN;(!i&&(null==o?void 0:o.id)!==e.id||i&&(null==o?void 0:o.id)===e.id)&&t.handleSelectParticipant(e,n),t.handleFullScreen()},t.renderRegionSelect=function(){var e,n=t.props,r=n.call,a=n.channel,o=n.layout;return t.inPopout||o===me.ChannelLayouts.FULL_SCREEN||null==r||a.isManaged()||(e=be(E.default,{call:r})),be(ne.default,{justify:ne.default.Justify.END},void 0,e)},t.renderBottomCenter=function(){var e=t.props,n=e.channel,r=e.mode;return be(w.default,{exitFullScreen:t.maybeLeaveFullScreen,channel:n,mode:r,inPopout:t.inPopout,onDisconnectCall:t.handleDisconnect})},t.renderBottomLeft=function(){var e=t.props,n=e.layout,r=e.mentionCount,a=e.channel,o=e.appContext,l=e.useNewInviteButton,u=e.selectedParticipant,s=n===me.ChannelLayouts.NO_CHAT?B.default.Directions.UP:B.default.Directions.DOWN,d=[me.ChannelLayouts.FULL_SCREEN,me.ChannelLayouts.NO_CHAT].includes(n),f=n===me.ChannelLayouts.FULL_SCREEN?function(){t._prevLayout=me.ChannelLayouts.NORMAL,t.handleFullScreen()}:t.handleToggleLayout,c=t.viewProperties,p=c.canChangeLayout,v=c.canInvite,y=l?be(k.default,{channel:a,stream:(null==u?void 0:u.type)===fe.ParticipantTypes.STREAM?(0,C.decodeStreamKey)(u.id):void 0,applicationId:(null==u?void 0:u.type)===fe.ParticipantTypes.ACTIVITY?u.id:void 0,appContext:o,className:he.default.leftTrayIcon,exitFullScreen:t.maybeLeaveFullScreen,analyticsLocation:a.type===me.ChannelTypes.GUILD_VOICE?me.AnalyticsPages.GUILD_CHANNEL:me.AnalyticsPages.DM_CHANNEL}):be(x.default,{channel:a,stream:(null==u?void 0:u.type)===fe.ParticipantTypes.STREAM?(0,C.decodeStreamKey)(u.id):void 0,appContext:o,className:he.default.leftTrayIcon,exitFullScreen:t.maybeLeaveFullScreen,analyticsLocation:a.type===me.ChannelTypes.GUILD_VOICE?me.AnalyticsPages.GUILD_CHANNEL:me.AnalyticsPages.DM_CHANNEL});return i.createElement(i.Fragment,null,v?y:null,p?be(ne.default,{className:he.default.iconWrapper,align:ne.default.Align.CENTER,grow:0},void 0,be(B.default,{label:d?_e.default.Messages.SHOW_CHAT:_e.default.Messages.HIDE_CHAT,direction:s,className:he.default.leftTrayIcon,onClick:f}),d&&r>0?be(ae.NumberBadge,{className:he.default.badge,count:r}):null):null,(null==u?void 0:u.type)===fe.ParticipantTypes.STREAM||(null==u?void 0:u.type)===fe.ParticipantTypes.ACTIVITY?be(G.default,{},void 0,be(ye.default,{className:he.default.viewersButton,participant:u,maxVisibleUsers:4,guildId:a.getGuildId(),channelId:a.id,disableInteraction:t.inPopout||n===me.ChannelLayouts.FULL_SCREEN})):null)},t.renderBottomRight=function(){var e=t.props,n=e.popoutWindow,r=e.popoutWindowAlwaysOnTop,a=e.currentUserId,o=e.selectedParticipant,l=t.viewProperties,u=l.canFullscreen,s=l.canStayOnTop,d=l.canPopout,f=l.useTheme;return i.createElement(i.Fragment,null,null!=o&&o.type!==fe.ParticipantTypes.ACTIVITY&&o.user.id!==a?be(Y.default,{context:(0,pe.default)(o.type),userId:o.user.id,currentWindow:t.inPopout?null!=n?n:void 0:window,sliderClassName:he.default.volumeSlider}):null,s?be(W.default,{className:he.default.rightTrayIcon,popoutWindowAlwaysOnTop:r,onToggleStayOnTop:t.handleStayOnTop}):null,d?be(V.default,{themeable:f,popoutOpen:t.popoutOpen,className:he.default.rightTrayIcon,onOpenPopout:t.handleOpenPopout,onClosePopout:t.handleClosePopout}):null,u?be(H.default,{themeable:f,node:t._rootNode,guestWindow:n,className:he.default.rightTrayIcon,onClick:t.handleFullScreen}):null)},t.renderHeader=function(){var e=t.props,n=e.renderExternalHeader,r=e.channel,a=e.appContext,o=e.layout,i=t.viewProperties,l=i.useExternalHeader,u=i.canSelectRegion,s=i.renderHeader,d=o===me.ChannelLayouts.FULL_SCREEN;return s?be(G.default,{},void 0,be("div",{className:he.default.headerWrapper},void 0,l?null==n?void 0:n():be(ve.default,{channel:r,appContext:a,inPopout:t.inPopout,isFullScreen:d,exitFullScreen:t.maybeLeaveFullScreen})),u?t.renderRegionSelect():null):null},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ce(t,n);var a,o,d,f=r.prototype;return f.componentDidMount=function(){var e=this.props,t=e.channel,n=e.layout;this.currentDocument.addEventListener(de.FULLSCREEN_CHANGE_EVENT,this.handleFullScreenChange),window.addEventListener("resize",this.handleWindowResize),oe.default.track(me.AnalyticEvents.VIDEO_LAYOUT_TOGGLED,Ie({video_layout:this.inPopout?"popout":n},(0,T.collectVoiceAnalyticsMetadata)(t.id)))},f.componentWillUnmount=function(){this._timeout.stop(),this.currentDocument.removeEventListener(de.FULLSCREEN_CHANGE_EVENT,this.handleFullScreenChange),window.removeEventListener("resize",this.handleWindowResize),this.inPopout&&le.default.isOSX()||this.maybeLeaveFullScreen()},f.componentDidUpdate=function(e){var t,n=this,r=this.props,a=r.onResize,o=r.participantsOpen,i=r.filteredParticipants,l=r.inCall,u=r.mode,s=r.layout,d=this._rootNode;(null!=d&&e.mode===me.ChannelModes.VIDEO&&u===me.ChannelModes.VOICE&&(0,de.isFullScreen)(d,this.currentDocument)&&(0,de.exitFullScreen)(d,h.default.resized,this.currentDocument),e.filteredParticipants.length!==i.length&&(null==a||a()),e.layout!==s&&(this._timeout.stop(),this._timeout.start(350,(function(){return null==a?void 0:a()}))),e.participantsOpen!==o||s!==e.layout)&&(null===(t=this._contentRef.current)||void 0===t||t.triggerResize());e.inCall&&!l&&this.inPopout&&p.default.wait((function(){return n.handleClosePopout()}))},f.renderContent=function(e){var t=this.props,n=t.selectedParticipant,r=t.inCall,a=t.mode,o=t.popoutWindow,l=t.participantsOpen,u=t.participants,s=t.filteredParticipants,d=t.participantsVersion,f=t.channel,c=t.layout,p=c===me.ChannelLayouts.MINIMUM,v=p||c===me.ChannelLayouts.NORMAL,y=r&&a===me.ChannelModes.VIDEO;return this._lastIdleProps=e,i.createElement(F.default,Ie({renderHeader:this.renderHeader,renderBottomLeft:this.renderBottomLeft,renderBottomCenter:this.renderBottomCenter,renderBottomRight:this.renderBottomRight},e,{screenMessage:this.screenMessage,disableGradients:p,idle:!p&&e.idle}),!this.popoutOpen||this.inPopout?i.createElement(j.default,{ref:this._contentRef,inCall:r,paused:this.paused,channel:f,participants:u,filteredParticipants:s,participantsVersion:d,selectedParticipant:y?n:null,layout:c,idle:e.idle,mode:a,onSelectParticipant:this.handleSelectParticipant,onContextMenuParticipant:this.handleContextMenu,showParticipants:l&&!v,popoutWindow:this.inPopout?o:null}):null)},f.render=function(){var e,t=this,n=this.props,r=n.layout,a=n.channel,o=n.mode,u=n.appContext,s=this.state,d=s.maxHeight,f=s.resizedHeight,c=o===me.ChannelModes.VIDEO,p=be(S.default,{context:u});return i.createElement("div",{className:(0,l.default)(he.default.wrapper,Me[r],Ne[u],(e={},e[he.default.poppedOut]=this.popoutOpen&&!this.inPopout&&r!==me.ChannelLayouts.NO_CHAT&&a.isPrivate(),e[he.default.video]=c,e[(0,ue.getThemeClass)(me.ThemeTypes.DARK)]=c,e)),ref:this._wrapperRef,style:r===me.ChannelLayouts.NO_CHAT||null==f?void 0:{minHeight:200,maxHeight:d,height:f}},be("div",{className:he.default.callContainer},void 0,be(U.default,{timeout:2e3},void 0,(function(e){return t.viewProperties.usePositionLayer?be(re.AppLayerProvider,{},void 0,t.renderContent(e),p,Re):t.renderContent(e)}))),r!==me.ChannelLayouts.NO_CHAT&&be(Ae,{maxHeight:d,resizableNode:this._wrapperRef,onResize:this.handleCallResize}))},a=r,(o=[{key:"nativePopoutSupported",get:function(){return le.default.embedded&&se.default.supportsFeature(me.NativeFeatures.POPOUT_WINDOWS)}},{key:"popoutSupported",get:function(){return!le.default.embedded||this.nativePopoutSupported}},{key:"popoutOpen",get:function(){var e=this.props.popoutWindow;return null!=e&&!e.closed}},{key:"currentDocument",get:function(){var e=this.props.popoutWindow;return null!=e&&this.popoutOpen&&this.inPopout?e.document:document}},{key:"screenMessage",get:function(){return this.popoutOpen&&!this.inPopout?{mainText:_e.default.Messages.POPOUT_PLAYER_OPENED}:null}},{key:"paused",get:function(){return this.popoutOpen&&!this.inPopout}},{key:"inPopout",get:function(){return this.props.appContext===me.AppContext.POPOUT}},{key:"viewProperties",get:function(){var e=this.props,t=e.layout,n=e.mode,r=e.channel,a=e.inCall,o=n===me.ChannelModes.VIDEO&&a&&!(this.popoutOpen&&!this.inPopout),i=n===me.ChannelModes.VIDEO&&a&&!this.inPopout&&this.popoutSupported,l=n!==me.ChannelModes.VOICE&&r.isPrivate()&&!this.inPopout&&a,u=r.type===me.ChannelTypes.GUILD_VOICE,s=t===me.ChannelLayouts.MINIMUM||t===me.ChannelLayouts.NORMAL,d=this.inPopout&&this.nativePopoutSupported,f={renderHeader:!0,useTheme:!1,usePositionLayer:!1,useExternalHeader:s,canInvite:u,canPopout:i,canFullscreen:o,canSelectRegion:r.isPrivate(),canChangeLayout:l,canStayOnTop:d};if(!a)return Ie({},f,{canFullscreen:o,useTheme:!0});switch(t){case me.ChannelLayouts.FULL_SCREEN:return Ie({},f,{canPopout:!this.inPopout&&this.popoutOpen&&f.canPopout,usePositionLayer:!0});case me.ChannelLayouts.MINIMUM:return Ie({},f,{canPopout:!1});case me.ChannelLayouts.NO_CHAT:case me.ChannelLayouts.NORMAL:return Ie({},f)}}}])&&Te(a.prototype,o),d&&Te(a,d),r}(i.PureComponent);function De(e){var t,n=e.channel,r=e.appContext,a=e.onResize,o=e.renderExternalHeader,l=(0,d.useStateFromStores)([Q.default],(function(){return Q.default.getVoiceChannelId()===n.id})),u=(0,d.useStateFromStores)([Q.default],(function(){return Q.default.getMostRecentSelectedTextChannelId(n.getGuildId())})),s=(0,d.useStateFromStoresObject)([q.default],(function(){return{video:q.default.supports(f.Features.VIDEO),videoEnabled:q.default.isVideoEnabled()}})),c=s.video,p=s.videoEnabled,v=(0,d.useStateFromStoresObject)([ce.default],(function(){var e=r===me.AppContext.POPOUT,t=ce.default.getMode(n.id);e&&(t=me.ChannelModes.VIDEO);var a=l&&t===me.ChannelModes.VIDEO?ce.default.getLayout(n.id,r):me.ChannelLayouts.MINIMUM;return e&&a!==me.ChannelLayouts.FULL_SCREEN&&(a=me.ChannelLayouts.NO_CHAT),{mode:t,layout:a,selectedParticipant:t!==me.ChannelModes.VOICE?ce.default.getSelectedParticipant(n.id):null,participants:ce.default.getParticipants(n.id),filteredParticipants:ce.default.getFilteredParticipants(n.id),participantsOpen:ce.default.getParticipantsOpen(n.id),participantsVersion:ce.default.getParticipantsVersion(n.id)}}),[n.id,n.type,c,l]),y=v.participants,m=v.filteredParticipants,_=v.participantsVersion,h=v.mode,E=v.layout,S=v.participantsOpen,I=v.selectedParticipant,T=(0,d.useStateFromStoresObject)([z.default],(function(){return{allActiveStreams:z.default.getAllActiveStreams(),selectedStream:null!=I?z.default.getActiveStreamForStreamKey(I.id):null}}),[I]),C=T.allActiveStreams,b=T.selectedStream,M=(0,d.useStateFromStores)([$.default],(function(){return $.default.getCall(n.id)}),[n.id]),N=(0,d.useStateFromStores)([J.default],(function(){return J.default.getMentionCount(n.id)}),[n.id]),P=(0,d.useStateFromStores)([K.default],(function(){return K.default.getId()})),R=(0,d.useStateFromStoresObject)([A.default],(function(){return{popoutWindow:A.default.getWindow(me.PopoutWindowKeys.CHANNEL_CALL_POPOUT),popoutWindowAlwaysOnTop:A.default.getIsAlwaysOnTop(me.PopoutWindowKeys.CHANNEL_CALL_POPOUT)}})),L=R.popoutWindow,D=R.popoutWindowAlwaysOnTop,w=O.default.useExperiment({guildId:null!==(t=n.getGuildId())&&void 0!==t?t:""})[0].useNewInviteButton;return i.useEffect((function(){var e=!1,t=null;return function(){var n,r=(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!l||h!==me.ChannelModes.VIDEO){n.next=5;break}return n.next=3,se.default.blockDisplaySleep();case 3:t=n.sent,e&&null!=t&&se.default.unblockDisplaySleep(t);case 5:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,a){var o=n.apply(e,t);function i(e){Oe(o,r,a,i,l,"next",e)}function l(e){Oe(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return r.apply(this,arguments)}}()(),function(){null!=t?se.default.unblockDisplaySleep(t):e=!0}}),[l,h]),be(g.default,{page:me.AnalyticsPages.CHANNEL_CALL},void 0,be(Le,{channel:n,participantsOpen:S,renderExternalHeader:o,appContext:r,call:M,onResize:a,popoutWindow:L,popoutWindowAlwaysOnTop:D,videoEnabled:p,mentionCount:N,selectedStream:b,video:c,mode:h,inCall:l,participants:y,filteredParticipants:m,participantsVersion:_,layout:E,currentUserId:P,selectedParticipant:I,allActiveStreams:C,useNewInviteButton:w,mostRecentSelectedTextChannelId:u}))}Le.displayName="ChannelCall",De.displayName="ChannelCallConnected";var we=De;t.default=we},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=!u.default.embedded,t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getMode()})),n=function(e,n){return p(i.MenuRadioItem,{id:e,group:"input-modes",label:n,checked:t===e,action:function(){return o.default.setMode(e)}},e)};return[n(s.InputModes.VOICE_ACTIVITY,d.default.Messages.INPUT_MODE_VAD),n(s.InputModes.PUSH_TO_TALK,e?d.default.Messages.INPUT_MODE_PTT_LIMITED:d.default.Messages.INPUT_MODE_PTT)]};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(288)),i=n(8253),l=f(n(51)),u=f(n(16)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(288)),l=n(8253),u=c(n(8733)),s=c(n(51)),d=n(8425),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(){var e=(0,o.useStateFromStores)([s.default],(function(){return(0,d.amplitudeToPerceptual)(s.default.getInputVolume())}));return v(l.MenuControlItem,{id:"input",label:f.default.Messages.FORM_LABEL_INPUT_VOLUME,control:function(t,n){return a.createElement(u.default,y({},t,{ref:n,value:e,onChange:function(e){return i.default.setInputVolume((0,d.perceptualToAmplitude)(e))},"aria-label":f.default.Messages.FORM_LABEL_INPUT_VOLUME}))}})}m.displayName="useInputDeviceVolumeItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=p(n(288)),l=n(8253),u=p(n(8733)),s=p(n(51)),d=n(8425),f=p(n(16)),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(){var e=(0,o.useStateFromStores)([s.default],(function(){return(0,d.amplitudeToPerceptual)(s.default.getOutputVolume())}));return y(l.MenuControlItem,{id:"output",label:c.default.Messages.FORM_LABEL_OUTPUT_VOLUME,control:function(t,n){return a.createElement(u.default,m({},t,{ref:n,value:e,maxValue:f.default.embedded?200:100,onChange:function(e){return i.default.setOutputVolume((0,d.perceptualToAmplitude)(e))},"aria-label":c.default.Messages.FORM_LABEL_OUTPUT_VOLUME}))}})}_.displayName="useOutputDeviceVolumeItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=s(n(0)),a=l(n(9147)),o=s(n(8288)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.channel,n=e.centerButton,l=void 0!==n&&n,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channel","centerButton"]),s=l?o.CenterControlButton:o.default,f=t.isManaged()||!t.isPrivate()?i.default.Messages.CONNECT:i.default.Messages.JOIN_CALL;return r.createElement(s,d({},u,{iconComponent:a.default,label:f}))}f.displayName="JoinCallButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=c(n(0)),o=d(n(10373)),i=d(n(407)),l=d(n(1261)),u=c(n(8288)),s=d(n(7968));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.className;return v(l.default,{foreground:s.default.slash,className:t})}function m(e){var t=e.selfMute,n=e.serverMute,r=e.suppress,l=e.centerButton,s=void 0!==l&&l,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["selfMute","serverMute","suppress","centerButton"]),f=t||n||r,c=s?u.CenterControlButton:u.default,v=(0,o.default)(t,n,r),m=f?y:i.default;return a.createElement(c,p({iconComponent:m,label:v},d))}y.displayName="MuteWithForeground",m.displayName="MuteButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(n)return a.default.Messages.SUPPRESSED;if(t)return a.default.Messages.SERVER_MUTED_DIALOG_TITLE;return e?a.default.Messages.UNMUTE:a.default.Messages.MUTE};var r,a=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(55)),l=s(n(9658)),u=s(n(7971));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.disableGradients,n=void 0!==t&&t,r=e.renderHeader,a=e.renderBottomLeft,o=e.renderBottomCenter,l=e.renderBottomRight,s=e.renderCenter;return c("div",{className:u.default.videoControls},void 0,!n&&c("div",{className:u.default.gradientTop}),!n&&c("div",{className:u.default.gradientBottom}),c("div",{className:u.default.topControls},void 0,null==r?void 0:r()),null==s?void 0:s(),c("div",{className:u.default.bottomControls},void 0,c(i.default,{grow:0,shrink:1,basis:"50%",align:i.default.Align.CENTER},void 0,null==a?void 0:a()),c(i.default,{grow:1,justify:i.default.Justify.CENTER,align:i.default.Align.CENTER},void 0,null==o?void 0:o()),c(i.default,{grow:0,shrink:1,justify:i.default.Justify.END,basis:"50%",align:i.default.Align.CENTER},void 0,null==l?void 0:l())))}function v(e){var t,n=e.screenMessage,r=e.onDoubleClick,i=e.onActive,s=e.onForceIdle,d=e.idle,v=e.children,y=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["screenMessage","onDoubleClick","onActive","onForceIdle","idle","children"]);return c("div",{className:(0,o.default)(u.default.root,(t={},t[u.default.idle]=d,t)),onMouseMove:i,onMouseDown:i,onMouseLeave:s,onDoubleClick:r},void 0,v,null!=n?a.createElement(l.default,f({size:"large"},n)):null,a.createElement(p,y))}p.displayName="Controls",v.displayName="FullsizePlayer"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var r,a=L(n(0)),o=P(n(9)),i=n(3),l=P(n(28)),u=P(n(2)),s=P(n(8479)),d=L(n(1293)),f=P(n(5952)),c=n(42),p=P(n(10374)),v=P(n(9142)),y=P(n(36)),m=n(41),_=P(n(16)),h=n(259),E=P(n(43)),g=L(n(1425)),S=P(n(10992)),O=P(n(10995)),I=P(n(10997)),T=P(n(11008)),C=P(n(11015)),b=P(n(11018)),M=n(1),N=P(n(6)),A=P(n(7996));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(){return(D=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}).apply(this,arguments)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e){var t=e.channel,n=e.toggleRequestToSpeakSidebar,r=e.showRequestToSpeakSidebar,o=a.useContext(s.default),l=(0,i.useStateFromStores)([f.default],(function(){return f.default.getWindow(M.PopoutWindowKeys.CHANNEL_CALL_POPOUT)})),m=(0,i.useStateFromStoresObject)([y.default],(function(){return{mostRecentSelectedTextChannelId:y.default.getMostRecentSelectedTextChannelId(t.getGuildId()),isConnected:y.default.getVoiceChannelId()===t.id}})),h=m.mostRecentSelectedTextChannelId,S=m.isConnected,C=!_.default.embedded||_.default.embedded&&E.default.supportsFeature(M.NativeFeatures.POPOUT_WINDOWS),A=null!=l&&!l.closed,P=A&&o!==M.AppContext.POPOUT,R=(0,g.default)().isOnStartStageScreen;(0,g.useUpdateIsOnStartStageScreenEffect)(t),a.useEffect((function(){!S&&A&&D()}),[A,S]);var L,D=function(){u.default.wait((function(){return d.close(M.PopoutWindowKeys.CHANNEL_CALL_POPOUT)}))};L=R?w(b.default,{channel:t,onContinueClick:function(){return(0,g.setIsOnStartStageScreen)(!1)}}):w(I.default,{channel:t});var j=w(T.default,{channel:t,toggleRequestToSpeakSidebar:n,showRequestToSpeakSidebar:r,isOnStartStageScreen:R}),k=w(v.default,{popoutOpen:A,onOpenPopout:function(){var e=t.getGuildId();null!=e&&null!=h&&(0,c.transitionToGuild)(e,h),d.openChannelCallPopout(t)},onClosePopout:D}),U=w(O.default,{channel:t});return w(p.default,{renderBottomCenter:function(){return j},renderBottomRight:function(){return C?k:null},renderHeader:function(){return U},onActive:function(){},onPreventIdle:function(){},onAllowIdle:function(){},onForceIdle:function(){},screenMessage:P?{mainText:N.default.Messages.POPOUT_PLAYER_OPENED}:null,idle:!1},void 0,!P&&L)}function k(e){var t,n=e.channel,r=e.appContext,i=void 0===r?M.AppContext.APP:r,u=a.useState(!1),d=u[0],f=u[1],c=a.useCallback((function(){f(!d)}),[d]);return a.useEffect((function(){null==l.default.get("HasBeenInStageChannel")&&((0,m.openModal)((function(e){return a.createElement(C.default,D({},e,{channelId:n.id}))})),l.default.set("HasBeenInStageChannel",Date.now()))}),[]),w("div",{className:A.default.container},void 0,w("div",{className:(0,o.default)(A.default.callContainer,(0,h.getThemeClass)(M.ThemeTypes.DARK),(t={},t[A.default.sidebarVisible]=d,t))},void 0,w(s.default.Provider,{value:i},void 0,w(j,{channel:n,toggleRequestToSpeakSidebar:c,showRequestToSpeakSidebar:d}))),d?w(S.default,{channel:n,toggleRequestToSpeakSidebar:c}):null)}j.displayName="StageChannelCallContent",k.displayName="StageChannelCall"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{clipPath:"url(#clip0)"},void 0,s("path",{d:"M18.8648 1.13516L21.0013 3.27074H16V4.72926H21.0013L18.8648 6.86484L20 8L24 4L20 0L18.8648 1.13516Z",fill:d}),s("path",{d:"M12 2C12.4342 2 12.8466 2.0917 13.2188 2.25683C13.0759 2.81411 13 3.39819 13 4C13 5.90397 13.7601 7.6304 14.9935 8.89235L14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2Z",fill:d}),s("path",{d:"M12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:d})),s("defs",{},void 0,s("clipPath",{id:"clip0"},void 0,s("rect",{width:"24",height:"24",fill:d}))))}d.displayName="MoveToSpeaker"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(8479)),i=p(n(8455)),l=n(41),u=n(217),s=p(n(9161)),d=p(n(9162)),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}var _=y(i.default,{height:20,width:20});function h(e){var t=e.className,n=e.channel,r=a.useContext(o.default);return y(d.default,{className:t,icon:_,color:f.Colors.BRAND_NEW,title:c.default.Messages.SCHEDULE_EVENT,description:c.default.Messages.SCHEDULE_EVENT_DESCRIPTION,onClick:function(){(0,l.openModal)((function(e){return a.createElement(s.default,m({channel:n},e))}),{},r===f.AppContext.POPOUT?u.POPOUT_MODAL_CONTEXT:u.DEFAULT_MODAL_CONTEXT)}})}h.displayName="ScheduleStageEventPrompt"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(92),i=f(n(8479)),l=n(748),u=f(n(291)),s=f(n(9162)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=p(u.default,{height:20,width:20});function y(e){var t=e.className,n=e.channel,r=a.useContext(i.default);return p(s.default,{className:t,icon:v,color:o.Colors.STATUS_GREEN_600,title:d.default.Messages.STAGE_CHANNEL_START_TITLE,description:d.default.Messages.STAGE_CHANNEL_START_SUBTITLE,onClick:function(){(0,l.openStageChannelSettings)(n,r)}})}y.displayName="StartStageChannelEventPrompt"},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(3)),a=d(n(28)),o=d(n(2)),i=d(n(11)),l=d(n(10)),u=d(n(479)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=232,p=315,v=new Set,y=[],m=new Map,_=new Set,h=0,E=0,g=!1;function S(e){return null!=e&&(null!=m.get(e)&&(m.delete(e),void(_=new Set(_)).delete(e)))}function O(e){var t=e.channelId,n=e.ringing.includes(i.default.getId());if(!_.has(t)&&n){var r=l.default.getChannel(t);if(null==r)return!1;var a=10*_.size;m.set(t,{channel:r,x:h+a,y:E+a}),(_=new Set(_)).add(t)}else{if(!_.has(t)||n)return!1;S(t)}}function I(){g=u.default.getStatus()===s.StatusTypes.DND}!function(){var e=a.default.get("IncomingCallStore");if(e)h=+e.x,E=+e.y;else{var t=n(161).default.windowSize();h=t.width/2-c/2,E=t.height/2-p/2}}();var T=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(l.default,u.default),this.syncWith([u.default],I)},a.getIncomingCalls=function(){return g?y:Array.from(m.values())},a.getIncomingCallChannelIds=function(){return g?v:_},a.getFirstIncomingCallId=function(){return g?null:_.values().next().value},a.hasIncomingCalls=function(){return!g&&_.size>0},r}(r.default.Store))(o.default,{CALL_CREATE:O,CALL_UPDATE:O,CALL_DELETE:function(e){return S(e.channelId)},VOICE_CHANNEL_SELECT:function(e){return S(e.channelId)},INCOMING_CALL_MOVE:function(e){var t=e.x,n=e.y;return h=t,E=n,a.default.set("IncomingCallStore",{x:h,y:E}),!1},CHANNEL_DELETE:function(e){return S(e.channel.id)}});t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentStep=function(e){if(null==e)return null;return y.map((function(e){return e.step})).filter((function(t){return!e.has(t)}))[0]},t.AFTER_COMPLETION_STEP_DATA=t.STEP_DATA=t.TOTAL_STEPS=void 0;var r=v(n(8254)),a=v(n(5954)),o=v(n(8577)),i=v(n(8276)),l=n(8769),u=v(n(11110)),s=v(n(11111)),d=v(n(11112)),f=v(n(11113)),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}t.TOTAL_STEPS=4;var y=[{step:l.Steps.AVATAR,Component:d.default,title:function(){return p.default.Messages.AVATAR_STEP_TITLE},subtitle:function(){return p.default.Messages.AVATAR_STEP_TITLE}},{step:l.Steps.CHANNEL,Component:u.default,title:function(){return p.default.Messages.CHANNEL_STEP_TITLE},subtitle:function(){return p.default.Messages.CHANNEL_STEP_SUBTITLE}},{step:l.Steps.MESSAGE,Component:s.default,title:function(){return p.default.Messages.MESSAGE_STEP_TITLE},subtitle:function(){return p.default.Messages.MESSAGE_STEP_SUBTITLE}},{step:l.Steps.INVITE,Component:f.default,title:function(){return p.default.Messages.INVITE_STEP_TITLE},subtitle:function(){return p.default.Messages.INVITE_STEP_SUBTITLE}}];t.STEP_DATA=y;var m=[{title:function(){return p.default.Messages.UPLOAD_EMOJI_TITLE},subtitle:function(){return p.default.Messages.UPLOAD_EMOJI_SUBTITLE},Icon:a.default,onClick:function(e){return r.default.open(e,c.GuildSettingsSections.EMOJI)}},{title:function(){return p.default.Messages.VOICE_CHANNEL_TITLE},subtitle:function(){return p.default.Messages.VOICE_CHANNEL_SUBTITLE},Icon:i.default,onClick:function(e){}},{title:function(){return p.default.Messages.ADD_ROLE_TITLE},subtitle:function(){return p.default.Messages.ADD_ROLE_SUBTITLE},Icon:o.default,onClick:function(e){return r.default.open(e,c.GuildSettingsSections.ROLES)}}];t.AFTER_COMPLETION_STEP_DATA=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;var r,a=S(n(0)),o=n(95),i=E(n(8791)),l=n(703),u=n(85),s=n(35),d=n(259),f=S(n(9022)),c=n(9190),p=E(n(11121)),v=E(n(11123)),y=E(n(11124)),m=E(n(11125)),_=n(1),h=E(n(8019));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){I(o,r,a,i,l,"next",e)}function l(e){I(o,r,a,i,l,"throw",e)}i(void 0)}))}}function C(e){var t=e.directoryChannelId,n=e.transitionState,r=e.initialSlide,E=void 0===r?c.CreateOrAddGuildSlideTypes.CHOOSE_GUILD:r,g=e.onClose,S=e.directoryGuildName,I=e.directoryGuildId,C=(0,u.useUID)(),b=a.useState(E),M=b[0],N=b[1],A=a.useState(null),P=A[0],R=A[1],L=a.useState(null),D=L[0],w=L[1],j=a.useState(null),k=j[0],U=j[1],G=a.useState(null),F=G[0],B=G[1],H=a.useState(""),x=H[0],V=H[1];a.useEffect((function(){N(E)}),[N,E]);var W=function(){var e=T(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.addDirectoryGuildEntry(t,n.id,x);case 2:B(n),U(null),N(c.CreateOrAddGuildSlideTypes.CONFIRMATION);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=T(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.addDirectoryGuildEntry(t,n,x);case 2:N(c.CreateOrAddGuildSlideTypes.CONFIRMATION);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),z={impression_group:o.ImpressionGroups.DIRECTORY_GUILD_ADD_FLOW};return O("div",{className:(0,d.getThemeClass)(_.ThemeTypes.LIGHT)},void 0,O(s.ModalRoot,{transitionState:n,"aria-labelledby":C,disableTrack:!0},void 0,O("div",{className:h.default.container},void 0,O(l.Slides,{activeSlide:M,width:440,onSlideReady:function(e){return R(e)}},void 0,O(l.Slide,{id:c.CreateOrAddGuildSlideTypes.CHOOSE_GUILD,impressionName:o.ImpressionNames.HUB_EXISTING_GUILD_CHOOSE,impressionMetadata:z},void 0,O(p.default,{directoryChannelId:t,directoryGuildName:S,directoryGuildId:I,onGuildChosen:function(e){N(c.CreateOrAddGuildSlideTypes.CUSTOMIZE_EXISTING_GUILD),U(e),B(null)},onClose:g,setSlide:N})),O(l.Slide,{id:c.CreateOrAddGuildSlideTypes.CUSTOMIZE_EXISTING_GUILD,impressionName:o.ImpressionNames.HUB_EXISTING_GUILD_CUSTOMIZE,impressionMetadata:z},void 0,O(v.default,{guild:k,description:x,onDescriptionChange:V,onSubmit:Y,onBack:function(){return N(c.CreateOrAddGuildSlideTypes.CHOOSE_GUILD)},onClose:g})),O(l.Slide,{id:c.CreateOrAddGuildSlideTypes.GUILD_TEMPLATES,impressionName:o.ImpressionNames.HUB_CREATE_GUILD_TEMPLATE,impressionMetadata:z},void 0,O(m.default,{directoryGuildName:S,onChooseTemplate:function(e){N(c.CreateOrAddGuildSlideTypes.CUSTOMIZE_NEW_GUILD),w(e)},onClose:g,onBack:function(){return N(c.CreateOrAddGuildSlideTypes.CHOOSE_GUILD)}})),O(l.Slide,{id:c.CreateOrAddGuildSlideTypes.CUSTOMIZE_NEW_GUILD,impressionName:o.ImpressionNames.HUB_CREATE_GUILD_CUSTOMIZE,impressionMetadata:z},void 0,O(i.default,{guildTemplate:D,onHubGuildCreated:W,onClose:g,onBack:function(){return N(c.CreateOrAddGuildSlideTypes.GUILD_TEMPLATES)},isSlideReady:P===c.CreateOrAddGuildSlideTypes.CUSTOMIZE_NEW_GUILD,isHubCreationFlow:!0,description:x,onDescriptionChange:V})),O(l.Slide,{id:c.CreateOrAddGuildSlideTypes.CONFIRMATION,impressionName:o.ImpressionNames.DIRECTORY_ADD_GUILD_CONFIRMATION,impressionMetadata:z},void 0,O(y.default,{directoryGuildName:S,existingGuild:k,newGuild:F,onClose:g}))))))}C.displayName="CreateOrAddGuildModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(9953);n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s={},d={};var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.getSearchState=function(e){var t;return null!==(t=s[e])&&void 0!==t?t:{mostRecentQuery:"",fetching:!1}},a.getSearchResults=function(e,t){var n,r,a;return null!==(n=null===(r=d[e])||void 0===r||null===(a=r[t])||void 0===a?void 0:a.results)&&void 0!==n?n:[]},a.shouldFetch=function(e,t){var n,r,a=null===(n=d[e])||void 0===n||null===(r=n[t])||void 0===r?void 0:r.lastSearchedAt;return null==a||Date.now()-a>12e4},r}(r.default.Store))(a.default,{GUILD_DIRECTORY_SEARCH_START:function(e){var t=e.channelId,n=e.query;s[t]={fetching:!0,mostRecentQuery:n}},GUILD_DIRECTORY_SEARCH_SUCCESS:function(e){var t,n=e.channelId,r=e.query,a=e.results;s[n]=u({},s[n],{fetching:!1});var i=[];a.forEach((function(e){var t=(0,o.guildDirectoryEntryFromServer)(e);i.push(t)})),d[n]=u({},d[n],((t={})[r]={results:(0,o.orderGuildEntries)(i),lastSearchedAt:Date.now()},t))},GUILD_DIRECTORY_SEARCH_FAILURE:function(e){var t=e.channelId;s[t]=u({},s[t],{fetching:!1})},GUILD_DIRECTORY_SEARCH_CLEAR:function(e){var t=e.channelId;s[t]={fetching:!1,mostRecentQuery:""}},GUILD_DIRECTORY_CACHED_SEARCH:function(e){var t=e.channelId,n=e.query;s[t]={fetching:!1,mostRecentQuery:n}}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(2)),o=n(9953);n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s=!1,d={};var f=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.isFetching=function(){return s},a.getDirectoryEntries=function(e){return d[e]},a.getDirectoryEntry=function(e,t){var n;return null===(n=d[e])||void 0===n?void 0:n[t]},r}(r.default.Store))(a.default,{GUILD_DIRECTORY_FETCH_START:function(e){s=!0},GUILD_DIRECTORY_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.entries;s=!1;var r={};n.forEach((function(e){var t=(0,o.guildDirectoryEntryFromServer)(e);r[t.guildId]=t})),d[t]=r},GUILD_DIRECTORY_FETCH_FAILURE:function(e){s=!1},GUILD_DIRECTORY_ENTRY_CREATE:function(e){var t,n,r=e.channelId,a=e.entry,i=(0,o.guildDirectoryEntryFromServer)(a);null!=i&&null==(null===(t=d[r])||void 0===t?void 0:t[i.guildId])&&(d[r]=u({},d[r],((n={})[i.guildId]=i,n)))},GUILD_DIRECTORY_ENTRY_DELETE:function(e){var t=e.channelId,n=e.guildId,r=Object.assign({},d[t]);delete r[n],d[t]=r},GUILD_DIRECTORY_ENTRY_UPDATE:function(e){var t,n,r=e.channelId,a=e.entry,i=(0,o.guildDirectoryEntryFromServer)(a);d[r]=u({},d[r],((n={})[i.guildId]=u({},null===(t=d[r])||void 0===t?void 0:t[i.guildId],{description:i.description}),n))}});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(3)),a=c(n(28)),o=c(n(2)),i=c(n(106)),l=c(n(684)),u=c(n(15)),s=c(n(40)),d=n(8474),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=new Set;var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var o=r.prototype;return o.initialize=function(){this.waitFor(s.default,u.default,l.default),this.syncWith([s.default,u.default,l.default],f.NOOP),v=new Set(a.default.get("publicUpsellChannelNoticeGuilds"))||new Set},o.isVisible=function(e){if(null!=e){var t=l.default.getMemberCount(e.id);return!v.has(e.id)&&null!=t&&t>=d.COMMUNITY_UPSELL_MINIMUM_GUILD_SIZE&&s.default.can(f.Permissions.ADMINISTRATOR,e)&&!e.hasFeature(f.GuildFeatures.COMMUNITY)}},r}(r.default.Store))(o.default,{PUBLIC_UPSELL_NOTICE_DISMISS:function(e){var t=e.guildId;if(!v.has(t))return v.add(t),a.default.set("publicUpsellChannelNoticeGuilds",v),i.default.trackWithMetadata(f.AnalyticEvents.CHANNEL_NOTICE_CLOSED,{notice_type:f.ChannelNoticeTypes.PUBLIC_UPSELL}),!0}});t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(3)),a=f(n(28)),o=f(n(2)),i=f(n(106)),l=f(n(684)),u=f(n(15)),s=f(n(40)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={MAX_MEMBER_COUNT_100:new Set,MAX_MEMBER_COUNT_250:new Set};var v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=r.prototype;return o.initialize=function(){this.waitFor(s.default,u.default,l.default),this.syncWith([s.default,u.default,l.default],d.NOOP),p[d.ChannelNoticeTypes.MAX_MEMBER_COUNT_100]=new Set(a.default.get(d.ChannelNoticeTypes.MAX_MEMBER_COUNT_100))||new Set,p[d.ChannelNoticeTypes.MAX_MEMBER_COUNT_250]=new Set(a.default.get(d.ChannelNoticeTypes.MAX_MEMBER_COUNT_250))||new Set},o.isVisible=function(e){var t=this.getNoticeType(e);if(null==e||null==t)return!1;var n=l.default.getMemberCount(e.id)||0,r=s.default.can(d.Permissions.ADMINISTRATOR,e);return!p[t].has(e.id)&&r&&e.maxMembers>0&&e.maxMembers-n<=1e4},o.getNoticeType=function(e){return null==e?null:e.maxMembers<=1e5?d.ChannelNoticeTypes.MAX_MEMBER_COUNT_100:d.ChannelNoticeTypes.MAX_MEMBER_COUNT_250},r}(r.default.Store))(o.default,{MAX_MEMBER_COUNT_NOTICE_DISMISS:function(e){var t=e.guildId,n=e.noticeType;if(!p[n].has(t))return p[n].add(t),a.default.set(n,p[n]),i.default.trackWithMetadata(d.AnalyticEvents.CHANNEL_NOTICE_CLOSED,{notice_type:n}),!0}});t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=n(5935),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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}).apply(this,arguments)}var d={};d={lastDismissedGracePeriods:{},isVisible:{}};var f=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var a=r.prototype;return a.initialize=function(e){null!=e&&(d=e)},a.getLastDismissedGracePeriodForGuild=function(e){return null!=d.lastDismissedGracePeriods[e]?d.lastDismissedGracePeriods[e]:null},a.isVisible=function(e){return null!=e&&(null!=d.isVisible[e]&&d.isVisible[e])},a.getState=function(){return d},r}(r.default.PersistedStore);f.persistKey="PremiumGuildGracePeriodNoticeStore",f.migrations=[function(e){return s({},e,{lastDismissedGracePeriods:null!=e?s({},e.lastDismissedGracePeriods):{},isVisible:{}})}];var c=new f(a.default,{GUILD_PREMIUM_SUBSCRIPTIONS_FETCH_SUCCESS:function(e){var t,n=e.guildId,r=e.subscriptions,a=null!=d.lastDismissedGracePeriods[n]?d.lastDismissedGracePeriods[n]:null,l=null!=a&&Date.now()-a<=i.GRACE_PERIOD_CHANNEL_NOTICE_SHOW_DELAY,u=null!=r&&!l&&(0,o.isInGracePeriod)(r);d=s({},d,{isVisible:s({},d.isVisible,(t={},t[n]=u,t))})},PREMIUM_GUILD_GRACE_PERIOD_NOTICE_DISMISS:function(e){var t,n,r=e.guildId;d=s({},d,{lastDismissedGracePeriods:s({},d.lastDismissedGracePeriods,(t={},t[r]=Date.now(),t)),isVisible:s({},d.isVisible,(n={},n[r]=!1,n))})}});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.JoinableStageChannelEventNotice=void 0;S(n(0));var r,a=n(3),o=n(42),i=E(n(29)),l=E(n(1240)),u=E(n(291)),s=E(n(24)),d=S(n(8393)),f=n(1232),c=E(n(302)),p=n(260),v=n(734),y=E(n(81)),m=E(n(11133)),_=E(n(6)),h=E(n(8021));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t=e.guild,n=e.channel,r=e.children,o=t.id,i=(0,a.useStateFromStoresObject)([c.default],(function(){var e=c.default.getMutableParticipants(n.id,p.StageChannelParticipantNamedIndex.SPEAKER),t=c.default.getMutableParticipants(n.id,p.StageChannelParticipantNamedIndex.AUDIENCE);return{users:e.map((function(e){return e.user})),listenerCount:t.length}}),[n.id]),f=i.users,m=i.listenerCount,E=f.slice(0,3),g=_.default.Messages.LISTENING_COUNT.format({count:m||"0"}),S=(0,a.useStateFromStores)([y.default],(function(){return y.default.getStageInstanceByChannel(n.id)}),[n.id]);return null==n||null==o||null==S?null:O("div",{className:h.default.channelNotice},void 0,O("div",{className:h.default.textBlock},void 0,O("div",{className:h.default.liveIndicator}),O(s.default,{color:s.default.Colors.STATUS_GREEN,size:s.default.Sizes.SIZE_12,className:h.default.liveNowText},void 0,_.default.Messages.STAGE_CHANNEL_LIVE_NOW)),O(s.default,{color:s.default.Colors.HEADER_PRIMARY,size:s.default.Sizes.SIZE_16,className:h.default.eventName},void 0,S.topic),O("div",{className:h.default.textBlock},void 0,O(u.default,{width:16,height:16,className:h.default.stageIcon}),O(s.default,{color:s.default.Colors.HEADER_SECONDARY,size:s.default.Sizes.SIZE_12,className:h.default.channelName},void 0,n.name),O(s.default,{className:h.default.dotDivider,color:s.default.Colors.HEADER_SECONDARY,size:s.default.Sizes.SIZE_12},void 0,"•"),O(l.default,{width:14,height:14,className:h.default.stageIcon}),O(s.default,{color:s.default.Colors.HEADER_SECONDARY,size:s.default.Sizes.SIZE_12},void 0,g)),f.length>0?O("div",{className:h.default.textBlock},void 0,O(d.default,{guildId:o,users:E,showUserPopout:!0,size:d.Sizes.SIZE_16}),O(s.default,{color:s.default.Colors.HEADER_SECONDARY,size:s.default.Sizes.SIZE_12,className:h.default.userNames},void 0,(0,v.summarizeUsernamesParticipating)(o,f,n.id))):null,r)};I.displayName="StageChannelEventNotice";var T=function(e){var t=e.guild,n=e.channel,r=(0,m.default)(n.id);return O(I,{guild:t,channel:n},void 0,O(i.default,{fullWidth:!0,className:h.default.joinButton,onClick:function(){(0,f.connectAndOpen)(n),(0,o.transitionToGuild)(t.id,n.id)},color:i.default.Colors.GREEN,size:i.default.Sizes.SMALL,disabled:null!=r},void 0,_.default.Messages.STAGE_CHANNEL_JOIN_BUTTON))};t.JoinableStageChannelEventNotice=T,T.displayName="JoinableStageChannelEventNotice";var C=I;t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(9)),o=s(n(29)),i=n(281),l=s(n(6)),u=s(n(8022));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.sku,n=e.handlePurchase,r=e.className,s=null!=t&&null!=t.price?(0,i.formatPrice)(t.price.amount,t.price.currency):null;return f(o.default,{className:(0,a.default)(r,u.default.purchaseButton),innerClassName:u.default.purchaseButtonContent,onClick:n},void 0,l.default.Messages.STAGE_INSTANCE_TICKET_BUY_LABEL,f("div",{className:u.default.buyButtonDotSeparator}),s)};c.displayName="PurchaseTicketButton";var p=c;t.default=p},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=A(n(23)),i=n(3),l=n(275),u=n(1423),s=n(207),d=A(n(8492)),f=A(n(15)),c=A(n(29)),p=A(n(1164)),v=n(703),y=n(85),m=n(131),_=A(n(686)),h=(A(n(5950)),n(35)),E=A(n(24)),g=A(n(8493)),S=n(8423),O=A(n(10429)),I=A(n(11233)),T=A(n(11234)),C=A(n(11235)),b=n(1),M=A(n(6)),N=A(n(7359));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var w;!function(e){e.SELECT_SERVER="SELECT_SERVER",e.SELECT_PRIVACY="SELECT_PRIVACY",e.TICKET_DETAILS="TICKET_DETAILS"}(w||(w={}));w.SELECT_SERVER,w.SELECT_PRIVACY,w.TICKET_DETAILS;var j=function(e){var t=e.transitionState,n=e.onClose,r=e.guildId,A=d.default.useExperiment({guildId:r})[0].enabled,P=(0,y.useUID)(),j=a.useState(w.TICKET_DETAILS),k=j[0],U=j[1],G=(0,i.useStateFromStores)([f.default],(function(){return f.default.getGuild(r)}),[r]),F=a.useState(A),B=F[0],H=F[1],x=a.useState(s.StageInstancePrivacyLevel.GUILD_ONLY),V=x[0],W=x[1],Y=a.useState({}),z=Y[0],K=Y[1],$=a.useState(!0),Z=$[0],q=$[1],X=a.useState({startDate:(0,u.getInitialEventStartDate)()}),J=X[0],Q=X[1],ee=a.useState({color:b.DEFAULT_ROLE_COLOR}),te=ee[0],ne=ee[1],re=a.useState(!1),ae=re[0],oe=re[1],ie=a.useState(),le=ie[0],ue=ie[1],se=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return oe(!0),ue(void 0),e.prev=2,(0,o.default)(null!=G,"Guild not selected"),(0,o.default)(null!=z.title,"Title required"),(0,o.default)(null!=J.startDate,"Start date required"),r={name:z.title,description:z.description,image:z.imageData,privacyLevel:s.StageInstancePrivacyLevel.GUILD_ONLY,scheduledStartTime:J.startDate.toISOString(),scheduledEndTime:null===(t=J.endDate)||void 0===t?void 0:t.toISOString(),entityType:S.GuildScheduledEventEntityTypes.STAGE_INSTANCE},B&&((0,o.default)(null!=te.priceTier,"Must select a price for a ticketed event"),r.tickets=[{priceTier:te.priceTier,color:te.color}]),e.next=10,g.default.createGuildEvent(G.id,r);case 10:n(),e.next=19;break;case 13:e.prev=13,e.t0=e.catch(2),a=new l.APIError(e.t0),console.error(e.t0),ue(a.getAnyErrorMessage()),oe(!1);case 19:case"end":return e.stop()}}),e,null,[[2,13]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){L(o,r,a,i,l,"next",e)}function l(e){L(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),de=a.createElement(a.Fragment,null,D(h.ModalHeader,{separator:!1,className:N.default.modalHeader},void 0,D(E.default,{size:E.default.Sizes.SIZE_16,className:N.default.modalHeaderText},void 0,M.default.Messages.CREATE_STAGE_EVENT_MODAL_TITLE),D(h.ModalCloseButton,{className:N.default.closeButton,onClick:function(){return n()}})),D(m.FormDivider,{className:N.default.divider}),null!=le&&D("div",{className:N.default.formErrorContainer},void 0,D(p.default,{icon:function(e){return a.createElement(_.default,R({height:20,width:20},e))},className:N.default.formError,iconClassName:N.default.formErrorIcon},void 0,le))),fe=D(c.default,{onClick:function(){U(w.TICKET_DETAILS)}},void 0,"Continue");return D(h.ModalRoot,{className:N.default.modal,transitionState:t,"aria-labelledby":P},void 0,de,D(v.Slides,{activeSlide:k,width:440},void 0,D(v.Slide,{id:w.SELECT_SERVER},void 0,D(I.default,{onSelectGuild:function(e){U(w.SELECT_PRIVACY)}})),D(v.Slide,{id:w.SELECT_PRIVACY},void 0,D(T.default,{value:V,onSelect:W})),D(v.Slide,{id:w.TICKET_DETAILS},void 0,D(C.default,{guildEvent:z,onGuildEventChange:K,hasEvent:Z,onHasEventChange:q,schedule:J,onScheduleChange:Q,hasTicket:B,onHasTicketChange:H,ticket:te,onTicketChange:ne,maxTitleChars:50,maxDescriptionChars:120}))),function(){switch(k){case w.SELECT_PRIVACY:return D(h.ModalFooter,{className:N.default.modalFooter},void 0,fe,D(O.default,{onClick:function(){return U(w.SELECT_SERVER)}}));case w.TICKET_DETAILS:return D(h.ModalFooter,{className:N.default.modalFooter},void 0,D(c.default,{color:Z?void 0:c.default.Colors.GREEN,onClick:se,submitting:ae,disabled:!!(null==(null==z?void 0:z.title)||0===z.title.length||z.title.length>50||null!=z.description&&z.description.length>120)},void 0,M.default.Messages.CREATE_EVENT_SUBMIT_LABEL));default:return null}}())};j.displayName="Modal";var k=j;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(29)),o=l(n(5971)),i=l(n(7359));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("span",{},void 0,"Back"),f=function(e){var t=e.onClick;return s(a.default,{look:a.default.Looks.BLANK,size:a.default.Sizes.MIN,color:a.default.Colors.WHITE,onClick:t},void 0,s("div",{className:i.default.linkButtonContent},void 0,s(o.default,{width:12,height:12,className:i.default.linkButtonIcon}),d))};f.displayName="BackButton";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormRowRadio=t.FormRowButton=t.FormDescription=t.FormLabel=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(61)),l=f(n(750)),u=f(n(751)),s=f(n(5950)),d=f(n(8030));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t,n=e.children,r=e.inactive;return v("label",{className:(0,o.default)((t={},t[d.default.label]=!0,t[d.default.labelInactive]=r,t))},void 0,n)};t.FormLabel=y,y.displayName="FormLabel";var m=function(e){var t=e.children;return v("div",{className:d.default.description},void 0,t)};t.FormDescription=m,m.displayName="FormDescription";var _=function(e){var t=e.leadingComponent,n=e.label,r=e.labelInactive,a=e.description,o=e.onClick,l=e.children;return v(i.default,{className:d.default.container,onClick:o},void 0,t,v("div",{className:d.default.content},void 0,v("div",{className:d.default.labelContainer},void 0,v(y,{inactive:r},void 0,n),a&&v(m,{},void 0,a)),l))};_.displayName="FormRow";var h=function(e){return a.createElement(_,e,v(s.default,{width:12,height:12,className:d.default.icon}))};t.FormRowButton=h,h.displayName="FormRowButton";var E=function(e){var t=e.selected,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["selected"]);return a.createElement(_,p({},n,{labelInactive:!t}),t?v(u.default,{width:20,height:20,foreground:d.default.radioIconSelectedForeground,className:d.default.icon}):v(l.default,{width:20,height:20,className:d.default.icon}))};t.FormRowRadio=E,E.displayName="FormRowRadio",_.Label=y,_.Description=m;var g=_;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(377),i=n(287),l=n(1249),u=n(692),s=n(1173),d=N(n(5696)),f=n(5677),c=n(42),p=N(n(693)),v=N(n(55)),y=N(n(151)),m=n(85),_=n(35),h=N(n(13)),E=n(295),g=N(n(10429)),S=n(11242),O=N(n(11243)),I=N(n(11245)),T=N(n(11248)),C=N(n(11250)),b=n(1),M=N(n(8042));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var L=[u.Step.REVIEW,u.Step.CONFIRM],D=[].concat(f.SHARED_ADD_PAYMENT_STEPS,[u.Step.REVIEW,u.Step.CONFIRM]),w=[].concat(f.SHARED_CREDIT_CARD_STEPS,[u.Step.REVIEW,u.Step.CONFIRM]),j=[].concat(f.SHARED_PAYPAL_STEPS,[u.Step.REVIEW,u.Step.CONFIRM]),k=[].concat(f.SHARED_PAYMENT_REQUEST_STEPS,[u.Step.REVIEW,u.Step.CONFIRM]),U=function(e){var t=e.hasPaymentMethod,n=[];return e.hasFetchedPaymentSources||n.push(u.Step.LOADING_PAYMENT_SOURCES),[].concat(n,t?L:D)},G=P("div",{},void 0,P(y.default,{})),F=function(e){var t=e.guild,n=e.guildEvent,r=e.sku,y=e.transitionState,N=e.onClose,A=(0,m.useUID)(),L=(0,f.useSharedPaymentModal)(),F=L.paymentSources,B=L.paymentSourceId,H=L.hasFetchedPaymentSources,x=L.setPaymentSourceId,V=L.creditCardState,W=L.setCreditCardState,Y=L.tokenState,z=L.setTokenState,K=L.billingAddressState,$=L.setBillingAddressState,Z=L.isSubmittingCurrentStep,q=L.setIsSubmittingCurrentStep,X=L.braintreeEmail,J=L.braintreeNonce,Q=L.paymentError,ee=L.paymentAuthenticationState,te=L.purchaseError,ne=L.setPurchaseError,re=L.purchaseErrorBlockRef,ae=Object.keys(F).length>0,oe=a.useState((function(){return U({hasPaymentMethod:ae,hasFetchedPaymentSources:p.default.hasFetchedPaymentSources})[0]})),ie=oe[0],le=oe[1],ue=a.useState((function(){return U({hasPaymentMethod:ae,hasFetchedPaymentSources:p.default.hasFetchedPaymentSources})})),se=ue[0],de=ue[1],fe=a.useState(s.PurchaseState.WAITING),ce=fe[0],pe=fe[1],ve=a.useState(!1),ye=ve[0],me=ve[1],_e=a.useCallback((function(e){le(e),null!=te&&ne(null)}),[te,le,ne]),he=a.useCallback((function(e,t){pe(e),ne(t)}),[ne,pe]),Ee=a.useRef(!1),ge=a.useRef(!1);a.useEffect((function(){h.default.track(b.AnalyticEvents.GUILD_SCHEDULED_EVENT_PURCHASE_INITIATED,{guild_scheduled_event_id:n.id})}),[n.id]),a.useEffect((function(){p.default.hasFetchedPaymentSources||Ee.current||function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ee.current=!0,e.next=3,(0,i.fetchPaymentSources)();case 3:if(Ee.current=!1,!ge.current){e.next=6;break}return e.abrupt("return");case 6:t={hasPaymentMethod:Object.keys(p.default.paymentSources).length>0,hasFetchedPaymentSources:p.default.hasFetchedPaymentSources},n=U(t),de(n),le(n[0]);case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){R(o,r,a,i,l,"next",e)}function l(e){R(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}()()})),a.useEffect((function(){return function(){ge.current=!0}}),[]);var Se=(0,S.useFetchTicketPrice)({paymentSourceId:B,skuId:null==r?void 0:r.id,applicationId:null==r?void 0:r.applicationId}),Oe=Se.isLoading,Ie=Se.price;null!=ie&&((0,l.setPaymentStepForAuthentication)(ie,ee,_e),(0,u.setPurchaseStateForStep)(ie,ce,pe));var Te,Ce,be,Me=P(I.default,{guild:t,event:n,onClose:N,sku:r,canPurchaseTicket:!0}),Ne=!1;switch(ie){case u.Step.LOADING_PAYMENT_SOURCES:Te=null,Ce=G,Ne=!0;break;case u.Step.PAYMENT_TYPE:case u.Step.CREDIT_CARD_INFORMATION:case u.Step.PAYPAL_INFORMATION:case u.Step.PAYMENT_REQUEST_INFORMATION:case u.Step.ADDRESS:case u.Step.AWAITING_AUTHENTICATION:var Ae=(0,f.renderPaymentModalStep)(ie,_e,se,de,K,$,F,x,V,W,Y,z,Z,q,X,J,u.Step.REVIEW,w,j,k,D),Pe=Ae.body,Re=Ae.backStep,Le=Ae.submitButton;Ce=Pe,Te=Me,be=null!=Le||null!=Re?P(_.ModalFooter,{justify:v.default.Justify.BETWEEN,align:v.default.Align.CENTER},void 0,Le,null!=Re?P(g.default,{onClick:function(){return _e(Re)}}):null):null;break;case u.Step.REVIEW:Te=Me,Ce=P(T.default,{paymentSources:F,paymentSourceId:B,eventName:n.name,isLoadingPrice:Oe,setPaymentSourceId:x,setHasAcceptedTerms:me,handleStepChange:_e,price:Ie}),be=P(C.default,{setPurchaseState:he,paymentSourceId:B,onNext:function(){le(u.Step.CONFIRM)},onPurchaseError:ne,hasAcceptedTerms:ye,price:Ie,isLoadingPrice:Oe,sku:r});break;case u.Step.CONFIRM:Ne=!0,Ce=P(O.default,{guild:t,event:n,sku:r,onClose:function(){(0,c.transitionTo)(b.Routes.UPCOMING_STAGES(t.id)),N()}});break;default:throw new Error("Unexpected step "+ie)}return P(o.Elements,{options:b.StripeElementsOptions,stripe:(0,E.ensureStripeV3IsLoaded)()},void 0,P(_.ModalRoot,{transitionState:y,"aria-labelledby":A,className:M.default.modal},void 0,P("form",{className:M.default.modalContentForm,onSubmit:function(e){return e.preventDefault()}},void 0,P(d.default,{body:Ce,header:Te,footer:be,hideBreadcrumbs:Ne,isLoading:!H,paymentError:Q||te,purchaseErrorBlockRef:re,currentStep:ie,steps:se,withScroller:!0}))))};F.displayName="GuildEventTicketPurchaseModal";var B=F;t.default=B},function(e,t,n){e.exports=n.p+"527a1772f347d80aea6b932b6c4404f6.svg"},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8277),i=v(n(11261)),l=v(n(1265)),u=v(n(47)),s=v(n(272)),d=v(n(11262)),f=n(1),c=v(n(6)),p=v(n(8054));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=m(d.default,{});function h(){var e=(0,a.useStateFromStores)([l.default],(function(){return l.default.hasConsented(f.Consents.PERSONALIZATION)})),t=(0,a.useStateFromStores)([o.HotspotStore],(function(){return o.HotspotStore.hasHotspot(o.HotspotLocations.NOW_PLAYING_CONSENT_CARD)}));return m("div",{className:p.default.container},void 0,m(s.default,{className:p.default.scroller},void 0,m(u.default,{tag:u.default.Tags.H3,size:u.default.Sizes.SIZE_20,className:p.default.header},void 0,c.default.Messages.GAME_FEED_CURRENT_HEADER_TITLE),!e&&t?m(i.default,{className:p.default.consentCard}):null,_))}h.displayName="NowPlayingSidebar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchConsents=function(){return r.default.get({url:o.Endpoints.SETTINGS_CONSENT,oldFormErrors:!0}).then(s,(function(e){return Promise.reject(new Error(e.body.message))}))},t.setConsents=function(e,t){return r.default.post({url:o.Endpoints.SETTINGS_CONSENT,body:{grant:e,revoke:t},oldFormErrors:!0}).then(s,d)};var r=l(n(14)),a=l(n(2)),o=n(1),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=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}).apply(this,arguments)}function s(e){return null!=e&&null!=e.body&&a.default.dispatch({type:o.ActionTypes.UPDATE_CONSENTS,consents:u({},e.body)}),e.body}function d(e){var t;throw t=e.status>=500&&e.status<=599?i.default.Messages.DATA_PRIVACY_UPDATE_CONSENTS_FAILED:null!=e&&null!=e.body&&null!=e.body.message?e.body.message:i.default.Messages.DATA_PRIVACY_UPDATE_CONSENTS_FAILED,new Error(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=L(n(8)),a=L(n(3)),o=L(n(2)),i=L(n(478)),l=L(n(1277)),u=L(n(753)),s=L(n(707)),d=L(n(9212)),f=R(n(10059)),c=n(1264),p=R(n(9213)),v=R(n(9214)),y=L(n(163)),m=L(n(10)),_=L(n(709)),h=L(n(1265)),E=L(n(8647)),g=L(n(71)),S=L(n(15)),O=L(n(40)),I=L(n(256)),T=L(n(70)),C=L(n(8415)),b=L(n(12)),M=L(n(80)),N=n(48),A=n(1);function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e){return e&&e.__esModule?e:{default:e}}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U(){return(U=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}).apply(this,arguments)}var G=!1,F=!1,B=[],H=[],x={},V={},W=new Set,Y=new Set;function z(){var e=T.default.getFriendIDs();return h.default.hasConsented(A.Consents.PERSONALIZATION)?new Set([].concat(C.default.getUserAffinitiesUserIds(),e)):new Set(e)}function K(e){return I.default.findActivity(e,(function(e){return e.type!==A.ActivityTypes.CUSTOM_STATUS}))}function $(e){var t;null==x[e]&&(x=U({},x,((t={})[e]=new v.default({name:e}),t)));return x[e]}function Z(e){var t;null==V[e]&&(V=U({},V,((t={})[e]=new p.default({url:e}),t)));return V[e]}function q(e){Y.has(e)||W.add(e)}function X(e){if((0,l.default)(e))return c.SpotifyApplication;var t=null!=e.application_id?g.default.getGame(e.application_id):null;return null!=t?t:(0,u.default)(e)?$(e.name):(0,s.default)(e)&&null!=e.url?Z(e.url):(null!=e.application_id&&q(e.application_id),t)}function J(e){var t=M.default.getVoiceStateForUser(e);return null!=(null==t?void 0:t.channelId)&&O.default.canWithPartialContext(A.Permissions.VIEW_CHANNEL,{channelId:t.channelId})?t.channelId:null}function Q(e){return T.default.isFriend(e.id)}function ee(e,t,n){for(var a,o,i=t.map((function(e){return e.id})),l=t.filter((function(t){return e.has(t.id)})),u=!1,s=[],_=new Set,h=!1,O=[],T=function(){var e,n=a.value,o=y.default.getStreamForUser(n.id),i=K(n.id);if(null!=o&&O.push({stream:o,streamUser:n,activity:i}),null==i)return"continue";var l=null===(e=i.timestamps)||void 0===e?void 0:e.start;if(null==l)return"continue";var m=(0,d.default)(i);if(null==m)return"continue";if(h=m===c.SPOTIFY_APPLICATION_ID,!f.shouldShowActivity(i))return"continue";var S=function(e){var t=g.default.getGame(e);return null!=t?t:e===c.SPOTIFY_APPLICATION_ID?c.SpotifyApplication:e.startsWith(v.XBOX_APPLICATION_ID_PREFIX)?$(e.slice(v.XBOX_APPLICATION_ID_PREFIX.length)):e.startsWith(p.TWITCH_APPLICATION_ID_PREFIX)?Z(e.slice(p.TWITCH_APPLICATION_ID_PREFIX.length)):(q(e),null)}(m);if(null==S||_.has(S.id))return"continue";var I=null!=i?X(i):null;null!=I&&I.id===S.id||(i=null);var T=[];if(null!=i&&null!=i.party&&null!=i.party.id){var C=E.default.getParty(i.party.id)||[];T=Array.from(C).reduce((function(e,t){var n=b.default.getUser(t);return null!=n&&e.push(n),e}),[])}else T=t.filter((function(e){var t=K(e.id),n=null!=t?X(t):null;return null!=n&&n.id===S.id}));(T=r.default.orderBy(T,[Q],["desc"])).length!==t.length&&(u=!0),_.add(S.id),s.push({game:S,activity:i,activityUser:n,startedPlayingTime:l,playingMembers:T})},C=j(t);!(a=C()).done;)T();for(var A,P,R,L=1===l.length,D=[],w=new Set,k=new Set,U=j(t);!(A=U()).done;){var G=J(A.value.id),F=m.default.getChannel(G),B=null!=F?F.getGuildId():null,H=S.default.getGuild(B);if(k.has(B)&&w.has(G)||null==F||null==H||F.id===H.afkChannelId)null==F&&(o=null,L=!0);else{var x=(0,r.default)(M.default.getVoiceStatesForChannel(F.id)).map((function(e){var t=e.userId;return b.default.getUser(t)})).filter(N.isNotNullish).orderBy([Q],["desc"]).value();x.filter((function(e){return!i.includes(e.id)})).forEach((function(e){return t.push(e)})),L?k.has(B)||(o=null):(o=H,L=!0),k.add(B),w.add(G),D.push({channel:F,guild:H,members:x})}}return{id:n,voiceChannels:D,isSpotifyActivity:h,priorityMembers:l.map((function(e){return{user:e,status:I.default.getStatus(e.id)}})),partiedMembers:t,showPlayingMembers:u,guildContext:o,currentActivities:(P=s,R=function(e){return e.startedPlayingTime},(0,r.default)(P).orderBy([R,function(e){return e.game.name}],["desc","asc"])).value(),applicationStreams:O}}function te(){return G&&_.default.isConnected()}function ne(){if(!te())return!1;W.clear();var e,t,n,a,o=Array.from(z()).reduce((function(e,t){var n=b.default.getUser(t);return null==n||n.bot||e.push(n),e}),[]),l=(e=o,(0,r.default)(e).groupBy((function(e){var t,n=J(e.id),r=K(e.id);return null!=n?"channel--"+n:null!=(null==r||null===(t=r.party)||void 0===t?void 0:t.id)?"party--"+r.party.id:"user--"+e.id}))),u=(t=l,n=z(),a=ee.bind(null,n),(0,r.default)(t).mapValues(a)),s=u.values().orderBy([function(e){return e.partiedMembers.length>1},function(e){return e.applicationStreams.length>0},function(e){return e.voiceChannels.length>0},function(e){return e.currentActivities.length>0},function(e){return e.isSpotifyActivity},function(e){return e.priorityMembers.map((function(e){return e.user.username.toLowerCase()})).join(" ")}],["desc","desc","desc","desc","asc","asc"]).value();B=function(e){return e.filter((function(e){return e.voiceChannels.length>=1||e.currentActivities.length>0||e.applicationStreams.length>0}))}(s),H=function(e){return e.map((function(e){return{type:A.ActivityCardTypes.USER,party:e}}))}(B),function(){if(W.size>0){var e=Array.from(W);i.default.fetchApplications(e),e.forEach((function(e){return Y.add(e)})),W.clear()}}(),F=!0}var re=r.default.throttle((function(){ne(),oe.emitChange()}),1e3);function ae(){return!!te()&&(re(),!1)}var oe=new(function(e){var t,n,r,a,o;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,w(t,n),i.prototype.initialize=function(){this.syncWith([b.default,g.default,I.default,E.default,M.default,y.default,T.default,h.default,C.default],ae),this.waitFor(_.default,S.default,g.default,b.default,C.default)},r=i,(a=[{key:"currentActivityParties",get:function(){return B}},{key:"nowPlayingCards",get:function(){return H}},{key:"isMounted",get:function(){return G}},{key:"loaded",get:function(){return F}}])&&D(r.prototype,a),o&&D(r,o),i}(a.default.Store))(o.default,{LOGOUT:function(e){return G=!1,B=[],void W.clear()},NOW_PLAYING_MOUNTED:function(e){return G=!0,void re()},NOW_PLAYING_UNMOUNTED:function(e){G=!1}}),ie=oe;t.default=ie},function(e,t,n){e.exports=n.p+"b09888a1a6c74c8bb9af76ee61eb70e7.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICON_SIZE=void 0;t.ICON_SIZE=64},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPartyMetadata=function(e){return{af_voice_chat:e.voiceChannels.length>0,af_people_count:e.partiedMembers.length,af_rich_presence:e.currentActivities.some((function(e){var t=e.activity;return(0,a.default)(t)})),game_platform:e.currentActivities.length>0?(0,r.default)(e.currentActivities[0].activity):null}};var r=o(n(486)),a=o(n(732));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(273)),i=v(n(3)),l=v(n(39)),u=v(n(29)),s=v(n(8302)),d=n(1),f=v(n(6)),c=v(n(8056)),p=v(n(370));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=Object.freeze({SECTION_ALL:{lightSrc:n(11283),darkSrc:n(11284),width:376,height:162,renderContent:function(e){return _(a.Fragment,{},void 0,_(s.default.Text,{note:f.default.Messages.FRIENDS_EMPTY_STATE_ALL}),_(u.default,{className:p.default.marginTop20,onClick:e},void 0,f.default.Messages.ADD_FRIEND))}},SECTION_ONLINE:{lightSrc:n(11285),darkSrc:n(11286),width:421,height:218,renderContent:function(){return _(s.default.Text,{note:f.default.Messages.FRIENDS_EMPTY_STATE_ONLINE})}},SECTION_BLOCKED:{lightSrc:n(11287),darkSrc:n(11288),width:433,height:232,renderContent:function(){return _(s.default.Text,{note:f.default.Messages.FRIENDS_EMPTY_STATE_BLOCKED})}},SECTION_PENDING:{lightSrc:n(11289),darkSrc:n(11290),width:415,height:200,renderContent:function(){return _(s.default.Text,{note:f.default.Messages.FRIENDS_EMPTY_STATE_PENDING})}}});var E=function(e){var t=e.theme,n=f.default.Messages.FRIENDS_EMPTY_STATE_ALL,r=h.SECTION_ALL;return _(a.Fragment,{},void 0,_(s.default,{theme:t},void 0,_(s.default.Image,{width:r.width,height:r.height,lightSrc:r.lightSrc,darkSrc:r.darkSrc,theme:t}),_(s.default.Text,{note:n})))};E.displayName="AddFriendEmpty";var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={opacity:new o.default.Value(1)},t.componentWillEnter=function(e){t.state.opacity.setValue(0),o.default.timing(t.state.opacity,{toValue:1,duration:250}).start(e)},t.componentWillLeave=function(e){o.default.timing(t.state.opacity,{toValue:0,duration:250}).start(e)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.type,n=e.onClick,r=e.theme,a={opacity:this.state.opacity},i=function(e){switch(e){case d.FriendsSections.ADD_FRIEND:case d.FriendsSections.ALL:return h.SECTION_ALL;case d.FriendsSections.ONLINE:return h.SECTION_ONLINE;case d.FriendsSections.PENDING:return h.SECTION_PENDING;case d.FriendsSections.BLOCKED:return h.SECTION_BLOCKED;default:throw new Error("FriendsEmptyState: Invalid empty state")}}(t);return t===d.FriendsSections.ADD_FRIEND?_(o.default.div,{className:c.default.friendsEmpty,style:a},void 0,_(E,{theme:r})):_(o.default.div,{className:c.default.friendsEmpty,style:a},void 0,_(s.default,{theme:r},void 0,_(s.default.Image,{width:i.width,height:i.height,lightSrc:i.lightSrc,darkSrc:i.darkSrc,theme:r}),i.renderContent(n)))},r}(a.PureComponent);g.displayName="FriendsEmptyState";var S=i.default.connectStores([l.default],(function(){return{theme:l.default.theme}}),{forwardRef:!0})(g);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(8436)),o=i(n(8065));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.title;return u(a.default,{className:o.default.title},void 0,t)}s.displayName="SectionTitle"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStageDiscoveryListState=g,t.default=function(){var e=r.useState(!1),t=e[0],n=e[1],a=g(),o=a[0],i=a[1];function l(){return(l=h(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t=function(){}),n(!0),e.next=4,O();case 4:r=e.sent,t(),i(r),n(!1);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return{list:o,refresh:function(e){return l.apply(this,arguments)},loading:t,clear:function(){return i([])}}},t.useStageDiscoveryListStore=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=y(n(251)),o=y(n(8312)),i=y(n(81)),l=n(8559),u=y(n(10)),s=y(n(1265)),d=y(n(36)),f=n(722),c=n(10447),p=n(11302),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){_(o,r,a,i,l,"next",e)}function l(e){_(o,r,a,i,l,"throw",e)}i(void 0)}))}}var E=(0,a.default)((function(e){return{list:[],setList:function(t){return e({list:t})}}}));function g(){return E((function(e){return[e.list,e.setList]}),o.default)}function S(){var e=u.default.getChannel(d.default.getVoiceChannelId());return null!=i.default.getStageInstanceByChannel(null==e?void 0:e.id)&&(null==e?void 0:e.isGuildStageVoice())?e:null}function O(){return I.apply(this,arguments)}function I(){return(I=h(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e,r){var a=e.reduce((function(e,t){var a=r(t);return n.has(a.id)?e:(n.add(a.id),[].concat(e,[a]))}),[]);t.push.apply(t,a)},t=[],n=new Set,null!=(a=S())&&r([a],f.createConnectedDiscoveryItemMetadata),!s.default.hasConsented(v.Consents.PERSONALIZATION)){e.next=13;break}return e.t0=r,e.next=9,(0,p.getRichPresenceStagesWithEnhancedData)();case 9:e.t1=e.sent,e.t2=f.createFriendGuildsDiscoveryItem,(0,e.t0)(e.t1,e.t2),r((0,l.getAllLiveStageChannels)(),f.createUserGuildDiscoveryItem);case 13:return e.t3=r,e.next=16,(0,c.fetchRecommendedStages)();case 16:return e.t4=e.sent,e.t5=f.createRecommendedDiscoveryItem,(0,e.t3)(e.t4,e.t5),e.abrupt("return",t);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.useStageDiscoveryListStore=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRecommendedStages=function(){return d.apply(this,arguments)},t.fetchRichPresenceStagesMetadata=function(e){return f.apply(this,arguments)};var r=l(n(137)),a=l(n(14)),o=n(275),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,l,"next",e)}function l(e){u(o,r,a,i,l,"throw",e)}i(void 0)}))}}function d(){return(d=s(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get(i.Endpoints.STAGE_INSTANCES);case 2:return t=e.sent,e.abrupt("return",t.body);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(){return(f=s(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.default.get({url:i.Endpoints.STAGE_INSTANCES_EXTRA,query:r.default.stringify({channel_ids:t})});case 3:return n=e.sent,e.abrupt("return",n.body);case 7:throw e.prev=7,e.t0=e.catch(0),new o.APIError(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiveStageTile=t.LoadingLiveStageTile=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=n(3),l=n(389),u=_(n(132)),s=_(n(94)),d=_(n(61)),f=n(9040),c=_(n(1416)),p=_(n(11305)),v=_(n(11306)),y=_(n(11307)),m=_(n(8069));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}var S=a.forwardRef((function(e,t){return a.createElement("div",{ref:t,className:(0,o.default)(m.default.container,m.default.loading)})}));t.LoadingLiveStageTile=S;var O=a.forwardRef((function(e,t){var n,r=e.channelId,_=e.guild,h=e.speakers,S=e.speakerCount,O=e.audienceCount,I=e.stage,T=e.onSelectStage,C=e.isStageSelected,b=e.score,M=e.source,N=e.context,A=e.discoveryItemType,P=a.useState(!1),R=P[0],L=P[1],D=a.useState(!1),w=D[0],j=D[1],k=(0,i.useStateFromStores)([s.default],(function(){return s.default.isConnected()&&s.default.getChannelId()===r}),[r]),U=k&&C&&!R;return a.createElement("div",{ref:t,className:(0,o.default)(m.default.container,(n={},n[m.default.connected]=U,n))},E(d.default,{onClick:function(){w||(T(_.id,r),L(!1))},onContextMenu:function(e){(0,l.openContextMenu)(e,(function(e){return a.createElement(p.default,g({},e,{source:M,score:b,guildId:_.id,channelId:r,stageInstanceId:I.id}))}))}},void 0,E(v.default,{discoveryItemType:A,context:N}),E(c.default,{guild:_,stageInstance:I,showGuildPopout:w,setShowGuildPopout:j,handleGuildNameClick:function(e){e.stopPropagation(),j(!0)},source:M,speakers:h,speakerCount:S,audienceCount:O}),E(y.default,{isStageSelected:C,isConnected:k,channelId:r,onExit:function(e){L(!0),e.stopPropagation(),u.default.disconnect(),(0,f.trackStageDiscoveryStageExited)(r)},isExiting:R})))}));t.LiveStageTile=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(101))&&r.__esModule?r:{default:r};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}).apply(this,arguments)}var i,l=a.default.defaultRules.lheading,u=a.default.defaultRules.heading,s=a.default.defaultRules.link,d=a.default.defaultRules.image,f=a.default.defaultRules.list,c=a.default.defaultRules.blockQuote,p=a.default.defaultRules.paragraph,v=/\{(.+?)}/,y=/^\$(\w+?)\$/;i=n(11321);var m=function(e){var t=e.transformUpperCase,n=void 0!==t&&t;return function(e,t,r){var o=v.exec(e[1]),i=e[1].replace(v,"");return n&&(i=i.toUpperCase()),{className:null!=o?o[1]:null,level:"="===e[2]?1:2,content:a.default.parseInline(t,i,r)}}},_=function(e){return o({},i.baseRules,{image:o({},d,{},"function"==typeof i.customRules.image?i.customRules.image(e):i.customRules.image),link:o({},s,{},"function"==typeof i.customRules.link?i.customRules.link(e):i.customRules.link),list:o({},f,{},"function"==typeof i.customRules.list?i.customRules.list(e):i.customRules.list),interpolation:{order:a.default.defaultRules.text.order,match:function(e){return y.exec(e)},parse:function(e,t,n){var r=n.interpolations[e[1]];return null==r?{type:"text",content:e[0]}:{type:"interpolation",renderer:r}},react:function(e){return e.renderer()}},lheading:o({},l,{parse:m({transformUpperCase:!0})},"function"==typeof i.customRules.lheading?i.customRules.lheading(e):i.customRules.lheading),heading:o({},u,{},"function"==typeof i.customRules.heading?i.customRules.heading(e):i.customRules.heading),blockQuote:o({},c,{},"function"==typeof i.customRules.blockQuote?i.customRules.blockQuote(e):i.customRules.blockQuote),paragraph:o({},p,{},"function"==typeof i.customRules.paragraph?i.customRules.paragraph(e):i.customRules.paragraph)})},h={getDefaultRules:function(e){return o({},_(e))},getSpecialRules:function(e){return o({},_(e),{},function(e){return{lheading:o({},l,{parse:m({transformUpperCase:!1})},"function"==typeof i.customRules.lheading?i.customRules.lheading(e):i.customRules.lheading)}}(e))}};t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"16",height:"16"});function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.className,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({className:c,width:n,height:a,viewBox:"0 0 16 16"},(0,i.default)(v)),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:p,fill:f,d:"M0,1.99406028 C0,0.892771196 0.894513756,0 1.99406028,0 L14.0059397,0 C15.1072288,0 16,0.894513756 16,1.99406028 L16,14.0059397 C16,15.1072288 15.1054862,16 14.0059397,16 L1.99406028,16 C0.892771196,16 0,15.1054862 0,14.0059397 L0,1.99406028 Z M8.23182341,16 L10.3991764,16 L10.3991764,9.93141161 L12.5663127,9.93141161 L13,7.76405862 L10.3991764,7.76405862 L10.3246195,6.3468265 C10.3246195,5.66107601 10.5049432,5.17342158 11.4698488,5.17342158 L12.974642,5.17385505 L12.974642,3.12202197 C12.7618079,3.09319618 12.3142495,3 11.4644304,3 C9.69001851,3 8.18500859,4.20353112 8.18500859,6.23043964 L8.23182341,7.76405862 L6.06425368,7.76405862 L6.06425368,9.93141161 L8.23182341,9.93141161 L8.23182341,16 Z"}),d))}f.displayName="Facebook"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{width:"16",height:"16"});function f(e){var t=e.width,n=void 0===t?16:t,r=e.height,a=void 0===r?16:r,l=e.color,f=void 0===l?"currentColor":l,c=e.className,p=e.foreground,v=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({className:c,xmlns:"http://www.w3.org/2000/svg",width:n,height:a,viewBox:"0 0 16 16"},(0,i.default)(v)),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:p,fill:f,d:"M4.70012698,0.0531746 C3.84888888,0.092 3.2675238,0.22720635 2.7588254,0.42492063 C2.23292063,0.62926983 1.78692063,0.90273016 1.3422857,1.34733333 C0.89768254,1.79196825 0.62422222,2.23796825 0.41987302,2.76387303 C0.22215872,3.27257143 0.08695238,3.85393651 0.04812698,4.7051746 C0.00920635,5.55819048 0,5.83053968 0,8.00253968 C0,10.1745079 0.00920635,10.4468571 0.04812698,11.299873 C0.08695238,12.1511111 0.22215873,12.7324762 0.41987302,13.2411746 C0.62422222,13.7670794 0.89768254,14.2130794 1.34228572,14.6577143 C1.78692062,15.1023175 2.23292062,15.3757778 2.7588254,15.5801587 C3.2675238,15.7778413 3.8488889,15.9130476 4.70012698,15.951873 C5.55314286,15.9907937 5.82549206,16 7.99749206,16 C10.1694603,16 10.4418095,15.9907937 11.2948254,15.951873 C12.1460635,15.9130476 12.7274286,15.7778413 13.236127,15.5801587 C13.7620317,15.3757778 14.2080317,15.1023175 14.6526667,14.6577143 C15.0972698,14.2130794 15.3707302,13.7670794 15.5751111,13.2411746 C15.7727937,12.7324762 15.908,12.1511111 15.9468254,11.299873 C15.985746,10.4468571 15.9949524,10.1745079 15.9949524,8.00253968 C15.9949524,5.83053968 15.985746,5.55819048 15.9468254,4.7051746 C15.908,3.8539365 15.7727937,3.27257143 15.5751111,2.76387302 C15.3707302,2.23796825 15.0972698,1.79196825 14.6526667,1.34733332 C14.2080317,0.90273016 13.7620317,0.62926984 13.236127,0.42492064 C12.7274286,0.22720634 12.1460635,0.092 11.2948254,0.0531746 C10.4418095,0.01425397 10.1694603,0.00504762 7.99749206,0.00504762 C5.82549206,0.00504762 5.55314286,0.01425397 4.70012698,0.0531746 L4.70012698,0.0531746 Z M8.00001453,2.00504762 C9.95416635,2.00504762 10.185649,2.01251386 10.9573741,2.04772432 C11.6709381,2.08026206 12.0584565,2.19948958 12.3163471,2.29971739 C12.6579641,2.43248289 12.9017646,2.59107525 13.157854,2.84719363 C13.4139723,3.10328295 13.5725647,3.34708347 13.7053302,3.68870053 C13.805558,3.94659105 13.9247856,4.33410953 13.9573233,5.04767346 C13.9925338,5.8193986 14,6.05088127 14,8.00506213 C14,9.95921396 13.9925338,10.1906966 13.9573233,10.9624217 C13.9247856,11.6759857 13.805558,12.0635042 13.7053302,12.3213947 C13.5725647,12.6630117 13.4139723,12.9068123 13.157854,13.1629016 C12.9017646,13.41902 12.6579641,13.5776123 12.3163471,13.7103779 C12.0584565,13.8106057 11.6709381,13.9298332 10.9573741,13.9623709 C10.1857652,13.9975814 9.9543116,14.0050476 8.00001453,14.0050476 C6.04568839,14.0050476 5.81426383,13.9975814 5.04262587,13.9623709 C4.32906195,13.9298332 3.94154347,13.8106057 3.68365294,13.7103779 C3.34203588,13.5776123 3.09823536,13.41902 2.84214604,13.1629016 C2.58605671,12.9068123 2.42743531,12.6630117 2.29466977,12.3213947 C2.19444197,12.0635042 2.07521444,11.6759857 2.04267671,10.9624217 C2.00746628,10.1906966 2,9.95921395 2,8.00506212 C2,6.05088125 2.00746625,5.81939858 2.0426767,5.04767347 C2.07521444,4.33410953 2.19444196,3.94659104 2.29466977,3.68870052 C2.42743531,3.34708346 2.58602767,3.10328294 2.84214604,2.84719362 C3.09823536,2.59107524 3.34203588,2.43248288 3.68365294,2.29971735 C3.94154346,2.19948953 4.32906194,2.08026201 5.04262587,2.04772428 C5.81435097,2.01251381 6.04583365,2.00504758 8.00001453,2.00504758 L8.00001453,2.00504762 Z"}),s("path",{className:p,fill:f,d:"M8.0000119,10 C6.89542535,10 6,9.10457466 6,8.0000119 C6,6.89542535 6.89542534,6 8.0000119,6 C9.10457467,6 10,6.89542534 10,8.0000119 C10,9.10457467 9.10457466,10 8.0000119,10 L8.0000119,10 Z M8.00001546,4 C5.7908468,4 4,5.7908468 4,8.00001546 C4,10.2091532 5.7908468,12 8.00001546,12 C10.2091532,12 12,10.2091532 12,8.00001546 C12,5.7908468 10.2091532,4 8.00001546,4 L8.00001546,4 Z M13,4.00001654 C13,4.55230644 12.5522734,5 11.9999835,5 C11.4477266,5 11,4.55230645 11,4.00001654 C11,3.44772664 11.4477266,3 11.9999835,3 C12.5522734,3 13,3.44772663 13,4.00001654 L13,4.00001654 Z"}),d))}f.displayName="Instagram"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.AddEntryCard=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(389),l=A(n(199)),u=n(42),s=A(n(162)),d=A(n(15)),f=A(n(40)),c=A(n(36)),p=A(n(29)),v=A(n(61)),y=A(n(375)),m=A(n(371)),_=A(n(278)),h=A(n(149)),E=A(n(8331)),g=A(n(248)),S=A(n(24)),O=A(n(150)),I=n(193),T=A(n(11357)),C=n(1),b=A(n(6)),M=A(n(8081)),N=A(n(11359));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var w=D("img",{alt:"",src:N.default}),j=function(e){var t=e.onClick;return D(v.default,{onClick:t,className:M.default.addEntryCard},void 0,w,D(S.default,{size:S.default.Sizes.SIZE_14,color:S.default.Colors.HEADER_PRIMARY,className:M.default.addServerText},void 0,b.default.Messages.HUB_ADD_SERVER_CTA))};t.AddEntryCard=j,j.displayName="AddEntryCard";var k=function(e){var t,n=e.entry,r=a.useState(!1),v=r[0],N=r[1],A=(0,o.useStateFromStores)([d.default],(function(){return d.default.getGuild(n.guildId)})),P=null!=A,w=(0,o.useStateFromStores)([f.default],(function(){return null!=A&&f.default.can(C.Permissions.ADMINISTRATOR,A)})),j=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N(!0),e.prev=1,P){e.next=7;break}return e.next=5,l.default.joinGuild(n.guildId,!1,C.JoinGuildSources.DIRECTORY_ENTRY,n.channelId);case 5:e.next=8;break;case 7:(0,u.transitionToGuild)(n.guildId,c.default.getChannelId(n.guildId));case 8:return e.prev=8,N(!1),e.finish(8);case 11:case"end":return e.stop()}}),e,null,[[1,,8,11]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){R(o,r,a,i,l,"next",e)}function l(e){R(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),k=O.default.getGuildSplashURL({id:n.guildId,splash:n.splash,size:300*(0,I.getDevicePixelRatio)()}),U=null!==(t=O.default.getGuildIconURL({id:n.guildId,icon:n.icon,size:40}))&&void 0!==t?t:void 0;return D("div",{className:M.default.card,onContextMenu:function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(T.default,L({},e,{entry:n}))}))}},void 0,D("div",{className:M.default.cardHeader},void 0,D("div",{className:M.default.splash},void 0,null!=k&&D("img",{src:k,alt:"",className:M.default.splashImage})),D("div",{className:M.default.guildIcon},void 0,D(g.default,{mask:g.default.Masks.SQUIRCLE,width:48,height:48},void 0,D("div",{className:M.default.iconMask},void 0,D(m.default,{className:M.default.icon,iconSrc:U,guild:new s.default(n),size:m.default.Sizes.MEDIUM,active:!0})))),w&&D(_.default,{animation:_.default.Animation.NONE,position:_.default.Positions.BOTTOM,spacing:4,align:_.default.Align.RIGHT,renderPopout:function(e){var t=e.closePopout;return D(T.default,{entry:n,closePopout:t})}},void 0,(function(e){return a.createElement(E.default,L({},e,{className:M.default.overflowMenu}))}))),D("div",{className:M.default.guildInfo},void 0,D("div",{className:M.default.title},void 0,D(y.default,{className:M.default.guildBadge,guild:n,tooltipColor:h.default.Colors.PRIMARY}),D(S.default,{className:M.default.guildName,size:S.default.Sizes.SIZE_16,color:S.default.Colors.HEADER_PRIMARY},void 0,n.name)),D(S.default,{className:M.default.description,size:S.default.Sizes.SIZE_14,color:S.default.Colors.HEADER_SECONDARY},void 0,n.description),D("div",{className:M.default.memberInfo},void 0,null!=n.approximatePresenceCount&&D("div",{className:M.default.memberCount},void 0,D("div",{className:M.default.dotOnline}),D(S.default,{size:S.default.Sizes.SIZE_12,color:S.default.Colors.HEADER_SECONDARY},void 0,b.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:n.approximatePresenceCount}))),null!=n.approximateMemberCount&&D("div",{className:M.default.memberCount},void 0,D("div",{className:M.default.dotOffline}),D(S.default,{size:S.default.Sizes.SIZE_12,color:S.default.Colors.HEADER_SECONDARY},void 0,b.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:n.approximateMemberCount})))),D(p.default,{submitting:v,className:M.default.joinButton,color:P?p.default.Colors.GREY:p.default.Colors.GREEN,onClick:j},void 0,P?b.default.Messages.HUB_DIRECTORY_CARD_JOINED_GUILD_BUTTON:b.default.Messages.JOIN)))};k.displayName="GuildDirectoryEntryCard";var U=k;t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e=e.replace(/[\\'"#:/@<>]/g,""),t&&(e=e.trim());return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=g(n(0)),o=g(n(8253)),i=h(n(278)),l=h(n(8666)),u=h(n(9726)),s=h(n(8282)),d=n(121),f=h(n(8265)),c=n(392),p=n(1209),v=n(8473),y=n(1),m=h(n(6)),_=h(n(8093));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e){var t=e.channel,n=(0,v.useThreadNotificationSetting)(t),r=a.useState(!1),o=r[0],f=r[1];if(a.useEffect((function(){var e=function(){return f(!0)};return d.ComponentDispatch.subscribe(y.ComponentActions.OPEN_THREAD_NOTIFICATION_SETTINGS,e),function(){d.ComponentDispatch.unsubscribe(y.ComponentActions.OPEN_THREAD_NOTIFICATION_SETTINGS,e)}}),[]),!(0,p.useCanSeeThreads)())return null;var h=m.default.Messages.NOTIFICATION_SETTINGS;return S(i.default,{shouldShow:o,animation:i.default.Animation.NONE,position:i.default.Positions.BOTTOM,align:i.default.Align.RIGHT,autoInvert:!1,onRequestClose:function(){return f(!1)},renderPopout:function(e){return a.createElement(T,O({},e,{channel:t}))}},void 0,(function(e,t){return a.createElement(s.default.Icon,O({},e,{onClick:function(){return f((function(e){return!e}))},tooltip:t?null:h,icon:n===c.ThreadMemberFlags.NO_MESSAGES?u.default:l.default,foreground:n===c.ThreadMemberFlags.NO_MESSAGES?_.default.strikethrough:null,"aria-label":h,selected:t}))}))}function T(e){var t=e.channel,n=e.closePopout,r=e.onSelect,a=(0,v.useThreadNotificationSetting)(t);return S(o.default,{navId:"thread-context",onClose:n,"aria-label":m.default.Messages.THREAD_ACTIONS_MENU_LABEL,onSelect:r},void 0,(0,c.getThreadNotificationOptions)().map((function(e){var n=e.setting,r=e.label;return S(o.MenuRadioItem,{group:"thread-notifications",id:""+n,label:r,action:function(){return f.default.setNotificationSetting(t,n)},checked:n===a},n)})))}I.displayName="ThreadNotificationSettingsButton",T.displayName="PopoutMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=J(n(0)),o=q(n(8325)),i=n(3),l=q(n(705)),u=q(n(8389)),s=q(n(390)),d=q(n(8406)),f=n(286),c=n(285),p=q(n(105)),v=q(n(106)),y=q(n(8469)),m=n(8260),_=q(n(9224)),h=q(n(688)),E=q(n(9188)),g=n(8278),S=q(n(10080)),O=q(n(8391)),I=q(n(8735)),T=n(8365),C=q(n(1216)),b=q(n(10084)),M=n(8390),N=q(n(8437)),A=n(5940),P=q(n(10456)),R=J(n(1225)),L=q(n(8333)),D=q(n(201)),w=q(n(690)),j=q(n(40)),k=n(9134),U=q(n(13)),G=n(8349),F=n(121),B=n(8381),H=n(733),x=q(n(10135)),V=q(n(10137)),W=q(n(9223)),Y=q(n(8257)),z=J(n(8357)),K=n(1),$=q(n(6)),Z=q(n(7391));function q(e){return e&&e.__esModule?e:{default:e}}function X(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return X=function(){return e},e}function J(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=X();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Q(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,te(e,t)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){e.preventDefault()}var re=/^\+(?!\w+):?(?!:)(\w+)?:?$/,ae=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).channelTextAreaRef=a.createRef(),t.isFirstChange=!0,t.state={textValue:R.default.getDraft(t.props.channel.id,R.DraftType.ChannelMessage),richValue:o.default.deserialize(R.default.getDraft(t.props.channel.id,R.DraftType.ChannelMessage))},t.draftDidChange=function(e){void 0===e&&(e=t.props);var n=t.state.textValue,r=R.default.getDraft(e.channel.id,R.DraftType.ChannelMessage);n!==r&&""===r&&t.setState({textValue:r,richValue:o.default.deserialize(r)},(function(){if(n!==r){var e=t.props.onFocus;e&&e()}}))},t.handleKeyDown=function(e){var n=t.props,r=n.keyboardModeEnabled,a=n.onKeyDown,o=e.shiftKey||e.altKey||e.ctrlKey||e.metaKey;switch(e.which){case K.KeyboardKeys.ARROW_UP:if(o)return;if(0!==t.state.textValue.length)return;if(e.preventDefault(),r)F.ComponentDispatch.dispatch(K.ComponentActions.FOCUS_MESSAGES,{atEnd:!0});else{var i=t.props.channel,l=D.default.getLastEditableMessage(i.id);l&&(s.default.startEditMessage(i.id,l.id,l.content),v.default.trackWithMetadata(K.AnalyticEvents.MESSAGE_EDIT_UP_ARROW))}return;case K.KeyboardKeys.ESCAPE:if(o)return;if(e.target!==e.currentTarget)return;e.preventDefault(),r&&(0,c.disableKeyboardMode)()}a&&a()},t.handleTextareaChange=function(e,n,r){var a=t.props,o=a.keyboardModeEnabled,i=a.channel.id;u.default.changeDraft(i,n,R.DraftType.ChannelMessage);var s=""!==n&&r.document!==t.state.richValue.document,f=s&&!re.test(n)&&!n.startsWith("/")&&(!t.isFirstChange||n!==t.state.textValue);t.isFirstChange=!1,f?d.default.startTyping(i):""===n&&d.default.stopTyping(i),h.default.getLayout(i)===K.ChannelLayouts.NO_CHAT&&l.default.updateLayout(i,K.ChannelLayouts.NORMAL),s&&o&&(0,c.disableKeyboardMode)(),t.setState({textValue:n,richValue:r})},t.handleSendMessage=function(e,n,r,a){var i=e;if(0===(e=e.trim()).length&&(null==n||0===n.length))return Promise.resolve({shouldClear:!1,shouldRefocus:!0});var l=t.props,u=l.guild,d=l.channel,c=l.pendingReply,p=!1;if(null!=r){if(r.type===m.ApplicationCommandType.BUILT_IN_INTEGRATION)return F.ComponentDispatch.dispatch(K.ComponentActions.SHAKE_APP,{duration:200,intensity:2}),Promise.resolve({shouldClear:!1,shouldRefocus:!0});var v=(0,_.default)(r,null!=a?a:{},{guild:u,channel:d});if(r.type!==m.ApplicationCommandType.BUILT_IN_TEXT)return Promise.resolve({shouldClear:!0,shouldRefocus:!0});null!=v&&(e=v.content||e,p=!0===v.tts)}if(null===r&&null!=u&&i.startsWith(g.COMMAND_SENTINEL)){var h=i.substring(1);if(h===h.trimStart()&&!y.default.hasResults(h,f.ApplicationCommandTarget.CHAT))return F.ComponentDispatch.dispatch(K.ComponentActions.SHAKE_APP,{duration:200,intensity:2}),Promise.resolve({shouldClear:!1,shouldRefocus:!0})}return null!=t.channelTextAreaRef.current?(0,B.applyChatRestrictions)({target:t.channelTextAreaRef.current,type:K.TextareaTypes.NORMAL,content:e,stickers:n,channel:d}).then((function(r){var a=r.valid,i=r.failureReason;if(!a)return i===K.MessageRestrictionTypes.SLOWMODE_COOLDOWN?(F.ComponentDispatch.dispatch(K.ComponentActions.SHAKE_APP,{duration:200,intensity:2}),F.ComponentDispatch.dispatch(K.ComponentActions.EMPHASIZE_SLOWMODE_COOLDOWN),{shouldClear:!1,shouldRefocus:!0}):{shouldClear:!1,shouldRefocus:!1};var l=s.default.getSendMessageOptionsForReply(c);if(null!=n&&n.length>0)s.default.sendStickers(d.id,n,e,l);else{var u=C.default.parse(d,e);u.tts=u.tts||p,s.default.sendMessage(d.id,u,void 0,l)}return t.setState({textValue:"",richValue:o.default.deserialize("")}),(0,M.deletePendingReply)(d.id),(0,A.clearStickerPreview)(d.id),{shouldClear:!0,shouldRefocus:!0}})):Promise.resolve({shouldClear:!1,shouldRefocus:!1})},t.renderAttachButton=function(e){return Q(S.default,{className:e,channel:t.props.channel,draftType:R.DraftType.ChannelMessage})},t}ee(t,e);var n=t.prototype;return n.componentDidMount=function(){R.default.addChangeListener(this.draftDidChange)},n.componentWillUnmount=function(){R.default.removeChangeListener(this.draftDidChange)},n.componentDidUpdate=function(e,t){var n=this.props.channel,r=this.state.textValue;if(e.channel.id===n.id){if(e.hasModalOpen&&!this.props.hasModalOpen){var a=R.default.getDraft(n.id,R.DraftType.ChannelMessage);a!==r&&this.setState({textValue:a,richValue:o.default.deserialize(a)})}t.textValue.length<K.MAX_MESSAGE_LENGTH&&r.length>=K.MAX_MESSAGE_LENGTH&&U.default.track(K.AnalyticEvents.MESSAGE_LENGTH_LIMIT_REACHED,{})}else this.draftDidChange(this.props)},n.render=function(){var e=this.props,t=e.channel,n=e.focused,r=e.onResize,o=e.onBlur,i=e.onFocus,l=e.highlighted,u=e.pendingReply,s=e.textareaType,d=e.disableAutoFocus,f=e.placeholder;return a.createElement(O.default,{ref:this.channelTextAreaRef,textValue:this.state.textValue,richValue:this.state.richValue,focused:n,className:Z.default.channelTextArea,channel:t,placeholder:f,pendingReply:u,type:s,onChange:this.handleTextareaChange,onSubmit:this.handleSendMessage,onResize:r,onFocus:i,onBlur:o,onKeyDown:this.handleKeyDown,shouldUploadLongMessages:!0,shouldRenderPremiumGiftButton:s!==K.TextareaTypes.SIDEBAR,renderAttachButton:this.renderAttachButton,promptToUpload:I.default,highlighted:l,canExecuteCommands:s!==K.TextareaTypes.SIDEBAR&&s!==K.TextareaTypes.THREAD_CREATION,autoSuggestEnabled:!0,canAttachStickers:!0,canAddGIFs:!0,disableAutoFocus:d})},t}(a.PureComponent);ae.displayName="ChannelTextAreaForm";var oe=Q(k.ChatLayerContainer,{}),ie=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={textAreaFocused:!1,textAreaHighlighted:!1,currentChannelId:t.props.channel.id},t.dispatchGroupRef=a.createRef(),t.handleRequestFocus=function(e){(null==e?void 0:e.channelId)===t.props.channel.id&&t.setState({textAreaFocused:!0})},t.getAnalyticsPage=function(){var e=t.props.channel;if(null==e)return null;switch(e.type){case K.ChannelTypes.GUILD_ANNOUNCEMENT:case K.ChannelTypes.GUILD_TEXT:return Y.default.Pages.GUILD_CHANNEL;case K.ChannelTypes.GROUP_DM:case K.ChannelTypes.DM:return Y.default.Pages.DM_CHANNEL;default:return null}},t.handleInputFocus=function(e){(0,H.isFullScreen)()||(null!=(null==e?void 0:e.highlight)?t.setState({textAreaFocused:!0,textAreaHighlighted:null==e?void 0:e.highlight}):t.setState({textAreaFocused:!0}))},t.handleInputBlur=function(){(document.hasFocus()||t.props.hasModalOpen)&&t.setState({textAreaFocused:!1,textAreaHighlighted:!1})},t.handleInputKeyDown=function(){t.state.textAreaHighlighted&&t.setState({textAreaHighlighted:!1})},t.handleOpenExpressionPicker=function(e){var n=e.activeView;(0,T.openExpressionPicker)(n,t.props.textareaType)},t.handleChatInteract=function(){var e;null===(e=t.dispatchGroupRef.current)||void 0===e||e.bumpDispatchPriority()},t}ee(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.channel,r=t.currentChannelId;return n.id!==r?{textAreaFocused:null!=n&&j.default.can(K.Permissions.SEND_MESSAGES,n),currentChannelId:n.id}:null};var n=t.prototype;return n.componentDidMount=function(){F.ComponentDispatch.subscribe(K.ComponentActions.FOCUS_CHANNEL_TEXT_AREA,this.handleRequestFocus)},n.componentDidUpdate=function(e){this.props.isEditing===e.isEditing&&this.props.hasModalOpen===e.hasModalOpen||(this.props.isEditing||this.props.hasModalOpen?this.handleInputBlur():this.handleInputFocus())},n.componentWillUnmount=function(){F.ComponentDispatch.unsubscribe(K.ComponentActions.FOCUS_CHANNEL_TEXT_AREA,this.handleRequestFocus)},n.render=function(){var e=this.props,t=e.channel,n=e.guild,r=e.keyboardModeEnabled,o=e.hasModalOpen,i=e.pendingReply,l=e.textareaType,u=e.disableAutoFocus,s=e.renderThreadNotice,d=e.placeholder,f=this.state,c=f.textAreaFocused,p=f.textAreaHighlighted,v=t.isPrivate()?x.default:V.default;return Q(Y.default,{page:this.getAnalyticsPage()},"messages-"+t.id,Q(k.ChatLayerProvider,{},void 0,a.createElement(G.ComponentDispatchGroupProvider,{ref:this.dispatchGroupRef},Q(G.ComponentAction,{event:K.ComponentActions.TEXTAREA_FOCUS,handler:this.handleInputFocus}),Q(G.ComponentAction,{event:K.ComponentActions.TEXTAREA_BLUR,handler:this.handleInputBlur}),Q(G.ComponentAction,{event:K.ComponentActions.OPEN_EXPRESSION_PICKER,handler:this.handleOpenExpressionPicker}),Q("main",{className:Z.default.chatContent,"aria-label":$.default.Messages.CHANNEL_A11Y_LABEL.format({channelName:t.name}),onMouseDown:this.handleChatInteract,onFocus:this.handleChatInteract},void 0,s?Q(P.default,{channel:t}):null,Q(b.default,{channel:t}),Q("form",{onSubmit:ne,className:Z.default.form},void 0,Q(v,{channel:t},void 0,Q(z.default,{tutorialId:"writing-messages",position:z.TutorialIndicatorPositions.LEFT,offsetX:75},void 0,Q(ae,{focused:c,highlighted:p,channel:t,guild:n,keyboardModeEnabled:r,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,hasModalOpen:o,pendingReply:i,textareaType:l,disableAutoFocus:u,placeholder:d}))),Q(W.default,{channel:t})),oe))))},t}(a.PureComponent);ie.displayName="ChannelChat";var le=a.memo((function(e){var t=e.channel,n=e.guild,r=e.textareaType,a=void 0===r?K.TextareaTypes.NORMAL:r,o=e.disableAutoFocus,l=e.renderThreadNotice,u=(0,E.default)(t);return Q(ie,{channel:t,isEditing:null!=(0,i.useStateFromStores)([L.default],(function(){return L.default.getEditingMessageId(t.id)})),hasModalOpen:(0,i.useStateFromStores)([w.default],(function(){return w.default.hasModalOpen()})),guild:n,keyboardModeEnabled:(0,i.useStateFromStores)([p.default],(function(){return p.default.keyboardModeEnabled})),pendingReply:(0,i.useStateFromStores)([N.default],(function(){return N.default.getPendingReply(t.id)})),textareaType:a,disableAutoFocus:o,renderThreadNotice:l,placeholder:u})}));t.default=le},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r,v,y=e.channel,_=e.narrow,h=(0,o.useStateFromStores)([u.default],(function(){return null!=y&&u.default.hasJoined(y.id)})),E=(0,d.useCanUnarchiveThread)(y),g=(0,d.useIsThreadModerator)(y);if(null===(t=y.threadMetadata)||void 0===t?void 0:t.archived){var S;n=(null===(S=y.threadMetadata)||void 0===S?void 0:S.locked)?c.default.Messages.THREAD_HEADER_NOTICE_LOCKED:c.default.Messages.THREAD_HEADER_NOTICE_ARCHIVED,E&&(r=m(i.default,{size:_?i.default.Sizes.SMALL:i.default.Sizes.TINY,className:p.default.chatHeaderBarButton,color:i.default.Colors.GREY,onClick:function(){return s.default.unarchiveThread(y,g)}},void 0,c.default.Messages.UNARCHIVE))}else h||(n=c.default.Messages.THREAD_HEADER_NOTICE_JOIN,r=m(i.default,{size:_?i.default.Sizes.SMALL:i.default.Sizes.TINY,className:p.default.chatHeaderBarButton,onClick:function(){return s.default.joinThread(y,"Banner")}},void 0,c.default.Messages.JOIN));return null==n?m(f.default,{channel:y,narrow:_}):m("div",{className:(0,a.default)(p.default.chatHeaderBar,(v={},v[p.default.narrow]=_,v))},void 0,m(l.default,{className:p.default.chatHeaderBarText,size:l.default.Sizes.SIZE_14,color:l.default.Colors.HEADER_SECONDARY},void 0,n),r)};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=v(n(9)),o=n(3),i=v(n(29)),l=v(n(24)),u=v(n(204)),s=v(n(8265)),d=n(1209),f=v(n(11382)),c=v(n(6)),p=v(n(7839));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=M(n(0)),o=C(n(9)),i=C(n(3)),l=C(n(397)),u=C(n(8736)),s=C(n(8558)),d=n(180),f=C(n(1219)),c=C(n(694)),p=C(n(690)),v=C(n(40)),y=C(n(70)),m=C(n(12)),_=M(n(8289)),h=C(n(96)),E=C(n(9114)),g=C(n(8422)),S=n(1),O=C(n(6)),I=C(n(7360)),T=C(n(7618));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isDragging:!1,isOverZone:!1,requireConfirm:!0},t.dragOverTimeout=null,t.elementDOMRef=a.createRef(),t.canDropFile=function(){var e=t.props,n=e.channel,r=e.hasLayers,a=e.canAttachFiles;if(r)return!1;var o=n.getGuildId();return!r&&(n.isPrivate()&&!n.isManaged()||null!=o&&a&&f.default.canChatInGuild(o))},t.isAllDropFiles=function(e){for(var t=0;t<e.length;t++)try{var n=e[t].webkitGetAsEntry()||e[t].getAsEntry();if(n&&!n.isFile)return!1}catch(e){continue}return!0},t.preventUnwantedDrop=function(e,n){void 0===n&&(n=!1);var r=e.dataTransfer;if(null==r)return!0;var a=r.types instanceof Array&&-1!==r.types.indexOf("text/uri-list")&&-1===r.types.indexOf("application/json"),o=null!=r.items&&!t.isAllDropFiles(r.items);return!a&&!o||(e.stopPropagation(),e.preventDefault(),r.effectAllowed="none",r.dropEffect="none",n&&(t.setState({isDragging:!1}),l.default.push(g.default,{title:O.default.Messages.UPLOAD_AREA_INVALID_FILE_TYPE_TITLE,help:O.default.Messages.UPLOAD_AREA_INVALID_FILE_TYPE_HELP})),!1)},t.handleDragOver=function(e){if(!t.preventUnwantedDrop(e))return!1;var n=e.dataTransfer;if(null!=n){n.dropEffect="copy";var r=p.default.getModal();r&&r.modal===g.default&&l.default.pop(),e.stopPropagation(),e.preventDefault(),t.state.isDragging?t.state.isDragging&&e.shiftKey!==!t.state.requireConfirm&&t.setState({requireConfirm:!e.shiftKey}):(n.types instanceof DOMStringList&&n.types.contains("application/x-moz-file")||n.types instanceof Array&&-1!==n.types.indexOf("Files"))&&t.setState((function(t){return t.isDragging?{}:{isDragging:!0,requireConfirm:!e.shiftKey}})),clearTimeout(t.dragOverTimeout),t.dragOverTimeout=setTimeout((function(){t.setState({isDragging:!1,requireConfirm:!0})}),1e3)}},t.handleDragOverZone=function(){t.setState({isOverZone:!0})},t.handleDragLeaveZone=function(){t.setState({isOverZone:!1})},t.handleDragLeave=function(e){t.state.isDragging&&(e.stopPropagation(),e.preventDefault(),t.clearDragging())},t.clearDragging=function(){t.setState({isDragging:!1,isOverZone:!1,requireConfirm:!0})},t.handleDrop=function(e){if(!t.preventUnwantedDrop(e,!0))return!1;var n=e.dataTransfer;if(null==n)return!0;t.state.isDragging&&(e.preventDefault(),e.stopPropagation(),t.canDropFile()&&null!=t.props.channel&&t.promptToUpload(n.files,t.props.channel.id,!0,t.state.requireConfirm),t.clearDragging())},t.getErrorHelp=function(e,t){var n=_.sizeString(_.maxFileSize(t));return h.default.isPremium(e,S.PremiumTypes.TIER_2)?O.default.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:n}):h.default.isPremium(e,S.PremiumTypes.TIER_1)?O.default.Messages.UPLOAD_AREA_TOO_LARGE_HELP_PREMIUM_TIER_1.format({maxSize:n}):O.default.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:n})},t.promptToUpload=function(e,n,r,a){void 0===r&&(r=!1),void 0===a&&(a=!0);var o=t.props.channel.getGuildId();if(_.anyFileTooLarge(e,o)){var i=m.default.getCurrentUser();l.default.push(g.default,{title:O.default.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:t.getErrorHelp(i,o),promo:!h.default.isPremium(i,S.PremiumTypes.TIER_2)})}else a?(u.default.pushFiles({files:e,channelId:n,showLargeMessageDialog:!1}),p.default.isModalOpen(E.default)||l.default.push(E.default,{backdropInstant:r,draftType:t.props.draftType})):s.default.instantBatchUpload(n,e,t.props.draftType)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var i=r.prototype;return i.componentDidMount=function(){document.body.addEventListener("dragover",this.handleDragOver,!1),document.body.addEventListener("drop",this.handleDragLeave,!1);var e=this.elementDOMRef.current;null!=e&&(e.addEventListener("dragover",this.handleDragOverZone,!1),e.addEventListener("dragleave",this.handleDragLeaveZone,!1),e.addEventListener("drop",this.handleDrop,!1))},i.componentWillUnmount=function(){document.body.removeEventListener("dragover",this.handleDragOver,!1),document.body.removeEventListener("drop",this.handleDragLeave,!1);var e=this.elementDOMRef.current;null!=e&&(e.removeEventListener("dragover",this.handleDragOverZone,!1),e.removeEventListener("dragleave",this.handleDragLeaveZone,!1),e.removeEventListener("drop",this.handleDrop,!1)),clearTimeout(this.dragOverTimeout)},i.render=function(){var e,t=this.props,n=t.channel,r=t.className,i=this.state.isDragging&&this.canDropFile(),l=O.default.Messages.UPLOAD_TO.format({destination:(0,d.computeChannelName)(n,m.default,y.default,!0)});this.state.requireConfirm||(l=O.default.Messages.UPLOAD_AREA_TITLE_NO_CONFIRMATION);var u=null;return i&&(u=N("div",{},void 0,N("div",{className:(0,o.default)(T.default.sparkleWhite,I.default.sparkleOne)}),N("div",{className:(0,o.default)(T.default.sparkleWhite,I.default.sparkleTwo)}),N("div",{className:(0,o.default)(T.default.lightWhite,I.default.lightOne)}),N("div",{className:(0,o.default)(T.default.lightWhite,I.default.lightTwo)}),N("div",{className:(0,o.default)(T.default.crossWhite,I.default.crossOne)}),N("div",{className:(0,o.default)(T.default.crossWhite,I.default.crossTwo)}),N("div",{className:(0,o.default)(T.default.popWhite,I.default.popOne)}))),a.createElement("div",{ref:this.elementDOMRef,className:(0,o.default)(r,I.default.uploadArea,(e={},e[I.default.droppable]=i,e[I.default.uploadModalIn]=this.state.isOverZone,e))},N("div",{className:I.default.uploadDropModal},void 0,u,N("div",{className:I.default.bgScale}),N("div",{className:I.default.inner},void 0,N("div",{className:I.default.icons},void 0,N("div",{className:I.default.wrapOne},void 0,N("div",{className:(0,o.default)(I.default.icon,I.default.one)})),N("div",{className:I.default.wrapThree},void 0,N("div",{className:(0,o.default)(I.default.icon,I.default.three)})),N("div",{className:I.default.wrapTwo},void 0,N("div",{className:(0,o.default)(I.default.icon,I.default.two)}))),N("div",{className:I.default.title},void 0,l),N("div",{className:I.default.instructions},void 0,N("pre",{},void 0,O.default.Messages.UPLOAD_AREA_HELP)))))},r}(a.Component);P.displayName="UploadArea";var R=i.default.connectStores([v.default,c.default],(function(e){var t=e.channel;return{hasLayers:c.default.hasLayers(),canAttachFiles:null!=t&&v.default.can(S.Permissions.ATTACH_FILES,t)}}))(P);t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=y(n(8)),a=y(n(3)),o=y(n(2)),i=y(n(10)),l=y(n(56)),u=y(n(10459)),s=y(n(256)),d=y(n(479)),f=y(n(12)),c=n(48),p=y(n(78)),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _={},h=function(){function e(e,t,n){this.guildId=e,this.parentId=t,this.threadId=n,this.version=0,this.sections={},this.allUserIds=new Set}var t=e.prototype;return t.rebuild=function(e){var t=this;this.version++,this.sections={},null!=e&&(this.allUserIds=new Set(e));var n=i.default.getChannel(this.parentId);(0,r.default)(Array.from(this.allUserIds)).map((function(e){var r=t.calculateNewState(e,n);return{userId:e,sectionId:r[0],displayName:r[1],canViewChannel:r[2]}})).sortBy((function(e){return e.userId})).sortBy((function(e){return e.displayName})).forEach((function(e){t.addUser(e.userId,e.sectionId,e.displayName,e.canViewChannel,!0)}))},t.updateMultipleUserIds=function(e,t){var n=this;return(null==t||this.guildId===t)&&(0!==(e=e.filter((function(e){return n.allUserIds.has(e)}))).length&&(e.length>50?this.rebuild():e.forEach((function(e){return n.updateUserId(e)})),!0))},t.updateUserId=function(e){if(!this.allUserIds.has(e))return!1;var t=this.findOldState(e),n=t[0],r=t[1],a=t[2],o=this.calculateNewState(e,i.default.getChannel(this.parentId)),l=o[0],u=o[1],s=o[2];return(n!==l||r!==u||a!==s)&&(this.removeUserId(e,n),this.addUser(e,l,u,s),!0)},t.addUserId=function(e){var t=this.calculateNewState(e,i.default.getChannel(this.parentId)),n=t[0],r=t[1],a=t[2];this.addUser(e,n,r,a)},t.removeUserId=function(e,t){if(this.allUserIds.delete(e),null!=t&&this.removeUserIdFromSection(e,t))return!0;for(var n in this.sections)if(this.removeUserIdFromSection(e,n))return!0;return!1},t.addUser=function(e,t,n,r,a){this.allUserIds.add(e);var o=f.default.getUser(e);if(null!=o&&""!==o.username){t in this.sections||(this.sections[t]={sectionId:t,usersById:{},userIds:[]});var i=this.sections[t];if(i.usersById[e]={userId:e,displayName:n,canViewChannel:r},a)i.userIds.push(e);else{var l=this.findUserIdSortedPosition(i,e,n);i.userIds.splice(l,0,e)}this.version++}},t.findUserIdSortedPosition=function(e,t,n){for(var r=e.userIds,a=e.usersById,o=0;o<r.length;o++){var i=r[o],l=a[i].displayName;if(l===n){if(t<i)return o}else if(null==l){if(null!=n)return o}else if(null!=n&&n<l)return o}return r.length},t.removeUserIdFromSection=function(e,t){var n=this.sections[t];return null!=t&&(e in n.usersById&&(delete n.usersById[e],n.userIds=n.userIds.filter((function(t){return t!==e})),this.version++,!0))},t.findOldState=function(e){for(var t in this.sections){var n=this.sections[t];if(e in n.usersById){var r=n.usersById[e];return[t,r.displayName,r.canViewChannel]}}return[void 0,void 0,!1]},t.calculateNewState=function(e,t){var n,r,a=l.default.getMember(this.guildId,e),o=f.default.getUser(e),i=f.default.getNullableCurrentUser(),u=(null==o?void 0:o.id)===(null==i?void 0:i.id)?d.default.getStatus():s.default.getStatus(e,this.guildId),c=null!=o&&null!=t&&p.default.can(v.Permissions.VIEW_CHANNEL,o,t),y=u!==v.StatusTypes.OFFLINE&&u!==v.StatusTypes.INVISIBLE&&u!==v.StatusTypes.UNKNOWN?null!==(n=null==a?void 0:a.hoistRoleId)&&void 0!==n?n:"online":"offline",m=null!==(r=null==a?void 0:a.nick)&&void 0!==r?r:null==o?void 0:o.username;return[y,null==m?void 0:m.toLowerCase(),c]},e}();function E(e){return g(e.user.id)}function g(e){if(null==e)return!1;var t=!1;for(var n in _)_[n].updateUserId(e)&&(t=!0);return t}function S(e){var t=e.guildId,n=!1;for(var r in _)_[r].guildId===t&&(_[r].rebuild(),n=!0);return n}var O=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(i.default,l.default,u.default,s.default,d.default,f.default),this.syncWith([u.default],(function(){var e=u.default.getSubscribedThreadIds(),t=!1;for(var n in _)e.has(n)||((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Removing thread member list because subscription removed "+n),delete _[n],t=!0);return t})),this.syncWith([d.default],(function(){var e;return g(null===(e=f.default.getNullableCurrentUser())||void 0===e?void 0:e.id)}))},a.getMemberListVersion=function(e){var t;return null===(t=_[e])||void 0===t?void 0:t.version},a.getMemberListSections=function(e){var t;return null===(t=_[e])||void 0===t?void 0:t.sections},a.canUserViewChannel=function(e,t,n){var r,a=_[e];if(null==a)return!1;var o=a.sections[t].usersById[n];return null!==(r=null==o?void 0:o.canViewChannel)&&void 0!==r&&r},r}(a.default.Store))(o.default,{CONNECTION_OPEN:function(e){_={}},THREAD_MEMBERS_UPDATE:function(e){if(!(e.id in _))return!1;var t,n;null===(t=e.addedMembers)||void 0===t||t.forEach((function(t){var n=t.userId;return _[e.id].addUserId(n)})),null===(n=e.removedMemberIds)||void 0===n||n.forEach((function(t){return _[e.id].removeUserId(t)}))},THREAD_UPDATE:function(e){var t,n=e.channel;if(!(n.id in _)||!0!==(null===(t=n.threadMetadata)||void 0===t?void 0:t.archived))return!1;delete _[n.id]},THREAD_DELETE:function(e){var t=e.channel;if(!(t.id in _))return!1;delete _[t.id]},CHANNEL_UPDATES:function(e){var t=e.updates,n=new Set(t.map((function(e){return e.channel.id}))),r=!1;for(var a in _)n.has(_[a].parentId)&&(_[a].rebuild(),r=!0);return r},THREAD_MEMBER_LIST_UPDATE:function(e){var t=e.threadId,n=e.guildId,r=e.members,a=i.default.getChannel(t),o=null==a?void 0:a.parent_id;null!=o&&(_[t]=new h(n,o,t),_[t].rebuild(r.map((function(e){return e.user_id}))))},USER_UPDATE:E,PRESENCE_UPDATE:E,GUILD_MEMBER_ADD:E,GUILD_MEMBER_UPDATE:E,GUILD_MEMBER_REMOVE:E,PRESENCES_REPLACE:function(e){var t=e.presences,n=(0,r.default)(t).map((function(e){var t;return null===(t=e.user)||void 0===t?void 0:t.id})).filter(c.isNotNullish).uniq().value(),a=!1;for(var o in _)_[o].updateMultipleUserIds(n)&&(a=!0);return a},GUILD_MEMBERS_CHUNK:function(e){var t=e.guildId,n=e.members.map((function(e){return e.user.id})),r=!1;for(var a in _)_[a].updateMultipleUserIds(n,t)&&(r=!0);return r},GUILD_ROLE_UPDATE:S,GUILD_ROLE_DELETE:S});t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=g(n(3)),o=g(n(2)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(11395)),l=g(n(708)),u=g(n(11)),s=g(n(1268)),d=g(n(10)),f=g(n(298)),c=g(n(56)),p=g(n(15)),v=g(n(94)),y=g(n(70)),m=g(n(36)),_=g(n(107)),h=n(1);function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){return e&&e.__esModule?e:{default:e}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=new i.default((function(e,t){(null!=p.default.getGuild(e)||f.default.isUnavailable(e))&&(o.default.dispatch({type:h.ActionTypes.GUILD_SUBSCRIPTIONS_FLUSH,guildId:e,subscriptions:t}),(window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" GUILD_SUBSCRIPTIONS_FLUSH "+e+" "+JSON.stringify(t)))}));function C(){T.forEach((function(e){e===_.default.getGuildId()||e===v.default.getGuildId()||null!=r&&r.guildId===e||T.clear(e)}))}function b(e,t){return T.subscribeToGuild(e),(window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" subscribe "+t),null!=t&&s.default.getSection(t)===h.ChannelSections.MEMBERS&&M(e,t,i.DEFAULT_RANGES)}function M(e,t,n){var r=d.default.getChannel(t);return null!=r&&((null==r?void 0:r.isThread())?r.type===h.ChannelTypes.ANNOUNCEMENT_THREAD?T.subscribeChannel(e,r.parent_id,n):!!r.isActiveThread()&&((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" Subscribe active thread "+t),T.subscribeThreadMemberList(e,t,m.default.getChannelId())):T.subscribeChannel(e,t,n))}function N(e){e.type===h.ActionTypes.CONNECTION_OPEN&&C();var t=_.default.getGuildId();null!=t&&b(t,m.default.getChannelId(t)),T.forEach((function(e){null==p.default.getGuild(e)?T.clear(e):o.default.dirtyDispatch({type:h.ActionTypes.GUILD_SUBSCRIPTIONS_FLUSH,guildId:e,subscriptions:T.get(e)})}))}function A(e){var t=e.guildId,n=e.channelId;return!f.default.isUnavailable(t)&&b(t,n)}function P(){return b(_.default.getGuildId(),m.default.getChannelId())}function R(){var e=l.default.getSyncingWith();if(null==e)null!=r&&(T.unsubscribeUser(r.guildId,r.userId),r=null);else{var t=e.userId;if(null!=r&&r.userId===t)return!1;if(y.default.isFriend(t))return!1;var n=c.default.memberOf(t);if(0===n.length)return!1;var a=n[0];r={guildId:a,userId:t},T.subscribeUser(a,t)}return!1}var L=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(d.default,p.default,_.default,m.default,v.default,u.default,s.default),this.syncWith([l.default],R)},a.isSubscribedToTyping=function(e){return!0===T.get(e).typing},a.getSubscribedThreadIds=function(){return T.getSubscribedThreadIds()},r}(a.default.Store))(o.default,{CONNECTION_OPEN:N,CONNECTION_RESUMED:N,CONNECTION_CLOSED:function(e){C()},IDLE:function(e){if(!e.idle)return!1;C()},LOGOUT:function(e){T.reset()},VOICE_CHANNEL_SELECT:A,CHANNEL_SELECT:A,GUILD_CREATE:function(e){e.guild.id===_.default.getGuildId()&&P()},GUILD_DELETE:function(e){var t=e.guild;T.clear(t.id)},GUILD_SUBSCRIPTIONS_MEMBERS_ADD:function(e){var t=e.guildId;return e.userIds.forEach((function(e){e!==u.default.getId()&&T.subscribeUser(t,e)})),!1},GUILD_SUBSCRIPTIONS_MEMBERS_REMOVE:function(e){var t=e.guildId;return e.userIds.forEach((function(e){T.unsubscribeUser(t,e)})),!1},GUILD_SUBSCRIPTIONS_CHANNEL:function(e){return M(e.guildId,e.channelId,e.ranges)},CHANNEL_PRELOAD:function(e){return b(e.guildId,e.channelId)},INBOX_OPEN:function(e){for(var t,n=O(e.guildIds);!(t=n()).done;){var r=t.value;null!=r&&T.subscribeToGuild(r)}return!1},THREAD_UPDATE:function(e){var t=e.channel;return t.isArchivedThread()?((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" ThreadUpdate -> Archivedthread -> "+t.id),T.unsubscribeThreadMemberList(t.guild_id,t.id)):!(!t.isActiveThread()||m.default.getChannelId()!==t.id)&&((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" ThreadUpdate -> ActiveThread -> "+t.id),void T.subscribeThreadMemberList(t.guild_id,t.id,m.default.getChannelId()))},THREAD_DELETE:function(e){var t=e.channel;return T.unsubscribeThreadMemberList(t.guild_id,t.id)},THREAD_LIST_SYNC:function(e){return P()},CHANNEL_TOGGLE_MEMBERS_SECTION:function(e){return P()}});t.default=L},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(8)),a=p(n(66)),o=p(n(118)),i=p(n(8359)),l=p(n(160)),u=p(n(13)),s=p(n(16)),d=n(1247),f=p(n(43)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){return(v=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}).apply(this,arguments)}var y=s.default.embedded&&s.default.isWindows(),m=y&&parseFloat(o.default.os.release)<10,_=!0;if(y&&!m){var h=o.default.os.release.split("."),E=h[0],g=h[2];_=parseInt(E)>10||parseInt(g)>=15063}var S=m||"Chrome"===a.default.name&&parseFloat(a.default.version)<47||"Firefox"===a.default.name&&parseFloat(a.default.version)<52;function O(){f.default.flashFrame(!1)}y&&(window.addEventListener("focus",O),f.default.on("MAIN_WINDOW_FOCUS",O));var I=window.Notification;if(m){var T,C,b={};f.default.on("NOTIFICATION_CLICK",(function(e,t){var n=b[t];null!=n&&(n.onclick(),n.close())})),f.default.send("NOTIFICATIONS_CLEAR"),C=T=function(){function t(t,n){var r=this,a=n.body,o=n.icon;this.id=I._id++,this.onshow=function(){},this.onclick=function(){},this.onclose=function(){},this.title=t,this.body=a,this.icon=o,e((function(){return r.onshow()})),b[this.id]=this,f.default.send("NOTIFICATION_SHOW",{id:this.id,title:this.title,body:this.body,icon:this.icon})}return t.requestPermission=function(e){e()},t.prototype.close=function(){null!=b[this.id]&&(delete b[this.id],f.default.send("NOTIFICATION_CLOSE",this.id),this.onclose())},t}(),T.permission="granted",T._id=0,I=C}function M(){return null!=I&&"granted"===I.permission}var N={hasPermission:M,requestPermission:function(e){null!=I&&I.requestPermission((function(){null!=e&&e(M())}))},showNotification:function(e,t,n,a){if(!l.default.disableNotifications&&M()&&(!s.default.embedded||f.default.shouldDisplayNotifications())){a.sound&&(0,d.playSound)(a.sound,a.volume||1),a.trackingProps&&u.default.track(c.AnalyticEvents.NOTIFICATION_VIEWED,v({},a.trackingProps));var o=a&&a.tag||null;s.default.isLinux()&&(n=r.default.escape(n));var p,m={icon:e,body:n,tag:o,silent:!0};y&&i.default.taskbarFlash&&f.default.flashFrame(!0);try{p=new I(t,m)}catch(e){return null}return p.onclick=function(){s.default.embedded?f.default.focus():(window.focus(),p.close()),a.onClick&&a.onClick()},S&&setTimeout((function(){return p.close()}),5e3),_?p:{close:function(){p.onclose&&p.onclose()}}}a.sound&&!1!==a.playSoundIfDisabled&&(0,d.playSound)(a.sound,a.volume||1)}};t.default=N}).call(this,n(68).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortList=function(e,t){a.default.dispatch({type:o.ActionTypes.LIBRARY_TABLE_SORT_UPDATE,key:e,direction:t})},t.updateLibraryFilter=function(e){a.default.dispatch({type:o.ActionTypes.LIBRARY_APPLICATION_FILTER_UPDATE,query:e})},t.updateActiveRowKey=function(e,t){void 0===t&&(t=!1);a.default.dispatch({type:o.ActionTypes.LIBRARY_TABLE_ACTIVE_ROW_ID_UPDATE,key:e,isKeyboardEvent:t})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(8318)),i=n(42),l=v(n(8293)),u=v(n(8508)),s=n(13),d=n(263),f=n(1),c=v(n(6)),p=v(n(8105));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}var h=(0,d.isSupportedPlatform)()||!1,E=m(o.default.Icon,{icon:u.default,"aria-hidden":!0}),g=m(o.default.Divider,{});function S(e){var t=e.currentRoute,n=e.renderToolbar,r=a.useContext(s.AnalyticsContext);var u=h||t===f.Routes.APPLICATION_LIBRARY_SETTINGS;return m(o.default,{className:p.default.libraryHeader,toolbar:null==n?void 0:n()},void 0,E,m(o.default.Title,{},void 0,c.default.Messages.LIBRARY),g,m(l.default,{type:l.default.Types.TOP_PILL,selectedItem:t,onItemSelect:function(e){e!==t&&(0,i.transitionTo)(e,{state:{analyticsSource:_({},r.location,{section:f.AnalyticsSections.TABS,object:f.AnalyticsObjects.NAVIGATION_LINK})}})}},void 0,m(l.default.Item,{id:f.Routes.APPLICATION_LIBRARY},void 0,c.default.Messages.APPLICATION_LIBRARY_MY_GAMES),u?m(l.default.Item,{id:f.Routes.APPLICATION_LIBRARY_SETTINGS},void 0,c.default.Messages.SETTINGS):null))}S.displayName="ApplicationLibraryHeader";var O=a.memo(S);t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=T(n(0)),o=n(3),i=n(389),l=O(n(8502)),u=T(n(8253)),s=O(n(71)),d=O(n(120)),f=O(n(11423)),c=O(n(11424)),p=O(n(11425)),v=O(n(11426)),y=O(n(11427)),m=O(n(11428)),_=O(n(11429)),h=O(n(11430)),E=O(n(11431)),g=n(1),S=O(n(6));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(){return(b=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}).apply(this,arguments)}function M(e){var t=e.application,n=e.libraryApplication,r=e.analyticsContext,a=e.onSelect,o=b({},null!=r?r.location:null,{object:g.AnalyticsObjects.CONTEXT_MENU}),l=(0,v.default)(n,o),s=(0,y.default)(n),d=(0,_.default)(n),O=(0,E.default)(n),I=(0,h.default)(n),T=(0,p.default)(n,t),M=(0,m.default)(n,t),N=(0,f.default)(n,t),A=(0,c.default)(t);return C(u.default,{navId:"game-context",onClose:i.closeContextMenu,"aria-label":S.default.Messages.APPLICATION_ACTIONS_MENU_LABEL,onSelect:a},void 0,l,s,d,O,I,T,M,C(u.MenuGroup,{},void 0,N),C(u.MenuGroup,{},void 0,A))}function N(e){var t=e.applicationId,n=e.branchId,r=(0,o.useStateFromStores)([s.default],(function(){return s.default.getGame(t)}),[t]),i=(0,o.useStateFromStores)([d.default],(function(){return null!=n?d.default.getLibraryApplication(t,n):d.default.getActiveLibraryApplication(t)}),[t,n]);return null==r||null==i?a.createElement(l.default,b({},e,{id:t})):a.createElement(M,b({},e,{application:r,libraryApplication:i}))}M.displayName="FullApplicationGameContextMenu",N.displayName="ApplicationGameContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(61)),l=f(n(1266)),u=f(n(1337)),s=n(1),d=f(n(8106));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){return y("div",{className:e.className},void 0,e.children)};m.displayName="RowHeader";var _=function(e){return y("div",{className:e.className},void 0,e.children)};_.displayName="Row";var h=function(e){return y("div",{className:e.className},void 0,e.children)};h.displayName="Cell";var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleSort=function(e){var n=t.props,r=n.sortKey,a=n.sortDirection,o=n.onSort;null!=o&&o(e,r===e&&a===s.TableSortDirections.ASCENDING?s.TableSortDirections.DESCENDING:s.TableSortDirections.ASCENDING)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var f=r.prototype;return f.isSortable=function(e){return null!=e.sort&&!1!==e.sort},f.getDefaultSort=function(e){return function(t,n){var r=t[e],a=n[e];return null!=r&&null!=a?r===a?0:r<a?-1:1:0}},f.renderHeader=function(e){var t,n=this;void 0===e&&(e=!1);var r=this.props,a=r.columns,f=r.data,c=r.sortDirection,p=r.sortKey,v=r.headerCellClassName,_=r.headerClassName,h=r.sortedHeaderCellClassName,E=r.stickyHeader,g=a.map((function(e){var t,r=null!=e.renderHeader?e.renderHeader(e,f):e.key,a=c===s.TableSortDirections.ASCENDING?u.default:l.default;return y(i.default,{className:(0,o.default)(d.default.headerCell,v,e.headerCellClassName,e.cellClassName,(t={},t[h||d.default.sortedHeaderCell]=p===e.key,t[d.default.clickable]=n.isSortable(e),t)),onClick:n.isSortable(e)?function(){return n.handleSort(e.key)}:void 0},e.key,y("div",{className:d.default.headerCellContent},void 0,r,n.isSortable(e)&&p===e.key?y(a,{className:d.default.sortIcon}):null))}));return y(m,{className:(0,o.default)(_,d.default.row,(t={},t[d.default.stickyHeader]=E&&!e,t[d.default.spacerHeader]=E&&e,t))},void 0,g)},f.renderBody=function(){var e=this.props,t=e.columns,n=e.data,r=e.sortData,i=e.sortKey,l=e.sortDirection,u=e.bodyCellClassName,f=e.rowClassName,c=e.cellProps,v=e.rowProps,y=e.rowComponent,m=e.cellComponent,_=n;if(r){var h=null!=i?t.find((function(e){return e.key===i})):null,E=[].concat(n),g=null!=h&&h.sort,S=null!=h&&null!=i&&this.isSortable(h)?E.sort("function"==typeof g?function(e,t){return g(e,t,l)}:this.getDefaultSort(i)):E;_=null!=h&&l===s.TableSortDirections.DESCENDING?S.reverse():S}return _.map((function(e,n){var r=t.map((function(t){return a.createElement(m,p({},c,{key:t.key,item:e,className:(0,o.default)(u,t.bodyCellClassName,t.cellClassName)}),null!=t.render?t.render(e,c,n):e[t.key])}));return a.createElement(y,p({},v,{key:e.key,item:e,className:(0,o.default)(d.default.row,f)}),r)}))},f.render=function(){var e=this.props,t=e.className,n=e.hasHeader,r=e.stickyHeader;return y("div",{className:t},void 0,n?this.renderHeader():null,n&&r?this.renderHeader(!0):null,this.renderBody())},r}(a.PureComponent);E.displayName="Table",E.SortDirection=s.TableSortDirections,E.defaultProps={initialSortDirection:s.TableSortDirections.ASCENDING,rowHeaderComponent:m,rowComponent:_,cellComponent:h,hasHeader:!0,sortData:!0,stickyHeader:!1};var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=s("rect",{x:"2",y:"20",width:"26",height:"2",transform:"rotate(-45 2 20)",fill:"#ed4245"});function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,f=void 0===l?"currentColor":l,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",fillRule:"evenodd"},void 0,s("path",{className:c,fill:f,d:"M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z"}),d))}f.displayName="OverlayOff"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(9)),i=n(5965),l=n(389),u=O(n(8502)),s=O(n(150)),d=n(193),f=O(n(61)),c=O(n(375)),p=O(n(151)),v=O(n(149)),y=O(n(248)),m=O(n(24)),_=n(1),h=O(n(6)),E=O(n(8118)),g=O(n(8993)),S=O(n(8994));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){b(o,r,a,i,l,"next",e)}function l(e){b(o,r,a,i,l,"throw",e)}i(void 0)}))}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={loaded:!1,hasBeenSeen:!1,isVisible:!1,submitting:!1},t.handleClickView=function(){var e=M(regeneratorRuntime.mark((function e(n){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,a=r.onView,o=r.guild,n.stopPropagation(),t.setState({submitting:!0}),e.prev=3,e.t0=null!=a,!e.t0){e.next=8;break}return e.next=8,a(o.id);case 8:return e.prev=8,t.setState({submitting:!1}),e.finish(8);case 11:case"end":return e.stop()}}),e,null,[[3,,8,11]])})));return function(t){return e.apply(this,arguments)}}(),t.handleVisibilityChange=function(e){var n=t.props,r=n.onGuildCardSeen,a=n.guild;null!=a&&!t.state.hasBeenSeen&&e&&(t.setState({hasBeenSeen:e}),null!=r&&r(a.id))},t.handleContextMenu=function(e){(0,l.openContextMenu)(e,(function(e){return a.createElement(u.default,C({},e,{id:t.props.guild.id}))}))},t.setIsVisible=function(e){t.setState({isVisible:e})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var O=r.prototype;return O.getDefaultSplashURL=function(e){switch(e){case _.ThemeTypes.DARK:return g.default;case _.ThemeTypes.LIGHT:return S.default}},O.render=function(){var e,t,n=this,r=this.props,a=r.guild,l=r.className,u=r.theme,_=this.state,g=_.loaded,S=_.hasBeenSeen,O=_.isVisible,I=_.submitting,C=a.name,b=a.description,M=a.presenceCount,N=a.memberCount,A=s.default.getGuildDiscoverySplashURL({id:a.id,splash:a.discoverySplash,size:300*(0,d.getDevicePixelRatio)()}),P=null!=A?A:this.getDefaultSplashURL(u),R=s.default.getGuildIconURL({id:a.id,icon:a.icon,size:40})||void 0;return T(i.VisibilitySensor,{active:!O,onChange:this.setIsVisible,threshold:.1},void 0,O?T(i.VisibilitySensor,{onChange:this.handleVisibilityChange,active:!S,threshold:.55},void 0,T("div",{className:(0,o.default)(l,(e={},e[E.default.loaded]=g,e[E.default.loading]=!g,e))},void 0,I?T(p.default,{type:p.default.Type.PULSING_ELLIPSIS,className:E.default.spinner}):null,T(f.default,{onClick:this.handleClickView,className:(0,o.default)(E.default.card,(t={},t[E.default.submitting]=I,t)),onContextMenu:this.handleContextMenu},void 0,T("div",{className:E.default.cardHeader},void 0,T("div",{className:E.default.splash},void 0,T("img",{src:P,alt:"",className:E.default.splashImage,onLoad:function(){return n.setState({loaded:!0})}})),T("div",{className:E.default.guildIcon},void 0,T(y.default,{mask:y.default.Masks.SQUIRCLE,width:48,height:48},void 0,T("div",{className:E.default.iconMask},void 0,T(y.default,{mask:y.default.Masks.SQUIRCLE,width:40,height:40},void 0,T("img",{src:R,alt:"",className:E.default.avatar})))))),T("div",{className:E.default.guildInfo},void 0,T("div",{className:E.default.title},void 0,T(c.default,{className:E.default.guildBadge,guild:a,tooltipColor:v.default.Colors.PRIMARY}),T(m.default,{className:E.default.guildName,size:m.default.Sizes.SIZE_16,color:m.default.Colors.HEADER_PRIMARY},void 0,C)),T(m.default,{className:E.default.description,size:m.default.Sizes.SIZE_14,color:m.default.Colors.HEADER_SECONDARY},void 0,b),T("div",{className:E.default.memberInfo},void 0,null!=M&&T("div",{className:E.default.memberCount},void 0,T("div",{className:E.default.dotOnline}),T(m.default,{size:m.default.Sizes.SIZE_12,color:m.default.Colors.HEADER_SECONDARY},void 0,h.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:M}))),null!=N&&T("div",{className:E.default.memberCount},void 0,T("div",{className:E.default.dotOffline}),T(m.default,{size:m.default.Sizes.SIZE_12,color:m.default.Colors.HEADER_SECONDARY},void 0,h.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:N})))))))):T("div",{className:E.default.card}))},r}(a.PureComponent);A.displayName="GuildDiscoveryCard",A.Placeholder=function(e){return T("div",{className:(0,o.default)(e.className,E.default.cardPlaceholder)})};var P=A;t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=j;var r,a=T(n(0)),o=O(n(9)),i=O(n(8)),l=n(3),u=T(n(8700)),s=n(1213),d=O(n(8483)),f=O(n(1275)),c=O(n(61)),p=O(n(10072)),v=T(n(1159)),y=O(n(24)),m=n(13),_=n(121),h=T(n(701)),E=n(1),g=O(n(6)),S=O(n(8119));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(){return(M=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}).apply(this,arguments)}var N=M({},v.DEFAULT_SELECT_STYLES,{container:function(e){return M({},e,{pointerEvents:null})},control:function(e,t){var n=t.menuIsOpen,r=t.theme.colors;return M({},e,{height:"100%",border:"none",backgroundColor:r.menuBackground,boxShadow:null,color:r.text,fontWeight:500,fontSize:16,cursor:"pointer",borderRadius:n?"8px 8px 0 0":"8px","&:hover":{border:"none",boxShadow:null}})},menu:function(e,t){var n=t.theme.colors;return M({},e,{backgroundColor:n.menuBackground,border:"none",borderRadius:"0 0 8px 8px",color:n.text,marginTop:-1,marginBottom:-1})}}),A=M({},v.LIGHT_THEME_COLORS,{text:E.Colors.PRIMARY_LIGHT_500,selectedOptionBackground:E.Colors.PRIMARY_DARK_100,menuBorder:E.Colors.PRIMARY_DARK_200,menuBackground:E.Colors.PRIMARY_LIGHT_200}),P=M({},v.DARK_THEME_COLORS,{menuBackground:E.Colors.PRIMARY_DARK_700}),R=i.default.throttle(h.trackSearchResultsViewed,1e3,{leading:!1,trailing:!0}),L=function(e){var t=e.value;return b(y.default,{},void 0,t.name)};L.displayName="LanguageOption";var D=function(e){var t,n=e.isSelected,r=e.onCategoryChange,a=e.categoryId,i=e.name,l=e.count;return b(c.default,{onClick:function(){return r(a)},className:(0,o.default)(S.default.categoryPill,(t={},t[S.default.selected]=n,t))},void 0,b(y.default,{className:S.default.categoryLabel},void 0,null!=l?i+" ("+l+")":i))};D.displayName="Category";var w=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this)._searchRef=a.createRef(),n.canSearch=function(e){return e.trim().length>=2},n.doSearch=function(e,t,r,a){var o=n.props,i=o.defaultLanguage,l=o.currentCategoryId,s=n.state,d=s.query,f=s.selectedLanguage;a&&u.getSearchResultsCount(d),n.setState({searchId:h.makeAnalyticsID(),queryHasChanged:!1,isSearching:!0}),u.doAlgoliaSearch(d,{categoryId:null==r?l:r,preferredLocale:(null==f?void 0:f.code)||i.code,offset:e,length:t})},n.handleSearchBlurred=function(e){var t=n.props.onSearchBlur;n.setState({inputFocused:!1}),t&&t()},n.handleSearchKeyPress=function(e){var t=n.state,r=t.query,a=t.queryHasChanged;n.canSearch(r)&&a&&e.charCode===E.KeyboardKeys.ENTER?n.doSearch(0,12,void 0,!0):0===r.length&&e.charCode===E.KeyboardKeys.ENTER&&n.setState({isSearching:!1})},n.handleQueryChanged=function(e){n.setState({query:e,queryHasChanged:!0})},n.handleQueryCleared=function(){n.setState({query:"",queryHasChanged:!0,isSearching:!1})},n.handleLanguageChange=function(e){var t=e.value,r=n.props.mostRecentQuery;n.setState({selectedLanguage:t},(function(){n.canSearch(r)&&n.doSearch(0,12)}))},n.handleCategoryChange=function(e){var t=n.props.mostRecentQuery;u.selectCategory(e),n.canSearch(t)&&n.doSearch(0,12,e)},n.handleFocus=function(){var e=n.props.onSearchFocus;n.setState({inputFocused:!0}),e&&e()},n.focusInput=function(){var e;null===(e=n._searchRef.current)||void 0===e||e.focus()},n.state={searchId:h.makeAnalyticsID(),query:t.isSearchPage?t.mostRecentQuery:"",queryHasChanged:!1,isSearching:!1,selectedLanguage:t.defaultLanguage,inputFocused:!1},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var i=r.prototype;return i.componentDidMount=function(){var e=this.props,t=e.loadId,n=e.searchResults,r=e.currentCategoryId,a=this.state,o=a.searchId,i=a.query,l=this.context;if(null==f.default.getSearchIndex()&&u.createAlgoliaIndex(),_.ComponentDispatch.subscribe(E.ComponentActions.GLOBAL_CLIPBOARD_PASTE,this.focusInput),_.ComponentDispatch.subscribe(E.ComponentActions.TEXTAREA_FOCUS,this.focusInput),i.length){var d=r!==s.DISCOVERY_ALL_CATEGORIES_ID?r:null;R(t,o,i,n.guilds,l,d)}},i.componentDidUpdate=function(e,t){var n=this.props,r=n.loadId,a=n.isFetchingSearch,o=n.searchResults,i=n.currentCategoryId,l=this.state,u=l.isSearching,d=l.searchId,f=l.query,c=this.context,p=e.isFetchingSearch&&!a,v=i!==s.DISCOVERY_ALL_CATEGORIES_ID?i:null;u&&p&&R(r,d,f,o.guilds,c,v),!t.isSearching&&u&&h.trackSearchStarted(r,c)},i.componentWillUnmount=function(){_.ComponentDispatch.unsubscribe(E.ComponentActions.GLOBAL_CLIPBOARD_PASTE,this.focusInput),_.ComponentDispatch.unsubscribe(E.ComponentActions.TEXTAREA_FOCUS,this.focusInput)},i.renderSearchOptions=function(){var e=this.props.availableLanguages,t=this.state.selectedLanguage;if(null==e)return null;var n=e.map((function(e){return{value:e}}));return b(v.default,{value:t,options:n,onChange:this.handleLanguageChange,searchable:!1,optionRenderer:L,valueRenderer:L,className:S.default.languageSelector,styleOverrides:N,lightThemeColorOverrides:A,darkThemeColorOverrides:P})},i.renderCategories=function(){var e=this,t=this.props,n=t.currentCategoryId,r=t.countsByCategory;return b("div",{className:S.default.categories},void 0,null==r?void 0:r.map((function(t){var r=t[0],a=t[1];return b(D,{categoryId:r,name:r===s.DISCOVERY_ALL_CATEGORIES_ID?g.default.Messages.GUILD_DISCOVERY_ALL_CATEGORY_FILTER:d.default.getCategoryName(r),onCategoryChange:e.handleCategoryChange,isSelected:n===r,count:a},r)})))},i.render=function(){var e,t=this.state,n=t.query,r=t.inputFocused,i=this.props,l=i.placeholder,u=i.isSearchPage;return a.createElement(a.Fragment,null,b("div",{className:(0,o.default)(S.default.container,(e={},e[S.default.searchPage]=u,e))},void 0,b("div",{className:(0,o.default)(S.default.search)},void 0,a.createElement(p.default,{ref:this._searchRef,searchTerm:n,className:S.default.searchBox,inputClassName:S.default.searchBoxInput,closeIconClassName:S.default.closeIcon,searchIconClassName:S.default.searchIcon,label:g.default.Messages.GUILD_DISCOVERY_SEARCH_LABEL,placeholder:l,onChange:this.handleQueryChanged,onClear:this.handleQueryCleared,onFocus:this.handleFocus,onBlur:this.handleSearchBlurred,onKeyPress:this.handleSearchKeyPress,autoFocus:!u,cta:r&&null!=n&&n.length>1?g.default.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})),u?this.renderSearchOptions():null),u?this.renderCategories():null)},r}(a.PureComponent);function j(e){var t=(0,l.useStateFromStores)([d.default],(function(){return d.default.getDiscoveryCategories()})),n=(0,l.useStateFromStores)([f.default],(function(){return f.default.getTopCategoryCounts(e.mostRecentQuery)}));return a.createElement(w,M({},e,{categories:t,countsByCategory:n}))}w.displayName="GuildDiscoverySearchBarComponent",w.contextType=m.AnalyticsContext,j.displayName="GuildDiscoverySearchBar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STAGE_DISCOVERY_SIDEBAR_CATEGORIES=t.STAGE_DISCOVERY_SIDEBAR_CATEGORY_IDS=t.CategoryIcons=void 0;var r,a,o,i=(r=n(6))&&r.__esModule?r:{default:r};t.CategoryIcons=a,function(e){e[e.Activity=0]="Activity",e[e.Discover=1]="Discover",e[e.Education=2]="Education",e[e.Music=3]="Music",e[e.Science=4]="Science",e[e.Stage=5]="Stage",e[e.Television=6]="Television"}(a||(t.CategoryIcons=a={})),t.STAGE_DISCOVERY_SIDEBAR_CATEGORY_IDS=o,function(e){e[e.LiveStages=1]="LiveStages"}(o||(t.STAGE_DISCOVERY_SIDEBAR_CATEGORY_IDS=o={}));var l=[{categoryId:o.LiveStages,name:i.default.Messages.STAGE_DISCOVERY,icon:a.Stage}];t.STAGE_DISCOVERY_SIDEBAR_CATEGORIES=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClearAfterValues=t.STATUS_MAX_LENGTH=void 0;t.STATUS_MAX_LENGTH=128;var r=Object.freeze({MINUTES_30:18e5,HOURS_1:36e5,HOURS_4:144e5,TODAY:"TODAY"});t.ClearAfterValues=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUserSettingsSections=function(e){return ye(e).filter((function(e){var t=e.section;return t!==c.SectionTypes.HEADER&&t!==c.SectionTypes.CUSTOM&&t!==c.SectionTypes.DIVIDER})).filter((function(e){return null==e.predicate||e.predicate()}))},t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=fe();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=de(n(363)),l=de(n(8715)),u=n(687),s=de(n(473)),d=de(n(8257)),f=de(n(8575)),c=n(8305),p=de(n(9061)),v=de(n(1259)),y=de(n(105)),m=de(n(106)),_=n(8277),h=de(n(8759)),E=de(n(9231)),g=de(n(9232)),S=de(n(11474)),O=de(n(11476)),I=de(n(11477)),T=de(n(759)),C=de(n(51)),b=de(n(1287)),M=de(n(5956)),N=de(n(1418)),A=de(n(39)),P=de(n(12)),R=de(n(1147)),L=de(n(466)),D=n(41),w=de(n(24)),j=de(n(16)),k=n(96),U=de(n(11570)),G=de(n(11571)),F=de(n(11572)),B=de(n(11574)),H=de(n(11596)),x=de(n(11598)),V=de(n(11599)),W=de(n(11603)),Y=de(n(11612)),z=de(n(11615)),K=de(n(11619)),$=de(n(11622)),Z=de(n(11644)),q=de(n(11651)),X=de(n(11654)),J=de(n(11655)),Q=de(n(11658)),ee=de(n(11659)),te=de(n(11666)),ne=de(n(11667)),re=de(n(11668)),ae=de(n(11670)),oe=de(n(11671)),ie=de(n(11683)),le=n(1),ue=de(n(6)),se=de(n(8187));function de(e){return e&&e.__esModule?e:{default:e}}function fe(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return fe=function(){return e},e}function ce(){return(ce=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}).apply(this,arguments)}function pe(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var ve=ie.default;function ye(e){var t=e.user,n=e.badgeCustomProfiles,r=e.premiumSubscription,o=e.useStandaloneSubscriptionsTab,u=e.unseenGiftCount,s=[{section:c.SectionTypes.HEADER,label:ue.default.Messages.USER_SETTINGS},{section:le.UserSettingsSections.ACCOUNT,label:ue.default.Messages.USER_SETTINGS_MY_ACCOUNT,ariaLabel:ue.default.Messages.USER_SETTINGS_MY_ACCOUNT,element:B.default},{section:le.UserSettingsSections.PROFILE_CUSTOMIZATION,label:ue.default.Messages.USER_SETTINGS_USER_PROFILE,ariaLabel:ue.default.Messages.USER_SETTINGS_USER_PROFILE,element:I.default,notice:{store:M.default,element:O.default},newIndicator:n},{section:le.UserSettingsSections.PRIVACY_AND_SAFETY,label:ue.default.Messages.PRIVACY_AND_SAFETY,element:ne.default},{section:le.UserSettingsSections.AUTHORIZED_APPS,label:ue.default.Messages.AUTHORIZED_APPS,element:V.default},{section:le.UserSettingsSections.CONNECTIONS,label:ue.default.Messages.CONNECTIONS,element:Y.default},{section:c.SectionTypes.DIVIDER},{section:c.SectionTypes.HEADER,label:ue.default.Messages.BILLING_SETTINGS}];return o?s.push({section:le.UserSettingsSections.SUBSCRIPTIONS,ariaLabel:ue.default.Messages.SUBSCRIPTIONS_TITLE,label:ue.default.Messages.SUBSCRIPTIONS_TITLE,className:se.default.premiumTabItem,element:g.default},{section:le.UserSettingsSections.PREMIUM,ariaLabel:ue.default.Messages.PREMIUM_TITLE,label:ue.default.Messages.PREMIUM_TITLE,element:E.default,className:se.default.premiumTabItem,icon:pe(te.default,{className:se.default.icon})}):s.push({section:le.UserSettingsSections.PREMIUM,ariaLabel:(0,k.hasPremiumSubscriptionToDisplay)(t,r)?ue.default.Messages.SUBSCRIPTIONS_TITLE:ue.default.Messages.PREMIUM_TITLE,label:(0,k.hasPremiumSubscriptionToDisplay)(t,r)?ue.default.Messages.SUBSCRIPTIONS_TITLE:ue.default.Messages.PREMIUM_TITLE,element:E.default,className:se.default.premiumTabItem,icon:pe(te.default,{className:se.default.icon})}),s.push({section:le.UserSettingsSections.PREMIUM_GUILD_SUBSCRIPTION,label:ue.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TITLE,element:ee.default},{section:le.UserSettingsSections.INVENTORY,label:ue.default.Messages.GIFT_INVENTORY,element:Z.default,badgeCount:u,ariaLabel:ue.default.Messages.GIFT_INVENTORY},{section:le.UserSettingsSections.BILLING,label:ue.default.Messages.BILLING,element:W.default},{section:c.SectionTypes.DIVIDER},{section:c.SectionTypes.HEADER,label:ue.default.Messages.APP_SETTINGS},{section:le.UserSettingsSections.APPEARANCE,label:ue.default.Messages.APPEARANCE,element:x.default},{section:le.UserSettingsSections.ACCESSIBILITY,label:ue.default.Messages.ACCESSIBILITY,element:F.default},{section:le.UserSettingsSections.VOICE,label:ue.default.Messages.VOICE_AND_VIDEO,element:oe.default,predicate:function(){return C.default.isSupported()}},{section:le.UserSettingsSections.TEXT,label:ue.default.Messages.TEXT_AND_IMAGES,element:ae.default},{section:le.UserSettingsSections.NOTIFICATIONS,label:ue.default.Messages.NOTIFICATIONS,element:J.default},{section:le.UserSettingsSections.KEYBINDS,label:ue.default.Messages.KEYBINDS,element:q.default},{section:le.UserSettingsSections.LOCALE,label:ue.default.Messages.LANGUAGE,element:X.default},{section:le.UserSettingsSections.WINDOWS,label:ue.default.Messages.USER_SETTINGS_WINDOWS_SETTINGS,element:ie.default,predicate:function(){return j.default.embedded&&j.default.isWindows()}},{section:le.UserSettingsSections.LINUX,label:ue.default.Messages.USER_SETTINGS_LINUX_SETTINGS,element:ve,predicate:function(){return j.default.embedded&&j.default.isLinux()}},{section:le.UserSettingsSections.STREAMER_MODE,label:ue.default.Messages.STREAMER_MODE,element:re.default},{section:le.UserSettingsSections.ADVANCED,label:ue.default.Messages.SETTINGS_ADVANCED,element:H.default},{section:c.SectionTypes.DIVIDER},{section:c.SectionTypes.HEADER,label:ue.default.Messages.ACTIVITY_SETTINGS},{section:le.UserSettingsSections.ACTIVITY_STATUS,label:ue.default.Messages.ACTIVITY_STATUS,element:K.default},{section:le.UserSettingsSections.OVERLAY,label:ue.default.Messages.OVERLAY,element:Q.default,predicate:function(){return b.default.isSupported()||!1}},{section:c.SectionTypes.DIVIDER},{section:"changelog",onClick:function(){return l.default.showChangeLog()},label:ue.default.Messages.CHANGE_LOG},{section:le.UserSettingsSections.HYPESQUAD_ONLINE,label:ue.default.Messages.USER_SETTINGS_HYPESQUAD,element:$.default},{section:le.UserSettingsSections.EXPERIMENTS,label:"Experiments",element:S.default,predicate:function(){return T.default.isDeveloper}},{section:le.UserSettingsSections.DEVELOPER_OPTIONS,label:"Developer Options",element:z.default,predicate:function(){return T.default.isDeveloper}},{section:c.SectionTypes.DIVIDER},{section:"logout",onClick:function(){(0,D.openModal)((function(e){return a.createElement(L.default,ce({header:ue.default.Messages.LOGOUT,confirmText:ue.default.Messages.LOGOUT,cancelText:ue.default.Messages.CANCEL,onCancel:e.onClose,onConfirm:function(){return i.default.logout()}},e),pe(w.default,{size:w.default.Sizes.SIZE_16},void 0,ue.default.Messages.USER_SETTINGS_CONFIRM_LOGOUT))}))},label:ue.default.Messages.LOGOUT,color:le.Colors.STATUS_RED},{section:c.SectionTypes.DIVIDER},{section:c.SectionTypes.CUSTOM,element:G.default},{section:c.SectionTypes.CUSTOM,element:U.default}),s}var me=a.forwardRef((function(){var e=(0,o.useStateFromStores)([P.default],(function(){return P.default.getNullableCurrentUser()})),t=(0,o.useStateFromStores)([A.default],(function(){return A.default.theme})),n=(0,o.useStateFromStores)([y.default],(function(){return y.default.darkSidebar?le.ThemeTypes.DARK:void 0})),r=(0,o.useStateFromStores)([N.default],(function(){return N.default.getSection()})),i=(0,v.default)(r),l=(0,o.useStateFromStores)([R.default],(function(){return R.default.getPremiumTypeSubscription()})),c=(0,o.useStateFromStores)([_.HotspotStore],(function(){return _.HotspotStore.hasHotspot(_.HotspotLocations.PROFILE_CUSTOMIZATION_SETTINGS_BADGE)})),E=p.default.useExperiment({})[0].useStandaloneSubscriptionsTab,g=(0,o.useStateFromStores)([h.default],(function(){return h.default.getUnseenOutboundPromotions()})).length;a.useEffect((function(){var e,t;null!=r&&r!==i&&(e=r,void 0===(t=null!=i?i:null)&&(t=null),m.default.trackWithMetadata(le.AnalyticEvents.SETTINGS_PANE_VIEWED,{settings_type:"user",origin_pane:t,destination_pane:e}))}),[r,i]);var S=a.useMemo((function(){return ye({user:e,premiumSubscription:l,badgeCustomProfiles:c,useStandaloneSubscriptionsTab:E,unseenGiftCount:g})}),[e,l,c,E,g]);return pe(d.default,{root:!0,page:le.AnalyticsPages.USER_SETTINGS},void 0,pe(f.default,{theme:t,sidebarTheme:n,section:r,onSetSection:s.default.setSection,onClose:u.popLayer,sections:S}))}));t.default=me},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleUpsellClick=function(){(0,i.openModal)((function(e){return a.createElement(o.default,s({},e,{source:{page:l.AnalyticsPages.USER_SETTINGS,section:l.AnalyticsSections.SETTINGS_CUSTOMIZE_PROFILE,object:l.AnalyticsObjects.BUTTON_CTA,type:l.AnalyticsObjectTypes.BUY}}))}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(9107))&&r.__esModule?r:{default:r},i=n(41),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(92),o=n(742),i=s(n(1419)),l=n(41),u=s(n(1184));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}var c={openNewUserAgeGateModal:function(e){(0,l.openModal)((function(e){return r.createElement(i.default,e)}),{modalKey:o.NEW_USER_AGE_GATE_MODAL_KEY,onCloseRequest:a.NOOP,onCloseCallback:e})},openClaimAccountModal:function(e,t){void 0===e&&(e=!1),(0,l.openModal)((function(t){return r.createElement(u.default,f({claimRequired:e},t))}),{onCloseRequest:e?a.NOOP:null,onCloseCallback:t})}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(11581),o=l(n(118)),i=l(n(16));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){var t,n;function l(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleFileDownload=function(e){e.preventDefault();var n=t.getFileContents(),r=t.props,a=r.fileName,o=r.onDownload;i.default.embedded?t.downloadNative(n,a):t.downloadHtml5(n,a),o&&o()},t}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var u=l.prototype;return u.getFileContents=function(){var e=this.props.fileContents;return"function"==typeof e&&(e=e()),e},u.downloadNative=function(e,t){o.default.fileManager.saveWithDialog(e,t)},u.downloadHtml5=function(e,t){var n=new Blob([e],{type:this.props.contentType});(0,a.saveAs)(n,t)},u.render=function(){var e=this.props.children,t=r.Children.only(e);return r.cloneElement(t,{onClick:this.handleFileDownload})},l}(r.Component);t.default=d,d.displayName="FileDownloader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateTotpSecret=function(){return void 0===e&&(e=10),t=o.getRandomValues(new Uint8Array(e)),a.default.encode(t).toString("utf8").replace(/=/g,"").toLowerCase().replace(/(\w{4})/g,"$1 ").trim();var e;var t},t.encodeTotpSecret=l,t.encodeTotpSecretAsUrl=function(e,t,n){void 0===n&&(n="Discord");return"otpauth://totp/"+encodeURI(n)+":"+encodeURI(e)+"?secret="+l(t)+"&issuer="+encodeURIComponent(n)},t.hasCrypto=void 0;var r,a=(r=n(11585))&&r.__esModule?r:{default:r};var o=window&&window.crypto||window.msCrypto,i=o&&"getRandomValues"in o&&"Uint8Array"in window;function l(e){return e.replace(/[\s._-]+/g,"").toUpperCase()}t.hasCrypto=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHouseNameFromHouseID=t.getQuestions=t.getRandomHouse=void 0;var r=i(n(23)),a=n(1),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}t.getRandomHouse=function(){var e=Object.keys(a.HypeSquadHouses);return e[Math.floor(Math.random()*e.length)]};t.getQuestions=function(){var e=[a.HypeSquadHouses.HOUSE_1,a.HypeSquadHouses.HOUSE_2,a.HypeSquadHouses.HOUSE_3,a.RANDOM_HYPESQUAD_HOUSE],t=[o.default.Messages.HYPESQUAD_QUESTION_0_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_1_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_2_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_3_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_4_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_5_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_6_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_7_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_8_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_9_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_10_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_11_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_12_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_13_PROMPT,o.default.Messages.HYPESQUAD_QUESTION_14_PROMPT],n=[[o.default.Messages.HYPESQUAD_QUESTION_0_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_0_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_0_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_0_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_1_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_1_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_1_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_1_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_2_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_2_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_2_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_2_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_3_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_3_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_3_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_3_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_4_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_4_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_4_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_4_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_5_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_5_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_5_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_5_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_6_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_6_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_6_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_6_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_7_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_7_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_7_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_7_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_8_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_8_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_8_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_8_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_9_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_9_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_9_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_9_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_10_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_10_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_10_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_10_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_11_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_11_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_11_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_11_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_12_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_12_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_12_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_12_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_13_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_13_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_13_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_13_RESPONSE_D],[o.default.Messages.HYPESQUAD_QUESTION_14_RESPONSE_A,o.default.Messages.HYPESQUAD_QUESTION_14_RESPONSE_B,o.default.Messages.HYPESQUAD_QUESTION_14_RESPONSE_C,o.default.Messages.HYPESQUAD_QUESTION_14_RESPONSE_D]];return function(){for(var e=[];e.length<5;){var t=Math.floor(15*Math.random());e.includes(t)||e.push(t)}return e}().map((function(a){var o=t[a],i=n[a];return(0,r.default)(null!=o&&null!=i,"Invalid HypeSquad quiz question index"),{prompt:o,options:i.map((function(t,n){var a=e[n];return(0,r.default)(null!==a,"Invalid HypeSquad quiz question option index"),{copy:t,house:a}}))}}))};t.getHouseNameFromHouseID=function(e){var t;return((t={})[a.HypeSquadHouses.HOUSE_1]=o.default.Messages.HYPESQUAD_HOUSE_1,t[a.HypeSquadHouses.HOUSE_2]=o.default.Messages.HYPESQUAD_HOUSE_2,t[a.HypeSquadHouses.HOUSE_3]=o.default.Messages.HYPESQUAD_HOUSE_3,t)[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=u(n(14)),o=u(n(2)),i=n(275),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s=((r={})[l.HypeSquadHouses.HOUSE_1]=1,r[l.HypeSquadHouses.HOUSE_2]=2,r[l.HypeSquadHouses.HOUSE_3]=3,r),d={joinHypeSquadOnline:function(e){return a.default.post({url:l.Endpoints.HYPESQUAD_ONLINE,body:{house_id:s[e.houseID]},oldFormErrors:!0}).then((function(){return o.default.dispatch({type:l.ActionTypes.HYPESQUAD_ONLINE_MEMBERSHIP_JOIN_SUCCESS,houseID:e.houseID})})).catch((function(e){throw new i.V6OrEarlierAPIError(e)}))},leaveHypeSquadOnline:function(){return a.default.delete({url:l.Endpoints.HYPESQUAD_ONLINE,oldFormErrors:!0}).then((function(){return o.default.dispatch({type:l.ActionTypes.HYPESQUAD_ONLINE_MEMBERSHIP_LEAVE_SUCCESS})})).catch((function(e){throw new i.V6OrEarlierAPIError(e)}))}};t.default=d},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={addKeybind:function(){a.default.dispatch({type:o.ActionTypes.KEYBINDS_ADD_KEYBIND})},setKeybind:function(e){a.default.dispatch({type:o.ActionTypes.KEYBINDS_SET_KEYBIND,keybind:e})},deleteKeybind:function(e){a.default.dispatch({type:o.ActionTypes.KEYBINDS_DELETE_KEYBIND,id:e})},enableAll:function(e){a.default.dirtyDispatch({type:o.ActionTypes.KEYBINDS_ENABLE_ALL_KEYBINDS,enable:e})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=n(5935),l=f(n(9206)),u=f(n(8749)),s=n(1),d=f(n(8177));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.renderIcon=function(e){return e===s.PremiumGuildTiers.NONE?p(u.default,{tier:s.PremiumGuildTiers.TIER_1,className:d.default.gemWithoutLabel}):p(u.default,{tier:e,className:d.default.gemWithLabel})},a.render=function(){var e=this.props,t=e.className,n=e.subscriberCount,r=(0,i.getGuildTierFromSubscriberCount)(n),a=(0,i.getNextGuildTierFromSubscriberCount)(n),u=null!=a?s.PremiumGuildSubscriptionsRequired[a]:null,f=null!=u&&u>0?n/u*100:100;return p(l.default,{background:d.default.progressBackground,percent:f,strokeSize:l.default.StrokeSizes.SMALL,className:(0,o.default)(d.default.gemIndicatorProgressCircle,t)},void 0,p("div",{className:d.default.gemIndicatorContainer},void 0,this.renderIcon(r),p("div",{className:d.default.tierLabel},void 0,(0,i.getTierName)(r))))},r}(a.Component);y.displayName="PremiumGuildGemIndicator";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotchBackground",{enumerable:!0,get:function(){return y.NotchBackground}}),t.default=void 0;var r,a=b(n(0)),o=T(n(9)),i=T(n(8)),l=T(n(3)),u=n(34),s=n(57),d=T(n(288)),f=T(n(51)),c=T(n(94)),p=T(n(29)),v=T(n(55)),y=b(n(11672)),m=T(n(149)),_=T(n(474)),h=b(n(159)),E=T(n(13)),g=n(1),S=T(n(6)),O=T(n(8185)),I=T(n(370));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._initTimeout=new s.Timeout,t._silenceTimeout=new s.Timeout,t._messageTimeout=new s.Timeout,t.state={volume:-100,isMicTesting:!1,isDetectingInput:!0,didDeafenUser:!1},t.setupVoiceActivity=function(){f.default.getMediaEngine().on("voiceactivity",t.handleVoiceActivity)},t.handleVoiceActivity=function(e){if(t.state.isMicTesting&&e<=-100)return t._silenceTimeout.isStarted()||t._silenceTimeout.start(2e3,(function(){t.setState({isDetectingInput:!1})})),void t.setState({volume:-100});t._silenceTimeout.stop(),t.setState({volume:e,isDetectingInput:!0})},t.handleToggleMicTest=function(){t.state.isMicTesting?t._micTestStop():t._micTestStart()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var a=r.prototype;return a.componentDidMount=function(){this._initTimeout.start(1e3,this.setupVoiceActivity)},a.componentWillUnmount=function(){this._initTimeout.stop(),this._micTestStop(),f.default.getMediaEngine().removeListener("voiceactivity",this.handleVoiceActivity)},a._micTestStart=function(){var e=this.props,t=e.isVoiceConnected,n=e.inputDeviceName,r=e.inputVolume,a=e.outputDeviceName,o=e.outputVolume,i=e.inputMode,l=e.vadAutoThreshold,s=e.vadThreshold,f=e.location,c=e.isDeafened,p=!1;t&&!c&&(d.default.toggleSelfDeaf(u.MediaEngineContextTypes.DEFAULT),p=!0),d.default.setLoopback(!0),this._micTestStartTime=Date.now(),this.setState({isMicTesting:!0,isDetectingInput:!0,didDeafenUser:p}),E.default.track(g.AnalyticEvents.MIC_TESTING_STARTED,{input_device_name:n,input_device_volume:r,output_device_name:a,output_device_volume:o,input_mode:i,input_sensitivity_is_automatic:l,input_sensitivity_threshold:Math.round(s),location:f})},a._micTestStop=function(){var e=this.state,t=e.didDeafenUser,n=e.isMicTesting,r=this.props,a=r.isVoiceConnected,o=r.isDeafened;n&&(a&&o&&t&&d.default.toggleSelfDeaf(u.MediaEngineContextTypes.DEFAULT),d.default.setLoopback(!1),this.setState({isMicTesting:!1,didDeafenUser:!1}),null!=this._micTestStartTime&&E.default.track(g.AnalyticEvents.MIC_TESTING_STOPPED,{testing_duration:Math.round((Date.now()-this._micTestStartTime)/1e3)}))},a.renderCaption=function(){var e=this.props,t=e.captionVoice,n=e.captionNoVoice,r=this.state,a=r.isMicTesting,o=r.isDetectingInput;return M(_.default,{className:O.default.micTestCaption,type:_.default.Types.DESCRIPTION},void 0,a?o?t:n:null)},a.render=function(){var e=this,t=this.props,n=t.isVoiceConnected,r=t.title,a=t.description,i=t.notchBackground,l=t.buttonTest,u=t.buttonStop,s=t.buttonClassName,d=t.buttonColor,f=t.isDeafened,c=this.state,E=c.isMicTesting,g=c.volume,T=n&&!E?S.default.Messages.MIC_TEST_VOICE_CHANNEL_WARNING:null;return E&&n&&!f&&this._micTestStop(),M(v.default,{direction:v.default.Direction.VERTICAL},void 0,M(h.default,{tag:h.Tags.H5,className:(0,o.default)(I.default.marginBottom4,I.default.marginTop8)},void 0,r),a&&M(_.default,{type:_.default.Types.DESCRIPTION,className:I.default.marginBottom4},void 0,a),M(v.default,{className:(0,o.default)(I.default.marginTop4,O.default.micTest),align:v.default.Align.CENTER},void 0,M(m.default,{text:T},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return M(p.default,{grow:!1,onClick:e.handleToggleMicTest,onMouseEnter:n,onMouseLeave:r,size:p.default.Sizes.SMALL,className:s,color:d},void 0,E?u:l)})),M(y.default,{progress:E?g+100:0,notchBackground:i}),this.renderCaption()))},r}(a.PureComponent);A.displayName="MicTester";var P=l.default.connectStores([c.default,f.default],(function(){var e=f.default.getInputDeviceId(),t=f.default.getInputDevices(),n=i.default.find(t,(function(t){return t.id===e})),r=f.default.getOutputDeviceId(),a=f.default.getOutputDevices(),o=i.default.find(a,(function(e){return e.id===r})),l=f.default.getModeOptions();return{isVoiceConnected:c.default.isConnected(),inputVolume:f.default.getInputVolume(),outputVolume:f.default.getOutputVolume(),inputMode:f.default.getMode(),vadThreshold:l.threshold,isDeafened:f.default.isSelfDeaf(),vadAutoThreshold:l.autoThreshold,inputDeviceName:null!=n?n.name:"",outputDeviceName:null!=o?o.name:""}}))(A);t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return[d(a.MenuGroup,{},void 0,(0,i.default)()),d(a.MenuGroup,{},void 0,(0,o.default)(),(0,l.default)())]};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(8253),o=u(n(10369)),i=u(n(10368)),l=u(n(10370));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChannelSettingsPermissionsNotice=void 0;var r,a=Y(n(0)),o=V(n(9)),i=V(n(8)),l=V(n(63)),u=V(n(3)),s=V(n(154)),d=V(n(391)),f=n(8481),c=V(n(11718)),p=V(n(11719)),v=V(n(9171)),y=V(n(8292)),m=n(286),_=Y(n(11723)),h=n(203),E=V(n(9247)),g=V(n(8711)),S=V(n(56)),O=V(n(15)),I=V(n(40)),T=V(n(39)),C=V(n(12)),b=V(n(271)),M=V(n(29)),N=V(n(55)),A=V(n(9173)),P=V(n(278)),R=V(n(8293)),L=Y(n(474)),D=V(n(279)),w=n(48),j=V(n(723)),k=V(n(93)),U=V(n(9172)),G=V(n(78)),F=n(1),B=V(n(6)),H=V(n(8200)),x=V(n(370));function V(e){return e&&e.__esModule?e:{default:e}}function W(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return W=function(){return e},e}function Y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=W();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function K(){return(K=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}).apply(this,arguments)}function $(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Z(e,t)}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var q=u.default.connectStores([E.default,g.default],(function(){var e=g.default.getChannel();return{submitting:E.default.formState===F.FormStates.SUBMITTING,onReset:function(){(0,f.init)()},onSave:function(){if(null!=e){var t=E.default.editedPermissionIds.reduce((function(e,t){var n=E.default.getPermissionOverwrite(t);return null!=n&&e.push(n),e}),[]);(0,f.savePermissionUpdates)(e.id,t)}}}}))(y.default);t.ChannelSettingsPermissionsNotice=q;var X=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePermissionChange=function(e,n){var r,a=t.props,o=a.overwrite,i=a.channel,u=o.id,s=o.allow,d=o.deny;switch(d=l.default.remove(d,e),s=l.default.remove(s,e),n){case"ALLOW":s=l.default.add(s,e);break;case"DENY":d=l.default.add(d,e)}if(I.default.can(e,i,((r={})[u]=K({},o,{allow:s,deny:d}),r)))(0,f.updatePermission)(u,s,d);else{var c;if(o.type===m.PermissionOverwriteType.MEMBER){var p=C.default.getUser(o.id);null!=p&&(c=p.toString())}else if(o.type===m.PermissionOverwriteType.ROLE){var v=O.default.getGuild(i.getGuildId());if(null!=v){var y=v.getRole(o.id);null!=y&&(c=y.name)}}_.showPermissionLockoutModal(c)}},t.handleDeletePermission=function(){var e=t.props,n=e.channel.id,r=e.overwrite.id,a=t.getOverwriteName();s.default.show({title:B.default.Messages.SETTINGS_PERMISSIONS_DELETE_TITLE,body:B.default.Messages.SETTINGS_PERMISSIONS_DELETE_BODY.format({name:a}),cancelText:B.default.Messages.CANCEL,onConfirm:function(){return d.default.clearPermissionOverwrite(n,r)}})},t.handlePermissionRender=function(e){var n=t.props,r=n.guild,a=n.channel,o=I.default.can(F.Permissions.ADMINISTRATOR,r)||I.default.can(F.Permissions.MANAGE_ROLES,a,void 0,void 0,!0);return a.isGuildStageVoice()&&h.STAGE_CHANNEL_DISABLED_PERMISSIONS.has(e)?B.default.Messages.STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION:!((!l.default.equals(e,F.Permissions.MANAGE_ROLES)||o)&&(null==e||I.default.can(e,r)||o))&&B.default.Messages.HELP_MISSING_PERMISSION},t}$(t,e);var n=t.prototype;return n.getOverwriteName=function(){var e=this.props,t=e.channel.guild_id,n=e.overwrite.id,r=O.default.getGuild(t);if(null==r)return"";var a=r.getRole(n),o=C.default.getUser(n),i=o?o.username:"";return a?a.name:i},n.renderRemoveButton=function(){var e=this.props;return e.channel.guild_id===e.overwrite.id?null:z(M.default,{look:M.default.Looks.OUTLINED,color:M.default.Colors.RED,onClick:this.handleDeletePermission},void 0,B.default.Messages.REMOVE_ROLE_OR_USER.format({name:this.getOverwriteName()}))},n.render=function(){var e=this,t=this.props,n=t.overwrite,r=t.channel,a=n.id===r.guild_id,i=U.default.generateChannelPermissionSpec(r.guild_id,r.type,a);return z(A.default.Content,{className:H.default.layoutStyle},void 0,i.map((function(t,r){var a;return z(v.default,{spec:t,allow:n.allow,deny:n.deny,onChange:e.handlePermissionChange,permissionRender:e.handlePermissionRender,className:(0,o.default)((a={},a[x.default.marginBottom40]=r<i.length-1,a))},r)})),this.renderRemoveButton())},t}(a.PureComponent);X.displayName="Content";var J=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlerFilterResults=function(e,n){var r=t.props,a=r.permissionOverwrites,o=r.guildMemberIds,l=r.guild;return 0===n?(0,i.default)(l.roles).filter((function(t){return null==a[t.id]&&e(t.name)})).sortBy((function(e){return-e.position})).value():(0,i.default)(o).map(C.default.getUser).filter(w.isNotNullish).filter((function(t){return null==a[t.id]&&e(t.username.toLowerCase())})).sortBy((function(e){return e.username.toLowerCase()})).value()},t.handleCreateOverwrite=function(e,n){null!=e&&(0===n?t.props.onSelect(e.id,m.PermissionOverwriteType.ROLE):1===n&&t.props.onSelect(e.id,m.PermissionOverwriteType.MEMBER))},t.handleQueryChange=function(e){j.default.requestMembers(t.props.guild.id,e,20)},t}$(t,e);var n=t.prototype;return n.renderResult=function(e,t){var n;if(0===t)return e.colorString&&(n={color:e.colorString}),z("span",{style:n},void 0,e.name);var r=e.avatarURL||e.getAvatarURL("jpg");return z(N.default,{align:N.default.Align.CENTER},void 0,z(D.default,{size:D.default.Sizes.SIZE_32,src:r,"aria-label":e.username,className:H.default.smallAvatar}),z("span",{className:H.default.username},void 0,e.toString()))},n.render=function(){var e=this.props,t=e.position,n=e.onClose;return z(c.default,{label:B.default.Messages.OVERWRITE_AUTOCOMPLETE_LABEL,placeholder:B.default.Messages.OVERWRITE_AUTOCOMPLETE_PLACEHOLDER,"aria-label":B.default.Messages.OVERWRITE_AUTOCOMPLETE_A11Y_LABEL,sections:[B.default.Messages.ROLES,B.default.Messages.MEMBERS],onRenderResult:this.renderResult,onFilterResults:this.handlerFilterResults,onQueryChange:this.handleQueryChange,onSelect:this.handleCreateOverwrite,onClose:n,position:t})},t}(a.PureComponent);J.displayName="CreateOverwritePopout";var Q=u.default.connectStores([S.default],(function(e){var t=e.guild;return{guildMemberIds:S.default.getMemberIds(t.id)}}))(J),ee=function(e){function t(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).renderRole=function(e){var n=t.props,r=n.guild,a=n.selectedOverwriteId,o=n.theme;return z(p.default,{theme:o,id:e.id,role:e,guild:r,color:e.colorString},a+"-"+e.id,e.name)},t.renderMember=function(e){var n=t.props,r=n.guild,a=n.selectedOverwriteId,o=n.theme,i=e.getAvatarURL(r.id,!1);return z(p.default,{id:e.id,guild:r,theme:o},a+"-"+e.id,z(N.default,{align:N.default.Align.CENTER},void 0,z(D.default,{size:D.default.Sizes.SIZE_24,src:i,"aria-label":e.username,className:H.default.xsmallAvatar}),z("span",{className:H.default.username},void 0,e.toString())))},t.renderCreateOverwritePopout=function(e){var n=e.position,r=e.closePopout;return a.createElement(Q,K({},t.props,{position:null!=n?n:P.default.Positions.BOTTOM,onSelect:t.handleCreatePermissionOverwrite,onClose:r}))},t.renderHeader=function(){var e=t.props.theme===F.ThemeTypes.DARK?n(11724):n(11725);return z(P.default,{renderPopout:t.renderCreateOverwritePopout,position:P.default.Positions.BOTTOM,autoInvert:!1},void 0,(function(t){return a.createElement(R.default.Header,t,z(N.default,{className:H.default.sidebarHeaderDefault,justify:N.default.Justify.BETWEEN,align:N.default.Align.CENTER},void 0,z("span",{},void 0,B.default.Messages.ROLES,"/",B.default.Messages.MEMBERS),z("img",{alt:"",className:H.default.sidebarHeader,src:e})))}))},t.handleCreatePermissionOverwrite=function(e,n){var r=t.props.channel;d.default.updatePermissionOverwrite(r.id,{id:e,type:n,allow:G.default.NONE,deny:G.default.NONE}).then((function(){return(0,f.selectPermission)(e)}))},t}$(t,e);var r=t.prototype;return r.renderHelpfulNote=function(){return z(a.Fragment,{},void 0,z(R.default.Separator,{style:{marginTop:20,marginBottom:14}}),z(L.default,{type:L.Types.DESCRIPTION},void 0,z(b.default,{href:k.default.getArticleURL(F.HelpdeskArticles.PERMISSIONS_TUTORIAL),target:"_blank"},void 0,B.default.Messages.PERMISSION_HELPDESK)))},r.render=function(){var e=this.props,t=e.guild,n=e.selectedOverwriteId,r=e.permissionOverwrites;null==r[t.id]&&(r[t.id]=G.default.makeEveryoneOverwrite(t.id));var a=(0,i.default)(r).filter((function(e){return e.type===m.PermissionOverwriteType.ROLE})).map((function(e){return t.getRole(e.id)})).filter(w.isNotNullish).sortBy((function(e){return-e.position})).map(this.renderRole).value(),o=(0,i.default)(r).filter((function(e){return e.type===m.PermissionOverwriteType.MEMBER})).map((function(e){return C.default.getUser(e.id)})).filter(w.isNotNullish).sortBy((function(e){return e.username.toLowerCase()})).map(this.renderMember).value();return z(A.default.Sidebar,{className:H.default.layoutStyle,scrollable:!0},void 0,z(R.default,{onItemSelect:f.selectPermission,selectedItem:n,orientation:"vertical"},void 0,this.renderHeader(),a,o,this.renderHelpfulNote()))},t}(a.PureComponent);ee.displayName="Sidebar";var te=function(e){function t(){return e.apply(this,arguments)||this}return $(t,e),t.prototype.render=function(){var e=this.props,t=e.selectedOverwriteId,n=e.permissionOverwrites,r=e.channel,o=e.guild,i=n[t];return z(A.default,{className:H.default.container},void 0,a.createElement(ee,this.props),z(X,{type:r.type,channel:r,guild:o,overwrite:i}))},t}(a.PureComponent);te.displayName="ChannelSettingsPermissions";var ne=u.default.connectStores([E.default,T.default,O.default],(function(){var e=E.default.channel;return{channel:e,category:E.default.category,permissionOverwrites:E.default.permissionOverwrites,selectedOverwriteId:E.default.selectedOverwriteId,guild:null!=e&&O.default.getGuild(e.getGuildId()),theme:T.default.theme}}))(te);t.default=ne},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(8)),a=c(n(3)),o=c(n(2)),i=c(n(8369)),l=c(n(8711)),u=c(n(15)),s=c(n(40)),d=c(n(9175)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(){return(_=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}).apply(this,arguments)}var h,E,g,S=[],O=null,I=!1,T=f.FormStates.CLOSED,C={},b=!1;function M(){if(E=l.default.getChannel(),h=null!=E?u.default.getGuild(E.guild_id):null,S=null!=E&&null!=h&&s.default.can(f.Permissions.MANAGE_WEBHOOKS,E)?d.default.getWebhooksForChannel(h.id,E.id):[],null!=O){var e=A(O.id);null!=e&&(O=e)}T=f.FormStates.OPEN,C={},b=!1}var N=r.default.debounce((function(){b&&((null==O||r.default.isEqual(O,A(O.id)))&&(b=!1),b||P.emitChange())}),500);function A(e){return S.find((function(t){return t.id===e}))}var P=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a,o,i,c=r.prototype;return c.initialize=function(){this.waitFor(l.default,u.default,d.default,s.default)},c.hasChanges=function(){return b},c.getWebhook=function(e){return A(e)},c.showNotice=function(){return this.hasChanges()},c.getProps=function(){return{submitting:T===f.FormStates.SUBMITTING,webhooks:S,editedWebhook:O,section:g,hasChanges:this.hasChanges(),isFetching:I,errors:C}},a=r,(o=[{key:"webhooks",get:function(){return S}},{key:"editedWebhook",get:function(){return O}},{key:"formState",get:function(){return T}}])&&p(a.prototype,o),i&&p(a,i),r}(a.default.Store))(o.default,__OVERLAY__?{}:{INTEGRATION_SETTINGS_INIT:function(e){return M()},INTEGRATION_SETTINGS_SAVE_SUCCESS:function(e){return M()},CHANNEL_SETTINGS_SET_SECTION:function(e){if(e.section!==f.ChannelSettingsSections.INTEGRATIONS)return!1;if(g=f.IntegrationSettingsSections.OVERVIEW,null==h){var t=l.default.getChannel(),n=null==t?void 0:t.getGuildId();null!=t&&null!=n&&(i.default.fetchForChannel(n,t.id),I=!0),M()}},INTEGRATION_SETTINGS_SET_SECTION:function(e){var t=e.section;g=t},INTEGRATION_SETTINGS_START_EDITING_WEBHOOK:function(e){var t=A(e.webhookId);if(null==t)return!1;O=t,C={},b=!1},INTEGRATION_SETTINGS_STOP_EDITING_WEBHOOK:function(e){return O=null,C={},void(b=!1)},INTEGRATION_SETTINGS_UPDATE_WEBHOOK:function(e){var t=e.settings;if(null==O)return!1;O=_({},O),null!=t.name&&O.name!==t.name&&(O.name=t.name,b=!0),void 0!==t.avatar&&O.avatar!==t.avatar&&(O.avatar=t.avatar,b=!0),null!=t.channelId&&O.channel_id!==t.channelId&&(O.channel_id=t.channelId,b=!0),b&&N()},CHANNEL_SETTINGS_CLOSE:function(e){return E=null,h=null,S=[],O=null,void(T=f.FormStates.CLOSED)},WEBHOOKS_UPDATE:function(e){var t=e.guildId,n=e.channelId,r=e.webhooks;if(null==h||t!==h.id||null==E||n!==E.id||null==r||T===f.FormStates.SUBMITTING)return!1;I=!1;for(var a=function(e){var t=S[e];if(null!=n&&(null==t?void 0:t.channel_id)!==n)return"continue";var a=r.find((function(e){if(e.id===t.id)return!0}));if(null!=a){var o,i=_({},t,{},a);S[e]=i,b||(null===(o=O)||void 0===o?void 0:o.id)!==i.id||(O=i)}else{var l;(null===(l=O)||void 0===l?void 0:l.id)===t.id&&(O=null),S.splice(e,1)}},o=S.length-1;o>=0;o--)a(o);for(var i,l=function(){var e=i.value;null==S.find((function(t){if(t.id===e.id)return!0}))&&S.push(e)},u=y(r);!(i=u()).done;)l();S=[].concat(S),N()},INTEGRATION_SETTINGS_SUBMITTING:function(e){return T=f.FormStates.SUBMITTING,void(C={})},INTEGRATION_SETTINGS_SAVE_FAILURE:function(e){if(T!==f.FormStates.SUBMITTING)return!1;T=f.FormStates.OPEN,C=e.errors||{}}}),R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=v(n(0)),o=c(n(9)),i=c(n(55)),l=c(n(1165)),u=v(n(474)),s=c(n(8565)),d=n(1),f=c(n(7394));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=["firCount","nackCount"],h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.renderValueIcon=function(){var e=this.props.label;return _.includes(e)?y(s.default,{color:d.Colors.STATUS_YELLOW,className:f.default.valueIcon}):null},a.render=function(){var e=this.props,t=e.children,n=e.className,r=e.valueRendered,a=e.section,s=e.label,d=e.renderGraph;return y(i.default,{className:(0,o.default)(f.default.item,n),direction:i.default.Direction.VERTICAL,basis:"50%"},void 0,y(i.default,{align:i.default.Align.START},void 0,y(i.default.Child,{},void 0,y("h3",{className:f.default.title},void 0,t)),Array.isArray(r)?y(i.default.Child,{grow:1},void 0,r):y(i.default.Child,{grow:0,shrink:0},void 0,this.renderValueIcon(),y("span",{className:f.default.itemValue},void 0,r))),d&&y(i.default.Child,{className:f.default.graph},null!=a?a+"-"+s:s,y(u.default,{type:u.Types.DESCRIPTION},void 0,d())),y(l.default,{className:f.default.divider}))},r}(a.PureComponent);t.default=h,h.displayName="RTCDebugItem"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(466)),i=u(n(24)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.onConfirmUninstall,n=e.game,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onConfirmUninstall","game"]);return a.createElement(o.default,d({header:l.default.Messages.APPLICATION_UNINSTALL_PROMPT_TITLE.format({gameName:n.name}),confirmText:l.default.Messages.APPLICATION_UNINSTALL_PROMPT_CONFIRM,cancelText:l.default.Messages.APPLICATION_UNINSTALL_PROMPT_CANCEL,onConfirm:t},r),f(i.default,{size:i.default.Sizes.SIZE_16},void 0,l.default.Messages.APPLICATION_UNINSTALL_PROMPT_BODY.format({gameName:n.name})))}c.displayName="UninstallConfirmModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(218)),o=n(41),i=u(n(10777)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=new(function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),i.prototype.showErrorModal=function(e){var t=e.code,n=e.message;(0,o.openModal)((function(e){return r.createElement(a.default,d({title:l.default.Messages.EMBEDDED_ACTIVITIES_ERROR_TITLE.format({code:t}),body:n},e))}))},i}(i.default));t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(57),a=_(n(2)),o=_(n(478)),i=_(n(216)),l=_(n(10)),u=_(n(256)),s=_(n(94)),d=_(n(36)),f=_(n(80)),c=_(n(13)),p=n(1297),v=_(n(294)),y=n(156),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S={},O={},I={};function T(e){var t=e.channelId,n=e.applicationId,a=l.default.getChannel(t);if(null!=a){var o=new r.Timeout;o.start(12e4,(function(){(0,p.stopEmbeddedActivity)(t,n)})),I[n]=o,O[n]=function(e){S[n]=e,c.default.track(m.AnalyticEvents.ACTIVITY_SESSION_JOINED,{channel_id:a.id,guild_id:a.getGuildId(),media_session_id:e.mediaSessionId,activity_session_id:e.activitySessionId,application_id:n})}}}function C(e){var t,n=e.channelId,r=e.applicationId,a=S[r],o=l.default.getChannel(n);null!=a&&null!=o&&(c.default.track(m.AnalyticEvents.ACTIVITY_SESSION_LEFT,{channel_id:o.id,guild_id:o.getGuildId(),media_session_id:a.mediaSessionId,activity_session_id:a.activitySessionId,application_id:r}),delete O[r],delete S[r],null===(t=I[r])||void 0===t||t.stop(),delete I[r])}function b(e){var t,n,r,a=e.activity,o=e.activitySessionId,i=s.default.getMediaSessionId(),l=(null==a?void 0:a.application_id)===y.POKER_NIGHT_APPLICATION_ID?o:null==a||null===(t=a.party)||void 0===t?void 0:t.id;null!=i&&null!=(null==a?void 0:a.application_id)&&null!=l&&(null===(n=O[a.application_id])||void 0===n||n.call(O,{mediaSessionId:i,activitySessionId:l}),delete O[a.application_id],null===(r=I[a.application_id])||void 0===r||r.stop(),delete I[a.application_id])}function M(){for(var e,t=d.default.getVoiceChannelId(),n=function(){var n=e.value,r=n.channelId,o=n.applicationId;r!==t&&a.default.wait((function(){return(0,p.stopEmbeddedActivity)(r,o)}))},r=E(v.default.getSelfEmbeddedActivities().values());!(e=r()).done;)n()}function N(e){var t=e.channelId,n=e.applicationId,r=e.intent;if(d.default.getVoiceChannelId()===t){for(var a=0,i=Object.keys(f.default.getVoiceStatesForChannel(t));a<i.length;a++){var l=i[a],s=u.default.getApplicationActivity(l,n);if(null!=s&&null!=s.session_id)return o.default.join(l,s.session_id,n,t,null,r,!0)}(0,p.startEmbeddedActivity)(t,n)}}var A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleRPCDisconnect=function(e){var n=e.reason,r=e.application.id;if(null!=r&&null!=n){for(var o,i=function(){var e=o.value,t=e.applicationId,n=e.channelId;t===r&&a.default.wait((function(){return(0,p.stopEmbeddedActivity)(n,r)}))},l=E(v.default.getSelfEmbeddedActivities().values());!(o=l()).done;)i();n.code!==m.RPCCloseCodes.CLOSE_NORMAL&&t.showErrorModal(n,r)}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var o=r.prototype;return o._initialize=function(){d.default.addChangeListener(M),a.default.subscribe(m.ActionTypes.EMBEDDED_ACTIVITY_OPEN,T),a.default.subscribe(m.ActionTypes.EMBEDDED_ACTIVITY_CLOSE,C),a.default.subscribe(m.ActionTypes.LOCAL_ACTIVITY_UPDATE,b),a.default.subscribe(m.ActionTypes.EMBEDDED_ACTIVITY_DEFERRED_OPEN,N),a.default.subscribe(m.ActionTypes.RPC_APP_DISCONNECTED,this.handleRPCDisconnect)},o._terminate=function(){d.default.removeChangeListener(M),a.default.unsubscribe(m.ActionTypes.EMBEDDED_ACTIVITY_OPEN,T),a.default.unsubscribe(m.ActionTypes.EMBEDDED_ACTIVITY_CLOSE,C),a.default.unsubscribe(m.ActionTypes.LOCAL_ACTIVITY_UPDATE,b),a.default.unsubscribe(m.ActionTypes.EMBEDDED_ACTIVITY_DEFERRED_OPEN,N),a.default.unsubscribe(m.ActionTypes.RPC_APP_DISCONNECTED,this.handleRPCDisconnect)},r}(i.default);t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=E(n(2)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8788)),i=E(n(216)),l=E(n(5952)),u=E(n(10)),s=E(n(694)),d=E(n(8789)),f=E(n(94)),c=E(n(36)),p=E(n(107)),v=E(n(80)),y=E(n(294)),m=E(n(10306)),_=n(1);function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){return e&&e.__esModule?e:{default:e}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(){var e=f.default.getChannelId(),t=y.default.getSelfEmbeddedActivityForChannel(null!=e?e:""),n=u.default.getChannel(e);return null==e||null==n||null==t?function(){var e=r;null!=e&&d.default.isOpen(e)&&(a.default.wait((function(){return o.close(e)})),r=null)}():function(e,t){if(d.default.isOpen(t))return!1;a.default.wait((function(){return o.open(t,_.PictureInPictureComponents.EMBED_IFRAME,{channel:e})})),r=t}(n,(0,m.default)(n.id,t.applicationId))}function O(){var e;return s.default.hasLayers()?void(null!=(e=r)&&d.default.isOpen(e)&&a.default.wait((function(){return o.hide(e)}))):function(){var e=r;null!=e&&d.default.isOpen(e)&&a.default.wait((function(){return o.show(e)}))}()}var I=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var a=r.prototype;return a._initialize=function(){c.default.addChangeListener(S),p.default.addChangeListener(S),f.default.addChangeListener(S),v.default.addChangeListener(S),l.default.addChangeListener(S),y.default.addChangeListener(S),s.default.addChangeListener(O)},a._terminate=function(){c.default.removeChangeListener(S),p.default.removeChangeListener(S),f.default.removeChangeListener(S),v.default.removeChangeListener(S),l.default.removeChangeListener(S),y.default.removeChangeListener(S),s.default.removeChangeListener(O)},r}(i.default));t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=_(n(2)),o=_(n(216)),i=_(n(10)),l=_(n(36)),u=_(n(107)),s=_(n(12)),d=n(41),f=n(742),c=n(8790),p=_(n(10780)),v=_(n(10781)),y=_(n(10782)),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(){return(E=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}).apply(this,arguments)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t){var n;if(null!=e){var r=s.default.getNullableCurrentUser();(null===(n=i.default.getChannel(t))||void 0===n?void 0:n.isNSFW())&&null!=r&&null==r.nsfwAllowed&&(0,c.openAgeGateModal)(f.AgeGateSource.NSFW_CHANNEL)}}var O=new(function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var i=o.prototype;return i._initialize=function(){a.default.subscribe(m.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen),a.default.subscribe(m.ActionTypes.CHANNEL_SELECT,this.handleChannelSelect),a.default.subscribe(m.ActionTypes.AGE_GATE_MODAL_OPEN,this.handleAgeGateModalOpen),a.default.subscribe(m.ActionTypes.AGE_GATE_MODAL_CLOSE,this.handleAgeGateModalClose),a.default.subscribe(m.ActionTypes.AGE_GATE_SUCCESS_MODAL_OPEN,this.handleAgeGateSuccess),a.default.subscribe(m.ActionTypes.AGE_GATE_FAILURE_MODAL_OPEN,this.handleAgeGateFailure)},i._terminate=function(){a.default.unsubscribe(m.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen),a.default.unsubscribe(m.ActionTypes.CHANNEL_SELECT,this.handleChannelSelect),a.default.unsubscribe(m.ActionTypes.AGE_GATE_MODAL_OPEN,this.handleAgeGateModalOpen),a.default.unsubscribe(m.ActionTypes.AGE_GATE_MODAL_CLOSE,this.handleAgeGateModalClose),a.default.unsubscribe(m.ActionTypes.AGE_GATE_SUCCESS_MODAL_OPEN,this.handleAgeGateSuccess),a.default.unsubscribe(m.ActionTypes.AGE_GATE_FAILURE_MODAL_OPEN,this.handleAgeGateFailure)},i.handleChannelSelect=function(e){S(e.guildId,e.channelId)},i.handleConnectionOpen=function(){S(u.default.getGuildId(),l.default.getChannelId())},i.handleAgeGateModalOpen=function(){(0,d.openModal)((function(e){return r.createElement(p.default,e)}),{modalKey:f.EXISTING_USER_AGE_GATE_MODAL_KEY,onCloseRequest:m.NOOP})},i.handleAgeGateSuccess=function(){(0,d.updateModal)(f.EXISTING_USER_AGE_GATE_MODAL_KEY,(function(e){return r.createElement(y.default,e)}))},i.handleAgeGateFailure=function(e){var t=e.underageMessage;e.forceOpen?(0,d.openModal)((function(e){return r.createElement(v.default,E({underageMessage:t},e))}),{modalKey:f.EXISTING_USER_AGE_GATE_MODAL_KEY,onCloseRequest:m.NOOP}):(0,d.updateModal)(f.EXISTING_USER_AGE_GATE_MODAL_KEY,(function(e){return r.createElement(v.default,E({underageMessage:t},e))}))},i.handleAgeGateModalClose=function(){(0,d.closeModal)(f.EXISTING_USER_AGE_GATE_MODAL_KEY)},o}(o.default));t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.transitionState,r=(0,l.useStateFromStores)([f.default],(function(){return f.default.getNullableCurrentUser()})),b=(0,l.useStateFromStores)([d.default,s.default],(function(){return s.default.getChannel(d.default.getChannelId())})),M=a.useState(null),N=M[0],P=M[1],D=a.useState(null),w=D[0],j=D[1],k=a.useState(!1),U=k[0],G=k[1],F=a.useState(L.AGE_GATE_FORM),B=F[0],H=F[1],x=a.createRef(),V=a.createRef(),W=(0,v.useUID)(),Y=null!=N?(0,i.default)().diff(N,"years"):null;function z(){var e=null==b?void 0:b.getGuildId();e&&(u.default.nsfwReturnToSafety(e),(0,S.closeAgeGateModal)())}function K(){return $.apply(this,arguments)}function $(){return($=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,o.default)(null!=N,"Cannot submit null birthday."),e.prev=1,j(null),G(!0),e.next=6,(0,g.submitDateOfBirth)(N,"NSFW Channel");case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(1),null!=e.t0.body&&null!=e.t0.body.date_of_birth?(0,S.openFailureAgeGateModal)(e.t0.body.date_of_birth):(j(e.t0.body.message),G(!1));case 12:case"end":return e.stop()}}),e,null,[[1,9]])})))).apply(this,arguments)}function Z(){return q.apply(this,arguments)}function q(){return(q=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,o.default)(null!=Y,"Cannot submit if we haven't been able to calculate age."),!(Y<18)){e.next=4;break}return H(L.CONFIRM),e.abrupt("return");case 4:return e.next=6,K();case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=R(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),!U&&null!=N){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,Z();case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(){return ee.apply(this,arguments)}function ee(){return(ee=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K();case 2:null==e.sent&&H(L.AGE_GATE_FORM);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}a.useEffect((function(){null!=r&&null!=r.nsfwAllowed&&(0,S.openSuccessAgeGateModal)()}));var te=a.useCallback((function(e){P(e)}),[P]),ne=a.useCallback((function(){var e;null===(e=V.current)||void 0===e||e.focus()}),[V]);return B===L.AGE_GATE_FORM?A(y.ModalRoot,{transitionState:t,size:y.ModalSize.SMALL,"aria-labelledby":W},void 0,A(y.ModalContent,{},void 0,A("div",{className:C.default.container},void 0,A("img",{alt:"",src:n(1427),className:C.default.img}),A(_.default,{size:_.default.Sizes.SIZE_24,className:C.default.title,id:W},void 0,T.default.Messages.AGE_GATE_EXISTING_HEADER),A(h.default,{color:h.default.Colors.HEADER_SECONDARY},void 0,T.default.Messages.AGE_GATE_NSFW_BODY.format({helpURL:E.default.getArticleURL(I.HelpdeskArticles.AGE_GATE)}))),A("form",{onSubmit:X},void 0,a.createElement(O.default,{label:T.default.Messages.AGE_GATE_YOUR_BIRTHDAY,wrapperClassName:C.default.birthday,name:"date_of_birth",onChange:te,onPopulated:ne,error:w,value:N,ref:x,autoFocus:!0}))),A(y.ModalFooter,{justify:p.default.Justify.BETWEEN},void 0,A(c.default,{buttonRef:V,submitting:U,disabled:null==N,size:c.ButtonSizes.SMALL,onClick:Z},void 0,T.default.Messages.AGE_GATE_SUBMIT),A(c.default,{look:c.default.Looks.LINK,size:c.default.Sizes.NONE,color:c.default.Colors.PRIMARY,onClick:z},void 0,T.default.Messages.AGE_GATE_GO_BACK))):A(y.ModalRoot,{transitionState:m.ModalTransitionState.ENTERED,size:y.ModalSize.SMALL,"aria-labelledby":W},void 0,A(y.ModalContent,{},void 0,A("div",{className:C.default.confirmContainer},void 0,A(_.default,{size:_.default.Sizes.SIZE_24,className:C.default.confirmTitle,id:W},void 0,T.default.Messages.AGE_GATE_CONFIRM_HEADER.format({age:Y})),A(h.default,{color:h.default.Colors.HEADER_SECONDARY},void 0,T.default.Messages.AGE_GATE_NSFW_BODY.format({helpURL:E.default.getArticleURL(I.HelpdeskArticles.AGE_GATE)})))),A(y.ModalFooter,{className:C.default.confirmFooter},void 0,A(c.default,{look:c.default.Looks.LINK,size:c.default.Sizes.NONE,color:c.default.Colors.PRIMARY,onClick:function(){return H(L.AGE_GATE_FORM)}},void 0,T.default.Messages.AGE_GATE_CONFIRM_GO_BACK),A(c.default,{color:c.default.Colors.BRAND,onClick:Q},void 0,T.default.Messages.AGE_GATE_CONFIRM_BUTTON)))};var r,a=N(n(0)),o=b(n(23)),i=b(n(5)),l=n(3),u=b(n(199)),s=b(n(10)),d=b(n(36)),f=b(n(12)),c=N(n(29)),p=b(n(55)),v=n(85),y=n(35),m=n(217),_=b(n(47)),h=b(n(24)),E=b(n(93)),g=n(1314),S=n(8790),O=b(n(1315)),I=n(1),T=b(n(6)),C=b(n(7927));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){P(o,r,a,i,l,"next",e)}function l(e){P(o,r,a,i,l,"throw",e)}i(void 0)}))}}var L;!function(e){e[e.AGE_GATE_FORM=0]="AGE_GATE_FORM",e[e.CONFIRM=1]="CONFIRM"}(L||(L={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;h(n(0));var r,a=n(95),o=n(42),i=h(n(29)),l=n(85),u=n(35),s=m(n(47)),d=m(n(24)),f=m(n(93)),c=n(8790),p=n(1),v=m(n(6)),y=m(n(7928));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.underageMessage,r=e.transitionState,m=(0,l.useUID)();return E(u.ModalRoot,{transitionState:r,size:u.ModalSize.SMALL,"aria-labelledby":m,impressionName:a.ImpressionNames.USER_AGE_GATE_UNDERAGE,impressionMetadata:{existing_user:!0}},void 0,E(u.ModalContent,{},void 0,E("div",{className:y.default.container},void 0,E("img",{alt:"",src:n(9085),className:y.default.img}),E(s.default,{size:s.default.Sizes.SIZE_24,className:y.default.title,id:m},void 0,v.default.Messages.AGE_GATE_UNDERAGE_EXISTING_HEADER),E(d.default,{color:d.default.Colors.HEADER_SECONDARY,className:y.default.subtitle},void 0,v.default.Messages.AGE_GATE_UNDERAGE_BODY.format({underageMessage:t||v.default.Messages.AGE_GATE_UNDERAGE_BODY_DEFAULT_MESSAGE,helpURL:f.default.getArticleURL(p.HelpdeskArticles.AGE_GATE)})),E(d.default,{color:d.default.Colors.HEADER_SECONDARY,className:y.default.subtitle},void 0,v.default.Messages.AGE_GATE_UNDERAGE_EXISTING_BODY_DELETION_WITH_DAYS.format({days:30})))),E(u.ModalFooter,{},void 0,E(i.default,{size:i.ButtonSizes.SMALL,fullWidth:!0,onClick:function(){(0,c.closeAgeGateModal)(),(0,o.transitionTo)(p.Routes.LOGIN)}},void 0,v.default.Messages.AGE_GATE_UNDERAGE_BACK_TO_LOGIN)))}g.displayName="ExistingUserAgeGateUnderage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;y(n(0));var r,a=n(95),o=y(n(29)),i=n(85),l=n(35),u=p(n(47)),s=p(n(24)),d=n(8790),f=p(n(6)),c=p(n(7929));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.transitionState,r=(0,i.useUID)();return m(l.ModalRoot,{transitionState:t,size:l.ModalSize.SMALL,"aria-labelledby":r,impressionName:a.ImpressionNames.USER_AGE_GATE,impressionMetadata:{existing_user:!0}},void 0,m(l.ModalContent,{},void 0,m("div",{className:c.default.container},void 0,m("img",{alt:"",src:n(10783),className:c.default.img}),m(u.default,{size:u.default.Sizes.SIZE_24,className:c.default.title,id:r},void 0,f.default.Messages.AGE_GATE_AGE_VERIFIED),m(s.default,{color:s.default.Colors.HEADER_SECONDARY,className:c.default.subtitle},void 0,f.default.Messages.AGE_GATE_AGE_VERIFIED_BODY))),m(l.ModalFooter,{},void 0,m(o.default,{size:o.ButtonSizes.SMALL,fullWidth:!0,onClick:function(){(0,d.closeAgeGateModal)()},autoFocus:!0},void 0,f.default.Messages.CLOSE)))}_.displayName="ExistingUserAgeGateVerified"},function(e,t,n){e.exports=n.p+"68c14a2d6a011a937b3bb2380277d895.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeAuthenticated=function(e,t,n){var r=f(t,{});void 0===n&&(n={passProps:!0});function a(a){if(!(0,s.isAuthenticated)()&&!(0,s.isGuest)()&&u.default.allowLogoutRedirect()){if(null!=t)return r;var d=location.pathname+location.search;return f(i.Redirect,{to:(0,l.getLoginPath)(d,!1)})}return o.createElement(e,n.passProps?a:null)}return a.displayName="Authenticated("+(e.displayName||e.name||"<Unknown>")+")",a};var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=n(54),l=n(420),u=(r=n(11))&&r.__esModule?r:{default:r},s=n(487);function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(216)),a=f(n(1299)),o=f(n(303)),i=f(n(8359)),l=f(n(160)),u=f(n(80)),s=f(n(365)),d=n(1247);function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=(0,d.createSoundForPack)("call_calling",a.default.getSoundpack()),v=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var f=r.prototype;return f._initialize=function(){o.default.addChangeListener(this.handleRingUpdate),i.default.addChangeListener(this.handleRingUpdate),l.default.addChangeListener(this.handleRingUpdate),u.default.addChangeListener(this.handleRingUpdate),a.default.addChangeListener(this.handleSoundpackUpdate)},f._terminate=function(){o.default.removeChangeListener(this.handleRingUpdate),i.default.removeChangeListener(this.handleRingUpdate),l.default.removeChangeListener(this.handleRingUpdate),u.default.removeChangeListener(this.handleRingUpdate),a.default.removeChangeListener(this.handleSoundpackUpdate)},f.handleSoundpackUpdate=function(){p.stop(),p=(0,d.createSoundForPack)("call_calling",a.default.getSoundpack())},f.handleRingUpdate=function(){var e=o.default.getCalls().filter((function(e){return e.ringing.length>0&&u.default.getCurrentClientVoiceChannelId(null)===e.channelId})),t=u.default.getCurrentClientVoiceChannelId(null);!(null!=t&&s.default.countVoiceStatesForChannel(t)>=2)&&e.length>0&&!i.default.isSoundDisabled("call_calling")&&!l.default.disableSounds?p.loop():p.stop()},r}(r.default));t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(216)),a=i(n(94)),o=i(n(688));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var i=r.prototype;return i._initialize=function(){o.default.addChangeListener(this.handleFocusParticipant)},i._terminate=function(){o.default.removeChangeListener(this.handleFocusParticipant)},i.handleFocusParticipant=function(){var e=a.default.getChannelId();if(null!=e){var t,n,r=o.default.getSelectedParticipantId(e),i=o.default.getVideoParticipants(e);null===(t=a.default.getRTCConnection())||void 0===t||t.setSelectedParticipant(null===(n=i.find((function(e){return e.id===r&&!e.localVideoDisabled})))||void 0===n?void 0:n.id)}},r}(r.default));t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(34),a=c(n(2)),o=c(n(288)),i=c(n(216)),l=c(n(5952)),u=c(n(51)),s=c(n(79)),d=c(n(161)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=new Set,_=new Set,h=null;function E(){for(var e,t=v(m);!(e=t()).done;){var n=e.value;o.default.setDisableLocalVideo(n,!1,r.MediaEngineContextTypes.DEFAULT,!1)}_.clear(),m.clear()}var g=new(function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleWindowFocus=function(e){e.focused&&E()},t.handleVoiceChannelSelect=function(e){var t=e.channelId;t!==h&&(E(),h=t)},t.handlePopoutChange=function(){l.default.getWindowFocused(f.PopoutWindowKeys.CHANNEL_CALL_POPOUT)&&E()},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var c=i.prototype;return c._initialize=function(){a.default.subscribe(f.ActionTypes.RTC_CONNECTION_VIDEO,this.handleIncomingVideo),a.default.subscribe(f.ActionTypes.AUDIO_SET_LOCAL_VIDEO_DISABLED,this.handleManualLocalVideoToggle),a.default.subscribe(f.ActionTypes.WINDOW_FOCUS,this.handleWindowFocus),a.default.subscribe(f.ActionTypes.VOICE_CHANNEL_SELECT,this.handleVoiceChannelSelect),l.default.addChangeListener(this.handlePopoutChange)},c._terminate=function(){a.default.unsubscribe(f.ActionTypes.RTC_CONNECTION_VIDEO,this.handleIncomingVideo),a.default.unsubscribe(f.ActionTypes.AUDIO_SET_LOCAL_VIDEO_DISABLED,this.handleManualLocalVideoToggle),a.default.unsubscribe(f.ActionTypes.WINDOW_FOCUS,this.handleWindowFocus),a.default.unsubscribe(f.ActionTypes.VOICE_CHANNEL_SELECT,this.handleVoiceChannelSelect),l.default.removeChangeListener(this.handlePopoutChange),E(),h=null},c.handleIncomingVideo=function(e){var t=e.userId,n=e.context,a=e.streamId;if(n===r.MediaEngineContextTypes.DEFAULT&&null!=a){var i=null!=s.default.getCurrentGame(),c=d.default.isFocused(),p=l.default.getWindowFocused(f.PopoutWindowKeys.CHANNEL_CALL_POPOUT),v=u.default.isLocalVideoDisabled(t,n),y=_.has(t);!i||c||p||v||y||(m.add(t),o.default.setDisableLocalVideo(t,!0,n,!1))}},c.handleManualLocalVideoToggle=function(e){var t=e.userId;e.persist&&(_.add(t),m.delete(t))},i}(i.default));t.default=g},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=S(n(0)),a=E(n(2)),o=E(n(10791)),i=E(n(10794)),l=E(n(10795)),u=n(140),s=n(726),d=E(n(11)),f=E(n(10)),c=E(n(71)),p=E(n(256)),v=E(n(94)),y=E(n(1270)),m=S(n(41)),_=E(n(10798)),h=n(1);function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=new(function(e){var t,n;function _(){for(var t,n=arguments.length,a=new Array(n),_=0;_<n;_++)a[_]=arguments[_];return(t=e.call.apply(e,[this].concat(a))||this).handleVoiceChannelFeedback=function(e){var n=e.analyticsData;t.shouldShowVoiceFeedback()&&(m.openModal((function(e){return r.createElement(l.default,O({},e,{analyticsData:n}))})),t.updateLastVoiceFeedbackDate())},t.handleStreamClose=function(e){var n=e.streamKey,a=e.canShowFeedback,o=(0,u.decodeStreamKey)(n),l=(0,s.getStreamerApplication)(o,p.default),f={media_session_id:y.default.getActiveMediaSessionId(),rtc_connection_id:y.default.getActiveRTCConnectionId()};t.shouldShowStreamFeedback()&&a&&m.openModal((function(e){return r.createElement(i.default,O({stream:o,streamApplication:l,isStreamer:o.ownerId===d.default.getId()},e,{analyticsData:f}))}))},t.handleActivityClose=function(e){var n=e.applicationId,a=e.channelId,i=c.default.getGame(n),l=f.default.getChannel(a),u={rtc_connection_id:v.default.getRTCConnectionId(),media_session_id:v.default.getMediaSessionId()};null!=i&&null!=l&&t.shouldShowActivityFeedback()&&(m.openModal((function(e){return r.createElement(o.default,O({},e,{activityApplication:i,channel:l,analyticsData:u}))})),t.updateLastActivityFeedbackDate())},t}n=e,(t=_).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var E=_.prototype;return E._initialize=function(){a.default.subscribe(h.ActionTypes.VOICE_CHANNEL_SHOW_FEEDBACK,this.handleVoiceChannelFeedback),a.default.subscribe(h.ActionTypes.STREAM_CLOSE,this.handleStreamClose),a.default.subscribe(h.ActionTypes.EMBEDDED_ACTIVITY_CLOSE,this.handleActivityClose)},E._terminate=function(){a.default.unsubscribe(h.ActionTypes.VOICE_CHANNEL_SHOW_FEEDBACK,this.handleVoiceChannelFeedback),a.default.unsubscribe(h.ActionTypes.STREAM_CLOSE,this.handleStreamClose),a.default.unsubscribe(h.ActionTypes.EMBEDDED_ACTIVITY_CLOSE,this.handleActivityClose)},_}(_.default));t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=h(n(0)),o=m(n(9269)),i=m(n(8552)),l=n(395),u=n(1220),s=h(n(41)),d=m(n(13)),f=m(n(10792)),c=m(n(10793)),p=n(156),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}var S=[p.ActivityFeedbackReasons.OTHER,p.ActivityFeedbackReasons.NOT_FUN];function O(e){var t=e.channel,n=e.activityApplication,r=e.onClose,m=e.transitionState,_=e.analyticsData;return a.useEffect((function(){d.default.track(v.AnalyticEvents.OPEN_MODAL,{type:"Activity Feedback Modal",application_id:n.id,application_name:n.name,game_id:n.id,source:"Activity End"})}),[n]),E(o.default,{header:y.default.Messages.ACTIVITY_REPORT_POST_ACTIVITY_HEADER.format({applicationName:n.name}),body:y.default.Messages.ACTIVITY_REPORT_ACTIVITY_BODY,problemTitle:y.default.Messages.ACTIVITY_REPORT_POST_ACTIVITY_PROBLEM_TITLE,problems:(0,f.default)(!0),feedbackProblems:S,onSubmit:function(e){var r=e.rating,o=e.problem,d=e.dontShowAgain,f=e.feedback;d&&(0,u.hideHotspot)(l.HotspotLocations.POST_ACTIVITY_FEEDBACK),null!=r&&((0,c.default)(o,t,f,n,_,"Activity End",r),null!=o&&s.openModal((function(e){return a.createElement(i.default,g({body:y.default.Messages.ACTIVITY_REPORTED_BODY},e))})))},onClose:r,transitionState:m,otherKey:p.ActivityFeedbackReasons.OTHER})}O.displayName="ActivityFeedback"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[{value:a.ActivityFeedbackReasons.FAILED_LOAD,label:e?o.default.Messages.ACTIVITY_REPORT_ACTIVITY_END_FAILED_LOAD:o.default.Messages.ACTIVITY_REPORT_ACTIVITY_FAILED_LOAD},{value:a.ActivityFeedbackReasons.LAGGING,label:e?o.default.Messages.ACTIVITY_REPORT_ACTIVITY_END_LAGGING:o.default.Messages.ACTIVITY_REPORT_ACTIVITY_LAGGING},{value:a.ActivityFeedbackReasons.CONFUSING,label:e?o.default.Messages.ACTIVITY_REPORT_ACTIVITY_END_CONFUSING:o.default.Messages.ACTIVITY_REPORT_ACTIVITY_CONFUSING},{value:a.ActivityFeedbackReasons.NOT_FUN,label:e?o.default.Messages.ACTIVITY_REPORT_ACTIVITY_END_NOT_FUN:o.default.Messages.ACTIVITY_REPORT_ACTIVITY_NOT_FUN},{value:a.ActivityFeedbackReasons.OTHER,label:o.default.Messages.CALL_FEEDBACK_OPTION_OTHER}]};var r,a=n(156),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,l,u,s){void 0===s&&(s=null);a.default.track(o.AnalyticEvents.ACTIVITY_REPORT_PROBLEM,i({reason:e,guild_id:t.getGuildId(),channel_id:t.id,application_id:null==r?void 0:r.id,application_name:null==r?void 0:r.name,location:u,rating:s,feedback:n},l))};var r,a=(r=n(13))&&r.__esModule?r:{default:r},o=n(1);function i(){return(i=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=h(n(0)),o=m(n(9269)),i=m(n(8552)),l=n(196),u=m(n(9098)),s=m(n(9099)),d=n(395),f=n(1220),c=h(n(41)),p=m(n(13)),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}var S=[l.StreamIssueReportReasons.OTHER];function O(e){var t=e.isStreamer,n=e.stream,r=e.streamApplication,m=e.onClose,_=e.transitionState,h=e.analyticsData,O=t?y.default.Messages.STREAM_REPORT_RATING_BODY_STREAMER:y.default.Messages.STREAM_REPORT_RATING_BODY;return a.useEffect((function(){p.default.track(v.AnalyticEvents.OPEN_MODAL,{type:"Stream Problem Report",other_user_id:n.ownerId,application_id:null!=r?r.id:null,application_name:null!=r?r.name:null,game_id:null!=r?r.id:null,source:"Stream End"})}),[n.ownerId,r]),E(o.default,{header:y.default.Messages.STREAM_REPORT_A_PROBLEM_POST_STREAM,body:O,problemTitle:y.default.Messages.STREAM_REPORT_LABEL,problems:(0,u.default)(t,!0),feedbackProblems:S,onSubmit:function(e){var t=e.rating,o=e.problem,l=e.dontShowAgain,u=e.feedback;l&&(0,f.hideHotspot)(d.HotspotLocations.REPORT_PROBLEM_POST_STREAM),null!=t&&((0,s.default)(o,n,u,r,h,"Stream End",t),null!=o&&c.openModal((function(e){return a.createElement(i.default,g({body:y.default.Messages.STREAM_REPORTED_BODY},e))})))},onClose:m,transitionState:_,otherKey:l.StreamIssueReportReasons.OTHER})}O.displayName="ReportProblem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=m(n(0)),o=v(n(1300)),i=v(n(9269)),l=v(n(8552)),u=n(395),s=n(1220),d=v(n(10796)),f=v(n(10797)),c=m(n(41)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}var E=[o.default.CALL_FEEDBACK_OPTION_OTHER];function g(e){var t=e.onClose,n=e.transitionState,r=e.analyticsData;return _(i.default,{header:p.default.Messages.CALL_FEEDBACK_SHEET_TITLE,body:p.default.Messages.CALL_FEEDBACK_PROMPT,problemTitle:p.default.Messages.CALL_FEEDBACK_ISSUE_SECTION_HEADER,problems:(0,d.default)(!1),feedbackProblems:E,onSubmit:function(e){var t,n,o,i=e.rating,v=e.problem,y=e.dontShowAgain,m=e.feedback;y&&(0,s.hideHotspot)(u.HotspotLocations.VOICE_CALL_FEEDBACK),null!=i&&((0,f.default)(i,(t=v,null!==(n=null===(o=(0,d.default)(!1).find((function(e){return e.label===t})))||void 0===o?void 0:o.code)&&void 0!==n?n:null),v,m,r),null!=v&&c.openModal((function(e){return a.createElement(l.default,h({body:p.default.Messages.CALL_FEEDBACK_CONFIRMATION},e))})))},onClose:t,transitionState:n,otherKey:o.default.CALL_FEEDBACK_OPTION_OTHER})}g.displayName="VoiceCallFeedbackModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[{label:a.default.Messages.CALL_FEEDBACK_OPTION_COULD_NOT_HEAR_AUDIO,code:2,value:r.default.CALL_FEEDBACK_OPTION_COULD_NOT_HEAR_AUDIO},{label:a.default.Messages.CALL_FEEDBACK_OPTION_NOBODY_COULD_HEAR_ME,code:3,value:r.default.CALL_FEEDBACK_OPTION_NOBODY_COULD_HEAR_ME},{label:a.default.Messages.CALL_FEEDBACK_OPTION_AUDIO_ECHOS,code:4,value:r.default.CALL_FEEDBACK_OPTION_AUDIO_ECHOS},{label:a.default.Messages.CALL_FEEDBACK_OPTION_AUDIO_ROBOTIC,code:5,value:r.default.CALL_FEEDBACK_OPTION_AUDIO_ROBOTIC},{label:a.default.Messages.CALL_FEEDBACK_OPTION_AUDIO_CUT,code:6,value:r.default.CALL_FEEDBACK_OPTION_AUDIO_CUT},{label:a.default.Messages.CALL_FEEDBACK_OPTION_BAD_VOLUME,code:7,value:r.default.CALL_FEEDBACK_OPTION_BAD_VOLUME},{label:a.default.Messages.CALL_FEEDBACK_OPTION_BACKGROUND_NOISE,code:8,value:r.default.CALL_FEEDBACK_OPTION_BACKGROUND_NOISE}];e&&t.push({label:a.default.Messages.CALL_FEEDBACK_OPTION_SPEAKERPHONE,code:9,value:r.default.CALL_FEEDBACK_OPTION_SPEAKERPHONE});return t.push({label:a.default.Messages.CALL_FEEDBACK_OPTION_HEADSET,code:10,value:r.default.CALL_FEEDBACK_OPTION_HEADSET},{label:a.default.Messages.CALL_FEEDBACK_OPTION_OTHER,code:1,value:r.default.CALL_FEEDBACK_OPTION_OTHER}),t};var r=o(n(1300)),a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i,u){var s=r.default.getSettings(),d=r.default.getInputDeviceId(),f=r.default.getInputDevices()[d],c=r.default.getOutputDeviceId(),p=r.default.getOutputDevices()[c],v=r.default.getVideoDeviceId(),y=r.default.getVideoDevices()[v],m=r.default.getNoiseCancellation();a.default.track(o.AnalyticEvents.CALL_REPORT_PROBLEM,l({rating:e||"no response",reason_code:t,reason_description:n,feedback:i,audio_input_mode:s.mode,automatic_audio_input_sensitivity_enabled:s.modeOptions.autoThreshold,audio_input_sensitivity:s.modeOptions.threshold,echo_cancellation_enabled:s.echoCancellation,noise_suppression_enabled:s.noiseSuppression,automatic_gain_control_enabled:s.automaticGainControl,voice_output_volume:s.outputVolume,noise_cancellation_enabled:m,input_device_name:null==f?void 0:f.name,output_device_name:null==p?void 0:p.name,video_device_name:null==y?void 0:y.name},u))};var r=i(n(51)),a=i(n(13)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(28)),a=u(n(216)),o=n(8277),i=u(n(702)),l=n(8795);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var u=a.prototype;return u.getLastVoiceFeedbackDate=function(){var e;return null!==(e=r.default.get(l.LAST_VOICE_FEEDBACK_DATE_STORAGE_KEY))&&void 0!==e?e:null},u.getLastActivityFeedbackDate=function(){var e;return null!==(e=r.default.get(l.LAST_ACTIVITY_FEEDBACK_DATE_STORAGE_KEY))&&void 0!==e?e:null},u.updateLastVoiceFeedbackDate=function(){r.default.set(l.LAST_VOICE_FEEDBACK_DATE_STORAGE_KEY,Date.now())},u.updateLastActivityFeedbackDate=function(){r.default.set(l.LAST_ACTIVITY_FEEDBACK_DATE_STORAGE_KEY,Date.now())},u.shouldShowVoiceFeedback=function(){var e=this.getLastVoiceFeedbackDate(),t=null==e||Date.now()-e>=l.END_VOICE_FEEDBACK_COOLDOWN;return Math.random()<l.END_VOICE_FEEDBACK_CHANCE&&i.default.hasHotspot(o.HotspotLocations.VOICE_CALL_FEEDBACK)&&t},u.shouldShowActivityFeedback=function(){var e=this.getLastActivityFeedbackDate(),t=null==e||Date.now()-e>=l.END_ACTIVITY_FEEDBACK_COOLDOWN;return Math.random()<l.END_ACTIVITY_FEEDBACK_CHANCE&&i.default.hasHotspot(o.HotspotLocations.POST_ACTIVITY_FEEDBACK)&&t},u.shouldShowStreamFeedback=function(){return Math.random()<l.END_STREAM_FEEDBACK_CHANCE&&i.default.hasHotspot(o.HotspotLocations.REPORT_PROBLEM_POST_STREAM)},a}(a.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(2)),a=u(n(478)),o=u(n(26)),i=u(n(71)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f={};function c(e){var t=e.name,n=e.hash,r=e.missingData;i.default.markGameReported(t);for(var l,u=s(r);!(l=u()).done;){var d=l.value;switch(d){case"icon":var c=f[t];return void(null!=c&&a.default.uploadIcon(t,n,c));default:new o.default("GameStoreIconManager").log("Could not find missing data key: "+d)}}}function p(e){var t=e.gameName,n=e.icon;f[t]=n}var v={initialize:function(){r.default.subscribe(l.ActionTypes.UNVERIFIED_GAME_UPDATE,c),r.default.subscribe(l.ActionTypes.GAME_ICON_UPDATE,p)}};t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(2)),a=d(n(478)),o=n(8716),i=d(n(216)),l=d(n(11)),u=d(n(120)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=new(function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).handleConnectionOpen=function(){var e=l.default.isGuest();u.default.fetched||e||(0,o.fetchLibrary)(),a.default.getDetectableGames()},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var d=i.prototype;return d._initialize=function(){r.default.subscribe(s.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen)},d._terminate=function(){r.default.unsubscribe(s.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen)},i}(i.default));t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkLaunchableGame=s,t.default=void 0;var r=u(n(2)),a=u(n(71)),o=u(n(312)),i=u(n(1245)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=i.default.launchableGames[e],n=a.default.getGame(e);return(null!=n?o.default.isLaunchable(n):o.default.isGameLaunchable(e)).then((function(n){n!==t&&r.default.dispatch({type:l.ActionTypes.GAME_LAUNCHABLE_UPDATE,gameId:e,isLaunchable:n})}))}function d(e){s(e.gameId)}var f={initialize:function(){r.default.subscribe(l.ActionTypes.CHECK_LAUNCHABLE_GAME,d)}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(8786),a=i(n(120)),o=i(n(1167));function i(e){return e&&e.__esModule?e:{default:e}}var l={init:function(){a.default.whenInitialized((function(){null!=o.default.testModeApplicationId&&(0,r.authorizeAndSetTestModeApplication)(o.default.testModeApplicationId,o.default.testModeOriginURL)}))}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(2)),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(266)),o=s(n(11)),i=n(263),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function d(){if((0,i.isSupportedPlatform)()){var e=o.default.getToken(),t=o.default.getId();if(null==e)throw new Error("missing user token");a.init(e,t)}}function f(){a.destroy()}var c={init:function(){r.default.subscribe(l.ActionTypes.CONNECTION_OPEN,d),r.default.subscribe(l.ActionTypes.LOGOUT,f)}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(0)),a=m(n(2)),o=m(n(288)),i=n(364),l=m(n(10805)),u=m(n(163)),s=m(n(11)),d=m(n(94)),f=h(n(41)),c=m(n(5966)),p=m(n(10806)),v=n(140),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}var E={init:function(){p.default.init(),a.default.subscribe(y.ActionTypes.MEDIA_ENGINE_VIDEO_STATE_CHANGED,(function(e){var t=e.videoState,n=u.default.getActiveStreamForUser(s.default.getId());if(null!=n){var r=t===y.MediaEngineVideoStates.PAUSED;(0,i.setStreamPaused)(n,r)}})),a.default.subscribe(y.ActionTypes.STREAM_DELETE,(function(e){e.reason===y.ApplicationStreamDeleteReasons.STREAM_FULL&&((0,i.closeStream)(e.streamKey,!1),f.openModal((function(e){return r.createElement(l.default,e)})))})),a.default.subscribe(y.ActionTypes.STREAM_WATCH,(function(e){var t=e.streamKey;if(!e.allowMultiple){var n=(0,v.decodeStreamKey)(t);u.default.getAllActiveStreams().forEach((function(e){e.ownerId!==n.ownerId&&e.ownerId!==s.default.getId()&&(e.ownerId===s.default.getId()&&o.default.setDesktopSource(null),(0,i.closeStream)((0,v.encodeStreamKey)(e),!1))}))}})),a.default.subscribe(y.ActionTypes.VOICE_STATE_UPDATE,(function(e){if(e.userId===s.default.getId()){var t=u.default.getAllActiveStreams(),n=d.default.getChannelId();t.forEach((function(e){e.channelId!==n&&(0,c.default)(e,!1)}))}}))}};t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(29)),o=c(n(55)),i=n(85),l=c(n(159)),u=n(35),s=c(n(24)),d=c(n(6)),f=c(n(7930));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.onClose,n=e.transitionState,r=(0,i.useUID)();return v(u.ModalRoot,{"aria-labelledby":r,size:u.ModalSize.SMALL,transitionState:n},void 0,v(u.ModalHeader,{justify:o.default.Justify.BETWEEN,id:r},void 0,v(l.default,{tag:l.default.Tags.H2,className:f.default.header},void 0,d.default.Messages.STREAM_FULL_MODAL_HEADER),v(u.ModalCloseButton,{onClick:t,className:f.default.modalCloseButton})),v(u.ModalContent,{},void 0,v(s.default,{size:s.default.Sizes.SIZE_16,className:f.default.content},void 0,d.default.Messages.STREAM_FULL_MODAL_BODY),v("div",{className:f.default.fullArt})),v(u.ModalFooter,{},void 0,v(a.default,{onClick:t},void 0,d.default.Messages.OKAY)))}y.displayName="StreamFullModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(57),a=v(n(2)),o=n(364),i=v(n(163)),l=v(n(11)),u=v(n(10)),s=v(n(386)),d=v(n(36)),f=v(n(1270)),c=n(140),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _=new r.Timeout,h=new r.Timeout,E=null;function g(e,t){var n=u.default.getChannel(e),r=i.default.getActiveStreamForUser(t);if((null==n?void 0:n.isDM())&&d.default.getVoiceChannelId()===e&&null==r){var a=i.default.getStreamForUser(t);if(null==a)return!1;var l=(0,c.encodeStreamKey)(a);return l!==E&&(E=l,(0,o.watchStream)(a,{noFocus:!0}),!0)}return!1}function S(e,t){var n=null!=t?t:s.default.getPreferredRegion();null!=n&&n!==s.default.getRegion(f.default.getHostname())&&(0,o.changeStreamRegion)(e,n)}var O={init:function(){var e=function(e){f.default.getAllActiveStreamKeys().includes(e)||h.start(5e3,(function(){a.default.dispatch({type:p.ActionTypes.STREAM_TIMED_OUT,streamKey:e})}))};a.default.subscribe(p.ActionTypes.STREAM_WATCH,(function(t){var n=t.streamKey;e(n)})),a.default.subscribe(p.ActionTypes.STREAM_START,(function(t){var n=t.streamType,r=t.guildId,a=t.channelId;e((0,c.encodeStreamKey)({streamType:n,guildId:r,channelId:a,ownerId:l.default.getId()}))})),a.default.subscribe(p.ActionTypes.STREAM_CREATE,(function(){h.stop()})),a.default.subscribe(p.ActionTypes.STREAM_UPDATE,(function(){h.stop()})),a.default.subscribe(p.ActionTypes.STREAM_DELETE,(function(){h.stop()})),a.default.subscribe(p.ActionTypes.STREAM_CLOSE,(function(){_.stop(),h.stop()})),a.default.subscribe(p.ActionTypes.VOICE_CHANNEL_SELECT,(function(e){var t=e.channelId;if(null!=t){E=null;var n=i.default.getAllApplicationStreamsForChannel(t).filter((function(e){return e.ownerId!==l.default.getId()}))[0];null!=n&&g(t,n.ownerId)}})),a.default.subscribe(p.ActionTypes.VOICE_STATE_UPDATE,(function(e){var t=e.userId,n=e.channelId,r=e.selfStream;if(t!==l.default.getId()&&null!=n){if(r&&g(n,t))return;var a=i.default.getActiveStreamForUser(t);if(null!=a&&a.channelId===n&&(r||a.state===p.ApplicationStreamStates.ENDED||_.start(18e4,(function(){return(0,o.closeStream)((0,c.encodeStreamKey)(a),!1)})),r&&a.state===p.ApplicationStreamStates.ENDED)){_.stop();var u=i.default.getStreamForUser(t);if(null==u)return;(0,o.watchStream)(u)}}})),a.default.subscribe(p.ActionTypes.CALL_UPDATE,(function(e){var t=e.channelId,n=e.region,r=i.default.getActiveStreamForUser(l.default.getId());(null==r?void 0:r.channelId)===t&&S((0,c.encodeStreamKey)(r),n)})),a.default.subscribe(p.ActionTypes.CHANNEL_UPDATES,(function(e){var t=e.updates,n=i.default.getActiveStreamForUser(l.default.getId());if(null!=n)for(var r,a=y(t);!(r=a()).done;){var o=r.value;n.channelId===o.channel.id&&S((0,c.encodeStreamKey)(n),o.channel.rtcRegion)}}))}};t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(2)),a=n(5829),o=n(5672),i=c(n(216)),l=c(n(1280)),u=c(n(8492)),s=c(n(15)),d=c(n(8493)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){var t=u.default.getCurrentConfig({guildId:e}).enabled,n=l.default.getCurrentConfig({guildId:e}).enabled;(t||n)&&d.default.fetchGuildEventsForGuild(e)}var _=new(function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var l=i.prototype;return l._initialize=function(){r.default.subscribe(f.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen),r.default.subscribe(f.ActionTypes.GUILD_CREATE,this.handleGuildCreate),r.default.subscribe(f.ActionTypes.GUILD_SCHEDULED_EVENT_CREATE,this.handleGuildScheduledEventCreate),r.default.subscribe(f.ActionTypes.FETCH_GUILD_EVENTS_FOR_GUILD,this.handleGuildScheduledEventFetch)},l._terminate=function(){r.default.unsubscribe(f.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen),r.default.unsubscribe(f.ActionTypes.GUILD_CREATE,this.handleGuildCreate),r.default.unsubscribe(f.ActionTypes.GUILD_SCHEDULED_EVENT_CREATE,this.handleGuildScheduledEventCreate),r.default.unsubscribe(f.ActionTypes.FETCH_GUILD_EVENTS_FOR_GUILD,this.handleGuildScheduledEventFetch)},l.handleConnectionOpen=function(){for(var e=0,t=Object.keys(s.default.getGuilds());e<t.length;e++){m(t[e])}d.default.getGuildEventsForCurrentUser()},l.handleGuildCreate=function(e){m(e.guild.id)},l.handleGuildScheduledEventCreate=function(e){for(var t,n=v(e.guildScheduledEvent.sku_ids);!(t=n()).done;){var r=t.value;(0,o.fetchSKU)("",r)}},l.handleGuildScheduledEventFetch=function(e){var t=function(e){for(var t,n=v(e);!(t=n()).done;)for(var r,a=v(t.value.skus);!(r=a()).done;){var o=r.value;if(null!=(null==o?void 0:o.application_id))return o.application_id}return null}(e.guildScheduledEvents);null!=t&&(0,a.fetchUserEntitlementsForApplication)(t)},i}(i.default));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(2)),a=s(n(10309)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1220)),i=n(395),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}var d=!1,f={init:function(){r.default.subscribe(l.ActionTypes.VOICE_CHANNEL_SELECT,(function(e){var t=e.channelId;a.default.subscribe({},(function(e){d=e.showPopout}))(),d&&null==t&&o.hideHotspot(i.HotspotLocations.VOICE_PANEL_INTRODUCTION)}))}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(14)),a=s(n(1390)),o=s(n(216)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8796)),l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){d(o,r,a,i,l,"next",e)}function l(e){d(o,r,a,i,l,"throw",e)}i(void 0)}))}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=new(function(e){var t,n;function o(){for(var t,n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return(t=e.call.apply(e,[this].concat(o))||this).checked=!1,t.unsubscribe=null,t.handleExperimentUpdate=f(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.checked||!(0,i.inIncentiviedInstallExperiment)()){e.next=6;break}return t.checked=!0,e.next=4,r.default.get(l.Endpoints.ICENTIVIZED_INSTALL);case 4:(n=e.sent).ok&&n.body.eligible&&a.default.show(l.NoticeTypes.INCENTIVIZED_INSTALL);case 6:case"end":return e.stop()}}),e)}))),t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var u=o.prototype;return u._initialize=function(){this.unsubscribe=i.default.subscribe({},this.handleExperimentUpdate)},u._terminate=function(){var e;null===(e=this.unsubscribe)||void 0===e||e.call(this)},o}(o.default));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(57),a=l(n(2)),o=l(n(216)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=new(function(e){var t,n;function o(){for(var t,n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(t=e.call.apply(e,[this].concat(o))||this).clearErrorTimeout=new r.Timeout,t.handleNoiseCancellationError=function(){t.clearErrorTimeout.start(3e3,(function(){return a.default.dispatch({type:i.ActionTypes.MEDIA_ENGINE_NOISE_CANCELLATION_ERROR_RESET})}))},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var l=o.prototype;return l._initialize=function(){a.default.subscribe(i.ActionTypes.MEDIA_ENGINE_NOISE_CANCELLATION_ERROR,this.handleNoiseCancellationError)},l._terminate=function(){this.clearErrorTimeout.stop(),a.default.unsubscribe(i.ActionTypes.MEDIA_ENGINE_NOISE_CANCELLATION_ERROR,this.handleNoiseCancellationError)},o}(o.default));t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(0)),a=s(n(2)),o=s(n(216)),i=f(n(10812)),l=n(41),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(){return(c=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}).apply(this,arguments)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=new(function(e){var t,n;function o(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return(t=e.call.apply(e,[this].concat(a))||this)._openReportMessageModal=function(e){var t=e.channel,n=e.message;(0,l.openModal)((function(e){return r.createElement(i.default,c({channel:t,message:n},e))}),{modalKey:i.REPORT_MESSAGE_MODAL_KEY})},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var s=o.prototype;return s._initialize=function(){a.default.subscribe(u.ActionTypes.REPORT_MESSAGE_MODAL_OPEN,this._openReportMessageModal)},s._terminate=function(){a.default.unsubscribe(u.ActionTypes.REPORT_MESSAGE_MODAL_OPEN,this._openReportMessageModal)},o}(o.default));t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.REPORT_MESSAGE_MODAL_KEY=void 0;var r,a=v(n(0)),o=c(n(8495)),i=c(n(5673)),l=n(35),u=v(n(10813)),s=c(n(10920)),d=c(n(6)),f=c(n(7400));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){m(o,r,a,i,l,"next",e)}function l(e){m(o,r,a,i,l,"throw",e)}i(void 0)}))}}var h;t.REPORT_MESSAGE_MODAL_KEY="REPORT_MESSAGE",function(e){e[e.REPORT_MESSAGE=0]="REPORT_MESSAGE",e[e.SUCCESS=1]="SUCCESS"}(h||(h={}));var E=[h.REPORT_MESSAGE,h.SUCCESS],g=y(u.ErrorState,{}),S=function(e){var t=e.message,n=e.channel,r=e.onClose,c=e.transitionState,p=a.useState(!1),v=p[0],m=p[1],S=a.useState(null),O=S[0],I=S[1],T=a.useState(h.REPORT_MESSAGE),C=T[0],b=T[1],M=a.useState(null),N=M[0],A=M[1],P=a.useState(null),R=P[0],L=P[1];a.useEffect((function(){var e=function(){var e=_(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.default.tokenizeReportedMessage(n.id,t.id);case 3:r=e.sent,I(r),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),m(!0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),r=function(){var e=_(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.default.getOptions();case 2:t=e.sent,n=t.typeOptions,r=t.subTypeOptions,A(n),L(r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e(),v||r()}),[n.id,v,t.id]);var D=y(u.default,{token:O,message:t,channel:n,onClose:r,onSuccess:function(){b(h.SUCCESS)},typeOptions:N,subTypeOptions:R}),w=y(s.default,{message:t,channel:n,onClose:r});return y(l.ModalRoot,{transitionState:c,size:l.ModalSize.DYNAMIC,className:f.default.modal,"aria-label":d.default.Messages.REPORT_MODAL_REPORT_MESSAGE},void 0,v?g:y(i.default,{step:C,steps:E},void 0,C===h.REPORT_MESSAGE?null==N||null==R||null==O?null:D:w))};S.displayName="ReportMessageModal";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ErrorState=t.REPORT_MESSAGE_MODAL_KEY=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(8495)),i=g(n(106)),l=g(n(8375)),u=g(n(29)),s=g(n(1164)),d=g(n(8272)),f=g(n(153)),c=n(131),p=n(35),v=g(n(47)),y=n(374),m=g(n(272)),_=n(1),h=g(n(6)),E=g(n(7400));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}t.REPORT_MESSAGE_MODAL_KEY="REPORT_MESSAGE";var T=function(e){var t=e.className;return I(s.default,{className:t},void 0,h.default.Messages.REPORT_MODAL_ERROR.format({tnsReportUrl:"https://dis.gd/request"}))};t.ErrorState=T,T.displayName="ErrorState";var C=function(e){var t,n,r=e.token,s=e.channel,g=e.message,S=e.typeOptions,C=e.subTypeOptions,b=e.onClose,M=e.onSuccess,N=a.useState(null),A=N[0],P=N[1],R=a.useState(null),L=R[0],D=R[1],w=a.useState(""),j=w[0],k=w[1],U=a.useState(""),G=U[0],F=U[1],B=a.useState(!1),H=B[0],x=B[1],V=a.useState(!1),W=V[0],Y=V[1],z=null!=A&&null!=C[A],K=null!=L||!z,$=function(e){A!==e&&(P(e),D(null))},Z=function(e){L!==e&&D(e)},q=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=A){e.next=2;break}return e.abrupt("return");case 2:return x(!0),e.prev=3,i.default.trackWithMetadata(_.AnalyticEvents.MESSAGE_REPORTED,{report_type:A,report_sub_type:L,subject:j,description:G,location_object:"report_message_modal",guild_id:s.getGuildId(),channel_id:s.id,message_id:g.id}),e.next=7,o.default.submitReport(r,A,L,j,G);case 7:x(!1),M(),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(3),x(!1),Y(!0);case 15:case"end":return e.stop()}}),e,null,[[3,11]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){O(o,r,a,i,l,"next",e)}function l(e){O(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),X=I(f.default,{value:j,onChange:k}),J=I(d.default,{value:G,onChange:F});return a.createElement(a.Fragment,null,I(p.ModalContent,{className:E.default.content},void 0,I(v.default,{className:E.default.modalHeader,size:v.default.Sizes.SIZE_24},void 0,h.default.Messages.REPORT_MODAL_REPORT_MESSAGE),W&&I(T,{className:E.default.formItem}),I(c.FormItem,{title:h.default.Messages.REPORT_MODAL_MESSAGE_SELECTED,className:E.default.formItem},void 0,I(m.default,{className:E.default.message},void 0,I(l.default,{channel:s,message:g,animateAvatar:!1,disableInteraction:!0}))),(t=S.find((function(e){return e.value===A})),n=null!=t?t.description:null,a.createElement(a.Fragment,null,I(c.FormItem,{className:E.default.formItem,title:h.default.Messages.REPORT_MODAL_TYPE_TITLE,required:!0},void 0,I(y.SingleSelect,{placeholder:h.default.Messages.REPORT_MODAL_SELECT_ONE,options:S,value:A,onChange:$,maxVisibleItems:6})),I(c.FormText,{type:c.FormText.Types.DESCRIPTION,className:E.default.description},void 0,n))),null!=A&&z?I(c.FormItem,{title:C[A].subTypeQuestion,className:E.default.formItem,required:!0},void 0,I(y.SingleSelect,{placeholder:h.default.Messages.REPORT_MODAL_SELECT_ONE,options:C[A].subTypes,value:L,onChange:Z})):null,null!=A&&K?a.createElement(a.Fragment,null,I(c.FormItem,{title:h.default.Messages.REPORT_MODAL_SUBJECT,className:E.default.formItem,required:!0},void 0,X),I(c.FormItem,{title:h.default.Messages.REPORT_MODAL_DESCRIPTION,className:E.default.formItem,required:!0},void 0,J,I(c.FormText,{type:c.FormText.Types.DESCRIPTION,className:E.default.description},void 0,h.default.Messages.REPORT_MODAL_DESCRIPTION_MIN_MAX.format({min:0,max:800})),G.length>800?I(c.FormText,{type:c.FormText.Types.DESCRIPTION,className:E.default.descriptionError},void 0,h.default.Messages.REPORT_MODAL_DESCRIPTION_MAX_EXCEEDED):null)):null),I(p.ModalFooter,{className:E.default.footer},void 0,I(u.default,{color:u.default.Colors.PRIMARY,look:u.default.Looks.LINK,onClick:b},void 0,h.default.Messages.CANCEL),I(u.default,{onClick:q,disabled:!K||0===j.length||G.length<0||G.length>800,submitting:H},void 0,h.default.Messages.REPORT_MODAL_SUBMIT)))};t.default=C},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(390)),i=m(n(1217)),l=m(n(8375)),u=m(n(29)),s=n(131),d=n(35),f=m(n(47)),c=m(n(272)),p=n(1),v=m(n(6)),y=m(n(7400));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t=e.onClose,n=e.message,r=e.channel,m=null==r.guild_id,_=m?v.default.Messages.REPORT_MODAL_SHOULD_BLOCK:v.default.Messages.REPORT_MODAL_SHOULD_DELETE,E=m?v.default.Messages.REPORT_MODAL_BLOCK_USER:v.default.Messages.DELETE_MESSAGE;return a.createElement(a.Fragment,null,h(d.ModalContent,{className:y.default.successModalContent},void 0,h(f.default,{size:f.default.Sizes.SIZE_24},void 0,v.default.Messages.REPORT_MODAL_SUBMITTED),h(s.FormText,{type:s.FormText.Types.DESCRIPTION,className:y.default.successModalText},void 0,v.default.Messages.REPORT_MODAL_SUBMITTED_EMAIL_CONFIRMATION),h(s.FormItem,{className:y.default.messageFormItem,title:_},void 0,h(c.default,{className:y.default.message},void 0,h(l.default,{channel:r,message:n,animateAvatar:!1,disableInteraction:!0})))),h(d.ModalFooter,{className:y.default.footer},void 0,h(u.default,{color:u.default.Colors.PRIMARY,look:u.default.Looks.LINK,onClick:t},void 0,v.default.Messages.CLOSE),h(u.default,{look:u.default.Looks.FILLED,color:u.default.Colors.RED,onClick:function(){m?i.default.addRelationship(n.author.id,{location:"Report Modal"},p.RelationshipTypes.BLOCKED):o.default.deleteMessage(r.id,n.id),t()}},void 0,E)))};t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=A(n(0)),a=M(n(2)),o=M(n(216)),i=A(n(10343)),l=A(n(735)),u=M(n(8398)),s=n(417),d=M(n(749)),f=M(n(8451)),c=A(n(8523)),p=M(n(8932)),v=M(n(298)),y=M(n(15)),m=M(n(107)),_=M(n(12)),h=n(41),E=A(n(48)),g=M(n(16)),S=A(n(8660)),O=n(8570),I=M(n(9136)),T=n(9654),C=M(n(10922)),b=n(1);function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function P(){return(P=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}).apply(this,arguments)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=new(function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var M=o.prototype;return M._initialize=function(){a.default.subscribe(b.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen)},M._terminate=function(){a.default.unsubscribe(b.ActionTypes.CONNECTION_OPEN,this.handleConnectionOpen)},M.handleConnectionOpen=function(){var e=I.default.getType();if(null!=e){switch(e){case O.NewUserTypes.INVITE_UNCLAIMED:d.default.flowStart(s.FlowType.INVITE,s.RegistrationSteps.NUF_STARTED);break;case O.NewUserTypes.ORGANIC_REGISTERED:d.default.flowStart(s.FlowType.ORGANIC,s.RegistrationSteps.NUF_STARTED);break;case O.NewUserTypes.MARKETING_UNCLAIMED:d.default.flowStart(s.FlowType.ORGANIC_MARKETING,s.RegistrationSteps.NUF_STARTED)}var t=!1,n=m.default.getGuildId();if(e===O.NewUserTypes.INVITE_UNCLAIMED){var a=y.default.getGuild(n);null!=a&&a.hasFeature(b.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED)&&a.hasFeature(b.GuildFeatures.COMMUNITY)&&(t=!0,f.default.fetchWelcomeScreen(a.id))}var o,M,N=0===v.default.totalGuilds&&!g.default.embedded,A=i.userNeedsAgeGate();o=[{key:"Unified NUF Modal",open:function(e){var t=function(e){switch(e){case T.NUFSlides.AGE_GATE:d.default.flowStep(s.FlowType.ANY,s.RegistrationSteps.AGE_GATE);break;case T.NUFSlides.CHOOSE_TEMPLATE:d.default.flowStep(s.FlowType.ANY,s.CreateGuildSteps.GUILD_TEMPLATES);break;case T.NUFSlides.CUSTOMIZE_GUILD:d.default.flowStep(s.FlowType.ANY,s.CreateGuildSteps.GUILD_CREATE);break;case T.NUFSlides.CHANNEL_PROMPT:d.default.flowStep(s.FlowType.ANY,s.CreateGuildSteps.CHANNEL_PROMPT);break;case T.NUFSlides.JOIN_GUILD:d.default.flowStep(s.FlowType.ANY,s.CreateGuildSteps.JOIN_GUILD);break;case T.NUFSlides.CREATION_INTENT:d.default.flowStep(s.FlowType.ANY,s.CreateGuildSteps.CREATION_INTENT);break;case T.NUFSlides.COMPLETE:d.default.flowStep(s.FlowType.ANY,s.CreateGuildSteps.SUCCESS);break;case null:break;default:E.assertNever(e)}};(0,h.openModal)((function(e){return r.createElement(C.default,P({},e,{onSlideChange:t}))}),{onCloseRequest:b.NOOP,onCloseCallback:e})},predicate:function(){return N}},{key:"New User Age Gate",open:l.openNewUserAgeGateModal,predicate:function(){return A&&!N}},{key:"Claim Account Modal",open:function(e){return l.openClaimAccountModal(g.default.embedded,e)},predicate:function(){var e;return!t&&!(null===(e=_.default.getNullableCurrentUser())||void 0===e?void 0:e.isClaimed())}},{key:"Verification Gate with Claim Account",open:function(e){return(0,u.default)(n,e)},predicate:function(){var e;return t&&!(null===(e=_.default.getNullableCurrentUser())||void 0===e?void 0:e.isClaimed())}},{key:"Guild Welcome Modal",open:function(e){return(0,h.openModal)((function(e){return r.createElement(p.default,P({},e,{guildId:n}))}),{onCloseCallback:e})},predicate:function(){return null!=n&&null!=c.default.get(n)&&c.default.get(n)!==c.NO_WELCOME_SCREEN}}],M=function(){S.setNewUserFlowCompleted(),d.default.flowStep(s.FlowType.ANY,s.RegistrationSteps.NUF_COMPLETE,!0)},[].concat(o).reverse().forEach((function(e){var t=M;M=function(){e.predicate()?e.open(t):t()}})),M()}},o}(o.default));t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=L(n(9)),i=n(95),l=n(3),u=n(9090),s=n(9086),d=n(9087),f=n(8791),c=L(n(9089)),p=L(n(12)),v=L(n(271)),y=L(n(55)),m=n(703),_=n(85),h=n(35),E=L(n(24)),g=L(n(13)),S=n(259),O=n(8570),I=L(n(9136)),T=n(9654),C=L(n(10923)),b=L(n(10924)),M=L(n(10925)),N=L(n(10926)),A=n(1),P=L(n(6)),R=L(n(7935));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(e){var t=(0,_.useUID)(),n=e.onSlideChange,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onSlideChange"]),L=r.onClose,D=a.useState(!1),k=D[0],U=D[1],G=(0,l.useStateFromStores)([p.default],(function(){return p.default.getNullableCurrentUser()})),F=null!=G&&null==G.nsfwAllowed,B=a.useState(F?T.NUFSlides.AGE_GATE:T.NUFSlides.CHOOSE_TEMPLATE),H=B[0],x=B[1],V=a.useState(null),W=V[0],Y=V[1];a.useEffect((function(){n(k?T.NUFSlides.COMPLETE:H)}),[n,H,k]);var z,K=a.useState(null),$=K[0],Z=K[1],q=a.useState(null),X=q[0],J=q[1],Q=a.useState(!1),ee=Q[0],te=Q[1],ne=(0,l.useStateFromStores)([I.default],(function(){return I.default.getType()===O.NewUserTypes.INVITE_UNCLAIMED})),re=a.useCallback((function(e){J(e),x(T.NUFSlides.CREATION_INTENT),g.default.track(A.AnalyticEvents.GUILD_TEMPLATE_SELECTED,{template_name:e.label,template_code:e.code})}),[J,x]),ae=(0,d.useCreationIntentSlide)({hasFooter:!1,onBack:function(){J(null),x(T.NUFSlides.CHOOSE_TEMPLATE)},onCreationIntentChosen:function(e){te(e),x(T.NUFSlides.CUSTOMIZE_GUILD)}}),oe=ae.content,ie=ae.footer,le=(0,f.useCustomizeGuildSlide)({guildTemplate:X,titleClassName:R.default.customizeGuildTitle,hasFooter:!1,onGuildCreated:function(e){Z(e),(null==X?void 0:X.id)===u.GuildTemplateId.CREATE?x(T.NUFSlides.CHANNEL_PROMPT):U(!0)},onBack:function(){x(T.NUFSlides.CREATION_INTENT)},isSlideReady:W===T.NUFSlides.CUSTOMIZE_GUILD,isCommunity:ee}),ue=le.content,se=le.footer,de=(0,s.useChannelPromptSlide)({createdGuildId:$,hasFooter:!1,onChannelPromptCompleted:function(){U(!0)},isSlideReady:W===T.NUFSlides.CHANNEL_PROMPT}),fe=de.content,ce=de.footer,pe=(0,M.default)({onBack:function(){return x(T.NUFSlides.CHOOSE_TEMPLATE)},onComplete:function(){L()},onConnect:L,isSlideReady:W===T.NUFSlides.JOIN_GUILD}),ve=pe.content,ye=pe.footer;switch(H){case T.NUFSlides.CUSTOMIZE_GUILD:z=se;break;case T.NUFSlides.CHANNEL_PROMPT:z=ce;break;case T.NUFSlides.JOIN_GUILD:z=ye;break;case T.NUFSlides.CREATION_INTENT:z=ie}if(k)return a.createElement(h.ModalRoot,w({},r,{size:h.ModalSize.MEDIUM,className:(0,o.default)(R.default.modal,R.default.completed),"aria-labelledby":t}),j(b.default,{onComplete:L}));var me={impression_group:i.ImpressionGroups.GUILD_ADD_NUF};return a.createElement(h.ModalRoot,w({},r,{size:h.ModalSize.MEDIUM,className:R.default.modal,"aria-labelledby":t}),j("div",{className:R.default.sidebar},void 0,j(N.default,{step:H})),j("div",{className:(0,o.default)(R.default.content,(0,S.getThemeClass)(A.ThemeTypes.LIGHT))},void 0,j(m.Slides,{activeSlide:H,onSlideReady:function(e){return Y(e)},centered:!1},void 0,j(m.Slide,{id:T.NUFSlides.AGE_GATE},void 0,j("div",{className:R.default.container},void 0,j(C.default,{onComplete:function(){ne?L():x(T.NUFSlides.CHOOSE_TEMPLATE)},onClose:L}))),j(m.Slide,{id:T.NUFSlides.CHOOSE_TEMPLATE,impressionName:i.ImpressionNames.GUILD_ADD_LANDING,impressionMetadata:me},void 0,j("div",{className:(0,o.default)(R.default.container,R.default.shortFooter)},void 0,j(c.default,{className:R.default.templates,onChooseTemplate:re,isNewUser:!0}))),j(m.Slide,{id:T.NUFSlides.CREATION_INTENT,impressionName:i.ImpressionNames.GUILD_ADD_INTENT_SELECTION,impressionMetadata:me},void 0,j("div",{className:(0,o.default)(R.default.container,R.default.standardFooter)},void 0,oe)),j(m.Slide,{id:T.NUFSlides.CUSTOMIZE_GUILD,impressionName:i.ImpressionNames.GUILD_ADD_CUSTOMIZE,impressionMetadata:me},void 0,j("div",{className:(0,o.default)(R.default.container,R.default.standardFooter)},void 0,ue)),j(m.Slide,{id:T.NUFSlides.CHANNEL_PROMPT,impressionName:i.ImpressionNames.GUILD_ADD_CHANNEL_PROMPT,impressionMetadata:me},void 0,j("div",{className:(0,o.default)(R.default.container,R.default.standardFooter)},void 0,fe)),j(m.Slide,{id:T.NUFSlides.JOIN_GUILD,impressionName:i.ImpressionNames.GUILD_ADD_JOIN,impressionMetadata:me},void 0,j("div",{className:(0,o.default)(R.default.container,R.default.standardFooter)},void 0,ve))),H!==T.NUFSlides.AGE_GATE?j(h.ModalCloseButton,{onClick:L,className:R.default.closeButton}):null,H===T.NUFSlides.CHOOSE_TEMPLATE?j(h.ModalFooter,{justify:y.default.Justify.BETWEEN,className:(0,o.default)(R.default.footer,R.default.join)},void 0,j(v.default,{className:R.default.joinCTA,onClick:function(){x(T.NUFSlides.JOIN_GUILD)}},void 0,j(E.default,{size:E.default.Sizes.SIZE_14,className:R.default.joinCTA},void 0,P.default.Messages.NUF_HAVE_AN_INVITE_ALREADY," ",P.default.Messages.JOIN_SERVER_BUTTON_CTA))):null,null!=z?j(h.ModalFooter,{justify:y.default.Justify.BETWEEN,className:R.default.footer},void 0,z):null))}k.displayName="NUFModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(23)),i=n(3),l=n(1314),u=n(8790),s=E(n(1315)),d=E(n(12)),f=E(n(29)),c=E(n(284)),p=E(n(47)),v=E(n(24)),y=E(n(93)),m=n(1),_=E(n(6)),h=E(n(7931));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function I(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){O(o,r,a,i,l,"next",e)}function l(e){O(o,r,a,i,l,"throw",e)}i(void 0)}))}}function T(e){var t=e.onComplete,n=e.onClose,r=a.useState(null),E=r[0],g=r[1],O=a.useState(null),T=O[0],C=O[1],b=a.useState(!1),M=b[0],N=b[1],A=(0,i.useStateFromStores)([d.default],(function(){return d.default.getNullableCurrentUser()})),P=a.createRef();function R(){return(R=I(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.preventDefault(),(0,o.default)(null!=E,"Cannot submit null birthday."),e.prev=2,C(null),N(!0),e.next=7,(0,l.submitDateOfBirth)(E,"NUF");case 7:t(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),null!=e.t0.body&&null!=e.t0.body.date_of_birth?(n(),(0,u.openFailureAgeGateModal)(e.t0.body.date_of_birth,!0)):(C(e.t0.body.message),N(!1));case 13:case"end":return e.stop()}}),e,null,[[2,10]])})))).apply(this,arguments)}a.useEffect((function(){null!=A&&null!=A.nsfwAllowed&&t()}),[A,t]);var L=a.useCallback((function(e){g(e)}),[g]),D=a.useCallback((function(){var e;null===(e=P.current)||void 0===e||e.focus()}),[P]);return null==A?null:S("form",{className:h.default.content,onSubmit:function(e){return R.apply(this,arguments)}},void 0,S("div",{className:h.default.logo}),S(p.default,{className:h.default.title,size:p.default.Sizes.SIZE_24},void 0,_.default.Messages.NUF_JOIN_SERVER_TITLE_2),S(v.default,{color:v.default.Colors.STANDARD,className:h.default.description,size:v.default.Sizes.SIZE_16},void 0,_.default.Messages.NUF_AGE_GATE_BODY.format({helpURL:y.default.getArticleURL(m.HelpdeskArticles.AGE_GATE)})),S(c.default.Provider,{value:m.ThemeTypes.LIGHT},void 0,S(s.default,{required:!0,autoFocus:!0,wrapperClassName:h.default.formItem,label:_.default.Messages.AGE_GATE_YOUR_BIRTHDAY,name:"birthday",onChange:L,onPopulated:D,error:T,value:E})),S("div",{className:h.default.footer},void 0,S("div",{className:h.default.buttonWrapper},void 0,S(f.default,{buttonRef:P,type:"submit",size:f.default.Sizes.LARGE,submitting:M,disabled:null==E,fullWidth:!0},void 0,_.default.Messages.NEXT))))}T.displayName="AgeGate"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(9)),o=d(n(29)),i=d(n(61)),l=d(n(24)),u=d(n(6)),s=d(n(7932));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.onComplete;return c(i.default,{className:s.default.container,onClick:t},void 0,c(l.default,{size:l.default.Sizes.SIZE_24,className:s.default.title},void 0,u.default.Messages.NUF_COMPLETE_TITLE),c(l.default,{size:l.default.Sizes.SIZE_24,className:(0,a.default)(s.default.title,s.default.subtitle)},void 0,u.default.Messages.NUF_COMPLETE_SUBTITLE),c(o.default,{color:o.default.Colors.WHITE,onClick:t},void 0,u.default.Messages.NUF_COMPLETE_CTA))}p.displayName="Complete"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.onBack,r=e.onComplete,g=e.onConnect,S=e.isSlideReady,I=(0,c.useUID)(),T=a.useState(""),b=T[0],M=T[1],N=a.useState(!1),A=N[0],P=N[1],R=a.useState(null),L=R[0],D=R[1],w=a.useRef(null);a.useEffect((function(){var e;S&&(null===(e=w.current)||void 0===e||e.focus())}),[S]);var j=a.useCallback((function(e){e.preventDefault();var t=b.trim();if(""!==t){D(null),P(!0);var n=t.split("/"),a=n[n.length-1];i.default.resolveInvite(a,"Join Guild",{inputValue:t}).then((function(e){var t=e.invite;if(P(!1),null!=t){if(null!=t.channel){var n=i.default.getInviteContext("Join Guild",t);i.default.acceptInvite(t.code,n,(function(e){r(),i.default.transitionToInvite(e)})).catch((function(e){if(e instanceof u.V6OrEarlierAPIError){var t=(0,m.getInviteError)(e.code);D(t)}else D(h.default.Messages.INVITE_MODAL_ERROR_DEFAULT)}))}}else D(h.default.Messages.INSTANT_INVITE_EXPIRED)}),(function(e){P(!1);var t=new u.V6OrEarlierAPIError(e),n=(0,m.getInviteError)(t.code);D(n)}))}else D(h.default.Messages.INVALID_INVITE_LINK_ERROR)}),[b,P,D,r]),k=a.createElement(a.Fragment,null,O(v.ModalHeader,{className:E.default.header,direction:d.default.Direction.VERTICAL,separator:!1,id:I},void 0,O(y.default,{className:E.default.title,size:y.default.Sizes.SIZE_24,color:y.default.Colors.HEADER_PRIMARY},void 0,h.default.Messages.JOIN_SERVER_TITLE),O(y.default,{size:y.default.Sizes.SIZE_16,color:y.default.Colors.HEADER_SECONDARY},void 0,h.default.Messages.JOIN_SERVER_DESCRIPTION_NUF)),O(v.ModalContent,{},void 0,O("form",{onSubmit:j,className:E.default.inputForm},void 0,O(p.FormItem,{title:h.default.Messages.FORM_LABEL_INVITE_LINK,error:L,titleClassName:(0,o.default)(E.default.formTitle,(t={},t[E.default.error]=null!=L,t))},void 0,O(f.default,{value:b,onChange:M,className:E.default.input,inputClassName:E.default.inputInner,inputRef:w}))),O(y.default,{color:y.default.Colors.HEADER_SECONDARY,size:y.default.Sizes.SIZE_12},void 0,h.default.Messages.JOIN_SERVER_EXAMPLES.format({examples:C+"cool-people, hTKzmak"})),O(y.default,{size:y.default.Sizes.SIZE_12,color:y.default.Colors.HEADER_SECONDARY,className:E.default.connectCTA},void 0,h.default.Messages.JOIN_GUILD_CONNECT.format({onClick:function(){g(),l.default.open(_.UserSettingsSections.CONNECTIONS)}})))),U=a.createElement(a.Fragment,null,O(s.default,{color:s.default.Colors.BRAND,onClick:j,disabled:0===b.length,submitting:A},void 0,h.default.Messages.JOIN),O(s.default,{className:E.default.skipButton,look:s.default.Looks.BLANK,size:s.default.Sizes.MIN,onClick:n},void 0,h.default.Messages.BACK));return{content:k,footer:U}};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=g(n(1211)),l=g(n(473)),u=n(275),s=g(n(29)),d=g(n(55)),f=g(n(153)),c=n(85),p=n(131),v=n(35),y=g(n(24)),m=n(8491),_=n(1),h=g(n(6)),E=g(n(7933));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I,T,C=(I=window.GLOBAL_ENV.INVITE_HOST,T="",null==I&&(I=location.host,T=_.Routes.INVITE("")),location.protocol+"//"+I+T+"/")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(9)),o=n(9654),i=l(n(7934));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t,n,r,l,u,d,f,c,p,v,y,m=e.step,_=m===o.NUFSlides.AGE_GATE,h=m===o.NUFSlides.CHOOSE_TEMPLATE||m===o.NUFSlides.CREATION_INTENT,E=m===o.NUFSlides.CUSTOMIZE_GUILD,g=m===o.NUFSlides.CHANNEL_PROMPT||m===o.NUFSlides.JOIN_GUILD,S=E||g,O=h||S;return s("div",{className:i.default.sidebar},void 0,s("div",{className:(0,a.default)(i.default.step1,(t={},t[i.default.show]=_,t))}),s("div",{className:(0,a.default)(i.default.step24Clouds,(n={},n[i.default.show]=O,n))}),s("div",{className:(0,a.default)(i.default.step34Flag,(r={},r[i.default.show]=S,r))}),s("div",{className:(0,a.default)(i.default.step24Base,(l={},l[i.default.show]=O,l))}),s("div",{className:(0,a.default)(i.default.step24Ground,(u={},u[i.default.show]=O,u))}),s("div",{className:(0,a.default)(i.default.step2Base,(d={},d[i.default.show]=h,d))}),s("div",{className:(0,a.default)(i.default.step2Character,(f={},f[i.default.show]=h,f))}),s("div",{className:(0,a.default)(i.default.step34Base,(c={},c[i.default.show]=S,c))}),s("div",{className:(0,a.default)(i.default.step3Character,(p={},p[i.default.show]=E,p))}),s("div",{className:(0,a.default)(i.default.step4Character,(v={},v[i.default.show]=g,v))}),s("div",{className:(0,a.default)(i.default.step24Foreground,(y={},y[i.default.show]=O,y))}))}d.displayName="SidebarArt"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;c(n(0));var r,a=d(n(2)),o=d(n(216)),i=d(n(10928)),l=d(n(10991)),u=c(n(1293)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var o=r.prototype;return o._initialize=function(){a.default.subscribe(s.ActionTypes.CHANNEL_CALL_POPOUT_WINDOW_OPEN,this.handleOpenChannelCallPopout)},o._terminate=function(){a.default.unsubscribe(s.ActionTypes.CHANNEL_CALL_POPOUT_WINDOW_OPEN,this.handleOpenChannelCallPopout)},o.handleOpenChannelCallPopout=function(e){var t=e.channel;u.open(s.PopoutWindowKeys.CHANNEL_CALL_POPOUT,(function(e){return t.isGuildStageVoice()?p(l.default,{windowKey:e,channel:t}):p(i.default,{windowKey:e,channel:t})}),{defaultWidth:854,defaultHeight:480})},r}(o.default));t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(10344)),o=u(n(10366)),i=u(n(10367)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=d(a.default,{showInPopoutWindow:!0});function c(e){var t=e.windowKey,n=e.channel;return d(o.default,{withTitleBar:!0,windowKey:t,title:n.name},void 0,d(i.default,{channel:n,appContext:l.AppContext.POPOUT}),f)}c.displayName="PopoutWindowChannelCall"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=R;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=N(n(9)),i=n(3),l=N(n(705)),u=N(n(1226)),s=N(n(478)),d=n(687),f=n(691),c=N(n(688)),p=N(n(5952)),v=n(42),y=N(n(9655)),m=n(10345),_=N(n(8661)),h=N(n(8789)),E=N(n(36)),g=N(n(161)),S=N(n(294)),O=N(n(10953)),I=n(10957),T=n(156),C=n(1),b=N(n(7960)),M=N(n(7378));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e){var t=e.channel,n=a.useState(!1),r=n[0],N=n[1],A=(0,i.useStateFromStores)([S.default],(function(){return S.default.getSelfEmbeddedActivityForChannel(t.id)})),R=(0,i.useStateFromStores)([E.default],(function(){return E.default.getChannelId()===t.id})),L=(0,i.useStateFromStoresObject)([h.default],(function(){var e=h.default.pipWindow;return{dockedRect:null!=e?h.default.getDockedRect(e.id):null,isHidden:h.default.isEmbeddedActivityHidden()}})),D=L.dockedRect,w=L.isHidden,j=(0,i.useStateFromStoresObject)([p.default,g.default],(function(){var e,t=p.default.getWindow(C.PopoutWindowKeys.CHANNEL_CALL_POPOUT);return{popoutWindow:t,windowWidth:null!==(e=null==t?void 0:t.innerWidth)&&void 0!==e?e:g.default.windowSize().width-C.LEFT_PANEL_WIDTH}})),k=j.popoutWindow,U=j.windowWidth,G=(0,i.useStateFromStoresObject)([c.default],(function(){return{selectedParticipant:c.default.getSelectedParticipant(t.id),participantsOpen:c.default.getParticipantsOpen(t.id),layout:c.default.getLayout(t.id,C.AppContext.APP)}})),F=G.selectedParticipant,B=G.participantsOpen,H=G.layout,x=U<=m.FORCE_HIDE_PARTICIPANTS_WIDTH,V=R||null!=k,W=V&&(null==F?void 0:F.type)!==f.ParticipantTypes.ACTIVITY&&null==D,Y=(!V||W)&&!w,z=!x&&![C.ChannelLayouts.MINIMUM,C.ChannelLayouts.NORMAL].includes(H),K=z&&B;function $(){if(null!=A&&l.default.selectParticipant(t.id,A.applicationId),null==k){(0,d.popAllLayers)();var e=t.getGuildId()||C.ME;u.default.channelListScrollTo(e,t.id),(0,v.transitionToGuild)(e,t.id)}}function Z(){N(!r)}function q(){if(null!=A){var e=A.joinSecret,n=A.applicationId;null!=e&&s.default.joinWithSecret(n,e,t.id,T.ActivityIntent.PLAY,!0)}}return null==A?null:P(_.default,{timeout:2e3},void 0,(function(e){var n,i,l,u=e.idle,s=e.onActive;return P(y.default,{className:(0,o.default)(b.default.root,(i={},i[b.default.pipMode]=Y,i[M.default.idle]=u&&!(null===(n=A.config)||void 0===n?void 0:n.useInteractivePIP),i[b.default.pipModeShort]=Y&&!r,i[b.default.pipModeTall]=Y&&r,i[b.default.hidden]=w,i)),noBorder:!K&&!Y},void 0,function(e,n){var o;return Y&&null!=A?(null===(o=A.config)||void 0===o?void 0:o.useInteractivePIP)?P(I.InteractivePIPHeader,{onJumpToChannel:$,applicationId:A.applicationId,channel:t,showControls:!n,onMouseMove:e,onMouseEnter:e,onToggleHeight:Z,isExpanded:r}):a.createElement(a.Fragment,null,P("div",{onMouseMove:e,onMouseDown:e,className:b.default.clickShield,onDoubleClick:$}),P(I.PIPOverlay,{idle:n,onJumpToChannel:$,channel:t,applicationId:A.applicationId})):null}(s,u),P(O.default,{allowPopups:A.applicationId===T.YOUTUBE_APPLICATION_ID,onLoad:q,url:A.url,className:(0,o.default)(b.default.iframe,(l={},l[b.default.pipModeShort]=Y&&!r,l[b.default.pipModeTall]=Y&&r,l)),shouldRefocus:!Y&&R}),!Y&&P(I.TileOverlay,{participantsOpen:B,showToggleParticipants:z,channelId:t.id}))}))}R.displayName="PersistentIFrame"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(273)),l=n(3),u=h(n(469)),s=h(n(1166)),d=h(n(161)),f=n(314),c=h(n(1376)),p=n(691),v=n(1),y=h(n(7937)),m=h(n(1170)),_=h(n(7618));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=23,I=17,T=26,C={SCALE_MIN:.7,SCALE_MAX:1,DURATION_IN:300,DURATION_OUT:170,EASING_IN:i.default.Easing.inOut(i.default.Easing.back()),EASING_OUT:i.default.Easing.quad},b=200,M=125,N=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).scaleAnimation=new i.default.Value(0),t.spriteAnimation=new i.default.Value(0),t.spriteOpacity=new i.default.Value(0),t.widthAnimation=new i.default.Value(0),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var a=r.prototype;return a.componentDidMount=function(){this.componentDidAppear()},a.componentDidAppear=function(){var e=this.scaleAnimation,t=this.widthAnimation;e.setValue(1),t.setValue(1)},a.componentWillEnter=function(e){var t=this.scaleAnimation,n=this.widthAnimation;t.setValue(0),n.setValue(0),i.default.parallel([i.default.timing(t,{toValue:1,duration:C.DURATION_IN,easing:C.EASING_IN}),i.default.timing(n,{toValue:1,duration:b})]).start(e)},a.componentWillLeave=function(e){var t=this.scaleAnimation,n=this.spriteAnimation,r=this.spriteOpacity,a=this.widthAnimation;r.setValue(1),n.setValue(0);for(var o=[],l=0;l<O;l++)o.push(i.default.timing(n,{toValue:-T*l,duration:I}));i.default.sequence([i.default.timing(t,{toValue:0,duration:C.DURATION_OUT,easing:C.EASING_OUT}),i.default.sequence(o),i.default.timing(a,{toValue:0,duration:M})]).start(e)},a.getScaleStyle=function(){var e=this.scaleAnimation;return i.default.accelerate({transform:[{scale:e.interpolate({inputRange:[0,1],outputRange:[C.SCALE_MIN,C.SCALE_MAX]})}],opacity:e})},a.getSpriteStyle=function(){return{backgroundPosition:this.spriteAnimation,opacity:this.spriteOpacity}},a.getWidthStyle=function(){return{width:this.widthAnimation.interpolate({inputRange:[0,1],outputRange:["0px",this.props.width+"px"]})}},a.render=function(){var e,t=this.props,n=t.theme,r=t.children,a=t.className,l=n===v.ThemeTypes.DARK,u=(0,o.default)(y.default.sprite,((e={})[_.default.crossWhite]=l,e[_.default.crossGrey]=!l,e));return g(i.default.div,{className:(0,o.default)(y.default.transition,a),style:this.getWidthStyle()},void 0,g("div",{className:(0,o.default)(y.default.spriteWrapper,m.default.horizontal,m.default.justifyCenter,m.default.alignCenter)},void 0,g(i.default.div,{className:u,style:this.getSpriteStyle()})),g(i.default.div,{style:this.getScaleStyle()},void 0,r))},r}(a.PureComponent);function A(e){var t=e.participants,n=e.onContextMenu,r=e.className,a=e.onClick,i=e.width,v=e.guildId,m=(0,s.default)(),_=function(e,t){return((0,f.getAvatarSize)(f.Sizes.SIZE_80)+16)*t>e?f.Sizes.SIZE_40:f.Sizes.SIZE_80}(i,t.length),h=(0,l.useStateFromStores)([d.default],(function(){return d.default.isFocused()})),E=t.map((function(e){var t,r;if(e.type!==p.ParticipantTypes.USER)return null;var o=e.user,i=e.voiceState,l=e.speaking,u=e.ringing;return g(N,{className:y.default.participant,width:(0,f.getAvatarSize)(_),theme:m},o.id,g(c.default,{src:o.getAvatarURL(v,l&&h),size:_,muted:null!==(t=null==i?void 0:i.isVoiceMuted())&&void 0!==t&&t,deafen:null!==(r=null==i?void 0:i.isVoiceDeafened())&&void 0!==r&&r,speaking:l,ringing:u,onClick:function(t){return null==a?void 0:a(e,t)},onContextMenu:function(t){return null==n?void 0:n(e,t)}},e.id))}));return g(u.default,{component:"div",className:(0,o.default)(y.default.root,r)},void 0,E)}N.displayName="AvatarTransition",A.displayName="VoiceCallParticipants"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.type===r.ParticipantTypes.ACTIVITY){var n,l=a.default.getGame(t.id);return null!==(n=null==l?void 0:l.name)&&void 0!==n?n:i.default.Messages.EMBEDDED_ACTIVITIES_IN_ACTIVITY}return o.default.getName(e.getGuildId(),e.id,t.user)};var r=n(691),a=l(n(71)),o=l(n(258)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=L;var r,a=N(n(0)),o=b(n(9)),i=b(n(8)),l=n(3),u=b(n(478)),s=n(156),d=b(n(294)),f=b(n(10933)),c=b(n(10934)),p=b(n(10306)),v=b(n(8478)),y=b(n(11)),m=b(n(12)),_=b(n(80)),h=b(n(29)),E=N(n(149)),g=b(n(279)),S=b(n(24)),O=n(409),I=n(48),T=b(n(6)),C=b(n(7940));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e){var t,n,r,d,f,p=e.participants,v=e.application,O=e.channel,b=e.width,M=e.canJoin,N=b<=400,R=function(e){return e>400?[g.default.Sizes.SIZE_80,80]:e>300?[g.default.Sizes.SIZE_32,32]:e>200?[g.default.Sizes.SIZE_24,24]:[g.default.Sizes.SIZE_16,16]}(b),L=(0,l.useStateFromStores)([m.default,y.default],(function(){return Array.from(p).map((function(e){return y.default.getId()===e?null:m.default.getUser(e)})).filter(I.isNotNullish)})),D=L.length-3,w=(0,i.default)(L).take(3).map((function(e,t){var n,r,a=null==e?void 0:e.toString();return P(E.TooltipContainer,{text:a,color:E.TooltipColors.GREY,className:(0,o.default)(C.default.avatar,(n={},n[C.default.compact]=N,n))},e.id,P(g.default,{className:(0,o.default)((r={},r[C.default.avatarMask]=t!==L.length-1,r)),src:e.getAvatarURL(O.guild_id),"aria-label":a,size:R[0]}))})).value();return P("div",{className:C.default.splash},void 0,P("div",{className:(0,o.default)(C.default.avatars,(t={},t[C.default.compact]=N,t))},void 0,w,D>0?P("div",{style:{width:R[1],height:R[1]},className:(0,o.default)(C.default.overflow,C.default.avatar,(n={},n[C.default.compact]=N,n))},void 0,P(S.default,{color:S.default.Colors.CUSTOM,size:N?S.default.Sizes.SIZE_10:S.default.Sizes.SIZE_16},void 0,"+"+D)):null),P(S.default,{size:N?S.default.Sizes.SIZE_10:S.default.Sizes.SIZE_16,className:C.default.subheader},void 0,L.length>1?T.default.Messages.EMBEDDED_ACTIVITIES_ARE_PLAYING.format({username:null===(r=L[0])||void 0===r?void 0:r.username,count:L.length-1}):T.default.Messages.EMBEDDED_ACTIVITIES_IS_PLAYING.format({username:null===(d=L[0])||void 0===d?void 0:d.username})),P(S.default,{size:N?S.default.Sizes.SIZE_16:S.default.Sizes.SIZE_24,className:(0,o.default)(C.default.header,(f={},f[C.default.compact]=N,f))},void 0,v.name),P("div",{className:C.default.buttons},void 0,P(E.default,{text:M?null:T.default.Messages.EMBEDDED_ACTIVITIES_LAUNCHING_ACTIVITY},void 0,(function(e){var t=e.onClick,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick"]);return a.createElement(h.default,A({},n,{size:N?h.default.Sizes.SMALL:h.default.Sizes.MEDIUM,className:C.default.button,disabled:!M,onClick:function(e){e.stopPropagation(),null==t||t();var n=(0,c.default)(Object.keys(_.default.getVoiceStatesForChannel(O.id)),v.id);null!=n&&u.default.join(n.userId,n.sessionId,v.id,O.id,null,s.ActivityIntent.PLAY,!0)}}),T.default.Messages.EMBEDDED_ACTIVITIES_JOIN_ACTIVITY)})),v.id===s.POKER_NIGHT_APPLICATION_ID?P(h.default,{className:C.default.button,size:N?h.default.Sizes.SMALL:h.default.Sizes.MEDIUM,look:h.default.Looks.OUTLINED,color:h.default.Colors.WHITE,disabled:!M,onClick:function(e){e.stopPropagation();var t=(0,c.default)(Object.keys(_.default.getVoiceStatesForChannel(O.id)),v.id);null!=t&&u.default.join(t.userId,t.sessionId,v.id,O.id,null,s.ActivityIntent.SPECTATE,!0)}},void 0,T.default.Messages.SPECTATE):null))}function L(e){var t,n=e.participant,r=e.width,o=e.selected,i=e.interactible,u=e.channel,s=(0,l.useStateFromStores)([d.default],(function(){return d.default.getSelfEmbeddedActivityForChannel(u.id)})),c=(0,v.default)([n.id])[0],y=a.useState(null),m=y[0],_=y[1],h=(null==s?void 0:s.applicationId)===n.id,E=!o&&h,g=!h,S=!h&&!o;return a.useEffect((function(){(0,O.getAssetIds)(n.id,["embedded_background"]).then((function(e){var t=e[0];return _(t)}))}),[n.id]),P("div",{className:C.default.container},void 0,E&&P(f.default,{className:C.default.iframe,embedId:(0,p.default)(u.id,n.id)}),g&&null!=c&&null!=m&&P("img",{className:C.default.splashImage,alt:c.name,src:null!==(t=(0,O.getAssetImage)(c.id,m,1024))&&void 0!==t?t:""}),S&&null!=c&&P(R,{width:r,channel:u,participants:n.participants,application:c,canJoin:n.canJoin}),i||g?null:P("div",{className:C.default.clickShield}))}R.displayName="Splash",L.displayName="ActivityTile"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=d(n(2)),i=n(8788),l=d(n(5952)),u=n(121),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}var c=function(e,t){return o.default.wait((function(){(0,i.updateRect)(e,t)}))};function p(e){var t,n=e.embedId,o=e.className,i=e.style,d=(0,a.useStateFromStores)([l.default],(function(){return l.default.getWindow(s.PopoutWindowKeys.CHANNEL_CALL_POPOUT)})),f=null!==(t=null==d?void 0:d.window)&&void 0!==t?t:window,p=r.useRef(null),v=r.useMemo((function(){var e=null;return function(){null==e&&(e=f.requestAnimationFrame((function(){var t,r;c(n,null!==(t=null===(r=p.current)||void 0===r?void 0:r.getBoundingClientRect())&&void 0!==t?t:null),e=null})))}}),[n,f]);return r.useEffect((function(){return f.addEventListener("resize",v),u.ComponentDispatch.subscribe(s.ComponentActions.REMEASURE_TARGET,v),function(){f.removeEventListener("resize",v),u.ComponentDispatch.unsubscribe(s.ComponentActions.REMEASURE_TARGET,v)}}),[v,f]),r.useLayoutEffect((function(){var e=p.current;if(null!=e){v();var t=new ResizeObserver(v);return t.observe(e),function(){t.disconnect(),c(n,null)}}}),[n,v]),r.createElement("div",{ref:p,style:i,className:o})}p.displayName="EmbedTarget"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.map((function(e){if(e===r.default.getId())return null;var n=a.default.getApplicationActivity(e,t);return null!=(null==n?void 0:n.session_id)&&(0,o.hasFlag)(n,i.ActivityFlags.JOIN)?{userId:e,sessionId:n.session_id}:null})).find((function(e){return null!=e}))};var r=l(n(11)),a=l(n(256)),o=n(1214),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTileIndicators=function(e){var t=e.participant,n=e.selected,r=e.focused,o=e.idle,l=e.width,u=(0,i.useStateFromStores)([p.default],(function(){return p.default.getActiveStreamForUser(t.user.id)})),s=(0,b.isVideoCompact)(l);return a.createElement(a.Fragment,null,n?null:D(C.default,{streamerId:null==u?void 0:u.ownerId}),r||null==u||u.state===M.ApplicationStreamStates.ENDED||u.state===M.ApplicationStreamStates.FAILED?null:D(f.default,{size:g.default.Sizes.LARGE,className:A.default.liveIndicator,participant:t,showQuality:!s&&!o,isUpsellEnabled:!1}))},t.default=function(e){var t=e.participant,n=e.selected,r=e.onVideoResize,f=e.paused,g=e.fit,C=e.inPopout,b=e.width,P=y.default.getVideoComponent(),R=(0,i.useStateFromStores)([v.default],(function(){return v.default.getId()})),w=t.stream,j=t.user,k=t.streamId,U=(0,i.useStateFromStores)([p.default],(function(){return p.default.getActiveStreamForUser(t.user.id)})),G=(0,i.useStateFromStores)([p.default],(function(){return p.default.getAllActiveStreams().length>0})),F=(0,i.useStateFromStores)([m.default],(function(){return m.default.isFocused()})),B=(null==U?void 0:U.ownerId)===R&&!F&&!C,H=null!=U?(0,d.default)(U,j,j.id===R,B):null;return(null==U?void 0:U.state)===M.ApplicationStreamStates.ENDED?D(I.default,{selected:n,stream:U,width:b}):(null==U?void 0:U.state)===M.ApplicationStreamStates.FAILED?D(T.default,{selected:n,stream:U,width:b}):null!=U&&!n&&null!=P&&y.default.supports(l.Features.VIDEO)?a.createElement(a.Fragment,null,D(_.default,{onResize:r,wrapperClassName:A.default.videoWrapper,className:A.default.content,streamId:k,videoComponent:P,fit:g,paused:f||B}),null!=H?a.createElement(c.default,L({size:(0,O.getSizeForWidth)(b)},H)):null):D("div",{className:(0,o.default)(A.default.content,A.default.streamPreview)},void 0,D(s.default,{noText:!0,className:(0,o.default)(A.default.absoluteFill,(x={},x[A.default.streamPreviewOpacity]=null==U,x)),stream:t.stream}),n?null:a.createElement(a.Fragment,null,D(S.CallTileCTA,{},void 0,D(E.default,{size:E.default.Sizes.SIZE_16,color:E.default.Colors.CUSTOM},void 0,N.default.Messages.WATCH_STREAM)),G?D(S.CallTileCTA,{className:A.default.addCTA,tooltip:N.default.Messages.STREAM_WATCH_MULTIPLE_TOOLTIP,onClick:function(e){e.stopPropagation(),(0,u.watchStream)(w,{forceMultiple:!0})}},void 0,D(h.default,{className:A.default.addStreamIcon})):null));var x};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=P(n(9)),i=n(3),l=n(34),u=n(364),s=P(n(8935)),d=P(n(10347)),f=P(n(9656)),c=P(n(9658)),p=P(n(163)),v=P(n(11)),y=P(n(51)),m=P(n(161)),_=P(n(9139)),h=P(n(9110)),E=P(n(24)),g=P(n(8414)),S=n(10938),O=n(8753),I=P(n(10349)),T=P(n(10350)),C=P(n(10352)),b=n(10353),M=n(1),N=P(n(6)),A=P(n(7402));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.useStreamQualityIndicatorExperiment=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}var o=(0,n(50).createExperiment)({kind:"user",id:"2021-03_stream_quality_indicator",label:"Stream Quality Indicator",defaultConfig:{showIndicator:!1},treatments:[{id:1,label:"Shows a quality indicator on go live streams",config:{showIndicator:!0}}]});t.useStreamQualityIndicatorExperiment=function(e){return r.useEffect((function(){e&&o.trackExposure({})}),[e]),o.useExperiment({})};var i=o;t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(n)return c(l.default.Messages.STREAM_SOUNDSHARE_FAILED,d.SOUNDSHARE_FAILED);if(null!=t){var r=f(t,5),a=f(t,30);if(a.numDatapoints>=5)return p(r)||p(a)}if(e===i.RTCConnectionQuality.BAD)return c(l.default.Messages.STREAM_NETWORK_QUALITY_ERROR,d.BAD_CONNECTION);return null};var r=n(393),a=n(48),o=u(n(16)),i=n(1),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}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}).apply(this,arguments)}var d;function f(e,t){var n={fractionLost:0,frameRate:0,resolution:0,numDatapoints:0},r=null!=t?t:e.length,o=e.slice(-1*r).filter(a.isNotNullish);if(0===o.length)return s({type:"streamer"},n);o.forEach((function(e){n.fractionLost+=e.fractionLost,n.frameRate+=e.frameRate,n.resolution+=e.resolution}));var i=o[0].type,l=o.length;return{type:i,fractionLost:n.fractionLost/l,frameRate:n.frameRate/l,resolution:n.resolution/l,numDatapoints:l}}!function(e){e.PACKET_LOSS="Packet Loss",e.FRAME_RATE_INPUT="Frame Rate Input",e.FRAME_RATE_NETWORK="Frame Rate Network",e.SOUNDSHARE_FAILED="Soundshare Failed",e.BAD_CONNECTION="Bad Connection"}(d||(d={}));var c=(0,r.cachedFunction)((function(e,t){return{message:e,errorType:t}}));function p(e){if("streamer"===e.type){if(e.fractionLost>10)return c(l.default.Messages.STREAM_BAD_STREAMER,d.PACKET_LOSS);if(e.frameRate<=15)return c(l.default.Messages.STREAM_BAD_STREAMER,d.FRAME_RATE_INPUT)}else{if(e.fractionLost>10)return c(l.default.Messages.STREAM_BAD_SPECTATOR,d.PACKET_LOSS);if(e.frameRate<=15&&!o.default.isWeb())return c(l.default.Messages.STREAM_BAD_SPECTATOR,d.FRAME_RATE_NETWORK)}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallTileCTA=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(29)),l=s(n(149)),u=s(n(7944));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}function p(e){var t=e.children,n=e.onClick,r=e.className,s=e.tooltip;return f(l.default,{text:s},void 0,(function(e){var l=e.onClick,s=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick"]);return a.createElement(i.default,c({},s,{onClick:function(e){null==n||n(e),null==l||l()},innerClassName:u.default.buttonReset,color:(0,o.default)(u.default.cta,r),size:i.default.Sizes.MIN}),t)}))}p.displayName="CallTileCTA"},function(e,t,n){e.exports=n.p+"4b9c3419c57d838c4076abc9d34dbea7.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;f(n(0));var r,a=s(n(9)),o=f(n(149)),i=s(n(5827)),l=s(n(8400)),u=s(n(7945));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.errorMessage,n=e.className;return c(o.TooltipContainer,{className:(0,a.default)(n,u.default.root),text:t,position:o.default.Positions.BOTTOM,color:o.TooltipColors.GREY},void 0,c(l.default,{},void 0,c(i.default,{"aria-label":null!=t?t:"",className:u.default.warningIcon})))}p.displayName="QualityWarning"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.participant,n=e.channel,r=e.inCall,E=e.width,g=e.paused,T=e.selected,C=e.fit,b=e.onVideoResize,M=e.blocked,N=e.pulseSpeakingIndicator,A=void 0!==N&&N,P=f.default.getVideoComponent(),R=a.useState(!1),L=R[0],D=R[1],w=(0,i.useStateFromStores)([d.default],(function(){return d.default.getId()})),j=t.user,k=t.streamId,U=t.speaking,G=j.id===w,F=(0,m.default)(t),B=(0,i.useStateFromStores)([c.default],(function(){return c.default.isFocused()})),H=(0,i.useStateFromStores)([s.default],(function(){return s.default.getWindowFocused(_.PopoutWindowKeys.CHANNEL_CALL_POPOUT)})),x=(0,i.useStateFromStores)([f.default],(function(){return null!=j.id&&f.default.isLocalVideoDisabled(j.id,(0,u.default)(t.type))}),[j.id,t.type]),V=y.default.getName(n.getGuildId(),n.id,j),W=E<=150;if(r&&!x&&F&&!T&&null!=P&&f.default.supports(l.Features.VIDEO))return S(v.default,{onResize:b,wrapperClassName:h.default.videoWrapper,className:h.default.content,mirror:G,streamId:k,videoComponent:P,fit:C,paused:g});var Y,z=L||U&&(H||B);return S("div",{onMouseEnter:function(){return D(!0)},onMouseLeave:function(){return D(!1)},onMouseMove:function(){return D(!0)},className:(0,o.default)(h.default.content,(Y={},Y[h.default.blockedAvatar]=M,Y))},void 0,S(p.default,{"aria-label":V,src:j.getAvatarURL(n.guild_id,z),backgroundSrc:j.getAvatarURL(n.guild_id),size:W?I:O,pulseSpeakingIndicator:A,speaking:U}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(9)),i=n(3),l=n(34),u=E(n(9138)),s=E(n(5952)),d=E(n(11)),f=E(n(51)),c=E(n(161)),p=E(n(10354)),v=E(n(9139)),y=E(n(258)),m=E(n(9137)),_=n(1),h=E(n(7402));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=p.default.AvatarSizes.SIZE_80,I=p.default.AvatarSizes.SIZE_40},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=(r=n(7946))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var u=function(e){var t=e.children;return e.shouldAnimate?l("div",{className:o.default.outerContainer},void 0,l("div",{className:o.default.innerContainer},void 0,t)):t};u.displayName="SpeakerPulse";var s=u;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r,i,l,u=null,s=null,d=null,f=!1,c=!1;switch(e.type){case a.ParticipantTypes.ACTIVITY:break;case a.ParticipantTypes.USER:u=e.streamId,d=e.voiceState,f=e.speaking,c=e.ringing;break;case a.ParticipantTypes.STREAM:u=e.streamId,s=e.stream}return{streamId:u,stream:s,speaking:f,ringing:c,muted:null!==(n=null===(r=d)||void 0===r?void 0:r.isVoiceMuted())&&void 0!==n&&n,deafen:null!==(i=null===(l=d)||void 0===l?void 0:l.isVoiceDeafened())&&void 0!==i&&i,mirror:e.type===a.ParticipantTypes.USER&&e.user.id===t,hasVideo:(0,o.default)(e)}};var r,a=n(691),o=(r=n(9137))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=c(n(0)),o=d(n(28)),i=n(10355),l=c(n(8934)),u=n(1),s=d(n(7949));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.width,n=e.onContextMenuParticipant,r=e.height,d=e.channel,f=e.participants,c=function(){var e=a.useState((function(){return o.default.get("CameraPreviewPosition",u.PictureInPicturePositions.BOTTOM_RIGHT)})),t=e[0],n=e[1];return[t,a.useCallback((function(e){o.default.set("CameraPreviewPosition",e),n(e)}),[])]}(),v=c[0],y=c[1],m=a.useRef(null),_=null==d.getGuildId()?70:50;return a.useLayoutEffect((function(){var e;null===(e=m.current)||void 0===e||e.ensureIsInPosition()}),[f.length]),p("div",{className:s.default.container},void 0,a.createElement(i.PictureInPictureWindow,{position:v,id:0,ref:m,onMove:function(e,t){return y(t)},maxX:t,maxY:r,edgeOffsetTop:_,edgeOffsetBottom:70,edgeOffsetLeft:16,edgeOffsetRight:16},p("div",{className:s.default.tileContainer},void 0,f.map((function(e){return p(l.default,{participant:e,channel:d,onContextMenu:n,className:s.default.tile,fit:l.CallTileFit.COVER,inCall:!0,inPopout:!1,width:160})})))))}v.displayName="CameraPreview"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(67),i=(r=n(273))&&r.__esModule?r:{default:r},l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=Math.pow(3,2),c=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this)._height=0,n._width=0,n._dragStart={x:0,y:0},n._offsetX=0,n._offsetY=0,n._removeListeners=function(){},n.handleSetRef=function(e){n._ref=e},n.handleMouseDown=function(e){var t=n.props,r=t.dragAnywhere,a=t.disabled,o=t.selector;if(!a){var i=n.state.position,u=e.target;if(e.button===l.MouseButtons.PRIMARY&&(r||null!=o&&u.matches(o))){n.grabDimensions(),n._dragStart={x:e.clientX,y:e.clientY},n._offsetX=e.clientX-i.x._value,n._offsetY=e.clientY-i.y._value;var s=e.nativeEvent.view;n._removeListeners(),s.addEventListener("mousemove",n.handleMouseMove),s.addEventListener("mouseup",n.handleMouseUp),n._removeListeners=function(){s.removeEventListener("mousemove",n.handleMouseMove),s.removeEventListener("mouseup",n.handleMouseUp)}}}},n.handleMouseMove=function(e){e.preventDefault();var t=n.props,r=t.onDragStart,a=t.onDrag;if(!t.disabled){var o,i,l,u,s,d,c=n.state,p=c.dragging,v=c.dragging;!p&&(o=n._dragStart,i={x:e.clientX,y:e.clientY},l=o.x,u=o.y,s=i.x,d=i.y,Math.pow(l-s,2)+Math.pow(u-d,2)>f)&&(p=!0),p&&(n.animateToPosition(e.clientX-n._offsetX,e.clientY-n._offsetY,{tension:80,friction:8},null,!1),n.setState({dragging:p},(function(){v||r&&r(e.clientX,e.clientY),a&&a(e.clientX,e.clientY)})))}},n.handleMouseUp=function(e){n._removeListeners(),n.state.dragging&&n.setState({dragging:!1},(function(){var t=n.props.onDragEnd;t&&t(e.clientX,e.clientY)}))};var r=new i.default.Value(t.initialX),a=new i.default.Value(t.initialY);return n.state={dragging:!1,position:new i.default.ValueXY({x:r,y:a})},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var u=r.prototype;return u.componentDidMount=function(){var e=this.props,t=e.initialX,n=e.initialY;this.setPosition(t,n)},u.componentWillUnmount=function(){this._removeListeners()},u.animateToPosition=function(e,t,n,r,a){void 0===n&&(n={}),void 0===a&&(a=!0),a&&this.grabDimensions();var o=this.translate(e,t);i.default.spring(this.state.position,s({toValue:{x:o.x,y:o.y}},n)).start(r)},u.setPosition=function(e,t,n){void 0===n&&(n=!0),n&&this.grabDimensions();var r=this.translate(e,t);this.state.position.setValue({x:r.x,y:r.y})},u.grabDimensions=function(){var e=(0,o.findDOMNode)(this._ref);null!=e&&e instanceof Element&&(this._height=e.clientHeight,this._width=e.clientWidth)},u.translate=function(e,t){var n=this.props,r=n.maxX,a=n.maxY;return e<0?e=0:e>r-this._width&&(e=r-this._width),t<0?t=0:t>a-this._height&&(t=a-this._height),{x:e,y:t}},u.render=function(){var e=this.state,t=e.dragging,n=e.position,r=this.props,o=r.className,l=r.children,u=[0,1],d=["0px","1px"],f=i.default.accelerate(s({pointerEvents:t?"none":"auto",transform:[{translateX:n.x.interpolate({inputRange:u,outputRange:d})},{translateY:n.y.interpolate({inputRange:u,outputRange:d})}]},this.props.style));return a.createElement(i.default.div,{ref:this.handleSetRef,className:o,onMouseDown:this.handleMouseDown,style:f},l)},r}(a.PureComponent);c.displayName="Draggable",c.defaultProps={maxX:0,maxY:0,initialX:0,initialY:0,disabled:!1,dragAnywhere:!1};var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=v(n(15)),l=v(n(40)),u=v(n(10947)),s=n(8286),d=v(n(8934)),f=v(n(10948)),c=n(1),p=v(n(7952));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.participants,n=e.onClick,r=e.onDoubleClick,v=e.onContextMenu,y=e.channel,_=e.className,h=e.inCall,E=e.inPopout,g=e.layout,S=e.totalNumberOfParticipants,O=e.paused,I=void 0!==O&&O,T=a.useRef({triggerResize:function(){return null}});a.useEffect((function(){var e;null===(e=T.current)||void 0===e||e.triggerResize()}),[g]);var C=(0,o.useStateFromStores)([i.default],(function(){return i.default.getGuild(y.guild_id)}),[y.guild_id]),b=(0,o.useStateFromStores)([l.default],(function(){return y.isPrivate()||(0,s.canViewInviteModal)(l.default,C,y)}),[C,y]),M=(null==C?void 0:C.afkChannelId)===y.id,N=y.userLimit<=0||y.userLimit>1,A=t.map((function(e){return function(t){return m(d.default,{participant:e,channel:y,className:p.default.tile,paused:I,onClick:n,onDoubleClick:r,onContextMenu:v,inCall:h,width:t,inPopout:E},e.id)}}));1===S&&null!=C&&b&&!M&&N&&A.push((function(e){return m(f.default,{width:e,channel:y,guild:C,inPopout:E})}));var P=a.useCallback((function(e){var n,r;return null!==(n=null===(r=t[e])||void 0===r?void 0:r.id)&&void 0!==n?n:"empty-tile"}),[t]),R=g===c.ChannelLayouts.MINIMUM||g===c.ChannelLayouts.NORMAL?96:64;return a.createElement(u.default,{ref:T,className:_,keyExtractor:P,paddingTop:64,paddingBottom:R},A)}_.displayName="ChannelCallGrid"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(8299)),l=d(n(8524)),u=d(n(8362)),s=d(n(7950));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return Math.ceil(t/e)}function y(e,t){return Math.floor((t-e)/(8+e))+1}function m(e,t,n,r){var a=y(e,n),o=v(a,t);return o*a>=t&&e/(16/9)*o+(8*o-1)<r}function _(e,t,n,r,a,o){if(void 0===o&&(o=0),Math.abs(t-e)<=1||o>=15)return e;var i=(t+e)/2;return m(i,n,r,a)?_(i,t,n,r,a,o++):_(e,i,n,r,a,o++)}function h(e,t,n){var r=function(e,t,n){for(var r=Math.min(25,e),a=t/10,o=25;o>0;o--){var i=t/o+8;if(!m(i,r,t,n)){o=y(a=_(a,i,r,t,n),t);break}a=i}var l=v(o,e);return{tileWidth:a,columns:Math.max(1,o),rows:l}}(e,t,n),a=r.rows,o=r.columns,i=r.tileWidth;return{tileStyle:{width:i},tileWidth:i,rows:a,columns:o}}var E=(0,i.default)((function(e){var t,n=e.width,r=e.height,i=e.className,d=e.children,f=e.keyExtractor,c=e.paddingTop,v=void 0===c?0:c,y=e.paddingBottom,m=void 0===y?0:y,_=null!==(t=null==d?void 0:d.length)&&void 0!==t?t:0,E=n-16,g=r-(v+m),S=a.useMemo((function(){return h(_,E,g)}),[_,E,g]),O=S.tileStyle,I=S.tileWidth,T=S.rows,C=S.columns,b=C+1,M=b*I+8*(b-1)<=n,N=Math.floor(I/(16/9))+8,A=Math.max(0,g-N*T)/2;return p(u.default,{fade:!0,className:i,listPadding:[v+A,0,m+A,8],renderRow:function(e){var t,n=e*C;return p("div",{className:s.default.row},e,null==d||null===(t=d.slice(n,n+C))||void 0===t?void 0:t.map((function(e,t){var r,a,i=n+t;return p("div",{style:O,className:(0,o.default)(s.default.tile,(a={},a[s.default.padColumn]=M,a[s.default.noVerticalMargin]=i>=(T-1)*C,a[s.default.noHorizontalMargin]=(i+1)%C==0||i===_-1,a))},null!==(r=null==f?void 0:f(i))&&void 0!==r?r:i,p(l.default,{className:s.default.tileSizer,aspectRatio:16/9},void 0,e(I)))})))},rowCount:T,rowCountBySection:[T],rowHeight:N})})),g=a.forwardRef((function(e,t){return a.createElement(E,c({ref:t},e))}));t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=m(n(0)),o=v(n(8283)),i=n(41),l=n(217),u=v(n(9655)),s=m(n(8753)),d=n(1),f=v(n(6)),c=v(n(7951)),p=v(n(10949));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e){var t=e.channel,n=e.guild,r=e.width,v=e.inPopout;return _(u.default,{className:c.default.root},void 0,_(s.default,{artURL:p.default,size:(0,s.getSizeForWidth)(r),header:f.default.Messages.STREAM_SINGLE_PERSON_BODY,onCTAClick:function(){return(0,i.openModal)((function(e){return a.createElement(o.default,h({},e,{guild:n,channel:t,source:d.InstantInviteSources.CHANNEL_CALL}))}),{},v?l.POPOUT_MODAL_CONTEXT:l.DEFAULT_MODAL_CONTEXT)},callToAction:f.default.Messages.INSTANT_INVITE}))}E.displayName="EmptyTile"},function(e,t,n){e.exports=n.p+"b4072228ba43fe5f9c82cadc3d13c47b.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;s(n(0));var r,a=l(n(705)),o=s(n(8753)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=n(10951);function c(e){var t=e.width,n=e.className,r=e.channelId,l=e.noArt,u=void 0!==l&&l;return d(o.default,{artURL:f,noArt:u,size:(0,o.getSizeForWidth)(t),className:n,callToAction:i.default.Messages.STREAM_SHOW_ALL_PARTICIPANTS,header:i.default.Messages.STREAM_PARTICIPANTS_HIDDEN.format(),onCTAClick:function(){return a.default.toggleVoiceParticipantsHidden(r,!1)}})}c.displayName="ParticipantsHidden"},function(e,t,n){e.exports=n.p+"ae0b6029f0cc68a3149860fd30c2fb82.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=f(n(0)),o=s(n(8524)),i=s(n(1210)),l=f(n(8934)),u=s(n(7953));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return null}function v(e){var t=e.participants,n=e.selectedParticipantId,r=e.onDoubleClick,s=e.onContextMenu,d=e.onClick,f=e.channel,v=e.inCall,y=e.popoutWindow,m=e.paused,_=void 0!==m&&m,h=null!=y,E=a.useMemo((function(){return[t.length]}),[t.length]);return c("div",{className:u.default.root},void 0,c(i.default,{paddingTop:8,className:u.default.list,renderSection:p,sectionHeight:0,rowHeight:131.75,renderRow:function(e){var a=e.row,i=t[a];return null==i?null:c(o.default,{className:u.default.tileSizer,aspectRatio:16/9},i.id,c(l.default,{participant:i,selected:n===i.id,channel:f,className:u.default.tile,fit:l.CallTileFit.COVER,onClick:d,onDoubleClick:r,onContextMenu:s,width:220,inCall:v,paused:_,inPopout:h}))},sections:E}))}v.displayName="VideoParticipants"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.url,n=e.className,r=e.style,p=e.onLoad,v=e.shouldRefocus,m=e.allowPopups,h=void 0!==m&&m,E=(0,i.useStateFromStores)([l.default],(function(){return l.default.getWindow(c.PopoutWindowKeys.CHANNEL_CALL_POPOUT)})),g=a.useRef(o.default.v4()),S=a.useRef(null),O=(0,d.default)(S,v,null==E?window:E),I={frame_id:g.current,platform:f.ActivityPlatform.DESKTOP};return a.useEffect((function(){var e=g.current;return s.ComponentDispatch.dispatch(c.ComponentActions.IFRAME_MOUNT,{id:e}),function(){s.ComponentDispatch.dispatch(c.ComponentActions.IFRAME_UNMOUNT,{id:e})}}),[]),t?y("iframe",{style:r,allow:"autoplay",referrerPolicy:"no-referrer",onLoad:function(e){var n;null==p||p(e.target),S.current=e.target,O(!0),null===(n=e.target.contentWindow)||void 0===n||n.postMessage([u.OPCODES.HELLO,I],null!=t?t:"")},sandbox:_(h),className:n,src:t+"?"+new URLSearchParams(I)}):null};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(98)),i=n(3),l=p(n(5952)),u=n(10356),s=n(121),d=p(n(10955)),f=n(156),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=["allow-scripts","allow-same-origin"];function _(e){var t=m;return e&&(t=[].concat(m,["allow-popups","allow-popups-to-escape-sandbox"])),t.join(" ")}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){void 0===n&&(n=window);var a=(0,o.useStateFromStores)([l.default],(function(){return l.default.keyboardModeEnabled})),d=(0,i.default)(),f=r.useState(!1),p=f[0],v=f[1];return r.useEffect((function(){if(t)return n.addEventListener("blur",e),function(){return n.removeEventListener("blur",e)};function e(){d&&(u.ComponentDispatch.dispatch(s.ComponentActions.POPOUT_CLOSE),u.ComponentDispatch.dispatch(s.ComponentActions.CONTEXT_MENU_CLOSE))}}),[n,d,t]),r.useEffect((function(){var n,r;if(!a&&p&&t){var o,i=d;if(null===(n=e.current)||void 0===n||n.addEventListener("focusout",l),"IFRAME"!==(null===(r=document.activeElement)||void 0===r?void 0:r.tagName)&&!i)null===(o=e.current)||void 0===o||o.focus();return function(){var t;null===(t=e.current)||void 0===t||t.removeEventListener("focusout",l),i=!0}}function l(t){var n=t.relatedTarget;setTimeout((function(){null!=n&&"BUTTON"!==n.tagName||i||c(e)}),100)}}),[t,p,a,e,n,d]),v};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(8),o=n(3),i=d(n(10956)),l=d(n(105)),u=n(121),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}var c=(0,a.debounce)((function(e){setTimeout((function(){var t;null===(t=e.current)||void 0===t||t.focus()}),0)}),50)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return l.default.hasModalOpen()})),t=(0,u.useModalsStore)((function(e){return t=e,!Object.entries(t).every((function(e){return e[0],0===e[1].length}));var t})),n=(0,a.useStateFromStores)([o.default],(function(){return o.default.isOpen()})),f=(0,a.useStateFromStores)([i.default],(function(){return i.default.hasLayers()})),c=r.useState(!1),p=c[0],v=c[1];return r.useEffect((function(){function e(){v(!0)}function t(){v(!1)}return s.ComponentDispatch.subscribe(d.ComponentActions.POPOUT_SHOW,e),s.ComponentDispatch.subscribe(d.ComponentActions.POPOUT_HIDE,t),function(){s.ComponentDispatch.unsubscribe(d.ComponentActions.POPOUT_SHOW,e),s.ComponentDispatch.unsubscribe(d.ComponentActions.POPOUT_HIDE,t)}}),[]),e||t||n||p||f};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=f(n(719)),i=f(n(694)),l=f(n(690)),u=n(41),s=n(121),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PIPOverlay=D,t.TileOverlay=function(e){var t=e.channelId,n=e.participantsOpen;return e.showToggleParticipants?R(h.default,{channelId:t,isParticipantsOpen:n,className:b.default.participantsButton}):null},t.InteractivePIPHeader=w;var r,a=P(n(0)),o=N(n(9)),i=n(92),l=n(3),u=N(n(288)),s=N(n(8478)),d=P(n(1293)),f=N(n(6013)),c=N(n(8754)),p=N(n(8400)),v=n(10358),y=N(n(8288)),m=N(n(10359)),_=N(n(9142)),h=N(n(10346)),E=N(n(8937)),g=N(n(51)),S=N(n(55)),O=N(n(8320)),I=N(n(8331)),T=n(1297),C=N(n(6)),b=N(n(7959)),M=N(n(7378));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function L(e){var t,n=e.onClick,r=e.isExpanded;return R(y.default,{iconClassName:(0,o.default)(b.default.arrowIcon,(t={},t[b.default.arrowIconExpanded]=r,t)),onClick:n,iconComponent:O.default,label:r?C.default.Messages.PICTURE_IN_PICTURE_COLLAPSE:C.default.Messages.PICTURE_IN_PICTURE_EXPAND})}function D(e){var t,n,r=e.channel,a=e.applicationId,o=e.onJumpToChannel,y=e.idle,h=(0,l.useStateFromStores)([g.default],(function(){return g.default.isVideoEnabled()})),O=(0,l.useStateFromStores)([g.default],(function(){return Object.values(g.default.getVideoDevices())[0]})),I=!1===(null===(t=null==O?void 0:O.disabled)||void 0===t||t),C=(0,s.default)([a])[0],N=(0,f.default)(r),A=function(e){u.default.setVideoEnabled(e)};return R("div",{className:M.default.videoControls},void 0,R("div",{className:M.default.topControls},void 0,R(v.PictureInPictureHeader,{idle:y,title:null!==(n=null==C?void 0:C.name)&&void 0!==n?n:r.name,onJumpToChannel:o,preventIdleComponent:p.default})),R("div",{className:M.default.bottomControls},void 0,R(S.default,{grow:0,shrink:1,basis:"50%",align:S.default.Align.CENTER},void 0,R(E.default,{className:b.default.leftPipIcon,enabled:h,cameraUnavailable:!I,hasPermission:N,onChange:A,onCameraUnavailable:function(){I?A(!0):(0,c.default)()}})),R(S.default,{grow:0,shrink:1,justify:S.default.Justify.END,basis:"50%",align:S.default.Align.CENTER},void 0,R(_.default,{className:b.default.rightPipIcon,popoutOpen:!1,onOpenPopout:function(){d.openChannelCallPopout(r)},onClosePopout:i.NOOP_NULL}),R(m.default,{className:b.default.rightPipIcon,onClick:function(){return(0,T.stopEmbeddedActivity)(r.id,a)}}))))}function w(e){var t,n,r=e.onMouseMove,i=e.onMouseEnter,l=e.showControls,u=e.applicationId,d=e.channel,f=e.onJumpToChannel,c=e.onToggleHeight,y=e.isExpanded,_=(0,s.default)([u])[0];return R("div",{className:b.default.pipHeader,onMouseMove:r,onMouseEnter:i},void 0,R("div",{className:(0,o.default)(M.default.topControls,b.default.pipHeaderContent,(t={},t[b.default.pipHeaderContentOpen]=l,t))},void 0,!l&&R(I.default,{className:b.default.menuIcon,width:12,height:12}),l&&a.createElement(a.Fragment,null,R(v.PictureInPictureHeader,{idle:!l,title:null!==(n=null==_?void 0:_.name)&&void 0!==n?n:d.name,onJumpToChannel:f,preventIdleComponent:p.default}),R("div",{className:b.default.pipHeaderButtonsRight},void 0,R(L,{isExpanded:y,onClick:c}),R(m.default,{iconClassName:b.default.leaveActivityIcon,onClick:function(){return(0,T.stopEmbeddedActivity)(d.id,u)}})))))}L.displayName="TogglePIPHeightButton",D.displayName="PIPOverlay",w.displayName="InteractivePIPHeader"},function(e,t,n){e.exports=n.p+"3b797e7c1a28fc5dc889ecf73b9fbd7e.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BackgroundTransition=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=p(n(9)),l=p(n(273)),u=n(57),s=p(n(469)),d=p(n(55)),f=n(1),c=p(n(7956));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=((r={})[f.ChannelLayouts.NORMAL]=c.default.normal,r[f.ChannelLayouts.MINIMUM]=c.default.minimum,r[f.ChannelLayouts.NO_CHAT]=c.default.noChat,r[f.ChannelLayouts.FULL_SCREEN]=c.default.fullScreen,r),E=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={animation:new l.default.Value(0)},n}m(t,e);var n=t.prototype;return n.componentDidAppear=function(){this.state.animation.setValue(1)},n.componentWillEnter=function(e){var t=this.state.animation;t.setValue(0),l.default.spring(t,{toValue:1,overshootClamping:!0}).start(e)},n.componentWillLeave=function(e){l.default.spring(this.state.animation,{toValue:0,overshootClamping:!0}).start(e)},n.render=function(){return y(l.default.div,{className:c.default.videoBackgroundTransition,style:{opacity:this.state.animation}},void 0,this.props.children)},t}(o.PureComponent);t.BackgroundTransition=E,E.displayName="BackgroundTransition";var g=function(e){function t(t){var n;return(n=e.call(this,t)||this)._timeout=new u.Timeout,n.handleMouseEvent=function(){var e=n.props.layout;e!==f.ChannelLayouts.FULL_SCREEN&&e!==f.ChannelLayouts.NO_CHAT||(n._timeout.start(3e3,(function(){return n.setState({idle:!0})})),n.state.idle&&n.setState({idle:!1}))},n.state={idle:!1,backgroundAnimation:new l.default.Value(0),layoutProp:t.layout},n}m(t,e);var n=t.prototype;return n.componentDidMount=function(){document.addEventListener("mousedown",this.handleMouseEvent,!0),document.addEventListener("mousemove",this.handleMouseEvent,!0)},n.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleMouseEvent,!0),document.removeEventListener("mousemove",this.handleMouseEvent,!0),this._timeout.stop()},t.getDerivedStateFromProps=function(e,t){return e.layout!==t.layoutProp?t.idle?{idle:!1,layoutProp:e.layout}:{layoutProp:e.layout}:null},n.componentDidUpdate=function(e){this.props.layout!==e.layout&&this._timeout.stop()},n.renderBackground=function(){var e=this.props,t=e.background,n=e.backgroundKey,r=e.layout+"-"+(n||"");return y(s.default,{className:c.default.videoBackground,component:"div"},void 0,y(E,{},r,t))},n.renderContents=function(){var e,t,n=this.props,r=n.top,a=n.center,o=n.bottom,l=n.layout,u=n.focused,s=this.state.idle;return y(d.default,{className:(0,i.default)(c.default.video,h[l],(e={},e[c.default.idle]=s,e)),direction:d.default.Direction.VERTICAL,justify:d.default.Justify.CENTER},void 0,y(d.default,{className:c.default.videoWrapper,direction:d.default.Direction.VERTICAL},void 0,this.renderBackground(),y(d.default,{className:(0,i.default)(c.default.videoInner,(t={},t[c.default.focused]=u,t)),direction:d.default.Direction.VERTICAL,justify:d.default.Justify.BETWEEN},void 0,y(d.default,{className:c.default.videoTop,grow:0},void 0,r),y(d.default,{className:c.default.videoCenter},void 0,a),y(d.default,{className:c.default.videoBottom,grow:0},void 0,o))))},n.render=function(){var e,t=this.props,n=t.layout,r=t.className,a=t.animated;return y("div",{className:(0,i.default)(c.default.videoHeight,h[n],r,(e={},e[c.default.animated]=a,e))},void 0,this.renderContents())},t}(o.PureComponent);g.displayName="Video",g.defaultProps={layout:f.ChannelLayouts.MINIMUM,animated:!0};var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=T(n(0)),o=n(3),i=O(n(705)),l=n(8788),u=O(n(294)),s=n(691),d=O(n(688)),f=T(n(8253)),c=O(n(163)),p=O(n(71)),v=O(n(8789)),y=O(n(12)),m=O(n(61)),_=O(n(278)),h=O(n(8663)),E=n(1),g=O(n(6)),S=O(n(7378));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e){var t=e.closePopout,n=e.idle,r=e.pipWindows,a=e.voiceChannelId,y=e.onSelect;n&&t();var m,_,h,S=(0,o.useStateFromStores)([u.default],(function(){return u.default.getSelfEmbeddedActivityForChannel(a)})),O=(0,o.useStateFromStores)([v.default],(function(){return v.default.pipWindow})),I=(0,o.useStateFromStores)([d.default],(function(){return d.default.getSelectedParticipant(a)})),T=(0,o.useStateFromStores)([d.default],(function(){return d.default.getStreamParticipants(a)}));return b(f.default,{navId:"pip-menu","aria-label":"switch PIP",onClose:t,onSelect:y},void 0,(m=r.find((function(e){return e.component===E.PictureInPictureComponents.EMBED_IFRAME})),_=r.find((function(e){return e.component===E.PictureInPictureComponents.VIDEO})),h=[],null!=m&&(null==O?void 0:O.id)!==m.id&&h.push({pipWindow:m}),null!=_&&T.forEach((function(e){var t=c.default.getActiveStreamForApplicationStream(e.stream),n=e.id===(null==I?void 0:I.id)&&(null==O?void 0:O.id)===_.id;null==t||n||h.push({pipWindow:_,participant:e,stream:t})})),h).map((function(e){var t,n=e.pipWindow.id,r=null===(t=e.participant)||void 0===t?void 0:t.id,o=function(e){if(e.pipWindow.component===E.PictureInPictureComponents.EMBED_IFRAME&&null!=S){var t,n=null===(t=p.default.getGame(S.applicationId))||void 0===t?void 0:t.name;return null==n?g.default.Messages.SWITCH_PIP_TO_ACTIVITY:g.default.Messages.SWITCH_PIP_TO_ACTIVITY_NAME.format({activityName:n})}return null==e.participant||e.participant.type!==s.ParticipantTypes.STREAM?g.default.Messages.SWITCH_PIP_TO_GO_LIVE:g.default.Messages.SWITCH_PIP_TO_USER_STREAM.format({username:e.participant.userNick})}(e),u=""+n+(null!=r?r:"");return b(f.MenuItem,{id:u,label:o,action:function(){return function(e){(null==O?void 0:O.id)!==e.pipWindow.id&&(0,l.switchPIPFocus)(e.pipWindow.id);var t=e.participant;null!=t&&t.type!==s.ParticipantTypes.ACTIVITY&&i.default.selectParticipant(a,t.id)}(e)}},u)})))}function N(e){var t=e.voiceChannelId,n=e.idle,r=(0,o.useStateFromStores)([v.default],(function(){return v.default.pipWindows})),i=Array.from(r.values()),l=(0,o.useStateFromStores)([c.default],(function(){return c.default.getAllActiveStreamsForChannel(t)})).filter((function(e){return e.ownerId!==y.default.getCurrentUser().id&&e.channelId===t})),u=1===i.length&&i[0].component===E.PictureInPictureComponents.EMBED_IFRAME||0===l.length,s=1===i.length&&l.length<=1;return u||s?null:b(_.default,{position:_.default.Positions.BOTTOM,renderPopout:function(e){return a.createElement(M,C({voiceChannelId:t,pipWindows:i,idle:n},e))}},void 0,(function(e){return a.createElement(m.default,C({className:S.default.menuIcon},e),b(h.default,{color:E.Colors.WHITE}))}))}M.displayName="PictureInPictureSwitchWindowMenu",N.displayName="PictureInPictureSwitchWindowPopout";var A=N;t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=ne(n(0)),o=ee(n(23)),i=ee(n(8)),l=ee(n(3)),u=ee(n(288)),s=ee(n(1226)),d=n(687),f=ee(n(132)),c=n(106),p=n(691),v=ee(n(688)),y=ee(n(9138)),m=ee(n(10361)),_=n(180),h=n(140),E=n(484),g=ee(n(1273)),S=ee(n(10347)),O=ee(n(5966)),I=ne(n(1293)),T=n(42),C=ee(n(8661)),b=ee(n(8400)),M=ee(n(10358)),N=ee(n(10362)),A=ee(n(9142)),P=ee(n(10363)),R=ee(n(10364)),L=ee(n(9661)),D=ee(n(8937)),w=ee(n(163)),j=ee(n(11)),k=ee(n(15)),U=ee(n(51)),G=ee(n(40)),F=ee(n(70)),B=ee(n(12)),H=ee(n(10962)),x=ee(n(775)),V=ee(n(161)),W=ee(n(10354)),Y=ee(n(13)),z=ee(n(10963)),K=ee(n(10349)),$=ee(n(10350)),Z=ee(n(8754)),q=ee(n(9678)),X=ee(n(8755)),J=n(1),Q=ee(n(7963));function ee(e){return e&&e.__esModule?e:{default:e}}function te(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return te=function(){return e},e}function ne(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=te();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function re(){return(re=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}).apply(this,arguments)}function ae(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var le=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={screensharePopoutOpen:!1},t._ref=a.createRef(),t.handleVideo=function(e){u.default.setVideoEnabled(e)},t.handleEnableVideoWhenUnavailable=function(){t.props.isVideoAvailable?t.handleVideo(!0):(0,Z.default)()},t.handleJumpToChannel=function(){var e=t.props.channel;(0,d.popAllLayers)();var n=e.getGuildId()||J.ME;s.default.channelListScrollTo(n,e.id),(0,T.transitionToGuild)(n,e.id)},t.handleStartStream=function(){var e=t.props,n=e.canGoLive,r=e.channel,a=r.getGuildId();if((0,o.default)(null!=a,"Cannot go live in non guild channel"),!n)return(0,q.default)();(0,X.default)(a,r.id,J.AnalyticsPages.GUILD_CHANNEL)},t.handleStopStream=function(){var e=t.props.participantOnScreen;(0,o.default)((null==e?void 0:e.type)===p.ParticipantTypes.STREAM,"cannot stop stream for non streamer"),(0,O.default)(e.stream)},t.handleOpenPopout=function(){var e=t.props.channel;I.openChannelCallPopout(e)},t.handleDisconnect=function(){f.default.selectVoiceChannel(null)},t.renderBottomLeftControls=function(){var e=t.viewProperties,n=e.canStream,r=e.canUseVideo,o=e.canSeeViewers;return a.createElement(a.Fragment,null,r?t.renderVideoIcon():null,n?t.renderStreamIcon():null,o?t.renderViewersIcon():null)},t.renderBottomRightControls=function(){var e=t.viewProperties,n=e.canSettings,r=e.canPopout,o=e.canDisconnect,i=e.canStopStream;return a.createElement(a.Fragment,null,n?t.renderSettingsIcon():null,r?t.renderPopoutIcon():null,i?t.renderStopStreamButton():null,o?t.renderDisconnectButton():null)},t.renderDisconnectButton=function(){return ae(N.default,{className:Q.default.rightTrayIcon,onClick:t.handleDisconnect})},t.renderStopStreamButton=function(){var e=t.viewProperties.isSelf;return ae(P.default,{isSelfStream:e,className:Q.default.rightTrayIcon,onClick:t.handleStopStream})},t.renderViewersIcon=function(){var e=t.props,n=e.participantOnScreen,r=e.channel;return(0,o.default)((null==n?void 0:n.type)===p.ParticipantTypes.STREAM||(null==n?void 0:n.type)===p.ParticipantTypes.ACTIVITY,"Cannot render participants for participant type "+(null==n?void 0:n.type)),ae(b.default,{},void 0,ae(m.default,{channelId:r.id,guildId:r.getGuildId(),className:Q.default.leftTrayIcon,participant:n,compact:!0}))},t.renderPopoutIcon=function(){return ae(A.default,{className:Q.default.rightTrayIcon,popoutOpen:!1,onOpenPopout:t.handleOpenPopout,onClosePopout:J.NOOP_NULL})},t.renderStreamIcon=function(){var e=t.props,n=e.channel,r=e.hasStreamPermission;if(n.type===J.ChannelTypes.GUILD_VOICE)return ae(R.default,{className:Q.default.leftTrayIcon,hasPermission:r,onClick:t.handleStartStream})},t.renderSettingsIcon=function(){var e=t.props,n=e.participantOnScreen,r=e.activeStreams;(0,o.default)((null==n?void 0:n.type)===p.ParticipantTypes.STREAM,"Cannot render settings for non stream participant");var a=r.find((function(e){return(0,h.encodeStreamKey)(e)===n.id}));return null==a||a.state===J.ApplicationStreamStates.ENDED?null:ae(L.default,{stream:a,className:Q.default.rightTrayIcon,appContext:J.AppContext.APP})},t.renderVideoIcon=function(){var e=t.props,n=e.isVideoAvailable,r=e.hasStreamPermission,a=e.channel,o=e.isVideoEnabled;return ae(D.default,{className:Q.default.leftTrayIcon,enabled:o,cameraUnavailable:!n,hasPermission:r||a.isPrivate(),onChange:t.handleVideo,onCameraUnavailable:t.handleEnableVideoWhenUnavailable})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ie(t,n);var i,l,y,E=r.prototype;return E.getScreenMessage=function(){var e=this.props,t=e.participantOnScreen,n=e.currentUserId;if((null==t?void 0:t.type)!==p.ParticipantTypes.STREAM)return null;var r=this.activeStreamForSelectedParticipant;return r?(0,S.default)(r,t.user,t.user.id===n,this.streamerPaused):null},E.componentDidMount=function(){var e=this.props.channel;Y.default.track(J.AnalyticEvents.VIDEO_LAYOUT_TOGGLED,re({video_layout:"pip"},(0,c.collectVoiceAnalyticsMetadata)(e.id)))},E.componentWillUnmount=function(){var e=this.props.channel;Y.default.track(J.AnalyticEvents.VIDEO_LAYOUT_TOGGLED,re({video_layout:v.default.getLayout(e.id)},(0,c.collectVoiceAnalyticsMetadata)(e.id)))},E.renderStreamState=function(){var e=this.activeStreamForSelectedParticipant;return(null==e?void 0:e.state)===J.ApplicationStreamStates.ENDED?ae(K.default,{stream:e,width:p.PIP_WIDTH}):(null==e?void 0:e.state)===J.ApplicationStreamStates.FAILED?ae($.default,{stream:e,width:p.PIP_WIDTH}):null},E.render=function(){var e=this,t=this.props,n=t.channel,r=t.streamId,o=t.participantOnScreen,i=t.isVideoEnabled,l=(0,_.computeChannelName)(n,B.default,F.default),u=(null==o?void 0:o.id)===j.default.getId()&&i,s=this.renderStreamState(),d=null;return(null==o?void 0:o.type)!==p.ParticipantTypes.ACTIVITY&&(null!=s?d=s:(null==o?void 0:o.type)!==p.ParticipantTypes.USER&&(null==o?void 0:o.type)!==p.ParticipantTypes.STREAM||(d=ae(z.default,{paused:this.streamerPaused,streamId:r,component:U.default.getVideoComponent(),mirror:u},void 0,ae(W.default,{size:W.default.AvatarSizes.SIZE_80,src:null==o?void 0:o.user.getAvatarURL(n.guild_id),"aria-label":null==o?void 0:o.user.username})))),ae(C.default,{timeout:1800},void 0,(function(t){var n;return a.createElement(M.default,re({title:l,backgroundKey:null!==(n=null==o?void 0:o.id)&&void 0!==n?n:"",screenMessage:e.getScreenMessage(),onJumpToChannel:e.handleJumpToChannel,renderBottomLeftControls:e.renderBottomLeftControls,renderBottomRightControls:e.renderBottomRightControls,preventIdleComponent:b.default,width:p.PIP_WIDTH},t),d)}))},i=r,(l=[{key:"viewProperties",get:function(){var e=this.props,t=e.participantOnScreen,n=e.currentUserId,r=e.activeSelfStream,a=(null==t?void 0:t.type)===p.ParticipantTypes.STREAM,o=null!=t&&t.type!==p.ParticipantTypes.ACTIVITY&&t.user.id===n;return{canPopout:a&&!o,canSettings:a&&o,canStopStream:a,canSeeViewers:a,canDisconnect:!a,canStream:!a&&!r,canUseVideo:!0,isSelf:o}}},{key:"streamerPaused",get:function(){var e=this.props,t=e.isMainWindowFocused,n=e.activeSelfStream,r=e.participantOnScreen;return null!=n&&(null==r?void 0:r.id)===(0,h.encodeStreamKey)(n)&&!t}},{key:"activeStreamForSelectedParticipant",get:function(){var e=this.props,t=e.participantOnScreen,n=e.activeStreams;return(null==t?void 0:t.type)!==p.ParticipantTypes.STREAM?null:n.find((function(e){return(0,h.encodeStreamKey)(e)===t.id}))}}])&&oe(i.prototype,l),y&&oe(i,y),r}(a.PureComponent);le.displayName="PictureInPictureVideoContainer";var ue=l.default.connectStores([k.default,G.default,U.default,v.default,j.default,H.default,x.default,w.default,V.default],(function(e){var t=e.channel,n=H.default.getSpeaker(t.id),r=v.default.getParticipant(t.id,n),a=(0,i.default)(U.default.getVideoDevices()).values().first(),o=null==a||a.disabled,l=null!=r&&r.type!==p.ParticipantTypes.ACTIVITY?x.default.getStreamId(r.user.id,(0,y.default)(r.type)):null,u=!1===o,s=!o&&U.default.isVideoEnabled(),d=(0,E.canStreamInChannel)(t,k.default,G.default,!1),f=(0,g.default)(U.default),c=j.default.getId();return{channel:t,streamId:l,participantOnScreen:r,isVideoAvailable:u,isVideoEnabled:s,hasStreamPermission:d,canGoLive:f,currentUserId:c,activeStreams:w.default.getAllActiveStreams(),activeSelfStream:w.default.getActiveStreamForUser(c),isMainWindowFocused:V.default.isFocused()}}))(le);t.default=ue},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=y(n(8)),i=y(n(3)),l=y(n(2)),u=n(691),s=y(n(688)),d=n(140),f=y(n(163)),c=y(n(11)),p=y(n(51)),v=y(n(283));n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t;if(void 0===e&&(e=!0),null==r)t=null;else{var n;t=s.default.getSelectedParticipantId(r);var i,l=f.default.getLastActiveStream(),y=null!=t?s.default.getParticipant(r,t):null;if(((null==y?void 0:y.type)===u.ParticipantTypes.ACTIVITY||(null==y?void 0:y.type)===u.ParticipantTypes.USER&&!(null===(n=y.voiceState)||void 0===n?void 0:n.selfVideo))&&(t=null),null!=l&&null==t)t=null===(i=s.default.getParticipant(r,(0,d.encodeStreamKey)(l)))||void 0===i?void 0:i.id;if(null==t){var m=c.default.getId(),_=Date.now();t=(0,o.default)(s.default.getVideoParticipants(r)).filter((function(e){return e.type===u.ParticipantTypes.USER&&e.user.id!==m&&!p.default.isLocalVideoDisabled(e.user.id)})).sortBy((function(e){return-v.default.getSpeakingDuration(e.user.id,_)})).map((function(e){return e.user.id})).first()}}a!==t&&(a=t,e&&g.emitChange())}var h=o.default.debounce(_,300);function E(){return h(),!1}var g=new(function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var i=o.prototype;return i.initialize=function(){this.waitFor(s.default,c.default,v.default,f.default,p.default),this.syncWith([s.default,f.default],E)},i.getSpeaker=function(e){var t;return r!==e&&(r=e,_(!1)),null!==(t=a)&&void 0!==t?t:c.default.getId()},o}(i.default.Store))(l.default,{AUDIO_SET_LOCAL_VIDEO_DISABLED:function(e){return E()}}),S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(9)),i=l(n(7962));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(){return(d=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}).apply(this,arguments)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={aStreamId:null,aReady:!1,bStreamId:t.props.streamId,bReady:!0},t.handleReady=function(){t.state.aReady?t.setState({bReady:!0,aStreamId:null,aReady:!1}):t.setState({aReady:!0,bStreamId:null,bReady:!1})},t.handleDoubleClick=function(e){var n=t.props,r=n.onDoubleClick,a=n.id;null==r||r(e,a)},t.handleContextMenu=function(e){var n=t.props,r=n.onContextMenu,a=n.id;null==r||r(e,a)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),r.getDerivedStateFromProps=function(e,t){var n=e.streamId;if(t.aReady){if(n!==t.aStreamId)return null==n?{bStreamId:n,bReady:!0,aStreamId:null,aReady:!1}:{bStreamId:n,bReady:!1}}else if(n!==t.bStreamId)return null==n?{aStreamId:n,aReady:!0,bStreamId:null,bReady:!1}:{aStreamId:n,aReady:!1};return null};var l=r.prototype;return l.renderVideo=function(e,t){var n=this.props,r=n.children,o=n.mirror,l=n.paused,u=n.component;if(null==e){if(null==r)return null;var f=a.Children.only(r);return a.cloneElement(f,d({style:{display:t&&!o?void 0:"none"}},f.props))}return s(u,{paused:l,className:i.default.media,streamId:e,onReady:t?null:this.handleReady})},l.render=function(){var e,t=this.props,n=t.mirror,r=t.className;return s("div",{className:(0,o.default)(i.default.video,r,(e={},e[i.default.mirror]=n,e)),onDoubleClick:this.handleDoubleClick,onContextMenu:this.handleContextMenu},void 0,this.renderVideo(this.state.aStreamId,this.state.aReady),this.renderVideo(this.state.bStreamId,this.state.bReady))},r}(a.PureComponent);c.displayName="BufferedVideo",c.defaultProps={paused:!0};var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(3)),l=y(n(8664)),u=y(n(8665)),s=y(n(55)),d=n(278),f=y(n(10965)),c=n(9146),p=y(n(6)),v=y(n(7965));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,E(e,t)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g={position:d.Positions.BOTTOM,autoInvert:!1},S=function(e){function t(){return e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.region,n=e.selected;return _(s.default,{align:s.default.Align.CENTER,className:(0,o.default)({selected:n})},void 0,_(c.RegionFlag,{region:t,className:v.default.regionSelectFlag}),_(c.RegionName,{region:t,className:v.default.regionSelectName}),n?_("i",{className:v.default.check}):null)},t}(a.PureComponent);S.displayName="RegionItem";var O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderOption=function(e,t){return _(S,{region:e.value,selected:t},e.value.id)},t.handleChangeVoiceRegion=function(e){var n=e.value,r=t.props.call.channelId;l.default.changeCallRegion(r,n.id)},t}h(t,e);var n=t.prototype;return n.componentDidMount=function(){null==this.props.regions&&l.default.fetchRegions(null)},n.render=function(){var e=this.props,t=e.regions,n=e.call;if(null==t)return null;var r=t.find((function(e){return e.id===n.region}))||{id:"unknown",name:p.default.Messages.UNKNOWN_REGION,vip:!1,deprecated:!1},a={label:r.name,value:r},o=t.filter((function(e){return!e.deprecated})).map((function(e){return{label:e.name,value:e,key:e.id}}));return _(f.default,{label:p.default.Messages.REGION,options:o,value:a,onChange:this.handleChangeVoiceRegion,renderOption:this.renderOption,popoutProps:g,popoutClassName:v.default.regionSelectPopout})},t}(a.PureComponent);O.displayName="QuickRegionSelect";var I=i.default.connectStores([u.default],(function(){return{regions:u.default.getRegions(null)}}))(O);t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=d(n(0)),o=u(n(61)),i=u(n(278)),l=d(n(9145));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(){return(f=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}).apply(this,arguments)}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderPopout=function(e){var n=e.closePopout,r=t.props,a=r.options,o=r.value,i=r.renderOption,u=r.popoutClassName,s=r.scroller;return c(l.QuickSelectPopout,{scroller:Boolean(s),className:u,options:a,value:o,renderOption:i,onChange:function(e){t.handleChange(e),n()}})},t.handleChange=function(e){var n=t.props.onChange;null==n||n(e)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.render=function(){var e=this.props,t=e.label,n=e.value,r=e.renderValue,u=e.className,s=e.popoutProps,d=c(l.default,{label:t,value:n,renderValue:r});return a.createElement(i.default,f({},s,{renderPopout:this.renderPopout}),(function(e,t){return a.createElement(o.default,f({},e,{className:u,"aria-haspopup":"listbox","aria-expanded":t}),d)}))},r}(a.PureComponent);v.displayName="QuickSelectWrapper";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;I(n(0));var r,a=n(3),o=n(34),i=S(n(288)),l=n(389),u=S(n(132)),s=n(364),d=S(n(8257)),f=S(n(8500)),c=S(n(8941)),p=I(n(8253)),v=S(n(8407)),y=S(n(163)),m=S(n(51)),_=S(n(12)),h=n(140),E=n(1),g=S(n(6));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e){return(0,a.useStateFromStores)([y.default],(function(){var t=y.default.getActiveStreamForUser(e.ownerId);return null!=t&&(0,h.encodeStreamKey)(t)===(0,h.encodeStreamKey)(e)}))}function b(e){var t,n=C(e);return t=e.ownerId===_.default.getCurrentUser().id?g.default.Messages.STOP_STREAMING:n?g.default.Messages.STOP_WATCHING:g.default.Messages.WATCH_STREAM,T(p.MenuItem,{id:"watch",label:t,action:n?function(){(0,s.stopStream)((0,h.encodeStreamKey)(e))}:function(){u.default.selectVoiceChannel(e.channelId),(0,s.watchStream)(e)}})}function M(e){var t=C(e),n=(0,a.useStateFromStores)([m.default],(function(){return m.default.isLocalMute(e.ownerId,o.MediaEngineContextTypes.STREAM)})),r=e.ownerId===_.default.getCurrentUser().id;if(!t||r)return null;return T(p.MenuCheckboxItem,{id:"mute",label:g.default.Messages.SOUND_MUTE,action:function(){i.default.toggleLocalMute(e.ownerId,o.MediaEngineContextTypes.STREAM)},checked:n})}function N(e){var t=e.stream,n=e.analyticsContext,r=e.appContext,a=e.exitFullscreen,i=e.onSelect,u=C(t),s=function(e){var t=C(e),n=(0,v.default)(e.ownerId,o.MediaEngineContextTypes.STREAM);return t?n:null}(t),y=b(t),m=M(t),_=(0,c.default)(t,r,a),h=(0,f.default)(t.channelId);return T(d.default,{context:n,object:E.AnalyticsObjects.CONTEXT_MENU},void 0,T(p.default,{navId:"stream-context",onClose:l.closeContextMenu,"aria-label":g.default.Messages.STREAM_ACTIONS_MENU_LABEL,onSelect:i},void 0,T(p.MenuGroup,{},void 0,y,m),T(p.MenuGroup,{},void 0,s),T(p.MenuGroup,{},void 0,h,u&&_)))}b.displayName="useWatchStreamItem",M.displayName="useMuteStreamItem",N.displayName="StreamContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=ae;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Z();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=$(n(9)),l=n(122),u=n(3),s=$(n(288)),d=$(n(132)),f=n(364),c=$(n(1166)),p=n(123),v=n(1297),y=$(n(294)),m=n(691),_=$(n(688)),h=$(n(9700)),E=$(n(9701)),g=$(n(9702)),S=n(140),O=$(n(1273)),I=$(n(5966)),T=$(n(8400)),C=$(n(9703)),b=$(n(10371)),M=$(n(10359)),N=$(n(10362)),A=$(n(10372)),P=$(n(10363)),R=$(n(10364)),L=$(n(8937)),D=$(n(163)),w=$(n(51)),j=$(n(36)),k=$(n(12)),U=$(n(278)),G=$(n(9704)),F=$(n(6012)),B=$(n(6013)),H=$(n(9705)),x=$(n(8940)),V=$(n(8754)),W=$(n(9678)),Y=$(n(8755)),z=n(1),K=$(n(7969));function $(e){return e&&e.__esModule?e:{default:e}}function Z(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Z=function(){return e},e}function q(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(){return(J=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}).apply(this,arguments)}function Q(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ee(e){if(w.default.isVideoEnabled()!==e)return e?void s.default.setVideoEnabled(e):s.default.setVideoEnabled(e)}function te(e){var t=e.channel,n=e.currentUser,r=e.exitFullScreen,a=e.canGoLive,i=e.inPopout,l=e.coloring,s=e.hasPermission,d=(0,u.useStateFromStores)([D.default],(function(){return D.default.getAllActiveStreams()})).find((function(e){return e.ownerId===(null==n?void 0:n.id)})),f=t.getGuildId(),c=o.useCallback((function(){if(null==r||r(),!a)return(0,W.default)();(0,Y.default)(f,t.id,z.AnalyticsPages.GUILD_CHANNEL)}),[f,t.id,a,r]),p=null!=d;return Q(T.default,{},void 0,Q(U.default,{renderPopout:function(e){var r=e.closePopout;return Q(C.default,{},void 0,Q(x.default,{channel:t,currentUser:n,activeStreams:null!=d?[d]:[],handleGoLive:c,onClose:r,appContext:i?z.AppContext.POPOUT:z.AppContext.APP}))},position:U.default.Positions.TOP,align:U.default.Align.CENTER,animation:U.default.Animation.FADE},void 0,(function(e,t){var n=e.onClick,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClick"]);return Q("div",{},void 0,null!=d?o.createElement(P.default,J({},r,{color:l[1],centerButton:!0,className:K.default.controlButton,onClick:function(){return(0,I.default)(d)},isSelfStream:!0,onPopoutClick:p?n:null,popoutOpen:t,shouldShowTooltip:!t})):o.createElement(R.default,J({},r,{centerButton:!0,color:l[0],className:K.default.controlButton,hasPermission:s,onClick:a?c:W.default,onPopoutClick:p?n:null,popoutOpen:t,shouldShowTooltip:!t})))})))}te.displayName="GoLiveButton",function(e){e.ACTIVITY="ACTIVITY",e.STREAM="STREAM",e.CALL="CALL"}(a||(a={}));var ne=o.memo((function(e){var t=e.currentUser,n=e.onDisconnectCall,r=e.channel,i=(0,u.useStateFromStores)([_.default],(function(){return _.default.getSelectedParticipant(r.id)})),s=o.useContext(p.AccessibilityPreferencesContext).reducedMotion,c=o.useState(!1),h=c[0],E=c[1],g=null==i?void 0:i.id,O=(0,u.useStateFromStores)([D.default],(function(){return null!=g?D.default.getActiveStreamForStreamKey(g):null}),[g]),I=(null==i?void 0:i.type)===m.ParticipantTypes.STREAM&&null!=O&&O.ownerId!==(null==t?void 0:t.id),T=(0,u.useStateFromStoresArray)([D.default],(function(){return D.default.getAllActiveStreamsForChannel(r.id).filter((function(e){return e.ownerId!==(null==t?void 0:t.id)}))})),C=(0,u.useStateFromStores)([y.default],(function(){return y.default.getSelfEmbeddedActivityForChannel(r.id)})),b=o.useCallback((function(){return(null==i?void 0:i.type)===m.ParticipantTypes.ACTIVITY&&C?a.ACTIVITY:I?a.STREAM:a.CALL}),[i,C,I]),A=o.useState(b()),R=A[0],L=A[1],w=(0,l.useSpring)({opacity:h?.2:1,transform:h&&!s.enabled?"scale(0.7)":"scale(1)",config:{mass:2,tension:h?600:1e3,friction:45,precision:.01,clamp:h},onRest:function(){L(b()),E(!1)}});o.useEffect((function(){b()!==R&&E(!0)}),[R,b]);var j=function(e,t){var l={centerButton:!0,className:K.default.controlButton,popoutOpen:e};switch(R){case a.ACTIVITY:return o.createElement(M.default,J({},l,{color:"red",onClick:function(){return null!=i&&(0,v.stopEmbeddedActivity)(r.id,i.id)},onPopoutClick:T.length>0?t:null}));case a.STREAM:return o.createElement(P.default,J({},l,{color:"red",onClick:function(){if(O)(0,f.stopStream)((0,S.encodeStreamKey)(O));else for(var e,t=q(T);!(e=t()).done;){var n=e.value;(0,f.stopStream)((0,S.encodeStreamKey)(n))}},onPopoutClick:T.length>1?t:null,isSelfStream:!1}));case a.CALL:return o.createElement(N.default,J({},l,{color:"red",onClick:function(){d.default.selectVoiceChannel(null),null==n||n()},onPopoutClick:T.length>0?t:null}))}};return Q(U.default,{renderPopout:function(e){var n=e.closePopout;return Q(x.default,{channel:r,currentUser:t,activeStreams:T,handleGoLive:z.NOOP_NULL,hideSelfOptions:!0,onClose:n})},position:U.default.Positions.TOP,align:U.default.Align.CENTER,animation:U.default.Animation.FADE},void 0,(function(e,t){var n=e.onClick;return Q(l.animated.div,{style:w},void 0,j(t,n))}))}));function re(e){var t=e.channel,n=e.cameraUnavailable,r=e.hasCameraPermission,a=(0,F.default)(t),l=a.reachedLimit,u=a.limit,s=o.useCallback((function(){d.default.selectVoiceChannel(t.id,!0)}),[t.id]),f=o.useCallback((function(){d.default.selectVoiceChannel(t.id,!1)}),[t.id]),c=o.useCallback((function(){n?(0,V.default)():s()}),[n,s]);return o.createElement(o.Fragment,null,Q(L.default,{enabled:!0,centerButton:!0,join:!0,color:"green",channelLimitReached:l,channelLimit:u,channel:t,cameraUnavailable:n,hasPermission:r,onCameraUnavailable:c,className:K.default.controlButton,iconClassName:K.default.joinIcon,onChange:s}),Q(b.default,{centerButton:!0,color:"green",channel:t,className:(0,i.default)(K.default.controlButton,K.default.lastButton),onClick:f}))}function ae(e){var t=e.channel,n=e.inPopout,r=e.mode,a=e.className,o=e.onDisconnectCall,l=e.exitFullScreen,s=(0,u.useStateFromStores)([k.default],(function(){return k.default.getCurrentUser()})),d=(0,G.default)(),f=d.cameraUnavailable,p=d.enabled,v=(0,B.default)(t),y=(0,H.default)(t),m=y.suppress,_=y.selfMute,S=y.mute,I=m||_||S,T=(0,u.useStateFromStoresObject)([w.default],(function(){return{canGoLive:(0,O.default)(w.default)}})).canGoLive,b=(0,u.useStateFromStores)([j.default],(function(){return j.default.getVoiceChannelId()===t.id}),[t]),M=(0,F.default)(t),N=M.reachedLimit,P=M.limit,R=(0,c.default)();if(!b)return Q(re,{channel:t,cameraUnavailable:f,hasCameraPermission:v});var D="primaryDark";r===z.ChannelModes.VOICE&&(D=R===z.ThemeTypes.LIGHT?"primaryLight":D);var x="white";return r===z.ChannelModes.VOICE&&(x=R===z.ThemeTypes.LIGHT?"activeLight":x),Q("div",{className:(0,i.default)(K.default.wrapper,a)},void 0,Q(U.default,{renderPopout:function(e){var t=e.closePopout;return Q(C.default,{},void 0,Q(E.default,{onClose:t}))},position:U.default.Positions.TOP,align:U.default.Align.CENTER,animation:U.default.Animation.FADE},void 0,(function(e,t){var n=e.onClick;return Q(L.default,{centerButton:!0,color:p?x:D,hasPermission:v,className:K.default.controlButton,enabled:p,cameraUnavailable:f,onChange:ee,onCameraUnavailable:V.default,channelLimitReached:N,channelLimit:P,popoutOpen:t,onPopoutClick:n})})),Q(te,{coloring:[D,x],channel:t,currentUser:s,exitFullScreen:l,inPopout:n,canGoLive:T,hasPermission:v}),Q(U.default,{renderPopout:function(e){var t=e.closePopout;return Q(C.default,{},void 0,Q(h.default,{onClose:t,renderInputDevices:!0,renderOutputDevices:!0,renderInputModes:!0}))},align:U.default.Align.CENTER,position:U.default.Positions.TOP,animation:U.default.Animation.FADE},void 0,(function(e,t){var n=e.onClick;return Q(A.default,{color:I?x:D,centerButton:!0,onPopoutClick:n,className:K.default.controlButton,selfMute:_,serverMute:S,suppress:m,popoutOpen:t,onClick:function(){return(0,g.default)(S,m)}})})),Q(ne,{currentUser:s,channel:t,onDisconnectCall:o}))}ae.displayName="CenterControlTray"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return Object.values(l.default.getInputDevices())})),t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getInputDeviceId()}));return e.map((function(e){var n=e.id,r=e.disabled,a=e.name;return d(i.MenuRadioItem,{id:"input-"+n,group:"input-devices",disabled:r,label:a,checked:n===t,action:function(){return o.default.setInputDevice(n)}},"input-"+n)}))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=u(n(288)),i=n(8253),l=u(n(51));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return Object.values(l.default.getOutputDevices())})),t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getOutputDeviceId()}));return e.map((function(e){var n=e.id,r=e.disabled,a=e.name;return d(i.MenuRadioItem,{group:"output-devices",id:"output-"+n,disabled:r,label:a,checked:n===t,action:function(){return o.default.setOutputDevice(n)}},"output-"+n)}))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=u(n(288)),i=n(8253),l=u(n(51));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(473)),o=n(8253),i=s(n(8367)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return f(o.MenuItem,{id:"voice-settings",label:u.default.Messages.VOICE_SETTINGS,action:function(){return a.default.open(l.UserSettingsSections.VOICE)},icon:i.default})}c.displayName="useVoiceSettingsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return Object.values(l.default.getVideoDevices())})),t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getVideoDeviceId()}));return e.map((function(e){var n=e.id,r=e.disabled,a=e.name;return d(i.MenuRadioItem,{group:"video-devices",id:"video-device-"+n,disabled:r,label:a,checked:n===t,action:function(){return o.default.setVideoDevice(n)}},"video-device-"+n)}))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=u(n(288)),i=n(8253),l=u(n(51));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(288)),i=n(8726),l=d(n(10973)),u=n(41),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(){return c(i.MenuItem,{id:"report-stream-problem",label:s.default.Messages.CAMERA_PREVIEW_MENU_ITEM,action:function(){(0,u.openModal)((function(e){return a.createElement(l.default,p({},e,{onAccept:function(){return o.default.setVideoEnabled(!0)}}))}))}})}v.displayName="usePreviewVideoItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=m(n(288)),i=m(n(51)),l=m(n(29)),u=m(n(151)),s=n(85),d=n(35),f=m(n(47)),c=n(374),p=m(n(24)),v=m(n(6)),y=m(n(7967));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=368,g=207;function S(e){var t=e.transitionState,n=e.onAccept,r=e.onClose,m=i.default.getCameraComponent(),_=(0,a.useStateFromStores)([i.default],(function(){return i.default.getVideoDeviceId()})),S=(0,a.useStateFromStores)([i.default],(function(){return Object.values(i.default.getVideoDevices())})),O=(0,s.useUID)();var I=S.map((function(e){return{value:e.id,label:e.name}}));return h(d.ModalRoot,{size:d.ModalSize.DYNAMIC,"aria-labelledby":O,transitionState:t},void 0,h(d.ModalContent,{className:y.default.content},void 0,h(f.default,{id:O,className:y.default.header,size:f.default.Sizes.SIZE_24},void 0,v.default.Messages.CAMERA_PREVIEW_MODAL_HEADER),h(p.default,{className:y.default.subtitle,size:p.default.Sizes.SIZE_16,color:p.default.Colors.CUSTOM},void 0,v.default.Messages.CAMERA_PREVIEW_MODAL_SUBTITLE),h("div",{className:y.default.cameraPreview},void 0,h(u.default,{className:y.default.spinner}),h("div",{className:y.default.camera},void 0,h(m,{disabled:!1,deviceId:_,width:E,height:g}))),h(c.SingleSelect,{placeholder:v.default.Messages.CHANGE_CAMERA,className:y.default.selector,options:I,value:_,onChange:function(e){return o.default.setVideoDevice(e)}})),h(d.ModalFooter,{},void 0,h(l.default,{onClick:function(){r(),n()},size:l.default.Sizes.SMALL},void 0,v.default.Messages.CAMERA_ON),h(l.default,{onClick:r,look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY,size:l.default.Sizes.SMALL},void 0,v.default.Messages.CANCEL)))}S.displayName="CameraPreviewModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.stream,n=e.applicationId,r=e.channel,h=e.exitFullScreen,E=e.appContext,O=e.analyticsLocation,I=e.className,T=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["stream","applicationId","channel","exitFullScreen","appContext","analyticsLocation","className"]),C=null==r?void 0:r.getGuildId(),b=(0,l.useStateFromStores)([d.default],(function(){return null!=C?d.default.getGuild(C):null}),[C]);if(!function(e,t){return null!=e&&null!=t&&f.default.can(y.Permissions.CREATE_INSTANT_INVITE,t)}(b,r))return null;var M=m.default.Messages.INSTANT_INVITE;null!=t?M=m.default.Messages.INVITE_STREAM_HEADER:null!=n&&(M=m.default.Messages.EMBEDDED_ACTIVITIES_INVITE_TO_ACTIVITY);return a.createElement(a.Fragment,null,a.createElement(c.default,S({size:c.default.Sizes.TINY,color:_.default.buttonColor,onClick:function(){(0,i.default)(null!=b,"guild cannot be null"),(0,i.default)(null!=r,"channel cannot be null"),function(e,t,n,r,o,i,l){null==i||i(),(0,p.openModal)((function(o){return a.createElement(u.default,S({},o,{guild:e,channel:t,streamUserId:n,applicationId:r,analyticsLocation:l,source:y.InstantInviteSources.STREAM_INVITE}))}),{modalKey:"stream-invite-modal"},o===y.AppContext.POPOUT?v.POPOUT_MODAL_CONTEXT:v.DEFAULT_MODAL_CONTEXT)}(b,r,null==t?void 0:t.ownerId,n,E,h,O)},className:(0,o.default)(I,_.default.textButton)},T),M),g(s.default,{channel:r,stream:t,appContext:E,className:(0,o.default)(I,_.default.iconButton),exitFullScreen:h,analyticsLocation:O}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(23)),l=n(3),u=h(n(8283)),s=h(n(9148)),d=h(n(15)),f=h(n(40)),c=h(n(29)),p=n(41),v=n(217),y=n(1),m=h(n(6)),_=h(n(7970));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(8320)),l=s(n(8288)),u=s(n(7972));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e){var t,n=e.direction,s=e.className,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["direction","className"]);return a.createElement(l.default,f({className:(0,o.default)(s,u.default.arrow,(t={},t[u.default.up]=n===r.UP,t)),iconComponent:i.default},d))}!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN"}(r||(r={})),c.displayName="ArrowButton",c.Directions=r;var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=c(n(3)),o=c(n(5952)),i=c(n(161)),l=c(n(9103)),u=c(n(10977)),s=n(733),d=c(n(8288)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e){var t=e.enabled,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["enabled"]),a=t?f.default.Messages.EXIT_FULL_SCREEN:f.default.Messages.FULL_SCREEN,o=t?u.default:l.default;return r.createElement(d.default,v({label:a,iconComponent:o},n))}y.displayName="FullscreenButton";var m=a.default.connectStores([i.default,o.default],(function(e){var t=e.node,n=e.guestWindow;return{enabled:(0,s.isFullScreen)(t,null==n?void 0:n.document)}}))(y);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M16,8V3H14V8a2,2,0,0,0,2,2h5V8Z"}),s("path",{className:f,fill:d,d:"M14,16v5h2V16h5V14H16A2,2,0,0,0,14,16Z"}),s("path",{className:f,fill:d,d:"M8,8H3v2H8a2,2,0,0,0,2-2V3H8Z"}),s("path",{className:f,fill:d,d:"M8,14H3v2H8v5h2V16A2,2,0,0,0,8,14Z"}))}d.displayName="MinimizeScreen"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(9149)),o=u(n(9150)),i=u(n(8288)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=e.popoutWindowAlwaysOnTop,n=e.onToggleStayOnTop,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["popoutWindowAlwaysOnTop","onToggleStayOnTop"]),s=t?l.default.Messages.POPOUT_REMOVE_FROM_TOP:l.default.Messages.POPOUT_STAY_ON_TOP,f=t?o.default:a.default;return r.createElement(i.default,d({onClick:function(){return n(!t)},label:s,iconComponent:f},u))}f.displayName="StayOnTopButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=p(n(9)),o=p(n(3)),i=p(n(288)),l=p(n(51)),u=p(n(9102)),s=n(8425),d=p(n(16)),f=p(n(8400)),c=p(n(7401));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.iconClassName,n=e.currentVolume,r=e.sliderClassName,o=e.userId,l=e.currentWindow,p=void 0===l?window:l,v=e.muted,m=e.context;return y(f.default,{},void 0,y(u.default,{currentWindow:p,iconClassName:(0,a.default)(t,c.default.controlIcon),sliderClassName:r,value:(0,s.amplitudeToPerceptual)(n),muted:v,maxValue:d.default.embedded?200:100,onValueChange:function(e){return function(e,t,n,r){e>0&&n&&i.default.toggleLocalMute(t,r),i.default.setLocalVolume(t,(0,s.perceptualToAmplitude)(e),r)}(e,o,v,m)},onToggleMute:function(){return function(e,t){i.default.toggleLocalMute(e,t)}(o,m)}}))}m.displayName="VolumeButton";var _=o.default.connectStores([l.default],(function(e){var t=e.userId,n=e.context;return{currentVolume:l.default.getLocalVolume(t,n),muted:l.default.isLocalMute(t,n)}}))(m);t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=I(n(0)),o=n(92),i=n(3),l=I(n(5957)),u=S(n(180)),s=S(n(8449)),d=S(n(10981)),f=S(n(8282)),c=S(n(24)),p=S(n(16)),v=n(259),y=S(n(43)),m=n(691),_=S(n(688)),h=S(n(10982)),E=S(n(6)),g=S(n(7976));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){C(o,r,a,i,l,"next",e)}function l(e){C(o,r,a,i,l,"throw",e)}i(void 0)}))}}function M(){return N.apply(this,arguments)}function N(){return(N=b(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p.default.isOSX()||!p.default.embedded){e.next=14;break}return e.next=3,null===(n=(r=window.DiscordNative.remoteApp).getDefaultDoubleClickAction)||void 0===n?void 0:n.call(r);case 3:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=7;break}e.t0=void 0!==t;case 7:if(!e.t0){e.next=11;break}e.t2=t,e.next=12;break;case 11:e.t2="Maximize";case 12:"Minimize"===(a=e.t2)?y.default.minimize():"Maximize"===a&&y.default.maximize();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e){var t=e.stream,n=e.channel,r=e.user,o=(0,d.default)(n,r,t);return a.createElement(a.Fragment,null,T(f.default.Divider,{className:g.default.divider}),T(l.default,{className:g.default.avatar,size:l.Sizes.SIZE_24,user:r,animate:!1}),T(c.default,{className:g.default.playingText,size:c.default.Sizes.SIZE_16,color:c.default.Colors.CUSTOM},void 0,o))}function P(e){var t=e.channel,n=e.appContext,r=e.inPopout,a=e.isFullScreen,l=e.exitFullScreen,d=(0,i.useStateFromStoresObject)([_.default],(function(){return{selectedParticipant:_.default.getSelectedParticipant(t.id),participantsOpen:_.default.getParticipantsOpen(t.id)}}),[t.id]).selectedParticipant,c=(0,u.default)(t),p=(0,s.default)(t),y=E.default.Messages.VOICE_CHANNEL;return t.isDM()?y=E.default.Messages.DM:t.isGroupDM()&&(y=E.default.Messages.GROUP_DM),T(f.default,{onDoubleClick:M,transparent:!0,className:(0,v.getThemeClass)(o.ThemeTypes.DARK),toolbar:T(h.default,{channel:t,appContext:n,inPopout:r,isFullScreen:a,exitFullScreen:l})},void 0,null!=p?T(f.default.Icon,{icon:p,disabled:!0,"aria-label":y}):null,T(f.default.Title,{},void 0,c),null!=d&&d.type!==m.ParticipantTypes.ACTIVITY?T(A,{stream:d.type===m.ParticipantTypes.STREAM?d.stream:null,channel:t,user:d.user}):null)}P.displayName="ChannelCallHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var u=(0,r.useStateFromStores)([o.default],(function(){return null!=n?(0,a.getStreamerApplication)(n,o.default):null}),[n]),s=i.default.getName(e.getGuildId(),e.id,t);if(null==n)return s;return null!=(null==u?void 0:u.name)?l.default.Messages.GO_LIVE_USER_PLAYING.format({applicationName:null==u?void 0:u.name,username:s}):l.default.Messages.GO_LIVE_TILE_SCREEN.format({username:s})};var r=n(3),a=n(726),o=u(n(256)),i=u(n(258)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.channel,n=e.appContext,r=e.inPopout,o=e.isFullScreen,i=e.exitFullScreen,d=(0,l.useStateFromStoresObject)([C.default],(function(){return{selectedParticipant:C.default.getSelectedParticipant(t.id),voiceParticipantsHidden:C.default.getVoiceParticipantsHidden(t.id),userParticipantCount:C.default.getUserParticipantCount(t.id)}}),[t.id]),h=d.voiceParticipantsHidden,g=d.selectedParticipant,O=d.userParticipantCount,N=(0,c.usePreventIdle)("popup"),P=N.preventIdle,R=N.allowIdle,j=[];h&&j.push(L(w,{channelId:t.id,guildId:t.guild_id},"current-speaker"));(null==g?void 0:g.type)===T.ParticipantTypes.STREAM&&(j.push(L(f.default,{className:A.default.button,streamerId:g.stream.ownerId},"warning")),j.push(L(u.default,{size:I.default.Sizes.LARGE,className:A.default.button,participant:g,showQuality:!0},"live-indicator")));var k=L(p.default,{},void 0,L(M.default,{channel:t}));h&&j.push(L(E.default,{position:E.default.Positions.BOTTOM,renderPopout:function(){return k}},"call-members-popout",(function(e,t){return a.createElement(m.default,D({},e,{active:t,count:O,key:"call-members",className:A.default.button}))})));j.push(null!=g?L(y.default,{className:A.default.button,channelId:t.id},"deselect-participant"):L(_.default,{className:A.default.button,channelId:t.id},"select-participant")),j.push(L(E.default,{position:E.default.Positions.BOTTOM,renderPopout:function(e){var r=e.closePopout;return L(p.default,{},void 0,L(b.default,{channelId:t.id,onClose:r,appContext:n,exitFullScreen:i}))}},"more-options-popout",(function(e,t){return a.createElement(v.default,D({},e,{key:"more-options",active:t,className:A.default.lastButton}))}))),r||o||(j.push(L(S.default.Divider,{className:A.default.divider},"divider")),j.push(L(s.default,{className:A.default.button,onOpen:P,onClose:R},"recents")));return a.createElement(a.Fragment,null,j)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=P(n(9)),i=P(n(8)),l=n(3),u=P(n(9656)),s=P(n(9151)),d=P(n(9137)),f=P(n(10352)),c=n(8400),p=P(n(9703)),v=P(n(10983)),y=P(n(10984)),m=P(n(10986)),_=P(n(10987)),h=P(n(283)),E=P(n(278)),g=P(n(149)),S=P(n(8282)),O=P(n(8670)),I=P(n(8414)),T=n(691),C=P(n(688)),b=P(n(10989)),M=P(n(10990)),N=P(n(6)),A=P(n(7975));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return(D=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}).apply(this,arguments)}function w(e){var t=e.channelId,n=e.guildId,r=Date.now(),u=(0,l.useStateFromStores)([h.default,C.default],(function(){return(0,i.default)(h.default.getSpeakers()).map((function(e){return C.default.getParticipant(t,e)})).filter((function(e){return null!=e&&e.type===T.ParticipantTypes.USER&&!(0,d.default)(e)&&e.speaking})).sortBy((function(e){return-h.default.getSpeakingDuration(e.user.id,r)})).slice(0,3).value()}));return 0===u.length?null:a.createElement(a.Fragment,null,u.map((function(e,t){return L(g.default,{position:g.default.Positions.BOTTOM,color:g.default.Colors.GREY,text:N.default.Messages.CHANNEL_CALL_CURRENT_SPEAKER.format({username:e.user.username})},e.id,(function(r){var i;return a.createElement(O.default,D({},r,{className:(0,o.default)(A.default.speaker,(i={},i[A.default.last]=t===u.length-1,i)),user:e.user,speaking:!0,collapsed:!0,guildId:n}))}))})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(149),o=u(n(8331)),i=u(n(8288)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e){var t=d({},e);return r.createElement(i.default,d({label:l.default.Messages.MORE,iconComponent:o.default,tooltipPosition:a.TooltipPositions.BOTTOM},t))}f.displayName="ContextButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=s(n(705)),o=n(149),i=s(n(10985)),l=s(n(8288)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return(f=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}).apply(this,arguments)}function c(e){var t=e.channelId,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channelId"]);return r.createElement(l.default,f({onClick:function(){a.default.selectParticipant(t,null)},label:u.default.Messages.VIDEO_CALL_RETURN_TO_GRID,iconComponent:i.default,tooltipPosition:o.TooltipPositions.BOTTOM},n))}c.displayName="GridButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("rect",{className:f,x:"4",y:"4",width:"7",height:"7",rx:"1",fill:d}),s("rect",{className:f,x:"4",y:"13",width:"7",height:"7",rx:"1",fill:d}),s("rect",{className:f,x:"13",y:"4",width:"7",height:"7",rx:"1",fill:d}),s("rect",{className:f,x:"13",y:"13",width:"7",height:"7",rx:"1",fill:d}))}d.displayName="Grid"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParticipantsCount=m,t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=n(149),l=c(n(696)),u=c(n(24)),s=c(n(8288)),d=c(n(6)),f=c(n(7973));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(){return(v=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}).apply(this,arguments)}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.className,n=e.count;return y("div",{className:(0,o.default)(f.default.root,f.default.comboIcon,t)},void 0,y(l.default,{className:f.default.icon}),y(u.default,{color:u.default.Colors.CUSTOM,className:f.default.count,size:u.default.Sizes.SIZE_16},void 0,n))}function _(e){var t=e.count,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["count"]);return a.createElement(s.default,v({label:d.default.Messages.CHANNEL_CALL_PARTICIPANTS,iconComponent:function(e){return y(m,{className:e.className,count:t})},tooltipPosition:i.TooltipPositions.BOTTOM},n))}m.displayName="ParticipantsCount",_.displayName="ParticipantsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=d(n(705)),o=n(691),i=n(149),l=d(n(10988)),u=d(n(8288)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e){var t=e.channelId,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channelId"]);return r.createElement(u.default,c({onClick:function(){a.default.selectParticipant(t,o.ParticipantSelectionTypes.AUTO)},label:s.default.Messages.VIDEO_CALL_AUTO_SELECT,iconComponent:l.default,tooltipPosition:i.TooltipPositions.BOTTOM},n))}p.displayName="VideoLayoutButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("rect",{className:f,x:"1",y:"4",width:"13",height:"16",rx:"2",fill:d}),s("rect",{className:f,x:"16",y:"4",width:"7",height:"7",rx:"1",fill:d}),s("rect",{className:f,x:"16",y:"13",width:"7",height:"7",rx:"1",fill:d}))}d.displayName="VideoLayout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;p(n(0));var r,a=n(3),o=p(n(8253)),i=n(691),l=f(n(688)),u=f(n(8500)),s=f(n(8941)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.channelId,n=e.onClose,r=e.appContext,f=e.exitFullScreen,c=e.onSelect,p=(0,a.useStateFromStores)([l.default],(function(){return l.default.getSelectedParticipant(t)})),y=(null==p?void 0:p.type)===i.ParticipantTypes.STREAM?p.stream:null;return v(o.default,{navId:"channel-call-overflow-popout",style:o.MenuStyle.FLEXIBLE,onClose:n,"aria-label":d.default.Messages.CHANNEL_CALL_OVERFLOW_MENU_LABEL,onSelect:c},void 0,(0,u.default)(t),(0,s.default)(y,r,f))}y.displayName="ChannelCallOverflowMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(8763)),i=f(n(365)),l=f(n(24)),u=f(n(272)),s=f(n(6)),d=f(n(7974));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.channel,n=(0,a.useStateFromStores)([i.default],(function(){return i.default.getVoiceStatesForChannel(t)}));return p("div",{className:d.default.root},void 0,p(l.default,{size:l.default.Sizes.SIZE_12,className:d.default.header},void 0,s.default.Messages.CHANNEL_CALL_MEMBERS_POPOUT_HEADER.format({count:n.length})),p(u.default,{className:d.default.scroller},void 0,p(o.default,{allowDragging:!1,allowPreviews:!1,className:d.default.voiceUsers,channel:t,voiceStates:n,collapsed:!1})))}v.displayName="ChannelCallParticipantsPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(10366)),o=l(n(10375)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.windowKey,n=e.channel;return s(a.default,{withTitleBar:!0,windowKey:t,title:n.name},void 0,s(o.default,{channel:n,appContext:i.AppContext.POPOUT}))}d.displayName="PopoutWindowStageChannelCall"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=ne;var r,a=B(n(0)),o=G(n(9)),i=G(n(23)),l=n(92),u=n(3),s=n(389),d=B(n(5957)),f=n(8298),c=G(n(8322)),p=G(n(8264)),v=G(n(8268)),y=G(n(56)),m=G(n(40)),_=G(n(256)),h=G(n(29)),E=G(n(61)),g=G(n(278)),S=G(n(8267)),O=G(n(149)),I=G(n(255)),T=G(n(407)),C=G(n(10376)),b=G(n(1318)),M=G(n(24)),N=G(n(1210)),A=n(301),P=n(1260),R=n(260),L=n(304),D=G(n(9159)),w=n(10993),j=G(n(10994)),k=G(n(6)),U=G(n(7979));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var V,W=x(b.default,{}),Y=x(I.default,{}),z=a.memo((function(e){var t=e.toggleRequestToSpeakSidebar;return x("div",{className:U.default.headerContainer},void 0,W,x(M.default,{className:U.default.headerTitle,size:M.default.Sizes.SIZE_16,color:M.default.Colors.HEADER_PRIMARY},void 0,k.default.Messages.REQUEST_TO_SPEAK_AREA_TITLE),x(E.default,{className:U.default.headerClose,onClick:t,"aria-label":k.default.Messages.CLOSE},void 0,Y))})),K=x(T.default,{width:16,height:16}),$=a.memo((function(e){var t=e.channel;return x(E.default,{className:U.default.selfSpeakerContainer,onClick:function(){(0,A.audienceAckRequestToSpeak)(t,!1)}},void 0,x("div",{className:(0,o.default)(U.default.buttonContainer,U.default.selfSpeakerButton)},void 0,K),x(M.default,{className:U.default.selfSpeakerText,size:M.default.Sizes.SIZE_16,color:M.default.Colors.CUSTOM},void 0,k.default.Messages.MODERATOR_RAISE_OWN_HAND))})),Z=x(C.default,{width:16,height:16}),q=x(I.default,{width:16,height:16}),X=a.memo((function(e){var t=e.channel,n=e.participant,r=t.getGuildId();(0,i.default)(null!=r,"Channel cannot be guildless");var l=(0,u.useStateFromStoresObject)([_.default],(function(){return{isMobile:_.default.isMobileOnline(n.user.id),status:_.default.getStatus(n.user.id,r)}})),m=l.isMobile,S=l.status,I=(0,u.useStateFromStores)([y.default],(function(){return y.default.getMember(r,n.user.id)})),T=a.useMemo((function(){var e;return(e={})[r]=[n.user.id],e}),[r,n.user.id]);(0,f.useSubscribeGuildMembers)(T);var C=n.rtsState===L.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK;function b(){(0,A.setUserSuppress)(t,n.user.id,!1)}function N(){(0,A.setUserSuppress)(t,n.user.id,!0)}var P=function(e){(0,s.openContextMenu)(e,(function(e){return a.createElement(c.default,H({},e,{user:n.user,guildId:r,channelId:t.id,showMediaItems:!0,popoutPosition:g.default.Positions.LEFT}))}))};return x("div",{className:U.default.participantRowContainer},void 0,x(g.default,{preload:function(){return(0,p.default)(n.user.id,n.user.getAvatarURL(t.guild_id))},renderPopout:function(e){return a.createElement(v.default,H({},e,{userId:n.user.id,guildId:r,channelId:t.id}))},position:g.default.Positions.LEFT,spacing:16},void 0,(function(e){var t;return a.createElement(E.default,H({className:U.default.participantMemberContainer,onContextMenu:P},e),x(d.default,{size:d.Sizes.SIZE_40,className:U.default.participantAvatar,user:n.user,isMobile:m,status:S}),x("div",{className:U.default.participantTextContainer},void 0,x(M.default,{className:U.default.participantName,size:M.default.Sizes.SIZE_16,color:M.default.Colors.CUSTOM,style:{color:null!==(t=null==I?void 0:I.colorString)&&void 0!==t?t:void 0}},void 0,n.userNick),x(M.default,{size:M.default.Sizes.SIZE_12,color:M.default.Colors.HEADER_SECONDARY},void 0,(0,R.participantMemberInfo)(n))))})),x(O.default,{text:C?k.default.Messages.REQUEST_TO_SPEAK_INVITATION_SEND:k.default.Messages.REQUEST_TO_SPEAK_ACCEPT},void 0,(function(e){return a.createElement(h.default,H({},e,{innerClassName:U.default.buttonContainer,look:h.default.Looks.BLANK,size:h.default.Sizes.NONE,onClick:b,disabled:C}),Z)})),x(O.default,{text:k.default.Messages.REQUEST_TO_SPEAK_DECLINE},void 0,(function(e){return a.createElement(h.default,H({},e,{innerClassName:(0,o.default)(U.default.buttonContainer,U.default.buttonMargin),look:h.default.Looks.BLANK,size:h.default.Sizes.NONE,onClick:N}),q)})))})),J=a.memo((function(e){var t=e.channel,n=(0,w.useRequestToSpeakPermission)(t.id),r=n[0],a=n[1];return x(S.default,{className:U.default.toggle,onChange:a,value:r},void 0,k.default.Messages.MODERATOR_ALLOW_EVERYONE_RAISE_HAND)})),Q=x(j.default,{}),ee=a.memo((function(){return x("div",{className:U.default.emptyStateContainer},void 0,Q,x(M.default,{className:U.default.emptyStateTitle,size:M.default.Sizes.SIZE_20,color:M.default.Colors.HEADER_PRIMARY},void 0,k.default.Messages.REQUEST_TO_SPEAK_EMPTY_LIST_TITLE),x(M.default,{className:U.default.emptyStateBody,size:M.default.Sizes.SIZE_14,color:M.default.Colors.HEADER_SECONDARY},void 0,k.default.Messages.REQUEST_TO_SPEAK_EMPTY_LIST_BODY))}));!function(e){e[e.TOGGLE_REQUEST_TO_SPEAK=0]="TOGGLE_REQUEST_TO_SPEAK",e[e.MAKE_SPEAKER=1]="MAKE_SPEAKER",e[e.PARTICIPANTS=2]="PARTICIPANTS"}(V||(V={}));var te=x(ee,{},"participants-empty");function ne(e){var t=e.channel,n=e.toggleRequestToSpeakSidebar,r=(0,D.default)(t.id).speaker,a=(0,P.useSortedRequestToSpeakParticipants)(t.id),o=[(0,u.useStateFromStores)([m.default],(function(){return m.default.can(l.Permissions.MANAGE_CHANNELS,t)||m.default.can(l.Permissions.MANAGE_ROLES,t)}))?1:0,r?0:1,Math.max(1,a.length)];var i=x(J,{channel:t},"rts-toggle"),s=x($,{channel:t},"make-speaker");return x("div",{className:U.default.container},void 0,x(z,{toggleRequestToSpeakSidebar:n}),x(N.default,{className:U.default.contentContainer,sections:o,sectionHeight:function(e){switch(e){case V.PARTICIPANTS:return 40}return 0},rowHeight:function(e){switch(e){case V.TOGGLE_REQUEST_TO_SPEAK:return 66;case V.MAKE_SPEAKER:return 48;case V.PARTICIPANTS:return 0===a.length?178:48}return 0},renderRow:function(e){var n=e.section,r=e.row;switch(n){case V.TOGGLE_REQUEST_TO_SPEAK:return i;case V.MAKE_SPEAKER:return s;case V.PARTICIPANTS:if(0===a.length)return te;var o=a[r];return x(X,{channel:t,participant:o},o.id)}return null},renderSection:function(e){switch(e.section){case V.PARTICIPANTS:return x(M.default,{className:U.default.listTitle,size:M.default.Sizes.SIZE_12,color:M.default.Colors.HEADER_SECONDARY},"participants-section",a.length>0?k.default.Messages.REQUEST_TO_SPEAK_LIST_TITLE.format({numHands:a.length}):k.default.Messages.REQUEST_TO_SPEAK_AREA_TITLE)}return null}}))}ne.displayName="RequestToSpeakSidebar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRequestToSpeakPermission=function(e){var t=(0,a.useStateFromStores)([o.default],(function(){return o.default.getChannel(e)}),[e]),n=i.default.canEveryoneRole(u.Permissions.REQUEST_TO_SPEAK,t),s=r.useState(n),d=s[0],f=s[1];return r.useEffect((function(){n!==d&&f(n)}),[n]),[d,function(e){null!=t&&(f(e),(0,l.setEveryoneRolePermissionAllowed)(t,u.Permissions.REQUEST_TO_SPEAK,e))}]};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=s(n(10)),i=s(n(78)),l=n(301),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(291)),o=l(n(308)),i=l(n(7978));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.className;return s(o.default,{className:t},void 0,s("div",{className:i.default.background},void 0,s(a.default,{className:i.default.foreground,width:32,height:32})))}d.displayName="RaisedHandsEmptyStateImage"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=R;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=n(3),l=I(n(9160)),u=I(n(8479)),s=I(n(180)),d=I(n(40)),f=I(n(8367)),c=I(n(291)),p=I(n(8282)),v=I(n(16)),y=n(259),m=I(n(43)),_=n(748),h=n(203),E=I(n(10996)),g=n(1),S=I(n(6)),O=I(n(7981));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){b(o,r,a,i,l,"next",e)}function l(e){b(o,r,a,i,l,"throw",e)}i(void 0)}))}}function N(){return A.apply(this,arguments)}function A(){return(A=M(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v.default.isOSX()||!v.default.embedded){e.next=14;break}return e.next=3,null===(n=(r=window.DiscordNative.remoteApp).getDefaultDoubleClickAction)||void 0===n?void 0:n.call(r);case 3:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=7;break}e.t0=void 0!==t;case 7:if(!e.t0){e.next=11;break}e.t2=t,e.next=12;break;case 11:e.t2="Maximize";case 12:"Minimize"===(a=e.t2)?m.default.minimize():"Maximize"===a&&m.default.maximize();case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){var t=e.channel,n=a.useContext(u.default),r=(0,i.useStateFromStores)([d.default],(function(){return d.default.can(h.MODERATE_STAGE_CHANNEL_PERMISSIONS,t)})),o=l.default.useExperiment({guildId:t.guild_id})[0].showNotificationSurfaces;return a.createElement(a.Fragment,null,o?C(E.default,{channel:t}):null,r?C(p.default.Icon,{onClick:function(){(0,_.openStageChannelSettings)(t,n)},tooltip:S.default.Messages.STAGE_SETTINGS,"aria-label":S.default.Messages.STAGE_SETTINGS,icon:f.default}):null)}function R(e){var t=e.channel,n=(0,s.default)(t);return C(p.default,{toolbar:C(P,{channel:t}),onDoubleClick:N,transparent:!0,className:(0,o.default)((0,y.getThemeClass)(g.ThemeTypes.DARK),O.default.participants)},void 0,C(p.default.Icon,{icon:c.default,disabled:!0,"aria-label":S.default.Messages.STAGE_CHANNEL,className:O.default.icon}),C(p.default.Title,{},void 0,n))}R.displayName="StageChannelCallHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(8571),l=m(n(8253)),u=m(n(181)),s=m(n(278)),d=m(n(8666)),f=m(n(9726)),c=m(n(8282)),p=n(1),v=m(n(6)),y=m(n(7980));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.channel,n=e.closePopout,r=e.onSelect,a=(0,i.useChannelNotificationRadioItems)(t);return E(l.default,{navId:"notification-settings",onClose:n,"aria-label":v.default.Messages.NOTIFICATION_SETTINGS,onSelect:r},void 0,a)}function S(e){var t=e.channel,n=a.useState(!1),r=n[0],i=n[1],l=(0,o.useStateFromStores)([u.default],(function(){return u.default.getChannelOverrides(t.guild_id)[t.id]}),[t.guild_id,t.id]),m=(null==l?void 0:l.message_notifications)===p.UserNotificationSettings.NO_MESSAGES,_=v.default.Messages.NOTIFICATION_SETTINGS;return E(s.default,{shouldShow:r,animation:s.default.Animation.NONE,position:s.default.Positions.BOTTOM,align:s.default.Align.RIGHT,autoInvert:!1,onRequestClose:function(){return i(!1)},renderPopout:function(e){return a.createElement(g,h({},e,{channel:t}))}},void 0,(function(e,t){return a.createElement(c.default.Icon,h({},e,{onClick:function(){return i((function(e){return!e}))},tooltip:t?null:_,icon:m?f.default:d.default,foreground:m?y.default.strikethrough:null,"aria-label":_}))}))}g.displayName="NotificationSettingsMenu",S.displayName="NotificationSettingsButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LayoutSections=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=_(n(8299)),i=_(n(12)),l=_(n(80)),u=_(n(302)),s=n(260),d=n(10998),f=_(n(11e3)),c=_(n(11002)),p=_(n(11003)),v=_(n(11004)),y=_(n(11005)),m=_(n(7990));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g,S=424,O=624,I=824;t.LayoutSections=g,function(e){e[e.SPEAKER=0]="SPEAKER",e[e.AUDIENCE=1]="AUDIENCE"}(g||(t.LayoutSections=g={}));var T=function(e){var t,n=e.channel,r=e.width,o=(0,a.useStateFromStores)([i.default],(function(){var e;return null===(e=i.default.getCurrentUser())||void 0===e?void 0:e.id}),[]),_=(0,a.useStateFromStores)([l.default],(function(){return l.default.isInChannel(n.id,o)}),[o,n.id]),h=(0,a.useStateFromStoresObject)([u.default],(function(){var e=u.default.getParticipantCount(n.id,s.StageChannelParticipantNamedIndex.AUDIENCE);return{speakerCount:u.default.getParticipantCount(n.id,s.StageChannelParticipantNamedIndex.SPEAKER),audienceCount:e,blockedCount:u.default.getParticipantCount(n.id,s.StageChannelParticipantNamedIndex.BLOCKED)}})),T=h.speakerCount,C=h.audienceCount,b=h.blockedCount,M=function(e){return Math.floor((e-32)/102)}(r),N=function(e){return e<S?1:e<O?2:e<I?3:4}(r),A=((t={})[s.StageChannelParticipantNamedIndex.SPEAKER]=N,t[s.StageChannelParticipantNamedIndex.AUDIENCE]=M,t),P=(0,d.useThrottleDurationForChannel)(n.id),R=(0,d.useStageChannelParticipantsListThrottled)(n.id,A,P),L=R[0],D=R[1],w=[L[g.SPEAKER]||1,L[g.AUDIENCE]],j=function(e,t){var n=Math.max(e/t,192);return{speakerTileWidth:n,speakerTileHeight:Math.max(.5625*n,192)}}(r,N),k=j.speakerTileWidth,U=j.speakerTileHeight,G=function(e){return e===L.length-1},F=E(p.default,{channel:n,audienceCount:C,speakerCount:T,blockedCount:b},"speaker-header");return _?E(v.default,{sections:w,renderSection:function(e){var t=e.section;return t===g.SPEAKER?F:t===g.AUDIENCE?0===C?null:E(c.default,{participantCount:C},"audience-header-"+t):null},sectionHeight:function(e){return e===g.SPEAKER?148:64},renderRow:function(e){var t=e.section,r=e.row,a=D[t][r];if(null==(null==a?void 0:a.length))return null;switch(t){case g.SPEAKER:if(null==(null==a?void 0:a.length))return null;var o=Math.min(N,null==a?void 0:a.length);return E(y.default,{tileWidth:k,tileHeight:U,channel:n,participants:a,tilesInRow:o,maxTilesPerRow:N},"speakers-"+t+"-"+r);case g.AUDIENCE:return E(f.default,{channel:n,participants:a,maxTiles:M},"audience-"+t+"-"+r);default:return null}},rowHeight:function(e){return null===D[e][0]?0:e===g.SPEAKER?U:98},renderFooter:function(e){var t=e.section;return t===g.SPEAKER?E("div",{className:m.default.divider},"speaker-divider"):G(t)?E("div",{className:m.default.spacer},"bottom-spacer"):null},footerHeight:function(e){return e===g.SPEAKER?24:G(e)?88:0},className:m.default.scroller,chunkSize:60}):null};T.displayName="StageChannelCallView";var C=(0,o.default)(T);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStageChannelParticipantsList=p,t.useThrottleDurationForChannel=function(e){var t=(0,u.useStageParticipantsCount)(e,s.StageChannelParticipantNamedIndex.AUDIENCE),n=a.useState(!1),r=n[0],o=n[1];return a.useEffect((function(){t>100?o(!0):t<75&&o(!1)}),[t]),r?5e3:0},t.useStageChannelParticipantsListThrottled=function(e,t,n){var r=p(e,y,t),a=r[0],o=r[1],i=(0,f.useThrottledState)(r,n,[t[s.StageChannelParticipantNamedIndex.AUDIENCE]]),l=i[0],u=i[1],d=[a[v.Speaker],l[v.Audience]],c=[o[v.Speaker],u[v.Audience]];return[d,c]};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8),i=n(3),l=(r=n(302))&&r.__esModule?r:{default:r},u=n(1260),s=n(260),d=n(734),f=n(10999);function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n){var r=(0,i.useStateFromStores)([l.default],(function(){return[e,l.default.getParticipantsVersion(e)]}),[e],d.isVersionEqual);return a.useMemo((function(){var e=[],a=[];return t.forEach((function(t){var i,u,s;i=l.default.getMutableParticipants(r[0],t),u=n[t],s=(0,o.chunk)(i,u),a.push(s),e.push(s.length)})),[e,a]}),[r,t,n])}var v;!function(e){e[e.Speaker=0]="Speaker",e[e.Audience=1]="Audience"}(v||(v={}));var y=[s.StageChannelParticipantNamedIndex.SPEAKER,s.StageChannelParticipantNamedIndex.AUDIENCE]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useThrottledFunction=t.useThrottledState=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(8);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}var i=function(e){return e};t.useThrottledState=function(e,t,n,a){void 0===n&&(n=[]);var o=l(i,t,n,a),u=r.useRef(e);return r.useEffect((function(){var t=o(e);u.current=t}),[e,o]),0===t?e:u.current};var l=function(e,t,n,o){void 0===n&&(n=[]);var i=r.useRef((0,a.throttle)(e,t,o));return r.useEffect((function(){return i.current=(0,a.throttle)(e,t,o),function(){var e;null===(e=i.current)||void 0===e||e.cancel()}}),[e,t,o].concat(n)),i.current};t.useThrottledFunction=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=s(n(0)),i=s(n(11001)),l=(r=n(7983))&&r.__esModule?r:{default:r};function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function d(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=o.memo((function(e){var t=e.channel,n=e.participants,r=e.maxTiles;if(0===n.length)return null;for(var a=[],o=0;o<r;o++)if(o<n.length){var u=n[o];a.push(d(i.default,{channel:t,participant:u},u.id))}else a.push(d(i.AudienceEmptyTile,{},o));return d("div",{className:l.default.participants},void 0,a)}));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.AudienceEmptyTile=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(9)),i=T(n(23)),l=n(3),u=n(389),s=T(n(8479)),d=T(n(8322)),f=T(n(8264)),c=T(n(8268)),p=T(n(56)),v=T(n(61)),y=T(n(278)),m=T(n(1317)),_=T(n(5830)),h=T(n(1318)),E=T(n(24)),g=T(n(258)),S=n(304),O=n(1),I=T(n(7982));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=a.memo((function(e){var t=e.guildId,n=e.channelId,r=e.user,a=e.isPremium,o=e.isBlocked;return M("div",{className:I.default.textContainer},void 0,o?M(m.default,{className:I.default.blockedIcon,color:O.Colors.STATUS_RED}):null,M(E.default,{className:I.default.text,size:E.default.Sizes.SIZE_14,color:E.default.Colors.HEADER_PRIMARY},void 0,g.default.getName(t,n,r)),a?M(_.default,{className:I.default.boost,color:O.Colors.PREMIUM_GUILD_PINK}):null)})),A=a.memo((function(e){var t,n,r,i=e.participant,l=e.guildId,u=e.channel,s=e.isPremium,d=i.user,f=i.blocked,c=i.rtsState,p=c===S.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK,v=c===S.RequestToSpeakStates.REQUESTED_TO_SPEAK||p;return a.createElement(a.Fragment,null,M("div",{className:I.default.avatarContainer},void 0,v&&M(h.default,{className:(0,o.default)(I.default.icon,(t={},t[I.default.invited]=p,t))}),M("img",{src:null!==(n=d.getAvatarURL(u.guild_id,!1))&&void 0!==n?n:void 0,alt:d.username,"aria-label":d.username,className:(0,o.default)(I.default.avatar,(r={},r[I.default.faded]=f,r))})),M(N,{guildId:l,channelId:u.id,user:d,isPremium:s,isBlocked:f}))})),P=function(){return M("div",{className:I.default.tileBaseContainer})};t.AudienceEmptyTile=P,P.displayName="AudienceEmptyTile";var R=a.memo((function(e){var t=e.participant,n=e.channel,r=t.user,m=t.blocked,_=n.getGuildId(),h=a.useContext(s.default),E=(0,l.useStateFromStores)([p.default],(function(){var e;return null!=_&&null!=(null===(e=p.default.getMember(_,r.id))||void 0===e?void 0:e.premiumSince)}),[_,r.id]);(0,i.default)(null!=_,"Channel cannot be guildless");var g=a.useCallback((function(e){(0,u.openContextMenu)(e,(function(e){return a.createElement(d.default,b({},e,{user:r,guildId:_,channelId:n.id,popoutPosition:y.default.Positions.LEFT,showMediaItems:!0,showStageChannelItems:!0,showChatItems:!1}))}),{context:h})}),[r,_,n.id,h]),S=a.useCallback((function(e){return a.createElement(c.default,b({},e,{guildId:_,channelId:n.id,userId:r.id}))}),[n.id,_,r.id]),O=M(A,{participant:t,guildId:_,channel:n,isPremium:E});return M(y.default,{preload:function(){return(0,f.default)(r.id,r.getAvatarURL(n.guild_id))},renderPopout:S,position:y.default.Positions.RIGHT,spacing:8},void 0,(function(e){var t;return a.createElement(v.default,b({className:(0,o.default)(I.default.tileContainer,(t={},t[I.default.singleIcon]=E||m,t[I.default.doubleIcon]=E&&m,t)),onContextMenu:g},e),O)}))}));t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(24)),i=u(n(6)),l=u(n(7984));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=a.memo((function(e){var t,n=e.role,r=e.participantCount;return d("div",{className:l.default.roleContainer},void 0,d(o.default,{className:l.default.roleName,size:o.default.Sizes.SIZE_12},void 0,null!==(t=null==n?void 0:n.name)&&void 0!==t?t:i.default.Messages.AUDIENCE_LABEL,"—",r))}));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=_(n(40)),l=_(n(1317)),u=_(n(1240)),s=_(n(407)),d=_(n(1374)),f=_(n(24)),c=n(203),p=n(207),v=_(n(81)),y=_(n(6)),m=_(n(7985));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t,n=e.channel,r=e.speakerCount,_=e.audienceCount,h=e.blockedCount,g=(0,o.useStateFromStores)([v.default],(function(){return v.default.getStageInstanceByChannel(n.id)}),[n.id]),S=(null==g?void 0:g.privacy_level)===p.StageInstancePrivacyLevel.PUBLIC,O=function(e){return(0,o.useStateFromStores)([i.default],(function(){return i.default.can(c.MODERATE_STAGE_CHANNEL_PERMISSIONS,e)}),[e])?y.default.Messages.STAGE_START_PROMPT_TITLE_MODERATOR:y.default.Messages.STAGE_START_PROMPT_TITLE}(n);return E("div",{className:m.default.container},void 0,E(f.default,{size:f.default.Sizes.SIZE_20,color:f.default.Colors.HEADER_PRIMARY,className:m.default.title},void 0,null!==(t=null==g?void 0:g.topic)&&void 0!==t?t:O),E("div",{className:m.default.subtitle},void 0,E(s.default,{height:14,width:14,className:m.default.icon}),E(f.default,{color:f.default.Colors.HEADER_PRIMARY,size:f.default.Sizes.SIZE_12},void 0,y.default.Messages.SPEAKING_COUNT.format({count:r||"0"})),E(u.default,{width:14,height:14,className:m.default.iconAfterText}),E(f.default,{color:f.default.Colors.HEADER_PRIMARY,size:f.default.Sizes.SIZE_12},void 0,y.default.Messages.LISTENING_COUNT.format({count:_||"0"})),h>0?a.createElement(a.Fragment,null,E(l.default,{width:14,height:14,className:m.default.iconAfterText}),E(f.default,{color:f.default.Colors.HEADER_PRIMARY,size:f.default.Sizes.SIZE_12},void 0,y.default.Messages.BLOCKED_COUNT.format({count:h||"0"}))):null,S?a.createElement(a.Fragment,null,E("div",{className:m.default.dotSeparator}),E(d.default,{width:14,height:14,className:m.default.icon}),E(f.default,{color:f.default.Colors.HEADER_PRIMARY,size:f.default.Sizes.SIZE_12},void 0,y.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_PUBLIC_LABEL)):null))};g.displayName="StageChannelCallTopic";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(741),a=i(n(1406)),o=i(n(7986));function i(e){return e&&e.__esModule?e:{default:e}}var l=(0,a.default)(o.default.auto,o.default.fade,ResizeObserver||r.ResizeObserver);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(11006)),i=l(n(7989));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=a.memo((function(e){var t=e.channel,n=e.participants,r=e.tileWidth,a=e.tileHeight,l=e.tilesInRow,u=e.maxTilesPerRow;return s("div",{className:i.default.rowContainer},void 0,n.map((function(e,n){return s(o.default,{channel:t,participant:e,tileWidth:r,tileHeight:a,inPopout:!1,isLastItemInRow:n===l-1,twoItemsInLastRow:2===l&&l<u},e.id)})))}));t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(23)),i=n(3),l=n(389),u=n(123),s=n(691),d=g(n(688)),f=g(n(8479)),c=g(n(8322)),p=g(n(8264)),v=g(n(8268)),y=g(n(8934)),m=g(n(278)),_=g(n(205)),h=g(n(11007)),E=g(n(7988));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}var T=O(h.default,{}),C=a.memo((function(e){var t=e.participant,n=e.channel,r=e.tileWidth,h=e.tileHeight,g=e.twoItemsInLastRow,S=e.isLastItemInRow,C=a.useContext(f.default),b=a.useContext(u.AccessibilityPreferencesContext).reducedMotion,M=n.getGuildId();(0,o.default)(null!=M,"Channel cannot be guildless");var N=t.user,A=t.blocked,P=t.id,R=(0,i.useStateFromStores)([d.default],(function(){return d.default.getParticipant(n.id,N.id)}),[n.id,N.id]),L=(0,i.useStateFromStores)([_.default],(function(){return _.default.isModerator(N.id,n.id)}),[n.id,N.id]);if((null==R?void 0:R.type)!==s.ParticipantTypes.USER)return null;var D=g?r-16:r;return a.createElement(a.Fragment,null,O(m.default,{preload:null==R?void 0:function(){return(0,p.default)(R.user.id,R.user.getAvatarURL(n.guild_id))},renderPopout:function(e){return a.createElement(v.default,I({},e,{guildId:M,channelId:n.id,userId:N.id}))},position:m.default.Positions.RIGHT,spacing:8},void 0,(function(e){return O("div",{className:E.default.outerContainer,style:{width:D,height:h}},void 0,a.createElement(y.default,I({participant:null!=R?R:t,channel:n,key:P,className:E.default.tile,blocked:A,paused:!1,inCall:!0,inPopout:!1,pulseSpeakingIndicator:!b.enabled,width:r},e,{onClick:function(t,n){return e.onClick(n)},onContextMenu:function(e,t){return function(e){(0,l.openContextMenu)(e,(function(e){return a.createElement(c.default,I({},e,{user:N,guildId:M,channelId:n.id,popoutPosition:m.default.Positions.LEFT,showMediaItems:!0,showStageChannelItems:!0,showChatItems:!1}))}),{context:C})}(t)}})),L&&T)})),!S&&O("div",{style:{width:8}}))}));t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(92),i=d(n(149)),l=d(n(1417)),u=d(n(6)),s=d(n(7987));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(){return p(i.default,{text:u.default.Messages.STAGE_MODERATOR_TOOLTIP},void 0,(function(e){return a.createElement("div",c({},e,{className:s.default.container}),p(l.default,{color:o.Colors.WHITE}))}))};v.displayName="ModeratorBadge";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=ee(n(0)),o=J(n(9)),i=n(3),l=J(n(132)),u=J(n(8283)),s=J(n(9700)),d=J(n(8479)),f=J(n(9702)),c=J(n(10377)),p=J(n(11009)),v=J(n(10378)),y=J(n(8456)),m=ee(n(8253)),_=n(8256),h=J(n(9705)),E=J(n(9703)),g=n(8288),S=J(n(10372)),O=J(n(11)),I=J(n(15)),T=J(n(40)),C=J(n(29)),b=J(n(278)),M=J(n(686)),N=J(n(11010)),A=J(n(10376)),P=J(n(8368)),R=J(n(1318)),L=J(n(11011)),D=J(n(9728)),w=n(41),j=n(217),k=ee(n(248)),U=J(n(24)),G=n(748),F=n(301),B=n(1260),H=n(260),x=n(1294),V=n(203),W=J(n(205)),Y=J(n(81)),z=J(n(11012)),K=J(n(11013)),$=J(n(11014)),Z=n(1),q=J(n(6)),X=J(n(7993));function J(e){return e&&e.__esModule?e:{default:e}}function Q(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Q=function(){return e},e}function ee(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Q();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function te(){return(te=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}).apply(this,arguments)}function ne(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function re(e){var t=e.channel,n=e.appContext,r=e.isTicketedEvent;(0,z.default)(t)?(0,G.openEndStageModal)(t,n,r):l.default.disconnect()}function ae(e,t){return e?q.default.Messages.AUDIENCE_LOWER_HAND:t?q.default.Messages.AUDIENCE_RAISE_HAND_CTA:q.default.Messages.AUDIENCE_RAISE_HAND_NO_PERMISSION}var oe=a.memo((function(e){var t=e.channel,n=(0,$.default)(t),r=n[0],a=n[1],o=(0,i.useStateFromStores)([T.default],(function(){return T.default.can(Z.Permissions.REQUEST_TO_SPEAK,t)}));return ne("div",{className:X.default.container},void 0,ne(g.CenterControlButton,{className:X.default.raiseHandButton,color:r?"white":"primaryDark",label:ae(r,o),iconComponent:function(){return ne(R.default,{className:r?X.default.raisedHandButtonIconActive:X.default.raisedHandButtonIcon})},onClick:a,disabled:!o&&!r}),ne(de,{channel:t}),ne(ve,{channel:t}))})),ie={16:k.MaskIDs.CHANNEL_CALL_CONTROL_BUTTON_BADGE_16,22:k.MaskIDs.CHANNEL_CALL_CONTROL_BUTTON_BADGE_22,29:k.MaskIDs.CHANNEL_CALL_CONTROL_BUTTON_BADGE_29};var le=ne(L.default,{});function ue(e){var t=e.toggleRequestToSpeakSidebar,n=e.showRequestToSpeakSidebar;return ne(g.CenterControlButton,{className:(0,o.default)(X.default.speakerRaiseHandButton),color:n?"white":"primaryDark",label:n?q.default.Messages.REQUEST_TO_SPEAK_AREA_CLOSE:q.default.Messages.REQUEST_TO_SPEAK_AREA_OPEN,iconComponent:function(){return le},onClick:t})}ue.displayName="RequestToSpeakButton";var se=ne(P.default,{});function de(e){var t=e.channel,n=a.useContext(d.default),r=(0,i.useStateFromStores)([T.default],(function(){return T.default.can(Z.Permissions.CREATE_INSTANT_INVITE,t)})),o=(0,i.useStateFromStores)([I.default],(function(){return I.default.getGuild(t.guild_id)})),l=(0,i.useStateFromStores)([Y.default],(function(){return Y.default.getStageInstanceByChannel(t.id)})),s=r||null!=(null==l?void 0:l.invite_code);if(null==o||!s)return null;return ne(g.CenterControlButton,{className:X.default.buttonSpacing,label:q.default.Messages.INSTANT_INVITE,iconComponent:function(){return se},onClick:function(){(0,w.openModal)((function(e){return a.createElement(u.default,te({},e,{guild:o,channel:t,source:Z.InstantInviteSources.CHANNEL_CALL}))}),{},n===Z.AppContext.POPOUT?j.POPOUT_MODAL_CONTEXT:j.DEFAULT_MODAL_CONTEXT)}})}de.displayName="InviteButton";var fe=ne(A.default,{});function ce(e){var t=e.onClick;return ne(g.CenterControlButton,{className:(0,o.default)(X.default.makeMeASpeakerButton),label:q.default.Messages.MODERATOR_RAISE_OWN_HAND,iconComponent:function(){return fe},onClick:t})}ce.displayName="MakeMeASpeakerButton";var pe=ne(D.default,{height:24,width:24});function ve(e){var t=e.channel,n=e.onSelect,r=a.useContext(d.default),l=(0,y.default)(t.guild_id).canManageEvents,u=(0,i.useStateFromStores)([Y.default],(function(){return Y.default.getStageInstanceByChannel(t.id)}),[t.id]),s=null!=(null==u?void 0:u.guild_scheduled_event_id),f=O.default.getId(),c=W.default.isModerator(f,t.id);return s&&(l||c)?ne(b.default,{renderPopout:function(e){var a=e.closePopout;return ne(E.default,{},void 0,ne(m.default,{navId:"exit-options","aria-label":q.default.Messages.SET_STATUS,onClose:a,onSelect:n},void 0,ne(m.MenuItem,{id:"end-stage",color:_.MenuItemColor.DANGER,action:function(){return(0,G.openEndGuildEventConfirmationModal)(t,r)},label:q.default.Messages.END_GUILD_EVENT_FOR_EVERYONE,icon:M.default})))},align:b.default.Align.CENTER,position:b.default.Positions.TOP,animation:b.default.Animation.FADE},void 0,(function(e){var n=e.onClick;return ne(g.CenterControlButton,{className:X.default.buttonSpacing,label:q.default.Messages.EXIT_EVENT_STAGE_OPTIONS_LABEL,color:"red",iconComponent:function(){return pe},onClick:function(){return re({channel:t,appContext:r,isTicketedEvent:!0})},onPopoutClick:n})})):ne(C.default,{size:C.default.Sizes.MEDIUM,color:C.default.Colors.RED,className:(0,o.default)(X.default.buttonSpacing,X.default.leaveQuietlyButton),onClick:function(){return re({channel:t,appContext:r})}},void 0,ne("div",{className:X.default.leaveQuietlyButtonInnerContainer},void 0,ne(U.default,{color:U.default.Colors.CUSTOM},void 0,q.default.Messages.AUDIENCE_DISCONNECT),ne(D.default,{height:24,width:24,className:X.default.leaveQuietlyIcon})))}ve.displayName="ExitStageButton";var ye=ne(N.default,{});function me(e){var t=e.onClick;return ne(g.CenterControlButton,{className:(0,o.default)(X.default.audienceButton),label:q.default.Messages.MOVE_ME_TO_AUDIENCE,iconComponent:function(){return ye},onClick:t})}me.displayName="MoveToAudienceButton";var _e=a.memo((function(e){var t,n=e.channel,r=e.toggleRequestToSpeakSidebar,a=e.showRequestToSpeakSidebar,i=(0,h.default)(n),l=i.suppress,u=i.selfMute,d=i.mute,c=l||u||d,p=(0,x.useCanModerateRequestToSpeak)(n.id),v=(0,B.useStageParticipantsCount)(n.id,H.StageChannelParticipantNamedIndex.REQUESTED_TO_SPEAK_ONLY),y=(t=v)<10?16:t<100?22:29;return ne("div",{className:X.default.container},void 0,!l&&ne(me,{onClick:function(){return(0,F.moveSelfToAudience)(n)}}),p&&l&&ne(ce,{onClick:function(){return(0,F.audienceAckRequestToSpeak)(n,!1)}}),ne(b.default,{renderPopout:function(e){var t=e.closePopout;return ne(E.default,{},void 0,ne(s.default,{onClose:t,renderInputDevices:!0,renderOutputDevices:!0}))},align:b.default.Align.CENTER,position:b.default.Positions.TOP,animation:b.default.Animation.FADE},void 0,(function(e,t){var n=e.onClick;return!l&&ne(S.default,{color:c?"white":"primaryDark",centerButton:!0,onPopoutClick:n,selfMute:u,serverMute:d,suppress:l,popoutOpen:t,onClick:function(){return(0,f.default)(d,l)}})})),p?ne("div",{className:(0,o.default)(X.default.speakerRaiseHandButtonContainer,X.default.buttonSpacing)},void 0,v>0?ne(k.default,{mask:ie[y],width:56,height:56},void 0,ne(ue,{toggleRequestToSpeakSidebar:r,showRequestToSpeakSidebar:a})):ne(ue,{toggleRequestToSpeakSidebar:r,showRequestToSpeakSidebar:a}),v>0?ne(U.default,{className:X.default.speakerRaiseHandBadge,size:U.default.Sizes.SIZE_12,style:{width:y}},void 0,v>=100?"99+":v):null):null,ne(de,{channel:n}),ne(ve,{channel:n}))}));function he(e){var t=e.channel;return ne("div",{className:X.default.container},void 0,ne(ve,{channel:t}))}he.displayName="StartStageControlTray";var Ee=a.memo((function(e){var t=e.channel,n=e.toggleRequestToSpeakSidebar,r=e.showRequestToSpeakSidebar,a=e.isOnStartStageScreen,o=(0,i.useStateFromStores)([Y.default],(function(){return Y.default.getStageInstanceByChannel(t.id)}),[t.id]),l=(0,K.default)(t.id),u=(0,x.useCanModerateRequestToSpeak)(t.id),s=(0,i.useStateFromStores)([T.default],(function(){return T.default.can(V.MODERATE_STAGE_CHANNEL_PERMISSIONS,t)}),[t]),d=t.guild_id,f=(0,y.default)(d),m=f.canManageEvents,_=f.canStartEvents,h=null==o;return a?ne(he,{channel:t}):l||u?ne("div",{className:X.default.containerColumn},void 0,ne("div",{className:X.default.eventPrompts},void 0,_&&ne(p.default,{guildId:d}),h&&s&&ne(v.default,{channel:t}),m&&_&&ne(c.default,{channel:t})),ne(_e,{channel:t,toggleRequestToSpeakSidebar:n,showRequestToSpeakSidebar:r})):ne(oe,{channel:t})}));t.default=Ee},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.guildId,n=(0,d.default)(t),r=(0,i.default)();if(n.length<1)return null;function l(){}return a.createElement(a.Fragment,null,_(u.default,{muted:!0,uppercase:!0,size:u.default.Sizes.SIZE_12},void 0,p.default.Messages.START_SCHEDULED_EVENT),n.map((function(e){var t=e.id,n=e.name,a=e.scheduled_start_time;return _(f.default,{icon:h,color:r===c.ThemeTypes.DARK?c.Colors.PRIMARY_DARK_700:c.Colors.PRIMARY_LIGHT_200,title:n,description:(0,s.calendarFormat)((0,o.default)(a)),onClick:l},t)})),_("hr",{className:v.default.separator}))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(5)),i=y(n(1166)),l=y(n(8455)),u=y(n(47)),s=n(1161),d=y(n(8572)),f=y(n(9162)),c=n(1),p=y(n(6)),v=y(n(7992));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_(l.default,{height:20,width:20})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?22:t,r=e.height,a=void 0===r?20:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 22 20"}),s("path",{d:"M19.0013 3.27074L16.8648 1.13516L18 0L22 4L18 8L16.8648 6.86484L19.0013 4.72926H14V3.27074H19.0013Z",fill:d}),s("path",{d:"M13.9829 8.45686C14.4834 8.90823 15.0602 9.2765 15.6918 9.53993C15.1979 10.7194 14.1545 11.6141 12.8834 11.9017C12.8022 11.8683 12.7203 11.8358 12.6378 11.8042C13.3982 10.8786 13.8873 9.72194 13.9829 8.45686Z",fill:d}),s("path",{d:"M12 8C12 10.205 10.206 12 8 12C5.795 12 4 10.205 4 8C4 5.795 5.794 4 8 4C10.206 4 12 5.795 12 8Z",fill:d}),s("path",{d:"M0 19C0 15.467 3.29 13 8 13C12.711 13 16 15.467 16 19V20H0V19Z",fill:d}),s("path",{d:"M20.0001 20H18.0001V19C18.0001 16.7999 17.0621 14.9067 15.5213 13.5292C18.2697 14.4355 20.0001 16.4373 20.0001 19V20Z",fill:d}))}d.displayName="GoToAudience"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{clipPath:"url(#clip0)"},void 0,s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.53 7.76998C20.455 7.60998 20.31 7.48998 20.135 7.44498C20.075 7.42832 20.0106 7.41165 19.9462 7.39498L19.85 7.36998C19.305 7.22998 18.635 7.56498 18.35 8.11498L17.37 9.99998C17.085 10.55 16.725 10.51 16.57 9.90998L14.395 1.38498C14.24 0.779981 13.64 0.459981 13.05 0.664981C12.46 0.869981 12.095 1.52498 12.225 2.13498L13.495 7.95998C13.63 8.56998 13.575 9.11498 13.375 9.18498C13.175 9.25498 12.85 8.83498 12.65 8.24498L10.55 2.07498C10.35 1.48498 9.71004 1.17498 9.12004 1.37998C8.53004 1.58498 8.21504 2.22998 8.41004 2.81998L10.47 8.99998C10.665 9.58998 10.665 10.125 10.465 10.195C10.265 10.265 9.88504 9.86498 9.62504 9.29998L7.27504 4.29998C7.01004 3.73998 6.32004 3.44498 5.73004 3.64998C5.14504 3.85498 4.87504 4.47498 5.14004 5.03998L8.10004 11.045C8.36004 11.61 8.41004 12.125 8.21004 12.195C8.01004 12.265 7.53004 11.93 7.14004 11.445L5.10504 8.82498C4.71504 8.33998 4.04004 8.07498 3.59504 8.22998C3.15504 8.38498 3.04004 8.94498 3.34504 9.48998L5.84504 13.865C5.90004 14.02 7.35504 16.8 7.46004 16.915C8.50004 18.565 10.145 19.51 12.23 18.79L12.96 18.5372V15.84C12.96 14.2494 14.2494 12.96 15.84 12.96H18.3887C18.763 12.143 19.1735 11.2467 19.5492 10.4262L19.5592 10.4045L19.5647 10.3926L19.5648 10.3922L19.5702 10.3804L19.581 10.3569C19.9595 9.53048 20.3003 8.78624 20.53 8.28498C20.605 8.11498 20.605 7.92998 20.53 7.76998ZM11.81 20.51L12.96 20.0792V23.395H11.815L11.185 22.03C11.055 21.75 11.045 21.425 11.165 21.135C11.285 20.845 11.52 20.62 11.81 20.51ZM14.4 16.32C14.4 15.2596 15.2596 14.4 16.32 14.4H22.08C23.1404 14.4 24 15.2596 24 16.32V22.08C24 23.1404 23.1404 24 22.08 24H16.32C15.2596 24 14.4 23.1404 14.4 22.08V16.32ZM16.32 16.56H22.08V17.52H16.32V16.56ZM22.08 18.72H16.32V19.68H22.08V18.72ZM16.32 20.88H22.08V21.84H16.32V20.88Z",fill:d})),s("defs",{},void 0,s("clipPath",{id:"clip0"},void 0,s("rect",{width:"24",height:"24",fill:d}))))}d.displayName="RaisedHandList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e.isGuildStageVoice())return!1;if(!l.default.isLive(e.id))return!1;var t=r.default.getId();if(!i.default.isModerator(t,e.id))return!1;var n=a.default.getMutableParticipants(e.id,o.StageChannelParticipantNamedIndex.MODERATOR);if(n.length<=1)return!0;if(!i.default.isSpeaker(t,e.id))return!1;return n.filter((function(e){return e.id!==t&&e.speaker})).length<=0};var r=u(n(11)),a=u(n(302)),o=n(260),i=u(n(205)),l=u(n(81));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,a.useStateFromStores)([o.default],(function(){return o.default.getId()}));return(0,i.default)(t,e)===i.RequestToSpeakStates.ON_STAGE};var r,a=n(3),o=(r=n(11))&&r.__esModule?r:{default:r},i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(304));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,o.useStateFromStores)([i.default],(function(){return i.default.getId()})),n=(0,u.default)(t,e.id),r=n===u.RequestToSpeakStates.REQUESTED_TO_SPEAK||n===u.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK,s=a.useState(r),d=s[0],f=s[1];return a.useEffect((function(){f(r)}),[r]),[d,function(){n===u.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK?(0,l.audienceAckRequestToSpeak)(e,!0):(0,l.toggleRequestToSpeak)(e,!d);f(!d)}]};var r,a=d(n(0)),o=n(3),i=(r=n(11))&&r.__esModule?r:{default:r},l=n(301),u=d(n(304));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=E(n(29)),l=E(n(1261)),u=E(n(11016)),s=E(n(1318)),d=E(n(9728)),f=n(35),c=E(n(47)),p=E(n(24)),v=n(207),y=E(n(81)),m=E(n(6)),_=E(n(7994)),h=E(n(11017));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}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}).apply(this,arguments)}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var I=function(e){var t=e.text,n=e.icon,r=e.foreground;return O("div",{className:_.default.bulletContainer},void 0,O("div",{className:_.default.iconContainer},void 0,O(n,{foreground:r,className:_.default.bulletIcon,height:40,width:40})),O(p.default,{size:p.default.Sizes.SIZE_16,color:p.default.Colors.HEADER_SECONDARY,className:_.default.bulletText},void 0,t))};function T(e){var t=e.channelId,n=e.transitionState,r=e.onClose,E=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["channelId","transitionState","onClose"]),g=(0,o.useStateFromStores)([y.default],(function(){return y.default.getStageInstanceByChannel(t)}),[t]),T=(null==g?void 0:g.privacy_level)===v.StageInstancePrivacyLevel.PUBLIC;return a.createElement(f.ModalRoot,S({transitionState:n,"aria-labelledby":m.default.Messages.START_STAGE_CHANNEL_EVENT_MODAL_TITLE},E,{size:f.ModalSize.SMALL}),O("div",{className:_.default.content},void 0,O("img",{src:h.default,alt:m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_ALT_TEXT,className:_.default.illustration}),O(c.default,{size:p.default.Sizes.SIZE_24,color:p.default.Colors.HEADER_PRIMARY,className:_.default.headerTitle},void 0,m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_TITLE),O(I,{text:m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_BULLET_1,icon:l.default,foreground:_.default.red}),O(I,{text:m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_BULLET_2,icon:d.default}),O(I,{text:m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_BULLET_3,icon:s.default}),T?O(I,{text:m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_BULLET_4,icon:u.default}):null,O(i.default,{color:i.default.Colors.BRAND,className:_.default.button,onClick:r},void 0,m.default.Messages.STAGE_CHANNEL_AUDIENCE_MODAL_ACTION)))}I.displayName="BulletItem",T.displayName="StageChannelWelcomeModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("g",{fill:"none",className:f},void 0,s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C12.4883 22 12.9684 21.965 13.438 21.8974C12.5414 20.8489 12 19.4877 12 18C12 17.6593 12.0284 17.3252 12.083 17H6V16.0244C6 14.0732 10 13 12 13C12.6215 13 13.436 13.1036 14.2637 13.305C15.2888 12.4882 16.5874 12 18 12C19.4877 12 20.8489 12.5414 21.8974 13.438C21.965 12.9684 22 12.4883 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM12 12C13.66 12 15 10.66 15 9C15 7.34 13.66 6 12 6C10.34 6 9 7.34 9 9C9 10.66 10.34 12 12 12Z",fill:d}),s("path",{d:"M18 22C20.2091 22 22 20.2091 22 18C22 15.7909 20.2091 14 18 14C15.7909 14 14 15.7909 14 18C14 20.2091 15.7909 22 18 22Z",fill:d})))}d.displayName="PersonStatus"},function(e,t,n){e.exports=n.p+"3916d20766c07e85e8ff8705d3403c0c.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContinuePrompt=A,t.default=L;M(n(0));var r,a=C(n(5)),o=n(3),i=n(8572),l=C(n(9162)),u=C(n(10377)),s=C(n(10378)),d=C(n(8456)),f=C(n(11)),c=C(n(40)),p=C(n(8455)),v=C(n(291)),y=C(n(47)),m=C(n(24)),_=M(n(8393)),h=n(1161),E=n(1260),g=n(203),S=C(n(308)),O=n(1),I=C(n(6)),T=C(n(7995));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e){var t=e.onClick;return N(l.default,{iconContainerClassName:T.default.continueIconContainer,icon:N(v.default,{className:T.default.continueIcon,height:20,width:20}),color:O.Colors.PRIMARY_DARK_700,title:I.default.Messages.STAGE_CONTINUE_PROMPT_TITLE,description:I.default.Messages.STAGE_CONTINUE_PROMPT_SUBTITLE,onClick:t})}function P(e){var t=e.channel,n=(0,E.useStageParticipants)(t.id),r=(0,o.useStateFromStores)([f.default],(function(){return f.default.getId()}),[]),a=n.filter((function(e){return e.user.id!==r}));if(a.length<=0)return null;var i=a.slice(0,3);return N("div",{className:T.default.audienceSummary},void 0,N(_.default,{className:T.default.summaryItem,guildId:t.guild_id,users:i.map((function(e){return e.user})),size:_.Sizes.SIZE_16}),N(m.default,{size:m.default.Sizes.SIZE_14,color:m.default.Colors.HEADER_SECONDARY},void 0,function(e){if(0===e.length)return"";if(1===e.length)return I.default.Messages.STAGE_AUDIENCE_WAITING_ONE.format({first:e[0].userNick});if(2===e.length)return I.default.Messages.STAGE_AUDIENCE_WAITING_TWO.format({first:e[0].userNick,second:e[1].userNick});var t=e.length-2;return I.default.Messages.STAGE_AUDIENCE_WAITING_MANY.format({first:e[0].userNick,second:e[1].userNick,numOthers:t})}(a)))}A.displayName="ContinuePrompt",P.displayName="AudienceSummary";var R=N(p.default,{height:20,width:20});function L(e){var t=e.channel,n=e.onContinueClick,r=(0,i.useGuildChannelStageEvents)(t.guild_id,t.id),f=(0,o.useStateFromStores)([c.default],(function(){return c.default.can(g.MODERATE_STAGE_CHANNEL_PERMISSIONS,t)}),[t]),p=t.guild_id,_=(0,d.default)(p),E=_.canManageEvents,C=_.canStartEvents;function b(){}return N("div",{className:T.default.container},void 0,N(S.default,{},void 0,N("div",{className:T.default.iconBackground},void 0,N(v.default,{width:40,height:40,className:T.default.icon}))),N("div",{className:T.default.headerContainer},void 0,N(y.default,{className:T.default.title,size:y.default.Sizes.SIZE_24},void 0,I.default.Messages.STAGE_START_PROMPT_TITLE_MODERATOR),N(m.default,{className:T.default.subtitle,size:m.default.Sizes.SIZE_14},void 0,I.default.Messages.STAGE_START_PROMPT_SUBTITLE)),C?r.map((function(e){var t=e.id,n=e.name,r=e.scheduled_start_time;return N(l.default,{className:T.default.eventPrompt,icon:R,color:O.Colors.STATUS_GREEN_600,title:n,description:(0,h.calendarFormat)((0,a.default)(r)),onClick:b},t)})):null,f?N(s.default,{className:T.default.eventPrompt,channel:t}):null,E&&C?N(u.default,{className:T.default.eventPrompt,channel:t}):null,N("hr",{className:T.default.separator}),N(A,{onClick:n}),N(P,{channel:t}))}L.displayName="StartStageChannelCallView"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(273)),a=s(n(2)),o=s(n(216)),i=n(1404),l=s(n(5952)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=new(function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleMainWindowFocus=function(e){e.focused&&t.injectWindowAnimationFrame(window)},t.handlePopoutWindowChange=function(){var e=l.default.getWindowKeys().find((function(e){return l.default.getWindowFocused(e)}));if(null==e)return t.injectWindowAnimationFrame(window);var n=l.default.getWindow(e);if(null==n||n.closed)return t.injectWindowAnimationFrame(window);t.injectWindowAnimationFrame(n)},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var s=o.prototype;return s._initialize=function(){l.default.addChangeListener(this.handlePopoutWindowChange),a.default.subscribe(u.ActionTypes.WINDOW_FOCUS,this.handleMainWindowFocus)},s._terminate=function(){l.default.removeChangeListener(this.handlePopoutWindowChange),a.default.unsubscribe(u.ActionTypes.WINDOW_FOCUS,this.handleMainWindowFocus),this.injectWindowAnimationFrame(window)},s.injectWindowAnimationFrame=function(e){var t=function(t){return e.requestAnimationFrame(t)},n=function(t){return e.cancelAnimationFrame(t)};r.default.inject.RequestAnimationFrame(t),r.default.inject.CancelAnimationFrame(n),i.frameLoop.setRAF(t,n)},o}(o.default));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(2)),a=l(n(216)),o=n(9729),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var l=a.prototype;return l._initialize=function(){r.default.subscribe(i.ActionTypes.CONNECTION_OPEN,this.maybeFetchActiveOutboundPromotions)},l._terminate=function(){r.default.unsubscribe(i.ActionTypes.CONNECTION_OPEN,this.maybeFetchActiveOutboundPromotions)},l.maybeFetchActiveOutboundPromotions=function(e){e.user.premium_type===i.PremiumTypes.TIER_2&&(0,o.fetchActiveOutboundPromotions)()},a}(a.default));t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromotionPreviewExperiment=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_preview_promotions",label:"Promotions Preview",defaultConfig:{previewEnabled:!1},treatments:[{id:1,label:"Preview Enabled",config:{previewEnabled:!0}}]});t.PromotionPreviewExperiment=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(11023)),i=n(1);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){e.relationship.type===i.RelationshipTypes.PENDING_INCOMING&&o.showPendingNotification(e.relationship.user)}function s(e){var t=e.user;o.showAcceptedNotification(t)}var d={init:function(){a.default.subscribe(i.ActionTypes.RELATIONSHIP_ADD,u),a.default.subscribe(i.ActionTypes.FRIEND_REQUEST_ACCEPTED,s)}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showPendingNotification=function(e){f(e,s.default.Messages.NOTIFICATION_PENDING_FRIEND_REQUEST,(function(){(0,i.transitionTo)(u.Routes.FRIENDS),a.default.setSection(u.FriendsSections.PENDING)}))},t.showAcceptedNotification=function(e){f(e,s.default.Messages.NOTIFICATION_ACCEPTED_FRIEND_REQUEST,(function(){r.default.openPrivateChannel(e.id)}))};var r=d(n(391)),a=d(n(8765)),o=d(n(5848)),i=n(42),l=d(n(150)),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){o.default.showNotification(l.default.getUserAvatarURL(e),e.username,t,{tag:e.id,onClick:n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=R(n(8)),a=n(3),o=n(34),i=R(n(2)),l=R(n(10)),u=R(n(56)),s=R(n(1269)),d=R(n(8968)),f=R(n(51)),c=R(n(376)),p=R(n(256)),v=R(n(94)),y=R(n(70)),m=R(n(36)),_=R(n(8415)),h=R(n(12)),E=R(n(80)),g=R(n(13)),S=n(48),O=R(n(16)),I=R(n(43)),T=R(n(11025)),C=R(n(11049)),b=n(8452),M=R(n(772)),N=R(n(1304)),A=R(n(10356)),P=n(1);function R(e){return e&&e.__esModule?e:{default:e}}function L(e){var t,n,r;e.type===P.ActionTypes.MESSAGE_CREATE&&function(e){var t=e.channelId,n=e.message,r=n.application,a=n.activity;if(null==r||null==a||null==a.party_id)return;var o=h.default.getUser(n.author.id);if(null==o)return;var i=h.default.getCurrentUser();if(o.id===i.id)return;var l=a.type===P.ActivityActionTypes.JOIN_REQUEST?p.default.getApplicationActivity(i.id,r.id):p.default.getApplicationActivity(o.id,r.id);if(null==l||null==l.party||l.party.id!==a.party_id)return;var u=l.application_id;switch(a.type){case P.ActivityActionTypes.JOIN:M.default.dispatchToSubscriptions(P.RPCEvents.ACTIVITY_INVITE,(function(e){return e.socket.application.id===u}),{user:(0,N.default)(o),activity:l,type:a.type,channel_id:t,message_id:n.id});break;case P.ActivityActionTypes.JOIN_REQUEST:M.default.dispatchToSubscriptions(P.RPCEvents.ACTIVITY_JOIN_REQUEST,(function(e){return e.socket.application.id===u}),{user:(0,N.default)(o)})}}(e);var a=null;switch(e.type){case P.ActionTypes.MESSAGE_CREATE:if("SENDING"===e.message.state)return;t=P.RPCEvents.MESSAGE_CREATE,n=e.channelId,r=e.message,a=""+t+e.message.id;break;case P.ActionTypes.MESSAGE_UPDATE:t=P.RPCEvents.MESSAGE_UPDATE,n=e.message.channel_id,r=e.message;break;case P.ActionTypes.MESSAGE_DELETE:t=P.RPCEvents.MESSAGE_DELETE,n=e.channelId,r={id:e.id},a=""+t+e.id;break;default:return(0,S.assertNever)(e)}n&&M.default.dispatchToSubscriptions(t,{channel_id:n},{channel_id:n,message:(0,b.transformInternalTextMessage)(r)},a)}var D={loadServer:function(){O.default.embedded&&I.default.ensureModule("discord_rpc").then((function(){for(var e=0,t=[n(11050).default,n(11051).default];e<t.length;e++){var r=t[e];M.default.registerTransport(r)}})),M.default.registerTransport(A.default);for(var e=0,t=Object.entries(T.default);e<t.length;e++){var r=t[e],a=r[0],o=r[1];M.default.setCommandHandler(a,o)}for(var i=0,l=Object.entries(C.default);i<l.length;i++){var u=l[i],s=u[0],d=u[1];M.default.setEventHandler(s,d)}},init:function(){M.default.getCurrentUser=function(){return h.default.getNullableCurrentUser()},M.default.onConnect=function(e){i.default.dirtyDispatch({type:P.ActionTypes.RPC_APP_CONNECTED,socketId:e.id,application:e.application}),g.default.track(P.AnalyticEvents.AUTHORIZED_APP_CONNECTED,{app_id:e.application.id,transport:e.transport})},M.default.onDisconnect=function(e,t){i.default.dirtyDispatch({type:P.ActionTypes.RPC_APP_DISCONNECTED,socketId:e.id,application:e.application,reason:t})},new a.BatchedStoreListener([l.default,u.default,p.default,E.default,f.default,v.default,c.default],(function(){return M.default.updateSubscriptions()})).attach("RPCServerManager"),i.default.subscribe(P.ActionTypes.MESSAGE_CREATE,(function(e){return L(e)})),i.default.subscribe(P.ActionTypes.MESSAGE_UPDATE,(function(e){return L(e)})),i.default.subscribe(P.ActionTypes.MESSAGE_DELETE,(function(e){return L(e)})),i.default.subscribe(P.ActionTypes.SPEAKING,(function(e){return function(e){var t=e.speakingFlags?P.RPCEvents.SPEAKING_START:P.RPCEvents.SPEAKING_STOP;if(e.context===o.MediaEngineContextTypes.DEFAULT){var n=m.default.getVoiceChannelId();if(null!=n){var r=l.default.getChannel(n);if(null==r)return;var a=E.default.getVoiceState(r.getGuildId(),e.userId);if(null==a)return;M.default.dispatchToSubscriptions(t,{channel_id:a.channelId},{channel_id:a.channelId,user_id:e.userId})}}else d.default.getLobbyIdsForUser(e.userId).forEach((function(n){var r=s.default.getLobby(n);null!=r&&r.application_id===e.context&&M.default.dispatchToSubscriptions(t,{},{lobby_id:n,user_id:e.userId})}))}(e)})),i.default.subscribe(P.ActionTypes.OAUTH2_TOKEN_REVOKE,(function(e){return t=e.accessToken,void M.default.sockets.forEach((function(e){e.authorization.accessToken===t&&e.close(P.RPCCloseCodes.TOKEN_REVOKED,"Token revoked")}));var t})),i.default.subscribe(P.ActionTypes.GUILD_CREATE,(function(e){return function(e){var t=e.guild,n=t.id,r=t.name;M.default.dispatchToSubscriptions(P.RPCEvents.GUILD_CREATE,{},{id:n,name:r})}(e)})),i.default.subscribe(P.ActionTypes.CHANNEL_CREATE,(function(e){return function(e){var t=e.channel,n=t.id,r=t.name,a=t.type;M.default.dispatchToSubscriptions(P.RPCEvents.CHANNEL_CREATE,{},{id:n,name:r,type:a})}(e)})),i.default.subscribe(P.ActionTypes.LOGOUT,(function(){M.default.sockets.forEach((function(e){return e.close(P.RPCCloseCodes.CLOSE_NORMAL,"User logout")}))})),i.default.subscribe(P.ActionTypes.VOICE_CHANNEL_SELECT,(function(e){return n=(t=e).guildId,r=t.channelId,void M.default.dispatchToSubscriptions(P.RPCEvents.VOICE_CHANNEL_SELECT,{},{channel_id:r,guild_id:n});var t,n,r})),i.default.subscribe(P.ActionTypes.RPC_NOTIFICATION_CREATE,(function(e){return n=(t=e).channelId,r=t.message,a=t.icon,o=t.title,i=t.body,void M.default.dispatchToSubscriptions(P.RPCEvents.NOTIFICATION_CREATE,{},{channel_id:n,message:(0,b.transformInternalTextMessage)(r),icon_url:null!=a?(0,b.getRemoteIconURL)(a):null,title:o,body:i});var t,n,r,a,o,i})),i.default.subscribe(P.ActionTypes.ACTIVITY_JOIN,(function(e){return n=(t=e).applicationId,r=t.secret,a=t.intent,o={secret:r},t.embedded&&(o.intent=a),M.default.dispatchToSubscriptions(P.RPCEvents.ACTIVITY_JOIN,(function(e){return e.socket.application.id===n}),o),void M.default.dispatchToSubscriptions(P.RPCEvents.GAME_JOIN,(function(e){return e.socket.application.id===n}),o);var t,n,r,a,o})),i.default.subscribe(P.ActionTypes.RELATIONSHIP_ADD,(function(e){return t=e.relationship,n=t.id,r=t.type,void M.default.dispatchToSubscriptions(P.RPCEvents.RELATIONSHIP_UPDATE,{},(0,b.transformRelationship)(r,n));var t,n,r})),i.default.subscribe(P.ActionTypes.RELATIONSHIP_REMOVE,(function(e){return t=e.relationship.id,void M.default.dispatchToSubscriptions(P.RPCEvents.RELATIONSHIP_UPDATE,{},(0,b.transformRelationship)(P.RelationshipTypes.NONE,t));var t})),i.default.subscribe(P.ActionTypes.PRESENCE_UPDATE,(function(e){return function(e){var t=e.guildId,n=e.user.id;if(null==t){var r=y.default.getRelationshipType(n);r===P.RelationshipTypes.NONE&&_.default.getUserAffinitiesUserIds().has(n)&&(r=P.RelationshipTypes.IMPLICIT),r!==P.RelationshipTypes.NONE&&M.default.dispatchToSubscriptions(P.RPCEvents.RELATIONSHIP_UPDATE,{},(0,b.transformRelationship)(r,n))}}(e)})),i.default.subscribe(P.ActionTypes.PRESENCES_REPLACE,(function(){r.default.forEach(y.default.getRelationships(),(function(e,t){M.default.dispatchToSubscriptions(P.RPCEvents.RELATIONSHIP_UPDATE,{},(0,b.transformRelationship)(e,t))}))})),i.default.subscribe(P.ActionTypes.LOBBY_UPDATE,(function(e){return t=e.lobby,void M.default.dispatchToSubscriptions(P.RPCEvents.LOBBY_UPDATE,{},t);var t})),i.default.subscribe(P.ActionTypes.LOBBY_DELETE,(function(e){return t=e.lobbyId,void M.default.dispatchToSubscriptions(P.RPCEvents.LOBBY_DELETE,{},{id:t});var t})),i.default.subscribe(P.ActionTypes.LOBBY_MEMBER_CONNECT,(function(e){return n=(t=e).lobbyId,r=t.member,void M.default.dispatchToSubscriptions(P.RPCEvents.LOBBY_MEMBER_CONNECT,{},{lobby_id:n,member:r});var t,n,r})),i.default.subscribe(P.ActionTypes.LOBBY_MEMBER_UPDATE,(function(e){return n=(t=e).lobbyId,r=t.member,void M.default.dispatchToSubscriptions(P.RPCEvents.LOBBY_MEMBER_UPDATE,{},{lobby_id:n,member:r});var t,n,r})),i.default.subscribe(P.ActionTypes.LOBBY_MEMBER_DISCONNECT,(function(e){return n=(t=e).lobbyId,r=t.member,void M.default.dispatchToSubscriptions(P.RPCEvents.LOBBY_MEMBER_DISCONNECT,{},{lobby_id:n,member:r});var t,n,r})),i.default.subscribe(P.ActionTypes.LOBBY_MESSAGE,(function(e){return n=(t=e).lobbyId,r=t.senderId,a=t.data,void M.default.dispatchToSubscriptions(P.RPCEvents.LOBBY_MESSAGE,{},{lobby_id:n,sender_id:r,data:a});var t,n,r,a})),i.default.subscribe(P.ActionTypes.ENTITLEMENT_CREATE,(function(e){return t=e.entitlement,void M.default.dispatchToSubscriptions(P.RPCEvents.ENTITLEMENT_CREATE,(function(e){return e.socket.application.id===t.application_id}),{entitlement:t});var t})),i.default.subscribe(P.ActionTypes.ENTITLEMENT_DELETE,(function(e){return t=e.entitlement,void M.default.dispatchToSubscriptions(P.RPCEvents.ENTITLEMENT_DELETE,(function(e){return e.socket.application.id===t.application_id}),{entitlement:t});var t})),i.default.subscribe(P.ActionTypes.USER_ACHIEVEMENT_UPDATE,(function(e){return t=e.userAchievement,n=t.application_id,void M.default.dispatchToSubscriptions(P.RPCEvents.USER_ACHIEVEMENT_UPDATE,(function(e){return e.socket.application.id===n}),{user_achievement:t});var t,n}))}};t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=O(n(11026)),a=O(n(11028)),o=O(n(11029)),i=O(n(11031)),l=O(n(11032)),u=O(n(11034)),s=O(n(11035)),d=O(n(11036)),f=O(n(11037)),c=O(n(11038)),p=O(n(11040)),v=O(n(11041)),y=O(n(11042)),m=O(n(11043)),_=O(n(11044)),h=O(n(11045)),E=O(n(11046)),g=O(n(11047)),S=O(n(11048));function O(e){return e&&e.__esModule?e:{default:e}}function I(){return(I=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}).apply(this,arguments)}var T=I({},r.default,{},a.default,{},o.default,{},i.default,{},l.default,{},u.default,{},s.default,{},d.default,{},f.default,{},y.default,{},c.default,{},p.default,{},v.default,{},m.default,{},h.default,{},E.default,{},S.default,{},_.default,{},g.default);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=s(n(11027)),l=s(n(689)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}var d=((o={})[u.RPCCommands.SET_USER_ACHIEVEMENT]={scope:(r={},r[u.RPC_SCOPE_CONFIG.ANY]=[u.OAuth2Scopes.RPC,u.RPC_LOCAL_SCOPE],r),validation:function(e){return e.object().required().keys({achievement_id:e.string().min(2).max(128),percent_complete:e.number().min(0).max(100).required()})},handler:function(e){var t=e.socket,n=e.args,r=n.achievement_id,a=n.percent_complete,o=t.application.id;if(null==o)throw new l.default(u.RPCErrors.INVALID_COMMAND,"No application.");return i.default.setUserAchievement(o,r,a).catch((function(e){var t=e.status,n=e.body;switch(t){case 429:throw new l.default(u.RPCErrors.RATE_LIMITED,"You are being rate limited.");case 403:throw null!=n&&n.code===u.AbortCodes.USER_NOT_AUTHORIZED_FOR_APPLICATION?new l.default(u.RPCErrors.UNAUTHORIZED_FOR_ACHIEVEMENT,"Not authorized to update this achievement."):new l.default(u.RPCErrors.UNKNOWN_ERROR,"Unknown error from API. status="+t+".");default:throw new l.default(u.RPCErrors.UNKNOWN_ERROR,"Unknown error from API. status="+t+".")}})).then((function(){return null}))}},o[u.RPCCommands.GET_USER_ACHIEVEMENTS]={scope:(a={},a[u.RPC_SCOPE_CONFIG.ANY]=[u.OAuth2Scopes.RPC,u.RPC_LOCAL_SCOPE],a),handler:function(e){var t=e.socket.application.id;if(null==t)throw new l.default(u.RPCErrors.INVALID_COMMAND,"No application.");return i.default.fetchForApplication(t).then((function(e){return e||[]}))}},o);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(11)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={setUserAchievement:function(e,t,n){var i=a.default.getId();return r.default.put({url:o.Endpoints.USER_ACHIEVEMENTS_FOR_USER(i,e,t),body:{percent_complete:n},oldFormErrors:!0})},fetchForApplication:function(e){return r.default.get({url:o.Endpoints.USER_ACHIEVEMENTS(e),retries:1,oldFormErrors:!0}).then((function(e){return e.body}))}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u,s,d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),f=j(n(8)),c=j(n(2)),p=j(n(1234)),v=n(8787),y=j(n(478)),m=n(8321),_=j(n(8283)),h=j(n(1365)),E=j(n(5952)),g=j(n(10)),S=j(n(15)),O=j(n(1255)),I=j(n(40)),T=j(n(36)),C=j(n(479)),b=n(41),M=n(217),N=j(n(13)),A=n(409),P=n(8286),R=n(733),L=j(n(689)),D=n(8452),w=n(1);function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(){return(U=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}).apply(this,arguments)}function G(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function F(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){G(o,r,a,i,l,"next",e)}function l(e){G(o,r,a,i,l,"throw",e)}i(void 0)}))}}var B=["349134787773988865"];function H(e,t,n,r,a){return x.apply(this,arguments)}function x(){return(x=F(regeneratorRuntime.mark((function e(t,n,r,a,o){var i,l,u,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===o&&(o=""),null!=(i=O.default.getApplicationActivity(n))&&null!=i.secrets&&(0,D.validateActivityInvite)(a,i.party,i.secrets)){e.next=4;break}throw new L.default(w.RPCErrors.NO_ELIGIBLE_ACTIVITY,"No eligible activity for application. Ensure an activity includes a party and appropriate secret.");case 4:if(!(l=(0,h.default)(i,C.default))){e.next=8;break}return u=(0,D.unlockOverlay)(t),s=u.lock,e.abrupt("return",(0,v.openModal)(i,l).then((function(){throw s(),new L.default(w.RPCErrors.NO_ELIGIBLE_ACTIVITY,"No eligible activity for application. Ensure user does have have privacy enabled.")})));case 8:return e.next=10,p.default.sendActivityInviteUser({userId:r,type:a,activity:i,content:o,location:"In-Game Invite"});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var V=((s={})[w.RPCCommands.SET_ACTIVITY]={scope:(r={},r[w.RPC_SCOPE_CONFIG.ANY]=[w.OAuth2Scopes.RPC,w.OAuth2Scopes.RPC_ACTIVITIES_WRITE,w.RPC_LOCAL_SCOPE],r),validation:function(e){return e.object().required().keys({pid:e.number().min(0),activity:e.object().keys({state:e.string().min(2).max(128),details:e.string().min(2).max(128),timestamps:e.object().keys({start:e.number().min(1),end:e.number().min(1)}),assets:e.object().keys({large_image:e.string().min(1).max(32),large_text:e.string().min(2).max(128),small_image:e.string().min(1).max(32),small_text:e.string().min(2).max(128)}),party:e.object().keys({id:e.string().min(2).max(128),size:e.array().items(e.number().min(1)).length(2),privacy:e.number().default(w.ActivityPartyPrivacy.PRIVATE).valid([w.ActivityPartyPrivacy.PRIVATE,w.ActivityPartyPrivacy.PUBLIC])}),secrets:e.object().keys({match:e.string().min(2).max(128),join:e.string().min(2).max(128),spectate:e.string().min(2).max(128)}),game_session_id:e.string().max(128),buttons:e.array().items(e.object().keys({label:e.string().min(1).max(32).required(),url:e.string().uri().min(1).max(512).required()})).min(1).max(2),instance:e.boolean(),supported_platforms:e.array().items(e.string().min(1).max(32)).min(1).max(3),type:e.number().default(w.ActivityTypes.PLAYING).valid(w.ActivityTypes.PLAYING,w.ActivityTypes.WATCHING)}).allow(null)})},handler:function(e){var t,n=e.socket,r=e.args,a=r.pid,o=r.activity;if(![w.TransportTypes.IPC,w.TransportTypes.WEBSOCKET,w.TransportTypes.POST_MESSAGE].includes(n.transport))throw new L.default(w.RPCErrors.INVALID_COMMAND,'command not available from "'+n.transport+'" transport');if(null==a&&w.TransportTypes.IPC===n.transport)throw new L.default(w.RPCErrors.INVALID_COMMAND,"nonzero pid required");if(null==o)return c.default.dispatch({type:w.ActionTypes.LOCAL_ACTIVITY_UPDATE,socketId:n.id,pid:a,activity:o}),Promise.resolve(o);o.name=n.application.name,o.application_id=n.application.id;var i=n.transport===w.TransportTypes.POST_MESSAGE,l=(0,D.computeActivityFlags)(o,i);l>0&&(o.flags=l),delete o.instance,null===(t=o.party)||void 0===t||delete t.privacy;var u=o.game_session_id;delete o.game_session_id;var s,d=o.assets,p=o.party,v=o.secrets,y=o.timestamps,m=o.buttons,_=o.type;if((null==_||_!==w.ActivityTypes.PLAYING&&!i)&&(o.type=w.ActivityTypes.PLAYING),null!=v){var h=f.default.values(v).filter((function(e){return!!e}));if(null!=p&&f.default.intersection(h,[p.id]).length>0&&!B.includes(n.application.id))throw new L.default(w.RPCErrors.INVALID_ACTIVITY_SECRET,"secrets cannot match the party id");if(f.default.uniq(h).length<h.length)throw new L.default(w.RPCErrors.INVALID_ACTIVITY_SECRET,"secrets must be unique");if(null!=m)throw new L.default(w.RPCErrors.INVALID_ACTIVITY_SECRET,"secrets cannot currently be sent with buttons")}if(null!=m&&(o.metadata={button_urls:m.map((function(e){return e.url}))},o.buttons=m.map((function(e){return e.label}))),null!=y)for(var E=0,g=Object.keys(y);E<g.length;E++){var S=g[E];Date.now().toString().length-y[S].toString().length>2&&(y[S]=Math.floor(1e3*y[S]))}if(null==d)s=Promise.resolve([]);else{if(null==n.application||null==n.application.id)throw new Error;s=(0,A.getAssetIds)(n.application.id,[d.large_image,d.small_image])}return s.then((function(e){var t=e[0],r=e[1];null!=d&&(null!=t?d.large_image=t:delete d.large_image,null!=r?d.small_image=r:delete d.small_image),c.default.dispatch({type:w.ActionTypes.LOCAL_ACTIVITY_UPDATE,socketId:n.id,pid:a,activity:o,activitySessionId:u});var i=o.secrets,l=o.party,s={application_id:n.application.id,type:o.type};return null!=i&&(s.has_match_secret=!!i.match,s.has_join_secret=!!i.join),null!=d&&(s.has_images=!(!d.large_image&&!d.small_image)),null!=l&&(s.party_max=null!=l.size?l.size[1]:void 0,s.party_id=l.id),null!=u&&(s.activity_session_id=u),N.default.track(w.AnalyticEvents.ACTIVITY_UPDATED,s),o}))}},s[w.RPCCommands.SEND_ACTIVITY_JOIN_INVITE]={scope:(a={},a[w.RPC_SCOPE_CONFIG.ANY]=[w.OAuth2Scopes.RPC,w.RPC_LOCAL_SCOPE],a),handler:function(e){var t=e.socket,n=e.args,r=n.user_id,a=n.pid,o=t.application.id;if(null==o)throw new L.default(w.RPCErrors.INVALID_COMMAND,"No application.");return H(a,o,r,w.ActivityActionTypes.JOIN)}},s[w.RPCCommands.CLOSE_ACTIVITY_JOIN_REQUEST]={scope:(o={},o[w.RPC_SCOPE_CONFIG.ANY]=[w.OAuth2Scopes.RPC,w.RPC_LOCAL_SCOPE],o),handler:function(e){var t=e.args.user_id,n=g.default.getDMFromUserId(t);null!=n&&(0,m.ack)(n,!0,!0)}},s[w.RPCCommands.ACTIVITY_INVITE_USER]={scope:(i={},i[w.RPC_SCOPE_CONFIG.ANY]=[w.OAuth2Scopes.RPC,w.RPC_LOCAL_SCOPE],i),validation:function(e){return e.object().required().keys({user_id:e.string().required(),type:e.number().required().valid([w.ActivityActionTypes.JOIN]),content:e.string().min(0).max(1024),pid:e.number().min(0).required()})},handler:function(e){var t=e.socket,n=e.args,r=n.type,a=n.user_id,o=n.content,i=n.pid,l=t.application.id;if(null==l)throw new L.default(w.RPCErrors.INVALID_COMMAND,"No application.");return H(i,l,a,r,o)}},s[w.RPCCommands.ACCEPT_ACTIVITY_INVITE]={scope:(l={},l[w.RPC_SCOPE_CONFIG.ANY]=[w.OAuth2Scopes.RPC,w.RPC_LOCAL_SCOPE],l),validation:function(e){return e.object().required().keys({type:e.number().required().valid([w.ActivityActionTypes.JOIN]),user_id:e.string().required(),session_id:e.string().required(),channel_id:e.string().required(),message_id:e.string().required()})},handler:function(e){var t=e.socket,n=e.args,r=n.type,a=n.user_id,o=n.session_id,i=n.channel_id,l=n.message_id,u=t.application.id;if(null==u)throw new L.default(w.RPCErrors.INVALID_COMMAND,"No application.");var s=Promise.resolve(!1);switch(r){case w.ActivityActionTypes.JOIN:s=y.default.join(a,o,u,i,l)}return s.then((function(e){if(!e)throw new L.default(w.RPCErrors.INVALID_INVITE,"Invite is expired or invalid.")}))}},s[w.RPCCommands.OPEN_INVITE_DIALOG]={scope:(u={},u[w.RPC_SCOPE_CONFIG.ANY]=[w.OAuth2Scopes.RPC,w.RPC_LOCAL_SCOPE],u),handler:function(e){var t,n,r=e.socket,a=T.default.getVoiceChannelId(),o=g.default.getChannel(a);if(null==o)throw new L.default(w.RPCErrors.INVALID_CHANNEL,"Invalid channel "+a);var i=S.default.getGuild(o.getGuildId());if(null==i)throw new L.default(w.RPCErrors.INVALID_CHANNEL,"Invalid guild "+o.getGuildId());if(!(0,P.canViewInviteModal)(I.default,i,o))throw new L.default(w.RPCErrors.INVALID_PERMISSIONS,"No invite permissions for "+a);var l=E.default.getWindow(w.PopoutWindowKeys.CHANNEL_CALL_POPOUT);(null===(t=l)||void 0===t?void 0:t.closed)&&(l=null);var u=null!=l?w.AppContext.POPOUT:w.AppContext.APP;(0,R.exitFullScreen)({},void 0,null===(n=l)||void 0===n?void 0:n.document),(0,b.openModal)((function(e){return d.createElement(_.default,U({},e,{guild:i,channel:o,applicationId:r.application.id,analyticsLocation:w.AnalyticsLocations.ACTIVITY_RPC,source:w.InstantInviteSources.ACTIVITY_INVITE}))}),{},u===w.AppContext.POPOUT?M.POPOUT_MODAL_CONTEXT:M.DEFAULT_MODAL_CONTEXT)}},s);t.default=V},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=S(n(14)),i=n(57),l=n(5829),u=S(n(11030)),s=n(156),d=S(n(10)),f=S(n(71)),c=S(n(36)),p=S(n(12)),v=S(n(5826)),y=S(n(1167)),m=n(41),_=S(n(13)),h=S(n(43)),E=S(n(689)),g=n(1);function S(e){return e&&e.__esModule?e:{default:e}}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}).apply(this,arguments)}function I(e,t){var n=v.default.isEntitledToSku(p.default.getNullableCurrentUser(),e,t);return null!=n?Promise.resolve(n):(0,l.fetchUserEntitlementsForApplication)(t).then((function(){return!0===v.default.isEntitledToSku(p.default.getNullableCurrentUser(),e,t)}))}var T=((a={})[g.RPCCommands.VALIDATE_APPLICATION]={scope:g.RPC_LOCAL_SCOPE,handler:function(e){var t=e.socket.application.id;try{if(null==t)throw new E.default(g.RPCErrors.INVALID_COMMAND,"No application.");var n=f.default.getGame(t);if(null==n)throw new E.default(g.RPCErrors.INVALID_ENTITLEMENT,"SKU does not exist.");var r=n.primarySkuId;if(null==r)throw new E.default(g.RPCErrors.INVALID_ENTITLEMENT,"SKU does not exist.");return Promise.race([I(r,n.id).then((function(e){if(!e)throw new E.default(g.RPCErrors.INVALID_ENTITLEMENT,"User does not have entitlement.")})),(0,i.timeoutPromise)(1e4).then((function(){throw new E.default(g.RPCErrors.INVALID_ENTITLEMENT,"Timed out fetching entitlement.")}))])}catch(e){throw e.code===g.RPCErrors.INVALID_ENTITLEMENT&&(h.default.focus(null,!0),(0,m.openModal)((function(e){return React.createElement(u.default,O({},e,{applicationId:t}))}))),e}}},a[g.RPCCommands.GET_ENTITLEMENT_TICKET]={scope:g.RPC_LOCAL_SCOPE,handler:function(e){var t=e.socket.application.id;if(null==t)throw new E.default(g.RPCErrors.INVALID_COMMAND,"No application.");return o.default.post({url:g.Endpoints.ENTITLEMENT_TICKET(t),body:{test_mode:y.default.inTestModeForApplication(t)},retries:3,oldFormErrors:!0}).then((function(e){return e.body})).catch((function(e){throw h.default.focus(null,!0),(0,m.openModal)((function(e){return React.createElement(u.default,O({},e,{applicationId:t}))})),e}))}},a[g.RPCCommands.GET_ACTIVITY_JOIN_TICKET]=((r={})[g.RPC_SCOPE_CONFIG.ANY]=[g.OAuth2Scopes.RPC,g.RPC_AUTHENTICATED_SCOPE],r.handler=function(e){var t=e.socket;if(t.transport!==g.TransportTypes.POST_MESSAGE)throw new E.default(g.RPCErrors.INVALID_COMMAND,"Invalid transport.");var n=t.application.id;if(null==n)throw new E.default(g.RPCErrors.INVALID_COMMAND,"No application.");if(!s.JOIN_TICKET_EMBEDDED_APPS.has(n))throw new E.default(g.RPCErrors.INVALID_COMMAND,"This application cannot access this API");var r=d.default.getChannel(c.default.getVoiceChannelId()),a=null==r?void 0:r.getGuildId();if(null==r||null==a)throw new E.default(g.RPCErrors.INVALID_COMMAND,"Invalid channel");return o.default.post({url:g.Endpoints.ACTIVITY_JOIN_TICKET(n,a,r.id),retries:2,oldFormErrors:!0}).then((function(e){return e.body})).catch((function(e){throw e}))},r),a[g.RPCCommands.SEND_GENERIC_EVENT]={validation:function(e){return e.object().required().keys({type:e.string().required().min(2).max(64),name:e.string().required().min(2).max(128),details:e.string().min(1).max(256),activity_session_id:e.string().min(1).max(256)})},handler:function(e){var t=e.socket,n=e.args,r=n.name,a=n.type,o=n.activity_session_id,i=n.details;if(t.transport!==g.TransportTypes.POST_MESSAGE)throw new E.default(g.RPCErrors.INVALID_COMMAND,"Invalid transport.");var l=t.application.id;if(null==l)throw new E.default(g.RPCErrors.INVALID_COMMAND,"No application.");if(!s.GENERIC_EVENT_EMBEDDED_APPS.has(l))throw new E.default(g.RPCErrors.INVALID_COMMAND,"Invalid application");_.default.track(g.AnalyticEvents.APPLICATION_GENERATED_GENERIC_EVENT,{application_id:l,type:a,name:r,details:i,activity_session_id:o})}},a[g.RPCCommands.GET_APPLICATION_TICKET]={scope:g.RPC_LOCAL_SCOPE,handler:function(e){var t=e.socket.application.id;if(null==t)throw new E.default(g.RPCErrors.INVALID_COMMAND,"No application.");return o.default.post({url:g.Endpoints.APPLICATION_TICKET(t),body:{test_mode:y.default.inTestModeForApplication(t)},retries:3,oldFormErrors:!0}).then((function(e){return e.body}))}},a);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=m(n(3)),o=m(n(71)),i=m(n(29)),l=m(n(55)),u=n(85),s=n(131),d=n(35),f=m(n(24)),c=m(n(93)),p=n(1),v=m(n(6)),y=m(n(7997));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=c.default.getArticleURL(p.HelpdeskArticles.MISSING_ENTITLEMENT);function g(e){var t=e.application,n=e.transitionState,r=e.onClose,a=(0,u.useUID)();return h(d.ModalRoot,{transitionState:n,"aria-labelledby":a,size:d.ModalSize.MEDIUM},void 0,h(d.ModalHeader,{align:l.default.Align.CENTER,justify:l.default.Justify.BETWEEN},void 0,h(s.FormTitle,{tag:s.FormTitleTags.H4},void 0,null!=t?v.default.Messages.MISSING_ENTITLEMENT_MODAL_HEADER.format({applicationName:t.name}):v.default.Messages.MISSING_ENTITLEMENT_MODAL_HEADER_UNKNOWN_APPLICATION),h(d.ModalCloseButton,{onClick:r})),h(d.ModalContent,{},void 0,h("div",{className:y.default.missingEntitlementImage}),h(f.default,{className:y.default.text,size:f.default.Sizes.SIZE_16},void 0,null!=t?v.default.Messages.MISSING_ENTITLEMENT_MODAL_BODY.format({applicationName:t.name,supportArticleURL:E}):v.default.Messages.MISSING_ENTITLEMENT_MODAL_BODY_UNKNOWN_APPLICATION.format({supportArticleURL:E}))),h(d.ModalFooter,{},void 0,h(i.default,{onClick:r},void 0,v.default.Messages.OKAY)))}g.displayName="MissingEntitlementModal";var S=a.default.connectStores([o.default],(function(e){var t=e.applicationId;return{application:o.default.getGame(t)}}))(g);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(137)),i=g(n(63)),l=g(n(14)),u=g(n(28)),s=g(n(2)),d=g(n(397)),f=n(425),c=n(1429),p=n(1382),v=g(n(12)),y=g(n(78)),m=g(n(16)),_=g(n(43)),h=g(n(689)),E=n(1);function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}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}).apply(this,arguments)}function I(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){I(o,r,a,i,l,"next",e)}function l(e){I(o,r,a,i,l,"throw",e)}i(void 0)}))}}function C(e){return b.apply(this,arguments)}function b(){return(b=T(regeneratorRuntime.mark((function e(t){var n,r,o,l,u,s,g,S,I,T,C,b,M,N,A,P,R,L,D;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.client_id,r=t.response_type,o=void 0===r?"code":r,l=t.redirect_uri,u=t.code_challenge,s=t.code_challenge_method,g=t.state,S=t.scope,I=t.permissions,T=t.guild_id,C=t.channel_id,b=t.prompt,M=t.disable_guild_select,null!=n){e.next=3;break}throw new h.default(E.RPCErrors.OAUTH2_ERROR,"No Client ID provided");case 3:if(null==l){e.next=5;break}throw new h.default(E.RPCErrors.OAUTH2_ERROR,"Redirect URI cannot be used in the RPC OAuth2 Authorization flow");case 5:if(N=[],"string"==typeof S?N=S.split(" ").filter((function(e){return e.length>0})):Array.isArray(S)&&(N=S),null!=v.default.getCurrentUser()){e.next=10;break}throw new h.default(E.RPCErrors.OAUTH2_ERROR,"Client is not logged in");case 10:return e.prev=10,e.next=13,(0,f.fetchAuthorization)(n,N,o,l,u,s,g);case 13:A=e.sent,e.next=20;break;case 16:throw e.prev=16,e.t0=e.catch(10),P=e.t0.body,new h.default(E.RPCErrors.OAUTH2_ERROR,"OAuth2 Authorization Error: "+(P.message||"Unknown Error"));case 20:if(b!==c.OAuth2Prompts.NONE||null==A||!A.authorized){e.next=32;break}return e.prev=21,e.next=24,(0,f.authorize)(!0,n,N,o,l,u,s,g);case 24:return R=e.sent,e.abrupt("return",R.location);case 28:throw e.prev=28,e.t1=e.catch(21),L=e.t1.body,new h.default(E.RPCErrors.OAUTH2_ERROR,"OAuth2 Authorize Error: "+(L.message||"Unknown Error"));case 32:m.default.embedded&&(m.default.isWindows()?_.default.minimize():_.default.restore(),_.default.focus()),D=y.default.NONE;try{D=i.default.deserialize(null!=I?I:0)}catch(e){}return e.abrupt("return",new Promise((function(e){d.default.push((function(t){return a.createElement(p.OAuth2AuthorizeModal,O({},t,{authorization:A,clientId:n,scopes:N||[],callback:e,responseType:o,redirectUri:l,codeChallenge:u,codeChallengeMethod:s,state:g,permissions:D,guildId:T,channelId:C,prompt:b,disableGuildSelect:"boolean"==typeof M?M:"true"===M}))}))})));case 36:case"end":return e.stop()}}),e,null,[[10,16],[21,28]])})))).apply(this,arguments)}function M(e,t){if(e.authorization.accessToken)throw new h.default(E.RPCErrors.INVALID_COMMAND,"Already authenticated");if(e.authorization.authing)throw new h.default(E.RPCErrors.INVALID_COMMAND,"Already authing");return e.authorization.authing=!0,l.default.get({url:E.Endpoints.OAUTH2_CURRENT_AUTH,headers:{Authorization:"Bearer "+t},oldFormErrors:!0}).then((function(n){e.authorization.authing=!1;var r=n.body,a=r.application,o=r.user,i=r.scopes,l=r.expires;if(e.application.id!==a.id)throw new h.default(E.RPCErrors.INVALID_CLIENTID,"Application does not match the connection's");var u=v.default.getCurrentUser();if(!u||!o||u.id!==o.id)throw new h.default(E.RPCErrors.INVALID_TOKEN,"Token does not match current user");return e.authorization.scopes=[].concat(e.authorization.scopes,i,[E.RPC_AUTHENTICATED_SCOPE]),e.authorization.accessToken=t,e.authorization.expires=new Date(l),s.default.dispatch({type:E.ActionTypes.RPC_APP_AUTHENTICATED,socketId:e.id,application:e.application}),O({},n.body,{access_token:t})}),(function(){throw new h.default(E.RPCErrors.INVALID_TOKEN,"Invalid access token: "+t)})).catch((function(t){throw e.authorization.authing=!1,t}))}var N=((r={})[E.RPCCommands.AUTHENTICATE]={handler:function(e){var t=e.socket,n=e.args.access_token;if(null==n&&t.transport===E.TransportTypes.IPC){var r=t.application.id;if(null==r)throw new h.default(E.RPCErrors.INVALID_COMMAND,"No application.");var a=E.OAuth2Scopes.IDENTIFY,i=function(){return C({client_id:r,scope:a,response_type:"token"}).then((function(e){if(null==e)throw new h.default(E.RPCErrors.UNKNOWN_ERROR,"Unknown error occurred");var n=e.split(/#|\?/),a=o.default.parse(n[n.length-1]);if(null!=a.error)throw new h.default(E.RPCErrors.OAUTH2_ERROR,"OAuth2 Error: "+a.error+": "+(a.error_description||"unknown error"));return function(e,t,n,r){var a=u.default.get("CachedTokens")||{};a[e]={accessToken:t,scope:n,expires:Date.now()+r},u.default.set("CachedTokens",a)}(r,a.access_token,a.scope,a.expires_in),M(t,a.access_token)}))};return null!=(n=function(e,t){var n=u.default.get("CachedTokens");if(null!=n&&null!=n[e]){var r=n[e];if(!(r.scope!==t||r.expires<=Date.now()))return r.accessToken;delete n[e],u.default.set("CachedTokens",n)}}(r,a))?M(t,n).catch((function(){return function(e){var t=u.default.get("CachedTokens")||{};delete t[e],u.default.set("CachedTokens",t)}(r),i()})):i()}if(null==n)throw new h.default(E.RPCErrors.INVALID_TOKEN,"No access token provided");return M(t,n)}},r[E.RPCCommands.AUTHORIZE]={handler:function(e){var t=e.socket,n=e.args,r=n.client_id;if(!r)throw new h.default(E.RPCErrors.INVALID_CLIENTID,"No client id provided");if(t.authorization.accessToken)throw new h.default(E.RPCErrors.INVALID_COMMAND,"Already authenticated");if(t.authorization.authing)throw new h.default(E.RPCErrors.INVALID_COMMAND,"Already authing");return t.authorization.authing=!0,l.default.get({url:E.Endpoints.APPLICATION_RPC(r),oldFormErrors:!0}).then((function(e){var r=e.body;if(t.application.id!==r.id)throw new h.default(E.RPCErrors.INVALID_CLIENTID,"Application does not match the connection's");var a=n.scopes||n.scope;return delete n.scopes,C(O({},n,{scope:a}))}),(function(){throw new h.default(E.RPCErrors.INVALID_CLIENTID,"Invalid client id: "+r)})).then((function(e){if(t.authorization.authing=!1,null==e)throw new h.default(E.RPCErrors.UNKNOWN_ERROR,"Unknown error occurred");var n=o.default.parse(e.split("?")[1].split("#")[0]);if(null!=n.error)throw new h.default(E.RPCErrors.OAUTH2_ERROR,"OAuth2 Error: "+n.error+": "+(n.error_description||"unknown error"));return{code:n.code}})).catch((function(e){throw t.authorization.authing=!1,e}))}},r);t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=n(34),l=n(11033),u=(r=n(689))&&r.__esModule?r:{default:r},s=n(1);var d=((o={})[s.RPCCommands.SET_CERTIFIED_DEVICES]={scope:(a={},a[s.RPC_SCOPE_CONFIG.ANY]=[s.OAuth2Scopes.RPC,s.RPC_LOCAL_SCOPE],a),validation:function(e){return e.object().required().keys({devices:e.array().items(e.object().keys({type:e.string().required().valid([i.DeviceTypes.AUDIO_INPUT,i.DeviceTypes.AUDIO_OUTPUT,i.DeviceTypes.VIDEO_INPUT]),id:e.string().required().min(1),vendor:e.object().required().keys({name:e.string().min(1),url:e.string().min(1)}),model:e.object().required().keys({name:e.string().min(1),url:e.string().min(1)}),related:e.array().items(e.string().min(1)),echo_cancellation:e.boolean(),noise_suppression:e.boolean(),automatic_gain_control:e.boolean(),hardware_mute:e.boolean()}))})},handler:function(e){var t=e.socket,n=e.args.devices;if(null==t.application.id)throw new u.default(s.RPCErrors.INVALID_COMMAND,"No application.");(0,l.setCertifiedDevices)(t.application.id,n.map((function(e){return{type:e.type,id:e.id,vendor:e.vendor,model:e.model,related:e.related.filter((function(e){return n.some((function(t){return t.id===e}))})),echoCancellation:e.echo_cancellation,noiseSuppression:e.noise_suppression,automaticGainControl:e.automatic_gain_control,hardwareMute:e.hardware_mute}})))}},o);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCertifiedDevices=function(e,t){a.default.dispatch({type:o.ActionTypes.CERTIFIED_DEVICES_SET,applicationId:e,devices:t})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=E(n(8)),i=E(n(1211)),l=E(n(132)),u=n(42),s=n(31),d=E(n(10)),f=E(n(15)),c=E(n(40)),p=E(n(36)),v=E(n(80)),y=n(292),m=E(n(689)),_=n(8452),h=n(1);function E(e){return e&&e.__esModule?e:{default:e}}var g=((a={})[h.RPCCommands.GET_CHANNEL]={scope:h.OAuth2Scopes.RPC,handler:function(e){var t=e.args.channel_id,n=e.socket,r=d.default.getChannel(t);if(!r)throw new m.default(h.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+t);return(0,_.transformChannel)(r,(0,_.hasMessageReadPermission)(r,n.application.id,n.authorization.scopes))}},a[h.RPCCommands.GET_CHANNELS]={scope:h.OAuth2Scopes.RPC,handler:function(e){var t=e.args.guild_id,n=o.default.values(d.default.getMutableGuildAndPrivateChannels());if(t){var r=f.default.getGuild(t);if(!r)throw new m.default(h.RPCErrors.INVALID_GUILD,"Invalid guild id: "+t);n=n.filter((function(e){return e.guild_id===r.id}))}return{channels:n.filter((function(e){return c.default.can(h.Permissions.VIEW_CHANNEL,e)})).map((function(e){return{id:e.id,name:e.name,type:e.type}}))}}},a[h.RPCCommands.SELECT_VOICE_CHANNEL]={scope:h.OAuth2Scopes.RPC,validation:function(e){return e.object().required().keys({channel_id:e.string().allow(null),timeout:e.number().min(0).max(60),force:e.boolean()})},handler:function(e){var t=e.server,n=e.socket,r=e.args,a=r.channel_id,o=r.timeout,i=void 0===o?0:o,u=r.force,E=void 0!==u&&u;if(!a)return l.default.selectVoiceChannel(null),null;var g=p.default.getVoiceChannelId();if(g&&g!==a&&!1===E)throw new m.default(h.RPCErrors.SELECT_VOICE_FORCE_REQUIRED,"User is already joined to a voice channel.");return t.storeWait(n,(function(){return d.default.getChannel(a)}),i).catch((function(){throw new m.default(h.RPCErrors.SELECT_CHANNEL_TIMED_OUT,"Request to select voice channel timed out.")})).then((function(e){if(!e)throw new m.default(h.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+a);if(!(0,s.isVoiceChannel)(e.type))throw new m.default(h.RPCErrors.INVALID_CHANNEL,"Channel is not a voice channel");return Promise.all([Promise.resolve(e),(0,_.transformChannel)(e,(0,_.hasMessageReadPermission)(e,n.application.id,n.authorization.scopes))])})).then((function(e){var t=e[0],n=e[1];if(n.guild_id){if((0,y.isChannelFull)(t,v.default,f.default))throw new m.default(h.RPCErrors.INVALID_CHANNEL,"Channel is full");if(!c.default.can(h.Permissions.CONNECT,t))throw new m.default(h.RPCErrors.INVALID_PERMISSIONS,"Connect permission required to join channel")}return l.default.selectVoiceChannel(t.id),n}))}},a[h.RPCCommands.GET_SELECTED_VOICE_CHANNEL]={scope:(r={},r[h.RPC_SCOPE_CONFIG.ANY]=[h.OAuth2Scopes.RPC,h.OAuth2Scopes.RPC_VOICE_READ],r),handler:function(e){var t=e.socket,n=p.default.getVoiceChannelId(),r=null!=n?d.default.getChannel(n):null;return null!=r?(0,_.transformChannel)(r,(0,_.hasMessageReadPermission)(r,t.application.id,t.authorization.scopes)):null}},a[h.RPCCommands.SELECT_TEXT_CHANNEL]={scope:h.OAuth2Scopes.RPC,validation:function(e){return e.object().required().keys({channel_id:e.string().allow(null),timeout:e.number().min(0).max(60)})},handler:function(e){var t=e.server,n=e.socket,r=e.args,a=r.channel_id,o=r.timeout,i=void 0===o?0:o;return a?t.storeWait(n,(function(){return d.default.getChannel(a)}),i).catch((function(){throw new m.default(h.RPCErrors.SELECT_CHANNEL_TIMED_OUT,"Request to select text channel timed out.")})).then((function(e){if(!e)throw new m.default(h.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+a);if(!(0,s.isTextChannel)(e.type))throw new m.default(h.RPCErrors.INVALID_CHANNEL,"Channel is not a text channel");return Promise.all([Promise.resolve(e),(0,_.transformChannel)(e,(0,_.hasMessageReadPermission)(e,n.application.id,n.authorization.scopes))])})).then((function(e){var t=e[0],n=e[1];if(n.guild_id&&!c.default.can(h.Permissions.VIEW_CHANNEL,t))throw new m.default(h.RPCErrors.INVALID_CHANNEL,"No permission to see channel");return n.guild_id?(0,u.replaceWith)(h.Routes.CHANNEL(n.guild_id,t.id)):l.default.selectPrivateChannel(t.id),n})):((0,u.transitionTo)(h.Routes.ME),null)}},a[h.RPCCommands.CREATE_CHANNEL_INVITE]={scope:h.OAuth2Scopes.RPC,handler:function(e){var t=e.args,n=t.channel_id,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["channel_id"]);return i.default.createInvite(n,r,"RPC").catch((function(){throw new m.default(h.RPCErrors.INVALID_PERMISSIONS,"Unable to generate an invite for "+n+". Does this user have permissions?")}))}},a);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=l(n(2)),o=l(n(689)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u=((r={})[i.RPCCommands.SET_CONFIG]={validation:function(e){return e.object().required().keys({use_interactive_pip:e.boolean()})},handler:function(e){var t=e.socket,n=e.args.use_interactive_pip;if(t.transport!==i.TransportTypes.POST_MESSAGE)throw new o.default(i.RPCErrors.INVALID_COMMAND,'command not available from "'+t.transport+" transport");if(null==t.application.id)throw new o.default(i.RPCErrors.INVALID_COMMAND,"invalid application");return a.default.dispatch({type:i.ActionTypes.EMBEDDED_ACTIVITY_SET_CONFIG,applicationId:t.application.id,config:{useInteractivePIP:n}}),Promise.resolve({use_interactive_pip:n})}},r);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=u(n(8)),o=u(n(15)),i=u(n(689)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s=((r={})[l.RPCCommands.GET_GUILD]={scope:l.OAuth2Scopes.RPC,validation:function(e){return e.object().required().keys({guild_id:e.string(),timeout:e.number().min(0).max(60)})},handler:function(e){var t=e.socket,n=e.server,r=e.args,a=r.guild_id,u=r.timeout,s=void 0===u?0:u;return n.storeWait(t,(function(){return o.default.getGuild(a)}),s).catch((function(){throw new i.default(l.RPCErrors.GET_GUILD_TIMED_OUT,"Request to get guild timed out.")})).then((function(e){if(!e)throw new i.default(l.RPCErrors.INVALID_GUILD,"Invalid guild id: "+a);return{id:e.id,name:e.name,icon_url:e.getIconURL()||null,members:[],vanity_url_code:e.vanityURLCode}}))}},r[l.RPCCommands.GET_GUILDS]={scope:l.OAuth2Scopes.RPC,handler:function(){var e=o.default.getGuilds();return{guilds:a.default.map(e,(function(e){return{id:e.id,name:e.name,icon_url:e.getIconURL()}}))}}},r);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=u(n(12)),o=u(n(150)),i=u(n(689)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s=((r={})[l.RPCCommands.GET_IMAGE]={scope:l.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({type:e.string().required().valid(["user"]),id:e.string().required(),format:e.string().required().valid(["png","webp","jpg"]),size:e.number().required().valid([16,32,64,128,256,512,1024])})},handler:function(e){var t,n=e.args,r=n.type,u=n.id,s=n.format,d=void 0===s?"png":s,f=n.size,c=void 0===f?128:f;switch(r){case"user":var p=a.default.getUser(u);if(null==p)throw new i.default(l.RPCErrors.INVALID_USER,"Invalid user id: "+u);t=o.default.getUserAvatarURL(p,d,c);var v=window.GLOBAL_ENV.CDN_HOST;null!=v&&-1!==t.indexOf(v)&&(t+="&_=")}if(null==t)throw new i.default(l.RPCErrors.INVALID_COMMAND,"No valid type.");return fetch(t).then((function(e){return e.blob()})).then((function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){return t(e.target.result)},r.onerror=function(e){return n(e.target.error)},r.readAsDataURL(e)}))})).then((function(e){return{data_url:e}}))}},r);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(11039);n(9730);var a,o,i,l,u,s,d,f,c,p=n(1269),v=(a=n(689))&&a.__esModule?a:{default:a},y=n(1);function m(e){if(e instanceof p.LobbyError)switch(e.code){case y.LobbyErrors.FULL:throw new v.default(y.RPCErrors.LOBBY_FULL,"Lobby is full.");case y.LobbyErrors.INVALID_SECRET:throw new v.default(y.RPCErrors.INVALID_LOBBY_SECRET,"Lobby secret is invalid.");case y.LobbyErrors.NOT_FOUND:throw new v.default(y.RPCErrors.INVALID_LOBBY,"Lobby does not exist.");case y.LobbyErrors.SERVICE_UNAVAILABLE:throw new v.default(y.RPCErrors.SERVICE_UNAVAILABLE,"Lobby service is unavailable.");case y.LobbyErrors.ALREADY_CONNECTING:throw new v.default(y.RPCErrors.INVALID_COMMAND,"Already connecting to lobby.");default:throw new v.default(y.RPCErrors.UNKNOWN_ERROR,"Unknown error has occured.")}throw e}var _=((c={})[y.RPCCommands.CREATE_LOBBY]={scope:(o={},o[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],o),validation:function(e){return e.object().required().keys({type:e.number().valid(Object.values(y.LobbyTypes)),capacity:e.number(),locked:e.boolean(),metadata:e.object()})},handler:function(e){var t=e.socket,n=e.args,a=n.type,o=n.capacity,i=n.locked,l=n.metadata;if(null==t.application.id)throw new v.default(y.RPCErrors.INVALID_COMMAND,"No application.");return(0,r.createLobby)(t.id,t.application.id,{type:a,capacity:o,locked:i,metadata:l}).catch(m)}},c[y.RPCCommands.UPDATE_LOBBY]={scope:(i={},i[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],i),validation:function(e){return e.object().required().keys({id:e.string().required(),type:e.number().valid(Object.values(y.LobbyTypes)),owner_id:e.string(),capacity:e.number(),locked:e.boolean(),metadata:e.object()})},handler:function(e){var t=e.args,n=t.id,a=t.type,o=t.owner_id,i=t.capacity,l=t.locked,u=t.metadata;return(0,r.updateLobby)(n,{type:a,owner_id:o,capacity:i,locked:l,metadata:u}).catch(m)}},c[y.RPCCommands.DELETE_LOBBY]={scope:(l={},l[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],l),validation:function(e){return e.object().required().keys({id:e.string().required()})},handler:function(e){var t=e.args.id;return(0,r.deleteLobby)(t).catch(m)}},c[y.RPCCommands.UPDATE_LOBBY_MEMBER]={scope:(u={},u[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],u),validation:function(e){return e.object().required().keys({lobby_id:e.string().required(),user_id:e.string().required(),metadata:e.object()})},handler:function(e){var t=e.args,n=t.lobby_id,a=t.user_id,o=t.metadata;return(0,r.updateLobbyMember)(n,a,{metadata:o}).catch(m)}},c[y.RPCCommands.CONNECT_TO_LOBBY]={scope:(s={},s[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],s),validation:function(e){return e.object().required().keys({id:e.string().required(),secret:e.string().required()})},handler:function(e){var t=e.socket,n=e.args,a=n.id,o=n.secret;return(0,r.connect)(t.id,a,o).catch(m)}},c[y.RPCCommands.DISCONNECT_FROM_LOBBY]={scope:(d={},d[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],d),validation:function(e){return e.object().required().keys({id:e.string().required()})},handler:function(e){var t=e.args.id;(0,r.disconnect)(t)}},c[y.RPCCommands.SEND_TO_LOBBY]={scope:(f={},f[y.RPC_SCOPE_CONFIG.ANY]=[y.RPC_AUTHENTICATED_SCOPE,y.RPC_LOCAL_SCOPE],f),validation:function(e){return e.object().required().keys({lobby_id:e.string().required(),data:e.string().required()})},handler:function(e){var t=e.args,n=t.lobby_id,a=t.data;return(0,r.send)(n,a).catch(m)}},c[y.RPCCommands.SEARCH_LOBBIES]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({filter:e.array().items(e.object().keys({key:e.string().required(),comparison:e.number().required(),cast:e.number().required(),value:e.string().required()})),sort:e.array().items(e.object().keys({key:e.string().required(),cast:e.number().required(),near_value:e.string()})),limit:e.number(),distance:e.number()})},handler:function(e){var t=e.socket,n=e.args,a=n.filter,o=n.sort,i=n.limit,l=n.distance;return(0,r.search)({application_id:t.application.id,filter:a,sort:o,limit:i,distance:l}).catch(m)}},c[y.RPCCommands.CONNECT_TO_LOBBY_VOICE]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({id:e.string().required()})},handler:function(e){var t=e.args.id;(0,r.voiceConnect)(t)}},c[y.RPCCommands.DISCONNECT_FROM_LOBBY_VOICE]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({id:e.string().required()})},handler:function(e){var t=e.args.id;(0,r.voiceDisconnect)(t)}},c);t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=u,t.disconnect=function(e){a.default.dispatch({type:o.ActionTypes.LOBBY_DISCONNECT,lobbyId:e})},t.createLobby=function(e,t,n){return r.default.post({url:o.Endpoints.LOBBIES,body:l({application_id:t},n),retries:1,oldFormErrors:!0}).then((function(t){var n=t.body;return u(e,n.id,n.secret)}))},t.updateLobby=function(e,t){return r.default.patch({url:o.Endpoints.LOBBY(e),body:l({},t),retries:1,oldFormErrors:!0}).then(o.NOOP)},t.updateLobbyMember=function(e,t,n){return r.default.patch({url:o.Endpoints.LOBBY_MEMBER(e,t),body:l({},n),retries:1,oldFormErrors:!0}).then(o.NOOP)},t.deleteLobby=function(e){return r.default.delete({url:o.Endpoints.LOBBY(e),body:{},retries:1,oldFormErrors:!0}).then(o.NOOP)},t.send=function(e,t){return r.default.post({url:o.Endpoints.LOBBY_SEND(e),body:{data:t},oldFormErrors:!0}).then(o.NOOP)},t.search=function(e){return r.default.post({url:o.Endpoints.LOBBY_SEARCH,body:e,oldFormErrors:!0}).then((function(e){return e.body}))},t.voiceConnect=function(e){a.default.dispatch({type:o.ActionTypes.LOBBY_VOICE_CONNECT,lobbyId:e})},t.voiceDisconnect=function(e){a.default.dispatch({type:o.ActionTypes.LOBBY_VOICE_DISCONNECT,lobbyId:e})};var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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}).apply(this,arguments)}function u(e,t,n){return new Promise((function(r,i){a.default.dispatch({type:o.ActionTypes.LOBBY_CONNECT,socketId:e,lobbyId:t,lobbySecret:n,resolve:r,reject:i})}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=l(n(14)),o=l(n(13)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u=((r={})[i.RPCCommands.GET_NETWORKING_CONFIG]={scope:i.RPC_LOCAL_SCOPE,handler:function(){return Promise.all([a.default.get({url:location.protocol+window.GLOBAL_ENV.NETWORKING_ENDPOINT,retries:3}).then((function(e){return e.body.address})),a.default.post({url:i.Endpoints.NETWORKING_TOKEN,retries:3,oldFormErrors:!0}).then((function(e){return e.body.token}))]).then((function(e){return{address:e[0],token:e[1]}}))}},r[i.RPCCommands.NETWORKING_SYSTEM_METRICS]={scope:i.RPC_LOCAL_SCOPE,handler:function(e){var t=e.socket,n=e.args;n.application_id=t.application.id,o.default.track(i.AnalyticEvents.NETWORKING_SYSTEM_METRICS,n)}},r[i.RPCCommands.NETWORKING_PEER_METRICS]={scope:i.RPC_LOCAL_SCOPE,handler:function(e){var t=e.socket,n=e.args;n.application_id=t.application.id,o.default.track(i.AnalyticEvents.NETWORKING_PEER_METRICS,n)}},r[i.RPCCommands.NETWORKING_CREATE_TOKEN]={scope:i.RPC_LOCAL_SCOPE,handler:function(){return a.default.post({url:i.Endpoints.NETWORKING_TOKEN,retries:1,oldFormErrors:!0}).then((function(e){return e.body}))}},r);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=m(n(2)),o=n(8787),i=m(n(1211)),l=m(n(695)),u=m(n(9163)),s=m(n(1365)),d=m(n(1255)),f=m(n(479)),c=n(41),p=m(n(689)),v=n(8452),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){return(_=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}).apply(this,arguments)}var h=((r={})[y.RPCCommands.SET_OVERLAY_LOCKED]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({locked:e.boolean().required(),pid:e.number().min(0).required()})},handler:function(e){var t=e.args,n=t.locked,r=t.pid;if(null==e.socket.application.id)throw new p.default(y.RPCErrors.INVALID_COMMAND,"No application.");l.default.setLocked(n,r)}},r[y.RPCCommands.OPEN_OVERLAY_ACTIVITY_INVITE]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({type:e.number().required().valid([y.ActivityActionTypes.JOIN]),pid:e.number().min(0).required()})},handler:function(e){var t=e.socket,n=e.args,r=n.type,a=n.pid,i=t.application.id;if(null==i)throw new p.default(y.RPCErrors.INVALID_COMMAND,"No application.");var l=d.default.getApplicationActivity(i);if(null==l||null==l.secrets||!(0,v.validateActivityInvite)(r,l.party,l.secrets))throw new p.default(y.RPCErrors.NO_ELIGIBLE_ACTIVITY,"No eligible activity for application. Ensure an activity includes a party and appropriate secret.");var u=(0,v.unlockOverlay)(a).lock,c=(0,s.default)(l,f.default);return(0,o.openModal)(l,c).then((function(){if(u(),c)throw new p.default(y.RPCErrors.NO_ELIGIBLE_ACTIVITY,"No eligible activity for application. Ensure user does have have privacy enabled.")}))}},r[y.RPCCommands.OPEN_OVERLAY_GUILD_INVITE]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({code:e.string().required(),pid:e.number().min(0).required()})},handler:function(e){var t=e.args,n=t.code,r=t.pid;if(null==e.socket.application.id)throw new p.default(y.RPCErrors.INVALID_COMMAND,"No application.");return i.default.resolveInvite(n,"Game SDK").then((function(e){var t=e.invite,n=e.code;if(null==t)throw new p.default(y.RPCErrors.INVALID_INVITE,"Invalid invite id: "+n);var o=(0,v.unlockOverlay)(r),i=o.context,l=o.lock;return new Promise((function(e){a.default.dispatch({type:y.ActionTypes.INVITE_MODAL_OPEN,invite:t,code:n,context:i,resolve:e})})).then(l)}))}},r[y.RPCCommands.OPEN_OVERLAY_VOICE_SETTINGS]={scope:y.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({pid:e.number().min(0).required()})},handler:function(e){var t=e.args.pid,n=e.socket,r=n.application.id;if(null==r)throw new p.default(y.RPCErrors.INVALID_COMMAND,"No application.");var a=(0,v.unlockOverlay)(t).lock;return new Promise((function(e){(0,c.openModal)((function(t){return React.createElement(u.default,_({},t,{mediaEngineContext:r,title:n.application.name,onClose:function(){t.onClose(),a(),e()}}))}))}))}},r);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(305),i=C(n(2)),l=n(5692),u=n(1152),s=C(n(739)),d=C(n(5960)),f=C(n(1211)),c=C(n(8834)),p=C(n(8969)),v=C(n(8743)),y=C(n(1381)),m=n(42),_=C(n(15)),h=C(n(12)),E=n(41),g=C(n(13)),S=C(n(186)),O=C(n(43)),I=C(n(689)),T=n(1);function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){N(o,r,a,i,l,"next",e)}function l(e){N(o,r,a,i,l,"throw",e)}i(void 0)}))}}function P(e,t){null!=e&&g.default.track(T.AnalyticEvents.EXTERNAL_DYNAMIC_LINK_RECEIVED,{invite_code:null,has_auth_token:null,is_backgrounded:null,fingerprint:(0,o.extractId)(e),link_type:t})}var R=((r={})[T.RPCCommands.INVITE_BROWSER]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){return A(regeneratorRuntime.mark((function t(){var n,r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.args.code,t.next=3,f.default.resolveInvite(n,"Desktop Modal");case 3:if(r=t.sent,null!=(a=r.invite)){t.next=7;break}throw new I.default(T.RPCErrors.INVALID_INVITE,"Invalid invite id: "+n);case 7:return i.default.dispatch({type:T.ActionTypes.INVITE_MODAL_OPEN,invite:a,code:n,context:T.AppContext.APP}),t.abrupt("return",{invite:a,code:n});case 9:case"end":return t.stop()}}),t)})))()}},r[T.RPCCommands.GUILD_TEMPLATE_BROWSER]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){return A(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.args.code,null!=h.default.getNullableCurrentUser()){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,p.default.resolveGuildTemplate(n);case 5:if(r=t.sent,null!=(o=r.guildTemplate)){t.next=9;break}throw new I.default(T.RPCErrors.INVALID_GUILD_TEMPLATE,"Invalid guild template id: "+n);case 9:return O.default.focus(),(0,E.openModal)((function(e){return a.createElement(v.default,M({},e,{guildTemplate:o}))})),t.abrupt("return",{guildTemplate:o,code:n});case 12:case"end":return t.stop()}}),t)})))()}},r[T.RPCCommands.GIFT_CODE_BROWSER]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){var t=e.args.code;return new Promise((function(e,n){i.default.wait((function(){d.default.resolveGiftCode(t,!0,!0).then((function(n){var r=n.giftCode;O.default.focus(),g.default.track(T.AnalyticEvents.OPEN_MODAL,{type:"gift_accept",location:T.DIRECT_ANALYTICS_LOCATION}),(0,E.openModal)((function(e){return a.createElement(c.default,M({code:t},e))})),e({giftCode:r})})).catch((function(){return n(new I.default(T.RPCErrors.INVALID_GIFT_CODE,"Invalid gift code: "+t))}))}))}))}},r[T.RPCCommands.GUILD_STAGES_BROWSER]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){return A(regeneratorRuntime.mark((function t(){var n,r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.args.code,null!=h.default.getNullableCurrentUser()){t.next=3;break}return t.abrupt("return");case 3:return r=n.split("/"),o=r[0],i=r[1],null!=_.default.getGuild(o)?(0,m.transitionTo)(T.Routes.UPCOMING_STAGES(o,""!==i?i:void 0)):(0,E.openModal)((function(e){return a.createElement(y.default,e)})),t.abrupt("return",{code:n});case 6:case"end":return t.stop()}}),t)})))()}},r[T.RPCCommands.DEEP_LINK]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){var t=e.args,n=t.type,r=t.params;switch(O.default.focus(),n){case T.RPCDeepLinks.USER_SETTINGS:null!=r&&((0,m.replaceWith)(T.Routes.SETTINGS(r.section,r.subsection)),P(r.fingerprint,T.DynamicLinkType.SETTINGS));break;case T.RPCDeepLinks.CHANGELOG:null!=r&&((0,m.replaceWith)(S.default.formatPathWithQuery(T.Routes.CHANGELOGS(r.date),r.query)),P(r.fingerprint,T.DynamicLinkType.CHANGELOG));break;case T.RPCDeepLinks.LIBRARY:(0,m.replaceWith)(T.Routes.APPLICATION_LIBRARY),null!=r&&P(r.fingerprint,T.DynamicLinkType.LIBRARY);break;case T.RPCDeepLinks.STORE_HOME:(0,m.replaceWith)(T.Routes.APPLICATION_STORE),null!=r&&P(r.fingerprint,T.DynamicLinkType.STORE);break;case T.RPCDeepLinks.STORE_LISTING:null!=r&&((0,m.replaceWith)(T.Routes.APPLICATION_STORE_LISTING_SKU(r.skuId,r.slug)),P(r.fingerprint,T.DynamicLinkType.STORE))}}},r[T.RPCCommands.BROWSER_HANDOFF]={scope:T.RPC_PRIVATE_LIMITED_SCOPE,handler:function(e){var t=e.args,n=t.handoffToken,r=t.fingerprint;O.default.focus(null,!0),(0,u.handoffEnd)(n,r)}},r[T.RPCCommands.CONNECTIONS_CALLBACK]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){var t=e.args,n=t.providerType,r=t.code,a=t.openid_params,o=t.state;return s.default.callback(n,{code:r,openid_params:a,state:o})}},r[T.RPCCommands.BRAINTREE_POPUP_BRIDGE_CALLBACK]={scope:T.RPC_PRIVATE_SCOPE,handler:function(e){var t=e.args,n=t.state,r=t.path,a=t.query;return(0,l.popupBridgeCallback)({state:n,path:r,query:a})}},r);t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=d(n(8)),o=d(n(70)),i=d(n(8415)),l=d(n(12)),u=n(8452),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){return(f=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}).apply(this,arguments)}var c=((r={})[s.RPCCommands.GET_RELATIONSHIPS]={scope:s.RPC_LOCAL_SCOPE,handler:function(){var e=f({},o.default.getRelationships());return i.default.getUserAffinitiesUserIds().forEach((function(t){null==e[t]&&null!=l.default.getUser(t)&&(e[t]=s.RelationshipTypes.IMPLICIT)})),{relationships:a.default.map(e,(function(e,t){return(0,u.transformRelationship)(e,t)}))}}},r);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u=E(n(5829)),s=E(n(5672)),d=E(n(8344)),f=n(8837),c=_(n(8734)),p=_(n(1167)),v=_(n(689)),y=n(8452),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(e){if(null==e)return{lock:m.NOOP_NULL,context:m.AppContext.APP};var t=(0,y.unlockOverlay)(e);return{lock:t.lock,context:t.context}}function S(e,t){var n={planId:m.SubscriptionPlans.PREMIUM_MONTH_TIER_2,analyticsLocation:t};switch(e){case m.AppContext.APP:return c.default.openPremiumPaymentModalInApp(n);case m.AppContext.OVERLAY:return c.default.openPremiumPaymentModalInOverlay(n);default:throw new Error("Unexpected app context: "+e)}}function O(e){if(m.TransportTypes.IPC!==e&&m.TransportTypes.POST_MESSAGE!==e)throw new v.default(m.RPCErrors.INVALID_COMMAND,"Invalid transport.")}var I=((l={})[m.RPCCommands.START_PURCHASE]=((r={})[m.RPC_SCOPE_CONFIG.ANY]=[m.RPC_AUTHENTICATED_SCOPE,m.RPC_LOCAL_SCOPE],r.validation=function(e){return e.object().required().keys({sku_id:e.string().required(),pid:e.number().min(0)})},r.handler=function(e){var t=e.socket,n=e.args,r=n.sku_id,a=n.pid;O(t.transport);var o=t.application.id;if(null==o)throw new v.default(m.RPCErrors.INVALID_COMMAND,"No application.");var i=g(t.transport!==m.TransportTypes.POST_MESSAGE?a:null),l=i.lock,u=i.context,s={page:m.AnalyticsPages.IN_APP};return(0,f.openIAPPurchaseModal)(o,r,(function(){return S(u,s)}),s,u).then((function(e){return l(),e}),(function(e){if(l(),null!=e)throw new v.default(m.RPCErrors.PURCHASE_ERROR,e);throw new v.default(m.RPCErrors.PURCHASE_CANCELED,"Purchase was canceled by the user.")}))},r),l[m.RPCCommands.GET_SKUS]=((a={})[m.RPC_SCOPE_CONFIG.ANY]=[m.RPC_AUTHENTICATED_SCOPE,m.RPC_LOCAL_SCOPE],a.handler=function(e){var t=e.socket;O(t.transport);var n=t.application.id;if(null==n)throw new v.default(m.RPCErrors.INVALID_COMMAND,"No application.");return p.default.inTestModeForApplication(n)?s.fetchSKUsForApplication(n).then((function(e){return e.filter((function(e){return null!=e.price}))})):d.fetchAllStoreListingsForApplication(n).then((function(e){return(e||[]).map((function(e){return e.sku})).filter((function(e){return null!=e.price}))}))},a),l[m.RPCCommands.START_PREMIUM_PURCHASE]=((o={})[m.RPC_SCOPE_CONFIG.ANY]=[m.RPC_AUTHENTICATED_SCOPE,m.RPC_LOCAL_SCOPE],o.validation=function(e){return e.object().keys({pid:e.number().min(0)})},o.handler=function(e){var t=e.socket,n=e.args.pid;if(O(t.transport),null==t.application.id)throw new v.default(m.RPCErrors.INVALID_COMMAND,"No application.");var r=g(t.transport!==m.TransportTypes.POST_MESSAGE?n:null),a=r.lock;return S(r.context,{page:m.AnalyticsPages.IN_APP}).then((function(){a()}),(function(e){if(a(),null!=e)throw new v.default(m.RPCErrors.PURCHASE_ERROR,e);throw new v.default(m.RPCErrors.PURCHASE_CANCELED,"Purchase was canceled by the user.")}))},o),l[m.RPCCommands.GET_ENTITLEMENTS]=((i={})[m.RPC_SCOPE_CONFIG.ANY]=[m.RPC_AUTHENTICATED_SCOPE,m.RPC_LOCAL_SCOPE],i.handler=function(e){var t=e.socket;O(t.transport);var n=t.application.id;if(null==n)throw new v.default(m.RPCErrors.INVALID_COMMAND,"No application.");return u.fetchUserEntitlementsForApplication(n).then((function(e){return e||[]}))},i),l);t.default=I},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=l(n(689)),o=l(n(1405)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}var u=((r={})[i.RPCCommands.SUBSCRIBE]={handler:function(t){var n=t.server,r=t.socket,l=t.evt,u=t.args;return new Promise((function(t){var s=n.events[l];if(null==s)throw new a.default(i.RPCErrors.INVALID_EVENT,"Invalid event: "+l);if(!(0,o.default)(r.authorization.scopes,s.scope))throw new a.default(i.RPCErrors.INVALID_PERMISSIONS,"Not authenticated or invalid scope");var d=s.handler({args:u,socket:r});e((function(){return n.addSubscription(r,l,u,d)})),t({evt:l})}))}},r[i.RPCCommands.UNSUBSCRIBE]={handler:function(e){var t=e.server,n=e.socket,r=e.evt,o=e.args;if(!t.events[r])throw new a.default(i.RPCErrors.INVALID_EVENT,"Invalid event: "+r);return t.removeSubscription(n,r,o),{evt:r}}},r);t.default=u}).call(this,n(68).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(1150),o=u(n(689)),i=u(n(1304)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}var s=((r={})[l.RPCCommands.GET_USER]={scope:l.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({id:e.string().required()})},handler:function(e){var t=e.args.id;return(0,a.getUser)(t).then(i.default).catch((function(){throw new o.default(l.RPCErrors.INVALID_USER,"Invalid user id: "+t)}))}},r);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=s(n(288)),o=s(n(51)),i=n(401),l=s(n(689)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e){var t=e.application.id;if(null==t)throw new l.default(u.RPCErrors.INVALID_COMMAND,"No application.");return t}var f=((r={})[u.RPCCommands.SET_VOICE_SETTINGS_2]={scope:u.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({input_mode:e.object().keys({type:e.string().valid(Object.keys(u.InputModes)),shortcut:e.string().required()}),self_mute:e.boolean(),self_deaf:e.boolean()})},handler:function(e){var t=e.socket,n=e.args,r=n.input_mode,l=n.self_mute,u=n.self_deaf,s=d(t);null!=r&&a.default.setMode(r.type,{shortcut:(0,i.toCombo)(r.shortcut)},s),null!=l&&l!==o.default.isSelfMute(s)&&a.default.toggleSelfMute(s),null!=u&&u!==o.default.isSelfDeaf(s)&&a.default.toggleSelfDeaf(s)}},r[u.RPCCommands.SET_USER_VOICE_SETTINGS_2]={scope:u.RPC_LOCAL_SCOPE,validation:function(e){return e.object().required().keys({user_id:e.string().required(),volume:e.number().min(0).max(200),mute:e.boolean()})},handler:function(e){var t=e.socket,n=e.args,r=n.user_id,i=n.mute,l=n.volume,u=d(t);null!=i&&i!==o.default.isLocalMute(r,u)&&a.default.toggleLocalMute(r,u),null!=l&&a.default.setLocalVolume(r,l,u)}},r);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l=p(n(288)),u=p(n(51)),s=p(n(12)),d=p(n(689)),f=n(8452),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}var v=((i={})[c.RPCCommands.SET_USER_VOICE_SETTINGS]={scope:(r={},r[c.RPC_SCOPE_CONFIG.ANY]=[c.OAuth2Scopes.RPC,c.OAuth2Scopes.RPC_VOICE_WRITE],r),validation:function(e){return e.object().required().keys({user_id:e.string().required(),pan:e.object().keys({left:e.number().min(0).max(1).required(),right:e.number().min(0).max(1).required()}),volume:e.number().min(0).max(200),mute:e.boolean()})},handler:function(e){var t=e.args,n=t.user_id,r=t.pan,a=t.volume,o=t.mute,i=s.default.getCurrentUser();if(!s.default.getUser(n)||i.id===n)throw new d.default(c.RPCErrors.INVALID_USER,"Invalid user id: "+n);if(null!=r&&l.default.setLocalPan(n,r.left,r.right),null!=a&&l.default.setLocalVolume(n,a),null!=o){var f=u.default.isLocalMute(n);(f&&!o||!f&&o)&&l.default.toggleLocalMute(n)}return{user_id:n,pan:u.default.getLocalPan(n),volume:u.default.getLocalVolume(n),mute:u.default.isLocalMute(n)}}},i[c.RPCCommands.GET_VOICE_SETTINGS]={scope:(a={},a[c.RPC_SCOPE_CONFIG.ANY]=[c.OAuth2Scopes.RPC,c.OAuth2Scopes.RPC_VOICE_READ],a),handler:function(){return(0,f.getDeprecatedVoiceSettings)()}},i[c.RPCCommands.SET_VOICE_SETTINGS]={scope:(o={},o[c.RPC_SCOPE_CONFIG.ANY]=[c.OAuth2Scopes.RPC,c.OAuth2Scopes.RPC_VOICE_WRITE],o),validation:function(e){return e.object().required().keys({input:e.object().keys({device_id:e.string().valid(Object.keys(u.default.getInputDevices())),volume:e.number().min(0).max(100)}),output:e.object().keys({device_id:e.string().valid(Object.keys(u.default.getOutputDevices())),volume:e.number().min(0).max(200)}),mode:e.object().keys({type:e.string().valid(Object.keys(c.InputModes)),auto_threshold:e.boolean(),threshold:e.number().min(-100).max(0),shortcut:e.array().items(e.object().keys({type:e.number().min(0).max(3).required(),code:e.number().required(),name:e.string()})),delay:e.number().min(0).max(2e3)}),automatic_gain_control:e.boolean(),echo_cancellation:e.boolean(),noise_suppression:e.boolean(),qos:e.boolean(),silence_warning:e.boolean(),deaf:e.boolean(),mute:e.boolean()})},handler:function(e){var t=e.args,n=t.input,r=t.output,a=t.mode,o=t.automatic_gain_control,i=t.echo_cancellation,s=t.noise_suppression,d=t.qos,c=t.silence_warning,p=t.deaf,v=t.mute;if(n&&(null!=n.device_id&&l.default.setInputDevice(n.device_id),null!=n.volume&&l.default.setInputVolume(n.volume)),r&&(null!=r.device_id&&l.default.setOutputDevice(r.device_id),null!=r.volume&&l.default.setOutputVolume(r.volume)),a){var y=u.default.getMode(),m=u.default.getModeOptions();null!=a.type&&(y=a.type),null!=a.auto_threshold&&(m.autoThreshold=a.auto_threshold),null!=a.threshold&&(m.threshold=a.threshold),null!=a.shortcut&&(m.shortcut=a.shortcut.map((function(e){return[e.type,e.code]}))),null!=a.delay&&(m.delay=a.delay),l.default.setMode(y,m)}if(null!=o&&l.default.setAutomaticGainControl(o),null!=i&&l.default.setEchoCancellation(i),null!=s&&l.default.setNoiseSuppression(s),null!=d&&l.default.setQoS(d),null!=c&&l.default.setSilenceWarning(c),null!=p){var _=u.default.isSelfDeaf();(_&&!p||!_&&p)&&l.default.toggleSelfDeaf()}if(null!=v){var h=u.default.isSelfMute();(h&&!v||!h&&v)&&l.default.toggleSelfMute()}return(0,f.getDeprecatedVoiceSettings)()}},i);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u,s,d,f,c,p,v,y,m,_,h,E,g,S,O,I,T,C,b,M=H(n(8)),N=H(n(184)),A=H(n(10)),P=H(n(15)),R=H(n(120)),L=H(n(1269)),D=H(n(1287)),w=H(n(94)),j=H(n(12)),k=H(n(80)),U=H(n(689)),G=n(8452),F=H(n(1304)),B=n(1);function H(e){return e&&e.__esModule?e:{default:e}}function x(e){var t,n=e.args.channel_id,r=e.socket,a=A.default.getChannel(n);if(!a||!(0,G.hasMessageReadPermission)(a,r.application.id,r.authorization.scopes))throw new U.default(B.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+n);if(a.isNSFW()&&!0!==(null===(t=j.default.getNullableCurrentUser())||void 0===t?void 0:t.nsfwAllowed))throw new U.default(B.RPCErrors.INVALID_CHANNEL,"Invalid nsfw channel id: "+a.id)}function V(e){var t=e.args,n=t.lobby_id,r=t.channel_id;if(null!=r&&null==A.default.getChannel(r))throw new U.default(B.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+r);if(null!=n&&null==L.default.getLobby(n))throw new U.default(B.RPCErrors.INVALID_LOBBY,"Invalid lobby id: "+n)}var W=((b={})[B.RPCEvents.GUILD_STATUS]={scope:B.OAuth2Scopes.RPC,handler:function(e){var t=e.args.guild_id;if(!P.default.getGuild(t))throw new U.default(B.RPCErrors.INVALID_GUILD,"Invalid guild id: "+t);return function(e){var n=e.prevState,r=e.dispatch,a=P.default.getGuild(t);if(a){var o={guild:{id:a.id,name:a.name,icon_url:a.getIconURL()||null},online:0};return M.default.isEqual(n,o)||r(o),o}}}},b[B.RPCEvents.VOICE_STATE_CREATE]={scope:(r={},r[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ],r),handler:function(e){var t=e.args.channel_id;if(!A.default.getChannel(t))throw new U.default(B.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+t);return function(e){var n=e.prevState,r=e.dispatch,a=A.default.getChannel(t);if(a){var o=a.getGuildId(),i=Object.values(k.default.getVoiceStatesForChannel(a.id));if(n)M.default.differenceBy(i,n,(function(e){return e.userId})).forEach((function(e){return r((0,G.transformVoiceState)(o,a.id,e))}));return i}}}},b[B.RPCEvents.VOICE_STATE_DELETE]={scope:(a={},a[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ],a),handler:function(e){var t=e.args.channel_id;if(!A.default.getChannel(t))throw new U.default(B.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+t);return function(e){var n=e.prevState,r=e.dispatch,a=A.default.getChannel(t);if(a){var o=a.getGuildId(),i=Object.values(k.default.getVoiceStatesForChannel(a.id));return M.default.differenceBy(n,i,(function(e){return e.userId})).forEach((function(e){return r((0,G.transformVoiceState)(o,a.id,e))})),i}}}},b[B.RPCEvents.VOICE_STATE_UPDATE]={scope:(o={},o[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ],o),handler:function(e){var t=e.args.channel_id;if(!A.default.getChannel(t))throw new U.default(B.RPCErrors.INVALID_CHANNEL,"Invalid channel id: "+t);return function(e){var n=e.prevState,r=e.dispatch,a=A.default.getChannel(t);if(a){var o=a.getGuildId(),i=Object.values(k.default.getVoiceStatesForChannel(a.id)).map((function(e){return(0,G.transformVoiceState)(o,a.id,e)}));return M.default.differenceWith(i,n,M.default.isEqual).forEach((function(e){return r(e)})),i}}}},b[B.RPCEvents.VOICE_SETTINGS_UPDATE]={scope:(i={},i[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ],i),handler:function(){return function(e){var t=e.prevState,n=e.dispatch,r=(0,G.getDeprecatedVoiceSettings)();return M.default.isEqual(r,t)||n(r),r}}},b[B.RPCEvents.VOICE_SETTINGS_UPDATE_2]={scope:B.RPC_LOCAL_SCOPE,handler:function(e){var t=e.socket;return function(e){var n=e.prevState,r=e.dispatch;if(null==t.application.id)return n;var a=(0,G.getVoiceSettings)(t.application.id);return M.default.isEqual(a,n)||r(a),a}}},b[B.RPCEvents.VOICE_CONNECTION_STATUS]={scope:(l={},l[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ],l),handler:function(){return function(e){var t=e.prevState,n=e.dispatch,r={state:(0,G.getVoiceConnectionState)(w.default.getState()),hostname:w.default.getHostname(),pings:w.default.getPings(),average_ping:w.default.getAveragePing(),last_ping:w.default.getLastPing()};return M.default.isEqual(r,t)||n(r),r}}},b[B.RPCEvents.MESSAGE_CREATE]={scope:B.OAuth2Scopes.RPC,handler:x},b[B.RPCEvents.MESSAGE_UPDATE]={scope:B.OAuth2Scopes.RPC,handler:x},b[B.RPCEvents.MESSAGE_DELETE]={scope:B.OAuth2Scopes.RPC,handler:x},b[B.RPCEvents.SPEAKING_START]=((u={})[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ,B.RPC_LOCAL_SCOPE],u.handler=V,u),b[B.RPCEvents.SPEAKING_STOP]=((s={})[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_VOICE_READ,B.RPC_LOCAL_SCOPE],s.handler=V,s),b[B.RPCEvents.GUILD_CREATE]={scope:B.OAuth2Scopes.RPC,handler:function(){}},b[B.RPCEvents.CHANNEL_CREATE]={scope:B.OAuth2Scopes.RPC,handler:function(){}},b[B.RPCEvents.GAME_JOIN]={scope:(d={},d[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.RPC_LOCAL_SCOPE],d),handler:function(){}},b[B.RPCEvents.GAME_SPECTATE]={scope:(f={},f[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.RPC_LOCAL_SCOPE],f),handler:function(){}},b[B.RPCEvents.ACTIVITY_JOIN]={scope:(c={},c[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],c),handler:function(){}},b[B.RPCEvents.ACTIVITY_JOIN_REQUEST]={scope:(p={},p[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.RPC_LOCAL_SCOPE],p),handler:function(){}},b[B.RPCEvents.ACTIVITY_SPECTATE]={scope:(v={},v[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],v),handler:function(){}},b[B.RPCEvents.ACTIVITY_INVITE]={scope:(y={},y[B.RPC_SCOPE_CONFIG.ANY]=[B.OAuth2Scopes.RPC,B.RPC_LOCAL_SCOPE],y),handler:function(){}},b[B.RPCEvents.VOICE_CHANNEL_SELECT]={scope:B.OAuth2Scopes.RPC,handler:function(){}},b[B.RPCEvents.NOTIFICATION_CREATE]={scope:(m={},m[B.RPC_SCOPE_CONFIG.ALL]=[B.OAuth2Scopes.RPC,B.OAuth2Scopes.RPC_NOTIFICATIONS_READ],m),handler:function(){}},b[B.RPCEvents.RELATIONSHIP_UPDATE]={scope:B.RPC_LOCAL_SCOPE,handler:function(){}},b[B.RPCEvents.CURRENT_USER_UPDATE]={scope:(_={},_[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_LOCAL_SCOPE,B.OAuth2Scopes.IDENTIFY],_),handler:function(){return function(e){var t=e.prevState,n=e.dispatch,r={currentUser:j.default.getNullableCurrentUser()};return null==r.currentUser||null!=t&&(0,N.default)(r,t)||n((0,F.default)(r.currentUser)),r}}},b[B.RPCEvents.LOBBY_UPDATE]={scope:(h={},h[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],h),handler:function(){}},b[B.RPCEvents.LOBBY_DELETE]={scope:(E={},E[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],E),handler:function(){}},b[B.RPCEvents.LOBBY_MEMBER_CONNECT]={scope:(g={},g[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],g),handler:function(){}},b[B.RPCEvents.LOBBY_MEMBER_UPDATE]={scope:(S={},S[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],S),handler:function(){}},b[B.RPCEvents.LOBBY_MEMBER_DISCONNECT]={scope:(O={},O[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],O),handler:function(){}},b[B.RPCEvents.LOBBY_MESSAGE]={scope:(I={},I[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_AUTHENTICATED_SCOPE,B.RPC_LOCAL_SCOPE],I),handler:function(){}},b[B.RPCEvents.OVERLAY_UPDATE]={scope:B.RPC_LOCAL_SCOPE,handler:function(e){var t=e.args.pid,n=e.socket;if("number"!=typeof t||t<10)throw new U.default(B.RPCErrors.INVALID_EVENT,"Invalid pid");return function(e){var r=e.prevState,a=e.dispatch,o=D.default.enabled,i=!0,l=n.application.id;if(null!=l){var u=R.default.getActiveLibraryApplication(l);null!=u&&(o=o&&u.isOverlayEnabled()),i=D.default.isInputLocked(t)}var s={enabled:o,locked:i};return M.default.isEqual(s,r)||a(s),s}}},b[B.RPCEvents.ENTITLEMENT_CREATE]={scope:(T={},T[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_LOCAL_SCOPE,B.RPC_AUTHENTICATED_SCOPE],T),handler:function(){}},b[B.RPCEvents.ENTITLEMENT_DELETE]={scope:(C={},C[B.RPC_SCOPE_CONFIG.ANY]=[B.RPC_LOCAL_SCOPE,B.RPC_AUTHENTICATED_SCOPE],C),handler:function(){}},b[B.RPCEvents.USER_ACHIEVEMENT_UPDATE]={scope:B.RPC_LOCAL_SCOPE,handler:function(){}},b);t.default=W},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=_(n(64)),o=_(n(8)),i=_(n(137)),l=_(n(142)),u=_(n(2)),s=_(n(26)),d=_(n(267)),f=_(n(43)),c=_(n(689)),p=n(8452),v=_(n(9659)),y=_(n(9660)),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,E(e,t)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){return(g=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}).apply(this,arguments)}try{r=f.default.requireModule("discord_erlpack")}catch(e){try{r=f.default.requireModule("erlpack")}catch(e){}}var S,O=f.default.requireModule("discord_rpc").RPCWebSocket,I=window.GLOBAL_ENV.MARKETING_ENDPOINT,T=new s.default("RPCServer:WSS"),C=[];function b(e){return"function"==typeof e?e():e}function M(e){void 0===e&&(e=0);var t=e>0?void 0:function(){if(b(S.listening)){var e=S.address().port;T.info("Starting on "+e),u.default.dispatch({type:m.ActionTypes.RPC_SERVER_READY,port:e})}};S.listen(m.RPC_STARTING_PORT+e%m.RPC_PORT_RANGE,"127.0.0.1",t)}function N(t,n,r,a,o){void 0===a&&(a=200),void 0===o&&(o={});var i=b(t.headers).origin?{"Access-Control-Allow-Origin":b(t.headers).origin,"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Methods":"POST, GET, PUT, PATCH, DELETE","Access-Control-Allow-Headers":["Content-Type","Authorization"].join(", ")}:{};r=r?JSON.stringify(r):"",a=200!==a||r.length?a:204,n.setHeader("Content-Length",e.byteLength(r)),n.setHeader("Content-Type","application/json"),n.writeHead(a,g({},o,{},i)),n.end(r)}function A(e,t,n,r,a){void 0===a&&(a=0),N(e,t,{code:a,message:r},n)}var P=function(e){function t(t,n,a){var o;if(o=e.call(this,"ws",n,a)||this,-1===["etf","json"].indexOf(a))throw new c.default(m.RPCCloseCodes.INVALID_ENCODING,"Invalid Encoding: "+a);if("etf"===a&&null==r)throw new c.default(m.RPCCloseCodes.INVALID_ENCODING,"Erlpack cannot be used on this client");return o._socket=t,o}h(t,e);var n=t.prototype;return n.send=function(e){(d.default.isLoggingOverlayEvents||e.cmd!==m.RPCCommands.OVERLAY&&e.evt!==m.RPCEvents.OVERLAY)&&T.info("Socket Emit: "+this.id,(0,v.default)(e)),null!=r&&"etf"===this.encoding?this._socket.send(r.pack(e),{binary:!0}):this._socket.send(JSON.stringify(e))},n.close=function(e,t){this._socket.close(e,t)},t}(y.default),R=function(e){function t(t,n,r,a){var o;if(o=e.call(this,"http",r,a)||this,"json"!==a)throw new c.default(m.RPCCloseCodes.INVALID_ENCODING,"Invalid Encoding: "+a);return o._sendCallback=t,o._closeCallback=n,o}h(t,e);var n=t.prototype;return n.send=function(e){(d.default.isLoggingOverlayEvents||e.cmd!==m.RPCCommands.OVERLAY)&&T.info("Socket Emit: "+this.id,e),this._sendCallback(e)},n.close=function(e,t){this._closeCallback(t,e)},t}(y.default),L=new(function(e){function t(){var t;t=e.call(this)||this;var n=0;(S=O.http.createServer()).on("error",(function(e){T.error("Error: "+e.message),("EADDRINUSE"===e.code||e.message.includes("EADDRINUSE"))&&setTimeout((function(){return M(++n)}),1e3)})),S.on("request",t.handleRequest.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t))),M(n);var r={instanceId:S.instanceId||0,server:S};return new O.ws.Server(r).on("connection",(function(e){return t.handleConnection(e)})),t}h(t,e);var n=t.prototype;return n.handleRequest=function(e,t){var n=this,r=b(e.url).split("?"),a=r[0],o=r[1],u=b(e.method);if("/rpc"!==a||"OPTIONS"!==u){var s="POST"===u;if("/rpc"!==a||"GET"!==u&&!s)A(e,t,404,"Not Found");else{var d=i.default.parse(o),f=s?b(e.headers)["content-type"].split("/")[1]:"json",c=function(){var e=l.default.parse(d.callback),n=e.protocol,r=e.host;n===location.protocol&&r===location.host?t.setHeader("Location",d.callback):t.setHeader("Location",I),t.writeHead(301),t.end()},v=new R(s?N.bind(null,e,t):c,s?A.bind(null,e,t,400):c,+d.v,f);s?(0,p.validateSocketClient)(v,b(e.headers).origin,d.client_id).then((function(){var r="";e.on("data",(function(e){return r+=e})),e.on("error",(function(){return A(e,t,500,"Internal Server Error")})),e.on("end",(function(){return n.handleMessage(v,r)}))})).catch((function(e){var t=e.code,n=e.message;return v.close(t,n)})):(v.authorization.scopes=[m.RPC_PRIVATE_LIMITED_SCOPE],this.handleMessage(v,decodeURIComponent(d.payload)))}}else N(e,t,{body:""})},n.handleConnection=function(e){var t,n=this,r=i.default.parse(b(e.upgradeReq).url.split("?")[1]),a=b(e.upgradeReq).headers.origin||"";try{t=new P(e,+r.v,r.encoding||"json")}catch(t){return void e.close(t.code,t.message)}T.info("Socket Opened: "+t.id),e.on("error",(function(e){return T.error("WS Error: "+e.message)})),e.on("close",(function(e,r){T.info("Socket Closed: "+t.id+", code "+e+", message "+r),o.default.remove(C,(function(e){return e===t})),n.emit("disconnect",t)})),(0,p.validateSocketClient)(t,a,r.client_id).then((function(){C.push(t),e.on("message",(function(e){return n.handleMessage(t,e)})),n.emit("connect",t)})).catch((function(e){var n=e.code,r=e.message;return t.close(n,r)}))},n.handleMessage=function(e,t){var n;try{if(null!=r&&"etf"===e.encoding)n=r.unpack(t);else{if("string"!=typeof t)throw new Error;n=JSON.parse(t)}}catch(t){return void e.close(m.RPCCloseCodes.CLOSE_UNSUPPORTED,"Payload not "+e.encoding)}(d.default.isLoggingOverlayEvents||n.cmd!==m.RPCCommands.OVERLAY)&&T.info("Socket Message: "+e.id,(0,v.default)(n)),this.emit("request",e,n)},t}(a.default));t.default=L}).call(this,n(396).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(396),a=c(n(64)),o=c(n(8)),i=c(n(26)),l=c(n(43)),u=n(8452),s=c(n(9659)),d=c(n(9660)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y,m=l.default.requireModule("discord_rpc").RPCIPC,_=new i.default("RPCServer:IPC"),h={HANDSHAKE:0,FRAME:1,CLOSE:2,PING:3,PONG:4};function E(e,t){null!=e.setHandshakeComplete?e.setHandshakeComplete(t):e._didHandshake=t}function g(e){return null!=e.getHandshakeComplete?e.getHandshakeComplete():e._didHandshake}function S(e){return new Promise((function(t,n){"string"==typeof e&&(e=m.net.createConnection(e)),e.pause(),e.on("readable",(function(){try{I(e)}catch(t){e.end(O(h.CLOSE,{code:1003,message:t.message})),e.destroy()}}));var r=function(){try{e.end(),e.destroy()}catch(e){}},a=Promise.race([new Promise((function(t){return e.on("error",(function(){return t()}))})),new Promise((function(t,n){e.on("pong",(function(){return n(new Error("socket responded with pong"))}))})),new Promise((function(e,t){setTimeout((function(){return t(new Error("socket alive timeout"))}),1e3)}))]).then((function(){r()}),(function(e){throw r(),e}));return e.write(O(h.PING,o.default.uniqueId())),a.then(t,n)}))}function O(e,t){t=JSON.stringify(t);var n=r.Buffer.byteLength(t),a=r.Buffer.alloc(8+n);return a.writeInt32LE(e,0),a.writeInt32LE(n,4),a.write(t,8,n),function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}(a)}function I(e){var t=e.read(8);if(t){var n=(t=r.Buffer.from(t)).readInt32LE(0),a=t.readInt32LE(4);if(!Object.values(h).includes(n)||a<0)throw new Error("protocol error");if(!(t=e.read(a)))throw new Error("data size does not match what was received");t=r.Buffer.from(t);var o=JSON.parse(t.toString());switch(n){case h.PING:e.emit("ping",o),e.write(O(h.PONG,o));break;case h.PONG:e.emit("pong",o);break;case h.HANDSHAKE:if(g(e))throw new Error("already did handshake");E(e,!0),e.emit("handshake",o);break;case h.FRAME:if(!g(e))throw new Error("did not handshake");e.emit("request",o);break;case h.CLOSE:e.end(),e.destroy()}I(e)}}var T=function(e){function t(t,n,r){var a;return(a=e.call(this,"ipc",n,r)||this)._socket=t,a}p(t,e);var n=t.prototype;return n.send=function(e){_.info("Socket Emit: "+this.id,(0,s.default)(e)),this._socket.write(O(h.FRAME,e))},n.close=function(e,t){this._socket.end(O(h.CLOSE,{code:e,message:t})),this._socket.destroy()},t}(d.default),C=new(function(e){function t(){var t;return t=e.call(this)||this,(y=m.net.createServer((function(e){return t.handleConnection(e)}))).on("error",(function(e){return _.error("Error: "+e.message)})),m.getAvailableSocket(S).then((function(e){y.listen(e,(function(){("function"==typeof y.listening?y.listening():y.listening)&&_.info("Starting on "+y.address())}))})),t}return p(t,e),t.prototype.handleConnection=function(e){var t=this;E(e,!1),e.pause(),e.on("readable",(function(){try{I(e)}catch(t){e.end(O(h.CLOSE,{code:f.RPCCloseCodes.CLOSE_UNSUPPORTED,message:t.message})),e.destroy()}})),e.once("handshake",(function(n){var r,a=n.client_id,o=+n.v;try{r=new T(e,o,"json")}catch(t){return e.end(O(h.CLOSE,{code:t.code,message:t.message})),void e.destroy()}_.info("Socket Opened: "+r.id),e.on("error",(function(e){return _.error("Socket Error: "+e.message)})),e.on("close",(function(){_.info("Socket Close: "+r.id),t.emit("disconnect",r)})),(0,u.validateSocketClient)(r,null,a).then((function(){e.on("request",(function(e){_.info("Socket Message: "+r.id,(0,s.default)(e)),t.emit("request",r,e)})),t.emit("connect",r)})).catch((function(e){var t=e.code,n=e.message;return r.close(t,n)}))}))},t}(a.default));t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(8480),i=n(1);var l={init:function(){a.default.subscribe(i.ActionTypes.USER_SETTINGS_UPDATE,o.refreshSearchTokens),a.default.subscribe(i.ActionTypes.I18N_LOAD_SUCCESS,o.refreshSearchTokens)}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=l(n(10)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d={init:function(){a.default.subscribe(i.ActionTypes.CHANNEL_DELETE,(function(e){var t=e.channel;if(null!=t.guild_id){var n=o.default.getAllThreadsForParent(t.id);if(n.length>0){r.default.Store.pauseEmittingChanges();try{for(var l,s=u(n);!(l=s()).done;){var d=l.value;a.default.dispatch({type:i.ActionTypes.THREAD_DELETE,channel:d,guildHashes:void 0})}}finally{r.default.Store.resumeEmittingChanges(),r.default.Store.emitChanges()}}}}))}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=m(n(2)),o=m(n(216)),i=m(n(486)),l=n(293),u=m(n(71)),s=m(n(256)),d=m(n(70)),f=m(n(12)),c=n(41),p=m(n(13)),v=m(n(11055)),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(){return(E=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}).apply(this,arguments)}var g=null;function S(e){var t,n,a,o,m,_,h,S=e.userId,O=e.section,I=e.guildId,T=void 0===I?y.ME:I,C=e.friendToken,b=f.default.getUser(S);if(null!=b){var M,N,A,P=s.default.getPrimaryActivity(S);null!=P&&(M=P.party,N=P.assets,A=null!=P.application_id?u.default.getGame(P.application_id):null);var R=s.default.getStatus(S),L=s.default.isMobileOnline(S),D=R;R===y.StatusTypes.ONLINE&&(D=L?y.AnalyticsUserStatusTypes.ONLINE_MOBILE:y.AnalyticsUserStatusTypes.ONLINE_DESKTOP),g=(0,c.openModal)((function(e){return r.createElement(v.default,E({},e,{user:b,guildId:T,friendToken:C,initialSection:O}))})),p.default.track(y.AnalyticEvents.OPEN_MODAL,{type:"Profile Modal",other_user_id:S,application_id:null!==(t=null==P?void 0:P.application_id)&&void 0!==t?t:null,application_name:null==P?void 0:P.name,sku_id:null!==(n=null===(a=A)||void 0===a?void 0:a.primarySkuId)&&void 0!==n?n:null,is_friend:d.default.isFriend(S),has_images:Boolean(null!=N&&(N.large_image||N.small_image)),party_max:null===(o=M)||void 0===o||null===(m=o.size)||void 0===m?void 0:m[1],party_id:null===(_=M)||void 0===_?void 0:_.id,party_platform:(0,l.isSpotifyParty)(null===(h=M)||void 0===h?void 0:h.id)?y.PlatformTypes.SPOTIFY:null,game_platform:(0,i.default)(P),profile_user_status:D,profile_has_nitro_customization:null!=b.banner})}}function O(){null!=g&&(0,c.closeModal)(g),g=null}var I=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var o=r.prototype;return o._initialize=function(){a.default.subscribe(y.ActionTypes.USER_PROFILE_MODAL_OPEN,S)},o._terminate=function(){a.default.subscribe(y.ActionTypes.USER_PROFILE_MODAL_CLOSE,O)},r}(o.default));t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=T(n(0)),o=O(n(9)),i=n(3),l=O(n(8257)),u=n(8298),s=O(n(707)),d=O(n(163)),f=O(n(11)),c=O(n(256)),p=O(n(12)),v=T(n(8293)),y=n(35),m=O(n(11056)),_=O(n(11077)),h=n(8433),E=n(1),g=O(n(6)),S=O(n(8003));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e){var t=e.user,n=e.isCurrentUser,r=e.section,a=e.setSection,o=e.hasActivity;return C("div",{className:S.default.tabBarContainer},void 0,C(v.default,{selectedItem:r,type:v.Types.TOP,onItemSelect:a,className:S.default.tabBar},void 0,t.bot?null:C(v.Item,{className:S.default.tabBarItem,id:h.UserProfileSections.USER_INFO},void 0,g.default.Messages.USER_INFO),!t.bot&&o?C(v.Item,{className:S.default.tabBarItem,id:h.UserProfileSections.ACTIVITY},void 0,g.default.Messages.USER_PROFILE_ACTIVITY):null,n?null:C(v.Item,{className:S.default.tabBarItem,id:h.UserProfileSections.MUTUAL_GUILDS},void 0,g.default.Messages.MUTUAL_GUILDS),t.bot||n?null:C(v.Item,{className:S.default.tabBarItem,id:h.UserProfileSections.MUTUAL_FRIENDS},void 0,g.default.Messages.MUTUAL_FRIENDS)))}function M(e){var t,n,r=e.user,v=e.guildId,O=e.friendToken,I=e.initialSection,T=void 0===I?h.UserProfileSections.USER_INFO:I,M=e.transitionState,N=e.onClose,A=(0,i.useStateFromStores)([p.default],(function(){return p.default.getUser(r.id)}))||r;(0,u.useSubscribeGuildMembers)(((t={})[v]=[A.id],t));var P=(0,i.useStateFromStores)([d.default],(function(){return null!=d.default.getStreamForUser(A.id)})),R=(0,i.useStateFromStores)([c.default],(function(){return c.default.findActivity(A.id,(function(e){return e.type!==E.ActivityTypes.CUSTOM_STATUS}))})),L=a.useState(A.bot?h.UserProfileSections.MUTUAL_GUILDS:T),D=L[0],w=L[1],j=(0,i.useStateFromStores)([f.default],(function(){return f.default.getId()===A.id})),k=null!=R||P,U=!j||k;return k||D!==h.UserProfileSections.ACTIVITY||w(h.UserProfileSections.USER_INFO),C(l.default,{section:E.AnalyticsSections.PROFILE_MODAL},void 0,C(y.ModalRoot,{transitionState:M,className:S.default.root,"aria-label":g.default.Messages.USER_PROFILE_MODAL},void 0,C("div",{className:S.default.topSection},void 0,C(_.default,{user:A,friendToken:O,onClose:N,isStreaming:(0,s.default)(R)}),U?C(b,{user:A,section:D,setSection:w,hasActivity:k,isCurrentUser:j}):null),C("div",{className:(0,o.default)(S.default.body,(n={},n[S.default.noTabBar]=!U,n))},void 0,C(m.default,{user:A,selectedSection:D,onClose:N}))))}b.displayName="UserProfileTabBar",M.displayName="UserProfileModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.user,n=e.selectedSection,r=e.onClose;switch(n){case u.UserProfileSections.ACTIVITY:return f(a.default,{user:t,onClose:r});case u.UserProfileSections.MUTUAL_GUILDS:return f(l.default,{user:t,onClose:r});case u.UserProfileSections.MUTUAL_FRIENDS:return f(i.default,{user:t});case u.UserProfileSections.USER_INFO:default:return f(o.default,{user:t})}};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(11057)),o=s(n(11058)),i=s(n(11059)),l=s(n(11060)),u=n(8433);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=m(n(0)),o=v(n(9)),i=n(3),l=m(n(8556)),u=v(n(163)),s=v(n(256)),d=n(272),f=n(1),c=v(n(7998)),p=v(n(7380));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.user,n=e.onClose,r=(0,i.useStateFromStores)([u.default],(function(){return null!=u.default.getStreamForUser(t.id)})),v=(0,i.useStateFromStores)([s.default],(function(){return s.default.getActivities(t.id)})),y=a.useMemo((function(){return v.filter((function(e){return e.type!==f.ActivityTypes.CUSTOM_STATUS}))}),[v]),m=a.useMemo((function(){return r?y.find((function(e){return e.type===f.ActivityTypes.PLAYING})):null}),[y,r]),h=a.useMemo((function(){return y.filter((function(e){return e!==m}))}),[m,y]);return _(d.ScrollerThin,{className:p.default.listScroller,fade:!0},void 0,r?_(l.default,{type:l.UserActivityTypes.PROFILE,user:t,source:"Profile Modal",className:(0,o.default)(c.default.userProfileActivity,"newProfileActivityStyles"),onOpenConnections:n,activity:m}):null,h.map((function(e){return _(l.default,{type:l.UserActivityTypes.PROFILE,activity:e,user:t,useStoreStream:!1,source:"Profile Modal",className:(0,o.default)(c.default.userProfileActivity,"newProfileActivityStyles"),onOpenConnections:n},e.application_id+"-"+e.session_id+"-"+e.name)})))}h.displayName="UserActivitySection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=T(n(9108)),l=T(n(1166)),u=T(n(183)),s=T(n(160)),d=T(n(271)),f=T(n(1175)),c=n(149),p=T(n(8744)),v=T(n(489)),y=T(n(47)),m=n(272),_=T(n(13)),h=T(n(8363)),E=T(n(9113)),g=n(1),S=T(n(6)),O=T(n(7999)),I=T(n(7380));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e){var t=e.connectedAccounts,n=e.theme;if(null==t||0===t.length)return null;var r=t.filter((function(e){return u.default.isSupported(e.type)})).map((function(e,t){var r,a,o=u.default.get(e.type),i=o.getPlatformUserUrl&&o.getPlatformUserUrl(e);return i&&(r=b(d.default,{href:i,onClick:function(){return t=e.type,void _.default.track(g.AnalyticEvents.CONNECTED_ACCOUNT_VIEWED,{platform_type:t});var t}},void 0,b(p.default,{className:O.default.connectedAccountOpenIcon}))),e.verified&&(a=b(c.TooltipContainer,{element:"span",text:S.default.Messages.CONNECTION_VERIFIED},void 0,b(f.default,{className:O.default.connectedAccountVerifiedIcon,color:n===g.ThemeTypes.LIGHT?g.Colors.STATUS_GREY_200:g.Colors.PRIMARY_DARK},void 0,b(v.default,{color:n===g.ThemeTypes.LIGHT?g.Colors.STATUS_GREY_500:g.Colors.WHITE})))),b("div",{className:O.default.connectedAccount},t,b("img",{alt:S.default.Messages.IMG_ALT_LOGO.format({name:o.name}),className:O.default.connectedAccountIcon,src:o.icon.color}),b("div",{className:O.default.connectedAccountNameInner},void 0,b("div",{className:O.default.connectedAccountName},void 0,e.name),a),r)}));return b("div",{className:O.default.userInfoSection},void 0,b("div",{className:O.default.connectedAccounts},void 0,r))}function N(){return b("div",{className:I.default.empty},void 0,b("div",{className:I.default.emptyIconStreamerMode}),b("div",{className:I.default.emptyText},void 0,S.default.Messages.STREAMER_MODE_ENABLED))}M.displayName="ConnectedUserAccounts",N.displayName="EmptyState";var A=b(N,{});function P(e){var t=e.user,n=(0,o.useStateFromStores)([h.default],(function(){var e,n;return null!==(e=null===(n=h.default.getUserProfile(t.id))||void 0===n?void 0:n.connectedAccounts)&&void 0!==e?e:[]})),r=(0,o.useStateFromStores)([s.default],(function(){return s.default.hidePersonalInformation})),u=(0,l.default)();return r?A:b(m.ScrollerThin,{fade:!0,className:O.default.infoScroller},void 0,b("div",{className:O.default.userInfoSection},void 0,t.bio&&a.createElement(a.Fragment,null,b(y.default,{size:y.default.Sizes.SIZE_12,className:O.default.userInfoSectionHeader,uppercase:!0},void 0,S.default.Messages.USER_PROFILE_ABOUT_ME),b(E.default,{className:O.default.userBio,userBio:t.bio})),b(y.default,{size:y.default.Sizes.SIZE_12,className:O.default.userInfoSectionHeader,uppercase:!0},void 0,S.default.Messages.NOTE),b(i.default,{userId:t.id,autoFocus:!1,className:O.default.note})),b(M,{connectedAccounts:n,theme:u}))}P.displayName="UserInfoBase"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(389),l=n(1150),u=h(n(8300)),s=h(n(8351)),d=h(n(61)),f=h(n(151)),c=h(n(279)),p=n(272),v=h(n(8363)),y=n(8310),m=h(n(6)),_=h(n(7380));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.user,n=e.status,r=e.onSelect,a=e.onContextMenu;return S(d.default,{className:_.default.listRow,onClick:function(){return r(t.id)},onContextMenu:function(e){return a(e,t)}},void 0,S(c.default,{src:t.getAvatarURL(void 0),"aria-label":t.username,size:c.default.Sizes.SIZE_40,status:n,className:_.default.listAvatar}),S(u.default,{user:t,className:_.default.listName,discriminatorClass:_.default.listDiscriminator}))}O.displayName="FriendRow";var I=S(f.default,{});function T(e){var t,n=e.user,r=(0,o.useStateFromStores)([v.default],(function(){return v.default.getMutualFriends(n.id)}));function u(e){(0,y.openUserProfileModal)({userId:e})}function d(e,t){(0,i.openContextMenu)(e,(function(e){return a.createElement(s.default,g({},e,{user:t}))}))}return a.useEffect((function(){null==r&&(0,l.fetchMutualFriends)(n.id)}),[r,n.id]),t=r?0===r.length?S("div",{className:_.default.empty},void 0,S("div",{className:_.default.emptyIconFriends}),S("div",{className:_.default.emptyText},void 0,m.default.Messages.NO_MUTUAL_FRIENDS)):r.map((function(e){return S(O,{user:e.user,status:e.status,onSelect:u,onContextMenu:d},e.key)})):S("div",{className:_.default.empty},void 0,I),S(p.ScrollerThin,{className:_.default.listScroller,fade:!0},void 0,t)}T.displayName="MutualFriends"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=T(n(0)),o=O(n(9)),i=n(3),l=n(389),u=n(687),s=O(n(1166)),d=O(n(8573)),f=n(42),c=O(n(36)),p=O(n(61)),v=O(n(371)),y=T(n(279)),m=n(272),_=O(n(8363)),h=n(1),E=O(n(6)),g=O(n(7380)),S=O(n(8e3));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e){var t=e.guild,n=e.nick,r=e.theme,a=e.onSelect,i=e.onContextMenu,l=e.user,u=l.hasAvatarForGuild(t.id);return b(p.default,{focusProps:{offset:{right:8}},className:g.default.listRow,onClick:function(){return a(t.id)},onContextMenu:function(e){return i(e,t)}},void 0,b(v.default,{tabIndex:-1,guild:t,showBadge:!0,className:(0,o.default)(g.default.listAvatar,null==t.icon?S.default.guildAvatarWithoutIcon:null),badgeStrokeColor:r===h.ThemeTypes.DARK?h.Colors.PRIMARY_DARK_600:h.Colors.WHITE,size:v.default.Sizes.MEDIUM,active:!0}),b("div",{className:g.default.listRowContent},void 0,b("div",{className:g.default.listName},void 0,t.toString()),u||null!=n?b("div",{className:S.default.guildNick},void 0,u&&b(y.default,{src:l.getAvatarURL(t.id),size:y.Sizes.SIZE_16,className:S.default.guildAvatar,"aria-hidden":!0}),null!=n?n:l.toString()):null))}function N(e){var t,n=e.user,r=e.onClose,o=(0,i.useStateFromStores)([_.default],(function(){return _.default.getMutualGuilds(n.id)})),p=(0,s.default)();function v(e){(0,f.transitionTo)(h.Routes.CHANNEL(e,c.default.getChannelId(e))),r(),(0,u.popLayer)()}function y(e,t){(0,l.openContextMenu)(e,(function(e){return a.createElement(d.default,C({},e,{guild:t}))}))}return t=null==o||0===o.length?b("div",{className:g.default.empty},void 0,b("div",{className:g.default.emptyIconGuilds}),b("div",{className:g.default.emptyText},void 0,E.default.Messages.NO_MUTUAL_GUILDS)):o.map((function(e){var t=e.guild,r=e.nick;return b(M,{user:n,guild:t,nick:r,theme:p,onSelect:v,onContextMenu:y},t.id)})),b(m.ScrollerThin,{className:g.default.listScroller,fade:!0},void 0,t)}M.displayName="GuildRow",N.displayName="MutualGuilds"},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=U;var r,a=L(n(0)),o=n(92),i=n(3),l=P(n(391)),u=n(389),s=n(687),d=P(n(1217)),f=P(n(473)),c=P(n(8300)),p=P(n(8732)),v=P(n(11078)),y=P(n(11)),m=P(n(256)),_=P(n(70)),h=P(n(61)),E=P(n(8663)),g=L(n(279)),S=P(n(24)),O=P(n(13)),I=P(n(43)),T=P(n(8363)),C=L(n(8822)),b=L(n(8827)),M=P(n(11079)),N=n(1),A=P(n(8002));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(){return(D=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}).apply(this,arguments)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e){var t=e.customStatusActivity;return w("div",{className:A.default.customStatusActivity},void 0,w(S.default,{size:S.default.Sizes.SIZE_14,color:S.default.Colors.HEADER_SECONDARY,className:A.default.customStatusText},void 0,w(p.default,{activity:t,className:A.default.customStatus,emojiClassName:A.default.customStatusEmoji,soloEmojiClassName:A.default.customStatusSoloEmoji})))}j.displayName="CustomStatusActivity";var k=I.default.getEnableHardwareAcceleration()?g.AnimatedAvatar:g.default;function U(e){var t=e.user,n=e.friendToken,r=e.isStreaming,p=e.onClose,S=(0,i.useStateFromStores)([_.default],(function(){return _.default.getRelationshipType(t.id)})),I=(0,i.useStateFromStores)([m.default],(function(){return m.default.isMobileOnline(t.id)})),P=(0,i.useStateFromStores)([m.default],(function(){return m.default.getStatus(t.id)})),R=(0,i.useStateFromStores)([T.default],(function(){return T.default.getUserProfile(t.id)})),L=(0,i.useStateFromStores)([y.default],(function(){return y.default.getId()===t.id})),U=(0,i.useStateFromStores)([m.default],(function(){return m.default.findActivity(t.id,(function(e){return e.type===N.ActivityTypes.CUSTOM_STATUS}))}));function G(){p(),(0,s.popLayer)()}function F(){d.default.removeRelationship(t.id,{location:"User Profile"})}function B(){l.default.openPrivateChannel(t.id),G()}function H(){try{d.default.addRelationship(t.id,{location:"User Profile"},N.RelationshipTypes.BLOCKED)}catch(e){G()}}return w("header",{},void 0,w(C.default,{onClose:G,user:t,bannerType:C.UserBannerTypes.PROFILE,guildId:void 0}),w("div",{className:A.default.header},void 0,w(k,{src:t.getAvatarURL(void 0,!0),size:g.Sizes.SIZE_120,className:A.default.avatar,status:r?o.StatusTypes.STREAMING:P,isMobile:I,statusTooltip:!0,"aria-label":t.username}),w("div",{className:A.default.headerTop},void 0,w(b.default,{user:t,className:A.default.badgeList,premiumSince:null==R?void 0:R.premiumSince,premiumGuildSince:null==R?void 0:R.premiumGuildSince,openPremiumSettings:function(){O.default.track(N.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:null,location_section:N.AnalyticsSections.PROFILE_MODAL,location_object:N.AnalyticsObjects.TOOLTIP}),G(),f.default.open(N.UserSettingsSections.PREMIUM)},size:b.BadgeSizes.SIZE_24,shrinkAtCount:8,shrinkToSize:b.BadgeSizes.SIZE_18}),w("div",{className:A.default.relationshipButtons},void 0,w(M.default,{user:t,isCurrentUser:L,relationshipType:S,onAddFriend:function(){try{d.default.addRelationship(t.id,{location:"User Profile"},void 0,n)}catch(e){G()}},onIgnoreFriend:F,onSendMessage:B}),L||t.isNonUserBot()?null:w(h.default,{focusProps:{offset:{left:8}},onClick:function(e){(0,u.openContextMenu)(e,(function(e){return a.createElement(v.default,D({},e,{relationshipType:S,onRemoveFriend:F,onBlock:H,onMessage:B}))}))}},void 0,w(E.default,{className:A.default.additionalActionsIcon}))))),w(c.default,{user:t,className:null!=U?A.default.nameTagWithCustomStatus:A.default.nameTagNoCustomStatus,usernameClass:A.default.username,discriminatorClass:A.default.discriminator,botClass:A.default.botTag}),U&&w(j,{customStatusActivity:U}))}U.displayName="UserProfileModalHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;f(n(0));var r,a,o=n(389),i=f(n(8253)),l=n(8256),u=n(1),s=(r=n(6))&&r.__esModule?r:{default:r};function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.relationshipType,n=e.onRemoveFriend,r=e.onBlock,a=e.onMessage,d=e.onSelect,f=[];switch(t){case u.RelationshipTypes.BLOCKED:f.push(c(i.MenuItem,{id:"user-unblock",label:s.default.Messages.UNBLOCK,action:n}));break;case u.RelationshipTypes.FRIEND:f.push(c(i.MenuItem,{id:"user-remove",label:s.default.Messages.REMOVE_FRIEND,action:n,color:l.MenuItemColor.DANGER})),f.push(c(i.MenuItem,{id:"user-block",label:s.default.Messages.BLOCK,action:r,color:l.MenuItemColor.DANGER}));break;case u.RelationshipTypes.NONE:case u.RelationshipTypes.PENDING_INCOMING:default:f.push(c(i.MenuItem,{id:"user-block",label:s.default.Messages.BLOCK,action:r,color:l.MenuItemColor.DANGER}))}return t!==u.RelationshipTypes.BLOCKED&&f.push(c(i.MenuItem,{id:"user-message",label:s.default.Messages.USER_POPOUT_MESSAGE,action:a})),c(i.default,{navId:"user-profile-actions","aria-label":s.default.Messages.USER_ACTIONS_MENU_LABEL,onClose:o.closeContextMenu,onSelect:d},void 0,c(i.MenuGroup,{},void 0,f))}p.displayName="UserProfileActionsMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(29)),l=n(1),u=d(n(6)),s=d(n(8001));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["className"]);return a.createElement(i.default,p({},n,{look:i.default.Looks.FILLED,size:i.default.Sizes.SMALL,className:(0,o.default)(s.default.actionButton,t)}))}function y(e){var t=e.isCurrentUser,n=e.user,r=e.relationshipType,a=e.onAddFriend,o=e.onIgnoreFriend,d=e.onSendMessage;return t||r===l.RelationshipTypes.BLOCKED?null:r===l.RelationshipTypes.FRIEND||n.bot?c(v,{color:i.default.Colors.GREEN,onClick:d},void 0,u.default.Messages.SEND_MESSAGE):r===l.RelationshipTypes.PENDING_OUTGOING?c(v,{color:i.default.Colors.GREEN,disabled:!0},void 0,u.default.Messages.ADD_FRIEND_BUTTON_AFTER):r===l.RelationshipTypes.PENDING_INCOMING?c("div",{className:s.default.pendingIncoming},void 0,c(v,{color:i.default.Colors.GREEN,onClick:a},void 0,u.default.Messages.FRIEND_REQUEST_ACCEPT),c(v,{color:i.default.Colors.GREY,onClick:o,className:s.default.actionRightButton},void 0,u.default.Messages.FRIEND_REQUEST_IGNORE)):c(v,{color:i.default.Colors.GREEN,onClick:a},void 0,u.default.Messages.ADD_FRIEND_BUTTON)}v.displayName="RequestActionButton",y.displayName="UserProfileFriendRequestButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;p(n(0));var r,a=f(n(2)),o=p(n(11081)),i=f(n(12)),l=n(1230),u=f(n(761)),s=n(41),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=v(o.default,{}),m={init:function(){a.default.subscribe(d.ActionTypes.CONNECTION_OPEN,this.handleRequiredAction),a.default.subscribe(d.ActionTypes.USER_REQUIRED_ACTION_UPDATE,this.handleRequiredAction),a.default.subscribe(d.ActionTypes.CURRENT_USER_UPDATE,this.handleCurrentUserUpdate),a.default.subscribe(d.ActionTypes.LOGOUT,this.handleLogout)},handleRequiredAction:function(e){var t=e.requiredAction;null==i.default.getNullableCurrentUser()?(0,l.closeFullScreenLayer)("verification"):t===d.UserRequiredActions.REQUIRE_CAPTCHA||t===d.UserRequiredActions.REQUIRE_VERIFIED_EMAIL||t===d.UserRequiredActions.REQUIRE_VERIFIED_PHONE?(0,l.openFullScreenLayer)((function(){return y}),{layerKey:"verification",Layer:u.default}):null==t&&(0,l.closeFullScreenLayer)("verification")},handleLogout:function(){(0,l.closeFullScreenLayer)("verification")},handleCurrentUserUpdate:function(e){e.user.verified&&(0,s.closeModal)(o.EMAIL_VERIFICATION_MODAL_KEY)}};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EMAIL_VERIFICATION_MODAL_KEY=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(3)),i=T(n(14)),l=T(n(363)),u=n(687),s=n(1171),d=T(n(403)),f=n(5831),c=T(n(8957)),p=T(n(39)),v=T(n(12)),y=T(n(11082)),m=T(n(761)),_=T(n(466)),h=n(41),E=T(n(24)),g=T(n(11084)),S=T(n(8447)),O=n(1),I=T(n(6));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.EMAIL_VERIFICATION_MODAL_KEY="Email Verification";var A=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={captchaKey:0},t.handleVerifyCaptcha=function(e){i.default.post({url:O.Endpoints.CAPTCHA,body:{captcha_key:e},oldFormErrors:!0}).then((function(){t.close()}),(function(){t.setState({captchaKey:t.state.captchaKey+1})}))},t.handleClick=function(e){e===O.VerificationTypes.EMAIL_OR_PHONE||e===O.VerificationTypes.EMAIL?t.handleVerifyEmail():t.handleVerifyPhone()},t.handleVerifyEmail=function(){(0,s.accountDetailsInit)(),(0,h.openModal)((function(e){return a.createElement(g.default,e)}),{modalKey:"Email Verification",Layer:m.default})},t.handleVerifyPhone=function(){(0,h.openModal)((function(e){return a.createElement(S.default,e)}),{modalKey:f.PHONE_VERIFICATION_MODAL_KEY,Layer:m.default})},t.close=function(){(0,u.popLayer)()},t.handleLogout=function(){(0,h.openModal)((function(e){return a.createElement(_.default,b({header:I.default.Messages.LOGOUT,confirmText:I.default.Messages.LOGOUT,cancelText:I.default.Messages.CANCEL,onConfirm:function(){return l.default.logout()}},e),M(E.default,{size:E.default.Sizes.SIZE_16},void 0,I.default.Messages.USER_SETTINGS_CONFIRM_LOGOUT))}),{Layer:m.default})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var o=r.prototype;return o.componentDidMount=function(){d.default.disable()},o.componentWillUnmount=function(){d.default.enable()},o.render=function(){var e=this.props,t=e.type,n=e.theme;return M(y.default,{type:t,captchaKey:this.state.captchaKey,onCaptchaVerify:this.handleVerifyCaptcha,theme:n,onClick:this.handleClick,onLogout:this.handleLogout})},r}(a.PureComponent);A.displayName="Verification";var P=o.default.connectStores([p.default,c.default,v.default],(function(){var e=v.default.getNullableCurrentUser(),t=c.default.getAction(),n=!!e&&null!=e.phone,r=O.VerificationTypes.CAPTCHA;return t===O.UserRequiredActions.REQUIRE_VERIFIED_EMAIL&&n?r=O.VerificationTypes.EMAIL:t===O.UserRequiredActions.REQUIRE_VERIFIED_EMAIL?r=O.VerificationTypes.EMAIL_OR_PHONE:t===O.UserRequiredActions.REQUIRE_VERIFIED_PHONE&&(r=O.VerificationTypes.PHONE),{theme:p.default.theme,type:r}}))(A);t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(93)),l=p(n(55)),u=p(n(11083)),s=n(1),d=p(n(6)),f=p(n(8004)),c=p(n(370));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props;(0,e.onClick)(e.type)},t}return m(t,e),t.prototype.render=function(){var e=this.props.type,t=function(e){switch(e){case s.VerificationTypes.EMAIL_OR_PHONE:return d.default.Messages.VERIFY_BY_EMAIL_FORMATTED.format();case s.VerificationTypes.PHONE:return d.default.Messages.VERIFY_BY_PHONE_FORMATTED.format();case s.VerificationTypes.EMAIL:return d.default.Messages.VERIFY_BY_EMAIL_FORMATTED.format()}}(e);return y(l.default,{className:f.default.verificationBlock,align:l.default.Align.CENTER,justify:l.default.Justify.CENTER,onClick:this.handleClick},void 0,y("div",{className:(0,o.default)(f.default.image,f.default[e])}),y("div",{className:f.default.body},void 0,t))},t}(a.PureComponent);h.displayName="VerificationBlock";var E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(e){var n=t.props.onClick;n&&n(e)},t}m(t,e);var n=t.prototype;return n.renderFields=function(){var e=this.props,t=e.type,n=e.captchaKey,r=e.theme,a=e.onCaptchaVerify,o=[];switch(t){case s.VerificationTypes.CAPTCHA:return y(u.default,{onVerify:a,theme:r},n);case s.VerificationTypes.EMAIL:return y(h,{type:s.VerificationTypes.EMAIL,onClick:this.handleClick},s.VerificationTypes.EMAIL);case s.VerificationTypes.EMAIL_OR_PHONE:o.push(y(h,{type:s.VerificationTypes.EMAIL_OR_PHONE,onClick:this.handleClick},s.VerificationTypes.EMAIL_OR_PHONE));case s.VerificationTypes.PHONE:o.push(y(h,{type:s.VerificationTypes.PHONE,onClick:this.handleClick},s.VerificationTypes.PHONE))}return o},n.render=function(){return y(l.default,{className:f.default.verification,align:l.default.Align.CENTER,direction:l.default.Direction.VERTICAL},void 0,y(l.default,{className:f.default.container,direction:l.default.Direction.VERTICAL,align:l.default.Align.CENTER,justify:l.default.Justify.CENTER},void 0,y("div",{className:f.default.image}),y("div",{className:(0,o.default)(f.default.title,c.default.marginTop20)},void 0,d.default.Messages.VERIFICATION_TITLE),y("div",{className:(0,o.default)(f.default.body,c.default.marginTop4,c.default.marginBottom20)},void 0,d.default.Messages.VERIFICATION_BODY.format()),y(l.default,{grow:0,justify:l.default.Justify.CENTER},void 0,this.renderFields())),y("div",{className:(0,o.default)(f.default.footer,c.default.marginTop20)},void 0,d.default.Messages.VERIFICATION_FOOTER),y(l.default,{className:(0,o.default)(c.default.marginTop4,c.default.marginBottom20),grow:0},void 0,y("div",{className:(0,o.default)(f.default.footer,f.default.footerAction)},void 0,d.default.Messages.VERIFICATION_FOOTER_SUPPORT.format({supportURL:i.default.getSubmitRequestURL()})),y("div",{className:(0,o.default)(f.default.footer,f.default.footerBullet)},void 0,"•"),y("div",{className:(0,o.default)(f.default.footer,f.default.footerAction)},void 0,d.default.Messages.VERIFICATION_FOOTER_LOGOUT.format({logoutOnClick:this.props.onLogout}))))},t}(a.PureComponent);E.displayName="Verification",E.defaultProps={type:s.VerificationTypes.CAPTCHA,onCaptchaVerify:s.NOOP,onLogout:s.NOOP};var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(1428))&&r.__esModule?r:{default:r},i=n(1);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}var s=function(e){return a.createElement(o.default,u({sitekey:i.RECAPTCHA_SITE_KEY},e))};s.displayName="Recaptcha",s.Themes={LIGHT:"light",DARK:"dark"},s.Sizes={COMPACT:"compact",NORMAL:"normal",INVISIBLE:"invisible"};var d=s;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=c(n(363)),l=n(1171),u=c(n(5956)),s=c(n(12)),d=c(n(11085)),f=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.transitionState,n=e.onClose,r=(0,o.useStateFromStores)([u.default],(function(){return u.default.getErrors()})),c=(0,o.useStateFromStores)([u.default],(function(){return u.default.getFormState()})),p=(0,o.useStateFromStores)([s.default],(function(){return s.default.getCurrentUser()})),y=null!=p.email,m=a.useState(!0),_=m[0],h=m[1],E=c===f.FormStates.SUBMITTING;function g(e){var t,n;return null!==(t=null==r||null===(n=r[e])||void 0===n?void 0:n[0])&&void 0!==t?t:""}var S=g("email"),O=g("password");return v(d.default,{transitionState:t,email:p.email,emailError:S,passwordError:O,submitting:E,canResend:_&&!E&&y&&0===S.length&&0===O.length,onChangeEmailClick:function(){h(!1)},onVerify:function(e,t){(0,l.saveAccountChanges)({email:e,password:t}),h(!0)},onResend:function(){i.default.verifyResend()},onClose:n})};y.displayName="EmailVerificationModal";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=g(n(0)),o=h(n(9)),i=h(n(5962)),l=h(n(98)),u=n(57),s=g(n(29)),d=h(n(153)),f=n(131),c=n(35),p=n(1),v=h(n(6)),y=h(n(8005)),m=h(n(1170)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(e){var t,r;function p(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._animItem=null,t._timeout=new u.Timeout,t._headerId=l.default.v4(),t.state={resent:!1,shouldClose:!1,email:"",password:""},t.setLottieRef=function(e){t._lottieRef=e},t.handleVerify=function(){(0,t.props.onVerify)(t.state.email,t.state.password)},t.handleResendEmail=function(){var e=t.props,n=e.onResend,r=e.onClose;n(),t.state.resent||(t.setState({resent:!0,shouldClose:!0}),t._timeout.start(3e3,(function(){t.state.shouldClose&&r()})))},t.handleChangeEmailClick=function(){var e=t.props.onChangeEmailClick;t.setState({resent:!1,shouldClose:!1}),e()},t.handleEmailChange=function(e){t.setState({email:e})},t.handlePasswordChange=function(e){t.setState({password:e})},t.handleKeyPress=function(e){var n=t.state,r=n.email,a=n.password;13===e.which&&r.length>0&&a.length>0&&(e.preventDefault(),t.handleVerify())},t}r=e,(t=p).prototype=Object.create(r.prototype),t.prototype.constructor=t,O(t,r);var h=p.prototype;return h.componentDidMount=function(){var e=this;n.e(79).then(function(t){var r=n(12005);e._animItem=i.default.loadAnimation({container:e._lottieRef,renderer:"svg",loop:!0,autoplay:!0,animationData:r})}.bind(null,n)).catch(n.oe)},h.componentWillUnmount=function(){this._timeout.stop(),null!=this._animItem&&(this._animItem.destroy(),this._animItem=void 0)},h.renderInputs=function(){var e=this.props,t=e.emailError,n=e.passwordError,r=e.submitting,a=this.state,o=a.email,i=a.password;return S("div",{className:y.default.container},void 0,S(f.FormItem,{title:v.default.Messages.FORM_LABEL_EMAIL,className:_.default.marginBottom20},void 0,S(d.default,{value:o,error:t,onChange:this.handleEmailChange,onKeyPress:this.handleKeyPress,autoFocus:!0})),S(f.FormItem,{title:v.default.Messages.FORM_LABEL_PASSWORD,className:_.default.marginBottom40},void 0,S(d.default,{type:"password",value:i,error:n,onChange:this.handlePasswordChange,onKeyPress:this.handleKeyPress})),S(s.default,{fullWidth:!0,size:s.default.Sizes.LARGE,onClick:this.handleVerify,submitting:r,disabled:0===o.length||0===i.length},void 0,v.default.Messages.VERIFY_ACCOUNT))},h.renderActions=function(){return S("div",{className:y.default.container},void 0,S(s.default,{className:_.default.marginTop20,fullWidth:!0,size:s.default.Sizes.LARGE,look:s.ButtonLooks.INVERTED,color:s.ButtonColors.PRIMARY,onClick:this.handleResendEmail},void 0,v.default.Messages.RESEND_EMAIL),S(s.default,{className:_.default.marginTop20,fullWidth:!0,size:s.default.Sizes.MEDIUM,look:s.ButtonLooks.LINK,color:s.ButtonColors.PRIMARY,onClick:this.handleChangeEmailClick},void 0,v.default.Messages.CHANGE_EMAIL))},h.render=function(){var e,t=this.state.resent,n=this.props,r=n.email,i=n.canResend,l=n.transitionState;return e=t&&null!=r?v.default.Messages.VERIFY_EMAIL_BODY_RESENT.format({email:r}):i?v.default.Messages.VERIFY_EMAIL_BODY:v.default.Messages.ENTER_EMAIL_BODY,S(c.ModalRoot,{transitionState:l,"aria-labelledby":this._headerId,className:(0,o.default)(y.default.emailVerificationModal,m.default.vertical,m.default.alignCenter,m.default.justifyCenter,_.default.marginTop60)},void 0,a.createElement("div",{className:y.default.animationContainer,ref:this.setLottieRef}),S("div",{className:(0,o.default)(y.default.title,_.default.marginBottom8)},void 0,v.default.Messages.VERIFY_BY_EMAIL),S("div",{className:(0,o.default)(y.default.body,_.default.marginBottom20)},void 0,e),i?this.renderActions():this.renderInputs())},p}(a.PureComponent);I.displayName="EmailVerificationModal",I.defaultProps={canResend:!1,onChangeEmailClick:p.NOOP,onVerify:function(e,t){},onResend:p.NOOP,onClose:p.NOOP};var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(34),o=S(n(2)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8788)),l=S(n(216)),u=S(n(294)),s=S(n(5952)),d=S(n(163)),f=S(n(10)),c=S(n(694)),p=S(n(51)),v=S(n(8789)),y=S(n(94)),m=S(n(36)),_=S(n(107)),h=S(n(80)),E=n(1);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){var e=r;if(null==e||!v.default.isOpen(e))return!1;o.default.wait((function(){return i.close(e)})),r=null}function T(){var e=y.default.getChannelId(),t=r===e;return function(){var e=y.default.getChannelId(),t=m.default.getChannelId();if(!p.default.supports(a.Features.VIDEO))return!0;if(s.default.getWindowOpen(E.PopoutWindowKeys.CHANNEL_CALL_POPOUT))return!0;var n=d.default.getAllActiveStreams().length>0;if(!(null!=e&&Object.values(h.default.getVideoVoiceStatesForChannel(e)).some((function(e){var t=e.userId;return!p.default.isLocalVideoDisabled(t)}))||n))return!0;var r=c.default.hasLayers();return(!r||!c.default.getLayers().includes(E.Layers.RTC_DEBUG))&&(!!r||!(e!==t))}()?I():(t||I(),null!=e&&function(e){var t=f.default.getChannel(e);if(null==t||v.default.isOpen(e))return!1;o.default.wait((function(){return i.open(t.id,E.PictureInPictureComponents.VIDEO,{channel:t})})),r=e}(e))}var C=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var a=r.prototype;return a._initialize=function(){m.default.addChangeListener(T),_.default.addChangeListener(T),y.default.addChangeListener(T),h.default.addChangeListener(T),c.default.addChangeListener(T),d.default.addChangeListener(T),s.default.addChangeListener(T),p.default.addChangeListener(T),u.default.addChangeListener(T)},a._terminate=function(){m.default.removeChangeListener(T),_.default.removeChangeListener(T),y.default.removeChangeListener(T),h.default.removeChangeListener(T),c.default.removeChangeListener(T),d.default.removeChangeListener(T),s.default.removeChangeListener(T),p.default.removeChangeListener(T),u.default.removeChangeListener(T)},r}(l.default));t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldImmediatelyRequestVoicePermissions=E,t.default=void 0;var r=y(n(2)),a=y(n(216)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(773)),i=y(n(205)),l=n(304),u=y(n(1305)),s=y(n(11)),d=y(n(10)),f=y(n(51)),c=y(n(94)),p=n(1);function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=new Set;function h(){o.default.requestPermission(o.NativePermissionTypes.AUDIO),f.default.getMode()===p.InputModes.PUSH_TO_TALK&&o.default.requestPermission(o.NativePermissionTypes.INPUT_MONITORING)}function E(e,t){var n;return!(null===(n=d.default.getChannel(t))||void 0===n?void 0:n.isListenModeCapable())||i.default.isSpeaker(e,t)}var g=new(function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var o=a.prototype;return o._initialize=function(){r.default.subscribe(p.ActionTypes.VOICE_STATE_UPDATE,this.handleVoiceStateUpdate)},o._terminate=function(){r.default.unsubscribe(p.ActionTypes.VOICE_STATE_UPDATE,this.handleVoiceStateUpdate)},o.handleVoiceStateUpdate=function(e){e.type;var t=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["type"]),n=t.userId,r=t.channelId;if(null!=r&&(s.default.getId()===n&&null!=c.default.getRTCConnectionId()&&!_.has(r))){var a;if(E(n,r))return _.add(r),void h();(a=new u.default(t),(0,l.getAudienceRequestToSpeakState)(a)===l.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK)&&(_.add(r),h())}},a}(a.default));t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(57),a=v(n(2)),o=v(n(132)),i=v(n(216)),l=v(n(163)),u=v(n(10)),s=v(n(15)),d=v(n(428)),f=v(n(94)),c=v(n(16)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=new r.Timeout,_=new r.Timeout,h=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var i=r.prototype;return i._initialize=function(){a.default.subscribe(p.ActionTypes.IDLE,this.handleIdleUpdate)},i._terminate=function(){m.stop(),_.stop(),a.default.unsubscribe(p.ActionTypes.IDLE,this.handleIdleUpdate)},i.handleIdleUpdate=function(){var e=d.default.getIdleSince();if(c.default.embedded){m.stop(),_.stop();var t=l.default.getAllActiveStreams();for(var n in t)if(t[n].state!==p.ApplicationStreamStates.ENDED)return;if(null!=e){var r=f.default.getChannelId();if(null!=r){_.start(18e6,(function(){o.default.selectVoiceChannel(null)}));var a=s.default.getGuild(f.default.getGuildId());if(null!=a&&null!=a.afkChannelId&&a.afkChannelId!==r&&null!=a.afkTimeout){var i=u.default.getChannel(r);null!=i&&(i.isGuildStageVoice()||m.start(e+1e3*a.afkTimeout-Date.now(),(function(){null!=(a=s.default.getGuild(f.default.getGuildId()))&&null!=a.afkChannelId&&o.default.selectVoiceChannel(a.afkChannelId)})))}}}}},r}(i.default));t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;p(n(0));var r,a=f(n(8)),o=n(34),i=f(n(11090)),l=n(41),u=f(n(738)),s=p(n(11092)),d=f(n(51));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=new Set(["DisplayPort"]),m=!1;function _(){if(!m){var e=d.default.getInputDeviceId(),t=d.default.getOutputDeviceId();if(!s.default.getState().neverShowModal&&!a.default.isEmpty(s.default.lastDeviceConnected)){var n=(0,s.extractDisplayName)(d.default.getInputDevices()[e]),r=(0,s.extractDisplayName)(d.default.getOutputDevices()[t]);if(!a.default.some(s.default.lastDeviceConnected,(function(e){return y.has(e.displayName)||e.displayName===n||e.displayName===r}))){var f=a.default.some(s.default.lastDeviceConnected,(function(e){return u.default.isCertified(s.default.inputDevices[e.displayName])||u.default.isCertified(s.default.outputDevices[e.displayName])}));if(!(e===o.DEFAULT_DEVICE_ID&&s.default.lastInputSystemDevice.justChanged||t===o.DEFAULT_DEVICE_ID&&s.default.lastOutputSystemDevice.justChanged)||f){var c,p=a.default.first(Object.keys(s.default.lastDeviceConnected)),_=p?s.default.lastDeviceConnected[p]:null;if(null!=_)s.default.initialized&&null!=p&&(u.default.isCertified(s.default.inputDevices[p])?c=u.default.getCertifiedDevice(s.default.inputDevices[p]):u.default.isCertified(s.default.outputDevices[p])&&(c=u.default.getCertifiedDevice(s.default.outputDevices[p]))),m=!0,(0,l.openModal)((function(e){var t=e.transitionState,n=e.onClose;return v(i.default,{device:_,certifiedDeviceMetadata:c,transitionState:t,onClose:function(){m=!1,n()}})}))}}}}}var h={init:function(){s.default.addChangeListener(_)}};t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=E(n(0)),i=E(n(11091)),l=_(n(29)),u=_(n(55)),s=_(n(1162)),d=n(35),f=_(n(47)),c=_(n(24)),p=_(n(13)),v=n(1),y=_(n(6)),m=_(n(8006));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){switch(e){case v.ConnectedDeviceType.INPUT:return v.ConnectedDevicePreference.INPUT;case v.ConnectedDeviceType.OUTPUT:return v.ConnectedDevicePreference.OUTPUT;case v.ConnectedDeviceType.INPUT_AND_OUTPUT:return v.ConnectedDevicePreference.INPUT_AND_OUTPUT;default:return null}}!function(e){e.CERTIFIED="New Audio Device Detected - Certified",e.NOT_CERTIFIED="New Audio Device Detected - Not Certified"}(a||(a={}));var I=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).confirm=function(){var e=n.props,t=e.device,r=e.onClose,a=n.state.devicePreference;null!=a&&(i.setDevice(t.displayName,a,"New Audio Device Detected Modal"),r())},n.cancel=function(){var e=n.props,t=e.device,r=e.onClose;i.ignoreDevice(t.displayName),r()},n.neverShow=function(){var e=n.props,t=e.certifiedDeviceMetadata,r=e.onClose;i.neverShowModal(),r(),p.default.track(v.AnalyticEvents.MODAL_DISMISSED,{type:null!=t?a.CERTIFIED:a.NOT_CERTIFIED,dismiss_type:"permanent"})},n.handleConnectedDeviceType=function(e){var t=e.value;n.setState({devicePreference:t})},n.state={devicePreference:null!=t.device?O(t.device.type):null},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var _=r.prototype;return _.track=function(){var e=this.props,t=e.certifiedDeviceMetadata,n=e.device;p.default.track(v.AnalyticEvents.OPEN_MODAL,{type:null!=t?a.CERTIFIED:a.NOT_CERTIFIED,device_name:null!=t?t.vendor.name+" "+t.model.name:n.displayName})},_.componentDidMount=function(){this.track()},_.componentDidUpdate=function(e){this.props.device.displayName!==e.device.displayName&&this.track()},_.renderBody=function(){var e,t=this.props,n=t.device,r=t.certifiedDeviceMetadata,a=this.state.devicePreference;switch(n.type){case v.ConnectedDeviceType.INPUT:e=null!=r?y.default.Messages.CERTIFIED_DEVICE_RECOMMENDATION_AUDIO_INPUT_BODY.format({vendorName:r.vendor.name,modelName:r.model.name}):y.default.Messages.CONNECTED_DEVICE_DETECTED_INPUT_BODY.format({name:n.displayName});break;case v.ConnectedDeviceType.OUTPUT:e=null!=r?y.default.Messages.CERTIFIED_DEVICE_RECOMMENDATION_AUDIO_OUTPUT_BODY.format({vendorName:r.vendor.name,modelName:r.model.name}):y.default.Messages.CONNECTED_DEVICE_DETECTED_OUTPUT_BODY.format({name:n.displayName});break;default:e=g(o.Fragment,{},void 0,null!=r?y.default.Messages.CERTIFIED_DEVICE_RECOMMENDATION_AUDIO_INPUT_AND_OUTPUT_BODY.format({vendorName:r.vendor.name,modelName:r.model.name}):y.default.Messages.CONNECTED_DEVICE_DETECTED_INPUT_AND_OUTPUT_BODY.format({name:n.displayName}),g(s.default,{value:a,className:m.default.options,onChange:this.handleConnectedDeviceType,options:[{name:y.default.Messages.CONNECTED_DEVICE_DETECTED_OPTION_INPUT_AND_OUTPUT,value:v.ConnectedDevicePreference.INPUT_AND_OUTPUT},{name:y.default.Messages.CONNECTED_DEVICE_DETECTED_OPTION_INPUT,value:v.ConnectedDevicePreference.INPUT},{name:y.default.Messages.CONNECTED_DEVICE_DETECTED_OPTION_OUTPUT,value:v.ConnectedDevicePreference.OUTPUT}]}))}return g(o.Fragment,{},n.displayName,e,g(l.default,{className:m.default.neverShow,look:l.default.Looks.LINK,color:l.default.Colors.LINK,onClick:this.neverShow},void 0,y.default.Messages.DONT_SHOW_AGAIN))},_.render=function(){var e=this.props,t=e.certifiedDeviceMetadata,n=e.transitionState,r=null!=t?y.default.Messages.CERTIFIED_DEVICE_RECOMMENDATION_TITLE:y.default.Messages.CONNECTED_DEVICE_DETECTED_TITLE;return g(d.ModalRoot,{transitionState:n,"aria-label":r},void 0,g(d.ModalHeader,{separator:!1},void 0,g(f.default,{tag:f.default.Tags.H2,size:f.default.Sizes.SIZE_20},void 0,r)),g(d.ModalContent,{},void 0,g(c.default,{size:c.default.Sizes.SIZE_16},void 0,this.renderBody())),g(d.ModalFooter,{},void 0,g(u.default,{justify:u.default.Justify.END},void 0,g(l.default,{color:l.default.Colors.PRIMARY,onClick:this.cancel,className:m.default.cancelButton},void 0,y.default.Messages.CONNECTED_DEVICE_DETECTED_CANCEL_BUTTON),g(l.default,{onClick:this.confirm},void 0,y.default.Messages.CONNECTED_DEVICE_DETECTED_CONFIRM_BUTTON))))},r}(o.Component);t.default=I,I.displayName="ConnectedDevice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setDevice=function(e,t,n){a.default.dispatch({type:o.ActionTypes.CONNECTED_DEVICE_SET,displayName:e,connectedDevicePreference:t,location:n})},t.ignoreDevice=function(e){a.default.dispatch({type:o.ActionTypes.CONNECTED_DEVICE_IGNORE,displayName:e})},t.neverShowModal=function(){a.default.dispatch({type:o.ActionTypes.CONNECTED_DEVICE_NEVER_SHOW_MODAL})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractDisplayName=C,t.default=void 0;var r=p(n(8)),a=p(n(3)),o=n(34),i=p(n(2)),l=p(n(288)),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(16)),s=p(n(51)),d=p(n(39)),f=n(1);function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m={},_=m,h=!1,E={},g={},S={},O={id:null,justChanged:!1},I={id:null,justChanged:!1},T=/\(([^)]+)\)/;function C(e){if(u.default.getPlatform()===u.PlatformTypes.WINDOWS){var t=e.name.match(T);if(null!=t)return t[1]}return e.name}function b(e,t,n){return null==e||e.displayName!==t?{displayName:t,type:n}:e.type===f.ConnectedDeviceType.INPUT&&n===f.ConnectedDeviceType.OUTPUT||e.type===f.ConnectedDeviceType.OUTPUT&&n===f.ConnectedDeviceType.INPUT?{displayName:t,type:f.ConnectedDeviceType.INPUT_AND_OUTPUT}:e}var M=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a,o,i,l=r.prototype;return l.initialize=function(e){this.waitFor(s.default,d.default),_=e||m},l.getState=function(){return _},a=r,(o=[{key:"initialized",get:function(){return h}},{key:"lastDeviceConnected",get:function(){return S}},{key:"inputDevices",get:function(){return E}},{key:"lastInputSystemDevice",get:function(){return O}},{key:"outputDevices",get:function(){return g}},{key:"lastOutputSystemDevice",get:function(){return I}}])&&v(a.prototype,o),i&&v(a,i),r}(a.default.PersistedStore);M.persistKey="ConnectedDeviceStore";var N=new M(i.default,{MEDIA_ENGINE_DEVICES:function(e){var t=e.inputDevices,n=e.outputDevices,a={};O.justChanged=!1,t.forEach((function(e){if(a[C(e)]=e.id,e.id===o.DEFAULT_DEVICE_ID){var t=e.originalId||e.originalName;t!==O.id&&(O.justChanged=!0),O.id=t}}));var i={};if(I.justChanged=!1,n.forEach((function(e){if(i[C(e)]=e.id,e.id===o.DEFAULT_DEVICE_ID){var t=e.originalId||e.originalName;t!==I.id&&(I.justChanged=!0),I.id=t}})),!h)return E=a,g=i,void(h=!0);var l=Object.keys(E),u=Object.keys(a),s=Object.keys(g),d=Object.keys(i),c=r.default.difference(l,u),p=r.default.difference(s,d);return c.length>0||p.length>0?S={}:(r.default.difference(u,l).forEach((function(e){S[e]=b(S[e],e,f.ConnectedDeviceType.INPUT)})),r.default.difference(d,s).forEach((function(e){S[e]=b(S[e],e,f.ConnectedDeviceType.OUTPUT)}))),(!r.default.isEqual(l,u)||!r.default.isEqual(s,d))&&(E=a,g=i,!0)},CONNECTED_DEVICE_SET:function(e){var t=e.displayName;!function(e,t,n){if(t===f.ConnectedDevicePreference.INPUT||t===f.ConnectedDevicePreference.INPUT_AND_OUTPUT){var r=E[e];null!=r&&i.default.wait((function(){return l.default.setInputDevice(r,n)}))}if(t===f.ConnectedDevicePreference.OUTPUT||t===f.ConnectedDevicePreference.INPUT_AND_OUTPUT){var a=g[e];i.default.wait((function(){return l.default.setOutputDevice(a,n)}))}}(t,e.connectedDevicePreference,e.location),delete S[t]},CONNECTED_DEVICE_IGNORE:function(e){var t=e.displayName;delete S[t]},CONNECTED_DEVICE_NEVER_SHOW_MODAL:function(e){return S={},void(_={neverShowModal:!0})}});t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(2)),o=u(n(11094)),i=n(41),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=!1,c=null;var p={init:function(){a.default.subscribe(l.ActionTypes.CONNECTION_OPEN,(function(e){var t=e.pendingPayments;if(t&&t.length>0){if(c===t[0])return;if(null==(c=t[0]))return;!function(e){f||(f=!0,(0,i.openModal)((function(t){var n=t.transitionState,r=t.onClose;return d(o.default,{pendingPayment:e,transitionState:n,onClose:function(){f=!1,r()}})})))}(c)}}))}};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=E(n(0)),i=n(287),l=E(n(29)),u=n(35),s=_(n(47)),d=_(n(24)),f=_(n(13)),c=n(281),p=n(295),v=n(1),y=_(n(6)),m=_(n(8007));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){S(o,r,a,i,l,"next",e)}function l(e){S(o,r,a,i,l,"throw",e)}i(void 0)}))}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){e[e.START=0]="START",e[e.FAIL=1]="FAIL",e[e.SUCCESS=2]="SUCCESS",e[e.CANCELED=3]="CANCELED"}(a||(a={}));var T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={step:a.START},t.close=O(regeneratorRuntime.mark((function e(){var n,r,o,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.step,r=t.props,o=r.onClose,l=r.pendingPayment,n!==a.START){e.next=5;break}return e.next=5,(0,i.voidPendingPayment)(l.id);case 5:o();case 6:case"end":return e.stop()}}),e)}))),t.cancelPayment=O(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props.pendingPayment,e.prev=1,e.next=4,(0,i.voidPendingPayment)(n.id);case 4:e.next=10;break;case 6:throw e.prev=6,e.t0=e.catch(1),t.setState({step:a.CANCELED}),e.t0;case 10:t.setState({step:a.CANCELED});case 11:case"end":return e.stop()}}),e,null,[[1,6]])}))),t.handleAuthenticate=O(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props.pendingPayment,e.next=3,(0,p.authenticatePaymentIntentForPaymentId)(n.id);case 3:r=e.sent,null!=r.error?t.setState({step:a.FAIL}):t.setState({step:a.SUCCESS});case 6:case"end":return e.stop()}}),e)}))),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var _=r.prototype;return _.componentDidMount=function(){f.default.track(v.AnalyticEvents.OPEN_MODAL,{type:v.AnalyticsSections.PAYMENT_AUTHENTICATION_MODAL})},_.componentWillUnmount=function(){f.default.track(v.AnalyticEvents.MODAL_DISMISSED,{type:v.AnalyticsSections.PAYMENT_AUTHENTICATION_MODAL})},_.getTitle=function(){switch(this.state.step){case a.START:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_TITLE;case a.SUCCESS:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_TITLE_SUCCESS;case a.CANCELED:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_TITLE_CANCELED;case a.FAIL:default:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_TITLE_FAIL}},_.getImageStyle=function(){switch(this.state.step){case a.START:return m.default.authenticationRequiredImage;case a.SUCCESS:return m.default.authenticationSuccessImage;case a.CANCELED:case a.FAIL:default:return m.default.authenticationFailImage}},_.getMessage=function(){var e=this.state.step,t=this.props.pendingPayment;switch(e){case a.START:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_START.format({price:(0,c.formatPrice)(t.amount,t.currency),item:t.description});case a.SUCCESS:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_SUCCESS;case a.CANCELED:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_CANCELED.format({item:t.description});case a.FAIL:default:return y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_FAIL}},_.renderButtons=function(){switch(this.state.step){case a.START:return g(o.Fragment,{},void 0,g(l.default,{color:l.ButtonColors.BRAND,onClick:this.handleAuthenticate},void 0,y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_BUTTON),g(l.default,{look:l.default.Looks.LINK,size:l.default.Sizes.NONE,color:l.default.Colors.PRIMARY,onClick:this.cancelPayment,className:m.default.cancelButton},void 0,y.default.Messages.PAYMENT_AUTHENTICATION_MODAL_BUTTON_CANCEL_PAYMENT));case a.SUCCESS:case a.CANCELED:case a.FAIL:default:return g(l.default,{color:l.ButtonColors.BRAND,onClick:this.close},void 0,y.default.Messages.CLOSE)}},_.render=function(){var e=this.props.transitionState;return g(u.ModalRoot,{transitionState:e,className:m.default.modal,size:u.ModalSize.SMALL,"aria-label":this.getTitle()},void 0,g(u.ModalHeader,{},void 0,g(s.default,{size:s.default.Sizes.SIZE_20},void 0,g("span",{className:m.default.modalTitle},void 0,this.getTitle())),g(u.ModalCloseButton,{className:m.default.closeIcon,onClick:this.close})),g(u.ModalContent,{className:m.default.content},void 0,g("div",{className:this.getImageStyle()}),g(d.default,{size:d.default.Sizes.SIZE_16},void 0,this.getMessage())),g(u.ModalFooter,{className:m.default.footer},void 0,this.renderButtons()))},r}(o.Component);t.default=T,T.displayName="PaymentAuthenticationModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(11096)),a=o(n(9153));function o(e){return e&&e.__esModule?e:{default:e}}var i=!1;function l(){i||a.default.getWillShow()&&(i=!0,(0,r.default)())}var u={init:function(){a.default.addChangeListener(l)}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,a.openModal)((function(e){return React.createElement(o.default,e)}))};var r,a=n(41),o=(r=n(11097))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(29)),o=n(85),i=y(n(8903)),l=y(n(5951)),u=y(n(8287)),s=n(35),d=y(n(47)),f=y(n(24)),c=y(n(5945)),p=y(n(6)),v=y(n(8008));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_(c.default,{src:"",poster:"",width:440,height:268,loop:!0,muted:!0,autoPlay:!0}),E=_(l.default,{width:24,height:24}),g=_(i.default,{width:22,height:22}),S=_(u.default,{width:24,height:24}),O=function(e){var t=e.transitionState,r=e.onClose,i=(0,o.useUID)();return _(s.ModalRoot,{"aria-labelledby":i,transitionState:t},void 0,_("div",{className:v.default.video},void 0,_("img",{className:v.default.videoFrame,alt:"",src:n(11098)}),h),_("div",{className:v.default.content},void 0,_(d.default,{id:i,className:v.default.header,tag:d.default.Tags.H2,size:d.default.Sizes.SIZE_24},void 0,p.default.Messages.THREAD_WELCOME_TITLE),_(f.default,{size:f.default.Sizes.SIZE_16,color:f.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.THREAD_WELCOME_SUBTITLE),_("ul",{className:v.default.features},void 0,_("li",{},void 0,_("div",{className:v.default.icon},void 0,E),_(f.default,{color:f.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.THREAD_WELCOME_FEATURE_CREATE)),_("li",{},void 0,_("div",{className:v.default.icon},void 0,g),_(f.default,{color:f.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.THREAD_WELCOME_FEATURE_ARCHIVE)),_("li",{},void 0,_("div",{className:v.default.icon},void 0,S),_(f.default,{color:f.default.Colors.HEADER_SECONDARY},void 0,p.default.Messages.THREAD_WELCOME_FEATURE_JOIN))),_(a.default,{onClick:r,fullWidth:!0},void 0,p.default.Messages.TUTORIAL_CLOSE)))};O.displayName="ThreadsWelcomeModal";var I=O;t.default=I},function(e,t,n){e.exports=n.p+"6c5d2f2f4adbd6b25deb1008a14c8223.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=d(n(2)),o=d(n(1357)),i=d(n(10)),l=d(n(36)),u=d(n(1408)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){!function(){var e=l.default.getVoiceChannelId(),t=o.default.bitrate;if(null!=e){var n=i.default.getChannel(e);null!=n&&t!==n.bitrate&&a.default.dispatch({type:"SET_CHANNEL_BITRATE",bitrate:n.bitrate})}}(),function(){var e,t=l.default.getVoiceChannelId(),n=u.default.mode;if(null!=t){var r=i.default.getChannel(t);if(null!=r){var o=null!==(e=r.videoQualityMode)&&void 0!==e?e:s.VideoQualityMode.AUTO;n!==o&&a.default.dispatch({type:"SET_CHANNEL_VIDEO_QUALITY_MODE",mode:o})}}}()}function v(e){r=e.sessionId}function y(e){for(var t,n=f(e.updates);!(t=n()).done;){var r=t.value.channel;l.default.getVoiceChannelId()===r.id&&p()}}function m(e){r===e.sessionId&&p()}var _={init:function(){a.default.subscribe(s.ActionTypes.CONNECTION_OPEN,v),a.default.subscribe(s.ActionTypes.CHANNEL_UPDATES,y),a.default.subscribe(s.ActionTypes.VOICE_STATE_UPDATE,m)}};t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(23)),i=O(n(11101)),l=O(n(8535)),u=O(n(403)),s=O(n(105)),d=n(121),f=O(n(11102)),c=O(n(11104)),p=O(n(11105)),v=O(n(11706)),y=O(n(11709)),m=O(n(11713)),_=O(n(10344)),h=O(n(9189)),E=O(n(11742)),g=n(1),S=O(n(6128));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=T(p.default,{}),b=T(f.default,{}),M=T(c.default,{}),N=T(i.default,{}),A=T(v.default,{}),P=T(_.default,{}),R=T(h.default,{}),L=T(y.default,{});function D(){var e=a.useRef(null),t=a.useCallback((function(t){var n=t.duration,r=t.intensity;if(!s.default.useReducedMotion){var a=e.current;(0,o.default)(null!=a,"Shakeable is shaken when not mounted"),a.shake(n,r)}}),[]);return a.useEffect((function(){return u.default.setLayout(l.default),u.default.enable(),function(){return u.default.disable()}}),[]),a.useEffect((function(){return d.ComponentDispatch.subscribe(g.ComponentActions.SHAKE_APP,t),function(){d.ComponentDispatch.unsubscribe(g.ComponentActions.SHAKE_APP,t)}}),[t]),a.createElement(E.default,{ref:e,className:S.default.app},T(m.default,{className:S.default.layers},void 0,C),b,M,N,A,P,R,L)}D.displayName="Chat";var w=a.memo(D);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return a.createElement(a.Fragment,null,D,w,j,k,U,G,F)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(140),l=n(304),u=n(31),s=O(n(163)),d=O(n(11)),f=O(n(10)),c=O(n(15)),p=O(n(51)),v=O(n(8359)),y=O(n(94)),m=O(n(36)),_=O(n(283)),h=O(n(80)),E=O(n(365)),g=n(1247),S=n(1);function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t,n){a.useEffect((function(){var r=t(),a=new o.BatchedStoreListener(e,(function(){var e=t(),a=n(r,e);null==a||v.default.isSoundDisabled(a)||(0,g.playSound)(a,.4),r=e}));return a.attach("useSound"),function(){return a.detach()}}))}function b(){return C([p.default],(function(){return{selfMute:p.default.isSelfMute(),selfDeaf:p.default.isSelfDeaf()}}),(function(e,t){var n=t.selfMute,r=t.selfDeaf;return e.selfDeaf!==r?r?"deafen":"undeafen":e.selfMute!==n?n?"mute":"unmute":void 0})),null}function M(){return C([f.default,y.default,m.default],(function(){var e=f.default.getChannel(m.default.getVoiceChannelId());return{channelType:null==e?void 0:e.type,disconnected:y.default.isDisconnected()}}),(function(e,t){var n=t.channelType,r=t.disconnected,a=e.channelType,o=e.disconnected;if(o&&o!==r){if(null!=n&&u.SILENT_JOIN_LEAVE_CHANNEL_TYPES.has(n))return;return"user_join"}if(!o&&o!==r){if(null!=a&&u.SILENT_JOIN_LEAVE_CHANNEL_TYPES.has(a))return;return"disconnect"}})),null}function N(){return C([_.default],(function(){return _.default.isCurrentUserSpeaking()}),(function(e,t){if(e!==t){var n=p.default.isSelfMute();if(p.default.getMode()===S.InputModes.PUSH_TO_TALK&&!n)return t?"ptt_start":"ptt_stop"}})),null}function A(){return C([p.default],(function(){return p.default.isSelfMutedTemporarily()}),(function(e,t){if(e!==t){var n=p.default.isSelfMute();if(p.default.getMode()===S.InputModes.VOICE_ACTIVITY&&!n)return t?"ptt_stop":"ptt_start"}})),null}function P(){return C([h.default],(function(){return h.default.userHasBeenMovedVersion}),(function(e,t){if(e!==t)return"user_moved"})),null}function R(){return C([m.default,h.default],(function(){var e=m.default.getVoiceChannelId();if(null==e)return l.RequestToSpeakStates.NONE;var t=h.default.getVoiceStateForChannel(e);return(0,l.getAudienceRequestToSpeakState)(t)}),(function(e,t){if(e!==t&&t===l.RequestToSpeakStates.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK)return"reconnect"})),null}function L(){return C([m.default,s.default,d.default,h.default,f.default],(function(){var e,t,n=m.default.getVoiceChannelId(),r=d.default.getId(),a=0,o=[],l=null,u=0,c=s.default.getAllActiveStreams();if(null!=n){var p=f.default.getChannel(n);null!=p&&(t=p.type,a=E.default.countVoiceStatesForChannel(p.id)-1,o=s.default.getAllApplicationStreamsForChannel(p.id).map((function(e){return e.ownerId})))}var v=null;return(null===(e=v=1===c.length?c[0]:null!=r?s.default.getActiveStreamForUser(r):null)||void 0===e?void 0:e.state)===S.ApplicationStreamStates.CONNECTING&&(v=null),null!=v&&(l=(0,i.encodeStreamKey)(v),u=s.default.getViewerIds(l).filter((function(e){return e!==r})).length),{channelType:t,voiceChannelId:n,voiceChannelUserCount:a,streamingUserIds:o,singleActiveStreamKey:l,singleActiveStreamViewerCount:u,currentUserId:r,allActiveStreams:c}}),(function(e,t){var n=t.channelType,r=t.voiceChannelId,a=t.voiceChannelUserCount,o=t.streamingUserIds,i=t.singleActiveStreamKey,l=t.singleActiveStreamViewerCount,s=t.currentUserId;if(e.voiceChannelId===r&&null!=r&&!(function(e){var t=f.default.getChannel(e);if(null==t)return!1;var n=t.getGuildId();if(null==n)return!1;var r=c.default.getGuild(n);return null!=r&&r.afkChannelId===t.id}(r)||null!=n&&u.SILENT_JOIN_LEAVE_CHANNEL_TYPES.has(n))){var d=null!=i&&e.singleActiveStreamKey===i,p=o.some((function(t){return!e.streamingUserIds.includes(t)})),v=e.allActiveStreams.map((function(e){return e.ownerId})),y=e.streamingUserIds.some((function(e){return!o.includes(e)&&(e===s||v.includes(e))}));return p?"stream_started":y?"stream_ended":e.singleActiveStreamViewerCount<=25&&d&&l>e.singleActiveStreamViewerCount?"stream_user_joined":e.voiceChannelUserCount<=25&&a>e.voiceChannelUserCount?"user_join":e.voiceChannelUserCount<=25&&a<e.voiceChannelUserCount?"user_leave":e.singleActiveStreamViewerCount<=25&&d&&l<e.singleActiveStreamViewerCount?"stream_user_left":void 0}})),null}var D=T(b,{}),w=T(M,{}),j=T(N,{}),k=T(A,{}),U=T(P,{}),G=T(L,{}),F=T(R,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=v(n(11103)),o=v(n(66)),i=v(n(3)),l=v(n(1223)),u=v(n(10383)),s=v(n(8359)),d=v(n(70)),f=v(n(16)),c=v(n(43)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=new Set(["Blink","Gecko","WebKit"]),h=p.NOOP;if(f.default.embedded)h=function(e){return c.default.setBadge(e)};else if(_.has(o.default.layout)){var E=new a.default({animation:"none"});h=function(e){try{E.badge(-1===e?"•":e)}catch(e){}}}var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).cancelBounce=null,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.componentDidMount=function(){this.componentDidUpdate()},a.componentDidUpdate=function(){var e=this.props,t=e.badge,n=e.hasIncomingCalls;h(t),n&&!this.cancelBounce?this.cancelBounce=c.default.bounceDock("critical"):!n&&this.cancelBounce&&(this.cancelBounce(),this.cancelBounce=null)},a.componentWillUnmount=function(){h(0),this.cancelBounce&&(this.cancelBounce(),this.cancelBounce=null)},a.render=function(){return null},r}(r.PureComponent);g.displayName="AppBadge";var S=function(){return null};h!==p.NOOP&&(S=i.default.connectStores([l.default,u.default,d.default,s.default],(function(){var e=l.default.getTotalMentionCount(),t=d.default.getPendingCount(),n=l.default.hasAnyUnread(),r=s.default.getDisableUnreadBadge(),a=e+t;return 0===a&&n&&!r&&(a=-1),{badge:a,hasIncomingCalls:u.default.hasIncomingCalls()}}))(g));var O=S;t.default=O},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=_(n(133)),o=_(n(3)),i=_(n(288)),l=_(n(473)),u=_(n(1223)),s=_(n(51)),d=_(n(8359)),f=_(n(94)),c=_(n(70)),p=_(n(283)),v=_(n(16)),y=_(n(43)),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=(0,a.default)({DEFAULT:null,UNREAD:null,CONNECTED:null,SPEAKING:null,MUTED:null,DEAFENED:null}),S=v.default.isOSX(),O=v.default.isLinux(),I=S?null:g.DEFAULT,T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).getIcon=function(){var e=t.props,n=e.deafened,r=e.muted,a=e.speaking,o=e.connected,i=e.unread,l=I;return S&&!o?l:O||!o?(i&&(l=g.UNREAD),l):l=n?g.DEAFENED:r?g.MUTED:a?g.SPEAKING:g.CONNECTED},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var a=r.prototype;return a.componentDidMount=function(){y.default.setSystemTrayIcon(this.getIcon())},a.componentDidUpdate=function(){y.default.setSystemTrayIcon(this.getIcon())},a.componentWillUnmount=function(){y.default.setSystemTrayIcon(I)},a.render=function(){return null},r}(r.PureComponent);T.displayName="AppTray";var C=function(){return null};v.default.embedded&&(y.default.on("SYSTEM_TRAY_TOGGLE_MUTE",(function(){return i.default.toggleSelfMute()})),y.default.on("SYSTEM_TRAY_TOGGLE_DEAFEN",(function(){return i.default.toggleSelfDeaf()})),y.default.on("SYSTEM_TRAY_OPEN_VOICE_SETTINGS",(function(){l.default.open(m.UserSettingsSections.VOICE)})),C=o.default.connectStores([f.default,s.default,p.default,u.default,c.default,d.default],(function(){var e=u.default.getTotalMentionCount(),t=u.default.hasAnyUnread(),n=c.default.getPendingCount(),r=!d.default.getDisableUnreadBadge()&&!!(t||e+n>0);return{connected:f.default.isConnected(),speaking:p.default.isCurrentUserSpeaking(),muted:s.default.isSelfMute()||s.default.isSelfMutedTemporarily(),deafened:s.default.isSelfDeaf(),unread:r}}))(T));var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=De;var r,a=te(n(0)),o=Q(n(9)),i=n(192),l=n(95),u=te(n(3)),s=n(5943),d=Q(n(105)),f=Q(n(1182)),c=Q(n(688)),p=Q(n(11106)),v=Q(n(11109)),y=Q(n(11116)),m=Q(n(11147)),_=Q(n(10029)),h=Q(n(11259)),E=Q(n(182)),g=Q(n(11260)),S=Q(n(5939)),O=Q(n(6050)),I=Q(n(11300)),T=Q(n(11)),C=Q(n(10)),b=Q(n(9035)),M=Q(n(298)),N=Q(n(8955)),A=Q(n(36)),P=Q(n(361)),R=Q(n(12)),L=Q(n(11318)),D=n(259),w=Q(n(8257)),j=Q(n(11319)),k=Q(n(11350)),U=Q(n(11405)),G=Q(n(11407)),F=Q(n(11418)),B=Q(n(11419)),H=Q(n(6127)),x=Q(n(11444)),V=Q(n(11458)),W=n(9209),Y=n(9210),z=Q(n(11465)),K=Q(n(9243)),$=Q(n(11690)),Z=Q(n(11693)),q=n(1),X=Q(n(6)),J=Q(n(8195));function Q(e){return e&&e.__esModule?e:{default:e}}function ee(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ee=function(){return e},e}function te(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ee();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ne(){return(ne=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}).apply(this,arguments)}function re(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var ae=re(k.default,{}),oe=function(e){var t=e.match,n=(0,u.useStateFromStores)([C.default,A.default],(function(){var e=A.default.getChannelId();return C.default.getChannel(e)}));if(null!=n&&n.type===q.ChannelTypes.GUILD_STORE){var r=t.params.messageId;return re(U.default,{channel:n,inputSkuId:r},n.id)}return ae};oe.displayName="ChannelRenderer";var ie=u.default.connectStores([P.default,M.default,b.default,T.default,c.default,E.default,R.default],(function(){var e;return{guildFolders:P.default.guildFolders,expandedFolders:b.default.getExpandedFolders(),totalUnavailableGuilds:M.default.totalUnavailableGuilds,lurkingGuildIds:E.default.lurkingGuildIds(),isGuest:T.default.isGuest(),isStaff:null===(e=R.default.getCurrentUser())||void 0===e?void 0:e.isStaff(),isAppFullscreen:c.default.isFullscreenInContext()}}))(_.default),le=re(V.default,{}),ue=re(F.default,{}),se=a.memo((function(e){var t=e.hideSelectedChannel,n=(0,S.default)(),r=n.guildId,a=n.channelId;return window.location.pathname.startsWith(q.Routes.GUILD_DISCOVERY)?le:null!=r?re(y.default,{selectedChannelId:a,guildId:r,hideSelectedChannel:t},r):ue})),de=function(e){var t=e.match.params,n=t.guildId,r=t.eventId;return re(m.default,{guildId:n,eventId:r})};function fe(e){var t=(0,S.default)((function(e){return e.guildId}));return a.createElement(K.default,ne({},e,{guildId:t}))}de.displayName="renderUpcomingStages",fe.displayName="ConnectedActivityPanelGameCard";var ce=function(e){var t=e.match;return re(oe,{match:t})};ce.displayName="renderChannel";var pe=function(e){var t=e.match;return null!=t.params.guildId?re(v.default,{guildId:t.params.guildId}):ce({match:t})},ve=function(e){var t=null!=e&&e.length>0&&e.startsWith("?")?e.split("?")[1]:null;return re(x.default,{searchRoute:t})};ve.displayName="renderGuildDiscovery";var ye=function(e){var t=e.match;return null!=t.params.guildId?re(p.default,{guildId:t.params.guildId,inviteCode:t.params.inviteCode}):null},me=function(e){var t=e.match;return null!=t.params.guildId?re(h.default,{guildId:t.params.guildId,inviteCode:t.params.inviteCode}):null},_e=re(B.default,{}),he=function(){return _e};he.displayName="renderApplicationLibrary";var Ee=re(H.default,{}),ge=function(){return Ee};ge.displayName="renderLazyApplicationStore";var Se=re(g.default,{}),Oe=function(){return Se};Oe.displayName="renderPeople";var Ie=re(I.default,{}),Te=function(){return Ie};function Ce(){return window.location.pathname.startsWith(q.Routes.APPLICATION_STORE)}Te.displayName="renderStageDiscovery";var be=re($.default,{}),Me=re(Z.default,{}),Ne=re(z.default,{});function Ae(e){var t,n=e.isGuest,r=e.hasNotice,a=e.sidebarTheme,i=e.hideSidebar,l=(0,u.useStateFromStores)([c.default],(function(){return c.default.isFullscreenInContext()}));if(i)return null;var s=Ce()?J.default.hiddenOnMobileStore:null;return re("div",{className:(0,o.default)(J.default.sidebar,s,(0,D.getThemeClass)(a),(t={},t[J.default.hasNotice]=r,t[J.default.hidden]=l,t))},void 0,re(se,{hideSelectedChannel:window.location.pathname.startsWith(q.Routes.GUILD_PROGRESS(""))}),re("section",{className:J.default.panels,"aria-label":X.default.Messages.ACCOUNT_A11Y_LABEL},void 0,be,re(w.default,{section:q.AnalyticsSections.ACTIVITY_PANEL},void 0,re(fe,{className:J.default.activityPanel})),Me,re(w.default,{section:q.AnalyticsSections.ACCOUNT_PANEL},void 0,n?null:Ne)))}Ae.displayName="ChannelSidebar";var Pe=re(L.default,{onLogin:function(){(0,W.open)(void 0,Y.open)},onRegister:function(){(0,Y.open)(void 0,W.open)}});var Re=re(G.default,{}),Le=re(j.default,{});function De(){var e,t,n,r=(0,u.useStateFromStores)([T.default],(function(){return T.default.isGuest()})),c=(0,u.useStateFromStores)([N.default],(function(){return N.default.hasNotice()})),p=(0,u.useStateFromStores)([d.default],(function(){return d.default.darkSidebar?q.ThemeTypes.DARK:void 0})),v=Ce()?J.default.hiddenOnMobileStore:null,y=(e=a.useState((function(){return window.location.pathname.startsWith(q.Routes.GUILD_MEMBER_VERIFICATION(""))})),t=e[0],n=e[1],a.useEffect((function(){return O.default.addRouteChangeListener((function(e){n(e.pathname.startsWith(q.Routes.GUILD_MEMBER_VERIFICATION("")))}))}),[]),t),m=function(){var e=a.useState((function(){return window.location.pathname.startsWith(q.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(""))})),t=e[0],n=e[1];return a.useEffect((function(){return O.default.addRouteChangeListener((function(e){n(e.pathname.startsWith(q.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB("")))}))}),[]),t}(),_=y||m,h=(0,i.useRouteMatch)([q.Routes.CHANNEL(q.ME,":channelId"),q.Routes.CHANNEL(":guildId",":channelId?",":messageId?")]);return re("div",{className:J.default.container},void 0,re(ie,{className:(0,o.default)(J.default.guilds,v),themeOverride:p}),re(s.GuildIDContext.Provider,{value:(null==h?void 0:h.params.guildId)===q.ME||null==h?void 0:h.params.guildId},void 0,re("div",{className:J.default.base},void 0,Re,re("div",{className:J.default.content},void 0,a.createElement(Ae,{isGuest:r,hasNotice:c,sidebarTheme:p,hideSidebar:_}),re(i.Switch,{},void 0,re(f.default,{path:q.Routes.ACTIVITY,disableTrack:!0},void 0,re(i.Redirect,{to:q.Routes.ME})),re(f.default,{path:q.Routes.APPLICATION_LIBRARY,render:he,impressionName:l.ImpressionNames.APPLICATION_LIBRARY,disableTrack:!0}),re(f.default,{path:q.Routes.APPLICATION_STORE,render:ge,impressionName:l.ImpressionNames.APPLICATION_STORE,disableTrack:!0}),re(f.default,{path:q.Routes.ME,exact:!0,render:Oe,impressionName:l.ImpressionNames.FRIENDS,disableTrack:!0}),re(f.default,{path:q.Routes.GUILD_PROGRESS(":guildId"),render:pe}),re(f.default,{path:q.Routes.UPCOMING_STAGES(":guildId",":eventId?"),render:de,disableTrack:!0}),re(f.default,{path:[q.Routes.CHANNEL(q.ME,":channelId"),q.Routes.CHANNEL(":guildId",":channelId?",":messageId?")],render:ce,impressionName:l.ImpressionNames.GUILD_CHANNEL,disableTrack:!0}),re(f.default,{path:q.Routes.GUILD_DISCOVERY,render:function(e){var t=e.location;return ve(t.search)},impressionName:l.ImpressionNames.GUILD_DISCOVERY,disableTrack:!0}),re(f.default,{path:q.Routes.GUILD_MEMBER_VERIFICATION(":guildId",":inviteCode?"),render:ye,impressionName:l.ImpressionNames.GUILD_MEMBER_VERIFICATION,disableTrack:!0}),re(f.default,{path:q.Routes.GUILD_MEMBER_VERIFICATION_FOR_HUB(":guildId",":inviteCode?"),render:me,impressionName:l.ImpressionNames.HUB_EMAIL_VERIFICATION_PAGE,disableTrack:!0}),re(f.default,{path:q.Routes.STAGE_DISCOVERY,exact:!0,render:Te,impressionName:l.ImpressionNames.STAGE_DISCOVERY,disableTrack:!0})),function(e){return e?Pe:null}(r)))),Le)}De.displayName="AppView"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MemberVerificationPreviewDisabled=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(42),l=M(n(15)),u=M(n(29)),s=M(n(1189)),d=n(197),f=M(n(466)),c=n(41),p=M(n(24)),v=n(487),y=M(n(150)),m=M(n(8294)),_=M(n(8410)),h=M(n(8411)),E=n(8262),g=M(n(1233)),S=M(n(9187)),O=M(n(11107)),I=M(n(9128)),T=n(1),C=M(n(6)),b=M(n(8009));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var R=function(e){var t,n=e.guildId,r=e.inviteCode,M=a.useState(d.WaveStates.INITIAL),N=M[0],R=M[1],L=(0,o.useStateFromStores)([h.default],(function(){return h.default.get(n)})),D=(0,o.useStateFromStores)([g.default],(function(){return g.default.getRequest(n)})),w=(0,o.useStateFromStores)([l.default],(function(){return l.default.getGuild(n)})),j=(0,o.useStateFromStoresObject)([g.default],(function(){return{hasFetchedRequestToJoinGuilds:g.default.hasFetchedRequestToJoinGuilds,guildPreviewDisabled:g.default.getJoinRequestGuild(n)}})),k=j.hasFetchedRequestToJoinGuilds,U=j.guildPreviewDisabled;a.useEffect((function(){null!=w&&(0,i.transitionTo)(T.Routes.CHANNEL(n))}),[w,n]),a.useEffect((function(){k||m.default.fetchRequestToJoinGuilds()}),[k]);var G=a.useCallback((function(e){R((function(t){return Math.max(t,e)}))}),[]),F=function(e,t){return function(){(0,c.openModal)((function(n){return a.createElement(f.default,A({header:C.default.Messages.MEMBER_VERIFICATION_CONFIRM_LEAVE_TITLE,cancelText:C.default.Messages.NEVERMIND,onConfirm:t,confirmText:C.default.Messages.YES_TEXT,confirmButtonColor:u.default.Colors.RED},n),P(p.default,{size:p.default.Sizes.SIZE_14,color:p.default.Colors.HEADER_SECONDARY},void 0,e))}))}},B=function(){m.default.resetGuildJoinRequest(n)},H=F(C.default.Messages.LEAVE_SERVER_BODY.format({name:null==w?void 0:w.toString()}),(function(){R(Math.max(N,d.WaveStates.FILLING)),m.default.removeGuildJoinRequest(n),(0,i.transitionTo)(T.Routes.ME)})),x=P(I.default,{guildId:n,inviteCode:r,onComplete:function(e){_.default.submitVerificationForm(n,e)}}),V=null!=(null==L||null===(t=L.guild)||void 0===t?void 0:t.splash)?y.default.getGuildSplashURL({id:L.guild.id,splash:L.guild.splash}):(0,v.getArtForPath)();return P("div",{className:b.default.page},void 0,P(s.default,{embedded:!0,splash:V,waveState:N,showLogo:!1,updateWaveState:G},void 0,P("div",{className:b.default.dragRegion}),P("div",{className:b.default.contentWrapper},void 0,function(){switch(null==D?void 0:D.applicationStatus){case E.GuildJoinRequestApplicationStatuses.PENDING:return P(O.default,{onCancel:F(C.default.Messages.MEMBER_VERIFICATION_CANCEL_PENDING_APPLICATION_MODAL_TITLE,B),onLeave:H,guild:U});case E.GuildJoinRequestApplicationStatuses.REJECTED:return P(S.default,{reapplyText:C.default.Messages.MEMBER_VERIFICATION_APPLICATION_REAPPLY,onReapply:B,confirmText:C.default.Messages.LEAVE_SERVER,onConfirm:H,rejectionReason:null==D?void 0:D.rejectionReason,guild:U});default:return x}}())))};t.MemberVerificationPreviewDisabled=R,R.displayName="MemberVerificationPreviewDisabled";var L=R;t.default=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=c(n(29)),o=c(n(55)),i=c(n(371)),l=c(n(47)),u=c(n(24)),s=c(n(6)),d=c(n(7350)),f=c(n(11108));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.onCancel,n=e.onLeave,r=e.guild,c=void 0===r?null:r;return v(o.default,{direction:o.default.Direction.VERTICAL,align:o.default.Align.CENTER,className:d.default.confirmation},void 0,v("div",{className:d.default.confirmationContent},void 0,null!==c?v(i.default,{size:i.default.Sizes.LARGER,guild:c,className:d.default.guildIcon}):v("img",{alt:s.default.Messages.MEMBER_VERIFICATION_PENDING_APPLICATION_ICON,src:f.default,className:d.default.verificationStateIcon}),v(l.default,{size:l.default.Sizes.SIZE_24,className:d.default.header},void 0,(null==c?void 0:c.name)?s.default.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_TITLE_WITH_GUILD_NAME.format({guildName:null==c?void 0:c.name}):s.default.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_TITLE),v(u.default,{size:u.default.Sizes.SIZE_14,color:u.default.Colors.HEADER_SECONDARY},void 0,s.default.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_SUBTITLE)),v("div",{className:d.default.confirmationButtonColumn},void 0,v(a.default,{onClick:t,look:a.default.Looks.LINK,color:a.default.Colors.LINK,size:a.default.Sizes.SMALL},void 0,s.default.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION),v(a.default,{onClick:n,look:a.default.Looks.LINK,color:a.default.Colors.LINK,size:a.default.Sizes.SMALL},void 0,s.default.Messages.MEMBER_VERIFICATION_PENDING_APPLICATION_MODAL_WITHDRAW_AND_LEAVE)))};y.displayName="MemberVerificationApplicationSubmitConfirmation";var m=y;t.default=m},function(e,t,n){e.exports=n.p+"5c8224502da542e816a0f83a1f6b535b.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(3),l=y(n(61)),u=y(n(372)),s=y(n(8320)),d=y(n(24)),f=y(n(9945)),c=n(10384),p=y(n(6)),v=y(n(8014));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t,n,r,a,i=e.completed,f=e.selected,c=e.title,p=e.subtitle,y=e.onSelect,m=e.children;return _("div",{className:v.default.task},void 0,_(l.default,{className:(0,o.default)(v.default.taskHeader,(t={},t[v.default.selected]=f,t)),onClick:y},void 0,_("div",{className:(0,o.default)(v.default.checkmarkContainer,(n={},n[v.default.completed]=i,n))},void 0,_(u.default,{className:v.default.checkmark})),_("div",{className:v.default.info},void 0,_(d.default,{size:d.default.Sizes.SIZE_16,className:v.default.taskTitle},void 0,c),_(d.default,{className:(0,o.default)(v.default.taskSubtitle,(r={},r[v.default.selected]=f,r))},void 0,p)),_(s.default,{className:v.default.expandArrow,open:f})),_("div",{className:(0,o.default)(v.default.taskBody,(a={},a[v.default.selected]=f,a))},void 0,m))}h.displayName="TaskItem";var E=_("div",{},void 0,"ART TODO");function g(e){var t=e.guildId;return _("div",{className:(0,o.default)(v.default.task,v.default.complete)},void 0,E,_(d.default,{size:d.default.Sizes.SIZE_24,color:d.default.Colors.HEADER_PRIMARY,className:v.default.bodyText},void 0,p.default.Messages.PROGRESS_COMPLETED),_(d.default,{className:v.default.bodyText},void 0,p.default.Messages.PROGRESS_COMPLETED_DESCRIPTION),c.AFTER_COMPLETION_STEP_DATA.map((function(e,n){return _(l.default,{className:v.default.followupItem,onClick:function(){return e.onClick(t)}},n,_(e.Icon,{width:24,height:24,className:v.default.followupIcon}),_("div",{className:v.default.followupInfo},void 0,_(d.default,{size:d.default.Sizes.SIZE_16,color:d.default.Colors.HEADER_PRIMARY,className:v.default.followupTitle},void 0,e.title()),_(d.default,{size:d.default.Sizes.SIZE_12,color:d.default.Colors.HEADER_SECONDARY},void 0,e.subtitle())),_(s.default,{className:v.default.caret}))})))}function S(e){var t=e.guildId,n=(0,i.useStateFromStores)([f.default],(function(){return f.default.getProgress(t)}),[t]),r=a.useState((0,c.getCurrentStep)(n)),o=r[0],l=r[1];return a.useEffect((function(){l((0,c.getCurrentStep)(n))}),[n,l]),null==n?null:_("div",{className:v.default.container},void 0,_("div",{className:v.default.contentContainer},void 0,_(d.default,{className:v.default.headerText,size:d.default.Sizes.SIZE_24},void 0,p.default.Messages.SET_UP_YOUR_SERVER),_(d.default,{className:v.default.headerSubtext},void 0,p.default.Messages.SET_UP_DESCRIPTION),c.STEP_DATA.map((function(e){var r=e.Component;return _(h,{title:e.title(),subtitle:e.subtitle(),selected:o===e.step,completed:n.has(e.step),onSelect:function(){return!n.has(e.step)&&l(e.step)}},e.step,_(r,{guildId:t}))})),null==(0,c.getCurrentStep)(n)?_(g,{guildId:t}):null))}g.displayName="Completed",S.displayName="GuildProgress"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var r,a=h(n(0)),o=m(n(8)),i=n(3),l=m(n(391)),u=m(n(180)),s=h(n(86)),d=m(n(29)),f=m(n(153)),c=m(n(24)),p=n(1),v=m(n(6)),y=m(n(8010));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.channel,n=(0,u.default)(t,!0);return E(c.default,{className:y.default.topic},t.id,n)}function S(e){var t=e.guildId,n=a.useState(""),r=n[0],u=n[1],c=a.useState(!1),m=c[0],_=c[1],h=(0,i.useStateFromStores)([s.default],(function(){var e=s.default.getChannels(t);return o.default.filter(e[s.GUILD_SELECTABLE_CHANNELS_KEY],(function(e){return e.channel.type===p.ChannelTypes.GUILD_TEXT})).map((function(e){return e.channel}))})),S=function(){var e;l.default.createTextChannel(t,r,null===(e=h[0])||void 0===e?void 0:e.parent_id).then((function(){return u("")}),(function(){return _(!0)}))};return E("div",{className:y.default.container},void 0,E("div",{className:y.default.inputWrapper},void 0,E(f.default,{value:r,onChange:u,placeholder:v.default.Messages.ENTER_NEW_TOPIC,className:y.default.input,error:m?v.default.Messages.CREATE_CHANNEL_ERROR:null,onKeyPress:function(e){e.which===p.KeyboardKeys.ENTER&&S()}}),E(d.default,{onClick:S,color:d.default.Colors.BRAND,className:y.default.button},void 0,v.default.Messages.ADD_TOPIC)),E("div",{},void 0,h.map((function(e){return E(g,{channel:e})}))))}g.displayName="ChannelStepText",S.displayName="ChannelStep"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(8325)),i=n(3),l=m(n(390)),u=m(n(9188)),s=m(n(8391)),d=m(n(1216)),f=m(n(86)),c=m(n(15)),p=n(8381),v=n(1),y=m(n(8011));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.guildId,n=(0,i.useStateFromStores)([c.default],(function(){return c.default.getGuild(t)})),r=(0,i.useStateFromStores)([f.default],(function(){return f.default.getDefaultChannel(t)})),m=(0,u.default)(r),_=a.useState({textValue:"",richValue:o.default.deserialize("")}),E=_[0],g=_[1],S=a.useRef(null);if(null==n||null==r)return null;return h("div",{className:y.default.container},void 0,a.createElement(s.default,{ref:S,className:y.default.textArea,textValue:E.textValue,richValue:E.richValue,channel:r,onChange:function(e,t,n){g({textValue:t,richValue:n})},onSubmit:function(){return null!=S.current?(0,p.applyChatRestrictions)({target:S.current,type:v.TextareaTypes.NORMAL,content:E.textValue,channel:r}).then((function(e){if(!e.valid)return{shouldClear:!1,shouldRefocus:!1};var t=d.default.parse(r,E.textValue);return l.default.sendMessage(r.id,t,!0),g({textValue:"",richValue:o.default.deserialize("")}),{shouldClear:!0,shouldRefocus:!1}})):Promise.resolve({shouldClear:!1,shouldRefocus:!1})},type:v.TextareaTypes.FORM,placeholder:m,focused:!0}))}E.displayName="ChatStep"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(8254)),i=f(n(8338)),l=f(n(15)),u=f(n(150)),s=f(n(6)),d=f(n(8012));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.guildId,n=(0,a.useStateFromStores)([l.default],(function(){return l.default.getGuild(t)}));return null==n?null:p("div",{className:d.default.container},void 0,p(i.default,{name:n.name,avatar:n.icon,makeURL:function(e){return null!=e&&u.default.getGuildIconURL({id:n.id,icon:e,canAnimate:!0})},onChange:function(e){o.default.saveGuild(n.id,{icon:e})},hint:s.default.Messages.CHANGE_ICON,showIcon:!0,className:d.default.avatar,avatarClassName:d.default.avatarInner,showRemoveButton:!1}))}v.displayName="GuildAvatarStep"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=O(n(11114)),l=O(n(8283)),u=O(n(1258)),s=O(n(86)),d=O(n(15)),f=O(n(8521)),c=O(n(271)),p=O(n(29)),v=O(n(5969)),y=n(41),m=O(n(24)),_=n(8286),h=n(1163),E=n(1),g=O(n(6)),S=O(n(8013));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}function b(e){var t=e.guildId,n=a.useState(!1),r=n[0],O=n[1],I=(0,o.useStateFromStores)([s.default],(function(){return s.default.getDefaultChannel(t)})),b=(0,o.useStateFromStores)([d.default],(function(){return d.default.getGuild(t)})),M=(0,o.useStateFromStores)([f.default],(function(){return null!=I?f.default.getInvite(I.id):null}));if(a.useEffect((function(){null!=I&&i.default.init(t,I.id,{})}),[]),null==I||null==b)return null;return T("div",{className:S.default.container},void 0,T("div",{className:S.default.inputWrapper},void 0,T(v.default,{className:S.default.input,value:(0,u.default)(null==M?void 0:M.code),buttonColor:p.default.Colors.BRAND,buttonLook:p.default.Looks.FILLED,onCopy:function(){O(!0),null!=M&&(0,h.copy)(M.code)},text:r?g.default.Messages.INVITE_COPIED:g.default.Messages.COPY_LINK})),null!=M?T(m.default,{size:m.default.Sizes.SIZE_12,className:S.default.footerText},void 0,(0,_.maxAgeString)(M.maxAge,M.maxUses)," ",T(c.default,{onClick:function(){(0,y.openModal)((function(e){return a.createElement(l.default,C({},e,{guild:b,channel:I,source:E.InstantInviteSources.GUILD_PROGRESS,forceSettings:!0}))}))}},void 0,g.default.Messages.INVITE_EDIT_LINK)):null)}b.displayName="InviteStep"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(2)),a=s(n(11115)),o=s(n(13)),i=s(n(1211)),l=n(1),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}var d={init:function(e,t,n){var a=n.location,o=void 0===a?"":a,i=n.targetType,u=n.targetUserId,s=n.targetApplicationId;r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_INIT,guildId:e,channelId:t,targetType:i,targetUserId:u,targetApplicationId:s}),this.createInvite(o,!0)},openSettings:function(e,t,n,a){r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_OPEN,guildId:e,channelId:t,onClose:a}),o.default.track(l.AnalyticEvents.OPEN_MODAL,{type:"Instant Invite",source:n})},updateSettings:function(e){r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_UPDATE_SETTINGS,settings:e})},resetSettings:function(){r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_RESET_SETTINGS})},createInvite:function(e,t){var n=a.default.getPendingSettings();if(null!=n){r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_GENERATE_INVITE});var o=n.channelId,s=n.maxAge,d=n.maxUses,f=n.temporary,c=n.targetType,p=n.targetUserId,v=n.targetApplicationId,y=a.default.getInvite(),m=t&&null!=y?y.code:null;i.default.createInvite(o,{temporary:f,validate:m,max_age:parseInt(s,10),max_uses:parseInt(d,10),target_type:c,target_user_id:p,target_application_id:v},e).then((function(){r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_GENERATE_INVITE_SUCCESS,channelId:o})}),(function(e){var t=u.default.Messages.INSTANT_INVITE_FAILED_TO_GENERATE;null!=e.body&&null!=e.body.message&&(t=e.body.message),r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_GENERATE_INVITE_FAILURE,message:t})}))}},close:function(){var e=a.default.onClose;r.default.dispatch({type:l.ActionTypes.CREATE_INVITE_MODAL_CLOSE}),e&&e()}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(23)),a=s(n(3)),o=s(n(2)),i=s(n(8286)),l=s(n(8521)),u=n(1);function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){return(c=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}).apply(this,arguments)}var p,v,y,m,_,h,E=i.default.INVITE_OPTIONS_7_DAYS.value,g=i.default.INVITE_OPTIONS_UNLIMITED.value,S=u.FormStates.CLOSED,O=!1;function I(e,t){var n=t.targetType,r=t.targetUserId,a=t.targetApplicationId,o=E;y=l.default.getInvite(e,{targetType:n,targetUserId:r}),m={channelId:e,maxAge:null!=y?y.maxAge:o,maxUses:null!=y?y.maxUses:g,temporary:null!=y&&y.temporary,targetType:n,targetUserId:r,targetApplicationId:a},_=m}function T(e){p=e.guildId,v=null;var t=e.targetType||null,n=e.targetUserId||null,r=e.targetApplicationId||null;I(e.channelId,{targetType:t,targetUserId:n,targetApplicationId:r})}var C=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a,o,i,s=r.prototype;return s.init=function(){this.waitFor(l.default)},s.isOpen=function(){return S!==u.FormStates.CLOSED},s.isSubmitting=function(){return O},s.getGuildId=function(){return p},s.getError=function(){return v},s.getInvite=function(){return y},s.getInviteSettings=function(){return m},s.getPendingSettings=function(){return _},s.getProps=function(){return{}},a=r,(o=[{key:"onClose",get:function(){return h}}])&&d(a.prototype,o),i&&d(a,i),r}(a.default.Store))(o.default,{CREATE_INVITE_MODAL_INIT:function(e){T(e)},CREATE_INVITE_MODAL_OPEN:function(e){var t;S=u.FormStates.OPEN,h=null!==(t=e.onClose)&&void 0!==t?t:null,T(e)},CREATE_INVITE_MODAL_UPDATE_SETTINGS:function(e){var t=e.settings;null!=_&&(_=c({},_,{},t))},CREATE_INVITE_MODAL_RESET_SETTINGS:function(e){_=m},CREATE_INVITE_MODAL_GENERATE_INVITE:function(e){return m=_,void(O=!0)},CREATE_INVITE_MODAL_GENERATE_INVITE_SUCCESS:function(e){var t=e.channelId;v=null,O=!1,(0,r.default)(null!=m,"No invite settings for generated invite");var n=m;I(t,{targetType:n.targetType,targetUserId:n.targetUserId,targetApplicationId:n.targetApplicationId})},CREATE_INVITE_MODAL_GENERATE_INVITE_FAILURE:function(e){y=null,O=!1,v=e.message},CREATE_INVITE_MODAL_CLOSE:function(e){return S=u.FormStates.CLOSED,void(h=null)}});t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=he;var r,a=se(n(0)),o=n(122),i=n(3),l=n(57),u=le(n(2)),s=n(389),d=le(n(11117)),f=se(n(8357)),c=n(5943),p=le(n(105)),v=le(n(11118)),y=le(n(8573)),m=le(n(727)),_=le(n(11119)),h=n(9021),E=n(8277),g=le(n(11120)),S=n(280),O=le(n(10388)),I=le(n(6050)),T=le(n(8559)),C=le(n(11)),b=le(n(1212)),M=le(n(8919)),N=le(n(10)),A=le(n(9023)),P=le(n(715)),R=le(n(298)),L=le(n(1252)),D=le(n(86)),w=le(n(1223)),j=le(n(15)),k=le(n(694)),U=le(n(40)),G=le(n(94)),F=le(n(181)),B=le(n(39)),H=le(n(12)),x=le(n(10389)),V=le(n(10390)),W=le(n(365)),Y=le(n(29)),z=le(n(278)),K=se(n(149)),$=n(250),Z=le(n(47)),q=le(n(24)),X=le(n(13)),J=le(n(9954)),Q=le(n(9995)),ee=le(n(11127)),te=le(n(11130)),ne=le(n(11145)),re=n(1),ae=le(n(6)),oe=le(n(8029)),ie=le(n(11146));function le(e){return e&&e.__esModule?e:{default:e}}function ue(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ue=function(){return e},e}function se(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ue();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function de(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function fe(){return(fe=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}).apply(this,arguments)}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ve(){X.default.track(re.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:S.PremiumUpsellTypes.GUILD_MEMBER_AVATAR_TOOLTIP,location:{page:re.AnalyticsPages.GUILD_CHANNEL}})}function ye(){X.default.track(re.AnalyticEvents.TOOLTIP_VIEWED,{type:"Guild Stickers Guild Header Tooltip"})}function me(e){var t=e.header,n=e.content,r=e.buttonCTA,o=e.onClick,i=e.onComponentMount,l=e.asset;return a.useEffect((function(){return null==i?void 0:i()}),[]),pe("div",{className:oe.default.subscribeTooltipWrapper},void 0,l,pe(Z.default,{className:oe.default.subscribeTooltipHeader,size:Z.default.Sizes.SIZE_16},void 0,t),pe(q.default,{className:oe.default.subscribeTooltipText,size:q.default.Sizes.SIZE_14},void 0,n),pe(Y.default,{className:oe.default.subscribeTooltipButton,color:Y.default.Colors.BRAND,look:Y.default.Looks.INVERTED,onClick:o},void 0,r))}me.displayName="GuildHeaderTooltip";var _e=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).historyUnlisten=function(){},t.showTimeout=new l.Timeout,t.state={controller:new o.Controller({value:1,immediate:!0}),renderBanner:!1,bannerVisible:!1,shouldShowSubscribeTooltip:!1},t.handleHistoryChange=function(e){null!=e.state&&e.state.shouldShowSubscribeTooltip&&t.showTimeout.start(1e3,(function(){return t.setState({shouldShowSubscribeTooltip:!0})}))},t.handleContextMenu=function(e){var n=t.props.guild;null!=n&&(0,s.openContextMenu)(e,(function(e){return a.createElement(v.default,fe({},e,{guild:n}))}))},t.handleHeaderContextMenu=function(e){var n=t.props.guild;null!=n&&(0,s.openContextMenu)(e,(function(e){return a.createElement(y.default,fe({},e,{guild:n}))}))},t.handleCloseDropdownIconTooltips=function(){var e=t.props.guild;t.showTimeout.stop(),t.state.shouldShowSubscribeTooltip&&t.setState({shouldShowSubscribeTooltip:!1}),null!=e&&m.default.hideGuildTemplateDirtyTooltip(e.id)},t.handleCloseServerIdentityTooltip=function(){(0,E.hideHotspot)(E.HotspotLocations.GUILD_PER_SERVER_AVATAR_GUILD_HEADER_TOOLTIP)},t.handleCloseGuildStickerTooltip=function(){(0,E.hideHotspot)(E.HotspotLocations.GUILD_STICKERS_GUILD_HEADER_TOOLTIP)},t.renderPopout=function(e){var n=e.closePopout,r=t.props.guild;return null!=r&&pe(ee.default,{onClose:n,guild:r})},t.renderGuildTooltipPopout=function(){var e=t.props,n=e.showPerServerUpsell,r=e.showGuildStickerTooltip,a=t.state.shouldShowSubscribeTooltip;return pe(me,r&&!a?{onComponentMount:ye,header:ae.default.Messages.GUILD_STICKER_GUILD_HEADER_TOOLTIP_HEADER,content:ae.default.Messages.GUILD_STICKER_GUILD_HEADER_TOOLTIP_CONTENT,buttonCTA:ae.default.Messages.GUILD_STICKER_GUILD_HEADER_TOOLTIP_BUTTON,onClick:t.handleCloseGuildStickerTooltip}:n&&!a?{onComponentMount:ve,header:ae.default.Messages.CHANGE_IDENTITY_GUILD_HEADER_TOOLTIP_TITLE,asset:pe("img",{alt:"","aria-hidden":!0,src:ie.default,className:oe.default.tooltipAvatarAsset}),content:ae.default.Messages.CHANGE_IDENTITY_GUILD_HEADER_TOOLTIP_CONTENT,buttonCTA:ae.default.Messages.CHANGE_IDENTITY_GUILD_HEADER_TOOLTIP_BUTTON,onClick:t.handleCloseServerIdentityTooltip}:{header:ae.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_HEADER_SUBSCRIBE_TOOLTIP_HEADER,content:ae.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_HEADER_SUBSCRIBE_TOOLTIP_TEXT,buttonCTA:ae.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_HEADER_SUBSCRIBE_TOOLTIP_CLOSE,onClick:t.handleCloseDropdownIconTooltips})},t.pinBanner=function(e){var n=e.scrollTop;t.setAnimatedValue(n)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ce(t,n),r.getDerivedStateFromProps=function(e){var t=e.guild,n=e.hasChannelNotice;return null==t||null==t.banner||n?{renderBanner:!1,bannerVisible:!1}:null};var i=r.prototype;return i.componentDidMount=function(){var e,t=this;this.setAnimatedValue(0),u.default.subscribe(re.ActionTypes.LAYER_PUSH,this.handleCloseDropdownIconTooltips),this.historyUnlisten=I.default.addRouteChangeListener(this.handleHistoryChange),(null===(e=I.default.getHistory().location.state)||void 0===e?void 0:e.shouldShowSubscribeTooltip)&&this.showTimeout.start(1e3,(function(){return t.setState({shouldShowSubscribeTooltip:!0})}))},i.componentWillUnmount=function(){this.showTimeout.stop(),this.state.controller.dispose(),this.historyUnlisten(),u.default.unsubscribe(re.ActionTypes.LAYER_PUSH,this.handleCloseDropdownIconTooltips)},i.getGuildBannerHash=function(){var e=this.props,t=e.guild,n=e.hasChannelNotice;return null==t||n?null:t.banner},i.getTooltipText=function(){return this.props.shouldShowGuildTemplateDirtyTooltip?{textNode:ae.default.Messages.GUILD_TEMPLATES_UNSYNCED_TOOLTIP,ariaLabel:ae.default.Messages.GUILD_TEMPLATES_UNSYNCED_TOOLTIP}:null},i.renderGuildHeaderDropdownButton=function(e){var t=this.props,n=t.showPerServerUpsell,r=t.showGuildStickerTooltip,o=this.state.shouldShowSubscribeTooltip,i=this.getTooltipText(),l=!o&&!e&&null!=i;return pe(z.default,{renderPopout:this.renderGuildTooltipPopout,position:z.default.Positions.BOTTOM,align:z.default.Align.CENTER,animation:z.default.Animation.TRANSLATE,shouldShow:(n||o||r)&&!e},void 0,(function(t){return pe(K.default,{forceOpen:n||o||r,color:K.TooltipColors.BRAND,position:$.Positions.BOTTOM,shouldShow:l,text:null==i?void 0:i.textNode,"aria-label":null==i?void 0:i.ariaLabel},void 0,(function(n){return a.createElement(d.default,fe({},n,t,{open:e,className:oe.default.dropdown}))}))}))},i.renderGuildHeader=function(){var e=this,t=this.props,n=t.guild,r=t.isGuest,o=t.showPerServerUpsell,i=this.state,l=i.controller,u=i.renderBanner,s=i.bannerVisible,d=i.shouldShowSubscribeTooltip;return null==n?null:pe(z.default,{renderPopout:this.renderPopout,position:z.default.Positions.BOTTOM,align:z.default.Align.CENTER,animation:z.default.Animation.SCALE},void 0,(function(t,i){var c=t.onClick,p=de(t,["onClick"]);return a.createElement(Q.default,fe({guild:n,controller:l,renderBanner:u,selected:i,guildBanner:e.getGuildBannerHash(),bannerVisible:s,onContextMenu:e.handleHeaderContextMenu,onClick:function(t){t.currentTarget.contains(t.target)&&(c&&c(t),e.handleCloseDropdownIconTooltips(),o&&!d&&e.handleCloseServerIdentityTooltip())}},r?null:p),r?null:pe(f.default,{tutorialId:"server-settings",position:f.TutorialIndicatorPositions.BOTTOM,offsetY:-31},void 0,e.renderGuildHeaderDropdownButton(i)))}))},i.setAnimatedValue=function(e){var t=this.props.guild,n=this.state,r=n.controller,a=n.renderBanner,o=n.bannerVisible;null!=t&&null!=this.getGuildBannerHash()&&((e>=64&&o||e<64&&!o)&&(o=!o),(e>=88&&!a||e<88&&a)&&(a=!a),a===this.state.renderBanner&&o===this.state.bannerVisible||this.setState({renderBanner:a,bannerVisible:o}),r.update({value:Math.min(1,Math.max(0,1-e/88)),immediate:!0}).start())},i.renderGuildSubheader=function(){var e=this.props.guild;return null!=e&&!e.hasFeature(re.GuildFeatures.HUB)&&pe(te.default,{guild:e})},i.renderChannelList=function(){var e=this.props,t=e.isUnavailable,n=e.guild,r=e.selectedChannel,o=de(e,["isUnavailable","guild","selectedChannel"]);return t||null==n?pe(ne.default,{withBannerPadding:null!=n&&null!=this.getGuildBannerHash()}):n.hasFeature(re.GuildFeatures.HUB)?pe(g.default,{guild:n,channel:null!=r?r:D.default.getDefaultChannel(n.id)}):a.createElement(J.default,fe({guild:n},o,{guildBanner:this.getGuildBannerHash(),onScroll:null!=n&&this.getGuildBannerHash()?this.pinBanner:null}))},i.render=function(){var e=this.props.guild;return pe("nav",{className:oe.default.container,onContextMenu:this.handleContextMenu,"aria-label":ae.default.Messages.GUILD_SIDEBAR_A11Y_LABEL.format({guildName:null!=e?e.toString():""})},void 0,null!=e&&this.renderGuildHeader(),null!=e&&this.renderGuildSubheader(),this.renderChannelList())},r}(a.PureComponent);function he(e){var t=e.guildId,n=e.hideSelectedChannel,r=e.selectedChannelId,a=(0,i.useStateFromStores)([j.default],(function(){return j.default.getGuild(t)})),o=(0,i.useStateFromStores)([D.default],(function(){return D.default.getChannels(t)})),l=(0,i.useStateFromStores)([L.default],(function(){return L.default.getCategories(t)})),u=(0,i.useStateFromStores)([F.default],(function(){return F.default.getMutedChannels(t)})),s=(0,i.useStateFromStores)([W.default],(function(){return W.default.getVoiceStates(t)})),d=(0,i.useStateFromStores)([A.default],(function(){return A.default.getCollapsed()})),f=(0,i.useStateFromStores)([F.default],(function(){return F.default.isGuildCollapsed(t)})),v=(0,i.useStateFromStores)([w.default],(function(){return w.default.getGuildChangeSentinel(t)})),y=(0,i.useStateFromStores)([P.default],(function(){return P.default.getGuildDimensions(t).scrollTo})),m=(0,i.useStateFromStores)([G.default],(function(){return G.default.getChannelId()})),g=(0,i.useStateFromStoresArray)([U.default],(function(){return[U.default.getGuildVersion(t),U.default.can(re.Permissions.MANAGE_EMOJIS,a)]})),S=g[0],I=g[1],Y=(0,i.useStateFromStores)([M.default],(function(){return M.default.getVersion()})),z=(0,i.useStateFromStores)([b.default],(function(){return b.default.version})),K=(0,i.useStateFromStores)([C.default],(function(){return C.default.isGuest()})),$=(0,i.useStateFromStores)([R.default],(function(){return R.default.isUnavailable(t)})),Z=(0,i.useStateFromStores)([H.default],(function(){return H.default.getNullableCurrentUser()})),q=(0,i.useStateFromStores)([_.default,U.default,k.default],(function(){return null!=a&&null!=Z&&U.default.can(re.Permissions.MANAGE_GUILD,a)&&!k.default.hasLayers()&&_.default.shouldShowGuildTemplateDirtyTooltip(t)})),X=(0,i.useStateFromStores)([N.default],(function(){return N.default.getChannel(m)})),J=(0,i.useStateFromStores)([p.default,B.default],(function(){return p.default.darkSidebar?re.ThemeTypes.DARK:B.default.theme})),Q=(0,T.default)(t),ee=null!=X&&X.guild_id===t&&X.type===re.ChannelTypes.GUILD_STAGE_VOICE,te=Q.length>0&&!ee,ne=(0,h.usePurchasableLiveScheduledEventsStageChannel)(t),ae=ne.purchasableLiveScheduledEventStageChannel,oe=ne.purchasableLiveScheduledEvent,ie=null!=ae&&null!=oe,le=(0,i.useStateFromStores)([x.default,O.default,V.default,M.default],(function(){return null!=M.default.getNotice(a)||V.default.isVisible(null!=a?a.id:null)||O.default.isVisible(a)||x.default.isVisible(a)||te||ie||!1})),ue=(0,c.useAndTriggerGuildMemberAvatarExperiment)(),se=(0,i.useStateFromStoresArray)([E.HotspotStore],(function(){return[ue&&E.HotspotStore.hasHotspot(E.HotspotLocations.GUILD_PER_SERVER_AVATAR_GUILD_HEADER_TOOLTIP),E.HotspotStore.hasHotspot(E.HotspotLocations.GUILD_STICKERS_GUILD_HEADER_TOOLTIP)]})),de=se[0],fe=se[1],ce=Object.values(N.default.getMutableGuildChannels()).find((function(e){return e.isDirectory()})),ve=(0,i.useStateFromStores)([N.default],(function(){return r?N.default.getChannel(r):ce}));return pe(_e,{guildId:t,hideSelectedChannel:n,guild:a,channels:o,categories:l,mutedChannels:u,scrollToChannel:y,selectedChannelId:n?null:r,selectedChannel:ve,selectedVoiceChannelId:m,voiceStates:s,collapsedChannels:d,collapseMuted:f,isGuest:K,isUnavailable:$,shouldShowGuildTemplateDirtyTooltip:q,theme:J,hasChannelNotice:le,showPerServerUpsell:de,showGuildStickerTooltip:fe&&I,guildReadStateSentinel:v,permissionVersion:S,channelNoticeVersion:Y,categoryCollapseVersion:z})}_e.displayName="GuildSidebar",he.displayName="ConnectedGuildSidebar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(8015));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=u("g",{fill:"none",fillRule:"evenodd"},void 0,u("path",{d:"M0 0h18v18H0"}),u("path",{stroke:"currentColor",d:"M4.5 4.5l9 9",strokeLinecap:"round"}),u("path",{stroke:"currentColor",d:"M13.5 4.5l-9 9",strokeLinecap:"round"})),d=function(e){var t,n=e.open,r=e.className;return u("svg",{width:"18",height:"18",className:(0,a.default)(o.default.button,r,(t={},t[o.default.open]=n,t))},void 0,s)};d.displayName="DropdownButton";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;v(n(0));var r,a=n(389),o=v(n(8253)),i=c(n(11)),l=c(n(86)),u=c(n(9167)),s=c(n(9183)),d=c(n(9184)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.guild,n=e.onSelect,r=l.default.getDefaultChannel(t.id),c=(0,s.default)(t.id),p=(0,u.default)(t),v=(0,d.default)(t,r);return i.default.isGuest()?null:y(o.default,{navId:"guild-context","aria-label":f.default.Messages.GUILD_ACTIONS_MENU_LABEL,onClose:a.closeContextMenu,onSelect:n},void 0,y(o.MenuGroup,{},void 0,c),y(o.MenuGroup,{},void 0,p,v))}m.displayName="GuildChannelListContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(28)),o=i(n(2));n(1);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){return(u=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}).apply(this,arguments)}var s={},d=!0===a.default.get("hasSeenGuildTemplatePromotionTooltip");function f(e){var t,n=e.guildId;s=u({},s,((t={})[n]=!1,t))}var c=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var a=r.prototype;return a.shouldShowGuildTemplateDirtyTooltip=function(e){var t;return null!==(t=s[e])&&void 0!==t&&t},a.shouldShowGuildTemplatePromotionTooltip=function(){return!d},r}(r.default.Store))(o.default,{GUILD_TEMPLATE_DIRTY_TOOLTIP_REFRESH:function(e){var t,n=e.guildTemplate;s=u({},s,((t={})[n.source_guild_id]=n.is_dirty||!1,t))},GUILD_TEMPLATE_PROMOTION_TOOLTIP_HIDE:function(e){return a.default.set("hasSeenGuildTemplatePromotionTooltip",!0),void(d=!0)},GUILD_TEMPLATE_SYNC_SUCCESS:f,GUILD_TEMPLATE_DIRTY_TOOLTIP_HIDE:f,GUILD_TEMPLATE_DELETE_SUCCESS:f});t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=n(92),l=h(n(8283)),u=h(n(10385)),s=h(n(1313)),d=h(n(8368)),f=h(n(5951)),c=n(41),p=h(n(8553)),v=h(n(272)),y=n(1),m=h(n(6)),_=h(n(8020));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var O=[{icon:S(s.default,{}),key:"JOIN_SERVERS",name:m.default.Messages.HUB_SIDEBAR_JOIN_SERVERS,style:_.default.joinServerOption,handler:i.NOOP},{icon:S(f.default,{}),key:"ADD_SERVERS",name:m.default.Messages.HUB_SIDEBAR_ADD_SERVERS,style:_.default.addServerOption,handler:function(e,t){return(0,c.openModal)((function(n){return a.createElement(u.default,g({},n,{directoryGuildName:e.name,directoryGuildId:e.id,directoryChannelId:t.id}))}))}},{icon:S(d.default,{}),key:"INVITE_MEMBERS",name:m.default.Messages.HUB_SIDEBAR_INVITE_MEMBERS,style:_.default.inviteMemberOption,handler:function(e,t){return(0,c.openModal)((function(n){return a.createElement(l.default,g({},n,{guild:e,channel:t,source:y.InstantInviteSources.HUB_SIDEBAR}))}))}}],I=function(e){return S(v.default,{className:_.default.scroller},void 0,O.map((function(t){return S(p.default,{avatar:t.icon,name:t.name,focusProps:{offset:{right:4,top:1,bottom:1}},onClick:function(){return function(t){var n=e.guild,r=e.channel,a=O.find((function(e){return e.key===t}));a&&a.handler&&null!=r&&a.handler(n,r)}(t.key)},wrapContent:!0,selected:"JOIN_SERVERS"===t.key,className:(0,o.default)(_.default.optionItem,t.style),selectedClassName:_.default.selectedOptionItem,innerClassName:_.default.itemInner},t.key)})))};I.displayName="HubSidebar";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r,d=e.directoryChannelId,c=e.onClose,y=e.setSlide,N=e.onGuildChosen,A=e.directoryGuildName,P=e.directoryGuildId,R=(0,v.useUID)(),k=(0,i.useStateFromStores)([u.default],(function(){return u.default.getFlattenedGuilds()})),G=(0,i.useStateFromStores)([I.default],(function(){return I.default.getDirectoryEntries(d)})),F=a.useState(j.AVAILABLE),B=F[0],H=F[1],x=a.useMemo((function(){return k.filter((function(e){return l.default.can(T.Permissions.ADMINISTRATOR,e)&&null==G[e.id]&&e.id!==P}))}),[k,G,P]),V=a.useMemo((function(){return k.filter((function(e){return l.default.can(T.Permissions.ADMINISTRATOR,e)&&null!=G[e.id]}))}),[k,G]);function W(e){null!=e&&(0,h.openModal)((function(t){return a.createElement(m.default,L({header:C.default.Messages.HUB_ENTRY_REMOVE,confirmText:C.default.Messages.REMOVE,cancelText:C.default.Messages.CANCEL,onConfirm:function(){return t=e.id,void S.removeDirectoryGuildEntry(d,t);var t}},t),D(g.default,{size:g.default.Sizes.SIZE_16},void 0,C.default.Messages.HUB_ENTRY_REMOVE_BODY.format({guildName:e.name})))}))}r=B===j.AVAILABLE?0===x.length?D("div",{className:b.default.emptyContainer},void 0,D("img",{src:M.default,alt:"",className:b.default.emptyImage}),D(g.default,{className:b.default.emptyText,color:g.default.Colors.HEADER_SECONDARY,size:g.default.Sizes.SIZE_16},void 0,C.default.Messages.HUB_CHOOSE_GUILD_EMPTY)):x.map((function(e){return D(w,{guild:e,onClick:function(){return N(e)}},e.id)})):0===V.length?D("div",{className:b.default.emptyContainer},void 0,D("img",{src:M.default,alt:"",className:b.default.emptyImage}),D(g.default,{className:b.default.emptyText,color:g.default.Colors.HEADER_SECONDARY,size:g.default.Sizes.SIZE_16},void 0,C.default.Messages.HUB_CHOOSE_GUILD_ADDED_EMPTY)):V.map((function(e){return D(U,{guild:e,handleRemove:W},e.id)}));return a.createElement(a.Fragment,null,D(_.ModalHeader,{direction:f.default.Direction.VERTICAL,className:b.default.header,separator:!1,id:R},void 0,c&&D(_.ModalCloseButton,{className:b.default.closeButton,onClick:c}),D(E.default,{className:b.default.title,size:E.default.Sizes.SIZE_24},void 0,C.default.Messages.HUB_CHOOSE_GUILD_TITLE.format({guildName:A})),D(g.default,{className:b.default.subtitle,color:g.default.Colors.HEADER_SECONDARY,size:g.default.Sizes.SIZE_16},void 0,C.default.Messages.HUB_CHOOSE_GUILD_SUBTITLE),D(p.default,{className:b.default.tabBar,selectedItem:B,onItemSelect:H,type:p.default.Types.TOP,look:p.default.Looks.BRAND},void 0,D(p.Item,{className:(0,o.default)(b.default.tabBarItem,(t={},t[b.default.selectedTab]=B===j.AVAILABLE,t)),id:j.AVAILABLE},void 0,C.default.Messages.HUB_CHOOSE_GUILD_CHOOSE_TAB),D(p.Item,{className:(0,o.default)(b.default.tabBarItem,(n={},n[b.default.selectedTab]=B===j.ADDED,n)),id:j.ADDED},void 0,C.default.Messages.HUB_CHOOSE_GUILD_ADDED_TAB))),D(_.ModalContent,{className:b.default.guildList,paddingFix:!1},void 0,r),D(_.ModalFooter,{className:b.default.footer},void 0,D(E.default,{size:E.default.Sizes.SIZE_20,className:b.default.footerTitle},void 0,C.default.Messages.HUB_CREATE_GUILD_LABEL),D(s.default,{className:b.default.footerButton,color:s.default.Colors.GREY,onClick:function(){return y(O.CreateOrAddGuildSlideTypes.GUILD_TEMPLATES)}},void 0,C.default.Messages.HUB_CREATE_GUILD_CTA)))};var r,a=R(n(0)),o=A(n(9)),i=n(3),l=A(n(40)),u=A(n(361)),s=A(n(29)),d=A(n(61)),f=A(n(55)),c=A(n(371)),p=R(n(8293)),v=n(85),y=A(n(8676)),m=A(n(466)),_=n(35),h=n(41),E=A(n(47)),g=A(n(24)),S=R(n(9022)),O=n(9190),I=A(n(10387)),T=n(1),C=A(n(6)),b=A(n(8016)),M=A(n(11122)),N=A(n(9088));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w(e){var t=e.guild,n=e.onClick;return D(d.default,{className:b.default.clickableGuildRow,onClick:n},void 0,D(c.default,{guild:t,size:c.default.Sizes.MEDIUM,active:!0}),D(g.default,{className:b.default.guildName,size:g.default.Sizes.SIZE_16},void 0,t.name),D("img",{className:b.default.arrow,alt:"",src:N.default}))}w.displayName="GuildRow";var j,k=D(y.default,{height:20,width:20});function U(e){var t=e.guild,n=e.handleRemove;return D("div",{className:b.default.guildRow},void 0,D(c.default,{guild:t,size:c.default.Sizes.MEDIUM,active:!0}),D(g.default,{className:b.default.guildName,size:g.default.Sizes.SIZE_16},void 0,t.name),D(d.default,{className:b.default.trashIcon,onClick:function(){return n(t)}},void 0,k))}U.displayName="AddedGuildRow",function(e){e[e.AVAILABLE=0]="AVAILABLE",e[e.ADDED=1]="ADDED"}(j||(j={}))},function(e,t,n){e.exports=n.p+"1edef87208ba9b5bca6448e5cd93b69f.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.guild,n=e.description,r=e.onDescriptionChange,y=e.onSubmit,m=e.onClose,E=e.onBack,g=(0,u.useUID)(),S=a.useState(!1),O=S[0],I=S[1];if(null==t)return E(),null;var T=function(){var e,n=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,y(t.id);case 3:I(!1);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){h(o,r,a,i,l,"next",e)}function l(e){h(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return n.apply(this,arguments)}}();return a.createElement(a.Fragment,null,_(d.ModalHeader,{direction:i.default.Direction.VERTICAL,className:v.default.header,separator:!1,id:g},void 0,_(f.default,{className:v.default.title,size:f.default.Sizes.SIZE_24},void 0,p.default.Messages.HUB_CUSTOMIZE_EXISTING_GUILD_TITLE.format({guildName:t.name})),_(c.default,{className:v.default.subtitle,color:c.default.Colors.HEADER_SECONDARY,size:c.default.Sizes.SIZE_16},void 0,p.default.Messages.HUB_ADD_GUILD_DESCRIPTION_HELP),m&&_(d.ModalCloseButton,{className:v.default.closeButton,onClick:m})),_(d.ModalContent,{className:v.default.createGuild,paddingFix:!1},void 0,_(s.FormItem,{title:p.default.Messages.HUB_ADD_GUILD_DESCRIPTION_TITLE},void 0,_(l.default,{value:n,maxLength:200,placeholder:p.default.Messages.HUB_ADD_GUILD_DESCRIPTION_PLACEHOLDER,onChange:r}))),_(d.ModalFooter,{justify:i.default.Justify.BETWEEN},void 0,_(o.default,{color:o.default.Colors.BRAND,onClick:T,submitting:O},void 0,p.default.Messages.HUB_ADD_SERVER_CTA),_(o.default,{look:o.default.Looks.BLANK,size:o.default.Sizes.MIN,onClick:E},void 0,p.default.Messages.BACK)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(29)),i=y(n(55)),l=y(n(8272)),u=n(85),s=n(131),d=n(35),f=y(n(47)),c=y(n(24)),p=y(n(6)),v=y(n(7361));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.directoryGuildName,n=e.newGuild,r=e.existingGuild,m=e.onClose,_=(0,d.useUID)(),E=null!=n?n:r;(0,o.default)(null!=E,"Missing guild in Hub add guild confirmation");return a.createElement(a.Fragment,null,h(f.ModalHeader,{direction:u.default.Direction.VERTICAL,className:y.default.header,separator:!1,id:_},void 0,m&&h(f.ModalCloseButton,{className:y.default.closeButton,onClick:m}),h(s.default,{guild:E,size:s.default.Sizes.XLARGE,active:!0}),h(c.default,{className:y.default.title,size:c.default.Sizes.SIZE_24},void 0,v.default.Messages.HUB_ADD_OR_CREATE_SERVER_CONFIRMATION_TITLE),h(p.default,{className:y.default.subtitle,color:p.default.Colors.HEADER_SECONDARY,size:p.default.Sizes.SIZE_16},void 0,null!=n?v.default.Messages.HUB_CREATE_SERVER_CONFIRMATION_SUBTITLE.format({guildName:t}):v.default.Messages.HUB_ADD_SERVER_CONFIRMATION_SUBTITLE.format({guildName:t}))),h(f.ModalFooter,{className:y.default.buttonRow},void 0,null!=n?a.createElement(a.Fragment,null,h(l.default,{className:y.default.createSecondaryButton,color:l.default.Colors.GREY,onClick:m},void 0,v.default.Messages.HUB_CREATE_SERVER_CONFIRMATION_STAY),h(l.default,{className:y.default.createConfirmButton,color:l.default.Colors.BRAND,onClick:function(){(0,i.transitionToGuild)(E.id),null==m||m()}},void 0,v.default.Messages.HUB_CREATE_SERVER_CONFIRMATION_GO)):h(l.default,{className:y.default.addConfirmButton,color:l.default.Colors.BRAND,onClick:m},void 0,v.default.Messages.HUB_ADD_SERVER_CONFIRMATION_BUTTON)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(23)),i=n(42),l=m(n(29)),u=m(n(55)),s=m(n(371)),d=n(85),f=n(35),c=m(n(47)),p=m(n(24)),v=m(n(6)),y=m(n(8017));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.onClose,n=e.onBack,r=e.onChooseTemplate,o=e.directoryGuildName,p=(0,u.useUID)(),m=(0,c.getHubGuildTemplatesMap)();return a.createElement(a.Fragment,null,E(s.ModalHeader,{direction:l.default.Direction.VERTICAL,className:y.default.header,separator:!1,id:p},void 0,E(d.default,{className:y.default.title,size:d.default.Sizes.SIZE_24},void 0,v.default.Messages.HUB_CREATE_OR_ADD_GUILD_TITLE.format({guildName:o})),E(f.default,{className:y.default.subtitle,color:f.default.Colors.HEADER_SECONDARY,size:f.default.Sizes.SIZE_16},void 0,v.default.Messages.HUB_CREATE_OR_ADD_GUILD_SUBTITLE),t&&E(s.ModalCloseButton,{className:y.default.closeButton,onClick:t})),E(s.ModalContent,{className:y.default.templatesList,paddingFix:!1},void 0,E(g,{guildTemplate:h({},m[c.HubGuildTemplateId.CREATE],{label:v.default.Messages.HUB_CREATE_GUILD_CTA}),onClick:r}),E(f.default,{className:y.default.optionHeader,color:f.default.Colors.HEADER_SECONDARY,size:f.default.Sizes.SIZE_12},void 0,v.default.Messages.GUILD_TEMPLATE_SELECTOR_OPTION_HEADER),E(g,{guildTemplate:m[c.HubGuildTemplateId.HUB_STUDY],onClick:r}),E(g,{guildTemplate:m[c.HubGuildTemplateId.HUB_SCHOOL_CLUB],onClick:r}),E(g,{guildTemplate:m[c.HubGuildTemplateId.HUB_CLASS],onClick:r}),E(g,{guildTemplate:m[c.HubGuildTemplateId.HUB_SOCIAL],onClick:r}),E(g,{guildTemplate:m[c.HubGuildTemplateId.HUB_MAJOR],onClick:r}),E(g,{guildTemplate:m[c.HubGuildTemplateId.HUB_DORM],onClick:r})),E(s.ModalFooter,{className:y.default.footer},void 0,E(i.default,{look:i.default.Looks.BLANK,size:i.default.Sizes.MIN,onClick:n},void 0,v.default.Messages.BACK)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(8717)),i=m(n(29)),l=m(n(55)),u=n(85),s=n(35),d=m(n(47)),f=m(n(24)),c=n(9190),p=n(11126),v=m(n(6)),y=m(n(8018));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.guildTemplate,n=e.onClick,r=e.autoFocus,i=a.useCallback((function(){n(t)}),[t,n]);return E(o.default,{icon:p.GUILD_TEMPLATE_ICONS[t.id],message:t.label,onClick:i,autoFocus:r})}g.displayName="GuildTemplatesItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GUILD_TEMPLATE_ICONS=void 0;var r=d(n(8718)),a=d(n(9091)),o=d(n(9092)),i=d(n(9093)),l=d(n(9094)),u=d(n(8719)),s=d(n(9095));function d(e){return e&&e.__esModule?e:{default:e}}var f={CREATE:o.default,HUB_SCHOOL_CLUB:u.default,HUB_STUDY:i.default,HUB_CLASS:s.default,HUB_SOCIAL:l.default,HUB_MAJOR:a.default,HUB_DORM:r.default};t.GUILD_TEMPLATE_ICONS=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=B(n(0)),o=G(n(3)),i=G(n(8768)),l=G(n(8254)),u=G(n(8458)),s=G(n(8283)),d=G(n(9164)),f=G(n(9165)),c=G(n(8412)),p=G(n(8405)),v=G(n(182)),y=B(n(8253)),m=n(8256),_=n(42),h=G(n(40)),E=G(n(181)),g=G(n(12)),S=G(n(9176)),O=G(n(8666)),I=G(n(11128)),T=G(n(11129)),C=G(n(8367)),b=G(n(1215)),M=G(n(8368)),N=G(n(1256)),A=G(n(5830)),P=G(n(1430)),R=n(1230),L=G(n(466)),D=n(41),w=G(n(24)),j=n(8286),k=n(1),U=G(n(6));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function H(){return(H=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}).apply(this,arguments)}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function V(e){(0,D.openModal)((function(t){return a.createElement(L.default,H({header:U.default.Messages.LEAVE_SERVER_TITLE.format({name:e.toString()}),confirmText:e.hasFeature(k.GuildFeatures.HUB)?U.default.Messages.LEAVE_HUB:U.default.Messages.LEAVE_SERVER,cancelText:U.default.Messages.CANCEL,onConfirm:function(){return l.default.leaveGuild(e.id)}},t),x(w.default,{size:w.default.Sizes.SIZE_16},void 0,e.hasFeature(k.GuildFeatures.HUB)?U.default.Messages.LEAVE_HUB_BODY.format({name:e.name}):U.default.Messages.LEAVE_SERVER_BODY.format({name:e.toString()})))}))}var W=a.memo((function(e){var t=e.canInvite,n=e.canAccessSettings,r=e.canManageChannels,o=e.guild,v=e.isCollapsed,h=e.isLurking,E=e.isOwner,g=e.showGuildAnalytics,L=e.onClose,w=e.user,j=e.onSelect,G=(0,p.default)(o.id,w.id,{page:k.AnalyticsPages.GUILD_CHANNEL,section:k.AnalyticsSections.GUILD_DROPDOWN_MENU},void 0,b.default),F=o.hasFeature(k.GuildFeatures.HUB);return h?x(y.default,{onSelect:j,navId:"guild-header-popout",style:y.MenuStyle.FIXED,onClose:L,"aria-label":U.default.Messages.GUILD_ACTIONS_MENU_LABEL},void 0,x(y.MenuItem,{id:"leave-guild",label:U.default.Messages.LEAVE_SERVER,icon:I.default,action:function(){l.default.leaveGuild(o.id),(0,_.transitionTo)(k.Routes.GUILD_DISCOVERY)}})):F?x(y.default,{onSelect:j,navId:"guild-header-popout",style:y.MenuStyle.FIXED,onClose:L,"aria-label":U.default.Messages.GUILD_ACTIONS_MENU_LABEL},void 0,x(y.MenuGroup,{},void 0,n?x(y.MenuItem,{id:"settings",label:U.default.Messages.SERVER_SETTINGS,icon:C.default,action:function(){l.default.open(o.id,k.GuildSettingsSections.OVERVIEW)}}):null,t?x(y.MenuItem,{id:"invite-people",label:U.default.Messages.INVITE_PEOPLE,icon:M.default,color:m.MenuItemColor.BRAND,action:function(){return(0,D.openModal)((function(e){return a.createElement(s.default,H({},e,{guild:o,source:k.InstantInviteSources.GUILD_HEADER}))}))}}):null,G),E?null:x(y.MenuGroup,{},void 0,x(y.MenuItem,{id:"leave",label:U.default.Messages.LEAVE_HUB,icon:I.default,color:m.MenuItemColor.DANGER,action:function(){return V(o)}}))):x(y.default,{onSelect:j,navId:"guild-header-popout",style:y.MenuStyle.FIXED,onClose:L,"aria-label":U.default.Messages.GUILD_ACTIONS_MENU_LABEL},void 0,x(y.MenuGroup,{},void 0,x(y.MenuItem,{id:"premium-subscribe",label:U.default.Messages.PREMIUM_GUILD_HEADER_DROPDOWN_NITRO_SERVER_SUBSCRIBE,icon:A.default,color:m.MenuItemColor.PREMIUM,action:function(){return(0,R.openFullScreenLayer)((function(e){var t=e.transitionState,n=e.closeLayer;return x(c.default,{layerTransitionState:t,close:n,guildId:o.id,locationSection:k.AnalyticsSections.GUILD_HEADER_POPOUT})}))}})),x(y.MenuGroup,{},void 0,t?x(y.MenuItem,{id:"invite-people",label:U.default.Messages.INVITE_PEOPLE,icon:M.default,color:m.MenuItemColor.BRAND,action:function(){return(0,D.openModal)((function(e){return a.createElement(s.default,H({},e,{guild:o,source:k.InstantInviteSources.GUILD_HEADER}))}))}}):null,n?x(y.MenuItem,{id:"settings",label:U.default.Messages.SERVER_SETTINGS,icon:C.default,action:function(){l.default.open(o.id,k.GuildSettingsSections.OVERVIEW)}}):null,g?x(y.MenuItem,{id:"insights",label:U.default.Messages.SERVER_INSIGHTS,icon:S.default,action:function(){return l.default.open(o.id,k.GuildSettingsSections.ANALYTICS)}}):null,r?a.createElement(a.Fragment,null,x(y.MenuItem,{id:"create-channel",label:U.default.Messages.CREATE_CHANNEL,icon:N.default,action:function(){return(0,D.openModal)((function(e){return a.createElement(u.default,H({},e,{channelType:k.ChannelTypes.GUILD_TEXT,guildId:o.id}))}))}}),x(y.MenuItem,{id:"create-category",label:U.default.Messages.CREATE_CATEGORY,icon:T.default,action:function(){return(0,D.openModal)((function(e){return a.createElement(u.default,H({},e,{channelType:k.ChannelTypes.GUILD_CATEGORY,guildId:o.id}))}))}})):null),x(y.MenuGroup,{},void 0,x(y.MenuItem,{id:"notifications",label:U.default.Messages.NOTIFICATION_SETTINGS,icon:O.default,action:function(){return(0,D.openModal)((function(e){return a.createElement(d.default,H({},e,{guildId:o.id}))}))}}),x(y.MenuItem,{id:"privacy",label:U.default.Messages.PRIVACY_SETTINGS,icon:P.default,action:function(){return(0,D.openModal)((function(e){return a.createElement(f.default,H({},e,{guild:o}))}))}})),x(y.MenuGroup,{},void 0,G,x(y.MenuCheckboxItem,{id:"hide-muted-channels",label:U.default.Messages.HIDE_MUTED_CHANNELS,checked:v,action:function(){return i.default.toggleCollapseGuild(o.id)}})),E?null:x(y.MenuGroup,{},void 0,x(y.MenuItem,{id:"leave",label:U.default.Messages.LEAVE_SERVER,icon:I.default,color:m.MenuItemColor.DANGER,action:function(){return V(o)}})))}));var Y=o.default.connectStores([g.default,h.default,E.default,v.default],(function(e){var t=e.guild,n=g.default.getCurrentUser();return{user:n,isCollapsed:E.default.isGuildCollapsed(t.id),canInvite:(0,j.canViewInviteModal)(h.default,t),canAccessSettings:h.default.canAccessGuildSettings(t),canManageChannels:h.default.can(k.Permissions.MANAGE_CHANNELS,t),isOwner:t.isOwner(n),isLurking:v.default.isLurking(t.id),showGuildAnalytics:h.default.can(k.Permissions.VIEW_GUILD_ANALYTICS,t)&&t.hasFeature(k.GuildFeatures.COMMUNITY)}}))(W);t.default=Y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M10.418 13L12.708 15.294L11.292 16.706L6.586 11.991L11.294 7.292L12.707 8.708L10.41 11H21.949C21.446 5.955 17.177 2 12 2C6.486 2 2 6.487 2 12C2 17.513 6.486 22 12 22C17.177 22 21.446 18.046 21.949 13H10.418Z"}))}d.displayName="Exit"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,d:"M20 7H12L10.553 5.106C10.214 4.428 9.521 4 8.764 4H3C2.447 4 2 4.447 2 5V19C2 20.104 2.895 21 4 21H20C21.104 21 22 20.104 22 19V9C22 7.896 21.104 7 20 7ZM16 15H13V18H11V15H8V13H11V10H13V13H16V15Z"}))}d.displayName="FolderAdd"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.guild;return(0,a.useStateFromStores)([i.default],(function(){return i.default.hasProgress(t.id)}),[t.id])?d(l.default,{guild:t}):d(o.default,{guild:t})};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=u(n(11131)),i=u(n(9945)),l=u(n(11142));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=L();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=R(n(8)),i=n(3),l=n(8413),u=n(5946),s=R(n(106)),d=n(9021),f=R(n(11132)),c=R(n(10388)),p=R(n(11134)),v=R(n(8559)),y=R(n(8599)),m=n(10391),_=R(n(8919)),h=R(n(40)),E=R(n(8568)),g=R(n(10389)),S=R(n(10390)),O=n(5935),I=R(n(11135)),T=R(n(11136)),C=R(n(11137)),b=R(n(11138)),M=R(n(11139)),N=R(n(11140)),A=R(n(11141)),P=n(1);function R(e){return e&&e.__esModule?e:{default:e}}function L(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return L=function(){return e},e}function D(){return(D=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}).apply(this,arguments)}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){e.stopPropagation()}var U=o.default.debounce(s.default.trackWithMetadata,500),G=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,j(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.guild,n=e.notice;null!=n&&((0,l.showNotice)(n.type,t),U(P.AnalyticEvents.CHANNEL_NOTICE_VIEWED,{notice_type:n.type,guild_id:t.id}))},a.componentDidUpdate=function(e){var t=this.props,n=t.guild,r=t.notice;null==r||e.guild.id===n.id&&null!=e.notice&&e.notice.type===r.type||((0,l.showNotice)(r.type,n),U(P.AnalyticEvents.CHANNEL_NOTICE_VIEWED,{notice_type:r.type,guild_id:n.id}))},a.renderNotice=function(){var e=this.props,t=e.guild,n=e.notice;if(null==n)return null;switch(n.type){case P.ChannelNoticeTypes.MFA_WARNING:return w(I.default,{guild:t});case P.ChannelNoticeTypes.INVITE:return w(T.default,{guild:t});case P.ChannelNoticeTypes.QUICKSWITCHER:return w(A.default,{guild:t});case P.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS_GUILD_AFFINITY:return w(M.default,{guild:t});case P.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS:return w(N.default,{guild:t});default:return null}},a.render=function(){return null==this.props.notice?null:w("div",{onContextMenu:k},void 0,this.renderNotice())},r}(a.PureComponent);G.displayName="ChannelNotices";var F=function(e){var t=e.guild,n=(0,i.useStateFromStoresObject)([E.default],(function(){return{subscriptions:E.default.getSubscriptionsForGuild(t.id),lastFetchedAt:E.default.getLastFetchedAtForGuild(t.id)}})),r=n.subscriptions,o=n.lastFetchedAt,l=(0,i.useStateFromStoresObject)([S.default],(function(){return{lastDismissedGracePeriod:S.default.getLastDismissedGracePeriodForGuild(t.id),isGracePeriodVisible:S.default.isVisible(t.id)}})),s=l.lastDismissedGracePeriod,I=l.isGracePeriodVisible,T=(0,i.useStateFromStores)([_.default],(function(){return _.default.getNotice(e.guild)})),M=(0,i.useStateFromStores)([c.default],(function(){return c.default.isVisible(t)})),N=(0,i.useStateFromStoresObject)([g.default],(function(){return{channelNoticeType:g.default.getNoticeType(t),isMaxMemberNoticeVisible:g.default.isVisible(t)}})),A=N.channelNoticeType,R=N.isMaxMemberNoticeVisible,L=(0,i.useStateFromStores)([h.default],(function(){return h.default.can(P.Permissions.ADMINISTRATOR,t)})),j=null!=s&&Date.now()-s<=P.GRACE_PERIOD_CHANNEL_NOTICE_SHOW_DELAY,k=null!=t?t.premiumSubscriberCount:0,U=(0,O.getGuildTierFromSubscriberCount)(k)!==P.PremiumGuildTiers.NONE,F=null!=o&&Date.now()-o<=432e5,B=!j&&L&&U&&!F,H=(0,v.default)(t.id)[0],x=(0,y.default)(),V=(0,d.usePurchasableLiveScheduledEventsStageChannel)(t.id),W=V.purchasableLiveScheduledEventStageChannel,Y=V.purchasableLiveScheduledEvent;return a.useEffect((function(){B&&(0,u.fetchPremiumSubscriptions)(t.id)}),[t.id,B]),M?w(p.default,{guild:t}):I?w(b.default,{guild:t,subscriptions:r}):R&&null!=A?w(C.default,{guild:t,channelNoticeType:A}):null==Y||null==W||null!=x&&x.guild_id===t.id?null==H||null!=x&&x.guild_id===t.id?a.createElement(G,D({},e,{notice:T})):w(m.JoinableStageChannelEventNotice,{guild:t,channel:H}):w(f.default,{guild:t,channel:W,guildEvent:Y})};F.displayName="ConnectedNotices";var B=F;t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(42),o=c(n(8492)),i=c(n(10391)),l=c(n(10392)),u=n(9996),s=c(n(8456)),d=n(1),f=c(n(8023));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.guild,n=e.channel,r=e.guildEvent,c=(0,s.default)(t.id).canStartEvents,p=o.default.useExperiment({guildId:t.id})[0].enabled,y=(0,u.useSharedStageInstanceDiscoveryStates)(r,c,n),m=y.isTicketedEvent,_=y.isLive,h=y.sku,E=y.canPurchaseTicket,g=y.canJoinChannel;if(!_||!p||m&&!E&&!g)return null;return v("div",{},void 0,v(i.default,{guild:t,channel:n},void 0,E&&v(l.default,{sku:h,handlePurchase:function(){(0,a.transitionTo)(d.Routes.UPCOMING_STAGES(t.id,r.id))},className:f.default.purchaseButton})))};y.displayName="TicketedEventNotice";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.useStateFromStores)([a.default,o.default,i.default],(function(){var t=a.default.getId();return o.default.getVoiceChannelId()===e?i.default.getPermissionsForUser(t,e):null}),[e])};var r=n(3),a=l(n(11)),o=l(n(36)),i=l(n(205));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=n(8413),l=y(n(8254)),u=y(n(29)),s=y(n(61)),d=y(n(255)),f=y(n(13)),c=n(1),p=y(n(6)),v=y(n(7358));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(e){var t=e.guild;a.useEffect((function(){f.default.track(c.AnalyticEvents.CHANNEL_NOTICE_VIEWED,{notice_type:c.ChannelNoticeTypes.PUBLIC_UPSELL,guild_id:t.id})}),[t.id]);var n=a.useCallback((function(){(0,i.hideEnablePublicGuildUpsellNotice)(t.id)}),[t.id]);return _("div",{className:(0,o.default)(v.default.channelNotice,v.default.publicUpsell)},void 0,_(s.default,{onClick:n,className:v.default.close},void 0,_(d.default,{className:v.default.closeIcon})),_("div",{className:v.default.message},void 0,p.default.Messages.NOTICE_ENABLE_PUBLIC_GUILD_UPSELL_MESSAGE,_(u.default,{fullWidth:!0,className:v.default.btn,onClick:function(){f.default.track(c.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:c.ChannelNoticeCtaSources.ENABLE_PUBLIC_GUILD_UPSELL_NOTICE,guild_id:t.id}),l.default.open(t.id,c.GuildSettingsSections.COMMUNITY)}},void 0,p.default.Messages.LEARN_MORE)))};h.displayName="EnablePublicGuildUpsellNotice";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=n(8413),l=p(n(473)),u=p(n(29)),s=p(n(13)),d=n(1),f=p(n(6)),c=p(n(7358));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleEnableMFA=function(){var e=t.props.guild;s.default.track(d.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:d.ChannelNoticeCtaSources.GUILD_MFA_WARNING,guild_id:e.id}),l.default.open(d.UserSettingsSections.ACCOUNT)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=r.prototype;return a.componentWillUnmount=function(){(0,i.hideNotice)(d.ChannelNoticeTypes.MFA_WARNING)},a.render=function(){return y("div",{className:(0,o.default)(c.default.channelNotice,c.default.guildMFAWarning)},void 0,y("div",{className:c.default.message},void 0,y("div",{},void 0,f.default.Messages.TWO_FA_GUILD_MFA_WARNING_MESSAGE_WITH_SPACING.format()),y(u.default,{className:c.default.btn,onClick:this.handleEnableMFA},void 0,f.default.Messages.TWO_FA_GUILD_MFA_WARNING_RESOLVE_BUTTON)))},r}(a.PureComponent);_.displayName="GuildMFAWarning";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=n(8413),l=h(n(390)),u=h(n(8283)),s=h(n(36)),d=h(n(29)),f=h(n(61)),c=h(n(255)),p=n(41),v=h(n(13)),y=n(1),m=h(n(6)),_=h(n(7358));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleInvite=function(){var e=t.props.guild;v.default.track(y.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:y.ChannelNoticeCtaSources.INVITE_NOTICE,guild_id:e.id}),(0,p.openModal)((function(t){return a.createElement(u.default,S({},t,{guild:e,source:y.InstantInviteSources.INVITE_NOTICE}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var h=r.prototype;return h.handleClose=function(){var e=s.default.getChannelId();(0,i.hideNotice)(y.ChannelNoticeTypes.INVITE),e&&l.default.sendBotMessage(e,m.default.Messages.HOW_TO_INVITE_OTHERS.format({invitePeople:m.default.Messages.INVITE_PEOPLE}))},h.render=function(){return g("div",{className:(0,o.default)(_.default.channelNotice,_.default.invite)},void 0,g(f.default,{onClick:this.handleClose,className:_.default.close},void 0,g(c.default,{className:_.default.closeIcon})),g("div",{className:_.default.message},void 0,g("div",{},void 0,m.default.Messages.INVITE_NOTICE_MESSAGE),g("div",{},void 0,m.default.Messages.INVITE_NOTICE_MESSAGE_PART_2),g(d.default,{className:_.default.btn,onClick:this.handleInvite},void 0,m.default.Messages.INVITE_PEOPLE)))},r}(a.PureComponent);I.displayName="InviteNotice";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(9)),i=n(8413),l=v(n(61)),u=v(n(255)),s=v(n(13)),d=v(n(93)),f=n(1),c=v(n(6)),p=v(n(7358));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.guild,n=e.channelNoticeType;a.useEffect((function(){s.default.track(f.AnalyticEvents.CHANNEL_NOTICE_VIEWED,{notice_type:n,guild_id:t.id})}),[t.id,n]);var r=a.useCallback((function(){(0,i.hideMaxMemberCountChannelNotice)(t.id,n)}),[t.id,n]);return m("div",{className:(0,o.default)(p.default.channelNotice,p.default.maxMembersCount)},void 0,m(l.default,{onClick:r,className:p.default.close},void 0,m(u.default,{className:p.default.closeIcon})),m("div",{className:p.default.message},void 0,m("div",{},void 0,c.default.Messages.NOTICE_CHANNEL_MAX_MEMBERS_CAP_REACHED_MESSAGE.format({maxMemberCount:t.maxMembers,maxMembersUrl:d.default.getArticleURL(f.HelpdeskArticles.MAX_MEMBERS)}))))};_.displayName="MaxMemberCountNotice";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(8413),i=y(n(8254)),l=y(n(29)),u=y(n(61)),s=y(n(255)),d=y(n(13)),f=n(5935),c=n(1),p=y(n(6)),v=y(n(8024));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=function(e){var t=e.guild,n=e.subscriptions,r=t.id;a.useEffect((function(){d.default.track(c.AnalyticEvents.CHANNEL_NOTICE_VIEWED,{notice_type:c.ChannelNoticeTypes.PREMIUM_GUILD_GRACE_PERIOD,guild_id:r})}),[r]);return null==n||(0,f.premiumGuildSubscriptionsRequiredForPerks)(n)<=0?null:_("div",{className:v.default.channelNotice},void 0,_(u.default,{onClick:function(){(0,o.hidePremiumGuildGracePeriodNotice)(r)},className:v.default.close},void 0,_(s.default,{className:v.default.closeIcon})),_("div",{className:v.default.message},void 0,p.default.Messages.PREMIUM_GUILD_GRACE_PERIOD_NOTICE),_(l.default,{fullWidth:!0,color:l.default.Colors.GREY,size:l.default.Sizes.SMALL,onClick:function(){d.default.track(c.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:c.ChannelNoticeCtaSources.GRACE_PERIOD_NOTICE,guild_id:r}),i.default.open(r,c.GuildSettingsSections.GUILD_PREMIUM)},className:v.default.checkStatusButton},void 0,p.default.Messages.PREMIUM_GUILD_GRACE_PERIOD_NOTICE_BUTTON))};h.displayName="PremiumGuildSubscriptionGracePeriodNotice";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8413),i=h(n(8412)),l=n(1148),u=h(n(684)),s=h(n(29)),d=h(n(61)),f=n(5703),c=h(n(255)),p=n(1230),v=h(n(13)),y=n(1),m=h(n(6)),_=h(n(8025));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var S=(0,l.registerUserExperiment)({id:l.Experiments.GUILD_AFFINITY_PREMIUM_GUILD_SUBSCRIPTION_CTA,title:"Premium guild subscription for high-affinity guilds",description:["Show premium guild subscription CTA","Control: No CTA.","Treatment 1: Show CTA."],buckets:[l.ExperimentBuckets.CONTROL,l.ExperimentBuckets.TREATMENT_1]}),O=function(e){var t=e.guild,n=(0,l.useAndTrackExposureToUserExperiment)(S),r=(0,a.useStateFromStores)([u.default],(function(){return u.default.getMemberCount(t.id)}));if(n!==l.ExperimentBuckets.TREATMENT_1)return null;var h=null==r||r<y.SMALL_GUILD_MEMBER_THRESHOLD;return g("div",{className:_.default.channelNotice},void 0,g(d.default,{onClick:function(){(0,o.hideNotice)(y.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS_GUILD_AFFINITY),(0,o.hideNotice)(y.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS,{suppressAnalyticsTracking:!0})},className:_.default.close},void 0,g(c.default,{className:_.default.closeIcon})),g("div",{className:_.default.premiumGuildAnimationWrapper},void 0,g(f.PremiumPaymentGuildAnimation,{className:_.default.premiumGuildAnimation,nextScene:f.PremiumPaymentGuildAnimation.Scenes.IDLE})),g("div",{className:_.default.message},void 0,h?m.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_GUILD_AFFINITY_NOTICE_SMALL_GUILD:m.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_GUILD_AFFINITY_NOTICE,g(s.default,{fullWidth:!0,color:s.default.Colors.BRAND,size:s.default.Sizes.SMALL,className:_.default.guildAffinityPremiumSubscriptionButton,onClick:function(){v.default.track(y.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:y.ChannelNoticeCtaSources.GUILD_AFFINITY_SUGGESTION,guild_id:t.id}),(0,p.openFullScreenLayer)((function(e){var n=e.transitionState,r=e.closeLayer;return g(i.default,{layerTransitionState:n,close:r,guildId:t.id,locationSection:y.AnalyticsSections.CHANNEL_NOTICE})}))}},void 0,m.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_GUILD_AFFINITY_NOTICE_BUTTON)))};O.displayName="PremiumGuildSubscriptionGuildAffinityNotice";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(3)),l=n(8413),u=h(n(8412)),s=h(n(684)),d=h(n(29)),f=h(n(61)),c=h(n(255)),p=n(1230),v=h(n(13)),y=n(1),m=h(n(6)),_=h(n(7358));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleButtonClick=function(){var e=t.props.guild;v.default.track(y.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:y.ChannelNoticeCtaSources.GUILD_SUBSCRIPTION_NOTICE,guild_id:e.id}),(0,p.openFullScreenLayer)((function(e){var n=e.transitionState,r=e.closeLayer;return g(u.default,{layerTransitionState:n,close:r,guildId:t.props.guild.id,locationSection:y.AnalyticsSections.CHANNEL_NOTICE})}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var a=r.prototype;return a.handleClose=function(){(0,l.hideNotice)(y.ChannelNoticeTypes.PREMIUM_GUILD_SUBSCRIPTIONS)},a.render=function(){var e=this.props.memberCount,t=null==e||e<y.SMALL_GUILD_MEMBER_THRESHOLD;return g("div",{className:(0,o.default)(_.default.channelNotice,_.default.premiumGuildSubscription)},void 0,g(f.default,{onClick:this.handleClose,className:_.default.close},void 0,g(c.default,{className:_.default.closeIcon})),g("div",{className:_.default.message},void 0,g("div",{className:t?void 0:_.default.textLargeGuild},void 0,t?m.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_NOTICE_SMALL_GUILD:m.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_NOTICE),g(d.default,{className:_.default.btn,onClick:this.handleButtonClick},void 0,m.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_NOTICE_BUTTON)))},r}(a.PureComponent);O.displayName="PremiumGuildSubscriptionNotice";var I=i.default.connectStores([s.default],(function(e){var t=e.guild;return{memberCount:s.default.getMemberCount(t.id)}}))(O);t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=m(n(9)),o=n(8413),i=n(1272),l=n(1257),u=n(1340),s=m(n(29)),d=m(n(61)),f=m(n(255)),c=m(n(13)),p=n(1),v=m(n(6)),y=m(n(7358));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t=u.QUICKSWITCHER_SHOW.binds[0].split("+").map((function(e){return l.PRETTY_KEYS[e]?l.PRETTY_KEYS[e]():e})).join(" + ");return h("div",{className:(0,a.default)(y.default.channelNotice,y.default.quickswitcher)},void 0,h(d.default,{onClick:function(){return(0,o.hideNotice)(p.ChannelNoticeTypes.QUICKSWITCHER)},className:y.default.close},void 0,h(f.default,{className:y.default.closeIcon})),h("div",{className:y.default.message},void 0,h("div",{},void 0,v.default.Messages.QUICKSWITCHER_NOTICE),h(s.default,{className:y.default.btn,onClick:function(){var t=e.guild;c.default.track(p.AnalyticEvents.CHANNEL_NOTICE_CTA_CLICKED,{source:p.ChannelNoticeCtaSources.QUICK_SWITCHER_NOTICE,guild_id:t.id}),(0,i.show)("CHANNEL_NOTICE")}},void 0,t)))};E.displayName="QuickSwitcherNotice";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(42),l=g(n(61)),u=g(n(8635)),s=g(n(8455)),d=g(n(255)),f=g(n(24)),c=g(n(11143)),p=n(8769),v=g(n(9945)),y=g(n(11144)),m=n(10384),_=n(1),h=g(n(6)),E=g(n(8027));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.guild,n=(0,o.useStateFromStores)([v.default],(function(){return v.default.getProgress(t.id)}),[t.id]),r=null!=n?n.size:0,g=(0,m.getCurrentStep)(n),S=h.default.Messages.PROGRESS_COMPLETED;switch(g){case p.Steps.AVATAR:S=h.default.Messages.AVATAR_STEP_TITLE;break;case p.Steps.CHANNEL:S=h.default.Messages.CHANNEL_STEP_TITLE;break;case p.Steps.MESSAGE:S=h.default.Messages.MESSAGE_STEP_TITLE;break;case p.Steps.INVITE:S=h.default.Messages.INVITE_STEP_TITLE}var I=a.useRef();return O("div",{className:E.default.container},void 0,O(l.default,{onClick:function(){(0,i.transitionTo)(_.Routes.CHANNEL(t.id)),c.default.dismissProgress(t.id)},className:E.default.dismiss},void 0,O(d.default,{className:E.default.dismissIcon})),O(f.default,{color:f.default.Colors.HEADER_PRIMARY,size:f.default.Sizes.SIZE_16,className:E.default.title},void 0,S),O(l.default,{className:E.default.progressContainer,onClick:function(){(0,i.transitionTo)(_.Routes.GUILD_PROGRESS(t.id))}},void 0,O(u.default,{className:E.default.progress,size:u.default.Sizes.LARGE,percent:r/m.TOTAL_STEPS*100,animate:!0}),a.createElement("div",{className:E.default.footer,ref:I},O(s.default,{className:E.default.questIcon}),O(f.default,{size:f.default.Sizes.SIZE_12,color:f.default.Colors.HEADER_SECONDARY,className:E.default.subtitle},void 0,h.default.Messages.SERVER_QUEST),O(f.default,{size:f.default.Sizes.SIZE_12,color:f.default.Colors.MUTED,className:E.default.step},void 0,r===m.TOTAL_STEPS?h.default.Messages.PROGRESS_STEPS_FINISHED:h.default.Messages.PROGRESS_STEPS.format({step:r+1}))),O(y.default,{firing:r===m.TOTAL_STEPS,targetElementRef:I})))}I.displayName="GuildProgressBar"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={createProgress:function(e){a.default.dispatch({type:o.ActionTypes.GUILD_PROGRESS_INITIALIZE,guildId:e})},markCompletedProgressSeen:function(e){a.default.wait((function(){return a.default.dispatch({type:o.ActionTypes.GUILD_PROGRESS_COMPLETED_SEEN,guildId:e})}))},dismissProgress:function(e){a.default.dispatch({type:o.ActionTypes.GUILD_PROGRESS_DISMISS,guildId:e})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(9133),i=s(n(165)),l=n(1),u=s(n(8026));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}var p={sprites:[n(9135)],colors:[l.Colors.BRAND,"#FFC0FF","#FFD836","#FF9A15","#A5F7DE","#51BC9D","#AEC7FF","#3E70DD"],fireCount:30,count:2,size:12,sizeSpread:7,angle:100,angleSpread:60,velocity:50,velocitySpread:25,dragCoefficient:0,gravity:5};function v(e){var t,n=e.firing,r=e.targetElementRef,l=a.useRef(null);if(null==r.current)return null;var s=r.current.getBoundingClientRect(),d=null===(t=l.current)||void 0===t?void 0:t.getBoundingClientRect(),v=0,y=0;return null!=d&&(v=(s.left+s.width)/d.width*100,y=s.top/d.height*100),f(i.default,{},void 0,a.createElement("div",{className:u.default.cannon,ref:l},null!=l.current?f(o.ConfettiCanvas,{className:u.default.cannon},void 0,(function(e){return a.createElement(o.ConfettiCannon,c({},e,p,{position:{x:v,y:y},firing:n}))})):null))}v.displayName="ProgressConfetti"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9)),o=i(n(8028));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=function(){return u("div",{className:o.default.spacer})};s.displayName="Spacer";var d=function(){return u("div",{className:o.default.category})};d.displayName="Category";var f=function(e){var t=e.width;return u("div",{className:o.default.channel},void 0,u("div",{className:o.default.channelIcon}),u("div",{className:o.default.channelName,style:{width:t+"px"}}))};f.displayName="Channel";var c=u(d,{}),p=u(f,{width:100}),v=u(f,{width:74}),y=u(f,{width:100}),m=u(f,{width:70}),_=u(f,{width:112}),h=u(f,{width:175}),E=u(s,{}),g=u(d,{}),S=u(f,{width:100}),O=u(f,{width:74}),I=u(f,{width:100}),T=u(f,{width:70}),C=u(f,{width:112}),b=u(f,{width:56}),M=function(e){var t,n=e.withBannerPadding;return u("div",{className:(0,a.default)(o.default.container,(t={},t[o.default.bannerPadding]=n,t))},void 0,c,p,v,y,m,_,h,E,g,S,O,I,T,C,b)};M.displayName="PlaceholderChannelList";var N=M;t.default=N},function(e,t,n){e.exports=n.p+"c62be7853cf4c6dc7a48a506cbdef44c.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(262),i=n(3),l=C(n(8318)),u=C(n(1381)),s=n(42),d=C(n(1280)),f=C(n(8492)),c=C(n(709)),p=C(n(5947)),v=C(n(15)),y=C(n(151)),m=C(n(5951)),_=C(n(9192)),h=n(41),E=C(n(10428)),g=C(n(8456)),S=C(n(11241)),O=n(1),I=C(n(6)),T=C(n(8047));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}function A(e){var t=e.guildId,n=e.canStartEvents;return a.createElement(a.Fragment,null,n&&null!=t&&M(l.default.Icon,{icon:m.default,tooltip:I.default.Messages.GUILD_STAGE_DISCOVERY_SCHEDULE_EVENT_LABEL,onClick:function(){t&&(0,h.openModal)((function(e){return a.createElement(E.default,N({guildId:t},e))}),{onCloseRequest:function(){return O.NOOP_NULL}})}}))}var P=M(l.default.Icon,{icon:_.default,"aria-hidden":!0});function R(e){var t=e.guildId,n=e.eventId,r=(0,i.useStateFromStores)([v.default],(function(){return v.default.getGuild(t)}),[t]),m=(0,i.useStateFromStores)([c.default],(function(){return c.default.isConnected()})),_=f.default.useExperiment({guildId:t})[0],E=d.default.useExperiment({guildId:t})[0],O=_.enabled||E.enabled,C=(0,g.default)(t).canStartEvents;return a.useEffect((function(){!m||null!=r&&O||((0,h.openModal)((function(e){return a.createElement(u.default,e)})),(0,s.replaceWith)(p.default.defaultRoute))}),[r,m,O]),null==r?M("div",{className:T.default.spinnerContainer},void 0,M(y.default,{className:T.default.spinner})):M("div",{className:T.default.container},void 0,M(o.Helmet,{title:I.default.Messages.DISCORD_NAME}),M(l.default,{toolbar:M(A,{guildId:t,canStartEvents:C}),className:T.default.headerBarContainer},void 0,P,M(l.default.Title,{},void 0,I.default.Messages.GUILD_STAGE_INSTANCE_DISCOVERY_TITLE)),M(S.default,{guild:r,eventId:n,canStartEvents:C}))}R.displayName="GuildTicketedEventDiscoveryPage";var L=R;t.default=L},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(361)),i=c(n(371)),l=n(35),u=n(10430),s=c(n(6)),d=c(n(7359)),f=c(n(8031));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t=e.guild,n=e.onClick,r=v(i.default,{guild:t,active:!0,size:i.default.Sizes.MEDIUM,className:f.default.guildIcon});return v(u.FormRowButton,{leadingComponent:r,label:t.toString(),onClick:n})};y.displayName="GuildRow";var m=function(e){var t=e.onSelectGuild,n=(0,a.useStateFromStores)([o.default],(function(){return o.default.getFlattenedGuilds()}));return v(l.ModalContent,{className:d.default.modalContent},void 0,v("div",{className:d.default.modalHeadline},void 0,s.default.Messages.CREATE_STAGE_INSTANCE_SELECT_GUILD_HEADER),v("div",{className:d.default.modalSubheadline},void 0,s.default.Messages.CREATE_STAGE_INSTANCE_SELECT_GUILD_SUBHEADER),v("div",{},void 0,n.map((function(e){return v(y,{guild:e,onClick:function(){return t(e)}},e.id)}))))};m.displayName="SelectGuildModal";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(207),o=p(n(1221)),i=p(n(1335)),l=p(n(1374)),u=n(35),s=n(10430),d=p(n(6)),f=p(n(7359)),c=p(n(8032));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=[{Icon:l.default,label:d.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_PUBLIC_LABEL,description:d.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_PUBLIC_SUB_LABEL,value:a.StageInstancePrivacyLevel.PUBLIC},{Icon:i.default,label:d.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_FRIENDS_ONLY_LABEL,description:d.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_FRIENDS_ONLY_SUB_LABEL,value:a.StageInstancePrivacyLevel.GUILD_ONLY},{Icon:o.default,label:d.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_PRIVATE_LABEL,description:d.default.Messages.STAGE_INSTANCE_PRIVACY_TYPE_PRIVATE_SUB_LABEL,value:a.StageInstancePrivacyLevel.GUILD_ONLY}],_=function(e){var t=e.onSelect,n=e.value;return y(u.ModalContent,{className:f.default.modalContent},void 0,y("div",{className:f.default.modalHeadline},void 0,d.default.Messages.CREATE_STAGE_INSTANCE_SELECT_PRIVACY_HEADER),y("div",{className:f.default.modalSubheadline},void 0,d.default.Messages.CREATE_STAGE_INSTANCE_SELECT_PRIVACY_SUBHEADER),y("div",{},void 0,m.map((function(e){var r=e.Icon,a=e.label,o=e.description,i=e.value;return y(s.FormRowRadio,{leadingComponent:y("div",{className:c.default.iconContainer},void 0,y(r,{height:20,width:20,className:c.default.icon})),label:a,description:o,onClick:function(){return t(i)},selected:i===n},i)}))))};_.displayName="SelectPrivacyModal";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(1424)),l=y(n(8550)),u=n(131),s=n(35),d=y(n(11236)),f=y(n(11238)),c=y(n(6)),p=y(n(7359)),v=y(n(8035));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t,n=e.value,r=void 0===n?0:n,a=e.maxValue,i=a-r;return i>10?null:h("span",{className:(0,o.default)(v.default.charLimitIndicator,(t={},t[v.default.charLimitIndicatorError]=i<0,t))},void 0,r,"/",a)};E.displayName="CharacterLimitIndicator";var g=function(e){var t,n,r=e.guildEvent,o=e.onGuildEventChange,y=e.schedule,m=e.onScheduleChange,g=e.ticket,S=e.onTicketChange,O=e.maxTitleChars,I=e.maxDescriptionChars,T=e.hasTicket,C=a.createElement(a.Fragment,null,h(i.default,{schedule:y,onScheduleChange:m}),T&&a.createElement(a.Fragment,null,h(u.FormDivider,{className:v.default.divider}),h(f.default,{ticket:g,onTicketChange:S})));return h(s.ModalContent,{className:p.default.modalContent},void 0,h("div",{className:v.default.titleImageContainer},void 0,h(u.FormItem,{title:c.default.Messages.CREATE_STAGE_INSTANCE_TITLE_INPUT_LABEL,tag:u.FormItem.Tags.H5,className:v.default.titleContainer,titleClassName:v.default.titleContainerTitle,required:!0},void 0,h(E,{value:null===(t=r.title)||void 0===t?void 0:t.length,maxValue:O}),h(l.default,{className:v.default.titleInput,placeholder:c.default.Messages.CREATE_STAGE_INSTANCE_TITLE_INPUT_PLACEHOLDER,spellCheck:"false",value:r.title,onChange:function(e){o((function(t){return _({},t,{title:e.currentTarget.value})}))},rows:1,autoFocus:!0})),h(d.default,{src:r.imageData,onChange:function(e){o((function(t){return _({},t,{imageData:e})}))}})),h(u.FormItem,{title:c.default.Messages.CREATE_STAGE_INSTANCE_DESCRIPTION_INPUT_LABEL,className:v.default.descriptionContainer,titleClassName:v.default.descriptionContainerTitle},void 0,h(E,{value:null===(n=r.description)||void 0===n?void 0:n.length,maxValue:I}),h(l.default,{className:v.default.descriptionInput,placeholder:c.default.Messages.CREATE_STAGE_INSTANCE_DESCRIPTION_INPUT_PLACEHOLDER,value:r.description,onChange:function(e){return o((function(t){return _({},t,{description:e.currentTarget.value})}))},spellCheck:"false",rows:1})),h("div",{},void 0,C))};g.displayName="TicketDetailsModal";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(8327)),o=u(n(11237)),i=u(n(1215)),l=u(n(8033));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var f=function(e){var t=e.src,n=e.onChange;return d("div",{className:l.default.container,style:{backgroundImage:"url("+t+")"}},void 0,void 0===t?d("div",{className:l.default.uploadIconContainer},void 0,d(o.default,{className:l.default.uploadIcon})):d("div",{className:l.default.pencilIconContainer},void 0,d(i.default,{width:20,height:20,className:l.default.pencilIcon})),d(a.default,{onChange:n,showEditingModal:!0}))};f.displayName="ImagePicker";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.2899 2L6 2C3.79086 2 2 3.79086 2 6V18C2 20.2091 3.79086 22 6 22H18C20.2091 22 22 20.2091 22 18V10.7101C21.3663 10.8987 20.695 11 20 11C16.134 11 13 7.86599 13 4C13 3.30503 13.1013 2.63371 13.2899 2ZM8 6C9.1032 6 10 6.8952 10 8C10 9.1056 9.1032 10 8 10C6.8944 10 6 9.1056 6 8C6 6.8952 6.8944 6 8 6ZM6 18L9 14L11 16L15 11L18 18H6Z",fill:d}),s("path",{d:"M21 0V3H24V5H21V8H19V5H16V3H19V0H21Z",fill:d}))}d.displayName="ImageUpload"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(131),i=n(374),l=n(11239),u=d(n(6)),s=d(n(8034));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(e){var t=e.ticket,n=e.onTicketChange,r=(0,l.usePriceTiers)().priceTiers,d=a.useMemo((function(){return r.filter((function(e){return e>=299&&e<=9999}))}),[r]),f=d.map((function(e){return{label:"$"+e/100,value:e}}));a.useEffect((function(){null==t.priceTier&&d.length>0&&n((function(e){return p({},e,{priceTier:d[0]})}))}),[d,t.priceTier]);return c(o.FormItem,{title:u.default.Messages.EVENT_TICKET_PRICE_PICKER_LABEL},void 0,c(i.SingleSelect,{options:f,value:t.priceTier,onChange:function(e){n((function(t){return p({},t,{priceTier:e})}))},maxVisibleItems:5}),c(o.FormText,{className:s.default.label,type:o.FormText.Types.DESCRIPTION},void 0,u.default.Messages.EVENT_TICKET_PRICE_PICKER_INSTRUCTION))}v.displayName="StageTicketPurchaseDetails"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePriceTiers=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(251)),o=l(n(11240)),i=l(n(8493));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var d=(0,a.default)((function(e){return{priceTiers:[],setPriceTiers:function(t){return e({priceTiers:t})}}}));t.usePriceTiers=function(){var e=r.useState(!1),t=e[0],n=e[1],a=d((function(e){return e})),l=a.priceTiers,u=a.setPriceTiers,f=(0,o.default)(),c=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.prev=1,e.next=4,i.default.getTicketPriceTiers();case 4:t=e.sent,r=t.body,u(r),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:f()&&n(!1);case 12:case"end":return e.stop()}}),e,null,[[1,9]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){s(o,r,a,i,l,"next",e)}function l(e){s(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return r.useEffect((function(){0===l.length&&c()}),[]),{loading:t,priceTiers:l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}var o=function(){var e=r.useRef(!0);r.useEffect((function(){return function(){e.current=!1}}),[]);return function(){return e.current}};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=n(8),i=n(3),l=N(n(8299)),u=N(n(8764)),s=N(n(8572)),d=n(42),f=N(n(39)),c=N(n(29)),p=P(n(8302)),v=N(n(151)),y=N(n(35)),m=n(41),_=N(n(24)),h=n(1210),E=n(139),g=N(n(10428)),S=N(n(10431)),O=n(9021),I=n(9996),T=N(n(11251)),C=n(1),b=N(n(6)),M=N(n(8046));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(){return(R=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}).apply(this,arguments)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var D=(0,E.cssValueToNumber)(M.default.rowHeight);function w(e){var t=e.width,r=e.canStartEvents,l=e.guild,d=e.eventId,y=(0,s.default)(null==l?void 0:l.id),E=a.useMemo((function(){return function(e,t){return(0,o.chunk)(e,t)}(y,function(e){return Math.floor(e/278)}(t))}),[y,t]),S=(0,i.useStateFromStores)([f.default],(function(){return f.default.theme})),O=null!=d?u.default.getGuildScheduledEvent(d):null;if(null==l)return null;var I=function(){null!=l&&(0,m.openModal)((function(e){return a.createElement(g.default,R({guildId:l.id},e))}),{onCloseRequest:function(){return C.NOOP_NULL}})},N=L(j,{guild:l,guildEvent:O,canStartEvents:r}),A=function(){return null==O?null:N};return 0===E.length?L("div",{className:M.default.container},void 0,L(p.default,{theme:S,className:M.default.emptyStateContainer},void 0,L(p.EmptyStateImage,{darkSrc:n(10432),lightSrc:n(11256),width:120,height:80}),L(_.default,{size:_.default.Sizes.SIZE_24,color:_.default.Colors.HEADER_PRIMARY,className:M.default.emptyStateTitle},void 0,b.default.Messages.UPCOMING_GUILD_STAGE_INSTANCE_DISCOVERY_EMPTY_STATE_TITLE),r&&L(_.default,{size:_.default.Sizes.SIZE_14,color:_.default.Colors.HEADER_SECONDARY,className:M.default.emptyStateSubTitle},void 0,b.default.Messages.UPCOMING_GUILD_STAGE_INSTANCE_DISCOVERY_EMPTY_STATE_SUB_TITLE),r&&L(c.default,{size:c.default.Sizes.LARGE,color:c.default.Colors.BRAND,className:M.default.emptyStateButton,onClick:I},void 0,b.default.Messages.GUILD_STAGE_DISCOVERY_SCHEDULE_EVENT_LABEL)),A()):L("div",{className:M.default.container},void 0,null==E||null==l?L(v.default,{className:M.default.spinner}):L(h.ListAuto,{sections:[E.length],renderSection:function(){return null},sectionHeight:40,renderRow:function(e){var t=e.section,n=e.row;if(null==E||null==l)return null;var a=E[n].map((function(e){return L(T.default,{guildEvent:e,guild:l,canStartEvents:r},e.id)}));return L("div",{className:M.default.row},t+"."+n,a)},rowHeight:D,renderFooter:function(e){return L("div",{style:{height:32}},"footer"+e.section)},footerHeight:32,className:M.default.listContainer}),A())}function j(e){var t=e.guild,n=e.guildEvent,r=e.canStartEvents,o=(0,O.useLiveScheduledEventStageChannel)(t.id,n.id),i=(0,I.useSharedStageInstanceDiscoveryStates)(n,r,o),l=i.sku;if(!i.canPurchaseTicket)return null;var u=function(){return(0,d.transitionTo)(C.Routes.UPCOMING_STAGES(t.id))};return L(y.default,{onCloseCallback:u,renderModal:function(e){return a.createElement(S.default,R({},e,{guild:t,guildEvent:n,sku:l,onClose:u}))}})}w.displayName="GuildTicketedEventDiscoveryView",j.displayName="PurchaseModal";var k=(0,l.default)(w);t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchTicketPrice=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(5672);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}t.useFetchTicketPrice=function(e){var t=e.paymentSourceId,n=e.skuId,o=e.applicationId,l=r.useState(!0),u=l[0],s=l[1],d=r.useState(null),f=d[0],c=d[1];return r.useEffect((function(){var e,r=!1;return(e=regeneratorRuntime.mark((function e(){var i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=n&&null!=o){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,a.fetchPurchasePreview)(o,n,t);case 4:if(i=e.sent,l=i.body,!r){e.next=8;break}return e.abrupt("return");case 8:c(l),s(!1);case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function l(e){i(o,r,a,l,u,"next",e)}function u(e){i(o,r,a,l,u,"throw",e)}l(void 0)}))})(),function(){r=!0}}),[n,t,o]),{isLoading:u,price:f}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(5)),o=n(3),i=n(1232),l=y(n(36)),u=y(n(29)),s=n(35),d=y(n(24)),f=y(n(11244)),c=n(9021),p=y(n(6)),v=y(n(8037));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var h=_("div",{}),E=function(e){var t,n=e.guild,r=e.onClose,y=e.event,m=(0,a.default)(y.scheduled_start_time);if(m.isAfter((0,a.default)())){var E=m.calendar(void 0,{sameDay:"[today at] h:mm A",nextDay:"[tomorrow at] h:mm A",sameElse:"MMM D, h:mm A"});t=p.default.Messages.STAGE_INSTANCE_TICKET_PURCHASE_CONFIRMATION_SUB_TITLE.format({startTime:E})}else t=p.default.Messages.STAGE_INSTANCE_TICKET_PURCHASE_CONFIRMATION_STAGE_STARTED_SUB_TITLE;var g,S,O=(0,c.useLiveScheduledEventStageChannel)(n.id,y.id),I=(0,o.useStateFromStores)([l.default],(function(){return l.default.getVoiceChannelId()}),[]),T=function(){r(),null!=O&&I===O.id?(0,i.navigateToStage)(O,I):null!=O&&(0,i.connectAndOpen)(O)};return _("div",{className:v.default.confirmationModal},void 0,_(s.ModalCloseButton,{onClick:r,className:v.default.closeButton}),_(s.ModalContent,{className:v.default.confirmationModalContent},void 0,_(f.default,{className:v.default.ticketCard,guild:n,event:y}),_(d.default,{color:d.default.Colors.HEADER_PRIMARY,size:d.default.Sizes.SIZE_24,className:v.default.title},void 0,p.default.Messages.STAGE_INSTANCE_TICKET_PURCHASE_CONFIRMATION_TITLE),_(d.default,{color:d.default.Colors.HEADER_SECONDARY,size:d.default.Sizes.SIZE_16,className:v.default.subtitle},void 0,t),(g=p.default.Messages.STAGE_INSTANCE_TICKET_PURCHASE_CONFIRMATION_GOT_IT_LABEL,S=u.default.Colors.BRAND,null!=O&&(g=p.default.Messages.STAGE_CHANNEL_JOIN_BUTTON,S=u.default.Colors.GREEN),g&&_(u.default,{look:u.default.Looks.FILLED,color:S,size:u.default.Sizes.SMALL,onClick:T,className:v.default.confButton},void 0,g)),h))};E.displayName="GuildEventTicketPurchaseConfirmationModal";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(371)),l=f(n(248)),u=n(10027),s=f(n(10028)),d=f(n(8036));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function e(t,n,r,a){return 0===r?null==a?null:p(i.default,{guild:a,active:!0,size:i.default.Sizes.MEDIUM,className:d.default.guildIconEmptyState}):p("div",{className:d.default.circles,style:{width:2*t,height:2*t}},void 0,e(t-n,n,r-1,a))};v.displayName="renderEmptyState";var y=function(e){var t=e.guild,n=e.event,r=e.className,f=(0,s.default)({id:n.id,image:n.image,size:256}),c=a.useMemo((function(){return(0,u.getFormattedEventDateAndTime)(n)}),[n]);return p("div",{},void 0,p(l.default,{mask:l.default.Masks.EVENT_TICKET,width:320,height:160,className:(0,o.default)(d.default.maskWrapper,r)},void 0,p("div",{className:(0,o.default)(d.default.container)},void 0,p("div",{className:(0,o.default)(d.default.textContainerOverlay,d.default.gradientBackground)},void 0,p("div",{className:d.default.textContainer},void 0,p("div",{className:d.default.date},void 0,c),p("div",{className:d.default.title},void 0,n.name),p("div",{className:d.default.serverName},void 0,t.toString()))),null==f?p("div",{className:(0,o.default)(d.default.circlesContainer,d.default.gradientBackground)},void 0,p("div",{className:d.default.circlesOverlay},void 0,v(100,16,5,t))):p("div",{className:d.default.imageContainer,style:{backgroundImage:"url("+f+")"}},void 0,t&&p(i.default,{guild:t,active:!0,size:i.default.Sizes.SMALLER,className:d.default.guildIconBottomRight})))))};y.displayName="TicketCard";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=y(n(55)),o=y(n(371)),i=n(131),l=n(35),u=y(n(24)),s=y(n(11246)),d=y(n(10028)),f=y(n(11247)),c=y(n(6)),p=y(n(7359)),v=y(n(8040));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.guild,n=e.onClose,r=e.event,y=e.canPurchaseTicket,m=e.sku,h=(0,d.default)({id:r.id,image:r.image,size:128}),E=_("div",{className:v.default.guildIconContainer},void 0,_("div",{className:v.default.guildIconOuterCircle},void 0,_("div",{className:v.default.guildIconInnerCircle},void 0,_(o.default,{guild:t,size:o.default.Sizes.MEDIUM,className:v.default.guildIcon}))));return _(l.ModalHeader,{className:v.default.container,align:a.default.Align.START,direction:a.default.Direction.VERTICAL,separator:!1},void 0,_("div",{className:v.default.titleContainer},void 0,_(u.default,{size:u.default.Sizes.SIZE_16,className:p.default.modalHeaderText},void 0,c.default.Messages.PURCHASE_TICKET_MODAL_TITLE),_(l.ModalCloseButton,{onClick:n,className:p.default.closeButton})),_(i.FormDivider,{className:v.default.divider}),_("div",{className:v.default.contentContainer},void 0,null!=h?_("img",{className:v.default.eventImage,src:h,alt:""}):E,_("div",{className:v.default.headerDetail},void 0,_(s.default,{guildEvent:r,canPurchaseTicket:y,sku:m,className:v.default.eventDateContainer}),_(u.default,{className:v.default.title,color:u.default.Colors.HEADER_PRIMARY,size:u.default.Sizes.SIZE_16},void 0,r.name),_(f.default,{guild:t,className:v.default.guildInfo}))))}h.displayName="GuildEventTicketPurchaseModalHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9)),i=c(n(372)),l=c(n(24)),u=n(281),s=n(10027),d=c(n(6)),f=c(n(8038));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var y=function(e){var t,n=e.canPurchaseTicket,r=e.sku,a=null!=r.price?(0,u.formatPrice)(null===(t=r.price)||void 0===t?void 0:t.amount,r.price.currency):null;return null==a?null:r.isAvailable()?v("div",{className:n?f.default.activeTicketPriceContainer:f.default.purchaseTicketPriceContainer},void 0,v(l.default,{size:l.default.Sizes.SIZE_12,className:f.default.ticketPrice},void 0,a),!n&&v(i.default,{width:16,height:16,className:f.default.checkmark})):v("div",{className:f.default.outlineContainer},void 0,v(l.default,{size:l.default.Sizes.SIZE_12,className:f.default.soldOutText},void 0,d.default.Messages.STAGE_INSTANCE_TICKET_SOLD_OUT_LABEL))};y.displayName="EventTicketPrice";var m=function(e){var t=e.sku,n=e.canPurchaseTicket,r=e.guildEvent,i=e.className,u=a.useMemo((function(){return(0,s.getFormattedEventDateAndTime)(r)}),[r]);return v("div",{className:(0,o.default)(f.default.container,i)},void 0,v(l.default,{color:l.default.Colors.HEADER_SECONDARY,size:l.default.Sizes.SIZE_12,className:f.default.date},void 0,u),null!=t&&v(y,{canPurchaseTicket:n,sku:t}))};m.displayName="EventDateWithTicketPrice";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(9)),o=u(n(371)),i=u(n(24)),l=u(n(8039));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.guild,n=e.className;return d("div",{className:(0,a.default)(l.default.container,n)},void 0,d(o.default,{size:o.default.Sizes.SMOL,guild:t,active:!0,className:l.default.guildIcon}),d(i.default,{className:l.default.guildName,color:i.default.Colors.INTERACTIVE_NORMAL},void 0,t.name))}f.displayName="GuildNameWithIcon";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=h(n(0)),o=n(3),i=m(n(5674)),l=m(n(485)),u=n(692),s=m(n(160)),d=h(n(159)),f=m(n(93)),c=m(n(11249)),p=n(1),v=m(n(6)),y=m(n(8041));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t=e.paymentSources,n=e.eventName,r=e.isLoadingPrice,m=e.price,_=e.paymentSourceId,h=e.setPaymentSourceId,g=e.setHasAcceptedTerms,S=e.handleStepChange,O=(0,o.useStateFromStores)([s.default],(function(){return s.default.enabled})),I=a.useMemo((function(){return Object.values(t)}),[t]);return E("div",{className:y.default.bodyContentWrapper},void 0,E(d.default,{className:y.default.reviewBodyHeader},void 0,v.default.Messages.STAGE_INSTANCE_TICKET_PURCHASE_MODAL_PURCHASE_DETAILS_HEADER),E(c.default,{className:y.default.invoice,isLoading:r,price:m,eventName:n}),E(d.default,{className:y.default.reviewBodyHeader,tag:d.Tags.H5},void 0,v.default.Messages.PAYMENT_SOURCE_PAYMENT_REQUEST_INFO_TITLE),E(i.default,{className:y.default.paymentSourceDropdown,paymentSources:I,selectedPaymentSourceId:_,onChange:function(e){return h(null==e?void 0:e.id)},onPaymentSourceAdd:function(){return S(u.Step.PAYMENT_TYPE)},hidePersonalInformation:O}),E(l.default,{onChange:g,forceShow:!0,checkboxLabel:v.default.Messages.PURCHASE_TICKET_LEGAL_LABEL.format({tosURL:p.MarketingURLs.TERMS,refundPolicyURL:f.default.getArticleURL(p.HelpdeskArticles.TICKETED_EVENT_REFUND_POLICY)})}))};g.displayName="GuildEventTicketPurchaseModalReviewBody";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(1237),i=s(n(151)),l=n(281),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=f(i.default,{}),p=f(o.PremiumInvoiceTableDivider,{}),v=function(e){var t=e.className,n=e.isLoading,r=e.price,i=e.eventName;return f(o.PremiumInvoiceTable,{className:t},void 0,n||null==r?c:a.createElement(a.Fragment,null,f(o.PremiumInvoiceTableRow,{label:i,value:(0,l.formatPrice)(r.amount,r.currency)}),r.tax_inclusive||0===r.tax?null:f(o.PremiumInvoiceTableRow,{label:u.default.Messages.BILLING_INVOICE_TAX,value:(0,l.formatPrice)(r.tax,r.currency)}),p,f(o.PremiumInvoiceTableTotalRow,{label:r.tax_inclusive?u.default.Messages.GUILD_EVENT_TICKET_BILLING_INVOICE_TOTAL_TAX_INCLUSIVE.format():u.default.Messages.BILLING_INVOICE_TODAY_TOTAL.format(),value:(0,l.formatPrice)(r.amount,r.currency)})))};v.displayName="StageInstanceTicketInvoice";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(23)),i=n(5672),l=n(1173),u=p(n(29)),s=p(n(55)),d=p(n(149)),f=n(35),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var h=function(e){var t=e.hasAcceptedTerms,n=e.paymentSourceId,r=e.isLoadingPrice,p=e.price,v=e.sku,h=e.setPurchaseState,E=e.onNext,g=e.onPurchaseError,S=a.useState(!1),O=S[0],I=S[1],T=c.default.Messages.STAGE_INSTANCE_TICKET_PURCHASE_LABEL,C=a.useRef(!0);a.useEffect((function(){return function(){C.current=!1}}),[]);var b,M=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!0),h(l.PurchaseState.PURCHASING),e.prev=2,(0,o.default)(null!=n,"Missing paymentSourceId"),null!=v){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,(0,i.purchaseSKU)(v.applicationId,v.id,{expectedAmount:null==p?void 0:p.amount,paymentSourceId:n});case 8:C.current&&(h(l.PurchaseState.COMPLETED),E()),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),C.current&&(h(l.PurchaseState.FAIL),g(e.t0));case 14:return e.prev=14,C.current&&I(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[2,11,14,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){_(o,r,a,i,l,"next",e)}function l(e){_(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return b=t?y(u.default,{onClick:r?void 0:M,color:u.default.Colors.GREEN,submitting:O,disabled:null==n||null==v||r},void 0,T):y(d.default,{text:c.default.Messages.BILLING_ACCEPT_TERMS_TOOLTIP},void 0,(function(e){return a.createElement(u.default,m({},e,{disabled:!0,color:u.default.Colors.GREEN,type:"submit"}),T)})),y(f.ModalFooter,{justify:s.default.Justify.BETWEEN,align:s.default.Align.CENTER},void 0,b)};h.displayName="GuildEventTicketPurchaseModalReviewFooter";var E=h;t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=j(n(9)),i=n(3),l=n(389),u=n(1232),s=j(n(11252)),d=j(n(36)),f=j(n(29)),c=U(n(8352)),p=j(n(61)),v=j(n(151)),y=j(n(149)),m=j(n(372)),_=j(n(8331)),h=j(n(8472)),E=n(41),g=j(n(24)),S=j(n(13)),O=n(281),I=j(n(10392)),T=j(n(10028)),C=j(n(10431)),b=n(10027),M=n(9021),N=n(9996),A=n(11253),P=j(n(11254)),R=j(n(11255)),L=n(1),D=j(n(6)),w=j(n(8045));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(){return(F=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}).apply(this,arguments)}var B=G(_.default,{width:24,height:24}),H=G(v.default,{});function x(e){var t=e.guildEvent,n=e.guild,r=e.canStartEvents,v=(0,i.useStateFromStores)([d.default],(function(){return d.default.getVoiceChannelId()}),[]),_=(0,M.useLiveScheduledEventStageChannel)(n.id,t.id),j=(0,N.useSharedStageInstanceDiscoveryStates)(t,r,_),k=j.isTicketedEvent,U=j.isTicketPurchased,x=j.sku,V=j.canPurchaseTicket,W=j.isLive,Y=(0,A.useStartEvent)(t,n.id,k),z=Y.loading,K=Y.startEvent,$=(0,b.getFormattedEventDateAndTimeForConfirmation)(t),Z=$.eventDate,q=$.eventTime,X=(0,b.isEventReadyToStart)(t),J=D.default.Messages.GUILD_STAGES_CANT_START_EVENT_YET.format({startDate:Z,startTime:q});a.useEffect((function(){S.default.track(L.AnalyticEvents.GUILD_SCHEDULED_EVENT_VIEWED,{guild_scheduled_event_id:t.id})}),[t.id]);var Q,ee,te,ne=function(){(0,E.openModal)((function(e){return a.createElement(C.default,F({},e,{guild:n,guildEvent:t,sku:x}))}))},re=function(){(0,E.openModal)((function(e){return a.createElement(R.default,F({guildEvent:t,handleStartEvent:K},e))}))},ae=function(){null!=_&&(v!==_.id?(0,u.connectAndOpen)(_):(0,u.navigateToStage)(_,v))},oe=(0,T.default)({id:t.id,image:t.image,size:128});return G("div",{className:w.default.container},void 0,G("div",{className:w.default.contentContainer},void 0,W?G("div",{className:w.default.liveTagContainer},void 0,G("span",{className:w.default.liveTagDot}),G(g.default,{color:g.default.Colors.STATUS_GREEN,size:g.default.Sizes.SIZE_12,className:w.default.liveTag},void 0,D.default.Messages.LIVE_GUILD_STAGE_EVENT_LABEL)):G(g.default,{size:g.default.Sizes.SIZE_12,color:g.default.Colors.HEADER_SECONDARY,className:w.default.eventDate},void 0,(0,b.getFormattedEventDateAndTime)(t)),G(h.default,{className:w.default.divider}),G("div",{className:w.default.eventImageContainer},void 0,null!=oe?G("img",{className:w.default.eventImage,src:oe,alt:""}):G(s.default,{guild:n,speakers:[]}),G(p.default,{className:w.default.overflowMenu},void 0,G(c.default,{tooltip:D.default.Messages.MORE,color:c.CircleIconButtonColors.PRIMARY,size:c.CircleIconButtonSizes.SIZE_24,icon:B,onClick:function(e){(0,l.openContextMenu)(e,(function(e){return a.createElement(P.default,F({},e,{guildEventId:t.id,guildEventName:t.name,guildId:n.id,canStartEvents:r}))}))}}))),G(g.default,{color:g.default.Colors.HEADER_PRIMARY,size:g.default.Sizes.SIZE_16,className:w.default.eventName},void 0,t.name),G(g.default,{color:g.default.Colors.HEADER_SECONDARY,size:g.default.Sizes.SIZE_14,className:w.default.eventDescription},void 0,t.description)),(te=null!=x&&null!=x.price?(0,O.formatPrice)(x.price.amount,x.price.currency):null,V?Q=(null==x?void 0:x.isAvailable())?G(I.default,{sku:x,handlePurchase:ne,className:w.default.button}):G(f.default,{className:w.default.button,look:f.default.Looks.OUTLINED,color:w.default.disabledOutlinedButton,disabled:!0},void 0,G(g.default,{size:g.default.Sizes.SIZE_14,color:g.default.Colors.INTERACTIVE_NORMAL},void 0,D.default.Messages.STAGE_INSTANCE_TICKET_SOLD_OUT_LABEL)):W&&null!=_?Q=G(f.default,{wrapperClassName:w.default.button,className:w.default.wrappedButton,color:f.default.Colors.GREEN,onClick:ae},void 0,D.default.Messages.STAGE_CHANNEL_JOIN_BUTTON):(U||r)&&(Q=G(f.default,{className:w.default.button,look:f.default.Looks.OUTLINED,color:w.default.disabledOutlinedButton,disabled:!0,innerClassName:w.default.buttonCheckmarkContainer},void 0,G(g.default,{size:g.default.Sizes.SIZE_14,color:g.default.Colors.INTERACTIVE_NORMAL},void 0,te),G(m.default,{width:16,height:16,className:w.default.buttonCheckmark}))),r&&!W&&(ee=G(y.default,{text:J,shouldShow:!X},void 0,(function(e){return a.createElement(f.default,F({},e,{wrapperClassName:w.default.button,className:w.default.wrappedButton,color:f.default.Colors.GREEN,disabled:!X,submitting:z,onClick:re}),D.default.Messages.STAGE_INSTANCE_START_STAGE_LABEL)}))),G("div",{className:(0,o.default)(w.default.buttonContainer)},void 0,Q,ee)),z&&G("div",{className:w.default.loadingIndicatorContainer},void 0,H,G(g.default,{size:g.default.Sizes.SIZE_12,color:g.default.Colors.CUSTOM,className:w.default.loadingIndicatorText},void 0,D.default.Messages.STAGE_INSTANCE_BUILDING_STAGE_LABEL)))}x.displayName="GuildScheduledEventTile";var V=x;t.default=V},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(9)),o=d(n(8555)),i=d(n(371)),l=d(n(279)),u=n(1),s=d(n(8043));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t,n,r=e.guild,d=e.speakers,f=null==r?void 0:r.getIconURL(),p=d[0],v=d[1],y=(0,o.default)(f,u.Colors.PRIMARY_DARK_800);return null==r?null:c("div",{className:s.default.container},void 0,c("div",{className:s.default.container,style:{backgroundColor:y}},void 0,c("div",{className:s.default.outerContainer},void 0,c("div",{className:s.default.innerContainer},void 0,c("div",{className:s.default.border},void 0,c(i.default,{guild:r,size:i.default.Sizes.MEDIUM,className:s.default.guildIcon}))))),c("div",{className:s.default.speakerContainer},void 0,null!=p&&c(l.default,{src:null==p||null===(t=p.user)||void 0===t?void 0:t.getAvatarURL(void 0),size:l.default.Sizes.SIZE_24,className:(0,a.default)(s.default.speaker,s.default.firstSpeaker),"aria-label":(null==p?void 0:p.userNick)+"-avatar"}),null!=v&&c(l.default,{src:null==v||null===(n=v.user)||void 0===n?void 0:n.getAvatarURL(void 0),size:l.default.Sizes.SIZE_24,className:(0,a.default)(s.default.speaker,s.default.secondSpeaker),"aria-label":(null==v?void 0:v.userNick)+"-avatar"})))}p.displayName="SpeakerSummaryTile";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStartEvent=void 0;var r=h(n(0)),a=m(n(63)),o=n(3),i=m(n(9168)),l=n(286),u=n(42),s=h(n(1232)),d=n(1421),f=n(207),c=m(n(31)),p=m(n(15)),v=n(292),y=n(1);function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}t.useStartEvent=function(e,t,n){var m=r.useState(!1),_=m[0],h=m[1],g=(0,o.useStateFromStores)([p.default],(function(){return p.default.getGuild(t)}),[t]);return{loading:_,startEvent:function(){var r,o=(r=regeneratorRuntime.mark((function r(o){var p,m,_,E,S,O;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(null!=g){r.next=2;break}return r.abrupt("return");case 2:if(h(!0),p=[],n)for(p.push((0,v.denyChannelAccessForNonPaidUsers)(t,y.ChannelTypes.GUILD_STAGE_VOICE)),m=0,_=Object.values(g.roles);m<_.length;m++)E=_[m],a.default.has(E.permissions,y.Permissions.MANAGE_EVENTS)&&p.push((0,v.allowChannelAccess)(E.id,y.ChannelTypes.GUILD_STAGE_VOICE,l.PermissionOverwriteType.ROLE));return p.push.apply(p,o),r.next=8,i.default.createChannel(t,y.ChannelTypes.GUILD_STAGE_VOICE,e.name.substring(0,100),p);case 8:if(null!=(S=r.sent)&&201===S.status){r.next=11;break}throw new Error("Can't create channel for event");case 11:return O=c.default.fromServer(S.body),r.next=14,(0,d.startStageInstance)(O.id,e.name,f.StageInstancePrivacyLevel.GUILD_ONLY,e.id);case 14:s.connectAndOpen(O),(0,u.transitionToGuild)(t,O.id),h(!1);case 17:case"end":return r.stop()}}),r)})),function(){var e=this,t=arguments;return new Promise((function(n,a){var o=r.apply(e,t);function i(e){E(o,n,a,i,l,"next",e)}function l(e){E(o,n,a,i,l,"throw",e)}i(void 0)}))});return function(e){return o.apply(this,arguments)}}()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r,a=_(n(0)),o=n(389),i=_(n(8253)),l=n(8256),u=y(n(466)),s=n(41),d=y(n(24)),f=n(1163),c=y(n(8493)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(){return(h=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}).apply(this,arguments)}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=e.guildId,n=e.guildEventId,r=e.guildEventName,y=e.canStartEvents,m=e.onSelect,_=location.protocol+window.GLOBAL_ENV.WEBAPP_ENDPOINT+p.Routes.UPCOMING_STAGES(t,n);return E(i.default,{navId:"guild-stage-instance-discovery-context"+t+"."+n,onClose:o.closeContextMenu,"aria-label":v.default.Messages.GUILD_STAGE_INSTANCE_ACTIONS_MENU_LABEL,onSelect:m},void 0,E(i.MenuGroup,{},void 0,__OVERLAY__||!f.SUPPORTS_COPY?null:E(i.MenuItem,{id:"copy-stage-instance-url",label:v.default.Messages.GUILD_STAGE_DISCOVERY_COPY_EVENT_URL,action:function(){return(0,f.copy)(_)}}),y?E(i.MenuItem,{id:"cancel-stage-instance-"+t+"."+n,color:l.MenuItemColor.DANGER,label:v.default.Messages.DELETE_STAGE_EVENT_LABEL,action:function(){(0,s.openModal)((function(e){return a.createElement(u.default,h({header:v.default.Messages.DELETE_STAGE_EVENT_LABEL,confirmText:v.default.Messages.DELETE_STAGE_EVENT_LABEL,cancelText:v.default.Messages.NEVERMIND,onCancel:e.onClose,onConfirm:function(){return c.default.cancelGuildEvent(n)}},e),E(d.default,{size:d.default.Sizes.SIZE_16},void 0,v.default.Messages.DELETE_STAGE_EVENT_CONFIRMATION_DESCRIPTION.format({eventName:r})))}))}}):null))}g.displayName="GuildTicketedEventDiscoveryActionMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=C(n(5)),l=n(8458),u=n(286),s=n(1229),d=n(1294),f=C(n(29)),c=C(n(55)),p=n(703),v=n(85),y=C(n(291)),m=n(35),_=C(n(47)),h=C(n(24)),E=n(292),g=n(1161),S=n(1),O=C(n(6)),I=C(n(8044)),T=C(n(10432));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}!function(e){e.ADD_MODERATORS="ADD_MODERATORS",e.START_GUILD_EVENT_CONFIRMATION="START_GUILD_EVENT_CONFIRMATION"}(a||(a={}));var N=function(e){var t=e.guildEvent,n=e.handleStartEvent,r=e.handleAddModerators,a=e.onClose,o=e.transitionState,l=new Date(t.scheduled_start_time),u=(0,g.isSameDay)((0,i.default)(),(0,i.default)(t.scheduled_start_time)),s=(0,v.useUID)();return M(m.ModalRoot,{transitionState:o,"aria-labelledby":s},void 0,M(m.ModalContent,{className:I.default.confirmModalContent},void 0,M("div",{className:I.default.container},void 0,M("img",{src:T.default,alt:O.default.Messages.STAGE_CHANNEL_START_ALT_TEXT}),M(_.default,{className:I.default.header,size:_.default.Sizes.SIZE_24},void 0,O.default.Messages.START_STAGE_CONFIRMATION_TITLE),u?M(h.default,{size:h.default.Sizes.SIZE_16,color:h.default.Colors.HEADER_SECONDARY,className:I.default.description},void 0,u?O.default.Messages.START_STAGE_CONFIRMATION_DESCRIPTION_SAME_DAY.format({eventStartTime:l}):O.default.Messages.START_STAGE_CONFIRMATION_DESCRIPTION_DIFFERENT_DAY.format({eventStartTime:l})):null)),M(m.ModalFooter,{className:I.default.confirmModalFooter,justify:c.default.Justify.BETWEEN,direction:c.default.Direction.HORIZONTAL},void 0,M(f.default,{className:I.default.cancelButton,look:f.default.Looks.LINK,color:f.default.Colors.PRIMARY,onClick:a},void 0,O.default.Messages.CANCEL),M("div",{className:I.default.confirmModalPositiveButtonsContainer},void 0,M(f.default,{className:I.default.addModeratorsButton,color:f.default.Colors.GREY,onClick:r},void 0,O.default.Messages.GUILD_EVENT_ADD_MODERATORS_LABEL),M(f.default,{color:f.default.Colors.GREEN,onClick:n},void 0,O.default.Messages.STAGE_INSTANCE_START_STAGE_LABEL))))};N.displayName="StartGuildEventConfirmationModal";var A=function(e){var t=e.guildEventName,n=e.guildId,r=e.setPendingPermissionsAddition,a=e.handleStartEvent,i=e.onClose;return o.createElement(o.Fragment,null,M(m.ModalHeader,{separator:!1,direction:c.default.Direction.VERTICAL,align:c.default.Align.CENTER,className:I.default.addModeratorsHeader},void 0,M(_.default,{tag:_.default.Tags.H2,size:_.default.Sizes.SIZE_24,style:{fontWeight:700}},void 0,O.default.Messages.CHANNEL_PERMISSIONS_ADD_MODERATOR_TITLE),M(h.default,{size:h.default.Sizes.SIZE_16,color:h.default.Colors.HEADER_SECONDARY,className:I.default.addModeratorsHeaderSubtitle},void 0,M(y.default,{height:16,width:16,className:I.default.addModeratorsHeaderSubtitleIcon}),t),M(m.ModalCloseButton,{onClick:i,className:I.default.addModeratorsCloseButton})),M(l.AddMembers,{onChange:r,guildId:n,channelType:S.ChannelTypes.GUILD_STAGE_VOICE,description:O.default.Messages.GUILD_EVENT_MODERATORS_DESCRIPTION}),M(m.ModalFooter,{},void 0,M(f.default,{color:f.default.Colors.GREEN,onClick:a},void 0,O.default.Messages.STAGE_INSTANCE_START_STAGE_LABEL)))},P=function(e){var t=e.transitionState,n=e.onClose,r=e.guildEvent,i=e.handleStartEvent,l=(0,v.useUID)(),f=o.useState(a.START_GUILD_EVENT_CONFIRMATION),c=f[0],y=f[1],_=o.useState({}),h=_[0],g=_[1],O=function(){var e=function(e){var t=[];return Object.values(e).forEach((function(e){var n=e.row;if(n.id)if(n.rowType===s.RowType.ROLE){var r=(0,E.permissionOverwriteForRole)(n.id,S.ChannelTypes.GUILD_STAGE_VOICE);t.push((0,d.createOrUpdateModeratorOverwrite)(n.id,u.PermissionOverwriteType.ROLE,r))}else if(n.rowType===s.RowType.MEMBER){var a=(0,E.permissionOverwriteForUser)(n.id,S.ChannelTypes.GUILD_STAGE_VOICE);t.push((0,d.createOrUpdateModeratorOverwrite)(n.id,u.PermissionOverwriteType.MEMBER,a))}})),t}(h);i(e),n()};return M(m.ModalRoot,{className:I.default.modal,transitionState:t,"aria-labelledby":l},void 0,M(p.Slides,{activeSlide:c,width:440},void 0,M(p.Slide,{id:a.START_GUILD_EVENT_CONFIRMATION},void 0,M(N,{guildEvent:r,handleAddModerators:function(){y(a.ADD_MODERATORS)},handleStartEvent:O,transitionState:t,onClose:n})),M(p.Slide,{id:a.ADD_MODERATORS},void 0,M(A,{guildEventName:r.name,guildId:r.guild_id,setPendingPermissionsAddition:g,handleStartEvent:O,onClose:n}))))};P.displayName="StartGuildEventModal";var R=P;t.default=R},function(e,t,n){e.exports=n.p+"80a8e86e076dd453026bfe59784c907f.svg"},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HubEmailConnectionRoute=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=m(n(1211)),l=n(42),u=m(n(15)),s=m(n(1174)),d=m(n(1189)),f=n(197),c=n(487),p=n(8720),v=n(1),y=m(n(8048));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t=e.guildId,n=e.inviteCode,r=a.useState(f.WaveStates.INITIAL),m=r[0],_=r[1],E=a.useState(null!=n),g=E[0],S=E[1];a.useEffect((function(){null!=n&&i.default.resolveInvite(n,"Hub").finally((function(){return S(!1)}))}),[n]);var O=(0,o.useStateFromStores)([s.default],(function(){return n?s.default.getInvite(n):null})),I=(0,o.useStateFromStores)([u.default],(function(){return u.default.getGuild(t)}));a.useEffect((function(){null!=I&&(0,l.transitionTo)(v.Routes.CHANNEL(t))}),[I,t]);var T=a.useCallback((function(e){_((function(t){return Math.max(t,e)}))}),[]),C=(0,c.getArtForPath)();return h("div",{className:y.default.page},void 0,h(d.default,{embedded:!0,splash:C,waveState:m,showLogo:!1,updateWaveState:T},void 0,h("div",{className:y.default.dragRegion}),h("div",{className:y.default.contentWrapper},void 0,!g&&h(p.HubEmailConnectionModalView,{invite:O}))))};t.HubEmailConnectionRoute=E,E.displayName="HubEmailConnectionRoute";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=T(n(0)),o=n(262),i=n(3),l=T(n(10052)),u=O(n(8765)),s=O(n(8318)),d=O(n(9039)),f=O(n(10438)),c=n(5687),p=O(n(10061)),v=T(n(8293)),y=O(n(1335)),m=n(8263),_=O(n(11281)),h=O(n(11291)),E=n(1),g=O(n(6)),S=O(n(8066));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var b=C(s.default.Divider,{});function M(){return C("div",{className:S.default.inviteToolbar},void 0,C(d.default,{tooltip:g.default.Messages.NEW_GROUP_DM}),b)}M.displayName="HeaderToolbar";var N=C(o.Helmet,{title:"Discord"}),A=C(M,{}),P=C(s.default.Icon,{icon:y.default,"aria-hidden":!0}),R=C(s.default.Divider,{}),L=C(_.default,{}),D=C(f.default,{});function w(){a.useEffect((function(){l.setHomeLink(E.Routes.FRIENDS),(0,c.trackAppUIViewed)("friends")}));var e=(0,i.useStateFromStoresObject)([p.default],(function(){return p.default.getState()})),t=e.section,n=e.pendingCount;return C("div",{className:S.default.container},void 0,N,C(s.default,{toolbar:A},void 0,P,C(s.default.Title,{},void 0,g.default.Messages.FRIENDS),R,C(v.default,{"aria-label":g.default.Messages.FRIENDS,selectedItem:t,type:v.Types.TOP_PILL,onItemSelect:function(e){u.default.setSection(e)},className:S.default.tabBar},void 0,C(v.Item,{id:E.FriendsSections.ONLINE,className:S.default.item},void 0,g.default.Messages.FRIENDS_SECTION_ONLINE),C(v.Item,{id:E.FriendsSections.ALL,className:S.default.item},void 0,g.default.Messages.FRIENDS_SECTION_ALL),C(v.Item,{id:E.FriendsSections.PENDING,className:S.default.item,"aria-label":g.default.Messages.FRIENDS_SECTION_PENDING},void 0,g.default.Messages.FRIENDS_SECTION_PENDING,n>0?C(m.NumberBadge,{count:n,className:S.default.badge,style:{paddingRight:0}}):null),C(v.Item,{id:E.FriendsSections.BLOCKED,className:S.default.item},void 0,g.default.Messages.BLOCKED),C(v.Item,{"aria-label":g.default.Messages.FRIENDS_SECTION_ADD_FRIEND,className:S.default.item,color:E.Colors.STATUS_GREEN_600,id:E.FriendsSections.ADD_FRIEND},void 0,C("span",{"aria-hidden":"true"},void 0,g.default.Messages.FRIENDS_SECTION_ADD_FRIEND)))),C("div",{className:S.default.tabBody},void 0,C(v.Panel,{id:t,className:S.default.peopleColumn},void 0,t===E.FriendsSections.ADD_FRIEND?L:C(h.default,{sectionFilter:t})),C("div",{className:S.default.nowPlayingColumn},void 0,D)))}w.displayName="PeoplePage";var j=w;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=m(n(9)),o=n(10439),i=m(n(473)),l=n(395),u=n(1220),s=m(n(29)),d=m(n(10058)),f=m(n(47)),c=m(n(24)),p=n(1),v=m(n(6)),y=m(n(8050));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.className;return h(d.default,{className:(0,a.default)(y.default.card,t)},void 0,h(f.default,{size:f.default.Sizes.SIZE_16,className:y.default.header},void 0,v.default.Messages.NOW_PLAYING_GDPR_HEADER),h(c.default,{size:f.default.Sizes.SIZE_14},void 0,v.default.Messages.NOW_PLAYING_GDPR_BODY.format({onPrivacyClick:function(){return i.default.open(p.UserSettingsSections.PRIVACY_AND_SAFETY)}})),h("div",{className:y.default.buttonContainer},void 0,h(s.default,{size:s.default.Sizes.SMALL,onClick:function(){return(0,o.setConsents)([p.Consents.PERSONALIZATION],[])}},void 0,v.default.Messages.ACTIVITY_FEED_CARD_GDPR_BUTTON_YES),h(s.default,{color:s.default.Colors.PRIMARY,size:s.default.Sizes.SMALL,onClick:function(){return(0,u.hideHotspot)(l.HotspotLocations.NOW_PLAYING_CONSENT_CARD)},look:s.default.Looks.LINK},void 0,v.default.Messages.NO_THANKS)))}E.displayName="ConsentCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,i.useStateFromStoresObject)([d.default],(function(){return{nowPlayingCards:d.default.nowPlayingCards,loaded:d.default.loaded}})),t=e.nowPlayingCards,n=e.loaded,r=(0,i.useStateFromStoresObject)([s.default],(function(){return{needsRefresh:s.default.needsRefresh(),fetching:s.default.getFetching()}})),o=r.needsRefresh,u=r.fetching;a.useEffect((function(){return l.default.wait((function(){return y.mount()})),function(){return l.default.wait((function(){return y.unmount()}))}}),[]),a.useEffect((function(){o&&!u&&A()}),[o,u]);var f=null;if(!n)return M("div",{className:O.default.emptyCard},void 0,P);f=t.length>0?t.map((function(e){var t=e.party;return M(N,{party:t},t.id)})):M("div",{className:O.default.emptyCard},void 0,M(p.default,{tag:p.default.Tags.H5,size:p.default.Sizes.SIZE_16,className:O.default.emptyHeader},void 0,S.default.Messages.ACTIVITY_FEED_NONE_PLAYING_HEADER),M(v.default,{color:v.default.Colors.CUSTOM,className:O.default.emptyText},void 0,S.default.Messages.ACTIVITY_FEED_NONE_PLAYING_BODY));return a.createElement(a.Fragment,null,f)};var r,a=C(n(0)),o=I(n(8)),i=n(3),l=I(n(2)),u=C(n(9132)),s=I(n(8415)),d=I(n(10440)),f=I(n(278)),c=I(n(151)),p=I(n(47)),v=I(n(24)),y=C(n(11264)),m=I(n(11265)),_=I(n(11269)),h=I(n(10060)),E=I(n(11270)),g=I(n(11279)),S=I(n(6)),O=I(n(8053));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=(0,g.default)((function(e){var t=e.party,n=e.onUserContextMenu,r=e.onChannelContextMenu,o=M(_.default,{party:t,onUserContextMenu:n}),i=M(m.default,{party:t,onChannelContextMenu:r}),l=M("div",{},void 0,o,i);return null!=o||null!=i?M(f.default,{position:f.default.Positions.LEFT,renderPopout:function(e){var n=e.closePopout;return M(E.default,{party:t,close:n})},spacing:8},void 0,(function(e,t){return a.createElement(h.default,b({},e,{className:O.default.itemCard,active:t}),l)})):null})),A=o.default.throttle((function(){return u.fetchUserAffinities(!1)}),3e5),P=M(c.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StageChannelNowPlayingDelegate=void 0;var r,a=y(n(0)),o=p(n(1288)),i=p(n(10)),l=p(n(61)),u=p(n(47)),s=y(n(1232)),d=n(1278),f=p(n(81)),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t,n,r=e.activity,p=(null!==(t=(0,d.unpackStageChannelParty)(r))&&void 0!==t?t:{}).channelId,v=(0,o.default)([f.default],(function(){return f.default.getStageInstanceByChannel(p)}),[p]),y=a.useRef(null),_=a.useCallback((function(){var e=i.default.getChannel(p);e&&s.connectAndOpen(e)}),[p]),h=null!==(n=null==v?void 0:v.topic)&&void 0!==n?n:r.name,E=c.default.Messages.STAGE_CHANNEL_ACTIVITY_FEED_JOIN.format({channel:h});return a.createElement("div",{ref:y},m(l.default,{onClick:_,focusProps:{ringTarget:y}},void 0,m(u.default,{},void 0,E)))}_.displayName="StageChannelBody";var h=function(){function e(){this.body=_}var t=e.prototype;return t.shouldShow=function(e){return(0,d.shouldShowActivity)(e)},t.createHeader=function(e){return{subtitle:c.default.Messages.STAGE_CHANNEL_ACTIVITY_FEED_DEFAULT,icon:null}},e}();t.StageChannelNowPlayingDelegate=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mount=function(){a.default.dispatch({type:o.ActionTypes.NOW_PLAYING_MOUNTED})},t.unmount=function(){a.default.dispatch({type:o.ActionTypes.NOW_PLAYING_UNMOUNTED})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.party,n=e.onChannelContextMenu,r=t.voiceChannels,v=t.currentActivities,y=t.partiedMembers,m=t.applicationStreams,g=t.guildContext,S=[],O=function(e){var t,n,r=S.length;if(0!==r){var a=S[r-1],o=""+(null!==(t=null==e?void 0:e.key)&&void 0!==t?t:""),i=(""+(null!==(n=null==a?void 0:a.key)&&void 0!==n?n:"")).startsWith("game")&&o.startsWith("rich-presence");S.push(h(f.default.Separator,{inset:i},"sep-"+o)),S.push(e)}else S.push(e)};r.length>0&&r.forEach((function(e){var t=e.members,r=e.channel,a=e.guild;O(h(f.default.VoiceSection,{guild:a,channel:r,members:t,partySize:E(t),onChannelContextMenu:n,onGuildClick:function(){var e=u.default.getChannelId(a.id);(0,l.transitionToGuild)(a.id,e)}},"voice-"+r.id))}));for(var I,T=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(t.currentActivities);!(I=T()).done;){var C=I.value.activity;if(C){var b=d.createBody(C);if(b){O(b);break}}}m.length>0&&m.forEach((function(e){var t=e.stream,n=e.streamUser,r=e.activity;O(h(f.default.ApplicationStreamingSection,{guildId:null==g?void 0:g.id,user:n,activity:r,applicationStream:t,onPreviewClick:function(){a.default.selectVoiceChannel(t.channelId),(0,o.watchStreamAndTransitionToStream)(t)}},"application-stream-"+t.ownerId))}));return v.forEach((function(e,t){var n=e.activity,a=e.game,o=e.playingMembers,l=e.activityUser;if(null==n||null==n.type)return null;if(v.length>1&&n.type===p.ActivityTypes.PLAYING&&!(0,i.hasRichActivity)(n)&&null!=a)O(h(f.default.GameSection,{icon:a.getIconURL(c.ICON_SIZE),name:a.name,partySize:{knownSize:o.length,unknownSize:0,totalSize:o.length},members:o},"game-"+(n.session_id||t)+"-"+(n.application_id||t)));else if((0,i.hasRichActivity)(n)&&n.type===p.ActivityTypes.PLAYING)O(h(f.default.RichPresenceSection,{activity:n,getAssetImage:s.getAssetImage},"rich-presence-"+(n.session_id||t)+"-"+l.id));else if((0,i.isStreaming)(n)){var u=r.length>0&&r[0].members.length>1,d=o.length>1;O(h(f.default.TwitchSection,{guildId:null==g?void 0:g.id,activity:n,user:u||d?l:null,getAssetImage:s.getAssetImage},"streaming-"+(n.session_id||t)))}else(0,i.isListeningOnSpotify)(n)?O(h(f.default.SpotifySection,{activity:n,isSolo:1===y.length,partySize:{knownSize:o.length,unknownSize:0,totalSize:o.length},getAssetImage:s.getAssetImage,members:o},"spotify-"+(n.session_id||t)+"-"+l.id)):(0,i.isOnXbox)(n)&&O(h(f.default.XboxSection,{title:a.name},"xbox-"+(n.session_id||t)))})),S.length>0?h(f.default.Body,{},void 0,S):null};m(n(0));var r,a=v(n(132)),o=n(364),i=n(1214),l=n(42),u=v(n(36)),s=n(409),d=m(n(10059)),f=v(n(10060)),c=n(10442),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){var n,r=e.length,a=0;if(null!=t&&null!=t.party&&null!=t.party.size&&t.party.size.length>=2){var o=t.party.size;a=Math.max(o[0]-e.length,0),n=o[1]}else n=r+a;return{knownSize:r,unknownSize:a,totalSize:n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(8)),i=y(n(8273)),l=y(n(8264)),u=y(n(8268)),s=y(n(278)),d=y(n(11267)),f=y(n(279)),c=n(48),p=n(1),v=y(n(8051));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t=e.member,n=e.empty,r=e.analyticsContext,o=e.guildId;if(n)return h("div",{className:v.default.partyMemberEmpty});if(null==t)return h("div",{className:v.default.partyMemberUnknown},void 0,h(d.default,{className:v.default.partyMemberUnknownIcon}));var i={location:_({},r.location,{object:p.AnalyticsObjects.AVATAR})};return h("div",{className:v.default.partyMemberKnown},void 0,h(s.default,{preload:function(){return(0,l.default)(t.id,t.getAvatarURL(o))},renderPopout:function(e){return a.createElement(u.default,_({},e,{userId:t.id,analyticsParams:i}))},position:s.default.Positions.LEFT},void 0,(function(e){return a.createElement(f.default,_({},e,{src:t.getAvatarURL(o),"aria-label":t.username,size:f.default.Sizes.SIZE_24,className:v.default.partyMember}))})))};E.displayName="PartyMember";var g=(0,i.default)(E),S=function(e){var t=e.partySize,n=e.members,r=e.minAvatarsShown,a=void 0===r?1:r,i=e.maxAvatarsShown,l=void 0===i?2:i,u=e.guildId,s=t.unknownSize,d=t.totalSize,f=t.knownSize;if(d<a)return null;for(var p=(0,o.default)(n).filter(c.isNotNullish).take(l).map((function(e){return h(g,{member:e,guildId:u},e.id)})).value(),y=0;y<s&&p.length<l;y++)p.push(h(g,{guildId:u},"unknown-member-"+y));for(var m=d-f-s,_=0;_<m&&p.length<l;_++)p.push(h(g,{empty:!0,guildId:u},"empty-member-"+_));var E=Math.max(Math.min(d-p.length,99),0);if(1===E){var S=n[l];p.push(h(g,{member:S,guildId:u},S.id))}return h("div",{className:v.default.wrapper},void 0,h("div",{className:v.default.partyMembers},void 0,p,E>1?h("div",{className:v.default.partyMemberOverflow},void 0,"+",E):null))};S.displayName="PartyAvatars";var O=S;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({},(0,i.default)(f),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{fill:d,d:"M12 14C7.289 14 4 16.467 4 20V22H20V20C20 16.467 16.711 14 12 14ZM11 19C10.447 19 10 18.553 10 18C10 17.447 10.447 17 11 17C11.553 17 12 17.447 12 18C12 18.553 11.553 19 11 19ZM14 19C13.447 19 13 18.553 13 18C13 17.447 13.447 17 14 17C14.553 17 15 17.447 15 18C15 18.553 14.553 19 14 19Z"}),s("path",{fill:d,d:"M18 6H17.91C17.432 3.167 14.967 1 12 1C9.033 1 6.568 3.167 6.09 6H6C4.896 6 4 6.896 4 8V9C4 10.104 4.896 11 6 11C6 12.102 6.897 13 8 13H16C17.104 13 18 12.102 18 11C19.104 11 20 10.104 20 9V8C20 6.896 19.104 6 18 6ZM16 10H8V6H16V10Z"}))}d.displayName="UnknownUser"},function(e,t,n){e.exports=n.p+"1747132724e5e5d09278618b69f79233.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;v(n(0));var r,a=c(n(23)),o=n(1214),i=c(n(8432)),l=v(n(10059)),u=c(n(10060)),s=n(10442),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.party,r=e.onUserContextMenu,c=t.priorityMembers,p=t.guildContext,v=c[0],m=function(e){var t=e.priorityMembers,n=e.partiedMembers,r=new Set(t.map((function(e){return e.user.id}))),a=n.filter((function(e){return!r.has(e.id)})),o=t[0].user.toString(),i=null!=t[1]?t[1].user.toString():null!=a[0]?a[0].toString():null;switch(n.length){case 1:return o;case 2:return f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_HEADER_TWO_KNOWN_ONLY.format({user1:o,user2:i});default:return f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_HEADER_TWO_KNOWN.format({user1:o,user2:i,extras:n.length-2})}}(t),_=function(e){var t=e.priorityMembers,r=e.partiedMembers,c=e.voiceChannels,p=e.currentActivities,v=t.length,m=v+(r.length-v)===1,_=p[0];if(m&&null!=_){var h=_.activity,E=_.game,g=_.startedPlayingTime;if(null==h)return{subtitle:null,icon:null};var S=l.createHeader(h);if(S)return S;switch(h.type){case d.ActivityTypes.PLAYING:return(0,o.isOnXbox)(h)?{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_XBOX,icon:y(u.default.Header.Icon,{src:u.default.Header.Icon.Src.XBOX})}:{subtitle:y(i.default,{start:g,location:i.default.Locations.ACTIVITY_FEED_NEW,messageProps:{name:h.name}}),icon:null!=E?y(u.default.Header.Icon,{src:null!=E.getIconURL(s.ICON_SIZE)?E.getIconURL(s.ICON_SIZE):n(10441)}):null};case d.ActivityTypes.STREAMING:return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_STREAMING_TWITCH,icon:null!=E&&null!=E.getIconURL(s.ICON_SIZE)?y(u.default.Header.Icon,{src:E.getIconURL(s.ICON_SIZE)}):null};case d.ActivityTypes.LISTENING:return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_SPOTIFY,icon:y(u.default.Header.Icon,{src:u.default.Header.Icon.Src.SPOTIFY})};case d.ActivityTypes.WATCHING:return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_WATCHING,icon:null!=E&&null!=E.getIconURL(s.ICON_SIZE)?y(u.default.Header.Icon,{src:E.getIconURL(s.ICON_SIZE)}):null};default:return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_IN_A_VOICE_CHANNEL,icon:null}}}if(0===p.length){if(c.length>0)return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_IN_A_VOICE_CHANNEL,icon:null};var O=p[0];if(null!=O){var I=O.activity;if(null!=I){var T=l.createHeader(I);if(T)return T}if(null!=I&&I.type===d.ActivityTypes.LISTENING)return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_SPOTIFY,icon:y(u.default.Header.Icon,{src:u.default.Header.Icon.Src.SPOTIFY})}}}else if(1===p.length){var C=p.find((function(e){return null!=e.activity}));if(null==C)throw new Error("Invalid Activity State - AF 2.0: No activity");var b=C.activity,M=C.game,N=C.startedPlayingTime;return(0,a.default)(null!=b,"Activity was null somehow"),{subtitle:y(i.default,{start:N,location:i.default.Locations.ACTIVITY_FEED_NEW,messageProps:{name:b.name}}),icon:null!=M&&null!=M.getIconURL(s.ICON_SIZE)?y(u.default.Header.Icon,{src:M.getIconURL(s.ICON_SIZE)}):null}}return{subtitle:f.default.Messages.ACTIVITY_FEED_NOW_PLAYING_MULTIPLE_GAMES,icon:y(u.default.Header.Icon,{src:u.default.Header.Icon.Src.MULTIPLE})}}(t),h=_.subtitle,E=_.icon;return y(u.default.Header,{priorityUser:v,guildId:null==p?void 0:p.id,title:m,subtitle:h,icon:E,onContextMenu:function(e){return r(e,v.user)}})}m.displayName="NowPlayingHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;v(n(0));var r,a=v(n(8253)),o=c(n(11271)),i=c(n(11272)),l=c(n(11274)),u=c(n(11275)),s=c(n(11277)),d=c(n(11278)),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.party,n=e.close,r=e.onSelect,c=(0,l.default)(t),p=(0,d.default)(t),v=(0,s.default)(t),m=(0,u.default)(t),_=(0,o.default)(t),h=(0,i.default)(t);return y(a.default,{navId:"now-playing-menu",onClose:n,"aria-label":f.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onSelect:r},void 0,c,y(a.MenuGroup,{},void 0,p,v),y(a.MenuGroup,{},void 0,m),y(a.MenuGroup,{},void 0,_),h)}m.displayName="NowPlayingCardMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t,n=e.currentActivities.length>1,r=L(e),i=function(e){var t=e.currentActivities,n=a.useContext(E.AnalyticsContext);return(0,o.useStateFromStoresArray)([h.default,_.default,c.default,m.default,y.default],(function(){return t.map((function(e){var t=e.activity,r=e.game,a=_.default.getActiveLibraryApplication(r.id);return A({},e,{libraryApplication:a,canJoin:null!=t&&(0,f.default)(t,O.ActivityFlags.JOIN)&&t.type===O.ActivityTypes.PLAYING,canPlay:(0,g.isLaunchable)(_.default,c.default,m.default,y.default,r.id,null!=a?a.branchId:null),isLaunching:c.default.launchingGames.has(r.id),isRunning:h.default.getRunningVerifiedApplicationIds().includes(r.id),location:n.location})}))}),[t])}(e),l=[],u=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(i);!(t=u()).done;){var s=t.value,d=s.activity;null!=d&&null!=d.type&&l.push(D(s,n),w(s,n))}return[r].concat(l)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=T(n(1234)),l=T(n(132)),u=T(n(473)),s=T(n(183)),d=n(1214),f=T(n(399)),c=T(n(1245)),p=n(8253),v=T(n(725)),y=T(n(400)),m=T(n(155)),_=T(n(120)),h=T(n(79)),E=n(13),g=n(263),S=n(1253),O=n(1),I=T(n(6));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function N(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){M(o,r,a,i,l,"next",e)}function l(e){M(o,r,a,i,l,"throw",e)}i(void 0)}))}}function A(){return(A=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}).apply(this,arguments)}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var R=s.default.get(O.PlatformTypes.XBOX).name;function L(e){var t=e.currentActivities,n=(0,o.useStateFromStores)([v.default],(function(){return v.default.getAccounts().some((function(e){return e.type===s.default.get(O.PlatformTypes.XBOX).type}))})),r=t.some((function(e){var t=e.activity;return(0,d.isOnXbox)(t)}));return n||!r?null:P(p.MenuItem,{id:"xbox-connect",action:function(){return u.default.open(O.UserSettingsSections.CONNECTIONS)},label:I.default.Messages.USER_ACTIVITY_CONNECT_PLATFORM.format({platform:R})})}function D(e,t){var n=e.canJoin,r=e.activity,a=e.activityUser;if(!n||null==r)return null;function o(){return(o=N(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,i.default.sendActivityInviteUser({type:O.ActivityActionTypes.JOIN_REQUEST,userId:a.id,activity:r,location:O.AnalyticsLocations.PROFILE_POPOUT});case 4:null!=(t=e.sent)&&l.default.selectPrivateChannel(t.id);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return P(p.MenuItem,{id:"join-"+r.session_id,label:t?I.default.Messages.USER_ACTIVITY_ACTION_ASK_TO_JOIN_USER.format({name:a.toString()}):I.default.Messages.USER_ACTIVITY_ACTION_ASK_TO_JOIN,action:function(){return o.apply(this,arguments)}})}function w(e,t){var n=e.activity,r=e.game,a=e.libraryApplication,o=e.location,i=e.canPlay,l=e.isRunning,u=e.isLaunching;if(!i||null==n)return null;var s=l?I.default.Messages.ACTIVITY_FEED_POPOUT_APPLICATION_RUNNING.format({name:r.name}):u?I.default.Messages.ACTIVITY_FEED_POPOUT_APPLICATION_LAUNCHING.format({name:r.name}):void 0;return P(p.MenuItem,{id:"play-"+n.session_id,action:function(){(0,S.playApplication)(r.id,a,{analyticsParams:{location:A({},o,{object:O.AnalyticsObjects.LIST_ITEM})}})},label:t?I.default.Messages.APPLICATION_CONTEXT_MENU_LAUNCH_APPLICATION_NAME.format({name:r.name}):I.default.Messages.APPLICATION_CONTEXT_MENU_LAUNCH,subtext:s})}L.displayName="useXboxConnectItem",D.displayName="renderAskToJoinItem",w.displayName="renderPlayGameItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,r=e.priorityMembers,a=e.partiedMembers,l=e.currentActivities,u=e.guildContext,d=new Set(r.map((function(e){return e.user.id}))),f=a.filter((function(e){return!d.has(e.id)})),p=o.useMemo((function(){var e=l.flatMap((function(e){return e.playingMembers})).map((function(e){return e.id}));return a.filter((function(t){return!e.includes(t.id)}))}),[a,l]);if(l.length<=1&&0===p.length)return c(i.MenuGroup,{label:a.length>1?s.default.Messages.ACTIVITY_FEED_SINGLE_MEMBER_LIST_HEADER.format({memberCount:a.length}):void 0},void 0,m(r,f,a.length,null!==(t=null===(n=l[0])||void 0===n?void 0:n.activity)&&void 0!==t?t:void 0,null==u?void 0:u.id));var v=l.map((function(e){var t=e.playingMembers,n=e.game,a=e.activity,o=new Set(t.map((function(e){return e.id})));return c(i.MenuGroup,{label:n.name+" - "+t.length},void 0,m(r.filter((function(e){var t=e.user;return o.has(t.id)})),t.filter((function(e){return!d.has(e.id)})),t.length,null!=a?a:void 0,null==u?void 0:u.id))})),y=p.map((function(e){return e.id})),_=c(i.MenuGroup,{label:s.default.Messages.ACTIVITY_FEED_OTHER_MEMBER_LIST_HEADER+" - "+p.length},void 0,m(r.filter((function(e){var t=e.user;return y.includes(t.id)})),p.filter((function(e){return!d.has(e.id)})),p.length,void 0,null==u?void 0:u.id));return[].concat(v,[_])};var r,a,o=f(n(0)),i=n(8253),l=n(8310),u=f(n(11273)),s=(r=n(6))&&r.__esModule?r:{default:r};function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function c(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(){return(p=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}).apply(this,arguments)}function v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,a){for(var d,f=[],y=function(){var e=d.value,t=e.user,n=e.status;f.push(c(i.MenuItem,{id:t.id,keepItemStyles:!0,render:function(e){return o.createElement(u.default,p({},e,{user:t,status:n,guildId:a}))},action:function(){return(0,l.openUserProfileModal)({userId:t.id})}}))},m=v(e);!(d=m()).done;)y();for(var _,h=function(){var e=_.value;f.push(c(i.MenuItem,{id:e.id,keepItemStyles:!0,render:function(t){return o.createElement(u.default,p({},t,{user:e,guildId:a}))},action:function(){return(0,l.openUserProfileModal)({userId:e.id})}}))},E=v(t);!(_=E()).done;)h();var g=n-f.length;return g>0&&f.push(c(i.MenuItem,{id:"unknown-members-"+(null==r?void 0:r.session_id),render:function(e){return o.createElement(u.NowPlayingUnknownMemberMenuItem,p({},e,{label:s.default.Messages.GAME_FEED_UNKNOWN_PLAYERS.format({count:g})}))}})),f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f,t.NowPlayingUnknownMemberMenuItem=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(9)),o=u(n(8300)),i=u(n(279)),l=u(n(8052));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.user,n=e.status,r=e.isFocused,a=e.guildId;return d("div",{className:l.default.memberItem},void 0,d(i.default,{src:t.getAvatarURL(a),className:l.default.avatar,"aria-label":t.username,size:i.default.Sizes.SIZE_24,status:n,statusColor:r?"currentColor":void 0}),d(o.default,{user:t,hideDiscriminator:!0}))}function c(e){var t=e.label;return d("div",{className:l.default.memberItem},void 0,d("div",{className:(0,a.default)(l.default.avatar,l.default.unknown)}),d("div",{},void 0,t))}f.displayName="NowPlayingMemberMenuItem",c.displayName="NowPlayingUnknownMemberMenuItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(391)),i=c(n(106)),l=n(8253),u=n(10443),s=n(13),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e,t){void 0===t&&(t=!1);var n=e.priorityMembers,r=e.partiedMembers,c=a.useContext(s.AnalyticsContext),p=n.map((function(e){return e.user.id})),m=1===r.length&&1===n.length,_=n.length-r.length>0;if(!((m||t)&&!_)||0===p.length)return null;return v(l.MenuItem,{id:"message",action:function(){o.default.openPrivateChannel(p).then((function(t){return i.default.trackWithMetadata(d.AnalyticEvents.ACTIVITY_FEED_DM_VISITED,y({source:y({},c.location,{object:d.AnalyticsObjects.LIST_ITEM}),channel_id:t,recipient_id:"string"==typeof p?p:p[0],af_recently_played:!1},(0,u.getPartyMetadata)(e)))}))},label:f.default.Messages.SEND_DM})}m.displayName="useNowPlayingMessageItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.currentActivities,n=e.isSpotifyActivity,r=t[0],o=(0,a.default)(null==r?void 0:r.activity,null==r?void 0:r.activityUser);return n?o:null};var r,a=(r=n(11276))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=(0,a.useStateFromStores)([u.default,i.default],(function(){return null!=t?(0,d.default)(u.default,i.default,t,e):void 0}),[e,t]);if(null==r||null==e||null==t)return null;var v=r.isCurrentUser||r.notPlayable||r.playingSameTrack,y=r.isCurrentUser||r.syncingWithUser||r.syncingWithParty;return[m(o.MenuItem,{id:"spotify-play-"+e.session_id,action:function(){return(0,c.default)(r,l.SpotifyActionTypes.USER_ACTIVITY_PLAY,n)},label:p.default.Messages.ACTIVITY_FEED_NOW_PLAYING_ACTION_PLAY_ON_SPOTIFY,subtext:v?(0,s.default)(r,l.SpotifyActionTypes.USER_ACTIVITY_PLAY):void 0,disabled:v}),r.canPlaySpotify?m(o.MenuItem,{id:"spotify-sync-"+e.session_id,action:function(){return(0,f.default)(r,l.SpotifyActionTypes.USER_ACTIVITY_SYNC,n)},label:p.default.Messages.ACTIVITY_FEED_NOW_PLAYING_ACTION_LISTEN_ALONG,subtext:y?(0,s.default)(r,l.SpotifyActionTypes.USER_ACTIVITY_SYNC):void 0,disabled:y}):null]};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=v(n(11)),l=n(293),u=v(n(708)),s=v(n(8727)),d=v(n(8728)),f=v(n(8729)),c=v(n(8730)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.applicationStreams.map((function(e){var t=e.stream,n=e.streamUser;return d(i.MenuItem,{id:"spectate-"+t.ownerId,action:function(){a.default.selectVoiceChannel(t.channelId),(0,o.watchStreamAndTransitionToStream)(t)},label:l.default.Messages.WATCH_USER_STREAM.format({streamerName:n.toString()})})}))};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(132)),o=n(364),i=n(8253),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a.useContext(f.AnalyticsContext),n=e.voiceChannels[0];if(null==n)return null;return[m(l.MenuItem,{id:"join-voice",action:function(){var r=s.default.getChannelId(n.guild.id);(0,u.transitionToGuild)(n.guild.id,r),o.default.selectVoiceChannel(n.channel.id),i.default.trackWithMetadata(c.AnalyticEvents.ACTIVITY_FEED_VOICE_CHANNEL_VISITED,_({source:_({},t.location,{object:c.AnalyticsObjects.LIST_ITEM}),guild_id:n.guild.id,channel_id:n.channel.id},(0,d.getPartyMetadata)(e)))},label:p.default.Messages.ACTIVITY_FEED_NOW_PLAYING_ACTION_JOIN_CHANNEL}),m(l.MenuItem,{id:"goto-server",action:function(){var r=s.default.getChannelId(n.guild.id);(0,u.transitionToGuild)(n.guild.id,r),i.default.trackWithMetadata(c.AnalyticEvents.ACTIVITY_FEED_GUILD_VISITED,_({source:_({},t.location,{object:c.AnalyticsObjects.LIST_ITEM}),guild_id:n.guild.id,af_recently_played:!1},(0,d.getPartyMetadata)(e)))},label:p.default.Messages.ACTIVITY_FEED_NOW_PLAYING_ACTION_GO_TO_SERVER})]};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(132)),i=v(n(106)),l=n(8253),u=n(42),s=v(n(36)),d=n(10443),f=n(13),c=n(1),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(function(t){var n,i;function f(){return t.apply(this,arguments)||this}i=t,(n=f).prototype=Object.create(i.prototype),n.prototype.constructor=n,v(n,i);var c=f.prototype;return c.render=function(){return r.createElement(e,p({},this.props,{onMessageUser:this.handleMessageUser,onUserContextMenu:this.handleUserContextMenu,onGuildContextMenu:this.handleGuildContextMenu,onChannelContextMenu:this.handleChannelContextMenu}))},c.handleMessageUser=function(e,t){return a.default.openPrivateChannel(t.id)},c.handleUserContextMenu=function(e,t,n){(0,o.openContextMenu)(e,(function(e){return r.createElement(s.default,p({},e,{user:t}))}),{onClose:n})},c.handleGuildContextMenu=function(e,t){(0,o.openContextMenu)(e,(function(e){return r.createElement(u.default,p({},e,{guild:t}))}))},c.handleChannelContextMenu=function(e,t){var n=d.default.getGuild(t.getGuildId());if(null==n)return null;(0,o.openContextMenu)(e,(function(e){return r.createElement(l.default,p({},e,{channel:t,guild:n}))}))},f}(r.Component))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=f(n(391)),o=n(389),i=f(n(8273)),l=f(n(11280)),u=f(n(8573)),s=f(n(8351)),d=f(n(15));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;m(n(0));var r,a=n(389),o=v(n(8258)),i=m(n(8253)),l=v(n(11)),u=v(n(8579)),s=v(n(8484)),d=v(n(8329)),f=v(n(8370)),c=v(n(8485)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.channel,n=e.guild,r=e.onSelect,v=(0,f.default)(t),y=(0,c.default)(t,n),m=(0,u.default)(t,n),h=(0,s.default)(t,n),E=(0,d.default)(t),g=(0,o.default)(t.id);return l.default.isGuest()?null:_(i.default,{navId:"channel-context",onClose:a.closeContextMenu,"aria-label":p.default.Messages.CHANNEL_ACTIONS_MENU_LABEL,onSelect:r},void 0,_(i.MenuGroup,{},void 0,v),_(i.MenuGroup,{},void 0,y,m,h),_(i.MenuGroup,{},void 0,E),_(i.MenuGroup,{},void 0,g))}h.displayName="ChannelListVoiceChannelContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(11282)),l=f(n(10444)),u=n(1),s=f(n(6)),d=f(n(8057));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){var e,t=a.useState(null),n=t[0],r=t[1],l=a.useState(null),u=l[0],f=l[1],c=!1,v=!1,y=s.default.Messages.ADD_FRIEND_DESCRIPTION;return null!=u?(c=!0,y=u):null!=n&&(v=!0,y=n),p("div",{className:d.default.sectionHeader},void 0,p("div",{className:d.default.addInputWrapper},void 0,p("h2",{className:d.default.header},void 0,s.default.Messages.ADD_FRIEND),p("div",{className:(0,o.default)(d.default.description,(e={},e[d.default.success]=c,e[d.default.error]=v,e))},void 0,y),p(i.default,{onSubmit:function(e,t){r(e),f(t)}})))}v.displayName="AddFriendHeader";var y=p(v,{});function m(){return p(a.Fragment,{},void 0,y,p("div",{className:d.default.emptyState},void 0,p(l.default,{type:u.FriendsSections.ADD_FRIEND})))}m.displayName="AddFriend";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(23)),i=p(n(1217)),l=p(n(88)),u=p(n(29)),s=n(1420),d=n(1),f=p(n(6)),c=p(n(8055));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _={canSend:!1,hint:""},h=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).state=_,t.inputRef=a.createRef(),t.containerRef=a.createRef(),t.handleSubmit=function(e){e.preventDefault();var n=t.props.onSubmit;(0,o.default)(null!=t.inputRef.current,"Input is submitted when not mounted");var r=t.inputRef.current.value.trim(),a=(0,s.validateDiscordTag)(r);null!=a?n(a):(t.setState({canSend:!1}),i.default.sendRequest(r,{location:"Add Friend"}).then((function(){n(null,f.default.Messages.ADD_FRIEND_SUCCESS.format({discordTag:r})),(0,o.default)(null!=t.inputRef.current,"Input is submitting when not mounted"),t.inputRef.current.value="",t.setState(_,t.focus)}),(function(e){n((0,s.humanizeAbortCode)(e.body.code,r)),t.setState({canSend:!0})})))},t.handleChange=function(e){var n=e.currentTarget.value;if(n.length>0){var r=n.split("#")[1];t.setState({hint:n+d.PLACEHOLDER_TAG.slice(null!=r?r.length+1:0),canSend:!0})}else t.setState({hint:"",canSend:!1});t.props.onError&&t.props.onError(null)},t.handleKeyPress=function(e){var n=e.currentTarget.value;if(13!==e.which){var r=n.indexOf("#");if(r>-1){(0,o.default)(null!=t.inputRef.current,"Input is handling keypress when not mounted");var a=t.inputRef.current.selectionStart,i=8===e.which||37===e.which||39===e.which,l=e.which>=48&&e.which<=57;(null!=a&&a>r&&/^(.+?#\d{4})$/.test(n)&&!i||null!=a&&a>r&&!l&&!i)&&e.preventDefault()}}},t.focus=function(){(0,o.default)(null!=t.inputRef.current,"Input is being focussed when not mounted"),t.inputRef.current.focus()},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.state.canSend;return y(l.default,{focusTarget:this.inputRef,ringTarget:this.containerRef,ringClassName:c.default.ring,offset:{top:12,bottom:12}},void 0,a.createElement("div",{ref:this.containerRef},y("form",{className:c.default.wrapper,onSubmit:this.handleSubmit},void 0,a.createElement("input",{ref:this.inputRef,className:c.default.addFriendInput,placeholder:f.default.Messages.ADD_FRIEND_PLACEHOLDER,onKeyPress:this.handleKeyPress,onChange:this.handleChange,autoFocus:!0,maxLength:37}),y("div",{className:c.default.addFriendHint},void 0,this.state.hint),y(u.default,{size:u.default.Sizes.SMALL,disabled:!e,type:"submit"},void 0,f.default.Messages.ADD_FRIEND_BUTTON))))},r}(a.PureComponent);h.displayName="AddFriendInput";var E=h;t.default=E},function(e,t,n){e.exports=n.p+"6b7098de4cc16f7e431ad8f9aae7f6db.svg"},function(e,t,n){e.exports=n.p+"b5eb2f7d6b3f8cc9b60be4a5dcf28015.svg"},function(e,t,n){e.exports=n.p+"d834d700306f3838c0facef39e7d8a38.svg"},function(e,t,n){e.exports=n.p+"a12ff54c4c5c03b41006fd96a4709c29.svg"},function(e,t,n){e.exports=n.p+"645df33d735507f39c78ce0cac7437f0.svg"},function(e,t,n){e.exports=n.p+"8c998f8fb62016fcfb4901e424ff378b.svg"},function(e,t,n){e.exports=n.p+"c84361b810ca7c10d6e8ddb6ea722ebe.svg"},function(e,t,n){e.exports=n.p+"b669713872b43ca42333264abf9c858e.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=g(n(8765)),l=g(n(70)),u=g(n(161)),s=g(n(10061)),d=g(n(11292)),f=g(n(11294)),c=g(n(10444)),p=g(n(11297)),v=g(n(11298)),y=g(n(11299)),m=n(10064),_=n(1),h=g(n(6)),E=g(n(7403));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}var T=function(e){var t=e.sectionFilter,n=(0,o.useStateFromStoresObject)([s.default],(function(){return s.default.getState()})),r=n.rows,g=n.section,S=(0,o.useStateFromStores)([u.default],(function(){return u.default.isFocused()})),T=(0,o.useStateFromStores)([l.default],(function(){return l.default.getRelationshipCount()}));function C(e,n){var r=e[n].length;switch(t){case _.FriendsSections.ONLINE:return h.default.Messages.FRIENDS_ONLINE_HEADER.format({online:r});case _.FriendsSections.PENDING:return h.default.Messages.FRIENDS_PENDING_HEADER.format({count:r});case _.FriendsSections.BLOCKED:return h.default.Messages.FRIENDS_BLOCKED_HEADER.format({count:r});default:return h.default.Messages.FRIENDS_ALL_HEADER.format({count:r})}}function b(e){switch(t){case _.FriendsSections.BLOCKED:return a.createElement(d.default,I({},e,{isFocused:S}));case _.FriendsSections.PENDING:return a.createElement(p.default,I({},e,{isFocused:S}));case _.FriendsSections.ONLINE:case _.FriendsSections.ALL:default:return a.createElement(f.default,I({},e,{isFocused:S}))}}var M=r.filter(t);if(0===M.length)return O("div",{className:E.default.emptyStateContainer},void 0,O(c.default,{type:t,onClick:function(){i.default.setSection(_.FriendsSections.ADD_FRIEND)}},g));var N=[M];return T>=m.RELATIONSHIP_COUNT_ANIMATION_THRESHOLD?O(v.default,{statusSections:N,getSectionTitle:C,renderRow:b}):O(y.default,{statusSections:N,getSectionTitle:C,renderRow:b})};t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=p(n(1217)),o=n(8310),i=p(n(11293)),l=p(n(10062)),u=p(n(10063)),s=p(n(10065)),d=n(1),f=p(n(6)),c=p(n(8061));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.user,n=e.key,r=e.isFocused,p=function(e){e&&e.stopPropagation(),a.default.removeRelationship(t.id,{location:"Friends"})};return y(u.default,{isFocused:r,onClick:function(){return(0,o.openUserProfileModal)({userId:t.id})},user:t},n,(function(e){return y("div",{className:c.default.listItemContents},void 0,y(s.default,{user:t,hovered:e,status:d.StatusTypes.UNKNOWN,subText:f.default.Messages.BLOCKED}),y(l.default,{icon:i.default,actionType:l.default.ActionTypes.DENY,tooltip:f.default.Messages.UNBLOCK,onClick:p,shouldHighlight:e}))}))}m.displayName="BlockedRow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{foreground:f,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M20.2949 0.298996L21.7089 1.713L19.4169 4.006L21.7089 6.299L20.2949 7.713L18.0019 5.42L15.7099 7.713L14.2949 6.299L16.5879 4.006L14.2949 1.713L15.7099 0.298996L18.0019 2.592L20.2949 0.298996ZM8.00195 13.006C10.207 13.006 12.002 11.211 12.002 9.006C12.002 6.801 10.207 5.006 8.00195 5.006C5.79695 5.006 4.00195 6.801 4.00195 9.006C4.00195 11.211 5.79695 13.006 8.00195 13.006ZM8.00195 14.006C3.29095 14.006 0.00195312 16.473 0.00195312 20.006V21.006H16.002V20.006C16.002 16.473 12.713 14.006 8.00195 14.006Z"}))}d.displayName="PersonRemove"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=N(n(8)),i=n(3),l=n(34),u=N(n(391)),s=n(389),d=N(n(1217)),f=P(n(8253)),c=n(8256),p=n(42),v=N(n(10)),y=N(n(51)),m=N(n(11295)),_=N(n(8663)),h=N(n(466)),E=n(41),g=N(n(24)),S=N(n(10062)),O=N(n(10063)),I=N(n(11296)),T=N(n(10065)),C=n(1),b=N(n(6)),M=N(n(8063));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(){return(L=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}).apply(this,arguments)}function D(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w(e){var t=e.user,n=e.onSelect;var r=function(){d.default.removeRelationship(t.id,{location:"Friends"})},o=(0,i.useStateFromStores)([y.default],(function(){return y.default.supports(l.Features.VIDEO)}));return D(f.default,{navId:"friend-row","aria-label":b.default.Messages.USER_ACTIONS_MENU_LABEL,onClose:s.closeContextMenu,onSelect:n},void 0,o?D(f.MenuItem,{id:"start-video-call",label:b.default.Messages.START_VIDEO_CALL,action:function(){u.default.openPrivateChannel(t.id,!0,!0)}}):null,D(f.MenuItem,{id:"start-voice-call",label:b.default.Messages.START_VOICE_CALL,action:function(){u.default.openPrivateChannel(t.id,!0)}}),D(f.MenuItem,{id:"remove-friend",label:b.default.Messages.REMOVE_FRIEND,action:function(){(0,E.openModal)((function(e){return a.createElement(h.default,L({header:b.default.Messages.REMOVE_FRIEND_TITLE.format({name:t.toString()}),confirmText:b.default.Messages.REMOVE_FRIEND,cancelText:b.default.Messages.CANCEL,onConfirm:r},e),D(g.default,{size:g.default.Sizes.SIZE_16},void 0,b.default.Messages.REMOVE_FRIEND_BODY.format({name:t.toString()})))}))},color:c.MenuItemColor.DANGER}))}w.displayName="ActionsPopout";var j=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).peopleListItemRef=a.createRef(),t.state={isActiveRow:!1},t.handleOpenPrivateChannel=function(e){var n=t.props.user;e.stopPropagation();var r=o.default.find(v.default.getMutablePrivateChannels(),(function(e){return e.type===C.ChannelTypes.DM&&e.getRecipientId()===n.id}));null!=r?(0,p.transitionTo)(C.Routes.CHANNEL(C.ME,r.id)):u.default.openPrivateChannel(n.id)},t.handleOpenActionsMenu=function(e){var n=t.props.user;(0,s.openContextMenu)(e,(function(e){return a.createElement(w,L({},e,{user:n}))}),{onClose:function(){t.setState({isActiveRow:!1})}}),t.setState({isActiveRow:!0})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var i=r.prototype;return i.componentWillLeave=function(e){null!=this.peopleListItemRef.current&&this.peopleListItemRef.current.componentWillLeave(e)},i.componentWillEnter=function(e){null!=this.peopleListItemRef.current&&this.peopleListItemRef.current.componentWillEnter(e)},i.render=function(){var e=this,t=this.props,n=t.user,r=t.isFocused,o=t.activities,i=t.applicationStream,l=t.status,u=t.isMobile,d=this.state.isActiveRow;return a.createElement(O.default,{ref:this.peopleListItemRef,isFocused:r,isActive:d,user:n,onOtherHover:function(){return d?null:(0,s.closeContextMenu)()},onClick:this.handleOpenPrivateChannel},(function(t){return D("div",{className:M.default.listItemContents},void 0,D(T.default,{user:n,status:l,isMobile:u,subText:D(I.default,{hovered:t,activities:o,applicationStream:i,status:l}),hovered:t}),D("div",{className:M.default.actions},void 0,D(S.default,{icon:m.default,tooltip:b.default.Messages.SEND_DM,onClick:e.handleOpenPrivateChannel,shouldHighlight:t}),D(S.default,{icon:_.default,tooltip:b.default.Messages.MORE,onClick:e.handleOpenActionsMenu,shouldHighlight:t})))}))},r}(a.PureComponent);j.displayName="FriendRow";var k=j;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",fill:"none"}),s("path",{className:f,fill:d,d:"M4.79805 3C3.80445 3 2.99805 3.8055 2.99805 4.8V15.6C2.99805 16.5936 3.80445 17.4 4.79805 17.4H7.49805V21L11.098 17.4H19.198C20.1925 17.4 20.998 16.5936 20.998 15.6V4.8C20.998 3.8055 20.1925 3 19.198 3H4.79805Z"}))}d.displayName="ChatBubble"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8468)),o=n(716),i=l(n(8062));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var d=function(e){var t=e.hovered,n=e.activities,r=e.applicationStream,l=e.status;return n.length>0?s(a.default,{className:i.default.activity,textClassName:i.default.text,emojiClassName:i.default.customStatusEmoji,activities:n,applicationStream:r,animate:t}):s("div",{className:i.default.text},void 0,(0,o.humanizeStatus)(l))};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(1217)),i=n(8310),l=y(n(372)),u=y(n(255)),s=y(n(10062)),d=y(n(10063)),f=y(n(10065)),c=n(1),p=y(n(6)),v=y(n(8064));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e){var t=e.user,n=e.type,r=e.status,y=e.isFocused,m=function(e){e&&e.stopPropagation(),o.default.removeRelationship(t.id,{location:"Friends"})},h=function(e){e.stopPropagation(),o.default.addRelationship(t.id,{location:"Friends"})},E=r===c.StatusTypes.OFFLINE?c.StatusTypes.UNKNOWN:r,g=n===c.RelationshipTypes.PENDING_INCOMING?p.default.Messages.INCOMING_FRIEND_REQUEST:p.default.Messages.OUTGOING_FRIEND_REQUEST;return _(d.default,{isFocused:y,user:t,onClick:function(){return(0,i.openUserProfileModal)({userId:t.id})}},void 0,(function(e){var r=n===c.RelationshipTypes.PENDING_INCOMING?a.createElement(a.Fragment,null,_(s.default,{icon:l.default,actionType:s.default.ActionTypes.ACCEPT,tooltip:p.default.Messages.FRIEND_REQUEST_ACCEPT,onClick:h,shouldHighlight:e}),_(s.default,{icon:u.default,actionType:s.default.ActionTypes.DENY,tooltip:p.default.Messages.FRIEND_REQUEST_IGNORE,onClick:m,shouldHighlight:e})):_(s.default,{icon:u.default,actionType:s.default.ActionTypes.DENY,tooltip:p.default.Messages.FRIEND_REQUEST_CANCEL,onClick:m,shouldHighlight:e});return _("div",{className:v.default.listItemContents},void 0,_(f.default,{user:t,hovered:e,status:E,subText:g,className:v.default.userInfo}),_("div",{className:v.default.actions},void 0,r))}))}h.displayName="PendingRow"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=v(n(0)),o=v(n(680)),i=n(3),l=c(n(105)),u=n(1210),s=c(n(10445)),d=n(10064),f=c(n(7403));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=e.statusSections,n=e.getSectionTitle,r=e.renderRow,c=function(e){var r=e.section,a=n(t,r);return m(s.default,{title:a},r)},p=function(e){return 0===t[e].length?0:d.STATUS_HEADER_HEIGHT+16},v=function(e){var n=e.section,a=e.row,o=t[n];if(null==o||null==a)return null;var i=o[a];return null==i?null:r(i)},_=(0,i.useStateFromStores)([l.default],(function(){return l.default.keyboardModeEnabled})),h=a.useRef(null),E=a.useCallback((function(){return new Promise((function(e){var t=h.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),g=a.useCallback((function(){return new Promise((function(e){var t=h.current;if(null==t)return e();t.scrollToBottom({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),S=a.useCallback((function(e){var t=document.querySelector(e),n=h.current;null!=t&&null!=n&&n.scrollIntoViewNode({node:t,padding:8,callback:function(){return null==t?void 0:t.focus()}})}),[]),O=(0,o.default)({id:"people-list",isEnabled:_,scrollToStart:E,scrollToEnd:g,setFocus:S});return m(o.ListNavigatorProvider,{navigator:O},void 0,m(o.ListNavigatorContainer,{},void 0,(function(e){var n=e.ref,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement(u.ListAuto,y({ref:function(e){var t;h.current=e,n.current=null!==(t=null==e?void 0:e.getScrollerNode())&&void 0!==t?t:null},renderSection:c,sectionHeight:p,renderRow:v,rowHeight:d.PEOPLE_LIST_ITEM_HEIGHT,sections:t.map((function(e){return e.length})),className:f.default.peopleList},r))})))}_.displayName="PeopleListSectionedLazy";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=v(n(0)),o=v(n(680)),i=n(3),l=c(n(469)),u=c(n(105)),s=n(272),d=c(n(10445)),f=c(n(7403));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){_(o,r,a,i,l,"next",e)}function l(e){_(o,r,a,i,l,"throw",e)}i(void 0)}))}}function E(e){var t=e.statusSections,n=e.getSectionTitle,r=e.renderRow,c=(0,i.useStateFromStores)([u.default],(function(){return u.default.keyboardModeEnabled})),p=(0,o.default)({id:"people",isEnabled:c,scrollToStart:function(){return h(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},scrollToEnd:function(){return h(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()}}),v=t.map((function(e,a){var o=n(t,a);return e.length>0?m(l.default,{transitionAppear:!1,component:"div"},a,m(d.default,{title:o}),e.map(r)):null}));return m(o.ListNavigatorProvider,{navigator:p},void 0,m(o.ListNavigatorContainer,{},void 0,(function(e){var t=e.ref,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["ref"]);return a.createElement(s.ScrollerAuto,y({ref:t,className:f.default.peopleList},n),v)})))}E.displayName="PeopleListSectionedNonLazy";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=n(262),i=b(n(10052)),l=T(n(8318)),u=T(n(10438)),s=n(748),d=n(5687),f=T(n(29)),c=n(8293),p=T(n(9215)),v=T(n(291)),y=n(9040),m=T(n(9038)),_=T(n(10446)),h=T(n(11303)),E=T(n(11316)),g=T(n(11317)),S=n(1),O=T(n(6)),I=T(n(8074));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=M(l.default.Divider,{});function A(e){var t=e.onRefresh;return a.createElement(a.Fragment,null,M(l.default.Icon,{icon:p.default,tooltip:O.default.Messages.STAGE_DISCOVERY_REFRESH_ICON_LABEL,onClick:t}),N)}var P=M(l.default.Icon,{icon:v.default,"aria-hidden":!0}),R=M(l.default.Divider,{}),L=M(u.default,{});function D(){var e=(0,m.default)(),t=(0,_.default)(),n=t.refresh,r=t.list,u=t.loading;(0,E.default)(n);var p=(0,g.default)(n);function v(){p(!0),(0,y.trackStageDiscoveryReload)()}return(0,E.default)(p),a.useEffect((function(){p()}),[]),a.useEffect((function(){i.setHomeLink(S.Routes.STAGE_DISCOVERY),(0,d.trackAppUIViewed)("stage-discovery")}),[]),e?M("div",{className:I.default.container},void 0,M(o.Helmet,{title:O.default.Messages.DISCORD_NAME}),M(l.default,{toolbar:M(A,{onRefresh:v}),className:I.default.headerBarContainer},void 0,P,M(l.default.Title,{},void 0,O.default.Messages.STAGE_DISCOVERY),R,M(f.default,{onClick:s.openDiscoveryStartStageModal,size:f.default.Sizes.TINY,color:f.default.Colors.GREEN,className:I.default.button},void 0,O.default.Messages.START_STAGE_BUTTON_TEXT)),M("div",{className:I.default.pageContent},void 0,M(c.Panel,{id:"stage-discovery",className:I.default.stageSection},void 0,M(h.default,{items:r,loading:u,onRefresh:v})),M("div",{className:I.default.nowPlayingSidebar},void 0,L))):null}D.displayName="StageDiscoveryPage";var w=D;t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOnStageDiscoveryExited=function(e){var t=r.useRef(e);r.useEffect((function(){t.current=e}),[e]),r.useEffect((function(){return function(){return t.current()}}),[])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRichPresenceStagesWithEnhancedData=function(){return O.apply(this,arguments)},t.getStagesFromRichPresence=I,t.getStageFromRichPresence=T,t.default=function(){return(0,r.useStateFromStores)([s.default],(function(){return Object.values(I([s.default]))}))};var r=n(3),a=n(275),o=n(1278),i=n(134),l=n(207),u=_(n(162)),s=_(n(256)),d=_(n(70)),f=_(n(8415)),c=_(n(12)),p=_(n(258)),v=n(722),y=n(10447),m=n(1);function _(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){g(o,r,a,i,l,"next",e)}function l(e){g(o,r,a,i,l,"throw",e)}i(void 0)}))}}function O(){return(O=S(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=I(),n=Object.keys(t),e.prev=2,e.next=5,(0,y.fetchRichPresenceStagesMetadata)(n);case 5:return r=e.sent,e.abrupt("return",r.map((function(e){var n=(0,v.createRecommendedDiscoveryItem)(e);return{enhancedStage:n,richPresenceStage:t[n.id]}})));case 9:if(e.prev=9,e.t0=e.catch(2),!(e.t0 instanceof a.APIError)){e.next=15;break}return e.abrupt("return",[]);case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function I(e){for(var t,n={},r=h((void 0===e?[s.default]:e)[0].getAllApplicationActivities(i.STAGE_APPLICATION_ID));!(t=r()).done;){var a=t.value,o=T({userId:a.userId,activity:a.activity},n);null!=o&&(n[o.channelId]=o)}return n}function T(e,t){var n,r=e.userId,a=e.activity;if(!f.default.getUserAffinitiesUserIds().has(r)&&!d.default.isFriend(r))return null;var i=(0,o.unpackStageChannelParty)(a);if(!i)return null;var s,v=i.channelId,y=i.guildId,_=i.guildIsPartnered,h=i.guildIsVerified,E=i.userIsSpeaker,g=i.stageInstanceId;if(null!=(null==t?void 0:t[v])){var S;s=null!==(S=t[v])&&void 0!==S?S:{}}else{var O,I,T,C=[];_&&C.push(m.GuildFeatures.PARTNERED),h&&C.push(m.GuildFeatures.VERIFIED);var b=null!==(O=i.size)&&void 0!==O?O:[0,0],M=b[0],N=b[1];s={channelId:v,partialStageGuild:new u.default({id:y,name:null===(I=a.assets)||void 0===I?void 0:I.small_text,icon:null===(T=a.assets)||void 0===T?void 0:T.small_image,features:C}),stageInstance:{id:g,channel_id:v,guild_id:y,privacy_level:l.StageInstancePrivacyLevel.PUBLIC,topic:a.name},speakers:[],knownUsers:{},speakerCount:M,audienceCount:N-M}}var A=c.default.getUser(r);if(null!=A){var P={user:A,userNick:p.default.getName(y,v,A),isSpeaker:null!=E&&E};s.knownUsers[A.id]=P}return null!==(n=s)&&void 0!==n?n:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(24)),i=n(272),l=n(9040),u=n(722),s=_(n(11304)),d=n(10448),f=_(n(11308)),c=_(n(11309)),p=_(n(11313)),v=n(11314),y=_(n(6)),m=_(n(8073));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(){return(g=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}).apply(this,arguments)}function S(e){var t=l.NO_VISIBLE_INDEX;for(var n in e){var r=parseInt(n);e[r]&&(t=Math.max(t,r))}return t}var O=E(d.LoadingLiveStageTile,{}),I=E(d.LoadingLiveStageTile,{}),T=E(d.LoadingLiveStageTile,{}),C=E(d.LoadingLiveStageTile,{}),b=E(d.LoadingLiveStageTile,{}),M=E(d.LoadingLiveStageTile,{});function N(){return a.createElement(a.Fragment,null,O,I,T,C,b,M)}var A=E(N,{});function P(e){var t=e.items,n=e.loading,r=e.onRefresh,d=(0,s.default)(),_=d[0],h=d[1],O=t.length>0,I=function(e,t){var n=a.useRef([]),r=a.useRef(null),o=a.useState({}),i=o[0],l=o[1],u=a.useCallback((function(e){l((function(t){var r=g({},t);return e.forEach((function(e){var t=n.current.findIndex((function(t){return t.current===e.target}));r[t]=e.isIntersecting||e.boundingClientRect.top<0})),r}))}),[]);return a.useEffect((function(){if(t)l({});else if(null!=r.current){var e={root:r.current,rootMargin:"0px",threshold:.01},a=new IntersectionObserver(u,e);return n.current.forEach((function(e){null!=e.current&&a.observe(e.current)})),function(){n.current.forEach((function(e){null!=e.current&&a.unobserve(e.current)}))}}}),[e,t,u]),{rowRefs:n,containerRef:r,lastVisibleIndex:S(i)}}(t,n),T=I.rowRefs,C=I.containerRef,b=I.lastVisibleIndex;(0,l.useStageDiscoveryLoadAnalytics)(b,n);return O||n?a.createElement(i.ScrollerAuto,{className:m.default.container,ref:C},E("div",{className:m.default.headerContainer},void 0,E(o.default,{color:o.default.Colors.HEADER_PRIMARY,size:o.default.Sizes.SIZE_20,className:m.default.pageHeader},void 0,y.default.Messages.LIVE_STAGES)),E(c.default,{loading:n}),n?A:t.map((function(e,t){var n,r=_===e.id,o=null!==(n=T.current[t])&&void 0!==n?n:a.createRef();switch(T.current[t]=o,e.type){case u.DiscoveryItemTypes.USER_GUILDS:return a.createElement(v.UserGuildLiveStageTile,g({key:e.id,ref:o},e,{onSelectStage:h,isStageSelected:r}));case u.DiscoveryItemTypes.RECOMMENDED:return a.createElement(v.RecommendationLiveStageTile,g({key:e.id,ref:o},e,{onSelectStage:h,isStageSelected:r}));case u.DiscoveryItemTypes.FRIENDS_GUILDS:return a.createElement(v.FriendsGuildLiveStageTile,g({key:e.id,ref:o},e,{onSelectStage:h,isStageSelected:r}));case u.DiscoveryItemTypes.CONNECTED:return a.createElement(v.ConnectedLiveStageTile,g({key:e.id,ref:o},e,{onSelectStage:h,isStageSelected:r}));default:return null}})),!n&&E(f.default,{onRefresh:r})):E(p.default,{refresh:r})}P.displayName="StageDiscoveryList";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStores)([l.default],(function(){return l.default.getVoiceChannelId()}),[]),t=r.useState(e),n=t[0],s=t[1];return r.useEffect((function(){var t=setTimeout((function(){s(e)}),500);return function(){clearTimeout(t)}}),[e]),[n,function(e,t){if(n===t){var r=i.default.getChannel(t);if(null!=r)return(0,o.navigateToStage)(r),void(0,u.trackStageDiscoveryStageOpened)(t)}s(t),(0,o.connectOrLurkStage)(e,t),(0,u.trackStageDiscoveryStageJoined)(t)}]};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=n(1232),i=s(n(10)),l=s(n(36)),u=n(9040);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=v(n(0)),o=n(3),i=n(389),l=c(n(8258)),u=v(n(8253)),s=c(n(12)),d=n(722),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){if(!(0,o.useStateFromStores)([s.default],(function(){var e;return null===(e=s.default.getNullableCurrentUser())||void 0===e?void 0:e.isStaff()}),[]))return null;var n=function(e){switch(e){case d.StageDiscoveryRecommendationSource.FEATURED:return"Featured";case d.StageDiscoveryRecommendationSource.TRENDING:return"Trending";case d.StageDiscoveryRecommendationSource.USER_GUILDS:return"User Guilds";case d.StageDiscoveryRecommendationSource.PERSONALIZED:return"Personalized";case d.StageDiscoveryRecommendationSource.FRIENDS_GUILDS:return"Friends' Guilds";default:return"Unknown - "+e}}(e);return y(u.MenuGroup,{label:"Stage Info - Staff Only"},void 0,y(u.MenuItem,{id:"stage-source-id",label:n,disabled:!0},"stage-source-id"),null!=t?y(u.MenuItem,{id:"stage-score-id",label:t,disabled:!0},"stage-score-id"):null)}function _(e){var t=e.source,n=e.score,r=e.guildId,o=e.channelId,s=e.stageInstanceId,d=e.onSelect,c=(0,l.default)(r,r+"-"+o+"-"+s),p=m(t,n);return a.useEffect((function(){null==c&&null==p&&(0,i.closeContextMenu)()}),[c,p]),y(u.default,{navId:"live-stage-tile-context","aria-label":f.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onSelect:d,onClose:i.closeContextMenu},void 0,c,p)}m.displayName="useLiveStageDebugItems",_.displayName="LiveStageTileContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(279)),o=s(n(24)),i=n(722),l=s(n(6)),u=s(n(8067));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t,n,r,s=e.context;if(e.discoveryItemType!==i.DiscoveryItemTypes.FRIENDS_GUILDS)return null;if(null==(null==s?void 0:s.user))return null;var d=null!==(t=null==s?void 0:s.userNick)&&void 0!==t?t:null===(n=s.user)||void 0===n?void 0:n.username;return f("div",{className:u.default.container},void 0,f(a.default,{src:s.user.getAvatarURL(void 0),size:a.default.Sizes.SIZE_24,"aria-hidden":!0,className:u.default.avatar}),f(o.default,{color:o.default.Colors.HEADER_SECONDARY,size:o.default.Sizes.SIZE_14},void 0,function(e,t){return t?l.default.Messages.STAGE_DISCOVERY_LIVE_STAGE_TILE_FRIENDS_GUILDS_CONTEXT_SPEAKER.format({name:e}):l.default.Messages.STAGE_DISCOVERY_LIVE_STAGE_TILE_FRIENDS_GUILDS_CONTEXT_AUDIENCE.format({name:e})}(d,null!==(r=null==s?void 0:s.isSpeaker)&&void 0!==r&&r)))}c.displayName="LiveStageTileContextualHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(1232),i=p(n(10)),l=p(n(29)),u=p(n(1240)),s=p(n(24)),d=n(9040),f=p(n(6)),c=p(n(8068));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.isConnected,n=e.isExiting;return t?a.createElement(a.Fragment,null,y(u.default,{height:20,width:20,className:c.default.icon}),y(s.default,{color:s.default.Colors.HEADER_PRIMARY,size:s.default.Sizes.SIZE_14,className:c.default.listeningText},void 0,f.default.Messages.STAGE_DISCOVERY_LIVE_STAGE_LISTENING_INDICATOR)):y(s.default,{color:s.default.Colors.STATUS_YELLOW,size:s.default.Sizes.SIZE_14,className:c.default.connectingText},void 0,n?f.default.Messages.STAGE_DISCOVERY_LIVE_STAGE_TILE_DISCONNECTING:f.default.Messages.CONNECTING)}function _(e){var t=e.channelId,n=e.isConnected,r=e.isStageSelected,a=e.isExiting,u=e.onExit;return r?y("div",{className:c.default.container},void 0,y(m,{isConnected:n,isExiting:a}),y(l.default,{onClick:u,size:l.default.Sizes.SMALL,color:l.default.Colors.GREY,className:c.default.leaveButton},void 0,f.default.Messages.STAGE_CHANNEL_LEAVE_BUTTON),y(l.default,{onClick:function(e){e.stopPropagation();var n=i.default.getChannel(t);null!=n&&((0,o.connectAndOpen)(n),(0,d.trackStageDiscoveryStageOpened)(t))},size:l.default.Sizes.SMALL,color:l.default.Colors.GREEN},void 0,f.default.Messages.STAGE_DISCOVERY_CARD_OPEN_STAGE)):null}_.displayName="LiveStageTileControls"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(29)),o=s(n(47)),i=s(n(24)),l=s(n(6)),u=s(n(8070));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.onRefresh;return f("div",{className:u.default.container},void 0,f(o.default,{size:o.default.Sizes.SIZE_16,className:u.default.title},void 0,l.default.Messages.STAGE_DISCOVERY_FOOTER_TITLE),f(i.default,{color:i.default.Colors.HEADER_SECONDARY},void 0,l.default.Messages.STAGE_DISCOVERY_FOOTER_BODY),f(a.default,{onClick:t,className:u.default.button},void 0,l.default.Messages.STAGE_DISCOVERY_FOOTER_BUTTON))};c.displayName="StageDiscoveryFooter";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(61)),i=p(n(255)),l=p(n(47)),u=p(n(24)),s=n(11310),d=n(1),f=p(n(6)),c=p(n(8071));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=a.forwardRef((function(e,t){var r=e.loading,p=(0,s.useStageDiscoveryIntroCardStore)(),v=p[0],m=p[1];return v||r?null:a.createElement("div",{ref:t,className:c.default.container},y(o.default,{onClick:m},void 0,y(i.default,{height:16,width:16,className:c.default.icon,color:d.Colors.WHITE})),y("img",{alt:f.default.Messages.STAGE_DISCOVERY_INTRO_CARD_ALT_TEXT,src:n(11312),className:c.default.illustration}),y("div",{className:c.default.content},void 0,y(l.default,{size:l.default.Sizes.SIZE_20,color:d.Colors.WHITE,className:c.default.header},void 0,f.default.Messages.STAGE_DISCOVERY_INTRO_CARD_HEADER),y(u.default,{className:c.default.body},void 0,f.default.Messages.STAGE_DISCOVERY_INTRO_CARD_BODY_DESKTOP)))}));t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStageDiscoveryIntroCardStore=function(){return u((function(e){return[e.hasSeenStageDiscoveryIntroCard,e.markAsSeen]}),a.default)};var r=l(n(251)),a=l(n(8312)),o=l(n(28)),i=n(11311);function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)((function(e){return{hasSeenStageDiscoveryIntroCard:!0===o.default.get(i.STAGE_DISCOVERY_INTRO_CARD_KEY),markAsSeen:function(){o.default.set(i.STAGE_DISCOVERY_INTRO_CARD_KEY,!0),e({hasSeenStageDiscoveryIntroCard:!0})}}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StageDiscoveryStartStageScenes=t.STAGE_DISCOVERY_INTRO_CARD_KEY=t.STAGE_DISCOVERY_DEVELOPER_SHEET_KEY=void 0;t.STAGE_DISCOVERY_DEVELOPER_SHEET_KEY="stage-discovery-developer-view";var r;t.STAGE_DISCOVERY_INTRO_CARD_KEY="hasSeenStageDiscoveryIntroCard",t.StageDiscoveryStartStageScenes=r,function(e){e.GUILD_SELECTION="GUILD_SELECTION",e.START_STAGE="START_STAGE"}(r||(t.StageDiscoveryStartStageScenes=r={}))},function(e,t,n){e.exports=n.p+"1421ed20a1c29c887e1457a1004ea12e.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(29)),o=s(n(24)),i=s(n(6)),l=s(n(8072)),u=s(n(8767));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.refresh;return f("div",{className:l.default.container},void 0,f("img",{className:l.default.wumpus,alt:i.default.Messages.STAGE_DISCOVERY_NO_RESULTS_SUBHEADER,src:u.default}),f(o.default,{color:o.default.Colors.HEADER_PRIMARY,size:o.default.Sizes.SIZE_16,className:l.default.header},void 0,i.default.Messages.STAGE_DISCOVERY_NO_RESULTS_HEADER),f(o.default,{color:o.default.Colors.HEADER_SECONDARY,size:o.default.Sizes.SIZE_14,className:l.default.subheader},void 0,i.default.Messages.STAGE_DISCOVERY_NO_RESULTS_SUBHEADER),f(a.default,{onClick:t},void 0,i.default.Messages.STAGE_DISCOVERY_NO_RESULTS_BUTTON))}c.displayName="StageDiscoveryListNoResults"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecommendationLiveStageTile=t.FriendsGuildLiveStageTile=t.ConnectedLiveStageTile=t.UserGuildLiveStageTile=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=n(1260),i=n(260),l=p(n(81)),u=p(n(10)),s=p(n(15)),d=n(722),f=p(n(11315)),c=n(10448);function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}var y=r.forwardRef((function(e,t){var n=e.data.id,f=e.isStageSelected,p=e.onSelectStage,v=(0,a.useStateFromStores)([s.default,u.default],(function(){var e;return s.default.getGuild(null===(e=u.default.getChannel(n))||void 0===e?void 0:e.getGuildId())}),[n]),y=(0,a.useStateFromStores)([l.default],(function(){return l.default.getStageInstanceByChannel(n)}),[n]),m=(0,o.useStageParticipants)(n,i.StageChannelParticipantNamedIndex.SPEAKER),_=(0,o.useStageParticipantsCount)(n,i.StageChannelParticipantNamedIndex.AUDIENCE);return null==v||null==y?null:r.createElement(c.LiveStageTile,{ref:t,audienceCount:_,channelId:n,discoveryItemType:d.DiscoveryItemTypes.USER_GUILDS,guild:v,isStageSelected:f,onSelectStage:p,speakerCount:m.length,speakers:m,stage:y,source:d.StageDiscoveryRecommendationSource.USER_GUILDS})}));t.UserGuildLiveStageTile=y;var m=r.forwardRef((function(e,t){var n=e.isStageSelected,a=e.onSelectStage,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["isStageSelected","onSelectStage"]),i=(0,f.default)(o),l=i.guild,u=i.speakers,s=i.stage,p=i.audienceCount,v=i.channelId;return null==l||null==s?null:r.createElement(c.LiveStageTile,{ref:t,audienceCount:p,channelId:v,discoveryItemType:d.DiscoveryItemTypes.USER_GUILDS,guild:l,isStageSelected:n,onSelectStage:a,speakerCount:u.length,speakers:u,stage:s,source:d.StageDiscoveryRecommendationSource.UNSPECIFIED})}));t.ConnectedLiveStageTile=m;var _=r.forwardRef((function(e,t){var n=e.data,a=n.channelId,o=n.guild,i=n.instance,l=n.audienceCount,u=n.speakerCount,s=n.speakers,f=e.context,p=e.isStageSelected,v=e.onSelectStage;return r.createElement(c.LiveStageTile,{ref:t,audienceCount:l,channelId:a,context:f,discoveryItemType:d.DiscoveryItemTypes.FRIENDS_GUILDS,guild:o,isStageSelected:p,onSelectStage:v,speakerCount:u,speakers:s,stage:i,source:d.StageDiscoveryRecommendationSource.FRIENDS_GUILDS})}));t.FriendsGuildLiveStageTile=_;var h=r.forwardRef((function(e,t){var n=e.data,a=e.onSelectStage,o=e.isStageSelected,i=n.guild,l=n.channelId,u=n.instance,s=n.speakers,f=n.participantCount,p=n.score,v=n.sampleSpeakerMembers,y=n.source;return null==i?null:r.createElement(c.LiveStageTile,{ref:t,audienceCount:f-s.length,channelId:l,discoveryItemType:d.DiscoveryItemTypes.RECOMMENDED,guild:i,isStageSelected:o,onSelectStage:a,score:p,source:y,speakerCount:s.length,speakers:v,stage:u})}));t.RecommendationLiveStageTile=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.id,n=e.data,s=n.guild,d=n.instance,f=n.speakers,c=n.participantCount,p=(0,r.useStateFromStores)([u.default,l.default],(function(){var e;return u.default.getGuild(null===(e=l.default.getChannel(t))||void 0===e?void 0:e.getGuildId())}),[t]),v=(0,r.useStateFromStores)([i.default],(function(){return i.default.getStageInstanceByChannel(t)}),[t]),y=(0,a.useStageParticipants)(t,o.StageChannelParticipantNamedIndex.SPEAKER),m=(0,a.useStageParticipantsCount)(t),_=null!=p?p:s,h=null!=v?v:d,E=v?y:f,g=(v?m:c)-E.length;return{channelId:t,guild:_,stage:h,speakers:E,audienceCount:g}};var r=n(3),a=n(1260),o=n(260),i=s(n(81)),l=s(n(10)),u=s(n(15));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t=a.STAGE_DISCOVERY_RESULTS_TIME_UNTIL_STALE_MS);var n=r.useState(!1),o=n[0],i=n[1],l=r.useState(!1),u=l[0],s=l[1],d=r.useRef(0),f=function(){clearTimeout(d.current),s(!1),d.current=setTimeout((function(){i(!0)}),t)},c=function(){s(!0),clearTimeout(d.current)};r.useEffect((function(){return window.addEventListener("blur",f),window.addEventListener("focus",c),function(){window.removeEventListener("blur",f),window.removeEventListener("focus",c),clearTimeout(d.current)}}),[]),r.useEffect((function(){o&&u&&(i(!1),s(!1),e())}),[o,u,e])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(722);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=i((function(e){return e})),n=t.lastRefreshedAt,r=t.setLastRefreshedAt;return function(t){void 0===t&&(t=!1),(Date.now()-n>=o.STAGE_DISCOVERY_RESULTS_TIME_UNTIL_STALE_MS||t)&&(e(),r(Date.now()))}};var r,a=(r=n(251))&&r.__esModule?r:{default:r},o=n(722);var i=(0,a.default)((function(e){return{lastRefreshedAt:0,setLastRefreshedAt:function(t){return e((function(){return{lastRefreshedAt:t}}))}}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=s(n(29)),o=s(n(47)),i=s(n(24)),l=s(n(6)),u=s(n(8075));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.onLogin,r=e.onRegister;return f("div",{className:u.default.wrapper},void 0,f("div",{className:u.default.content},void 0,f("img",{alt:"",src:n(8772),className:u.default.image}),f("div",{},void 0,f(o.default,{size:o.default.Sizes.SIZE_20,className:u.default.header},void 0,l.default.Messages.GUEST_LURKER_MODE_CHAT_INPUT_HEADER),f(i.default,{className:u.default.subHeader},void 0,l.default.Messages.GUEST_LURKER_MODE_CHAT_INPUT_BODY))),f("div",{className:u.default.buttonContainer},void 0,f(a.default,{className:u.default.button,size:a.default.Sizes.MEDIUM,onClick:t,look:a.default.Looks.OUTLINED,color:a.default.Colors.WHITE},void 0,l.default.Messages.LOGIN),f(a.default,{className:u.default.button,size:a.default.Sizes.MEDIUM,onClick:r},void 0,l.default.Messages.REGISTER)))};c.displayName="GuestLurkerGuard";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=y(n(0)),o=n(3),i=p(n(8715)),l=y(n(8760)),u=p(n(13)),s=p(n(8761)),d=p(n(11320)),f=p(n(11349)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleScroll=function(e){var n=e.getScrollerState(),r=n.offsetHeight,a=n.scrollHeight,o=n.scrollTop/(a-r);t.maxScrolledPercentage=Math.min(Math.max(t.maxScrolledPercentage,o),1)},t.track=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var a=t.props.changeLog,o=a.id,i=a.date,l=_({change_log_id:(o||i)+":"+a.revision},n);r||(l=_({seconds_open:Math.round((Date.now()-t.mountedAt)/1e3),max_scrolled_percentage:100*parseInt(t.maxScrolledPercentage.toPrecision(4),10)},l)),u.default.track(e,l)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var o=r.prototype;return o.componentDidMount=function(){var e=this.props,t=e.changeLog,n=e.changeLogSource;if(null==t)return this.close();this.mountedAt=Date.now(),this.maxScrolledPercentage=0,this.joinEligibleExperiment(),this.track(c.AnalyticEvents.CHANGE_LOG_OPENED,_({},n),!0)},o.joinEligibleExperiment=function(){var e=this.props.changeLog;e.experiment_names&&s.default.trackExposureToFirstEligibleUserExperiment(e.experiment_names)},o.close=function(){i.default.hideChangeLog()},o.componentWillUnmount=function(){this.track(c.AnalyticEvents.CHANGE_LOG_CLOSED)},o.render=function(){switch(this.props.changeLog.template){case l.ChangeLogTemplate.SPECIAL:return a.createElement(d.default,_({},this.props,{onScroll:this.handleScroll,track:this.track}));default:return a.createElement(f.default,_({},this.props,{onScroll:this.handleScroll,track:this.track}))}},r}(a.PureComponent);E.displayName="ChangeLog";var g=function(){var e=(0,o.useStateFromStoresObject)([l.default],(function(){return{changeLog:l.default.changeLog,changeLogSource:l.default.changeLogSource,isOpen:l.default.isOpen()}})),t=e.changeLog,n=e.changeLogSource,r=e.isOpen;return null!=t&&r?m(E,{changeLog:t,changeLogSource:n}):null};g.displayName="ConnectedChangeLog";var S=a.memo(g);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=M(n(0)),o=C(n(9)),i=C(n(5)),l=n(57),u=C(n(8715)),s=C(n(8295)),d=n(8308),f=C(n(8760)),c=C(n(271)),p=M(n(29)),v=n(8516),y=n(85),m=C(n(24)),_=C(n(5945)),h=C(n(13)),E=C(n(10449)),g=C(n(93)),S=C(n(11348)),O=n(1),I=C(n(6)),T=C(n(8077));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=s.default.reactParserFor(E.default.getSpecialRules(T.default)),R={},L=function(e){var t,r;function s(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).headerId=(0,y.uid)(),t.state={bodyWidth:451,copied:!1},t._unsetCopiedState=new l.DelayedCall(1e3,(function(){return t.setState({copied:!1})})),t.trackLinkClick=function(e){t.props.track(O.AnalyticEvents.CHANGE_LOG_CTA_CLICKED,{cta_type:"inline_link",target:e},!1)},t.scrollerRef=a.createRef(),t.handleResize=function(){var e,n,r=null!==(e=null===(n=t._bodyNode)||void 0===n?void 0:n.offsetWidth)&&void 0!==e?e:t.state.bodyWidth;"number"!=typeof r||Number.isNaN(r)||t.setState({bodyWidth:r})},t.setSpecialBodyRef=function(e){t._bodyNode=e,t.handleResize()},t.handleScroll=function(){var e,n=t.scrollerRef.current;null!=n&&(null===(e=t.props)||void 0===e||e.onScroll(n))},t}r=e,(t=s).prototype=Object.create(r.prototype),t.prototype.constructor=t,A(t,r);var E=s.prototype;return E.componentDidMount=function(){window.addEventListener("resize",this.handleResize,!0)},E.componentWillUnmount=function(){window.removeEventListener("resize",this.handleResize,!0),this._unsetCopiedState.cancel()},E.close=function(){u.default.hideChangeLog()},E.track=function(e,t,n){this.props.track(e,t,n)},E.renderVideo=function(){var e=this,t=this.props.changeLog,r=this.state.bodyWidth,a=r*(9/16),i=t.youtube_video_id,l=t.video,u=t.image;if(i)return N(v.EmbedVideo,{className:(0,o.default)(T.default.video),allowFullScreen:!1,href:"https://youtu.be/"+i,thumbnail:{url:"https://i.ytimg.com/vi/"+i+"/maxresdefault.jpg",width:r,height:a},video:{url:"https://www.youtube.com/embed/"+i+"?vq=large&rel=0&controls=0&showinfo=0",width:r,height:a},maxWidth:r,maxHeight:a,renderVideoComponent:d.renderVideoComponent,renderImageComponent:d.renderImageComponent,renderLinkComponent:d.renderMaskedLinkComponent,onPlay:function(){e.track(O.AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED,{},!0)}});if(l){var s=l.startsWith("https://")?l:n(9041)("./"+l);return N(_.default,{src:s,poster:u,width:r,height:a,loop:!0,muted:!0,autoPlay:!0,className:T.default.video,onPlay:function(){e.track(O.AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED,{},!0)}})}if(u){var f=u.startsWith("https://")?u:n(9041)("./"+u);return N("img",{className:T.default.image,alt:"",src:f,width:r,height:a})}return null},E.render=function(){var e=this.props.changeLog;return N(S.default,{className:(0,o.default)(T.default.container),modalLabeledById:this.headerId,onClose:this.close,onScroll:this.handleScroll,scrollerRef:this.scrollerRef},void 0,N("div",{className:T.default.header,id:this.headerId,tabIndex:0},void 0,N("div",{className:T.default.headerContent},void 0,N(m.default,{size:m.default.Sizes.SIZE_32,className:T.default.headerText},void 0,I.default.Messages.CHANGELOG_STICKERS_HEADER),N(m.default,{size:m.default.Sizes.SIZE_16,className:T.default.dateText},void 0,I.default.Messages.WHATS_NEW_DATE.format({date:e.date?(0,i.default)(e.date).toDate():new Date}))),N("div",{className:T.default.headerGraphic})),a.createElement("div",{className:T.default.body,ref:this.setSpecialBodyRef},this.renderVideo(),P(e.body,!1,{changeLog:this,interpolations:R,onLinkClick:this.trackLinkClick})),N("div",{className:T.default.footer},void 0,N(m.default,{size:m.default.Sizes.SIZE_20,className:T.default.inviteCTAHeader},void 0,I.default.Messages.CHANGELOG_STICKERS_CTA_TITLE),N(m.default,{size:m.default.Sizes.SIZE_16,className:T.default.inviteCTABody},void 0,I.default.Messages.CHANGELOG_STICKERS_CTA_BODY.format()),N(c.default,{className:(0,o.default)((0,p.getButtonStyle)({size:p.default.Sizes.SMALL,color:p.default.Colors.GREEN}),T.default.ctaAnchor),href:g.default.getArticleURL(O.HelpdeskArticles.STICKERS),onClick:function(){var e,t;h.default.track(O.AnalyticEvents.CHANGE_LOG_CTA_CLICKED,{change_log_id:(null===(e=f.default.changeLog)||void 0===e?void 0:e.date)+":"+(null===(t=f.default.changeLog)||void 0===t?void 0:t.revision),cta_type:"stickers_cta"})}},void 0,I.default.Messages.CHANGELOG_STICKERS_CTA)))},s}(a.PureComponent);t.default=L,L.displayName="ChangelogSpecialTemplate"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customRules=t.baseRules=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(101)),l=p(n(8715)),u=p(n(473)),s=p(n(8295)),d=p(n(271)),f=p(n(13)),c=n(1);function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}var _=i.default.defaultRules.link,h={section:c.AnalyticsSections.SETTINGS_CHANGELOG};function E(e,t){return null==t?[]:t.split(" ").map((function(t){return e[t]}))}var g=function(e){var t=e.level,n=e.children,r=e.className,i=void 0===r?null:r,l=e.styleSheet,u=void 0===l?{}:l;return a.createElement("h"+t,{className:o.default.apply(void 0,E(u,i))},n)},S=s.default.defaultRules;t.baseRules=S;var O={link:{parse:function(e,t,n){var r,a=e[2],o=a.startsWith("https://discordapp.com/nitro")||a.startsWith("https://discord.com/nitro"),i=a.startsWith("https://discordapp.com/hypesquad")||a.startsWith("https://discord.com/hypesquad");return r=o||i?function(e){f.default.track(c.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location:h}),o?u.default.open(c.UserSettingsSections.PREMIUM):i&&u.default.open(c.UserSettingsSections.HYPESQUAD_ONLINE),n.changeLog.track(c.AnalyticEvents.CHANGE_LOG_CTA_CLICKED,{cta_type:"nitro"}),l.default.hideChangeLog(),e.preventDefault()}:function(){n&&"function"==typeof n.onLinkClick&&n.onLinkClick(a),n.changeLog.track(c.AnalyticEvents.CHANGE_LOG_CTA_CLICKED,m({},f.default.getCampaignParams(a)))},m({},_.parse(e,t,n),{callToAction:r})},react:function(e,t,n){return y(d.default,{href:i.default.sanitizeUrl(e.target),title:e.title,onClick:e.callToAction,target:"_blank",className:e.callToAction?"cta":void 0},n.key,t(e.content,n))}},lheading:function(e){return{react:function(t,n,r){return y(g,{level:t.level,className:t.className,styleSheet:e},r.key,n(t.content,r))}}},heading:{react:function(e,t,n){return y(g,{level:e.level},n.key,t(e.content,n))}},image:{react:function(e,t,r){var a=n(9041)("./"+e.target);return y("img",{alt:e.alt,src:a},r.key)}},blockQuote:{react:S.blockQuote.react},paragraph:{react:function(e,t,n){return y("p",{},n.key,t(e.content,n))}}};t.customRules=O},function(e,t,n){e.exports=n.p+"dca6464b06c48b1fab5f2e8320446b32.mp4"},function(e,t,n){e.exports=n.p+"ae046b62e28bb1ec1fbdde8185d32b9e.mp4"},function(e,t,n){e.exports=n.p+"a83f2923603bd8806103525b2c1ddd45.png"},function(e,t,n){e.exports=n.p+"05c20d7f82cdf7f46edeb54bb4c0753e.jpg"},function(e,t,n){e.exports=n.p+"7f34e6e3da7d1403bad96e20b9b3a32c.mp4"},function(e,t,n){e.exports=n.p+"7c2b742b0f9040988b4bb4e351fdedb9.mp4"},function(e,t,n){e.exports=n.p+"7f73b3e68d81916d67cc58a3deeca567.mp4"},function(e,t,n){e.exports=n.p+"abaa70ae2be9f361759c60b2ee85ff12.png"},function(e,t,n){e.exports=n.p+"5c16b0a7b65a2c2864a88ee28ce0d0eb.png"},function(e,t,n){e.exports=n.p+"69f1b8ed1ca802bad3a91ccb07f4d81e.jpg"},function(e,t,n){e.exports=n.p+"d6a1cc0cb7f729ae421d609d72839816.mp4"},function(e,t,n){e.exports=n.p+"69b70bc5e0982b11182ae6495aadd34c.png"},function(e,t,n){e.exports=n.p+"2880df085f7ca77db8e9dc270f4042d5.png"},function(e,t,n){e.exports=n.p+"3d297edce71f61b41d8f6656b3e4798d.svg"},function(e,t,n){e.exports=n.p+"25827bddb7c9639625ed5b2be4d729ec.svg"},function(e,t,n){e.exports=n.p+"2eeb95d09a8714441aae7675ea1a505f.svg"},function(e,t,n){e.exports=n.p+"0443f6aac40f937c2ebd13244809186a.svg"},function(e,t,n){e.exports=n.p+"2da087637693ad611a1ac582115eea91.svg"},function(e,t,n){e.exports=n.p+"6d28235c23cc070da7bb35f03ad49d75.png"},function(e,t,n){e.exports=n.p+"df8ac223535f4aaca900e0dfd4c06516.png"},function(e,t,n){e.exports=n.p+"7257dc66059fff2be1bc43c379edefda.png"},function(e,t,n){e.exports=n.p+"f3406f9daf47b7e260971de90b01edbb.png"},function(e,t,n){e.exports=n.p+"ef3f462cc3c68b5b86ae1c296799370f.png"},function(e,t,n){e.exports=n.p+"fc7b03021c61546fb1facf64b1178afe.png"},function(e,t,n){e.exports=n.p+"6812ba2237fb14b9fe6eb53134874f5c.png"},function(e,t,n){e.exports=n.p+"46e2829b759fbdc67b1a24ff96a415b2.jpg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=v(n(0)),o=c(n(9)),i=c(n(61)),l=c(n(255)),u=v(n(35)),s=c(n(24)),d=c(n(6)),f=c(n(8076));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(){return(y=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}).apply(this,arguments)}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=m(l.default,{width:24,height:24}),E=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n),r.prototype.render=function(){var e=this.props,t=e.selectable,n=e.className,r=e.modalLabeledById,l=e.onClose,c=e.children,p=e.onScroll,v=e.scrollerRef;return m(u.default,{onCloseRequest:l,renderModal:function(e){var _,E=e.onClose,g=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["onClose"]);return a.createElement(u.ModalRoot,y({className:f.default.modal},g,{"aria-labelledby":r}),m(u.ModalContent,{className:(0,o.default)(n,f.default.content,{selectable:t}),scrollerRef:v,onScroll:p},void 0,c),m(i.default,{className:f.default.closeButton,onClick:function(){null!=l&&l(),E()}},void 0,h),m("div",{className:f.default.updateBadge},void 0,m(s.default,{size:(_=d.default.Messages.UPDATE_BADGE_HEADER,_.length>12?s.default.Sizes.SIZE_10:_.length>10?s.default.Sizes.SIZE_12:_.length>8?s.default.Sizes.SIZE_14:s.default.Sizes.SIZE_16),className:f.default.updateBadgeText},void 0,d.default.Messages.UPDATE_BADGE_HEADER)))}})},r}(a.PureComponent);E.displayName="SpecialMarkdownModal",E.defaultProps={selectable:!1};var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(9)),i=b(n(5)),l=b(n(8715)),u=b(n(1295)),s=b(n(8295)),d=n(8308),f=b(n(271)),c=n(8516),p=b(n(55)),v=n(85),y=b(n(10450)),m=b(n(10451)),_=b(n(10066)),h=b(n(47)),E=b(n(24)),g=b(n(5945)),S=b(n(10449)),O=b(n(9216)),I=n(1),T=b(n(6)),C=b(n(8078));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=s.default.reactParserFor(S.default.getDefaultRules(C.default)),R={},L=N(_.default,{}),D=N(y.default,{}),w=N(m.default,{}),j=function(e){var t,r;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).headerId=(0,v.uid)(),t.handleScroll=function(e){var n;null===(n=t.props)||void 0===n||n.onScroll(e)},t.trackLinkClick=function(e){t.props.track(I.AnalyticEvents.CHANGE_LOG_CTA_CLICKED,{cta_type:"inline_link",target:e},!1)},t.renderHeader=function(){var e=t.props.changeLog;return N(p.default.Child,{grow:1,shrink:1},void 0,N(h.default,{tag:h.default.Tags.H2,size:h.default.Sizes.SIZE_20},void 0,T.default.Messages.WHATS_NEW),N(E.default,{size:E.default.Sizes.SIZE_12,className:C.default.date},void 0,T.default.Messages.WHATS_NEW_DATE.format({date:e.date?(0,i.default)(e.date).toDate():new Date})))},t}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,A(t,r);var s=a.prototype;return s.close=function(){l.default.hideChangeLog()},s.track=function(e,t,n){this.props.track(e,t,n)},s.renderFooter=function(){return N("div",{className:C.default.footer},void 0,N(f.default,{className:C.default.socialLink,href:(0,u.default)(I.LocalizedLinks.TWITTER),target:"blank"},void 0,L),N(f.default,{className:C.default.socialLink,href:I.SOCIAL_LINKS.FACEBOOK_URL,target:"blank"},void 0,D),N(f.default,{className:C.default.socialLink,href:I.SOCIAL_LINKS.INSTAGRAM_URL,target:"blank"},void 0,w),N(E.default,{size:E.default.Sizes.SIZE_12},void 0,T.default.Messages.FOLLOW_US_FOR_MORE_UPDATES))},s.renderVideo=function(){var e=this,t=this.props.changeLog,r=t.youtube_video_id,a=t.video,i=t.image;if(r)return N(c.EmbedVideo,{className:(0,o.default)(C.default.video),allowFullScreen:!1,href:"https://youtu.be/"+r,thumbnail:{url:"https://i.ytimg.com/vi/"+r+"/maxresdefault.jpg",width:451,height:254},video:{url:"https://www.youtube.com/embed/"+r+"?vq=large&rel=0&controls=0&showinfo=0",width:451,height:254},maxWidth:451,maxHeight:254,renderVideoComponent:d.renderVideoComponent,renderImageComponent:d.renderImageComponent,renderLinkComponent:d.renderMaskedLinkComponent,onPlay:function(){e.track(I.AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED,{},!0)}});if(a){var l=a.startsWith("https://")?a:n(9041)("./"+a);return N(g.default,{src:l,poster:i,width:451,height:254,loop:!0,muted:!0,autoPlay:!0,className:C.default.video,onPlay:function(){e.track(I.AnalyticEvents.CHANGE_LOG_VIDEO_INTERACTED,{},!0)}})}if(i){var u=i.startsWith("https://")?i:n(9041)("./"+i);return N("img",{className:C.default.image,alt:"",src:u,width:451,height:254})}return null},s.render=function(){var e=this.props.changeLog;return N(O.default,{className:C.default.container,onClose:this.close,renderHeader:this.renderHeader,renderFooter:this.renderFooter,onScroll:this.handleScroll},void 0,this.renderVideo(),P(e.body,!1,{changeLog:this,interpolations:R,onLinkClick:this.trackLinkClick}))},a}(a.PureComponent);j.displayName="ChangelogStandardTemplate";var k=j;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=De(n(0)),o=Re(n(9)),i=Re(n(23)),l=n(262),u=n(192),s=n(3),d=n(389),f=n(11351),c=Re(n(1410)),p=n(691),v=Re(n(688)),y=Re(n(10367)),m=Re(n(180)),_=Re(n(8397)),h=Re(n(9217)),E=Re(n(11352)),g=Re(n(9656)),S=n(11363),O=Re(n(11364)),I=Re(n(11365)),T=Re(n(11366)),C=n(1338),b=Re(n(182)),M=n(42),N=Re(n(11367)),A=n(1232),P=n(134),R=Re(n(10375)),L=Re(n(11377)),D=Re(n(11379)),w=Re(n(10454)),j=Re(n(11380)),k=Re(n(11381)),U=n(5687),G=Re(n(8476)),F=n(8310),B=Re(n(8451)),H=Re(n(8523)),x=Re(n(8932)),V=n(31),W=Re(n(11)),Y=De(n(1268)),z=Re(n(10)),K=n(1225),$=Re(n(298)),Z=Re(n(86)),q=Re(n(56)),X=Re(n(8770)),J=Re(n(15)),Q=Re(n(690)),ee=Re(n(256)),te=Re(n(1241)),ne=Re(n(36)),re=Re(n(107)),ae=Re(n(12)),oe=Re(n(80)),ie=Re(n(29)),le=Re(n(35)),ue=n(41),se=Re(n(8414)),de=n(48),fe=n(259),ce=Re(n(10455)),pe=Re(n(11385)),ve=Re(n(11386)),ye=Re(n(11388)),me=Re(n(11391)),_e=Re(n(11393)),he=Re(n(10457)),Ee=Re(n(11398)),ge=Re(n(11399)),Se=Re(n(11400)),Oe=Re(n(8318)),Ie=n(9229),Te=Re(n(11404)),Ce=Re(n(9039)),be=Re(n(9228)),Me=Re(n(10159)),Ne=n(1),Ae=Re(n(6)),Pe=Re(n(7391));function Re(e){return e&&e.__esModule?e:{default:e}}function Le(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Le=function(){return e},e}function De(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Le();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function we(){return(we=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}).apply(this,arguments)}function je(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t,n=z.default.getChannel(ne.default.getLastSelectedChannelId());if(null!=n&&n.getGuildId()===e&&n.type===Ne.ChannelTypes.GUILD_TEXT)t=n.id;else{var r=Z.default.getDefaultChannel(e);t=null!=r?r.id:null}return Ne.Routes.CHANNEL(e,t)}var Ge=je(ve.default,{}),Fe=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).state={topicExpanded:!1},t.handleTitleClick=function(){var e=t.props.channel;null!=e&&e.isDM()&&t.openUserProfile()},t.handleTitleParentClick=function(){var e=t.props.parentChannel;null!=e&&(0,M.transitionToGuild)(e.guild_id,e.id)},t._handleContextMenu=function(e,n){switch(n.type){case Ne.ChannelTypes.GUILD_VOICE:case Ne.ChannelTypes.GUILD_ANNOUNCEMENT:case Ne.ChannelTypes.GUILD_TEXT:t.openChannelContextMenu(e,n);break;case Ne.ChannelTypes.ANNOUNCEMENT_THREAD:case Ne.ChannelTypes.PUBLIC_THREAD:case Ne.ChannelTypes.PRIVATE_THREAD:t.openThreadContextMenu(e,n);break;case Ne.ChannelTypes.DM:t.openDMContextMenu(e,n)}},t.handleContextMenu=function(e){(0,i.default)(null!=t.props.channel,"Missing channel in Channel.handleContextMenu"),t._handleContextMenu(e,t.props.channel)},t.handleParentContextMenu=function(e){(0,i.default)(null!=t.props.parentChannel,"Missing parentChannel in Channel.handleParentContextMenu"),t._handleContextMenu(e,t.props.parentChannel)},t.renderStreamQualityLiveIndicatorToolbarItem=function(){var e=t.props.selectedParticipant;return(null==e?void 0:e.type)!==p.ParticipantTypes.STREAM?null:je(g.default,{size:se.default.Sizes.LARGE,participant:e,showQuality:!0},"live-indicator")},t.renderHeaderToolbar=function(){var e=t.props,n=e.channel,r=e.parentChannel,a=e.isLurking;(0,i.default)(null!=n,"Missing channel in Channel.renderHeaderToolbar");var o=[];if(n.isSystemDM())return o;switch(n.type){case Ne.ChannelTypes.GUILD_STAGE_VOICE:case Ne.ChannelTypes.GUILD_VOICE:return o;case Ne.ChannelTypes.DM:o.push(t.renderStreamQualityLiveIndicatorToolbarItem()),o.push(je(Te.default,{channel:n},"calls")),o.push(je(Se.default,{channel:n},"pins")),o.push(je(Ce.default,{channel:n,tooltip:Ae.default.Messages.GROUP_DM_ADD_FRIENDS},"invite"));break;case Ne.ChannelTypes.GROUP_DM:if(o.push(t.renderStreamQualityLiveIndicatorToolbarItem()),o.push(je(Te.default,{channel:n},"calls")),o.push(je(Se.default,{channel:n},"pins")),!n.isManaged()){var l=Ae.default.Messages.GROUP_DM_ADD_FRIENDS;o.push(je(Ce.default,{channel:n,tooltip:l},"invite"))}o.push(je(Ee.default,{channelId:n.id},"members"));break;case Ne.ChannelTypes.ANNOUNCEMENT_THREAD:case Ne.ChannelTypes.PRIVATE_THREAD:case Ne.ChannelTypes.PUBLIC_THREAD:null!=r&&o.push(je(D.default,{channel:r},"browser")),o.push(je(w.default,{channel:n},"notifications")),o.push(je(Se.default,{channel:n},"pins")),n.isArchivedThread()||o.push(je(Ee.default,{channelId:n.id},"members")),o.push(je(j.default,{channel:n},"threads-overflow"));break;case Ne.ChannelTypes.GUILD_ANNOUNCEMENT:case Ne.ChannelTypes.GUILD_TEXT:o.push(je(D.default,{channel:n},"browser")),a||o.push(je(ge.default,{channel:n},"mute")),o.push(je(Se.default,{channel:n},"pins")),o.push(je(Ee.default,{channelId:n.id},"members"));break;case Ne.ChannelTypes.GUILD_DIRECTORY:o.push(je(Ee.default,{channelId:n.id},"members"))}return o},t.renderFollowButton=function(){var e=t.props,n=e.showFollowButton,r=e.channel;return n?je(ie.default,{size:ie.default.Sizes.MIN,color:ie.default.Colors.PRIMARY,className:Pe.default.followButton,onClick:function(){return(0,ue.openModal)((function(e){return a.createElement(be.default,we({channel:r},e))}))}},void 0,Ae.default.Messages.FOLLOW):null},t.renderHeaderBar=function(){var e=t.props,n=e.channel,r=e.channelName,a=e.parentChannel,l=e.guild,u=e.guildId,s=e.isGuest,d=e.hasCall,f=e.hasVideo,c=e.isMobile,p=e.inCall;return(0,i.default)(null!=n,"Missing channel in Channel.renderHeaderBar"),(0,i.default)(null!=r,"Should not be null if channel is not null."),je(Oe.default,{guildId:u,channelId:n.id,hideSearch:n.isDirectory(),toolbar:t.renderHeaderToolbar(),className:(0,o.default)(Pe.default.title,f&&p?(0,fe.getThemeClass)(Ne.ThemeTypes.DARK):null),isGuest:s,transparent:d,"aria-label":Ae.default.Messages.CHANNEL_HEADER_BAR_A11Y_LABEL},"header-"+n.id,(0,Ie.renderTitle)({channel:n,channelName:r,parentChannel:a,guild:l,hasVideo:f,isMobile:c,handleContextMenu:t.handleContextMenu,handleParentContextMenu:t.handleParentContextMenu,handleClick:t.handleTitleClick,handleParentClick:t.handleTitleParentClick,renderFollowButton:t.renderFollowButton}),(0,Ie.renderTopic)(n,l))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ke(t,n);var s=r.prototype;return s.componentDidMount=function(){(0,U.trackAppUIViewed)("guild_channel")},s.componentDidUpdate=function(e){this.props.channel&&e.channel&&this.props.channel.id!==e.channel.id&&this.state.topicExpanded&&this.setState({topicExpanded:!1})},s.openUserProfile=function(){var e=this.props.channel;(0,i.default)(null!=e,"Missing channel in Channel.openUserProfile"),(0,F.openUserProfileModal)({userId:e.getRecipientId(),guildId:e.guild_id||void 0})},s.openChannelContextMenu=function(e,t){var n=this.props.guild;(0,i.default)(null!=t,"Missing channel in Channel.openChannelContextMenu"),(0,i.default)(null!=n,"Missing guild in Channel.openChannelContextMenu"),(0,d.openContextMenu)(e,(function(e){return a.createElement(h.default,we({},e,{channel:t,guild:n}))}))},s.openThreadContextMenu=function(e,t){(0,i.default)(null!=t,"Missing channel in Channel.openChannelContextMenu"),(0,d.openContextMenu)(e,(function(e){return a.createElement(_.default,we({},e,{channel:t}))}))},s.openDMContextMenu=function(e,t){(0,i.default)(null!=t,"Missing channel in Channel.openDMContextMenu");var n=ae.default.getUser(t.getRecipientId());(0,i.default)(null!=n,"Missing user in Channel.openDMContextMenu"),(0,d.openContextMenu)(e,(function(e){return a.createElement(G.default,we({},e,{user:n,channelSelected:!0,channel:t}))}))},s.renderCall=function(){var e=this.props,t=e.channel,n=e.hasCall;if((0,i.default)(null!=t,"Missing channel in Channel.renderCall"),!n)return null;switch(t.type){case Ne.ChannelTypes.GUILD_STAGE_VOICE:return je(R.default,{channel:t},t.id);case Ne.ChannelTypes.GUILD_VOICE:case Ne.ChannelTypes.DM:case Ne.ChannelTypes.GROUP_DM:return je(y.default,{channel:t,renderExternalHeader:this.renderHeaderBar,appContext:Ne.AppContext.APP},"call-"+t.id);default:return null}},s.renderChat=function(){var e=this.props,t=e.channel,n=e.nsfwAgree,r=e.guild,a=e.nsfwAllowed;return(0,i.default)(null!=t,"Missing channel in Channel.renderChat"),t.isVocal()?null:t.isDirectory()?((0,i.default)(null!=r,"directory channels must exist within a guild"),je(E.default,{channel:t,guild:r})):!t.isNSFW()||a&&n?je(ce.default,{channel:t,guild:r,renderThreadNotice:t.isThread()},null!=r?r.id:"home"):je(Me.default,{guild:r})},s.renderSidebar=function(){var e=this.props,t=e.searchId,n=e.channel,r=e.parentChannel,a=e.guild,o=e.section;if((0,i.default)(null!=n,"Missing channel in Channel.renderSidebar"),o===Ne.ChannelSections.MEMBERS)switch(n.type){case Ne.ChannelTypes.GROUP_DM:return je(me.default,{channel:n},"private-channel-recipients-"+n.id);case Ne.ChannelTypes.GUILD_DIRECTORY:case Ne.ChannelTypes.GUILD_ANNOUNCEMENT:case Ne.ChannelTypes.GUILD_TEXT:return je(pe.default,{channel:n},"channel-members-"+n.id);case Ne.ChannelTypes.ANNOUNCEMENT_THREAD:if(null!=r)return je(pe.default,{channel:r},"channel-members-"+r.id);break;case Ne.ChannelTypes.PUBLIC_THREAD:case Ne.ChannelTypes.PRIVATE_THREAD:if(!n.isArchivedThread()&&null!=a)return je(_e.default,{channel:n,guild:a},"channel-members-"+n.id)}else if(o===Ne.ChannelSections.SEARCH&&null!=t)return je(N.default,{searchId:t});return null},s.renderChannelModal=function(){var e=this.props,t=e.guildId,n=e.showWelcomeModal,r=e.isLurking,o=e.showRealNameModal;if(null==t)return null;if(o){var i=function(){return O.default.viewPrompt(S.GuildPrompts.REAL_NAME_PROMPT,t)};return je(le.default,{onCloseRequest:i,renderModal:function(e){return a.createElement(T.default,we({},e,{guildId:t,onClose:i}))}})}return n?je(le.default,{renderModal:function(e){return a.createElement(x.default,we({},e,{guildId:t,onClose:function(){return B.default.welcomeScreenViewed(t,r)}}))}}):null},s.renderThreadSidebar=function(){var e,t=this.props,n=t.channel,r=t.section,a=t.threadSidebarState,o=t.nsfwAgree,i=t.nsfwAllowed;if(r!==Ne.ChannelSections.THREAD||null==a)return null;if((null==n?void 0:n.isNSFW())&&(!i||!o))return null;switch(a.type){case Y.ThreadSidebarType.CREATE:e=je(L.default,{parentChannelId:a.parentChannelId,parentMessageId:a.parentMessageId});break;case Y.ThreadSidebarType.VIEW:e=je(k.default,{channelId:a.channelId});break;default:(0,de.assertNever)(a)}return je("div",{className:Pe.default.threadSidebar},void 0,e)},s.render=function(){var e,t,n=this.props,r=n.channel,s=n.channelName,d=n.hasCall,f=n.inCall,c=n.voiceChannel,p=n.isUnavailable,v=n.hasModalOpen,y=n.layout,m=n.section,_=n.hideDirectoryChannels;if(p)return Ge;if(null==r)return je(ye.default,{channelId:this.props.channelId});if((null==r?void 0:r.isVocal())&&!f){var h=r.getGuildId(),E=null==c?void 0:c.getGuildId();return(0,i.default)(null!=h,"Guild voice channel without guild id."),(null==c?void 0:c.isVocal())&&E===h&&r.id!==(null==c?void 0:c.id)?je(u.Redirect,{to:Ne.Routes.CHANNEL(h,c.id)}):je(u.Redirect,{to:Ue(h)})}if((null==r?void 0:r.isDirectory())&&_){var g=r.getGuildId();return(0,i.default)(null!=g,"Directory channel without guild id."),je(u.Redirect,{to:Ue(g)})}return a.createElement(a.Fragment,null,je(l.Helmet,{title:s}),je("div",{className:(0,o.default)(Pe.default.chat,(e={},e[Pe.default.threadSidebarOpen]=m===Ne.ChannelSections.THREAD,e))},void 0,je(he.default,{className:Pe.default.uploadArea,channel:r,draftType:K.DraftType.ChannelMessage}),d?null:this.renderHeaderBar(),this.renderCall(),je("div",{className:(0,o.default)(Pe.default.content,(t={},t[Pe.default.noChat]=y===Ne.ChannelLayouts.NO_CHAT,t))},void 0,this.renderChat(),this.renderSidebar()),v?null:this.renderChannelModal()),this.renderThreadSidebar())},r}(a.PureComponent);Fe.displayName="Channel";var Be=a.memo((function(){var e=a.useState(null),t=e[0],n=e[1],r=(0,s.useStateFromStores)([ne.default],(function(){return ne.default.getChannelId()})),o=(0,s.useStateFromStores)([ne.default],(function(){return ne.default.getVoiceChannelId()})),i=(0,s.useStateFromStores)([re.default],(function(){return re.default.getGuildId()})),l=(0,s.useStateFromStores)([v.default],(function(){return null!=r&&v.default.getParticipants(r).length>0}),[r]),d=(0,s.useStateFromStores)([z.default],(function(){return z.default.getChannel(r)}),[r]),p=(0,s.useStateFromStores)([z.default],(function(){return z.default.getChannel(o)}),[o]),y=null==d?void 0:d.parent_id,_=(0,s.useStateFromStores)([z.default],(function(){return z.default.getChannel(y)}),[y]),h=(0,s.useStateFromStores)([J.default],(function(){return J.default.getGuild(i)}),[i]),E=(0,u.useLocation)().welcomeModalChannelId,g=(0,s.useStateFromStores)([b.default],(function(){return null!=i&&b.default.isLurking(i)}),[i]),O=(0,s.useStateFromStores)([H.default],(function(){return H.default.hasSeen(i,g)}),[g,i]),T=(0,s.useStateFromStores)([v.default],(function(){return null!=r?v.default.getLayout(r):Ne.ChannelLayouts.NORMAL}),[r]),N=(0,s.useStateFromStores)([v.default],(function(){return null!=d?v.default.getSelectedParticipant(d.id):null})),R=(0,s.useStateFromStores)([I.default],(function(){return(null==h?void 0:h.hasFeature(Ne.GuildFeatures.HUB))?I.default.hasViewedPrompt(S.GuildPrompts.REAL_NAME_PROMPT,h.id):null}),[h]),L=(0,s.useStateFromStores)([ae.default],(function(){return ae.default.getNullableCurrentUser()})),D=(0,s.useStateFromStores)([q.default],(function(){return null!=(null==h?void 0:h.id)&&null!=L?q.default.getMember(null==h?void 0:h.id,L.id):null})),w=!1===R&&null!=D&&null==D.nick,j=E===r&&null!=d&&d.getGuildId()===(null==h?void 0:h.id)&&(0,V.isGuildTextChannelType)(d.type)&&(null==h?void 0:h.hasFeature(Ne.GuildFeatures.WELCOME_SCREEN_ENABLED))&&(null==h?void 0:h.hasFeature(Ne.GuildFeatures.COMMUNITY)),k=c.default.useExperiment({})[0].allowCustomHubUI,U=(0,s.useStateFromStoresObject)([Y.default],(function(){return{section:Y.default.getSection(r),threadSidebarState:Y.default.getThreadSidebarState(r)}})),G=U.section,F=U.threadSidebarState,B=(0,m.default)(d),x=null!=d&&o===d.id,K=null!=d&&d.isGuildStageVoice();return(0,f.useDMTrialExperimentTrigger)(d),a.useEffect((function(){var e,t=(0,M.getHistory)();if((null==t||null===(e=t.location)||void 0===e?void 0:e.state)===P.STAGE_INVITE_STATE_KEY){var r,a=((0,C.tryParseChannelPath)(null==t||null===(r=t.location)||void 0===r?void 0:r.pathname)||{}).channelId;null!=a&&n(a)}}),[]),a.useEffect((function(){t&&null!=d&&K&&d.id===t&&!x&&((0,A.connectAndOpen)(d),n(null))}),[t,K]),a.createElement(Fe,we({guildId:i,channelId:r,channel:d,channelName:B,parentChannel:_,voiceChannel:p,layout:T,isLurking:g,hasModalOpen:(0,s.useStateFromStores)([Q.default],(function(){return Q.default.hasModalOpen()})),section:G,threadSidebarState:F,guild:h,searchId:(0,s.useStateFromStores)([te.default],(function(){return te.default.getCurrentSearchId()})),hasCall:l,nsfwAgree:(0,s.useStateFromStores)([X.default],(function(){return X.default.didAgree(i)})),isMobile:(0,s.useStateFromStores)([ee.default],(function(){return(null==d?void 0:d.type)===Ne.ChannelTypes.DM&&ee.default.isMobileOnline(d.getRecipientId())}),[d]),isGuest:(0,s.useStateFromStores)([W.default],(function(){return W.default.isGuest()})),isUnavailable:(0,s.useStateFromStores)([$.default],(function(){return null!=i&&$.default.isUnavailable(i)}),[i]),showRealNameModal:w,showWelcomeModal:!O&&j,showFollowButton:(null==d?void 0:d.type)===Ne.ChannelTypes.GUILD_ANNOUNCEMENT&&(null==h?void 0:h.hasFeature(Ne.GuildFeatures.NEWS))||!1},(0,s.useStateFromStoresObject)([oe.default],(function(){return{hasVideo:null!=d&&oe.default.hasVideo(d.id)}}),[d]),{inCall:x,selectedParticipant:N,nsfwAllowed:!0===(null==L?void 0:L.nsfwAllowed),hideDirectoryChannels:!k}))}));t.default=Be},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDMTrialExperimentTrigger=function(e){var t,n=(0,a.useStateFromStores)([l.default],(function(){return l.default.getId()})),o=null==e?void 0:e.id,d=null!=e&&e.type===s.ChannelTypes.DM&&!e.isSystemDM(),f=null==e||null===(t=e.recipients)||void 0===t?void 0:t.find((function(e){return e!==n}));r.useEffect((function(){if(null!=o&&d){p.trackExposure({guildId:o});var e=i.ExperimentStore.getGuildExperimentDescriptor(c,o);null!=e&&u.default.track(s.AnalyticEvents.EXPERIMENT_DM_TRIGGERED,{name:c,revision:e.revision,bucket:e.bucket,other_user_id:f,channel_id:o,channel_type:s.ChannelTypes.DM})}}),[o,d,f])};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=n(50),i=n(1148),l=d(n(11)),u=d(n(13)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}var c="2021-06_dm_experiment_test",p=(0,o.createExperiment)({kind:"guild",id:c,label:"DM experiment A/A",defaultConfig:{doNothing:!1},treatments:[{id:1,label:"This treatment does nothing, it's just for bucketing",config:{doNothing:!0}}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=g(n(0)),o=n(3),i=h(n(151)),l=n(41),u=g(n(9022)),s=h(n(10386)),d=h(n(10387)),f=n(9953),c=h(n(10385)),p=h(n(11353)),v=h(n(11356)),y=h(n(11361)),m=n(1),_=h(n(7404));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var I=function(e){var t=e.channel,n=e.guild,r=(0,o.useStateFromStores)([d.default],(function(){return d.default.getDirectoryEntries(t.id)})),h=a.useMemo((function(){return null!=r?(0,f.orderGuildEntries)(Object.values(r)):null}),[r]),E=(0,o.useStateFromStoresObject)([s.default],(function(){var e=s.default.getSearchState(t.id),n=e.mostRecentQuery;return{mostRecentQuery:n,searchFetching:e.fetching,searchResults:s.default.getSearchResults(t.id,n)}})),g=E.mostRecentQuery,I=E.searchFetching,T=E.searchResults,C=a.useState(g),b=C[0],M=C[1],N=""!==g;a.useEffect((function(){u.fetchDirectoryEntries(t.id),M(g)}),[t.id]);var A=function(){(0,l.openModal)((function(e){return a.createElement(c.default,O({},e,{directoryGuildName:n.name,directoryGuildId:n.id,directoryChannelId:t.id}))}))},P=function(e){0!==b.trim().length&&e.charCode===m.KeyboardKeys.ENTER&&u.searchDirectoryEntries(t.id,b)},R=function(){M(""),u.clearDirectorySearch(t.id)};return N?S(y.default,{searchQuery:b,setSearchQuery:M,mostRecentQuery:g,handleSearchKeyPress:P,handleClearSearch:R,handleCreateOrAddGuild:A,searchResults:T,searchFetching:I}):null==h?S("div",{className:_.default.pageContainer},void 0,S(i.default,{className:_.default.spinner})):0===(null==h?void 0:h.length)?S("div",{className:_.default.pageContainer},void 0,S(p.default,{guild:n,onAddGuild:A})):S(v.default,{searchQuery:b,setSearchQuery:M,handleSearchKeyPress:P,handleClearSearch:R,handleCreateOrAddGuild:A,directoryEntries:h})};I.displayName="GuildDirectory";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(8283)),i=n(9218),l=n(41),u=p(n(47)),s=p(n(24)),d=n(1),f=p(n(6)),c=p(n(8079));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}var _=function(e){var t=e.guild,r=e.onAddGuild,p=a.useCallback((function(){(0,l.openModal)((function(e){return a.createElement(o.default,m({},e,{guild:t,source:d.InstantInviteSources.HUB_DIRECTORY,analyticsLocation:{section:d.AnalyticsSections.HUB_WELCOME_CTA}}))}))}),[t]);return y("div",{className:c.default.emptyWrapper},void 0,y("img",{className:c.default.emptyImage,alt:"",src:n(11354)}),y(u.default,{className:c.default.emptyTitle,size:u.default.Sizes.SIZE_24},void 0,f.default.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_TITLE.format({guildName:t.name})),y(s.default,{size:s.default.Sizes.SIZE_16,className:c.default.emptySubtitle},void 0,f.default.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_SUBTITLE),y(i.WelcomeMessageCTA,{className:c.default.emptyCTA,iconUrl:n(11355),header:f.default.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_ADD_SERVER,completed:!1,onClick:r}),y(i.WelcomeMessageCTA,{className:c.default.emptyCTA,iconUrl:n(9219),header:f.default.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_INVITE,completed:!1,onClick:p}))};_.displayName="DirectoryEmptyState";var h=_;t.default=h},function(e,t,n){e.exports=n.p+"564f89ce267784e7065850b19b8c1f82.svg"},function(e,t,n){e.exports=n.p+"97a01639f524362a4501c5371088575f.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;y(n(0));var r,a=p(n(10072)),o=p(n(47)),i=p(n(24)),l=n(272),u=y(n(10452)),s=p(n(6)),d=p(n(7404)),f=p(n(8082)),c=p(n(11360));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.directoryEntries,n=e.handleCreateOrAddGuild,r=e.searchQuery,p=e.setSearchQuery,v=e.handleClearSearch,y=e.handleSearchKeyPress;return m("div",{className:d.default.pageContainer},void 0,m(l.ScrollerAuto,{className:d.default.scroller},void 0,m("div",{className:f.default.header},void 0,m("img",{alt:"",className:f.default.headerImage,src:c.default}),m("div",{className:f.default.headerContentWrapper},void 0,m("div",{className:f.default.headerContent},void 0,m(o.default,{size:o.default.Sizes.SIZE_24,className:f.default.searchTitle},void 0,s.default.Messages.HUB_DIRECTORY_SEARCH_TITLE),m(i.default,{size:i.default.Sizes.SIZE_16,className:f.default.searchSubtitle},void 0,s.default.Messages.HUB_DIRECTORY_SEARCH_SUBTITLE),m(a.default,{searchTerm:r,className:f.default.searchBox,inputClassName:f.default.searchBoxInput,closeIconClassName:f.default.closeIcon,searchIconClassName:f.default.searchIcon,label:s.default.Messages.DIRECTORY_SEARCH_PLACEHOLDER,placeholder:s.default.Messages.DIRECTORY_SEARCH_PLACEHOLDER,onChange:p,onClear:v,onKeyPress:y,cta:null!=r&&r.length>0?s.default.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})))),m("div",{className:d.default.cardsContainer},void 0,t.map((function(e){return m(u.default,{entry:e},e.guildId)})),m(u.AddEntryCard,{onClick:n}))))};_.displayName="GuildDirectoryLanding";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=S(n(0)),o=n(3),i=n(389),l=E(n(8258)),u=S(n(8253)),s=n(8256),d=E(n(15)),f=E(n(40)),c=E(n(466)),p=n(41),v=E(n(24)),y=S(n(9022)),m=E(n(11358)),_=n(1),h=E(n(6));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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}).apply(this,arguments)}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){var t=e.entry,n=e.onSelect,r=e.closePopout,E=(0,o.useStateFromStores)([d.default],(function(){return d.default.getGuild(t.guildId)})),g=(0,o.useStateFromStores)([f.default],(function(){return null!=E&&f.default.can(_.Permissions.ADMINISTRATOR,E)})),S=(0,l.default)(t.guildId,void 0,void 0,r);a.useEffect((function(){g||null!=S||(0,i.closeContextMenu)()}));var T=function(){y.removeDirectoryGuildEntry(t.channelId,t.guildId)};return I(u.default,{navId:"guild-entry-context",onClose:i.closeContextMenu,"aria-label":h.default.Messages.GUILD_ACTIONS_MENU_LABEL,onSelect:n},void 0,I(u.MenuGroup,{},void 0,g&&a.createElement(a.Fragment,null,I(u.MenuItem,{id:"update-entry",label:h.default.Messages.HUB_ENTRY_UPDATE,action:function(){null!=E&&(0,p.openModal)((function(e){return a.createElement(m.default,O({},e,{guild:E,entry:t}))})),(0,i.closeContextMenu)(),null==r||r()}}),I(u.MenuItem,{id:"remove-from-hub",label:h.default.Messages.HUB_ENTRY_REMOVE,action:function(){null!=E&&(0,p.openModal)((function(e){return a.createElement(c.default,O({header:h.default.Messages.HUB_ENTRY_REMOVE,confirmText:h.default.Messages.REMOVE,cancelText:h.default.Messages.CANCEL,onConfirm:T},e),I(v.default,{size:v.default.Sizes.SIZE_16},void 0,h.default.Messages.HUB_ENTRY_REMOVE_BODY.format({guildName:E.name})))}))},color:s.MenuItemColor.DANGER}))),I(u.MenuGroup,{},void 0,S))}T.displayName="GuildDirectoryEntryContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(29)),i=y(n(55)),l=y(n(8272)),u=n(131),s=n(35),d=y(n(47)),f=y(n(24)),c=n(9022),p=y(n(6)),v=y(n(7361));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function E(e){var t=e.transitionState,n=e.onClose,r=e.entry,y=e.guild,m=a.useState(""),E=m[0],g=m[1],S=a.useState(!1),O=S[0],I=S[1],T=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(E===r.description){e.next=5;break}return I(!0),e.next=4,(0,c.updateDirectoryEntry)(r.channelId,r.guildId,E);case 4:I(!1);case 5:n();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){h(o,r,a,i,l,"next",e)}function l(e){h(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return _(s.ModalRoot,{transitionState:t,"aria-label":p.default.Messages.PAYMENT_SOURCES_ADD},void 0,_(s.ModalHeader,{direction:i.default.Direction.VERTICAL,className:v.default.header,separator:!1},void 0,_(d.default,{className:v.default.title,size:d.default.Sizes.SIZE_24},void 0,p.default.Messages.HUB_ENTRY_UPDATE_DESCRIPTION_TITLE.format({guildName:y.name})),_(f.default,{className:v.default.subtitle,color:f.default.Colors.HEADER_SECONDARY,size:f.default.Sizes.SIZE_16},void 0,p.default.Messages.HUB_ADD_GUILD_DESCRIPTION_HELP),n&&_(s.ModalCloseButton,{className:v.default.closeButton,onClick:n})),_(s.ModalContent,{className:v.default.createGuild,paddingFix:!1},void 0,_(u.FormItem,{title:p.default.Messages.HUB_ADD_GUILD_DESCRIPTION_TITLE},void 0,_(l.default,{value:E,maxLength:200,placeholder:p.default.Messages.HUB_ADD_GUILD_DESCRIPTION_PLACEHOLDER,onChange:g}))),_(s.ModalFooter,{justify:i.default.Justify.BETWEEN},void 0,_(o.default,{color:o.default.Colors.BRAND,onClick:T,submitting:O},void 0,p.default.Messages.SAVE)))}E.displayName="UpdateEntryDescriptionModal"},function(e,t,n){e.exports=n.p+"eb9842c47d195485bf4a9da19fe4d89a.svg"},function(e,t,n){e.exports=n.p+"d5855245c19ceeab8d982420cc80746a.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=_(n(271)),o=_(n(61)),i=_(n(10072)),l=_(n(151)),u=_(n(8354)),s=_(n(47)),d=_(n(24)),f=n(272),c=_(n(10452)),p=_(n(6)),v=_(n(7404)),y=_(n(8083)),m=_(n(11362));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var g=function(e){var t,n=e.searchQuery,r=e.setSearchQuery,_=e.mostRecentQuery,h=e.handleClearSearch,g=e.handleSearchKeyPress,S=e.handleCreateOrAddGuild,O=e.searchResults;return t=e.searchFetching?E("div",{className:v.default.pageContainer},void 0,E(l.default,{className:v.default.spinner})):0===O.length?E("div",{className:y.default.emptySearchWrapper},void 0,E("img",{className:y.default.emptySearchImage,alt:"",src:m.default}),E(s.default,{size:s.default.Sizes.SIZE_24,color:d.default.Colors.HEADER_PRIMARY,className:y.default.emptySearchTitle},void 0,p.default.Messages.DIRECTORY_SEARCH_NO_RESULTS_TITLE),E(d.default,{size:d.default.Sizes.SIZE_16,color:d.default.Colors.HEADER_SECONDARY,className:y.default.emptySearchSubtitle},void 0,p.default.Messages.DIRECTORY_SEARCH_NO_RESULTS_SUBTITLE.format({addServerHook:function(e,t){return E(a.default,{onClick:S},t,e)}}))):E("div",{className:v.default.cardsContainer},void 0,O.map((function(e){return E(c.default,{entry:e},e.guildId)}))),E("div",{className:v.default.pageContainer},void 0,E(f.ScrollerAuto,{className:v.default.scroller},void 0,E("div",{className:y.default.searchHeader},void 0,E("div",{className:y.default.headerTitleWrapper},void 0,E(o.default,{onClick:h,className:y.default.arrow},void 0,E(u.default,{direction:u.default.Directions.LEFT})),E(s.default,{size:s.default.Sizes.SIZE_24,className:y.default.searchPageTitle},void 0,p.default.Messages.DIRECTORY_SEARCH_RESULTS_HEADER.format({numResults:O.length,query:_}))),E(i.default,{searchTerm:n,className:y.default.searchPageBox,inputClassName:y.default.searchPageInput,label:p.default.Messages.DIRECTORY_SEARCH_PLACEHOLDER,placeholder:p.default.Messages.DIRECTORY_SEARCH_PLACEHOLDER,onChange:r,onClear:h,onKeyPress:g,cta:null!=n&&n.length>0?p.default.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})),t))};g.displayName="GuildDirectorySearchResults";var S=g;t.default=S},function(e,t,n){e.exports=n.p+"0c0f8ab5cbb8cfa21ffd253e45ab8654.svg"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.GuildPrompts=void 0;var a=(0,((r=n(133))&&r.__esModule?r:{default:r}).default)({REAL_NAME_PROMPT:null});t.GuildPrompts=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.viewPrompt=i,t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);function i(e,t){a.default.wait((function(){a.default.dispatch({type:o.ActionTypes.GUILD_PROMPT_VIEWED,prompt:e,guildId:t})}))}var l={viewPrompt:i};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={};var u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var a=r.prototype;return a.initialize=function(e){for(var t in e){var n=e[t];l[t]=new Set(n)}},a.hasViewedPrompt=function(e,t){var n=l[t];return!!n&&!!n.has(e)},a.getState=function(){return l},r}(r.default.PersistedStore);u.persistKey="GuildPromptsStore";var s=new u(a.default,{OVERLAY_INITIALIZE:function(e){var t=e.viewedPrompts;for(var n in t){var r=t[n];l[n]=new Set(r)}},GUILD_PROMPT_VIEWED:function(e){var t=e.prompt,n=e.guildId,r=l[n];return r?!r.has(t)&&(r.add(t),!0):(l[n]=new Set,l[n].add(t),!0)},GUILD_DELETE:function(e){var t=e.guild;return null!=l[t.id]&&!t.unavailable&&(delete l[t.id],!0)}});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=E(n(14)),l=n(275),u=E(n(15)),s=E(n(29)),d=E(n(55)),f=E(n(153)),c=n(131),p=n(35),v=E(n(47)),y=E(n(24)),m=n(1),_=E(n(6)),h=E(n(8084));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function I(e){var t=e.guildId,n=(0,o.useStateFromStores)([u.default],(function(){return u.default.getGuild(t)})),r=a.useState(null),E=r[0],g=r[1],I=a.useState(""),T=I[0],C=I[1],b=function(){var t,n=(t=regeneratorRuntime.mark((function t(n){var r,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.onClose,a=e.guildId,n.preventDefault(),g(null),o={nick:T},t.prev=4,t.next=7,i.default.patch({url:m.Endpoints.SET_GUILD_MEMBER(a),body:o});case 7:r&&r(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),g(new l.APIError(t.t0));case 13:case"end":return t.stop()}}),t,null,[[4,10]])})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){O(o,r,a,i,l,"next",e)}function l(e){O(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),M=e.transitionState;return S(p.ModalRoot,{className:h.default.modalRoot,transitionState:M,"aria-label":_.default.Messages.HUB_REAL_NAME_MODAL_HEADER.format({guildName:null==n?void 0:n.name})},void 0,S(p.ModalHeader,{separator:!1,className:h.default.formHeaderContainer,direction:d.default.Direction.VERTICAL},void 0,S("div",{className:h.default.formImage}),S(v.default,{size:v.default.Sizes.SIZE_24,className:h.default.formHeader},void 0,_.default.Messages.HUB_REAL_NAME_MODAL_HEADER.format({guildName:null==n?void 0:n.name})),S(y.default,{color:y.default.Colors.HEADER_SECONDARY,size:y.default.Sizes.SIZE_14,className:h.default.formSubHeader},void 0,_.default.Messages.HUB_REAL_NAME_MODAL_SUBHEADER)),S("form",{className:h.default.formContent,onSubmit:b},void 0,S(p.ModalContent,{},void 0,S(c.FormItem,{title:_.default.Messages.HUB_REAL_NAME_MODAL_FORM_TITLE},void 0,S(f.default,{placeholder:_.default.Messages.HUB_REAL_NAME_MODAL_FORM_PLACEHOLDER,onChange:function(e){C(e)},error:null==E?void 0:E.getFirstFieldErrorMessage("name"),value:T}))),S(p.ModalFooter,{className:h.default.formFooter,direction:d.default.Direction.VERTICAL},void 0,S(s.default,{type:"submit",size:s.default.Sizes.LARGE,color:s.default.Colors.BRAND},void 0,_.default.Messages.HUB_REAL_NAME_CTA))))}I.displayName="HubRealNameModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;var r,a=C(n(0)),o=I(n(9)),i=I(n(8)),l=n(3),u=I(n(1211)),s=C(n(8699)),d=I(n(106)),f=I(n(1241)),c=I(n(36)),p=I(n(39)),v=I(n(11368)),y=I(n(468)),m=n(121),_=I(n(11369)),h=I(n(11372)),E=I(n(11373)),g=n(1),S=I(n(6)),O=I(n(8090));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,A(e,t)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).autoAnalytics=function(e){if(void 0===e&&(e=null),null!=t.props.searchAnalyticsId){var n=0,r=0,a=0,o=0;t.props.searchResults&&(0,i.default)(t.props.searchResults).flatten().filter((function(e){return e.isSearchHit})).forEach((function(e){e.content&&(n++,/https?:\/\/[^\s]+/.test(e.content)&&o++),e.embeds&&e.embeds.length&&a++,e.attachments&&e.attachments.length&&r++})),d.default.trackWithMetadata(g.AnalyticEvents.SEARCH_RESULT_VIEWED,{search_type:t.props.searchType,search_id:t.props.searchAnalyticsId,prev_search_id:e!==t.props.searchAnalyticsId?e:null,is_error:t.props.searchHasError,limit:t.props.searchLimit,offset:t.props.searchOffset,page:Math.floor(t.props.searchOffset/t.props.searchLimit)+1,total_results:t.props.searchTotalResults,page_results:t.props.searchResults?t.props.searchResults.length:null,is_indexing:t.props.searchIsIndexing,page_num_messages:n,page_num_links:o,page_num_embeds:a,page_num_attach:r})}},t}N(t,e);var n=t.prototype;return n.componentDidMount=function(){this.autoAnalytics()},n.componentDidUpdate=function(e){this.props.searchAnalyticsId===e.searchAnalyticsId&&this.props.searchOffset===e.searchOffset||this.autoAnalytics(e.searchAnalyticsId)},n.render=function(){return null},t}(a.Component);P.displayName="SearchResultsViewedAutoAnalytics";var R=function(e){var t=e.children;return M("div",{className:O.default.emptyResultsWrap},void 0,M("div",{className:O.default.emptyResultsContent},void 0,t))};R.displayName="EmptyResults";var L=M(v.default,{}),D=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={searchMode:g.SearchModes.NEWEST},t.scrollerRef=a.createRef(),t.scrollTo=function(e,n,r){var a=t.scrollerRef.current;if(a){var o=a.getScrollerState().scrollTop-e;a.scrollTo({to:o,animate:n,callback:r})}},t.selectChannel=function(e){e!==c.default.getChannelId()&&u.default.transitionToInviteChannelSync(e)},t.searchPrevious=function(){var e=t.props,n=e.searchId;e.search.isSearching||s.searchPreviousPage(n)},t.searchNext=function(){var e=t.props,n=e.searchId;e.search.isSearching||s.searchNextPage(n)},t.handleSearchResultsClose=function(){var e=t.props.searchId;s.clearSearchState(e)},t.searchByMode=function(e){var n=t.props,r=n.searchId,a=n.search.isSearching;e===t.state.searchMode||a||(d.default.trackWithMetadata(g.AnalyticEvents.SEARCH_RESULT_SORT_CHANGED,{search_id:f.default.getAnalyticsId(r),new_sort_type:e}),s.searchByMode(r,e),t.setState({searchMode:e}))},t.toggleShowBlockedMessages=function(){var e=t.props,n=e.searchId,r=e.search.showBlockedResults;s.setShowBlockedResults(n,!r)},t.renderHeader=function(){var e=t.state.searchMode,n=t.props.search,r=n.totalResults,a=n.isSearching,o=n.isHistoricalIndexing,i=n.documentsIndexed;return M(h.default,{searchMode:e,searchByMode:t.searchByMode,totalResults:r,isSearching:a,isIndexing:o,documentsIndexed:i})},t.renderIndexing=function(){var e=f.default.getSearchType(t.props.searchId)===g.SearchTypes.GUILD?S.default.Messages.SEARCH_GUILD_STILL_INDEXING:S.default.Messages.SEARCH_DM_STILL_INDEXING;return M(R,{},void 0,L,M("div",{className:(O.default.emptyResultsText,O.default.stillIndexing)},void 0,e))},t.renderNoResults=function(){var e,n,r=t.props.search.showNoResultsAlt,a=r?S.default.Messages.SEARCH_NO_RESULTS_ALT:S.default.Messages.SEARCH_NO_RESULTS;return M(R,{},void 0,M("div",{className:(0,o.default)(O.default.noResultsImage,(e={},e[O.default.alt]=r,e))}),M("div",{className:(0,o.default)(O.default.emptyResultsText,O.default.noResults,(n={},n[O.default.alt]=r,n))},void 0,a))},t.renderError=function(){return M(R,{},void 0,M("div",{className:O.default.errorImage}),M("div",{className:(0,o.default)(O.default.emptyResultsText,O.default.errorMessage)},void 0,S.default.Messages.SEARCH_ERROR))},t.renderContent=function(){var e=t.props,n=e.searchResults,r=e.blockCount,a=t.props.search,o=a.totalResults,i=a.isSearching,l=a.isIndexing;return a.hasError?t.renderError():l?t.renderIndexing():i?null:o?M(E.default,{search:t.props.search,searchResults:n,blockCount:r,searchId:t.props.searchId,renderEmbeds:t.props.renderEmbeds,scrollTo:t.scrollTo}):t.renderNoResults()},t}N(t,e);var n=t.prototype;return n.componentDidMount=function(){m.ComponentDispatch.subscribe(g.ComponentActions.SEARCH_RESULTS_CLOSE,this.handleSearchResultsClose)},n.componentWillUnmount=function(){m.ComponentDispatch.unsubscribe(g.ComponentActions.SEARCH_RESULTS_CLOSE,this.handleSearchResultsClose)},n.componentDidUpdate=function(e){var t=e.search;if(this.props.search.showBlockedResults!==t.showBlockedResults){var n=this.scrollerRef.current;if(!n)return;n.scrollToBottom()}},n.render=function(){var e=this.props,t=e.searchAnalyticsId,n=e.searchType,r=e.searchResults,o=this.props.search,i=o.offset,l=o.hasError,u=o.totalResults,s=o.isHistoricalIndexing;return M("section",{className:O.default.searchResultsWrap,"aria-label":S.default.Messages.SEARCH_RESULTS_SECTION_LABEL},void 0,this.renderHeader(),a.createElement(y.default,{ref:this.scrollerRef,className:O.default.scroller},this.renderContent()),M(P,{searchType:n,searchAnalyticsId:t,searchResults:r,searchOffset:i,searchLimit:g.SEARCH_PAGE_SIZE,searchHasError:l,searchTotalResults:u,searchIsIndexing:s}))},t}(a.PureComponent);function w(e){var t=e.searchId;return a.createElement(D,b({searchId:t},(0,l.useStateFromStoresObject)([f.default],(function(){return{search:f.default.getResultsState(t),searchAnalyticsId:f.default.getAnalyticsId(t),searchType:f.default.getSearchType()}}),[t]),(0,_.default)(t),(0,l.useStateFromStoresObject)([p.default],(function(){return{renderEmbeds:p.default.renderEmbeds,developerMode:p.default.developerMode,theme:p.default.theme}}))))}D.displayName="SearchResults",w.displayName="ConnectedSearchResults"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(66)),i=u(n(273)),l=u(n(8085));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(e){return e.interpolate({inputRange:[0,1],outputRange:["0px","1px"]})};return{transform:[{translateX:t(e.x)},{translateY:t(e.y)}]}}var p=d("defs",{},void 0,d("rect",{id:"search-index-foreground-mask-a",width:"80",height:"80",rx:"40"})),v=d("g",{mask:"url(#search-index-foreground-mask-b)"},void 0,d("path",{fill:"#FFF",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),d("path",{fill:"#FFF",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),d("path",{fill:"#FFD773",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-15.0267 170.8361c0 6.311-5.116 11.427-11.428 11.427-6.31 0-11.426-5.116-11.426-11.427s5.116-11.427 11.426-11.427c6.312 0 11.428 5.116 11.428 11.427z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),d("path",{fill:"#FFF",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),d("path",{fill:"#FFD773",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-12.39 165.5622c-6.311 0-11.427-5.116-11.427-11.427s5.116-11.427 11.427-11.427 11.427 5.116 11.427 11.427c0 2.727-.955 5.231-2.55 7.196",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),d("path",{fill:"#FFF",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),d("path",{fill:"#FFD773",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-23.8168 129.5232c6.311 0 11.427 5.116 11.427 11.427s-5.116 11.427-11.427 11.427c-6.312 0-11.427-5.116-11.427-11.427",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),d("path",{fill:"#FFF",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),d("path",{fill:"#FFD773",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M110.2125-35.5789c.556 6.286-4.089 11.833-10.375 12.39-6.287.556-11.834-4.089-12.391-10.375-.555-6.286 4.089-11.834 10.376-12.39",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#C2FFF9",d:"M-76.4877 122.3928l14.704 5.777-8.133 24.358-25.269-4.57 1.997-15.671"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-76.4877 122.3928l14.704 5.777-8.133 24.358-25.269-4.57 1.997-15.671zm-18.6982 25.5654l33.402-19.788",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-93.1889 132.2868l23.272 20.241-6.571-30.135",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#C2FFF9",d:"M151.5172-63.3406l4.276 12.99-20.723 8.042-10.921-19.362 11.546-7.33"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M151.5172-63.3406l4.276 12.99-20.723 8.042-10.921-19.362 11.546-7.33z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M135.6949-69.0003l-.625 26.692 16.447-21.032m-27.3679 1.6701l31.645 11.319",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#E4E9F8",d:"M59.7897 13.2502l-102.171 25.055c-2.453.602-4.93-.899-5.531-3.352l-17.794-72.557c-.602-2.454.9-4.93 3.353-5.532l102.171-25.055c2.454-.601 4.931.899 5.533 3.353l17.793 72.556c.601 2.454-.9 4.93-3.354 5.532"}),d("path",{fill:"#7687B2",d:"M45.3502-64.8382c-.602-2.453-3.078-3.954-5.532-3.353l-102.171 25.056c-2.454.601-3.954 3.078-3.353 5.531l3.489 14.228 111.056-27.234-3.489-14.228z"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M59.7897 13.2502l-102.171 25.055c-2.453.602-4.93-.899-5.531-3.352l-17.794-72.557c-.602-2.454.9-4.93 3.353-5.532l102.171-25.055c2.454-.601 4.931.899 5.533 3.353l17.793 72.556c.601 2.454-.9 4.93-3.354 5.532zM-62.2172-23.3763l111.057-27.234m-95.9164 3.7287l-8.367 21.844m30.0096-27.1517l-8.366 21.844m30.0096-27.1516l-8.366 21.844M17.8522-62.804L9.4862-40.96m30.0095-27.1516l-8.366 21.844",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FF7B78",d:"M28.693-19.9388c3.986 16.254-5.959 32.661-22.213 36.647-16.254 3.986-32.661-5.959-36.646-22.213-3.987-16.253 5.959-32.661 22.213-36.646 16.252-3.986 32.661 5.959 36.646 22.212"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M28.693-19.9388c3.986 16.254-5.959 32.661-22.213 36.647-16.254 3.986-32.661-5.959-36.646-22.213-3.987-16.253 5.959-32.661 22.213-36.646 16.252-3.986 32.661 5.959 36.646 22.212z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M-16.3051-26.1936l7.999 32.618 26.541-23.798"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-16.3051-26.1936l7.999 32.618 26.541-23.798z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M101.5895 23.7946l33.137 35.518-29.647-1.029c-2.585-.09-4.608-2.258-4.518-4.843l1.028-29.646z"}),d("path",{fill:"#E4E9F8",d:"M134.7262 59.3127l-3.195 92.059c-.089 2.585-2.258 4.608-4.843 4.519l-93.619-3.249c-2.586-.09-4.609-2.258-4.519-4.844l4.223-121.705c.09-2.585 2.259-4.608 4.844-4.518l63.972 2.22"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M134.7262 59.3127l-3.195 92.059c-.089 2.585-2.258 4.608-4.843 4.519l-93.619-3.249c-2.586-.09-4.609-2.258-4.519-4.844l4.223-121.705c.09-2.585 2.259-4.608 4.844-4.518l63.972 2.22",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M101.5895 23.7946l33.137 35.518-29.647-1.029c-2.585-.09-4.608-2.258-4.518-4.843l1.028-29.646z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M104.15 6.4353l39.81 27.834-29.21 5.171c-2.547.451-4.978-1.248-5.429-3.796l-5.171-29.209z"}),d("path",{fill:"#E4E9F8",d:"M143.9596 34.2692l16.058 90.704c.45 2.547-1.249 4.978-3.796 5.429l-92.242 16.329c-2.546.452-4.977-1.248-5.428-3.795l-21.229-119.914c-.451-2.547 1.248-4.978 3.796-5.428l63.031-11.159"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M143.9596 34.2692l16.058 90.704c.45 2.547-1.249 4.978-3.796 5.429l-92.242 16.329c-2.546.452-4.977-1.248-5.428-3.795l-21.229-119.914c-.451-2.547 1.248-4.978 3.796-5.428l63.031-11.159",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M104.15 6.4353l39.81 27.834-29.21 5.171c-2.547.451-4.978-1.248-5.429-3.796l-5.171-29.209z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#5871B7",d:"M10.7613-26.0428h117.831c2.829 0 5.123 2.294 5.123 5.123v7.341c0 1.565.716 3.045 1.943 4.016l7 5.542c.659.522.646 1.525-.026 2.029l-6.867 5.151c-1.29.967-2.05 2.485-2.05 4.098v7.685c0 2.829-2.294 5.123-5.123 5.123H10.7613c-2.83 0-5.124-2.294-5.124-5.123v-35.862c0-2.829 2.294-5.123 5.124-5.123"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M10.7613-26.0428h117.831c2.829 0 5.123 2.294 5.123 5.123v7.341c0 1.565.716 3.045 1.943 4.016l7 5.542c.659.522.646 1.525-.026 2.029l-6.867 5.151c-1.29.967-2.05 2.485-2.05 4.098v7.685c0 2.829-2.294 5.123-5.123 5.123H10.7613c-2.83 0-5.124-2.294-5.124-5.123v-35.862c0-2.829 2.294-5.123 5.124-5.123zM64.1588 1.2805h-43.147m21.5738-8.1114h-21.574m91.3894 0H49.816m33.9815-8.1118h-62.786",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M166.0641 58.8137l-21.664 89.53c-.608 2.514-3.14 4.06-5.654 3.451l-91.048-22.031c-2.515-.608-4.06-3.14-3.451-5.654l28.64-118.362c.609-2.515 3.14-4.059 5.655-3.451l62.215 15.055"}),d("path",{fill:"#E4E9F8",d:"M140.7574 17.3513l25.307 41.462-28.832-6.976c-2.515-.609-4.06-3.14-3.452-5.654l6.977-28.832z"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M166.0641 58.8137l-21.664 89.53c-.608 2.514-3.14 4.06-5.654 3.451l-91.048-22.031c-2.515-.608-4.06-3.14-3.451-5.654l28.64-118.362c.609-2.515 3.14-4.059 5.655-3.451l62.215 15.055",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M140.7574 17.3513l25.307 41.462-28.832-6.976c-2.515-.609-4.06-3.14-3.452-5.654l6.977-28.832z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#5865f2",d:"M84.6422 57.6999h-117.832c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.045-1.943-4.017l-7-5.542c-.659-.521-.646-1.525.027-2.029l6.867-5.151c1.29-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h117.832c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M84.6422 57.6999h-117.832c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.045-1.943-4.017l-7-5.542c-.659-.521-.646-1.525.027-2.029l6.867-5.151c1.29-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h117.832c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123zM-26.3637 22.2653h48.67M6.0826 30.3767h68.309m-100.7553 0h22.799m53.1942 8.1118h14.942m-24.3346 0h4.534m-71.1346 0h54.093m-54.093 8.1113h63.186",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#98AFED",d:"M63.191 113.1003h-130.64c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.046-1.943-4.017l-7-5.542c-.658-.521-.646-1.525.026-2.029l6.868-5.151c1.291-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h130.64c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M63.191 113.1003h-130.64c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.046-1.943-4.017l-7-5.542c-.658-.521-.646-1.525.026-2.029l6.868-5.151c1.291-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h130.64c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123zM-60.6225 77.6657h99.433m-23.4398 8.1114h7.949m-19.6892 0h-64.253m0 8.1118h47.398m-47.398 8.1113h116.122",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#E4E9F8",d:"M37.8805 30.8191h-105.198c-2.527 0-4.574-2.048-4.574-4.574v-74.706c0-2.527 2.047-4.574 4.574-4.574h105.198c2.526 0 4.574 2.047 4.574 4.574v74.706c0 2.526-2.048 4.574-4.574 4.574"}),d("path",{fill:"#7687B2",d:"M42.4547-33.7181v-14.743c0-2.527-2.048-4.574-4.574-4.574h-105.198c-2.527 0-4.575 2.047-4.575 4.574v14.743h114.347z"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M37.8805 30.8191h-105.198c-2.527 0-4.574-2.048-4.574-4.574v-74.706c0-2.527 2.047-4.574 4.574-4.574h105.198c2.526 0 4.574 2.047 4.574 4.574v74.706c0 2.526-2.048 4.574-4.574 4.574zM-71.892-33.8123H42.455m-94.0442-19.2231l-13.328 19.223m35.6121-19.223l-13.328 19.223m35.6132-19.223l-13.328 19.223m35.6122-19.223l-13.328 19.223m35.6121-19.223l-13.328 19.223",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FF7B78",d:"M15.5836-8.8211c0 16.735-13.566 30.302-30.302 30.302-16.735 0-30.302-13.567-30.302-30.302s13.567-30.302 30.302-30.302c16.736 0 30.302 13.567 30.302 30.302"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M15.5836-8.8211c0 16.735-13.566 30.302-30.302 30.302-16.735 0-30.302-13.567-30.302-30.302s13.567-30.302 30.302-30.302c16.736 0 30.302 13.567 30.302 30.302z",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{fill:"#FFF",d:"M-26.6293-25.6136v33.584l31.445-16.792"}),d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-26.6293-25.6136v33.584l31.445-16.792zM184.3375 8.3772v6.43m3.2149-3.2152h-6.43m-292.9079 79.082v6.43m3.2148-3.2151h-6.43M195.901-43.6692l-1.516 1.515m-6.0611 6.0621l-1.516 1.516m9.0931-.0004l-1.516-1.516m-6.0611-6.0616l-1.516-1.515M-88.642 168.9265l-1.516 1.516m-6.0621 6.0616l-1.516 1.515m9.0941.0001l-1.516-1.515m-6.0621-6.0621l-1.516-1.516M174.3463-8.8211c0 1.775-1.439 3.215-3.215 3.215-1.776 0-3.215-1.44-3.215-3.215s1.439-3.215 3.215-3.215c1.776 0 3.215 1.44 3.215 3.215z",strokeLinecap:"round",strokeLinejoin:"round"})),y=d("path",{fill:"#C9D2F0",d:"M89.8311 190.9259c-2.441-2.441-2.441-6.4 0-8.841l36.771-36.771 8.841 8.841-36.771 36.771c-2.441 2.441-6.4 2.441-8.841 0"}),m=d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M89.8311 190.9259c-2.441-2.441-2.441-6.4 0-8.841l36.771-36.771 8.841 8.841-36.771 36.771c-2.441 2.441-6.4 2.441-8.841 0z",strokeLinecap:"round",strokeLinejoin:"round"}),_=d("path",{fill:"#9F7373",d:"M100.1458 189.4524l-8.841-8.841c-1.628-1.628-1.628-4.267 0-5.894l17.437-17.437c1.627-1.628 4.266-1.628 5.894 0l8.841 8.841c1.628 1.628 1.628 4.267 0 5.894l-17.437 17.437c-1.627 1.628-4.266 1.628-5.894 0"}),h=d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M100.1458 189.4524l-8.841-8.841c-1.628-1.628-1.628-4.267 0-5.894l17.437-17.437c1.627-1.628 4.266-1.628 5.894 0l8.841 8.841c1.628 1.628 1.628 4.267 0 5.894l-17.437 17.437c-1.627 1.628-4.266 1.628-5.894 0z",strokeLinecap:"round",strokeLinejoin:"round"}),E=d("path",{fill:"#F3F9FF",d:"M132.1122 148.6448c-15.621-15.621-15.621-40.948 0-56.569 15.621-15.621 40.948-15.621 56.569 0 15.621 15.621 15.621 40.948 0 56.569-15.621 15.621-40.948 15.621-56.569 0m63.895-63.895c-19.667-19.667-51.554-19.667-71.221 0s-19.667 51.554 0 71.221 51.554 19.667 71.221 0 19.667-51.554 0-71.221"}),g=d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M196.0069 155.9708c-19.667 19.667-51.554 19.667-71.221 0s-19.667-51.554 0-71.221 51.554-19.667 71.221 0 19.667 51.554 0 71.221z",strokeLinecap:"round",strokeLinejoin:"round"}),S=d("path",{stroke:"#1E2126",strokeWidth:"2",d:"M132.1122 148.6448c-15.621-15.621-15.621-40.948 0-56.569 15.621-15.621 40.948-15.621 56.569 0 15.621 15.621 15.621 40.948 0 56.569-15.621 15.621-40.948 15.621-56.569 0z",strokeLinecap:"round",strokeLinejoin:"round"}),O=d("path",{d:"M84 66h130v130H84z"}),I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={x:new i.default.Value(0),y:new i.default.Value(0)},t._isMounted=!1,t.shouldLoop=function(){return t._isMounted},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.componentDidMount=function(){this._isMounted=!0;var e=this.state,t=e.x,n=e.y;"Firefox"!==o.default.name&&(i.default.animate(t,{loop:!0,toValueMin:-74,toValueMax:95,overshootClamping:!0,friction:5,tension:1,shouldLoop:this.shouldLoop}),i.default.animate(n,{loop:!0,toValueMin:-59,toValueMax:75,overshootClamping:!0,friction:5,tension:1,shouldLoop:this.shouldLoop}))},a.componentWillUnmount=function(){this._isMounted=!1},a.render=function(){return d("div",{className:l.default.searchIndexAnimation},void 0,d("div",{className:l.default.searchIndexBackground}),d("svg",{className:l.default.searchIndexForeground,width:"320",height:"280"},void 0,p,d("g",{fill:"none",fillRule:"evenodd"},void 0,d("g",{transform:"translate(120 80)"},void 0,d("mask",{id:"search-index-foreground-mask-b",fill:"#fff"},void 0,d(i.default.use,{style:c(this.state),className:l.default.mask,xlinkHref:"#search-index-foreground-mask-a"})),v),d(i.default.g,{className:l.default.magnifyingGlass,style:c(this.state)},void 0,y,m,_,h,E,g,S,O))))},r}(a.Component);I.displayName="SearchIndexForeground";var T=I;t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,r.useStateFromStores)([u.default],(function(){var t=u.default.getQuery(e),n=u.default.getRawResults(e);if(null==t||null==n)return[];var r=(0,a.createASTHighlighter)(t.content||"");return n.map((function(e){return e.map((function(e){var t=(0,o.createMessageRecord)(e);return t.isSearchHit?t.set("customRenderedContent",(0,i.default)(t,{postProcessor:r})):t}))}))}),[e]),n=(0,r.useStateFromStoresArray)([l.default],(function(){var e=0;return[t.map((function(t){return t.filter((function(t){var n=l.default.isBlocked(t.author.id);return n&&t.isSearchHit&&e++,!n||t.isSearchHit}))})),e]}),[t]),s=n[0],d=n[1];return{searchResults:s,blockCount:d}};var r=n(3),a=n(11370),o=n(297),i=s(n(8361)),l=s(n(70)),u=s(n(1241));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.analyze=f,t.shouldHighlight=c,t.highlightAST=p,t.createASTHighlighter=function(e){var t=new Set(f(e));return function(e){return p(e,t)}};var r=o(n(8)),a=o(n(11371));function o(e){return e&&e.__esModule?e:{default:e}}var i=new Set(["a","an","and","are","as","at","be","but","by","for","if","in","into","is","it","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]);function l(e){return e.replace(/('|\u2019|\uFF07)(s|S)$/,"")}function u(e){return e.toLowerCase()}function s(e){return i.has(e)}function d(e){return 0===e.length}function f(e){return(0,r.default)(e.split(/\W+/)).map(l).reject(d).map(u).reject(s).map(a.default).value()}function c(e,t){return!d(e=u(l(e)))&&!s(e)&&t.has((0,a.default)(e))}function p(e,t){if(Array.isArray(e))e.forEach((function(e){return p(e,t)}));else if("string"==typeof e.content&&"codeBlock"!==e.type){var n=[],r="";e.content.split(/(\W+)/g).forEach((function(e){c(e,t)?(r.length>0&&n.push({type:"text",content:r}),n.push({type:"highlight",content:e}),r=""):r+=e})),n.length>0&&(r.length>0&&n.push({type:"text",content:r}),"text"===e.type?e.content=n:e.content=[{type:"text",content:n}])}else null!=e.content&&p(e.content,t);return e}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(271)),l=y(n(61)),u=y(n(151)),s=y(n(149)),d=y(n(24)),f=y(n(93)),c=n(1),p=y(n(6)),v=y(n(8086));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}function E(e){var t={searchMode:e.searchMode,onClick:e.searchByMode};return _("div",{className:v.default.searchHeader},void 0,a.createElement(g,e),a.createElement(O,h({mode:c.SearchModes.NEWEST,message:p.default.Messages.SEARCH_NEWEST_SHORT},t)),a.createElement(O,h({mode:c.SearchModes.OLDEST,message:p.default.Messages.SEARCH_OLDEST_SHORT},t)),a.createElement(O,h({mode:c.SearchModes.MOST_RELEVANT,message:p.default.Messages.SEARCH_MOST_RELEVANT_SHORT},t)))}function g(e){var t,n=e.isSearching,r=e.isIndexing,o=e.documentsIndexed;(r||n)&&(t=_("div",{className:v.default.spinnerWrapper},void 0,_(u.default,{type:u.default.Type.SPINNING_CIRCLE,className:v.default.spinner,itemClassName:v.default.spinnerPath})));var i=r&&!n;return _("div",{className:v.default.totalResults,role:"status"},void 0,i?_(s.default,{text:p.default.Messages.SEARCH_STILL_INDEXING_HINT.format({count:o})},void 0,(function(n){return a.createElement("div",h({className:v.default.totalResultsWrapper},n),a.createElement(S,e),t)})):a.createElement(S,e),i?null:t)}function S(e){var t=e.isSearching,n=e.isIndexing,r=e.totalResults;if(t)return _(d.default,{size:d.default.Sizes.SIZE_16,color:d.default.Colors.HEADER_PRIMARY},void 0,p.default.Messages.SEARCHING);if(n)return _(d.default,{size:d.default.Sizes.SIZE_16},void 0,_(i.default,{className:v.default.helpdeskLink,href:f.default.getArticleURL(c.HelpdeskArticles.SEARCH_INDEXING)},void 0,p.default.Messages.STILL_INDEXING));var a=r.toLocaleString();return _(d.default,{size:d.default.Sizes.SIZE_16,color:d.default.Colors.HEADER_PRIMARY},void 0,p.default.Messages.TOTAL_RESULTS.format({count:a}))}function O(e){var t,n=e.searchMode,r=e.mode,a=e.message,i=e.onClick;return _(l.default,{className:(0,o.default)(v.default.tab,(t={},t[v.default.selected]=n===r,t)),"aria-selected":n===r,onClick:function(){return i(r)}},r,a)}E.displayName="SearchHeader",g.displayName="TotalContent",O.displayName="SearchTab"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.search,n=e.searchId,r=e.renderEmbeds,D=e.scrollTo,w=e.searchResults,j=e.blockCount,G=t.offset,F=t.totalResults,B=t.isSearching,H=t.showBlockedResults,x=(0,i.useStateFromStores)([O.default],(function(){return O.default.renderSpoilers})),V=a.useCallback((function(e){e!==S.default.getChannelId()&&u.default.transitionToInviteChannelSync(e)}),[]),W=a.useCallback((function(e){B||d.changePage(n,e-1)}),[n,B]),Y=a.useCallback((function(e){if(e.blocked)l.default.show({title:R.default.Messages.UNBLOCK_TO_JUMP_TITLE,body:R.default.Messages.UNBLOCK_TO_JUMP_BODY.format({name:e.author.username}),confirmText:R.default.Messages.OKAY});else{var t=_.default.getChannel(e.channel_id),r=t?t.getGuildId():null;s.default.trackJump(e.channel_id,e.id,"Search Results",{search_id:g.default.getAnalyticsId(n)}),(0,m.transitionTo)(P.Routes.CHANNEL(r,e.channel_id,e.id))}}),[n]),z=a.useMemo((function(){if(null==w)return[];var e,t=0;return w.reduce((function(n,r){var a=r.find((function(e){return e.isSearchHit}));if(!H&&a&&E.default.isBlocked(a.author.id))return n;var o=_.default.getChannel(r[0].channel_id);return null==o||(e&&e===o.id||n.push({channel:o,results:[],startIndex:t}),t+=1,n[n.length-1].results.push(r),e=null==o?void 0:o.id),n}),[])}),[w,H]),K=a.useRef([]),$=z.reduce((function(e,t){return e+1+t.results.length}),0),Z=a.useCallback((function(e,t){if(f.default.keyboardModeEnabled){var n=K.current,r=null!=t?n[t]:void 0;if(null!=r&&null!=r.hitRef.current){var a=r.hitRef.current.getClientRects()[0],o=a.top-.5*a.height;D(o,!1,(function(){var t;null===(t=document.getElementById(e))||void 0===t||t.focus()}))}}}),[D]),q=a.useCallback((function(e){var t=K.current[e];null==t||t.jumpTo()}),[]),X=(0,o.useListNavigator)({navId:"search-results",itemCount:$,focusedIndex:0,setFocus:Z,onSelect:q}),J=z.map((function(e){var t,o=e.channel,i=e.results,l=e.startIndex,u=o?(0,c.computeChannelName)(o,I.default,E.default,!1):"???",s=null!==(t=(0,p.default)(o))&&void 0!==t?t:b.default,d=h.default.can(P.Permissions.MANAGE_MESSAGES,o);return U(C.SpoilerDisplayContext.Provider,{value:(0,y.default)(x,d)},void 0,U("div",{className:L.default.searchResultGroup,role:"group","aria-label":u},o.id+"-"+l,U(T.default,{onClick:function(){return V(o.id)}},void 0,U(M.default,{className:L.default.channelName,size:M.default.Sizes.SIZE_16,color:M.default.Colors.HEADER_PRIMARY},void 0,U(s,{className:L.default.channelNameIcon,width:16,height:16}),U("span",{},void 0,u))),i.map((function(e,t){var o=l+t;return a.createElement(A.default,{ref:function(e){return K.current[o]=e},scrollTo:D,searchId:n,renderEmbeds:r,searchOffset:G,pageResultsLength:i.length,result:e,index:o,key:"search-result-"+o,onJump:Y,listItemProps:X.getItemProps({index:o})})}))))}));J.push();var Q=a.useRef(null);a.useLayoutEffect((function(){var e;null===(e=Q.current)||void 0===e||e.focus()}),[w]);var ee=(0,v.useFocusJumpSection)();return a.createElement(a.Fragment,null,a.createElement("div",k({ref:Q},X.getContainerProps(),ee,{"aria-busy":B}),J),j?U(T.default,{tag:"div",className:L.default.resultsBlocked,onClick:function(){return d.setShowBlockedResults(n,!H)}},void 0,U("div",{className:L.default.resultsBlockedImage}),U("div",{className:L.default.resultsBlockedText},void 0,H?R.default.Messages.SEARCH_HIDE_BLOCKED_MESSAGES.format({count:j}):R.default.Messages.SEARCH_NUM_RESULTS_BLOCKED_NOT_SHOWN.format({count:j}))):null,!B&&U(N.default,{changePage:W,offset:G,totalResults:F,pageLength:P.SEARCH_PAGE_SIZE}))};var r,a=j(n(0)),o=n(8404),i=n(3),l=D(n(154)),u=D(n(1211)),s=D(n(390)),d=j(n(8699)),f=D(n(105)),c=n(180),p=D(n(8449)),v=n(1246),y=D(n(9220)),m=n(42),_=D(n(10)),h=D(n(40)),E=D(n(70)),g=D(n(1241)),S=D(n(36)),O=D(n(39)),I=D(n(12)),T=D(n(61)),C=n(8467),b=D(n(8307)),M=D(n(24)),N=D(n(11374)),A=D(n(11375)),P=n(1),R=D(n(6)),L=D(n(8089));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(){return(k=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}).apply(this,arguments)}function U(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(8972)),o=i(n(8087));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.changePage,n=e.offset,r=e.totalResults,i=e.pageLength,l=Math.floor(n/i)+1;return u("div",{className:o.default.container},void 0,u(a.default,{currentPage:l,totalCount:r,pageSize:i,onPageChange:t,maxVisiblePages:5}))}s.displayName="SearchPagination"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(8)),i=n(389),l=p(n(8375)),u=p(n(11376)),s=p(n(10)),d=p(n(61)),f=p(n(6)),c=p(n(8088));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(){return(m=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}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){var n,r=null===(n=window)||void 0===n?void 0:n.getSelection();if(null!=r&&!r.isCollapsed)return!0;if(null==e||null==t)return!1;for(;e instanceof Element&&e!==t;){var a=e.tagName;if("A"===a||"IMG"===a||"BUTTON"===a)return!0;e=e.parentNode}return!1}var E=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).containerRef=a.createRef(),t.hitRef=a.createRef(),t.handleContextMenu=function(e,t){var n=s.default.getChannel(t.channel_id);null!=n&&(e.stopPropagation(),(0,i.openContextMenu)(e,(function(e){return a.createElement(u.default,m({},e,{message:t,channel:n}))})))},t.jumpTo=function(e){null!=e&&(e.preventDefault(),e.stopPropagation());var n=t.props,r=n.onJump,a=n.result.find((function(e){return e.isSearchHit}));null!=a&&r(a)},t.handleMessageClick=function(e){h(e.target,t.containerRef.current)?e.stopPropagation():t.jumpTo(e)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n),r.prototype.render=function(){var e=this,t=this.props,n=t.result,r=t.listItemProps,i=o.default.find(n,(function(e){return e.isSearchHit}));if(null==i)return null;var u=s.default.getChannel(i.channel_id);return null==u?null:y("div",{className:c.default.container,role:"group","aria-label":f.default.Messages.SEARCH_RESULT},void 0,a.createElement(d.default,m({},r,{onClick:this.handleMessageClick,innerRef:this.containerRef,className:c.default.searchResult,focusProps:{ringTarget:this.hitRef,ringClassName:c.default.searchResultFocusRing,offset:4}}),a.createElement("div",{ref:this.hitRef,className:c.default.message,key:i.id},y(l.default,{message:i,channel:u,onContextMenu:function(t){return e.handleContextMenu(t,i)},animateAvatar:!1,subscribeToComponentDispatch:!1}))),y("div",{className:c.default.buttonsContainer},void 0,y(d.default,{className:c.default.button,onClick:this.jumpTo},void 0,f.default.Messages.JUMP)))},r}(a.PureComponent);t.default=E,E.displayName="SearchResult"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;_(n(0));var r,a=n(389),o=y(n(8258)),i=_(n(8253)),l=y(n(8773)),u=y(n(8395)),s=y(n(8471)),d=y(n(8774)),f=y(n(8775)),c=y(n(8776)),p=y(n(9222)),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t,n,r,y,m=e.channel,_=e.message,E=e.target,g=e.attachment,S=e.onSelect,O=E;if(g)r=n=g.url;else for(;O instanceof Node;)O instanceof HTMLImageElement&&null!=O.src&&(r=O.src),O instanceof HTMLAnchorElement&&null!=O.href&&(n=O.href,y=O.textContent),O=O.parentNode;var I=null===(t=document.getSelection())||void 0===t?void 0:t.toString(),T=(0,l.default)(I),C=(0,s.default)(I),b=(0,p.default)(_,m),M=(0,c.default)(_,m),N=(0,d.default)(_,m),A=(0,f.default)(_,m),P=(0,u.default)(n||r,y),R=(0,o.default)(_.id,_.channel_id+"-"+_.id);return h(i.default,{navId:"message",onClose:a.closeContextMenu,"aria-label":v.default.Messages.MESSAGE_ACTIONS_MENU_LABEL,onSelect:S},void 0,h(i.MenuGroup,{},void 0,T),h(i.MenuGroup,{},void 0,C),h(i.MenuGroup,{},void 0,b,M,N,A),h(i.MenuGroup,{},void 0,P),h(i.MenuGroup,{},void 0,R))}E.displayName="MessageSearchResultContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=K;var r,a=V(n(0)),o=H(n(9)),i=H(n(8325)),l=n(3),u=H(n(8389)),s=H(n(8406)),d=H(n(9223)),f=H(n(105)),c=H(n(8391)),p=H(n(8373)),v=H(n(8375)),y=H(n(10)),m=V(n(1225)),_=H(n(15)),h=H(n(201)),E=H(n(39)),g=H(n(29)),S=H(n(1160)),O=H(n(153)),I=n(131),T=H(n(255)),C=H(n(8740)),b=H(n(8287)),M=H(n(8282)),N=n(374),A=H(n(24)),P=H(n(272)),R=n(8349),L=n(8381),D=H(n(8265)),w=n(8566),j=n(11378),k=H(n(10453)),U=n(1),G=H(n(6)),F=H(n(8091)),B=H(n(7405));function H(e){return e&&e.__esModule?e:{default:e}}function x(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return x=function(){return e},e}function V(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=x();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function W(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function Y(){return(Y=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}).apply(this,arguments)}function z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function K(e){var t=e.parentChannelId,n=e.parentMessageId,r=(0,l.useStateFromStores)([y.default],(function(){return y.default.getChannel(t)}));return null==r?null:z(R.ComponentDispatchGroupProvider,{},void 0,z(M.default,{toolbar:z(M.default.Icon,{icon:T.default,tooltip:G.default.Messages.CLOSE,onClick:function(){return D.default.closeThreadSidebar(t)}})},void 0,z(M.default.Icon,{icon:b.default,disabled:!0,"aria-label":G.default.Messages.THREAD}),z(M.default.Title,{},void 0,G.default.Messages.NEW_THREAD)),z($,{parentChannel:r,parentMessageId:n}))}function $(e){var t=e.parentChannel,n=e.parentMessageId,r=null!=n,v=!r,y=a.useContext(R.ComponentDispatchGroupContext),h=(0,l.useStateFromStores)([f.default],(function(){return f.default.messageGroupSpacing})),E=(0,l.useStateFromStores)([_.default],(function(){return _.default.getGuild(t.guild_id)})),O=a.useState((function(){var e;return null!==(e=m.default.getThreadSettings(t.id))&&void 0!==e?e:{}})),T=O[0],M=O[1],N=a.useCallback((function(e){M((function(t){return Y({},t,{},e)})),u.default.changeThreadSettings(t.id,Y({},e,{parentMessageId:n}))}),[t.id,n]),w=(0,j.usePrivateThreadMode)(t),k=a.useState((function(){var e=m.default.getDraft(t.id,m.DraftType.FirstThreadMessage);return{textValue:e,richValue:i.default.deserialize(e)}})),H=k[0],x=k[1],V=a.useRef(H.textValue.trim().length>0);a.useEffect((function(){V.current=V.current||H.textValue.trim().length>0}),[H]);var K=function(e,t,n,r,o,i){var l=a.useState(!1),u=l[0],s=l[1],d=(0,j.useCreateThread)(e,t,n,r,o,D.default.openThreadSidebarForViewing),f=a.useCallback(function(){var e,n=(e=regeneratorRuntime.mark((function e(n){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(null!==(a=r.name)&&void 0!==a?a:"").length){e.next=4;break}return s(!0),e.abrupt("return",{shouldClear:!1,shouldRefocus:!0});case 4:if(null!=t){e.next=11;break}return e.next=7,(0,L.applyChatRestrictions)({target:null,type:null,content:i.textValue,stickers:n});case 7:if(e.sent.valid){e.next=11;break}return e.abrupt("return",{shouldClear:!1,shouldRefocus:!0});case 11:return e.next=13,d(i.textValue,n);case 13:return e.abrupt("return",{shouldClear:!0,shouldRefocus:!1});case 14:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){W(o,r,a,i,l,"next",e)}function l(e){W(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),[d,i.textValue,r.name,t]);return{hasNameError:u,submit:f}}(t,n,E,T,w,H),$=K.hasNameError,J=K.submit;a.useEffect((function(){function e(){var e=m.default.getDraft(t.id,m.DraftType.FirstThreadMessage);x({textValue:e,richValue:i.default.deserialize(e)})}return m.default.addChangeListener(e),function(){m.default.removeChangeListener(e)}}),[t.id]);var Q=function(e,t,n,r){var a=(0,j.getIsPrivate)(t,r);return e||r===j.PrivateThreadMode.Disabled?null:z(I.FormSection,{title:G.default.Messages.PRIVATE_THREAD,className:F.default.formSection},void 0,z(S.default,{className:(0,o.default)(F.default.checkbox),type:S.default.Types.INVERTED,disabled:r===j.PrivateThreadMode.PrivateOnly,value:a,onChange:function(e,t){return n({isPrivate:t})}},void 0,z(A.default,{size:A.default.Sizes.SIZE_16,color:A.default.Colors.CUSTOM},void 0,G.default.Messages.FORM_THREAD_PRIVATE_THREAD_SECTION_LABEL)),a?z(A.default,{className:F.default.privateThreadDescription,size:A.default.Sizes.SIZE_12,color:A.default.Colors.HEADER_SECONDARY},void 0,G.default.Messages.FORM_THREAD_PRIVATE_THREAD_DESCRIPTION):null)}(r,T,N,w),ee=Z(t,E,T,N),te=q(t,T,N,$),ne=function(e,t,n,r,o){var i=a.useState(!1),l=i[0],d=i[1],f=a.useCallback((function(){return d(!0)}),[]),p=a.useCallback((function(){return d(!1)}),[]),v=a.useCallback((function(t,n,a){u.default.saveDraft(e.id,n,m.DraftType.FirstThreadMessage),r((function(t){return""!==n&&t.textValue!==n?s.default.startTyping(e.id):""===n&&s.default.stopTyping(e.id),{textValue:n,richValue:a}}))}),[e.id,r]),y=a.useCallback((function(e,t){return o(t)}),[o]);return(0,R.useComponentAction)({event:U.ComponentActions.TEXTAREA_FOCUS,handler:f}),(0,R.useComponentAction)({event:U.ComponentActions.TEXTAREA_BLUR,handler:p}),t?z(I.FormSection,{title:G.default.Messages.FORM_THREAD_STARTER_MESSAGE_SECTION_LABEL,className:F.default.formSection},void 0,z(c.default,{type:U.TextareaTypes.THREAD_CREATION,channel:e,placeholder:G.default.Messages.FORM_THREAD_STARTER_MESSAGE_PLACEHOLDER,textValue:n.textValue,richValue:n.richValue,focused:l,className:F.default.channelTextArea,innerClassName:F.default.channelTextAreaInner,onFocus:f,onBlur:p,onChange:v,onSubmit:y,disableAutoFocus:!0})):null}(t,v||V.current,H,x,J),re=a.useCallback((function(){y.bumpDispatchPriority()}),[y]),ae=(0,j.getIsPrivate)(T,w)?C.default:b.default;return z("div",{className:F.default.chat,onMouseDown:re,onFocus:re},void 0,z("div",{className:(0,o.default)(F.default.messagesWrapper,"group-spacing-"+h)},void 0,z("form",{onSubmit:function(e){e.preventDefault(),J()},className:F.default.form},void 0,z(P.default,{className:F.default.scroller,fade:!0},void 0,z("div",{className:F.default.scrollerInner},void 0,z(p.default,{channelId:"create-thread-null"},void 0,z("div",{className:B.default.iconWrapper},void 0,z(ae,{className:B.default.icon})),te,ne,ee,t.type===U.ChannelTypes.GUILD_TEXT?Q:null),z(X,{parentChannel:t,parentMessageId:n}))),z("div",{className:F.default.submitContainer},void 0,z(g.default,{className:F.default.submitButton,type:"submit"},void 0,G.default.Messages.CREATE_THREAD),z(d.default,{channel:t,isThreadCreation:!0})))))}function Z(e,t,n,r){return z(I.FormSection,{title:G.default.Messages.FORM_THREAD_AUTO_ARCHIVE_SECTION_LABEL,className:F.default.formSection},void 0,z(N.SingleSelect,{options:(0,w.getAutoArchiveOptions)(t),value:(0,w.getAutoArchiveDuration)(e,t,n.autoArchiveDuration),maxVisibleItems:(0,w.getAutoArchiveOptions)(t).length,popoutWidth:150,onChange:function(e){return r({autoArchiveDuration:e})}}))}function q(e,t,n,r){var o,i=a.useRef(null),l=null!==(o=t.name)&&void 0!==o?o:"";a.useLayoutEffect((function(){var e;null===(e=i.current)||void 0===e||e.focus()}),[]);return z(I.FormSection,{title:G.default.Messages.THREAD_NAME,className:F.default.formSection},void 0,z(O.default,{inputRef:i,value:l,placeholder:G.default.Messages.FORM_THREAD_NAME_PLACEHOLDER,maxLength:U.MAX_CHANNEL_NAME_LENGTH,onChange:function(t){n({name:(0,k.default)(t,!1)}),""!==t?s.default.startTyping(e.id):s.default.stopTyping(e.id)},onBlur:function(){var e=(0,k.default)(l,!0);e!==l&&n({name:e})},error:r&&0===l.trim().length?G.default.Messages.FORM_THREAD_NAME_REQUIRED_ERROR:null}))}function X(e){var t=e.parentChannel,n=e.parentMessageId,r=(0,l.useStateFromStores)([h.default],(function(){return null==n?null:h.default.getMessage(t.id,n)})),a=(0,l.useStateFromStores)([E.default],(function(){return E.default.messageDisplayCompact}),[]);return null!=r?z(v.default,{className:F.default.messagePreview,message:r,channel:t,compact:a,renderThreadAccessory:!1}):null}K.displayName="CreateThreadSidebar",$.displayName="ChatArea",Z.displayName="useAutoArchiveDropdown",q.displayName="useThreadName"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePrivateThreadMode=function(e){var t=(0,p.useCanStartPublicThread)(e);return(0,p.useCanStartPrivateThread)(e)?t?r.Enabled:r.PrivateOnly:r.Disabled},t.getIsPrivate=E,t.useGetThreadDraftSettings=function(e){return(0,o.useStateFromStores)([d.default],(function(){var t;return null==e?null:null!==(t=d.default.getThreadSettings(e))&&void 0!==t?t:d.default.getThreadDraftWithParentMessageId(e)}))},t.useCreateThread=function(e,t,n,r,o,l){return a.useCallback(function(){var a,u=(a=regeneratorRuntime.mark((function a(u,p){var y,m,_,h,S,O,I;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return m=null==t||!1,_=E(r,o),h=null!==(y=r.name)&&void 0!==y?y:"",S=(0,c.getAutoArchiveDuration)(e,n,r.autoArchiveDuration),O=s.default.getChannel(t),a.next=7,f.default.createThread(e,t,h,_?v.ChannelTypes.PRIVATE_THREAD:e.type===v.ChannelTypes.GUILD_ANNOUNCEMENT?v.ChannelTypes.ANNOUNCEMENT_THREAD:v.ChannelTypes.PUBLIC_THREAD,S);case 7:(I=a.sent)!==O&&(i.default.clearDraft(e.id,d.DraftType.ThreadSettings),i.default.clearDraft(e.id,d.DraftType.FirstThreadMessage),null==l||l(I),(m||u.length>0||null!=p&&p.length>0)&&g(I,u,p).finally((function(){})));case 9:case"end":return a.stop()}}),a)})),function(){var e=this,t=arguments;return new Promise((function(n,r){var o=a.apply(e,t);function i(e){h(o,n,r,i,l,"next",e)}function l(e){h(o,n,r,i,l,"throw",e)}i(void 0)}))});return function(e,t){return u.apply(this,arguments)}}(),[e,t,n,r,l,o])},t.PrivateThreadMode=void 0;var r,a=_(n(0)),o=n(3),i=y(n(8389)),l=y(n(390)),u=y(n(1216)),s=y(n(10)),d=_(n(1225)),f=y(n(8265)),c=n(8566),p=n(1209),v=n(1);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function E(e,t){return t===r.PrivateOnly||null!==(n=e.isPrivate)&&void 0!==n&&n;var n}function g(e,t,n){return null!=n&&n.length>0?l.default.sendStickers(e.id,n):l.default.sendMessage(e.id,u.default.parse(e,t))}t.PrivateThreadMode=r,function(e){e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled",e[e.PrivateOnly=3]="PrivateOnly"}(r||(t.PrivateThreadMode=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(8)),i=n(3),l=h(n(282)),u=h(n(278)),s=h(n(8287)),d=n(8282),f=h(n(24)),c=h(n(410)),p=n(1209),v=n(698),y=h(n(9131)),m=h(n(6)),_=h(n(8092));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){var t=e.channel,n=a.useState(!1),r=n[0],h=n[1],E=(0,i.useStateFromStores)([c.default],(function(){return(0,o.default)(c.default.getThreadsForGuild(t.guild_id)).values().filter((function(e){return e.parentId===t.id})).size()})),O=(0,p.useCanSeeThreadsInChannel)(t),I=a.useCallback((function(){h(!1)}),[]),T=a.useCallback((function(){r||(0,v.trackThreadBrowserOpened)("Popout"),h(!r)}),[r]);return O?S(u.default,{animation:u.default.Animation.NONE,position:u.default.Positions.BOTTOM,align:u.default.Align.RIGHT,autoInvert:!1,shouldShow:r,onRequestClose:I,renderPopout:function(){return S(l.default,{},void 0,S(y.default,{className:_.default.browser,channel:t,onClose:I}))}},void 0,(function(e,t){return a.createElement(d.Icon,g({},e,{className:_.default.icon,onClick:T,icon:s.default,"aria-label":m.default.Messages.THREADS,tooltip:t?null:m.default.Messages.THREADS,selected:t}),E>0?S(f.default,{size:f.default.Sizes.SIZE_16,color:f.default.Colors.INTERACTIVE_NORMAL,className:_.default.count},void 0,E>=100?"99+":E):null)})):null}O.displayName="ThreadBrowserPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=E(n(0)),o=_(n(8901)),i=_(n(8329)),l=_(n(8639)),u=_(n(8902)),s=_(n(8258)),d=E(n(8253)),f=_(n(278)),c=_(n(8331)),p=_(n(8282)),v=_(n(8265)),y=n(1209),m=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function O(e){var t=e.channel,n=a.useState(!1),r=n[0],o=n[1];if(!(0,y.useCanSeeThreads)())return null;function i(){o((function(e){return!e}))}var l=m.default.Messages.MORE;return g(f.default,{shouldShow:r,animation:f.default.Animation.NONE,position:f.default.Positions.BOTTOM,align:f.default.Align.RIGHT,autoInvert:!1,onRequestClose:function(){return o(!1)},renderPopout:function(e){return a.createElement(I,S({},e,{channel:t}))}},void 0,(function(e,t){return a.createElement(p.default.Icon,S({},e,{onClick:i,tooltip:t?null:l,icon:c.default,"aria-label":l,selected:t}))}))}function I(e){var t=e.channel,n=e.closePopout,r=e.onSelect,a=(0,o.default)(t),f=(0,u.default)(t),c=(0,s.default)(t.id),p=(0,i.default)(t),y=(0,l.default)(t,"Toolbar Overflow");return g(d.default,{navId:"thread-context",onClose:n,"aria-label":m.default.Messages.THREAD_ACTIONS_MENU_LABEL,onSelect:r},void 0,g(d.MenuGroup,{},void 0,y),g(d.MenuGroup,{},void 0,f,g(d.MenuItem,{id:"open",label:m.default.Messages.OPEN_IN_SPLIT_VIEW,action:function(){v.default.openThreadSidebarForViewing(t)}})),g(d.MenuGroup,{},void 0,a,p),g(d.MenuGroup,{},void 0,c))}O.displayName="ThreadOverflowMenuButton",I.displayName="OverflowMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.channelId,n=(0,o.useStateFromStores)([v.default],(function(){return v.default.getChannel(t)})),r=(0,o.useStateFromStores)([m.default],(function(){return m.default.getGuild(null==n?void 0:n.getGuildId())})),O=(0,f.default)(n),I=a.useRef(!1);if(a.useEffect((function(){if(null!=n&&!I.current){I.current=!0;var e=(0,d.collectThreadMetadata)(v.default.getChannel(n.id),!0);(0,d.trackWithMetadata)(g.AnalyticEvents.CHANNEL_OPENED,C({},e,{channel_id:n.id,guild_id:n.guild_id,channel_view:"Split View"}))}}),[n]),null==n||null==r)return null;var b=T(E.default,{channel:n});return a.createElement(a.Fragment,null,T(u.default,{channel:n,draftType:y.DraftType.FirstThreadMessage}),T(_.default,{toolbar:b},void 0,(0,s.renderTitle)({channel:n,channelName:O,guild:r,inSidebar:!0,handleContextMenu:function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(c.default,C({},e,{channel:n}))}))},handleClick:function(){null!=n&&(0,p.transitionToGuild)(n.guild_id,n.id)}})),T("div",{className:S.default.chat},void 0,T(h.default,{channel:n,narrow:!0}),T(l.default,{channel:n,guild:r,textareaType:g.TextareaTypes.SIDEBAR,disableAutoFocus:!0},t)))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(389),l=O(n(10455)),u=O(n(10457)),s=n(9229),d=n(106),f=O(n(180)),c=O(n(8397)),p=n(42),v=O(n(10)),y=n(1225),m=O(n(15)),_=O(n(8282)),h=O(n(10456)),E=O(n(11384)),g=n(1),S=O(n(8094));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(9)),o=f(n(29)),i=f(n(61)),l=f(n(24)),u=f(n(11383)),s=f(n(6)),d=f(n(7839));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t,n=e.channel,r=e.narrow,f=(0,u.default)(n),c=f.shouldShow,v=f.handleChangeSettings,y=f.handleCancel;return c?p("div",{className:(0,a.default)(d.default.chatHeaderBar,(t={},t[d.default.narrow]=r,t))},void 0,p(l.default,{className:(0,a.default)(d.default.chatHeaderBarText,d.default.nudgeBarText),size:l.default.Sizes.SIZE_14,color:l.default.Colors.HEADER_SECONDARY},void 0,s.default.Messages.THREAD_NOTIFICATION_SETTINGS_NUDGE_DESCRIPTION," ",p(i.default,{tag:"span",onClick:y},void 0,p(l.default,{tag:"span",className:d.default.nudgeAction,size:l.default.Sizes.SIZE_14,color:l.default.Colors.LINK},void 0,s.default.Messages.THREAD_NOTIFICATION_SETTINGS_NUDGE_CANCEL))),p(o.default,{size:r?o.default.Sizes.SMALL:o.default.Sizes.TINY,className:d.default.chatHeaderBarButton,onClick:v},void 0,s.default.Messages.SETTINGS)):null}v.displayName="ThreadNotificationSettingsNudge"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=r.useState(!1),n=t[0],d=t[1],f=(0,a.useStateFromStores)([u.default],(function(){return u.default.hasRecentlyAutoUpgradedNotifications(e.id)}))&&!o.default.get("hideThreadNotificationsNudge",!1)&&!n;return r.useEffect((function(){f&&(0,i.trackWithMetadata)(s.AnalyticEvents.THREAD_NOTIFICATION_NUDGE_SHOWN,{channel_id:e.id,guild_id:e.guild_id})}),[e,f]),{shouldShow:f,handleChangeSettings:function(){(0,i.trackWithMetadata)(s.AnalyticEvents.THREAD_NOTIFICATION_NUDGE_CLICKED,{channel_id:e.id,guild_id:e.guild_id}),l.ComponentDispatch.dispatch(s.ComponentActions.OPEN_THREAD_NOTIFICATION_SETTINGS)},handleCancel:function(){(0,i.trackWithMetadata)(s.AnalyticEvents.THREAD_NOTIFICATION_NUDGE_CLOSED,{channel_id:e.id,guild_id:e.guild_id}),d(!0),o.default.set("hideThreadNotificationsNudge",!0)}}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=d(n(28)),i=n(106),l=n(121),u=d(n(204)),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.channel;return a.createElement(a.Fragment,null,!0===(null===(t=n.threadMetadata)||void 0===t?void 0:t.archived)?null:b(g.default,{channel:n}),b(N,{channel:n}),b(_.default.Icon,{icon:v.default,tooltip:O.default.Messages.CLOSE,onClick:function(){return E.default.closeThreadSidebar(n.parent_id)}}))};var r,a=C(n(0)),o=I(n(8901)),i=I(n(8329)),l=I(n(8639)),u=I(n(8902)),s=I(n(9127)),d=I(n(8258)),f=C(n(8253)),c=n(42),p=I(n(278)),v=I(n(255)),y=I(n(8744)),m=I(n(8331)),_=I(n(8282)),h=n(121),E=I(n(8265)),g=I(n(10454)),S=n(1),O=I(n(6));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(){return(M=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}).apply(this,arguments)}function N(e){var t=e.channel,n=a.useState(!1),r=n[0],o=n[1];function i(){o((function(e){return!e}))}var l=O.default.Messages.MORE;return b(p.default,{shouldShow:r,animation:p.default.Animation.NONE,position:p.default.Positions.BOTTOM,align:p.default.Align.RIGHT,autoInvert:!1,onRequestClose:function(){return o(!1)},renderPopout:function(e){return a.createElement(A,M({},e,{channel:t}))}},void 0,(function(e,t){return a.createElement(_.default.Icon,M({},e,{onClick:i,tooltip:t?null:l,icon:m.default,"aria-label":l,selected:t}))}))}function A(e){var t=e.channel,n=e.closePopout,r=e.onSelect,a=(0,l.default)(t,"Sidebar Overflow"),p=(0,s.default)(t),v=(0,o.default)(t),m=(0,u.default)(t),_=(0,i.default)(t),E=(0,d.default)(t.id);function g(){(0,c.transitionToGuild)(t.guild_id,t.id)}return b(f.default,{navId:"thread-context",onClose:n,"aria-label":O.default.Messages.THREAD_ACTIONS_MENU_LABEL,onSelect:r},void 0,b(f.MenuGroup,{},void 0,a,p),b(f.MenuGroup,{},void 0,m,b(f.MenuItem,{id:"open",label:O.default.Messages.OPEN_IN_FULL_VIEW,action:g})),b(f.MenuGroup,{},void 0,b(f.MenuItem,{id:"search",label:O.default.Messages.SEARCH,icon:y.default,action:function(){g(),setTimeout((function(){h.ComponentDispatch.dispatch(S.ComponentActions.FOCUS_SEARCH,{prefillCurrentChannel:!1})}),2e3)}}),b(f.MenuItem,{id:"pins",label:O.default.Messages.PINS,icon:y.default,action:function(){g(),h.ComponentDispatch.dispatch(S.ComponentActions.TOGGLE_CHANNEL_PINS)}})),b(f.MenuGroup,{},void 0,v,_),b(f.MenuGroup,{},void 0,E))}N.displayName="OverflowMenuButton",A.displayName="OverflowMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=j(n(9)),i=j(n(8)),l=U(n(680)),u=n(3),s=j(n(184)),d=n(389),f=n(9105),c=j(n(8406)),p=j(n(105)),v=j(n(106)),y=n(1246),m=j(n(8322)),_=j(n(8264)),h=j(n(8268)),E=U(n(8731)),g=j(n(160)),S=j(n(8582)),O=j(n(278)),I=n(1230),T=j(n(8436)),C=j(n(1210)),b=n(121),M=n(48),N=j(n(43)),A=j(n(8725)),P=U(n(8357)),R=j(n(8412)),L=n(1),D=j(n(6)),w=j(n(7406));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(){return(B=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}).apply(this,arguments)}function H(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,x(e,t)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var V=N.default.getEnableHardwareAcceleration(),W={x:38,y:11,targetWidth:232,targetHeight:40,offset:{x:0,y:0}},Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).renderUserContextMenu=function(e){(0,d.openContextMenu)(e,(function(e){return a.createElement(m.default,B({},e,{user:t.props.user,guildId:t.props.guildId,channelId:t.props.channel.id,showMediaItems:!0,popoutPosition:O.default.Positions.LEFT}))}))},t.handleShiftClick=function(){var e=t.props,n=e.user,r=n.username,a=n.tag,o=e.channel.id,i="@"+(g.default.hidePersonalInformation?r:a);b.ComponentDispatch.dispatchToLastSubscribed(L.ComponentActions.INSERT_TEXT,{content:i}),c.default.startTyping(o)},t.openGuildSubscriptionModal=function(e){var n=t.props.guildId;null!=n&&(e.stopPropagation(),(0,I.openFullScreenLayer)((function(e){var t=e.transitionState,r=e.closeLayer;return F(R.default,{layerTransitionState:t,close:r,guildId:n,locationSection:L.AnalyticsSections.MEMBER_LIST})})))},t.renderUserPopout=function(e){return a.createElement(h.default,B({},e,{userId:t.props.user.id,guildId:t.props.guildId,channelId:t.props.channel.id}))},t}H(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!(0,s.default)(this.props,e,["channelId"])},n.render=function(){var e=this,t=this.props,n=t.colorString,r=t.isOwner,o=t.nick,i=t.user,l=t.activities,u=t.applicationStream,s=t.status,d=t.channel,f=t.guildId,c=t.isTyping,p=t.isMobileOnline,v=t.premiumSince,y=G(t,["colorString","isOwner","nick","user","activities","applicationStream","status","channel","guildId","isTyping","isMobileOnline","premiumSince"]),m=null!=v?new Date(v):null;return F(O.default,{preload:function(){return(0,_.default)(i.id,i.getAvatarURL(f))},renderPopout:this.renderUserPopout,position:O.default.Positions.LEFT,spacing:16,onShiftClick:this.handleShiftClick},void 0,(function(t,v){return a.createElement(A.default,B({onContextMenu:e.renderUserContextMenu,shouldAnimateStatus:V,user:i,nick:o,status:s,activities:l,applicationStream:u,isOwner:r,premiumSince:m,colorString:n,isTyping:c,channel:d,guildId:f,isMobile:p,onClickPremiumGuildIcon:e.openGuildSubscriptionModal,selected:v,itemProps:y},t))}))},t}(a.Component);Y.displayName="ChannelMember";var z=a.memo((function(e){var t=e.channel,n=e.user,r=e.index,o=(0,l.useListItem)(""+r),i=(0,u.useStateFromStores)([S.default],(function(){return S.default.isTyping(t.id,n.id)}));return a.createElement(Y,B({},e,o,{isTyping:i}))})),K=a.memo((function(e){var t=e.id,n=e.title,r=e.count;return t===L.StatusTypes.UNKNOWN?F("div",{className:w.default.membersGroup},void 0,F("div",{className:w.default.memberGroupsPlaceholder})):F(T.default,{className:w.default.membersGroup,"aria-label":D.default.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:n,count:r})},void 0,F("span",{"aria-hidden":!0},void 0,n," — ",r))}));function $(e){var t=e.index,n=(0,l.useListItem)(""+t);return F(A.default,{itemProps:n})}$.displayName="ChannelMemberPlaceholder";var Z=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._list=null,t.setList=function(e){t._list=e,t.props.listRef.current=e},t.renderSection=function(e){var n=e.section,r=t.props.groups[n];return 0===n?F(P.default,{tutorialId:"whos-online",position:P.TutorialIndicatorPositions.LEFT,inlineSpecs:W},"section-"+n,a.createElement(K,r)):a.createElement(K,B({},r,{key:"section-"+n}))},t.getRowProps=function(e){var n=t.props,r=n.groups,a=n.rows,o=r[e.section];if(null==o)return null;var i=o.index;return null==i||"row"!==e.type?null:a[i+1+e.row]},t.renderRow=function(e){var n=e.section,r=e.row,a=e.rowIndex,o=t.props.channel,i=t.getRowProps(e);if(null!=i&&i.type===E.MemberListRowTypes.MEMBER&&"user"in i){var l=i.colorString,u=i.user,s=i.status,d=i.isOwner,f=i.isMobileOnline,c=i.nick,p=i.activities,v=i.applicationStream,y=i.premiumSince;return F(z,{colorString:l,user:u,status:s,isOwner:d,nick:c,activities:p,applicationStream:v,channel:o,guildId:o.guild_id,premiumSince:y,isMobileOnline:f,index:a},"member-"+i.user.id)}return F($,{index:a},"placeholder-"+n+":"+r)},t.handleScroll=function(){t.updateSubscription()},t.updateSubscription=i.default.debounce((function(){if(null!=t._list){var e=t.props.channel,n=t.getDimensions(),r=n.rowHeight,a=n.y,o=n.height;(0,f.subscribeChannelDimensions)(e.guild_id,e.id,a,o,r)}}),50),t.trackMemberListViewed=function(){var e;if(t.lastReportedAnalyticsChannel!==t.props.channel.id){var n=null===(e=t._list)||void 0===e?void 0:e.getItems(),r=t.getDimensions().rowsVisible;if(void 0!==r&&0!==r&&null!=n){var a=n.map((function(e){return t.getRowProps(e)})).slice(0,r+1).filter(M.isNotNullish);if(0!==a.length){var o=a.reduce((function(e,t){return t.type!==E.MemberListRowTypes.MEMBER||(e.num_users_visible++,t.isMobileOnline&&e.num_users_visible_with_mobile_indicator++,null!=t.activities&&t.activities.length>0&&(e.num_users_visible_with_activity++,t.activities.some((function(e){return e.type===L.ActivityTypes.PLAYING}))&&e.num_users_visible_with_game_activity++)),e}),{num_users_visible:0,num_users_visible_with_mobile_indicator:0,num_users_visible_with_game_activity:0,num_users_visible_with_activity:0});t.lastReportedAnalyticsChannel=t.props.channel.id,v.default.trackWithMetadata(L.AnalyticEvents.MEMBER_LIST_VIEWED,B({},o))}}}},t}H(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return e.channel.id!==this.props.channel.id||e.version!==this.props.version||e.groups.length!==this.props.groups.length},n.componentDidMount=function(){this.updateSubscription(),this.trackMemberListViewed()},n.componentDidUpdate=function(e){e.channel.id!==this.props.channel.id&&this.updateSubscription(),this.trackMemberListViewed()},n.getDimensions=function(){var e=this._list;if(null==e)return{y:0,height:0,rowHeight:0};var t=e.getScrollerState(),n=t.offsetHeight,r=t.scrollTop;return{height:n,rowHeight:44,rowsVisible:Math.floor(n/44),y:r}},n.render=function(){var e=this,t=this.props,n=t.groups,r=t.listId,i=this.context,l=i.ref,u=G(i,["ref"]);return F(y.FocusJumpSection,{},void 0,(function(t){return F("div",{className:(0,o.default)(w.default.membersWrap,w.default.hiddenMembers)},void 0,a.createElement(C.default,B({key:r,ref:function(t){var n;e._list=t,e.props.listRef.current=t,l.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null},className:w.default.members,paddingTop:0,sectionHeight:40,rowHeight:44,renderSection:e.renderSection,renderRow:e.renderRow,"aria-label":D.default.Messages.MEMBERS,sections:n.map((function(e){return e.count})),onScroll:e.handleScroll,fade:!0},u,t)))}))},t}(a.Component);Z.displayName="ChannelMembers",Z.contextType=l.ListContainerContext;t.default=function(e){var t=e.channel,n=(0,u.useStateFromStores)([p.default],(function(){return p.default.keyboardModeEnabled})),r=(0,u.useStateFromStoresObject)([E.default],(function(){return E.default.getProps(t.guild_id,t.id)})),o=r.rows,i=r.groups,s=a.useRef(null),d=a.useCallback((function(e,t){var n=s.current;if(null!=n){var r=parseInt(t,10),a=n.getSectionRowFromIndex(r),o=a[0],i=a[1],l=0===o&&0===i?44:0;n.scrollToIndex({section:o,row:i,padding:l,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}}),[]),f=a.useCallback((function(){return new Promise((function(e){var t=s.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),c=a.useCallback((function(){return new Promise((function(e){var t=s.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]),v=(0,l.default)({id:"members-"+t.id,setFocus:d,isEnabled:n,scrollToStart:f,scrollToEnd:c});return F(l.ListNavigatorProvider,{navigator:v},void 0,a.createElement(Z,B({},e,r,{groups:i,rows:o,listRef:s})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=m(n(1166)),l=m(n(106)),u=m(n(8307)),s=m(n(24)),d=m(n(8318)),f=n(1),c=m(n(6)),p=m(n(8095)),v=m(n(10351)),y=m(n(11387));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=((r={})[f.ThemeTypes.DARK]=v.default,r[f.ThemeTypes.LIGHT]=y.default,r),g=h(o.Fragment,{}),S=h(d.default.Icon,{icon:u.default,"aria-hidden":!0}),O=function(){var e=(0,i.default)();return o.useEffect((function(){l.default.trackWithMetadata(f.AnalyticEvents.GUILD_OUTAGE_VIEWED,{})}),[]),h("div",{className:p.default.container},void 0,h(d.default,{toolbar:g},void 0,S,h(d.default.Title,{},void 0,c.default.Messages.GUILD_UNAVAILABLE_HEADER)),h("div",{className:p.default.content},void 0,h("img",{alt:"",className:p.default.splashImage,src:E[e]}),h(s.default,{className:p.default.splashHeader,size:s.default.Sizes.SIZE_24},void 0,c.default.Messages.GUILD_UNAVAILABLE_TITLE),h(s.default,{className:p.default.splashText,size:s.default.Sizes.SIZE_16},void 0,c.default.Messages.GUILD_UNAVAILABLE_BODY)))};O.displayName="ChannelUnavailable";var I=O;t.default=I},function(e,t,n){e.exports=n.p+"0e88c0d5ad220379d8e2438dd6444222.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r,a=v(n(0)),o=n(3),i=c(n(1339)),l=c(n(39)),u=v(n(8302)),s=c(n(151)),d=c(n(6)),f=c(n(8096));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.channelId;a.useEffect((function(){i.default.loadThread(t)}));var r,c=(0,o.useStateFromStores)([l.default],(function(){return l.default.theme}));return r=null!=t?y(s.default,{type:s.default.Type.SPINNING_CIRCLE}):y(u.EmptyStateText,{note:d.default.Messages.CHANNELS_UNAVAILABLE_BODY},void 0,d.default.Messages.CHANNELS_UNAVAILABLE_TITLE),y("div",{className:f.default.noChannel},void 0,y(u.default,{theme:c},void 0,y(u.EmptyStateImage,{darkSrc:n(11389),lightSrc:n(11390),width:272,height:222}),r))}m.displayName="EmptyChannel"},function(e,t,n){e.exports=n.p+"94b5558353f1d01035a874f6eddf6d70.svg"},function(e,t,n){e.exports=n.p+"25613a647083f6b2b196f40f58732de6.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(389),l=O(n(8930)),u=O(n(8264)),s=O(n(8268)),d=O(n(256)),f=O(n(70)),c=O(n(8582)),p=O(n(12)),v=O(n(278)),y=O(n(8436)),m=O(n(272)),_=n(11392),h=O(n(43)),E=O(n(8725)),g=O(n(6)),S=O(n(7406));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}var b=h.default.getEnableHardwareAcceleration();function M(e){var t=e.user,n=e.channel,r=(0,o.useStateFromStoresObject)([f.default,p.default,d.default],(function(){return f.default.isFriend(t.id)||t===p.default.getCurrentUser()?{status:d.default.getStatus(t.id),activities:d.default.getActivities(t.id)}:{}})),y=r.status,m=r.activities,_=(0,o.useStateFromStores)([c.default],(function(){return null!=c.default.getTypingUsers(n.id)[t.id]})),h=(0,o.useStateFromStores)([d.default],(function(){return d.default.isMobileOnline(t.id)})),S=(0,o.useStateFromStores)([f.default],(function(){return f.default.getNickname(t.id)})),O=function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(l.default,C({},e,{user:t,channel:n}))}))};return T(v.default,{preload:function(){return(0,u.default)(t.id,t.getAvatarURL(void 0))},renderPopout:function(e){return a.createElement(s.default,C({},e,{userId:t.id,channelId:n.id}))},position:v.default.Positions.LEFT},void 0,(function(e){return a.createElement(E.default,C({key:t.id,user:t,isOwner:t.id===n.ownerId,ownerTooltipText:g.default.Messages.GROUP_OWNER,shouldAnimateStatus:b,isTyping:_,status:y,activities:m,channel:n,onContextMenu:O,isMobile:h,nick:S},e))}))}function N(e){var t=e.channel,n=(0,o.useStateFromStores)([p.default],(function(){return(0,_.getRecipients)(t.recipients,p.default)}),[t.recipients]);return T("div",{className:S.default.membersWrap},void 0,T(m.default,{className:S.default.members,fade:!0},void 0,T(y.default,{className:S.default.membersGroup},void 0,g.default.Messages.MEMBERS+"—"+n.length),n.map((function(e){return a.createElement(M,C({},e,{channel:t}))}))))}M.displayName="PrivateChannelRecipient",N.displayName="PrivateChannelRecipients"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRecipients=function(e,t){return(0,a.default)(e).map(t.getUser).unshift(t.getNullableCurrentUser()).filter(o.isNotNullish).sortBy((function(e){return e.username.toLowerCase()})).map((function(e){return{key:e.id,user:e}})).value()};var r,a=(r=n(8))&&r.__esModule?r:{default:r},o=n(48)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=ee;var r,a=Y(n(0)),o=V(n(9)),i=V(n(8)),l=Y(n(680)),u=n(3),s=n(389),d=V(n(8406)),f=V(n(105)),c=n(1246),p=n(1209),v=n(11394),y=V(n(10458)),m=V(n(9226)),_=V(n(8264)),h=V(n(8268)),E=V(n(163)),g=V(n(56)),S=V(n(256)),O=V(n(479)),I=V(n(160)),T=V(n(8582)),C=V(n(12)),b=V(n(278)),M=V(n(8750)),N=V(n(1221)),A=V(n(696)),P=n(1230),R=V(n(47)),L=V(n(8436)),D=V(n(24)),w=V(n(1210)),j=n(121),k=V(n(43)),U=V(n(8725)),G=V(n(8412)),F=n(1),B=V(n(6)),H=V(n(7406)),x=V(n(8097));function V(e){return e&&e.__esModule?e:{default:e}}function W(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return W=function(){return e},e}function Y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=W();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function z(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function K(){return(K=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}).apply(this,arguments)}var $=k.default.getEnableHardwareAcceleration();function Z(e){var t=e.channel,n=e.sectionId,r=e.userId,o=(0,u.useStateFromStores)([T.default],(function(){return T.default.isTyping(t.id,r)})),i=(0,u.useStateFromStores)([g.default],(function(){return g.default.getMember(t.guild_id,r)})),f=(0,u.useStateFromStores)([C.default],(function(){return C.default.getUser(r)})),c=(0,u.useStateFromStores)([C.default],(function(){return C.default.getNullableCurrentUser()})),p=(null==f?void 0:f.id)===(null==c?void 0:c.id),v=(0,u.useStateFromStores)([S.default,O.default],(function(){return p?O.default.getStatus():S.default.getStatus(r,t.guild_id)})),M=(0,u.useStateFromStores)([S.default],(function(){return S.default.isMobileOnline(r)})),N=(0,u.useStateFromStores)([S.default,O.default],(function(){return p?O.default.getActivities():S.default.getActivities(r,t.guild_id)})),A=(0,u.useStateFromStores)([E.default],(function(){return E.default.getStreamForUser(r)})),R=(0,l.useListItem)(r),L=(0,u.useStateFromStores)([y.default],(function(){return y.default.canUserViewChannel(t.id,n,r)})),D=a.useCallback((function(e){null!=f&&(0,s.openContextMenu)(e,(function(e){return a.createElement(m.default,K({},e,{user:f,guildId:t.guild_id,channelId:t.id,popoutPosition:b.default.Positions.LEFT}))}))}),[f,t]),w=a.useCallback((function(){if(null!=f){var e="@"+(I.default.hidePersonalInformation?f.username:f.tag);j.ComponentDispatch.dispatchToLastSubscribed(F.ComponentActions.INSERT_TEXT,{content:e}),d.default.startTyping(t.id)}}),[f,t]),k=a.useCallback((function(e){e.stopPropagation(),(0,P.openFullScreenLayer)((function(e){var n=e.transitionState,r=e.closeLayer;return z(G.default,{layerTransitionState:n,close:r,guildId:t.guild_id,locationSection:F.AnalyticsSections.MEMBER_LIST})}))}),[t.guild_id]);if(null==f)return null;var H=null==i?void 0:i.premiumSince;return z(b.default,{preload:function(){return(0,_.default)(f.id,f.getAvatarURL(t.guild_id))},renderPopout:function(e){return a.createElement(h.default,K({},e,{userId:f.id,guildId:t.guild_id,channelId:t.id}))},position:b.default.Positions.LEFT,spacing:16,onShiftClick:w},void 0,(function(e,n){return a.createElement(U.default,K({onContextMenu:D,shouldAnimateStatus:$,user:f,nick:null==i?void 0:i.nick,status:v,activities:N,colorString:null==i?void 0:i.colorString,isTyping:o,channel:t,guildId:t.guild_id,isMobile:M,selected:n,applicationStream:A,premiumSince:null==H?null:new Date(H),onClickPremiumGuildIcon:k,itemProps:R,lostPermissionTooltipText:L?void 0:B.default.Messages.THREAD_MEMBER_WITHOUT_ACCESS},e))}))}Z.displayName="ThreadMember";var q=z(N.default,{width:12,height:12});var X=a.memo(Z),J=a.memo((function(e){var t=e.id,n=e.label,r=e.count;return t===F.StatusTypes.UNKNOWN?z("div",{className:H.default.membersGroup},void 0,z("div",{className:H.default.memberGroupsPlaceholder})):z(L.default,{className:H.default.membersGroup,"aria-label":B.default.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:n,count:r})},void 0,z("span",{"aria-hidden":!0},void 0,n," — ",r))})),Q=a.memo((function(e){return e.channel.type===F.ChannelTypes.PRIVATE_THREAD?a.createElement(a.Fragment,null,z("div",{className:x.default.divider}),z(D.default,{size:D.default.Sizes.SIZE_12,color:D.default.Colors.HEADER_SECONDARY,className:x.default.private},void 0,q," ",B.default.Messages.THREAD_BROWSER_PRIVATE),z(D.default,{size:D.default.Sizes.SIZE_14,color:D.default.Colors.HEADER_SECONDARY,className:x.default.instructions},void 0,B.default.Messages.MEMBER_LIST_PRIVATE_THREAD_INSTRUCTIONS)):null}));function ee(e){var t=e.channel,n=e.guild,r="members-"+t.id,s=(0,p.useCanSeeThreads)(),d=(0,v.useThreadMemberListSections)(t.id,n),y=d.filter((function(e){return e.userIds.length>0})).reverse()[0],m=function(e){var t=(0,u.useStateFromStores)([f.default],(function(){return f.default.keyboardModeEnabled})),n=a.useRef(null),r=a.useCallback((function(e,t){var r=n.current;if(null!=r){var a=parseInt(t,10),o=r.getSectionRowFromIndex(a),i=o[0],l=o[1],u=0===i&&0===l?44:0;r.scrollToIndex({section:i,row:l,padding:u,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}}),[]),o=a.useCallback((function(){return new Promise((function(e){var t=n.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),i=a.useCallback((function(){return new Promise((function(e){var t=n.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]);return{navigator:(0,l.default)({id:e,setFocus:r,isEnabled:t,scrollToStart:o,scrollToEnd:i}),listRef:n}}(r),_=m.navigator,h=m.listRef,E=0===d.length||d.every((function(e){return 0===e.userIds.length}));if(!s)return null;if(E)return re;var g=i.default.omit(_.containerProps,["ref"]),S=z(Q,{channel:t},"footer");return z(l.ListNavigatorProvider,{navigator:_},void 0,z(c.FocusJumpSection,{},void 0,(function(e){return z("div",{className:(0,o.default)(H.default.membersWrap,H.default.hiddenMembers)},void 0,a.createElement(w.default,K({key:r,ref:h,className:H.default.members,paddingTop:0,sectionHeight:40,renderSection:function(e){var t=e.section,n=d[t];return z(J,{id:n.id,label:n.label,count:n.userIds.length},n.id)},rowHeight:44,renderRow:function(e){var n=e.section,r=e.row,a=d[n],o=a.userIds,i=a.id;return z(X,{channel:t,sectionId:i,userId:o[r]},o[r])},footerHeight:function(e){return d[e]===y&&t.type===F.ChannelTypes.PRIVATE_THREAD?80:0},renderFooter:function(e){return d[e.section]===y?S:null},"aria-label":B.default.Messages.MEMBERS,sections:d.map((function(e){return e.userIds.length})),fade:!0},g,e)))})))}ee.displayName="ThreadMembers";var te=z(A.default,{width:32,height:32});function ne(){return z("div",{className:(0,o.default)(H.default.membersWrap,H.default.hiddenMembers,H.default.members,x.default.emptyState)},void 0,z(D.default,{className:x.default.emptyStateHeader,size:D.default.Sizes.SIZE_12,color:D.default.Colors.INTERACTIVE_NORMAL},void 0,B.default.Messages.MEMBERS),z("div",{className:x.default.emptyStateIconContainer},void 0,z("div",{className:x.default.emptyStateIcon},void 0,te),z(M.default,{className:x.default.emptyStateStars})),z(R.default,{size:R.default.Sizes.SIZE_16},void 0,B.default.Messages.THREAD_MEMBER_LIST_EMPTY_STATE_HEADER),z(D.default,{className:x.default.emptyStateSubtext,size:D.default.Sizes.SIZE_14,color:D.default.Colors.HEADER_SECONDARY},void 0,B.default.Messages.THREAD_MEMBER_LIST_EMPTY_STATE_SUBTEXT))}ne.displayName="EmptyState";var re=z(ne,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useThreadMemberListSections=function(e,t){(0,o.useStateFromStores)([i.default],(function(){return i.default.getMemberListVersion(e)}));var n=(0,o.useStateFromStores)([i.default],(function(){return i.default.getMemberListSections(e)})),u=r.useMemo((function(){var e=(0,a.default)(t.roles).values().filter((function(e){return e.hoist})).sortBy((function(e){return e.position})).reverse().map((function(e){return e.id})).value();return e.push("online","offline"),e}),[t.roles]);return null==n?[]:u.map((function(e){var r,a,o=t.roles[e];return{label:"online"===e?l.default.Messages.STATUS_ONLINE:"offline"===e?l.default.Messages.STATUS_OFFLINE:o.name,userIds:null!==(r=null===(a=n[e])||void 0===a?void 0:a.userIds)&&void 0!==r?r:[],id:e}}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(8)),o=n(3),i=u(n(10458)),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"MINIMUM_RANGE",{enumerable:!0,get:function(){return o.MINIMUM_RANGE}}),Object.defineProperty(t,"DEFAULT_RANGES",{enumerable:!0,get:function(){return o.DEFAULT_RANGES}}),t.default=void 0;var r=d(n(8)),a=n(57),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(9106)),i=d(n(11396)),l=d(n(11397)),u=n(1);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(){return(f=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}).apply(this,arguments)}function c(e){return null!=e&&"null"!==e&&e!==u.ME&&"undefined"!==e}var p=function(){function e(e){var t=this;this._members=new i.default((function(e,n){return t._enqueue(e,{members:n})})),this._channels=new o.default((function(e,n){return t._enqueue(e,{channels:n})})),this._threadMemberLists=new l.default((function(e,n){return t._enqueue(e,{thread_member_lists:n})})),this._typing=new Set,this._threads=new Set,this._activities=new Set,this._subscribed=new Set,this._pending={},this._flush=new a.DelayedCall(0,(function(){return t.flush()})),this._onChange=e}var t=e.prototype;return t._enqueue=function(e,t){this._pending[e]=f({},this._pending[e],{},t),this._flush.delay()},t.reset=function(){this._subscribed.clear(),this._pending={},this._members.reset(),this._channels.reset(),this._threadMemberLists.reset(),this._typing.clear(),this._threads.clear(),this._activities.clear()},t.get=function(e){return{typing:this._typing.has(e),threads:this._threads.has(e),activities:this._activities.has(e),members:this._members.get(e),channels:this._channels.get(e),thread_member_lists:this._threadMemberLists.get(e)}},t.getSubscribedThreadIds=function(){return this._threadMemberLists.getSubscribedThreadIds()},t.forEach=function(e){this._subscribed.forEach(e)},t.clear=function(e){this._subscribed.delete(e),delete this._pending[e],this._members.clear(e),this._channels.clear(e),this._threadMemberLists.clear(e),this._typing.delete(e),this._threads.delete(e),this._activities.delete(e)},t.flush=function(){var e=this;r.default.forEach(this._pending,(function(t,n){e._subscribed.add(n),e._onChange(n,t)})),this._pending={}},t.subscribeUser=function(e,t){c(e)&&this._members.subscribe(e,t)},t.unsubscribeUser=function(e,t){c(e)&&this._members.unsubscribe(e,t)},t.subscribeChannel=function(e,t,n){return!!c(e)&&this._channels.subscribe(e,t,n)},t.subscribeThreadMemberList=function(e,t,n){return!!c(e)&&this._threadMemberLists.subscribe(e,t,n)},t.unsubscribeThreadMemberList=function(e,t){return!!c(e)&&this._threadMemberLists.unsubscribe(e,t)},t.subscribeToGuild=function(e){this._subscribeToFeature(e,this._typing,{typing:!0}),this._subscribeToFeature(e,this._activities,{activities:!0}),this._subscribeToFeature(e,this._threads,{threads:!0})},t._subscribeToFeature=function(e,t,n){c(e)&&(t.has(e)||(t.add(e),this._enqueue(e,n)))},e}();t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(8)),a=n(57),o=i(n(26));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e){var t=this;this._subscriptions={},this._unsubscriptions={},this._unsubscribe=new a.DelayedCall(6e4,(function(){return t.flushUnsubscriptions()})),this._onChange=e}var t=e.prototype;return t.reset=function(){this._subscriptions={},this._unsubscriptions={},this._unsubscribe.cancel()},t.get=function(e){var t=this._subscriptions[e]||{};return r.default.keys(t)},t.clear=function(e){delete this._subscriptions[e],delete this._unsubscriptions[e]},t.subscribe=function(e,t){var n=this._subscriptions[e]||{};n[t]=(n[t]||0)+1,this._subscriptions[e]=n,1===n[t]&&this._onChange(e,this.get(e)),this.checkForLeaks(e,t)},t.isSubscribed=function(e,t){return null!=this._subscriptions[e]&&null!=this._subscriptions[e][t]},t.unsubscribe=function(e,t){if(this.isSubscribed(e,t)){var n=this._unsubscriptions[e]||{};n[t]=(n[t]||0)+1,this._unsubscriptions[e]=n,1===n[t]&&this._unsubscribe.delay(!1)}},t.checkForLeaks=function(e,t){var n=(this._subscriptions[e]&&this._subscriptions[e][t]||0)-(this._unsubscriptions[e]&&this._unsubscriptions[e][t]||0);n>5&&new o.default("GuildMemberSubscriptions").warn("GuildMemberSubscriptions.subscribe(...): Potential reference leak! ("+n+" subscriptions)")},t.flushUnsubscriptions=function(){var e=this;r.default.isEmpty(this._unsubscriptions)||(r.default.forEach(this._unsubscriptions,(function(t,n){var a=e._subscriptions[n];r.default.forEach(t,(function(e,t){a[t]=(a[t]||0)-e,a[t]<=0&&delete a[t]})),r.default.isEmpty(a)&&delete e._subscriptions[n],e._onChange(n,e.get(n))})),this._unsubscriptions={})},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(404))&&r.__esModule?r:{default:r};function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(){function e(e){this._subscriptions={},this._onChange=e}var t=e.prototype;return t.reset=function(){(window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Resetting subscriptions"),this._subscriptions={}},t.get=function(e){return this._get(e).keys()},t.getSubscribedThreadIds=function(){var e=new Set;for(var t in this._subscriptions)for(var n,r=o(this._subscriptions[t].keys());!(n=r()).done;){var a=n.value;e.add(a)}return e},t._get=function(e){return this._subscriptions[e]||new a.default({max:3,updateAgeOnGet:!0})},t.clear=function(e){(window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Clearing subscriptiongs for "+e),e in this._subscriptions&&(delete this._subscriptions[e],this._onChange(e,[]))},t.subscribe=function(e,t,n){var r=this._get(e);return r.has(t)?((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Subscribing to "+t),r.set(t,Date.now()),!1):(null!=n&&r.has(n)&&((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Marking selected channel "+t),r.set(n,Date.now())),r.set(t,Date.now()),(window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Setting "+t),this._subscriptions[e]=r,this._onChange(e,r.keys()),!0)},t.unsubscribe=function(e,t){if(!(e in this._subscriptions))return!1;var n=this._subscriptions[e];return!!n.has(t)&&((window.__THREAD_DEBUG_LOG||(window.__THREAD_DEBUG_LOG=[])).push(new Date+" THREAD_DEBUG: Unsubscribing from "+t),n.del(t),this._onChange(e,n.keys()),!0)},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(9186)),i=f(n(1268)),l=f(n(696)),u=n(8282),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.channelId,n=(0,a.useStateFromStores)([i.default],(function(){return i.default.getSection(t)}));return p(u.Icon,{tooltip:d.default.Messages.MEMBER_LIST,icon:l.default,onClick:o.default.toggleMembersSection,selected:n===s.ChannelSections.MEMBERS})}v.displayName="ChannelMembersButton"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(3)),i=p(n(8477)),l=p(n(181)),u=p(n(8666)),s=p(n(9726)),d=p(n(8282)),f=p(n(6)),c=p(n(8098));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleClick=function(){var e=t.props,n=e.channel,r=e.isMuted;i.default.updateChannelOverrideSettings(n.getGuildId(),n.id,{muted:!r})},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n),r.prototype.render=function(){var e=this.props,t=e.channel,n=e.isMuted;return y(d.default.Icon,{tooltip:n?f.default.Messages.CHANNEL_UNMUTE_TOOLTIP:f.default.Messages.CHANNEL_MUTE_TOOLTIP,icon:n?s.default:u.default,foreground:n?c.default.strikethrough:null,onClick:this.handleClick,role:"switch","aria-checked":n,"aria-label":f.default.Messages.CHANNEL_MUTE_LABEL.format({channelName:t.name})})},r}(a.PureComponent);_.displayName="ChannelMuteButton";var h=o.default.connectStores([l.default],(function(e){var t=e.channel;return{isMuted:l.default.isChannelMuted(t.getGuildId(),t.id)}}))(_);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=m(n(11401)),l=m(n(8770)),u=m(n(200)),s=m(n(12)),d=m(n(278)),f=m(n(9225)),c=n(8282),p=n(121),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}function g(e){var t=e.channel,n=(0,o.useStateFromStores)([l.default,s.default],(function(){return t.isNSFW()&&(!s.default.getCurrentUser().nsfwAllowed||!l.default.didAgree(t.getGuildId()))}),[t]),r=a.useState(!1),m=r[0],_=r[1],g=(0,o.useStateFromStores)([u.default],(function(){return u.default.hasUnreadPins(t.id)}),[t]),S=a.useCallback((function(){n||_((function(e){return!e}))}),[n]);function O(e){(null==e?void 0:e.shiftKey)||p.ComponentDispatch.dispatch(v.ComponentActions.POPOUT_CLOSE)}return a.useEffect((function(){return p.ComponentDispatch.subscribe(v.ComponentActions.TOGGLE_CHANNEL_PINS,S),function(){p.ComponentDispatch.unsubscribe(v.ComponentActions.TOGGLE_CHANNEL_PINS,S)}}),[S]),h(d.default,{shouldShow:m,animation:d.default.Animation.NONE,position:d.default.Positions.BOTTOM,align:d.default.Align.RIGHT,autoInvert:!1,onRequestClose:function(){return _(!1)},renderPopout:function(e){return a.createElement(i.default,E({},e,{onJump:O,channel:t}))}},void 0,(function(e,t){return a.createElement(c.Icon,E({},e,{onClick:S,tooltip:t?null:y.default.Messages.PINNED_MESSAGES,icon:f.default,"aria-label":y.default.Messages.PINNED_MESSAGES,disabled:n,showBadge:g,selected:t}))}))}g.displayName="ChannelPinsButton";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var r,a=_(n(0)),o=n(3),i=y(n(8581)),l=y(n(9221)),u=y(n(200)),s=y(n(12)),d=y(n(282)),f=_(n(8758)),c=y(n(8487)),p=n(1),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.channel,r=e.onJump,y=(0,o.useStateFromStoresObject)([l.default],(function(){var e=l.default.getPinnedMessages(t.id),n=null!=e?e.messages:[];return{messages:n,loading:null==n||null!=e&&e.loading}})),m=y.messages,_=y.loading,E=(0,o.useStateFromStores)([u.default],(function(){return u.default.hasUnreadPins(t.id)})),g=(0,o.useStateFromStores)([s.default],(function(){var e=s.default.getUser(t.getRecipientId());return null!=e?e.username:null}));return a.useEffect((function(){E&&i.default.ackPins(t.id)}),[E,t.id]),h(d.default,{"aria-label":v.default.Messages.PINNED_MESSAGES},void 0,h(f.default,{onFetch:function(){i.default.ackPins(t.id),i.default.fetchPins(t.id)},channel:t,messages:m,loading:_,analyticsName:"Channel Pins",onCloseMessage:function(e,n){null!=e&&(n.shiftKey?i.default.unpinMessage(t,e.id):c.default.confirmUnpin(t,e))},onJump:r,getProTip:function(){return t.isPrivate()?t.type===p.ChannelTypes.DM?v.default.Messages.PINNED_MESSAGES_PRO_TIP_BODY_DM.format({other:g}):v.default.Messages.PINNED_MESSAGES_PRO_TIP_BODY_GROUP_DM:v.default.Messages.PINNED_MESSAGES_PRO_TIP_BODY_CHANNEL},renderHeader:function(){return h(f.Header,{title:v.default.Messages.PINNED_MESSAGES})},renderEmptyState:function(e){var r=v.default.Messages.NO_PINS_IN_CHANNEL;t.isPrivate()&&(r=v.default.Messages.NO_PINS_IN_DM);var a=e===p.ThemeTypes.LIGHT?n(11402):n(11403);return h(f.EmptyStateCenter,{msg:r,image:a},"emptystate")},listName:"pins"}))}E.displayName="ChannelPins"},function(e,t,n){e.exports=n.p+"03c7541028afafafd1a9f6a81cb7f149.svg"},function(e,t,n){e.exports=n.p+"6793e022dc1b065b21f12d6df02f91bd.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(3)),i=n(34),l=O(n(728)),u=O(n(132)),s=O(n(9230)),d=O(n(688)),f=O(n(8754)),c=O(n(303)),p=O(n(51)),v=O(n(70)),y=O(n(80)),m=O(n(149)),_=O(n(9147)),h=O(n(8313)),E=O(n(8282)),g=n(1),S=O(n(6));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleStartCall=function(e,n){var r=t.props,a=r.channel,o=r.notFriend,i=o?a.getRecipientId():null;l.default.call(a.id,n,!o&&!a.isManaged()&&e&&!e.shiftKey,i)},t.handleJoinCall=function(e){u.default.selectVoiceChannel(t.props.channel.id,e)},t.handleVoiceClick=function(e){var n=t.props,r=n.callUnavailable,a=n.callActive;if(!r)return a?t.handleJoinCall(!1):t.handleStartCall(e,!1)},t.handleStartVideoCall=function(e){t.handleStartCall(e,!0)},t.handleJoinVideoCall=function(){t.handleJoinCall(!0)},t.handleBrowserNotSupported=function(){(0,f.default)()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var o=r.prototype;return o.renderVideoCallButton=function(){var e=this.props,t=e.inCall,n=e.callActive,r=e.callUnavailable,a=e.channel,o=e.mode;if(t||n&&o===g.ChannelModes.VOICE)return null;var l,u=a.isManaged(),s=null,d=!1;return p.default.supports(i.Features.VIDEO)?n&&o===g.ChannelModes.VIDEO?(l=this.handleJoinVideoCall,s=u?S.default.Messages.CONNECT:S.default.Messages.JOIN_VIDEO_CALL):(l=this.handleStartVideoCall,s=u?S.default.Messages.CONNECT:S.default.Messages.START_VIDEO_CALL):(d=!0,l=this.handleBrowserNotSupported,s=S.default.Messages.BROWSER_NOT_SUPPORTED),T(E.default.Icon,{icon:h.default,onClick:l,disabled:d||r,tooltip:s})},o.renderVoiceCallButton=function(){var e=this.props,t=e.inCall,n=e.callActive,r=e.callUnavailable,a=e.channel;if(t)return null;var o,i=a.isManaged(),l=null,u=!1;return r?(l=i?S.default.Messages.VOICE_UNAVAILABLE:S.default.Messages.CALL_UNAVAILABLE,o=m.default.Colors.RED,u=!0):l=n?i?S.default.Messages.CONNECT:S.default.Messages.JOIN_VOICE_CALL:i?S.default.Messages.CONNECT:S.default.Messages.START_VOICE_CALL,T(E.default.Icon,{icon:_.default,onClick:this.handleVoiceClick,disabled:u,tooltip:l,tooltipColor:o})},o.render=function(){return T(a.Fragment,{},void 0,this.renderVoiceCallButton(),this.renderVideoCallButton())},r}(a.PureComponent);b.displayName="PrivateChannelCallButton";var M=(0,s.default)((function(e,t){var n;return(n={})[g.ComponentActions.CALL_START]=t.handleVoiceClick.bind(t),n}))(b),N=o.default.connectStores([c.default,y.default,v.default,d.default],(function(e){var t=e.channel,n=y.default.isInChannel(t.id),r=t.getRecipientId();return{channel:t,mode:d.default.getMode(t.id),inCall:n,callActive:c.default.isCallActive(t.id),callUnavailable:c.default.isCallUnavailable(t.id),notFriend:t.type===g.ChannelTypes.DM&&null!=r&&!v.default.isFriend(r)}}))(M);t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(192),i=m(n(3)),l=m(n(391)),u=m(n(8299)),s=n(5687),d=m(n(11406)),f=m(n(8257)),c=n(6056),p=m(n(9233)),v=n(1),y=m(n(7393));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).fetchStoreListing=function(e){var n=t.props,r=n.channel,a=n.inputSkuId;return null!=e?l.default.fetchChannelStoreListing(r.id,e):null!=a?l.default.fetchChannelStoreListing(r.id,a):l.default.fetchChannelStoreListing(r.id)},t.renderApplicationListing=function(e){var n=e.location,r=t.props,a=r.channel,o=r.skuId,i=r.width;return h(p.default,{channel:a,inputSkuId:o,fetchStoreListing:t.fetchStoreListing,location:n,pageSize:(0,c.getPageSize)(i)})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var a=r.prototype;return a.componentDidMount=function(){this.fetchStoreListing(),(0,s.trackAppUIViewed)("channel_store_listing")},a.render=function(){return null!=this.props.skuId?h(f.default,{page:v.AnalyticsPages.CHANNEL_STORE_LISTING,root:!0},void 0,h("div",{className:y.default.applicationStore},void 0,h(o.Route,{path:"*",render:this.renderApplicationListing}))):null},r}(a.Component);g.displayName="ChannelStoreListing";var S=(0,u.default)(i.default.connectStores([d.default],(function(e){var t=e.channel,n=e.inputSkuId;return{skuId:null!=n?n:d.default.getSkuIdForChannel(t.id)}}))(g));t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(3)),a=o(n(2));n(1);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l={};var u=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getSkuIdForChannel=function(e){return l[e]},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){l={}},STORE_LISTING_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.storeListing;null!=t&&(l[t]=n.sku.id)}});t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=_e(n(0)),o=n(192),i=n(3),l=n(34),u=ye(n(154)),s=ye(n(288)),d=ye(n(363)),f=_e(n(11408)),c=n(687),p=ye(n(1390)),v=ye(n(5848)),y=ye(n(11409)),m=ye(n(132)),_=ye(n(8956)),h=_e(n(8344)),E=ye(n(1343)),g=n(9156),S=_e(n(8786)),O=ye(n(473)),I=n(1228),T=ye(n(183)),C=_e(n(735)),b=ye(n(8377)),M=n(1148),N=ye(n(11410)),A=ye(n(8398)),P=ye(n(11411)),R=ye(n(11412)),L=ye(n(9729)),D=ye(n(11413)),w=n(5688),j=n(5697),k=ye(n(11414)),U=ye(n(9174)),G=ye(n(11)),F=ye(n(10)),B=ye(n(71)),H=ye(n(56)),x=ye(n(15)),V=ye(n(51)),W=ye(n(8955)),Y=ye(n(8359)),z=ye(n(94)),K=ye(n(107)),$=ye(n(12)),Z=ye(n(373)),q=ye(n(1167)),X=ye(n(271)),J=ye(n(55)),Q=ye(n(151)),ee=ye(n(5686)),te=ye(n(8825)),ne=n(41),re=_e(n(8678)),ae=ye(n(13)),oe=ye(n(93)),ie=ye(n(10222)),le=ye(n(96)),ue=ye(n(11415)),se=n(8837),de=_e(n(11416)),fe=n(11417),ce=n(1),pe=ye(n(6)),ve=ye(n(7894));function ye(e){return e&&e.__esModule?e:{default:e}}function me(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return me=function(){return e},e}function _e(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=me();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function he(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Ee=(0,M.registerUserExperiment)({id:M.Experiments.DOWNLOAD_NAG_COLOR,title:"Download Nag bar color",description:["Differentiate the download nag from the unclaimed nag via color","Control: orange nag (matches unclaimed)","Treatment 1: blurple nag"],buckets:[M.ExperimentBuckets.CONTROL,M.ExperimentBuckets.TREATMENT_1]}),ge=(0,M.registerUserExperiment)({id:M.Experiments.NOTIFICATION_NAG,title:"Notification Nag bar",description:["Nag about enabling notifications if the user chooses not to download the app","Control: no nag","Treatment 1: green nag bar + dont miss a thing msg","Treatment 2: green nag bar + keeping up msg"],buckets:[M.ExperimentBuckets.CONTROL,M.ExperimentBuckets.TREATMENT_1,M.ExperimentBuckets.TREATMENT_2]});function Se(){switch((0,M.useAndTrackExposureToUserExperiment)(Ee)){case M.ExperimentBuckets.TREATMENT_1:return re.NoticeColors.DOWNLOAD;default:return re.NoticeColors.DEFAULT}}function Oe(e){var t=e.children;return he(re.default,{color:Se()},void 0,t)}Oe.displayName="DownloadNagColor";var Ie=function(){return he(re.default,{color:re.NoticeColors.DANGER},void 0,he(re.NoticeCloseButton,{onClick:function(){Ce(),(0,fe.open)()}}),pe.default.Messages.NOTICE_NO_INPUT_DETECTED,he(re.NoticeButtonAnchor,{href:oe.default.getArticleURL(ce.HelpdeskArticles.NO_INPUT_DETECTED)},void 0,pe.default.Messages.NOTICE_NO_INPUT_DETECTED_HELP_LINK_TEXT))};Ie.displayName="AudioIssueNoticeHelpdesk";var Te=function(){return he(re.default,{color:re.NoticeColors.DANGER},void 0,he(re.NoticeCloseButton,{onClick:function(){Ce(),(0,fe.open)()}}),pe.default.Messages.NOTICE_NO_INPUT_DETECTED_SETTINGS,he(re.NoticeButton,{onClick:function(){(0,c.pushLayer)(ce.Layers.USER_SETTINGS),O.default.setSection(ce.UserSettingsSections.VOICE)}},void 0,pe.default.Messages.NOTICE_NO_INPUT_DETECTED_SETTINGS_LINK_TEXT))};function Ce(){p.default.dismiss()}Te.displayName="AudioIssueNoticeMicTester";var be=he(R.default,{}),Me=he(N.default,{}),Ne=he(k.default,{}),Ae=he(re.NoticeCloseButton,{onClick:Ce}),Pe=he(re.NoticeCloseButton,{onClick:Ce}),Re=he(re.NoticeCloseButton,{onClick:Ce}),Le=he(P.default,{onClose:Ce}),De=he(Ie,{}),we=he(Te,{}),je=he(re.NoticeCloseButton,{onClick:Ce}),ke=he(re.NoticeCloseButton,{onClick:Ce}),Ue=he(re.NoticeCloseButton,{onClick:Ce}),Ge=he(re.NoticeCloseButton,{onClick:Ce}),Fe=he(re.NoticeCloseButton,{onClick:Ce}),Be=he(re.NoticeCloseButton,{onClick:Ce}),He=he(re.NoticeCloseButton,{onClick:Ce}),xe=he(re.NoticeCloseButton,{onClick:Ce}),Ve=he(re.NoticeCloseButton,{onClick:Ce}),We=he(re.NoticeCloseButton,{onClick:Ce}),Ye=he(D.default,{dismissCurrentNotice:Ce}),ze=he(U.default,{}),Ke=he(re.NoticeCloseButton,{onClick:Ce}),$e=a.memo((function(){var e=(0,i.useStateFromStores)([$.default],(function(){return $.default.getNullableCurrentUser()})),t=(0,i.useStateFromStores)([K.default],(function(){return K.default.getGuildId()})),n=(0,i.useStateFromStores)([x.default],(function(){return x.default.getGuild(t)})),r=(0,i.useStateFromStores)([W.default],(function(){return W.default.getNotice()})),c=(0,i.useStateFromStores)([G.default],(function(){return G.default.isGuest()})),N=(0,i.useStateFromStores)([Y.default],(function(){return Y.default.getDesktopType()})),P=(0,i.useStateFromStores)([H.default],(function(){var n,r;return null!=t&&null!=e&&(null!==(n=null===(r=H.default.getMember(t,e.id))||void 0===r?void 0:r.isPending)&&void 0!==n&&n)})),R=null==r?void 0:r.type,D=P&&(null==n?void 0:n.hasFeature(ce.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED));if(a.useEffect((function(){null!=R&&function(e){ae.default.track(ce.AnalyticEvents.APP_NOTICE_VIEWED,{notice_type:e})}(R)}),[R]),a.useEffect((function(){if(null!=r&&r.type===ce.NoticeTypes.SURVEY&&null!=r.metadata){var e=r.metadata,t=M.ExperimentStore.getUserExperimentDescriptor(e.id);null!=t&&(0,M.trackExposureToExperiment)(e.id,t)}}),[r]),null==r)return null;if(c)return null;switch(r.type){case ce.NoticeTypes.LURKING_GUILD:return be;case ce.NoticeTypes.PENDING_MEMBER:return Me;case ce.NoticeTypes.INVITED_TO_SPEAK:return Ne;case ce.NoticeTypes.GENERIC:return he(re.default,{},void 0,Ae,r.message,null!=r.buttonText?he(re.NoticeButton,{onClick:r.callback},void 0,r.buttonText):null);case ce.NoticeTypes.VOICE_DISABLED:return he(re.default,{},void 0,he(re.NoticeCloseButton,{onClick:function(){y.default.clearRemoteDisconnectVoiceChannelId(),Ce()}}),pe.default.Messages.NOTICE_CONNECTION_CONFLICT,he(re.NoticeButton,{onClick:function(){var e=z.default.getRemoteDisconnectVoiceChannelId();null!=e&&(null!=F.default.getChannel(e)&&m.default.selectVoiceChannel(e))}},void 0,pe.default.Messages.RECONNECT));case ce.NoticeTypes.SPOTIFY_AUTO_PAUSED:var k=T.default.get(ce.PlatformTypes.SPOTIFY);return he(re.default,{color:re.NoticeColors.DANGER},void 0,Pe,he("img",{alt:"",className:ve.default.platformIcon,src:k.icon.white}),pe.default.Messages.NOTICE_SPOTIFY_AUTO_PAUSED,he(re.NoticeButton,{onClick:function(){return O.default.open(ce.UserSettingsSections.VOICE)}},void 0,pe.default.Messages.VOICE_SETTINGS),he(X.default,{className:ve.default.textLinkSmall,href:oe.default.getArticleURL(ce.HelpdeskArticles.SPOTIFY_AUTO_PAUSED),target:"_blank"},void 0,pe.default.Messages.NOTICE_WHATS_THIS));case ce.NoticeTypes.UNCLAIMED_ACCOUNT:return he(re.default,{},void 0,pe.default.Messages.NOTICE_UNCLAIMED_ACCOUNT,he(re.NoticeButton,{onClick:function(){return D&&null!=t?(0,A.default)(t):C.openClaimAccountModal()}},void 0,pe.default.Messages.CLAIM_ACCOUNT));case ce.NoticeTypes.UNVERIFIED_ACCOUNT:return he(re.default,{},void 0,pe.default.Messages.NOTICE_UNVERIFIED_ACCOUNT,he(re.NoticeButton,{onClick:function(){d.default.verifyResend(),u.default.show({title:pe.default.Messages.VERIFICATION_EMAIL_TITLE,body:pe.default.Messages.VERIFICATION_EMAIL_BODY.format({email:null==e?void 0:e.email}),minorText:pe.default.Messages.CHANGE_EMAIL,onConfirmSecondary:C.openClaimAccountModal})}},void 0,pe.default.Messages.RESEND));case ce.NoticeTypes.DOWNLOAD_NAG:return he(Oe,{},void 0,Re,pe.default.Messages.NOTICE_NATIVE_APPS_2020_06,he("i",{className:ve.default.iconApple}),he("i",{className:ve.default.iconAndroid}),he("i",{className:ve.default.iconWindows}),he(re.NoticeButton,{onClick:function(){var e=M.ExperimentStore.getUserExperimentDescriptor(ge.id);null!=e&&(0,M.trackExposureToExperiment)(ge.id,e),(0,I.showAppDownloadModal)("Top Bar Nag")}},void 0,pe.default.Messages.DOWNLOAD));case ce.NoticeTypes.NOTIFICATION_NAG:var U=M.ExperimentStore.getUserExperimentDescriptor(ge.id),fe=(null==U?void 0:U.bucket)===M.ExperimentBuckets.TREATMENT_1?pe.default.Messages.NOTICE_NOTIFICATION_MESSAGE:pe.default.Messages.NOTICE_NOTIFICATION_MESSAGE2;return he(re.default,{color:re.NoticeColors.NOTIFICATION},void 0,fe,he(re.NoticeButton,{onClick:function(){N===ce.DesktopNotificationTypes.NEVER?ie.default.requestPermission((function(e){var t=e?ce.NotificationPermissionTypes.ENABLED:ce.NotificationPermissionTypes.BLOCKED;v.default.setPermissionsState(t,"Notification Nag")})):v.default.setDesktopType(ce.DesktopNotificationTypes.ALL),ae.default.track(ce.AnalyticEvents.APP_NOTICE_CLOSED,{notice_type:ce.NoticeTypes.NOTIFICATION_NAG,action:"Enable",dismissed:!0}),p.default.dismiss(ce.NoticeTypes.NOTIFICATION_NAG,!1)}},void 0,pe.default.Messages.ENABLE_NOTIFICATIONS),he(re.NoticeButton,{minor:!0,onClick:function(){ae.default.track(ce.AnalyticEvents.APP_NOTICE_CLOSED,{notice_type:ce.NoticeTypes.NOTIFICATION_NAG,action:"Later",dismissed:!0}),p.default.dismiss(ce.NoticeTypes.NOTIFICATION_NAG,!0)}},void 0,pe.default.Messages.REMIND_ME_LATER),he(re.NoticeButton,{minor:!0,onClick:function(){ae.default.track(ce.AnalyticEvents.APP_NOTICE_CLOSED,{notice_type:ce.NoticeTypes.NOTIFICATION_NAG,action:"Dismiss",dismissed:!0}),p.default.dismiss(ce.NoticeTypes.NOTIFICATION_NAG,!1)}},void 0,pe.default.Messages.NEVER_ASK_AGAIN));case ce.NoticeTypes.INCENTIVIZED_INSTALL:return Le;case ce.NoticeTypes.SCHEDULED_MAINTENANCE:return null==r.metadata?null:he(re.default,{color:re.NoticeColors.NOTIFICATION},void 0,he(re.NoticeCloseButton,{onClick:function(){return _.default.ackScheduledMaintenance()}}),pe.default.Messages.NOTICE_SCHEDULED_MAINTENANCE.format(r.metadata),he(re.NoticeButtonAnchor,{href:ce.Links.STATUS+"/incidents/"+r.metadata.id},void 0,pe.default.Messages.LEARN_MORE));case ce.NoticeTypes.NO_INPUT_DETECTED:return V.default.supports(l.Features.LOOPBACK)?we:De;case ce.NoticeTypes.HARDWARE_MUTE:if(null==r.metadata)return null;var ye=r.metadata,me=ye.vendor,_e=ye.model;return he(re.default,{color:re.NoticeColors.DANGER},void 0,pe.default.Messages.NOTICE_HARDWARE_MUTE.format({vendorName:me.name,modelName:_e.name}),he(re.NoticeButtonAnchor,{href:_e.url,target:"_blank",rel:"noreferrer noopener"},void 0,pe.default.Messages.SUPPORT));case ce.NoticeTypes.STREAMER_MODE:return he(re.default,{color:re.NoticeColors.STREAMER_MODE},void 0,je,pe.default.Messages.NOTICE_STREAMER_MODE_TEXT,he(re.NoticeButton,{onClick:function(){return E.default.setEnabled(!1)}},void 0,pe.default.Messages.DISABLE));case ce.NoticeTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERK:if(null==r.metadata)return null;var Ee=r.metadata,Se=Ee.skuId,Ie=Ee.applicationId,Te=Z.default.get(Se),$e=B.default.getGame(Ie);if(null==Te||null==$e)return null;var Ze={page:ce.AnalyticsPages.IN_APP};return he(re.default,{color:re.NoticeColors.PREMIUM_TIER_1},void 0,he(re.NoticeCloseButton,{onClick:function(){return f.dismiss(Te.id)}}),he(ee.default,{className:ve.default.premiumIcon}),pe.default.Messages.NOTICE_DETECTED_OFF_PLATFORM_PREMIUM_PERK_MESSAGE.format({applicationName:$e.name,skuName:Te.name}),he(re.NoticeButton,{onClick:function(){return(0,se.openIAPPurchaseModal)($e.id,Te.id,(function(){(0,j.openPremiumSubscriptionNewPlanModal)({planId:ce.SubscriptionPlans.PREMIUM_MONTH_TIER_2,analyticsLocation:Ze})}),Ze,__OVERLAY__?ce.AppContext.OVERLAY:ce.AppContext.APP).then((function(){return f.dismiss(Te.id)}))}},void 0,pe.default.Messages.NOTICE_DETECTED_OFF_PLATFORM_PREMIUM_PERK_BUTTON));case ce.NoticeTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL:if(null==r.metadata)return null;var qe=r.metadata,Xe=qe.skuId,Je=qe.applicationId,Qe=Z.default.get(Xe),et=B.default.getGame(Je);return null==Qe||null==et?null:he(re.default,{color:re.NoticeColors.PREMIUM_TIER_1},void 0,ke,he(ee.default,{className:ve.default.premiumIcon}),pe.default.Messages.NOTICE_DETECTED_OFF_PLATFORM_NO_PREMIUM_PERK_MESSAGE.format({applicationName:et.name,skuName:Qe.name}),he(re.NoticeButton,{},void 0,he(o.Link,{onClick:Ce,to:{pathname:ce.Routes.APPLICATION_STORE_LISTING_SKU(Qe.id),state:{scrollRestoration:!1}}},void 0,pe.default.Messages.LEARN_MORE)));case ce.NoticeTypes.SURVEY:var tt=r.metadata;if(null==tt)return null;var nt=tt.key,rt=tt.prompt,at=tt.cta,ot=tt.url;return he(re.default,{color:re.NoticeColors.CUSTOM},void 0,he(re.NoticeCloseButton,{onClick:function(){(0,g.surveyHide)(nt,!0)}}),rt,he(re.NoticeButton,{onClick:function(){window.open(ot,"_blank"),(0,g.surveyHide)(nt,!1)}},void 0,at));case ce.NoticeTypes.CORRUPT_INSTALLATION:return he(re.default,{color:re.NoticeColors.DANGER},void 0,pe.default.Messages.NOTICE_CORRUPT_INSTALLATION,he(re.NoticeButtonAnchor,{href:oe.default.getArticleURL(ce.HelpdeskArticles.CORRUPT_INSTALLATION),target:"_blank"},void 0,pe.default.Messages.NOTICE_CORRUPT_INSTALLATION_HELP_LINK_TEXT));case ce.NoticeTypes.VIDEO_UNSUPPORTED_BROWSER:return he(re.default,{},void 0,Ue,pe.default.Messages.VIDEO_UNSUPPORTED_BROWSER_BODY,he(re.NoticeButton,{onClick:function(){(0,I.showAppDownloadModal)("Video unsupported browser")}},void 0,pe.default.Messages.DOWNLOAD));case ce.NoticeTypes.CONNECT_SPOTIFY:return he(re.default,{color:re.NoticeColors.SPOTIFY},void 0,Ge,he(te.default,{className:ve.default.platformIcon}),pe.default.Messages.NOTICE_CONNECT_SPOTIFY,he(re.NoticeButton,{onClick:function(){return(0,b.default)(ce.PlatformTypes.SPOTIFY,"Notice Bar")}},void 0,pe.default.Messages.CONNECT));case ce.NoticeTypes.PREMIUM_PROMO:return he(re.default,{color:re.NoticeColors.DARK},void 0,he("span",{className:ve.default.premiumLogo}),he("span",{className:ve.default.premiumText},void 0,pe.default.Messages.NOTICE_PREMIUM_PROMO_MESSAGE),he(re.NoticeButton,{className:ve.default.premiumAction,onClick:function(){ae.default.track(ce.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_section:ce.AnalyticsSections.NOTIFICATION_BAR,location_object:ce.AnalyticsObjects.BUTTON_CTA}),O.default.open(ce.UserSettingsSections.PREMIUM)}},void 0,pe.default.Messages.NOTICE_PREMIUM_PROMO_ACTION),Fe);case ce.NoticeTypes.MFA_SMS_BACKUP:return he(re.default,{color:re.NoticeColors.NOTIFICATION},void 0,Be,pe.default.Messages.NOTICE_MFA_SMS_BACKUP,he(re.NoticeButton,{onClick:function(){return O.default.open(ce.UserSettingsSections.ACCOUNT)}},void 0,pe.default.Messages.NOTICE_MFA_SMS_BACKUP_BUTTON));case ce.NoticeTypes.DISPATCH_ERROR:if(null==r.metadata)return null;var it=r.metadata.error;return he(re.default,{color:re.NoticeColors.DANGER},void 0,He,null==it?void 0:it.displayMessage,he(re.NoticeButton,{onClick:function(){return(0,ne.openModal)((function(e){return a.createElement(ue.default,e)}))}},void 0,pe.default.Messages.LEARN_MORE));case ce.NoticeTypes.DISPATCH_INSTALL_SCRIPT_PROGRESS:if(null==r.metadata)return null;var lt=r.metadata,ut=lt.progress,st=lt.total,dt=lt.name;return he(re.default,{color:re.NoticeColors.NOTIFICATION},void 0,xe,he(J.default,{justify:J.default.Justify.CENTER},void 0,null!=dt?pe.default.Messages.NOTICE_DISPATCH_INSTALL_SCRIPT_PROGRESS_WITH_NAME.format({name:""+dt,progress:""+ut,total:""+st}):pe.default.Messages.NOTICE_DISPATCH_INSTALL_SCRIPT_PROGRESS.format({progress:""+ut,total:""+st}),he(Q.default,{type:Q.default.Type.PULSING_ELLIPSIS,className:ve.default.ellipsis})));case ce.NoticeTypes.APPLICATION_TEST_MODE:return null==r.metadata?null:null!=q.default.testModeEmbeddedApplicationId?he(re.default,{},void 0,he(J.default,{justify:J.default.Justify.CENTER,align:J.default.Align.CENTER},void 0,he("div",{},void 0,pe.default.Messages.NOTICE_EMBEDDED_APPLICATION_TEST_MODE.format({applicationName:r.metadata.applicationName})),he(re.NoticeCloseButton,{onClick:S.reset}))):he(re.default,{},void 0,he(J.default,{justify:J.default.Justify.CENTER,align:J.default.Align.CENTER},void 0,he("div",{},void 0,pe.default.Messages.NOTICE_APPLICATION_TEST_MODE.format({applicationName:r.metadata.applicationName})),he(de.default,{dropdownSize:de.TestModeSKUButtonEnums.DropdownSizes.SMALL,className:ve.default.testModeSKUSelector,color:de.TestModeSKUButtonEnums.Colors.WHITE,look:de.TestModeSKUButtonEnums.Looks.OUTLINED,size:de.TestModeSKUButtonEnums.Sizes.MIN,onSKUSelect:function(e){return h.goToSKUStoreListing(e.id,{analyticsSource:{page:null,section:ce.AnalyticsSections.NOTIFICATION_BAR,object:ce.AnalyticsObjects.NAVIGATION_LINK}})},applicationId:r.metadata.applicationId},void 0,pe.default.Messages.NOTICE_APPLICATION_TEST_MODE_GO_TO_LISTING),he(re.NoticeCloseButton,{onClick:S.reset})));case ce.NoticeTypes.OUTBOUND_PROMOTION:return he(re.default,{color:re.NoticeColors.PREMIUM_TIER_2},void 0,he(re.NoticeCloseButton,{onClick:function(){L.default.dismissOutboundPromotionNotice()}}),he(ee.default,{className:ve.default.premiumIcon}),pe.default.Messages.OUTBOUND_PROMOTION_NOTICE,he(re.NoticeButton,{onClick:function(){ae.default.track(ce.AnalyticEvents.OUTBOUND_PROMOTION_NOTICE_CLICKED),O.default.open(ce.UserSettingsSections.INVENTORY),L.default.dismissOutboundPromotionNotice()}},void 0,pe.default.Messages.TAKE_ME_THERE));case ce.NoticeTypes.PREMIUM_GRANDFATHERED_ENDING:var ft=r.metadata.plan,ct=le.default.getGrandfatheredEndDate(ft),pt=le.default.getDaysToGrandfatheredEnd(ft);return he(re.default,{color:re.NoticeColors.PREMIUM_TIER_1},void 0,Ve,he(ee.default,{className:ve.default.premiumIcon}),pe.default.Messages.NOTICE_PREMIUM_GRANDFATHERED_ENDING.format({numDays:pt,date:ct}),he(re.NoticeButton,{onClick:function(){return(0,w.openPremiumSelectPlanModal)({initialPlanId:ce.SubscriptionPlans.PREMIUM_YEAR_TIER_2,analyticsLocation:{page:ce.AnalyticsPages.IN_APP,section:ce.AnalyticsSections.NOTIFICATION_BAR,object:ce.AnalyticsObjects.BUTTON_CTA}})}},void 0,pe.default.Messages.NOTICE_PREMIUM_GRANDFATHERED_UPGRADE));case ce.NoticeTypes.PREMIUM_GRANDFATHERED_ENDED:return he(re.default,{color:re.NoticeColors.PREMIUM_TIER_1},void 0,We,he(ee.default,{className:ve.default.premiumIcon}),pe.default.Messages.NOTICE_PREMIUM_GRANDFATHERED_ENDED,he(re.NoticeButton,{onClick:function(){ae.default.track(ce.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_section:ce.AnalyticsSections.NOTIFICATION_BAR,location_object:ce.AnalyticsObjects.BUTTON_CTA}),O.default.open(ce.UserSettingsSections.PREMIUM)}},void 0,pe.default.Messages.LEARN_MORE));case ce.NoticeTypes.PREMIUM_TIER_2_TRIAL_ENDING:return Ye;case ce.NoticeTypes.VIEWING_ROLES:return ze;case ce.NoticeTypes.NOISE_DETECTED:return he(re.default,{color:re.NoticeColors.INFO},void 0,Ke,pe.default.Messages.NOTICE_NOISE_DETECTED,he(re.NoticeButton,{onClick:function(){Ce(),s.default.setNoiseCancellation(!0,{section:ce.AnalyticsSections.NOTIFICATION_BAR})}},void 0,pe.default.Messages.ENABLE_NOISE_CANCELLATION));default:return null}}));t.default=$e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dismiss=function(e){a.default.dispatch({type:o.ActionTypes.DETECTED_OFF_PLATFORM_PREMIUM_PERKS_DISMISS,skuId:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={clearRemoteDisconnectVoiceChannelId:function(){a.default.dispatch({type:o.ActionTypes.CLEAR_REMOTE_DISCONNECT_VOICE_CHANNEL_ID})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(9)),i=n(3),l=O(n(15)),u=O(n(107)),s=O(n(29)),d=O(n(466)),f=n(41),c=O(n(24)),p=O(n(8294)),v=n(8262),y=O(n(1233)),m=O(n(8398)),_=O(n(9227)),h=n(1),E=O(n(6)),g=O(n(8099)),S=O(n(7384));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(){return(T=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}).apply(this,arguments)}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var b=function(){var e,t=(0,i.useStateFromStores)([u.default],(function(){return u.default.getGuildId()}),[]),n=(0,i.useStateFromStores)([l.default],(function(){return l.default.getGuild(t)}),[t]),r=(0,i.useStateFromStores)([y.default],(function(){return null!=t?y.default.getRequest(t):null}),[t]),O=(null==n?void 0:n.hasFeature(h.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED))&&(null==n?void 0:n.hasFeature(h.GuildFeatures.COMMUNITY));if(null==n||!O)return null;var I=null!==(e=null==r?void 0:r.applicationStatus)&&void 0!==e?e:v.GuildJoinRequestApplicationStatuses.STARTED,b=null,M=null,N=null,A=[g.default.notice,S.default.notice];switch(I){case v.GuildJoinRequestApplicationStatuses.PENDING:b=E.default.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_TITLE,M=E.default.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION,N=function(){(0,f.openModal)((function(e){return a.createElement(d.default,T({header:E.default.Messages.MODIFY_FOLLOWED_NEWS_HEADER,confirmText:E.default.Messages.CONFIRM,cancelText:E.default.Messages.CANCEL,onConfirm:function(){return p.default.removeGuildJoinRequest(n.id)},confirmButtonColor:s.default.Colors.BRAND},e),C(c.default,{size:c.default.Sizes.SIZE_16},void 0,E.default.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION_SUBTITLE))}))};break;case v.GuildJoinRequestApplicationStatuses.REJECTED:b=E.default.Messages.MEMBER_VERIFICATION_REJECTED_TITLE,M=E.default.Messages.MEMBER_VERIFICATION_LEARN_MORE,N=function(){(0,f.openModal)((function(e){return a.createElement(_.default,T({guildId:n.id},e))}))},A.push(g.default.error);break;default:b=E.default.Messages.MEMBER_VERIFICATION_NOTICE_TEXT,M=E.default.Messages.MEMBER_VERIFICATION_NOTICE_CTA,N=function(){(0,m.default)(n.id)}}return C("div",{className:o.default.apply(void 0,A)},void 0,C(c.default,{className:g.default.header},void 0,b),C(s.default,{className:g.default.button,look:s.default.Looks.OUTLINED,color:s.default.Colors.WHITE,size:s.default.Sizes.NONE,onClick:N},void 0,M))};b.displayName="PendingGuildMemberNotice";var M=b;t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=c(n(0)),o=d(n(473)),i=c(n(8678)),l=n(8796),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=a.memo((function(e){var t=e.onClose;return(0,l.useAndTrackExposureToExperiment)()?p(i.default,{color:i.NoticeColors.PREMIUM_TIER_2},void 0,p(i.NoticeCloseButton,{onClick:t}),s.default.Messages.INCENTIVIZED_INSTALL_NOTICE.format(),p(i.NoticeButton,{onClick:function(){return o.default.open(u.UserSettingsSections.PREMIUM)}},void 0,s.default.Messages.LEARN_MORE)):null}));v.displayName="IncentivizedInstallNotice";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=g(n(9)),i=n(3),l=g(n(199)),u=g(n(8398)),s=n(42),d=g(n(15)),f=g(n(107)),c=g(n(29)),p=g(n(8853)),v=g(n(24)),y=g(n(182)),m=n(1),_=g(n(6)),h=g(n(8100)),E=g(n(7384));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function T(){return(T=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}).apply(this,arguments)}var C=function(){var e=(0,i.useStateFromStores)([f.default],(function(){return f.default.getGuildId()}),[]),t=(0,i.useStateFromStores)([d.default],(function(){return d.default.getGuild(e)}),[e]),n=(0,i.useStateFromStores)([y.default],(function(){return y.default.getHistorySnapshot()}),[]),r=a.useState(!1),g=r[0],S=r[1],C=(null==t?void 0:t.hasFeature(m.GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED))&&(null==t?void 0:t.hasFeature(m.GuildFeatures.COMMUNITY));if(null==t)return null;var b=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),e.prev=1,e.next=4,l.default.joinGuild(t.id,!1,m.JoinGuildSources.NOTICE_BAR);case 4:r=e.sent,C&&null!=(null===(n=r.body)||void 0===n?void 0:n.member_verification_form)&&(0,u.default)(t.id),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),S(!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){I(o,r,a,i,l,"next",e)}function l(e){I(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return n.apply(this,arguments)}}();return O("div",{className:(0,o.default)(h.default.notice,E.default.notice)},void 0,O(c.default,{look:c.default.Looks.OUTLINED,color:c.default.Colors.WHITE,size:c.default.Sizes.NONE,className:(0,o.default)(h.default.button,h.default.back),innerClassName:h.default.iconButton,onClick:function(){var e=(0,s.getHistory)();null!=n&&null!=n.location?(0,s.replaceWith)(T({},n.location)):e.goBack()}},void 0,O(p.default,{width:16,height:16,className:h.default.arrow}),_.default.Messages.BACK),O(v.default,{className:h.default.header},void 0,_.default.Messages.LURKER_MODE_NAG_BAR_HEADER),O(c.default,{className:h.default.button,look:c.default.Looks.OUTLINED,color:c.default.Colors.WHITE,size:c.default.Sizes.NONE,submitting:g,onClick:b},void 0,_.default.Messages.LURKER_MODE_NAG_BAR_BUTTON.format({guild:t.name})))};C.displayName="LurkerModeNotice";var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;v(n(0));var r,a=c(n(8687)),o=c(n(5686)),i=v(n(8678)),l=n(5689),u=n(5688),s=n(1),d=c(n(6)),f=c(n(7894));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=function(e){var t=e.dismissCurrentNotice,n=(0,l.usePremiumTrialOffer)(),r=(0,a.default)(null!=n&&null!=n.expires_at?Date.parse(n.expires_at):0);return null==n||null==n.expires_at||Object.values(r).every((function(e){return 0===e}))?null:y(i.default,{color:i.NoticeColors.PREMIUM_TIER_2},void 0,y(i.NoticeCloseButton,{onClick:t}),y(o.default,{className:f.default.premiumIcon}),r.days>0?d.default.Messages.NOTICE_PREMIUM_TIER_2_TRIAL_ENDING_DAYS.format({days:r.days}):r.hours>0?d.default.Messages.NOTICE_PREMIUM_TIER_2_TRIAL_ENDING_HOURS.format({hours:r.hours}):d.default.Messages.NOTICE_PREMIUM_TIER_2_TRIAL_ENDING_MINUTES.format({minutes:Math.max(r.minutes,1)}),y(i.NoticeButton,{onClick:function(){(0,u.openPremiumSelectPlanModal)({trialId:n.trial_id,subscriptionTier:s.PremiumSubscriptionSKUs.TIER_2,analyticsLocation:{page:s.AnalyticsPages.IN_APP,section:s.AnalyticsSections.NOTIFICATION_BAR,object:s.AnalyticsObjects.BUTTON_CTA}})}},void 0,d.default.Messages.NOTICE_PREMIUM_TIER_2_TRIAL_ENDING_CTA))};m.displayName="PremiumTier2TrialEndingNotice";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;h(n(0));var r,a=m(n(9)),o=m(n(10)),i=m(n(36)),l=m(n(29)),u=m(n(1317)),s=h(n(8678)),d=m(n(24)),f=n(301),c=m(n(8599)),p=n(268),v=m(n(6)),y=m(n(8101));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e){var t=i.default.getVoiceChannelId();if(null!=t){var n=o.default.getChannel(t);null!=n&&(0,f.audienceAckRequestToSpeak)(n,e)}}function S(){var e=(0,c.default)(),t=(0,p.useStageBlockedUsersCount)(null==e?void 0:e.id)||0;return E(s.default,{className:y.default.container,color:s.NoticeColors.NOTIFICATION},void 0,E("div",{},void 0,v.default.Messages.STAGE_SPEAK_INVITE_HEADER),t>0?E("div",{className:y.default.blocked},void 0,E(u.default,{width:12,height:12,className:y.default.blockedIcon}),E("div",{className:y.default.blockedText},void 0,v.default.Messages.STAGE_SPEAK_INVITE_HEADER_BLOCKED_USERS.format({number:t}))):null,E(l.default,{className:(0,a.default)(y.default.button,y.default.acceptButton),size:l.default.Sizes.MIN,color:l.default.Colors.WHITE,onClick:function(){return g(!1)}},void 0,E(d.default,{className:y.default.acceptText,size:d.default.Sizes.SIZE_12,color:d.default.Colors.CUSTOM},void 0,v.default.Messages.STAGE_SPEAK_INVITE_ACCEPT)),E(l.default,{className:(0,a.default)(y.default.button,y.default.declineButton),look:l.default.Looks.OUTLINED,size:l.default.Sizes.MIN,color:l.default.Colors.WHITE,onClick:function(){return g(!0)}},void 0,E(d.default,{className:y.default.declineText,size:d.default.Sizes.SIZE_12,color:d.default.Colors.CUSTOM},void 0,v.default.Messages.STAGE_SPEAK_INVITE_DECLINE)))}S.displayName="InvitedToSpeakNotice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=v(n(9154)),i=v(n(71)),l=v(n(29)),u=v(n(55)),s=n(35),d=v(n(47)),f=v(n(93)),c=v(n(6)),p=v(n(8102));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=function(e){var t=e.onClose,n=e.transitionState,r=(0,a.useStateFromStoresObject)([o.default,i.default],(function(){var e=o.default.getLastError(),t=null;if(null!=e&&null!=e.applicationId){var n=i.default.getGame(e.applicationId);null!=n&&(t=n.name)}return{error:e,applicationName:t}})),v=r.error,y=r.applicationName;return m(s.ModalRoot,{transitionState:n,size:s.ModalSize.SMALL,"aria-label":c.default.Messages.DISPATCH_ERROR_MODAL_HEADER},void 0,m(s.ModalHeader,{justify:u.default.Justify.BETWEEN,separator:!1},void 0,m(u.default.Child,{grow:1},void 0,m(d.default,{tag:d.default.Tags.H2,size:d.default.Sizes.SIZE_20},void 0,c.default.Messages.DISPATCH_ERROR_MODAL_HEADER)),m(u.default.Child,{grow:0},void 0,m(s.ModalCloseButton,{onClick:t}))),m(s.ModalContent,{},void 0,m("div",{className:p.default.body},void 0,m("div",{},void 0,c.default.Messages.DISPATCH_ERROR_MODAL_DESCRIPTION.format({link:"https://dis.gd/dispatch-error"})),m("div",{className:p.default.supportCallToAction},void 0,c.default.Messages.DISPATCH_ERROR_MODAL_BODY),m("div",{className:p.default.errorLabel},void 0,c.default.Messages.DISPATCH_ERROR_MODAL_ERROR_LABEL),m("div",{className:p.default.errorDetails},void 0,m("div",{},void 0,null!=y?"Game: "+y+"\n":null,null!=(null==v?void 0:v.applicationId)?"Game ID: "+v.applicationId+"\n":null,null!=(null==v?void 0:v.branchId)&&(null==v?void 0:v.applicationId)!==(null==v?void 0:v.branchId)?"Branch ID: "+(null==v?void 0:v.branchId)+"\n":null,null!=(null==v?void 0:v.code)?"Error Code: "+(null==v?void 0:v.code)+"\n":null,null!=(null==v?void 0:v.uuid)?"Unique Case ID: "+(null==v?void 0:v.uuid):null)))),m(s.ModalFooter,{},void 0,m(l.default,{onClick:function(){window.open(f.default.getSubmitRequestURL())}},void 0,c.default.Messages.DISPATCH_ERROR_MODAL_OPEN_TICKET),m(l.default,{look:l.default.Looks.LINK,onClick:t,color:p.default.closeLink},void 0,c.default.Messages.CLOSE)))};_.displayName="DispatchErrorModal";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TestModeSKUButtonEnums=void 0;var r,a=y(n(0)),o=p(n(3)),i=y(n(389)),l=p(n(9238)),u=y(n(8253)),s=p(n(71)),d=p(n(373)),f=n(289),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(){return(m=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}).apply(this,arguments)}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E={DropdownSizes:l.default.DropdownSizes,Sizes:l.default.Sizes,Colors:l.default.Colors,Looks:l.default.Looks};t.TestModeSKUButtonEnums=E;var g=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderContextMenu=function(){var e=t.props,n=e.skus,r=e.onSKUSelect,a=e.onMenuSelect;return _(u.default,{onSelect:a,navId:"test-skus","aria-label":c.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onClose:i.closeContextMenu},void 0,n.map((function(e){return _(u.MenuItem,{id:""+e.id,label:e.name,action:function(){null==r||r(e)}})})))},t.handleContextMenu=function(e){e.stopPropagation(),i.openContextMenu(e,t.renderContextMenu)},t.handleClick=function(){var e=t.props,n=e.onSKUSelect,r=e.primarySKU;n&&null!=r&&n(r)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n),r.prototype.render=function(){var e=this.props,t=e.skus,n=e.children,r=(e.applicationId,e.primarySKU,e.onSKUSelect,function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["skus","children","applicationId","primarySKU","onSKUSelect"]));return a.createElement(l.default,m({onClick:this.handleClick,onDropdownClick:t.length>0?this.handleContextMenu:null,onContextMenu:t.length>0?this.handleContextMenu:void 0},r),n)},r}(a.PureComponent);g.displayName="TestModeSKUButton";var S=o.default.connectStores([d.default,s.default],(function(e){var t=e.applicationId,n=(0,f.getPrimarySKUForApplication)(t,s.default,d.default);return{skus:(d.default.getForApplication(t)||[]).sort((function(e,t){return null!=n&&e.id===n.id?-1:null!=n&&t.id===n.id?1:e.name>=t.name?-1:1})),primarySKU:n}}))(g);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.close=c,t.open=function(){f=(0,i.openModal)((function(e){return r.createElement(o.default,d({title:l.default.Messages.CONFIRM_DISABLE_SILENCE_TITLE,body:l.default.Messages.CONFIRM_DISABLE_SILENCE_BODY,minorText:l.default.Messages.CONFIRM_DISABLE_SILENCE_DONT_SHOW,onConfirmSecondary:p,onConfirm:c,confirmText:l.default.Messages.OKAY},e))}))};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(288)),o=u(n(218)),i=n(41),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}var f=null;function c(){null!==f&&(0,i.closeModal)(f),f=null}function p(){a.default.setSilenceWarning(!1),c()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=$;var r,a=U(n(0)),o=j(n(9)),i=j(n(8312)),l=n(3),u=n(1272),s=n(1148),d=j(n(5939)),f=j(n(9038)),c=j(n(120)),p=j(n(70)),v=j(n(39)),y=j(n(12)),m=j(n(1147)),_=j(n(5959)),h=j(n(9185)),E=j(n(373)),g=j(n(8690)),S=j(n(8508)),O=j(n(5686)),I=j(n(1335)),T=j(n(291)),C=n(8263),b=n(96),M=n(8366),N=n(9239),A=j(n(10223)),P=U(n(8357)),R=j(n(8771)),L=n(1),D=j(n(6)),w=j(n(8103));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(){return(G=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}).apply(this,arguments)}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var H=function(e){var t=e.selected,n=B(e,["selected"]),r=(0,l.useStateFromStores)([p.default],(function(){return p.default.getPendingCount()}));return a.createElement(N.LinkButton,G({selected:t,route:L.Routes.FRIENDS,icon:I.default,text:D.default.Messages.FRIENDS},n),r>0?F(C.NumberBadge,{count:r}):null)};H.displayName="FriendsButton";var x=function(e){var t=e.selected,n=e.route,r=e.locationState,o=B(e,["selected","route","locationState"]),i=(0,l.useStateFromStores)([_.default],(function(){return _.default.getUnacknowledgedOffers().length}));return a.createElement(N.LinkButton,G({selected:t,route:n,icon:O.default,text:D.default.Messages.PREMIUM,locationState:r},o),i>0?F(C.NumberBadge,{count:i}):null)};x.displayName="NitroButton";var V=function(e){var t=e.selected,n=e.locationState,r=B(e,["selected","locationState"]);return(0,f.default)()?a.createElement(N.LinkButton,G({},r,{selected:t,icon:T.default,text:D.default.Messages.STAGE_DISCOVERY,locationState:n,route:L.Routes.STAGE_DISCOVERY})):null};V.displayName="DiscoveryButton";var W=function(){return(0,u.show)("DM_SEARCH")};function Y(e){switch(e){case L.Routes.APPLICATION_LIBRARY:return L.AnalyticsPages.LIBRARY;case L.Routes.FRIENDS:return L.AnalyticsPages.FRIENDS_LIST}return e.startsWith(L.Routes.APPLICATION_STORE)?e===L.Routes.APPLICATION_STORE?L.AnalyticsPages.STORE_DIRECTORY_HOME:e.startsWith(L.Routes.APPLICATION_STORE)?L.AnalyticsPages.STORE_DIRECTORY_BROWSE:L.AnalyticsPages.STORE_LISTING:L.AnalyticsPages.DM_CHANNEL}var z=function(e){var t=e.showLibrary,n=e.hasLibraryApplication,r=e.homeLink,l=e.storeLink,u=e.premiumTabSelected,s=e.showNitroTab,f=(0,d.default)((function(e){return[e.channelId,e.path]}),i.default),c=f[0],p=f[1];return F("nav",{className:w.default.privateChannels,"aria-label":D.default.Messages.PRIVATE_CHANNELS_A11Y_LABEL},void 0,F(P.default,{tutorialId:"direct-messages",position:P.TutorialIndicatorPositions.RIGHT,offsetX:-52},void 0,F("div",{className:w.default.searchBar},void 0,F("button",{type:"button",className:w.default.searchBarComponent,onClick:W},void 0,D.default.Messages.DM_SEARCH_PLACEHOLDER))),a.createElement(A.default,G({},e,{version:p,selectedChannelId:c,showDMHeader:!0}),(function(e,t){return a.createElement(H,G({key:"friends",selected:null!=p?p===L.Routes.FRIENDS:r===L.Routes.FRIENDS},e({index:t})))}),(function(e,t){return a.createElement(V,G({key:"stage-discovery",selected:null!=p?p===L.Routes.STAGE_DISCOVERY:r===L.Routes.STAGE_DISCOVERY},e({index:t})))}),n&&t?function(e,t){var n;return a.createElement(N.LinkButton,G({key:"library",selected:null==p?null!=r&&r.startsWith(L.Routes.APPLICATION_LIBRARY):p.startsWith(L.Routes.APPLICATION_LIBRARY),route:L.Routes.APPLICATION_LIBRARY,icon:S.default,text:D.default.Messages.LIBRARY},e({index:t})),F(R.default,{className:(0,o.default)(w.default.downloadProgressCircle,(n={},n[w.default.hideGameUpdateProgressIndicator]=r===L.Routes.APPLICATION_LIBRARY,n))}))}:null,s?function(e,t){return a.createElement(x,G({key:"premium",selected:null==p?u:p.startsWith(L.Routes.APPLICATION_STORE),route:null==l||location.pathname.startsWith(L.Routes.APPLICATION_STORE)?L.Routes.APPLICATION_STORE:l,locationState:{analyticsSource:{page:Y(r),section:L.AnalyticsSections.NAVIGATION,object:L.AnalyticsObjects.NAVIGATION_LINK}}},e({index:t})))}:null))};z.displayName="PrivateChannels";var K=(0,s.registerUserExperiment)({id:s.Experiments.HIDE_NITRO_TAB,title:"Hide Nitro Tab",description:["Hide Nitro tab from new users","Control: Show Nitro tab to all users","Treatment 1: Hide Nitro tab from users that are registered less than a 3 months ago"],buckets:[s.ExperimentBuckets.CONTROL,s.ExperimentBuckets.TREATMENT_1]});function $(){var e=(0,l.useStateFromStores)([g.default],(function(){return g.default.getHomeLink()})),t=(0,l.useStateFromStores)([E.default],(function(){if(e===L.Routes.APPLICATION_STORE)return!0;var t,n,r=(0,M.getSKUIdFromURL)(e);return null!=r&&(null!==(t=null===(n=E.default.get(r))||void 0===n?void 0:n.premium)&&void 0!==t&&t)}),[e]),n=(0,l.useStateFromStores)([y.default],(function(){return y.default.getNullableCurrentUser()})),r=(0,l.useStateFromStores)([m.default],(function(){return m.default.getPremiumTypeSubscription()})),a=(0,l.useStateFromStores)([_.default],(function(){return _.default.getUnacknowledgedOffers().length>0})),o=(0,l.useStateFromStoresObject)([v.default],(function(){return{theme:v.default.theme,showLibrary:!v.default.disableGamesTab}})),i=o.theme,u=o.showLibrary,d=(0,s.useAndTrackExposureToUserExperiment)(K)===s.ExperimentBuckets.CONTROL||a||null!=n&&Date.now()-n.createdAt.getTime()>7776e6||(0,b.hasPremiumSubscriptionToDisplay)(n,r),f=(0,l.useStateFromStores)([c.default],(function(){return c.default.hasLibraryApplication()})),p=(0,l.useStateFromStores)([h.default],(function(){return h.default.getCurrentPath()}));return F(z,{theme:i,showLibrary:u,showNitroTab:d,hasLibraryApplication:f,storeLink:p,homeLink:e,premiumTabSelected:t})}$.displayName="PrivateChannelsConnected"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(262),i=n(192),l=v(n(8257)),u=v(n(1182)),s=n(5687),d=v(n(11420)),f=v(n(11441)),c=n(1),p=v(n(8117));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=m(f.default,{}),h=m(d.default,{});function E(){return m(i.Switch,{},void 0,m(u.default,{path:c.Routes.APPLICATION_LIBRARY_SETTINGS,exact:!0},void 0,m(l.default,{page:c.AnalyticsPages.LIBRARY_SETTINGS,root:!0},void 0,_)),m(u.default,{path:c.Routes.APPLICATION_LIBRARY},void 0,m(l.default,{page:c.AnalyticsPages.LIBRARY,root:!0},void 0,h)))}E.displayName="ApplicationLibrarySwitch";var g=m(o.Helmet,{title:"Discord"}),S=m(E,{});function O(){return a.useEffect((function(){(0,s.trackAppUIViewed)("application_library")}),[]),m("div",{className:p.default.container},void 0,g,S)}O.displayName="ApplicationLibraryPage";var I=a.memo(O);t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=S(n(0)),o=E(n(9)),i=E(n(2)),l=S(n(10052)),u=n(752),s=n(6043),d=E(n(8257)),f=n(468),c=n(9234),p=E(n(11421)),v=E(n(10462)),y=E(n(11422)),m=E(n(11437)),_=n(1),h=E(n(8112));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=O(p.default,{}),C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._scrollerRef=a.createRef(),t._scrollToPadding=0,t.state={includeUpdatesInScroller:!1},t.handleHeightTallerThanHalfViewportChange=function(e){t.setState({includeUpdatesInScroller:e})},t.scrollToRow=function(e,n){var r=t._scrollerRef.current;null!=r?(e.focus(),r.scrollIntoViewRect({start:n,end:n}),t._scrollToOnMount=null):(t._scrollToOnMount=e,t._scrollToPadding=n)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var p=r.prototype;return p.componentDidMount=function(){l.setHomeLink(_.Routes.APPLICATION_LIBRARY),(0,c.deepLinkRouteIfLanded)(_.RPCDeepLinks.LIBRARY),i.default.wait((function(){return(0,u.fetchBranches)()})),(0,s.fetchActivityStatistics)(),null!=this._scrollToOnMount&&null!=this._scrollerRef.current&&this.scrollToRow(this._scrollToOnMount,this._scrollToPadding)},p.renderToolbar=function(){return T},p.render=function(){var e,t=this.state.includeUpdatesInScroller,n=O("div",{},void 0,O(d.default,{section:_.AnalyticsSections.LIBRARY_INSTALL_MODULE},void 0,O(m.default,{onHeightTallerThanHalfViewportChange:this.handleHeightTallerThanHalfViewportChange})));return O(a.Fragment,{},void 0,O(v.default,{currentRoute:_.Routes.APPLICATION_LIBRARY,renderToolbar:this.renderToolbar}),t?null:n,a.createElement(f.AdvancedScrollerAuto,{className:(0,o.default)(h.default.container,h.default.scroller,(e={},e[h.default.stickyScroller]=!t,e)),ref:this._scrollerRef},t?n:null,O(d.default,{section:_.AnalyticsSections.LIBRARY_APPLICATION_LIST},void 0,O(y.default,{stickyHeader:!t,scrollToRow:this.scrollToRow}))))},r}(a.PureComponent);t.default=C,C.displayName="GameLibrary"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=S(n(0)),o=E(n(9)),i=E(n(3)),l=E(n(2)),u=S(n(10461)),s=E(n(694)),d=E(n(690)),f=E(n(1341)),c=E(n(1386)),p=E(n(5942)),v=n(1344),y=S(n(1253)),m=n(1),_=E(n(6)),h=E(n(8104));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).searchBarRef=null,t.state={focused:!1},t.setRef=function(e){t.searchBarRef=e},t.handleKeyDown=function(e){var n=t.props,r=n.activeRowKey,a=n.hasModalOpen,o=n.applicationViewItems,i=I(t).searchBarRef;if(!(a||e.ctrlKey||e.altKey||e.metaKey||null==i||document.activeElement!==i.inputRef.current&&(0,v.isInputLikeElement)(document.activeElement)))switch(e.which){case m.KeyboardKeys.ESCAPE:e.target!==i.inputRef.current?t.reset():null!=i.inputRef.current&&i.blur();break;case m.KeyboardKeys.ENTER:if(null!=r){e.preventDefault();var l=o.find((function(e){return e.key===r}));if(null==l)return;var u=l.libraryApplication;y.performDefaultLibraryApplicationAction(u,{analyticsParams:{source:m.AnalyticsLocations.APPLICATION_LIBRARY,location:{page:m.AnalyticsPages.LIBRARY,section:m.AnalyticsSections.LIBRARY_APPLICATION_LIST,object:m.AnalyticsObjects.BUTTON_CTA}}})}break;case m.KeyboardKeys.ARROW_DOWN:case m.KeyboardKeys.ARROW_UP:e.preventDefault(),e.stopPropagation(),t.updateActiveRow(e.which===m.KeyboardKeys.ARROW_DOWN?1:-1);break;default:null!=i.inputRef.current&&e.target!==i.inputRef.current&&i.focus()}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n);var i=r.prototype;return i.componentDidMount=function(){document.addEventListener("keydown",this.handleKeyDown)},i.componentWillUnmount=function(){l.default.wait((function(){return u.updateActiveRowKey(null)})),document.removeEventListener("keydown",this.handleKeyDown)},i.reset=function(){u.updateActiveRowKey(null),u.updateLibraryFilter("")},i.focusInput=function(){var e=this.searchBarRef;null!=e&&e.focus()},i.updateActiveRow=function(e){var t=this.props,n=t.applicationViewItems,r=t.activeRowKey,a=n.findIndex((function(e){return e.key===r})),o=0;a>=0&&(o=(a+e)%n.length)<0&&(o=n.length-1);var i=n[o];u.updateActiveRowKey(null!=i?i.key:null,!0)},i.render=function(){var e,t=this,n=this.props.filterQuery,r=this.state.focused;return O("div",{className:(0,o.default)((e={},e[h.default.libraryFilter]=!0,e[h.default.focused]=r,e))},void 0,a.createElement(p.default,{className:h.default.searchBar,ref:this.setRef,onChange:u.updateLibraryFilter,onFocus:function(){return t.setState({focused:!0})},onBlur:function(){return t.setState({focused:!1})},name:"filter",onClear:function(){t.reset(),t.focusInput()},maxLength:100,query:n,placeholder:_.default.Messages.APPLICATION_LIBRARY_FILTER_PLACEHOLDER}))},r}(a.Component);C.displayName="ApplicationLibraryFilter";var b=i.default.connectStores([f.default,s.default,d.default,c.default],(function(){return{filterQuery:f.default.applicationFilterQuery,applicationViewItems:f.default.sortedFilteredLibraryApplicationViewItems,hasModalOpen:d.default.hasModalOpen()||s.default.hasLayers(),activeRowKey:c.default.activeRowKey}}))(C);t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Z;var r,a,o=k(n(0)),i=w(n(9)),l=n(192),u=n(3),s=n(57),d=w(n(2)),f=n(389),c=k(n(10461)),p=w(n(8470)),v=w(n(8892)),y=w(n(10463)),m=w(n(1341)),_=w(n(1386)),h=w(n(29)),E=w(n(55)),g=w(n(477)),S=w(n(8432)),O=w(n(10464)),I=w(n(149)),T=w(n(11432)),C=w(n(5686)),b=w(n(10465)),M=k(n(13)),N=n(136),A=n(139),P=w(n(11433)),R=n(1),L=w(n(6)),D=w(n(8107));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function U(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function H(){return(H=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}).apply(this,arguments)}var x=(0,A.cssValueToNumber)(D.default.rowMinHeight),V=(0,A.cssValueToNumber)(D.default.linkedToGlowDuration),W=Object.freeze(((r={})[R.GameTableListKeys.PLATFORM]="Platform",r[R.GameTableListKeys.LAST_PLAYED]="Last Played",r[R.GameTableListKeys.NAME]="Name",r));var Y=function(e){var t=e.flag,n=e.icon,r=e.item,a=e.tooltip,l=r.libraryApplication.hasFlag(t);return B(I.default,{text:a},void 0,(function(e){var t;return o.createElement(n,H({className:(0,i.default)(D.default.settingIcon,(t={},t[D.default.hidden]=!l,t))},e))}))};Y.displayName="FlagIcon";var z=[{key:R.GameTableListKeys.NAME,renderHeader:function(){return L.default.Messages.GAME_LIBRARY_LIST_HEADER_NAME},sort:!0,cellClassName:D.default.nameCell,bodyCellClassName:D.default.nameBodyCell,render:function(e){return B(E.default,{align:E.default.Align.CENTER},void 0,B(g.default,{game:e.application,size:g.default.Sizes.SMALL,className:D.default.gameIcon}),B("div",{className:D.default.nameCellInfo},void 0,B("div",{className:D.default.nameCellText},void 0,e.libraryApplication.getBranchedName(e.application)),e.libraryApplication.hasFlag(R.LibraryApplicationFlags.PREMIUM)?B(I.default,{text:L.default.Messages.PREMIUM_GAME},void 0,(function(e){return o.createElement(C.default,H({className:D.default.nitroIcon},e))})):null))}},{key:R.GameTableListKeys.PLATFORM,renderHeader:function(){return L.default.Messages.GAME_LIBRARY_LIST_HEADER_PLATFORM},sort:!0,cellClassName:D.default.platformCell,bodyCellClassName:D.default.textCell,render:function(e){var t=e.libraryApplication.getDistributor();return B(E.default,{align:E.default.Align.CENTER},void 0,null!=t?R.DistributorNames[t]:L.default.Messages.GAME_LIBRARY_NOT_APPLICABLE)}},{key:R.GameTableListKeys.LAST_PLAYED,renderHeader:function(){return L.default.Messages.GAME_LIBRARY_LIST_HEADER_LAST_PLAYED},sort:!0,cellClassName:D.default.lastPlayedCell,bodyCellClassName:D.default.textCell,render:function(e){var t,n;return n=e.isRunning?L.default.Messages.GAME_LIBRARY_LAST_PLAYED_PLAYING_NOW:e.isNew?L.default.Messages.GAME_LIBRARY_NEW:0!==e.lastPlayed?B(S.default,{end:e.lastPlayed,location:S.default.Locations.GAME_LIBRARY_LAST_PLAYED}):L.default.Messages.GAME_LIBRARY_LAST_PLAYED_NONE,B(E.default,{align:E.default.Align.CENTER,className:(0,i.default)((t={},t[D.default.lastPlayedCellNew]=e.isNew,t))},void 0,n)}},{key:R.GameTableListKeys.ACTIONS,renderHeader:function(){return null},cellClassName:D.default.actionsCell,render:function(e,t,n){var r;if(!t)throw new Error("No cell props defined.");var a,l,u=e.key===t.activeRowKey;return B(o.Fragment,{},void 0,B("div",{className:D.default.settingIcons},void 0,B(Y,{flag:R.LibraryApplicationFlags.PRIVATE,item:e,icon:T.default,tooltip:L.default.Messages.GAME_LIBRARY_PRIVATE_TOOLTIP}),B(Y,{flag:R.LibraryApplicationFlags.OVERLAY_DISABLED,item:e,icon:b.default,tooltip:L.default.Messages.GAME_LIBRARY_OVERLAY_DISABLED_TOOLTIP}),B(P.default,{className:(0,i.default)(D.default.settingIcon,(r={},r[D.default.hidden]=!e.supportsCloudSync,r)),libraryApplication:e.libraryApplication})),(0,N.isUserEntitledToLibraryApplication)(e.libraryApplication)?B(v.default,{analyticsListSort:(a=t.sortKey,l=t.sortDirection,W[a]+" "+(l===R.TableSortDirections.ASCENDING?"ASC":"DESC")),analyticsListIndex:n,source:R.AnalyticsLocations.APPLICATION_LIBRARY,libraryApplication:e.libraryApplication,color:u?h.default.Colors.GREEN:h.default.Colors.PRIMARY,isPlayShiny:u&&e.defaultAction===R.LibraryApplicationActions.PLAY,size:D.default.actionButtonSize,hideProgress:null!=e.defaultAction,onDropdownOpen:function(){return null!=t&&t.setActiveRowKey(e)},onDropdownClose:function(){return null!=t&&t.clearActiveRowKey()}}):B(p.default,{skuId:e.libraryApplication.sku.id,applicationId:e.application.id,color:u?h.default.Colors.GREEN:h.default.Colors.PRIMARY,customDisabledColor:h.default.Colors.PRIMARY,size:D.default.actionButtonSize}))}}],K=function(e){var t,n=e.item,r=e.activeRowKey,a=e.highlightedApplicationKey,l=e.onMouseEnter,u=e.onMouseLeave,s=e.onContextMenu,d=e.setRef,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["item","activeRowKey","highlightedApplicationKey","onMouseEnter","onMouseLeave","onContextMenu","setRef"]),c=n.key===r,p=n.key===a;return o.createElement("div",{className:(0,i.default)((t={},t[D.default.rowWrapperActive]=c&&!p,t[D.default.rowWrapperGlow]=p,t[D.default.rowWrapper]=!c&&!p,t[D.default.rowWrapperDim]=!c&&!n.isLaunchable,t)),ref:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return d(e,n.key)})),onMouseEnter:function(){return l(n)},onMouseLeave:u,onContextMenu:function(e){return s(e,n)}},o.createElement("div",f))};K.displayName="Row";var $=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._didUnmount=!1,t._rowRefs={},t.state={overflowMenuRowKey:null,highlightedApplicationKey:null!=t.props.location.state?t.props.location.state.applicationId:null},t.setActiveRowKey=function(e){t.setState({overflowMenuRowKey:e.key})},t.clearActiveRowKey=function(){t._didUnmount||t.setState({overflowMenuRowKey:null})},t.handleRowMouseEnter=function(e){t.props.isNavigatingByKeyboard||c.updateActiveRowKey(e.key)},t.handleRowMouseLeave=function(){t.props.isNavigatingByKeyboard||c.updateActiveRowKey(null)},t.setRowRef=function(e,n){t._rowRefs[n]=e},t.handleApplicationContextMenu=function(e,n){t.setActiveRowKey(n);var r=t.props.analyticsContext;(0,f.openContextMenu)(e,(function(e){return o.createElement(y.default,H({},e,{applicationId:n.libraryApplication.id,branchId:n.libraryApplication.branchId,analyticsContext:r}))}),{onClose:t.clearActiveRowKey})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,F(t,n);var a=r.prototype;return a.componentDidMount=function(){this.props.fetched&&(this.handleHighlightedApplicationKey(),this.trackViewed())},a.componentWillUnmount=function(){this._didUnmount=!0},a.componentDidUpdate=function(e){!e.fetched&&this.props.fetched&&(this.handleHighlightedApplicationKey(),this.trackViewed());var t=this.props.activeRowKey;if(null!=t&&e.activeRowKey!==t&&this.props.isNavigatingByKeyboard){var n=this._rowRefs[t];null!=n&&(d.default.wait(f.closeContextMenu),this.props.scrollToRow(n,x))}},a.handleHighlightedApplicationKey=function(){var e=this,t=this.state.highlightedApplicationKey;null!=t&&null!=this._rowRefs[t]&&(this.props.scrollToRow(this._rowRefs[t],x),(new s.Timeout).start(V,(function(){e._didUnmount||e.setState({highlightedApplicationKey:null})})))},a.trackViewed=function(){for(var e,t={num_applications_total:0,num_applications_discord:0,num_applications_steam:0,num_applications_battlenet:0,num_applications_twitch:0,num_applications_uplay:0,num_applications_origin:0,num_applications_gog:0,num_applications_epic:0},n=this.props,r=n.analyticsContext,a=U(n.applicationViewItems);!(e=a()).done;){switch(e.value.libraryApplication.getDistributor()){case R.Distributors.DISCORD:t.num_applications_discord++;break;case R.Distributors.STEAM:t.num_applications_steam++;break;case R.Distributors.BATTLENET:t.num_applications_battlenet++;break;case R.Distributors.TWITCH:t.num_applications_twitch++;break;case R.Distributors.UPLAY:t.num_applications_uplay++;break;case R.Distributors.ORIGIN:t.num_applications_origin++;break;case R.Distributors.GOG:t.num_applications_gog++;break;case R.Distributors.EPIC:t.num_applications_epic++}t.num_applications_total++}M.default.track(R.AnalyticEvents.LIBRARY_VIEWED,H({},t,{load_id:r.loadId}))},a.handleSort=function(e,t){c.sortList(e,t)},a.renderImportHelp=function(){var e,t=this.props,n=t.applicationViewItems,r=t.filterQuery,a=n.length>0;return a?null:(e=""!==r?L.default.Messages.APPLICATION_LIBRARY_EMPTY_SEARCH_DESCRIPTION.format({query:r}):L.default.Messages.APPLICATION_LIBRARY_EMPTY_STATE_DESCRIPTION_NO_IMPORT,B("div",{className:a?D.default.emptyStateSmall:D.default.emptyStateLarge},void 0,B("div",{className:D.default.emptyWumpus}),B(E.default,{grow:0,shrink:a?1:0,direction:E.default.Direction.VERTICAL},void 0,B("div",{className:D.default.emptyStateText},void 0,B("h5",{className:D.default.emptyStateHeader},void 0,L.default.Messages.APPLICATION_LIBRARY_EMPTY_STATE_HEADER),B("div",{className:D.default.emptyStateDescription},void 0,e)))))},a.render=function(){var e=this.props,t=e.sortKey,n=e.sortDirection,r=e.applicationViewItems,a=e.activeRowKey,i=e.stickyHeader,l=this.state,u=l.overflowMenuRowKey,s=l.highlightedApplicationKey;return B(o.Fragment,{},void 0,r.length>0?B(O.default,{columns:z,data:r,sortData:!1,rowComponent:K,className:D.default.table,headerClassName:i?D.default.stickyHeader:D.default.header,headerCellClassName:D.default.headerCell,sortedHeaderCellClassName:D.default.headerCellSorted,bodyCellClassName:D.default.bodyCell,rowClassName:D.default.row,sortKey:t,sortDirection:n,stickyHeader:i,rowProps:{activeRowKey:u||a,highlightedApplicationKey:s,onMouseEnter:this.handleRowMouseEnter,onMouseLeave:this.handleRowMouseLeave,onContextMenu:this.handleApplicationContextMenu,setRef:this.setRowRef},cellProps:{activeRowKey:u||a,onContextMenu:this.handleApplicationContextMenu,setActiveRowKey:this.setActiveRowKey,clearActiveRowKey:this.clearActiveRowKey,sortKey:t,sortDirection:n},onSort:this.handleSort}):null,this.renderImportHelp())},r}(o.PureComponent);function Z(e){var t=o.useContext(M.AnalyticsContext),n=(0,l.useLocation)(),r=(0,u.useStateFromStoresObject)([m.default],(function(){return{applicationViewItems:m.default.sortedFilteredLibraryApplicationViewItems,filterQuery:m.default.applicationFilterQuery,fetched:m.default.hasFetchedApplications}})),a=r.applicationViewItems,i=r.filterQuery,s=r.fetched,d=(0,u.useStateFromStoresObject)([_.default],(function(){return{sortKey:_.default.sortKey,sortDirection:_.default.sortDirection,activeRowKey:_.default.activeRowKey,isNavigatingByKeyboard:_.default.isNavigatingByKeyboard}})),f=d.sortKey,c=d.sortDirection,p=d.activeRowKey,v=d.isNavigatingByKeyboard;return o.createElement($,H({},e,{analyticsContext:t,location:n,applicationViewItems:a,filterQuery:i,fetched:s,sortKey:f,sortDirection:c,activeRowKey:p,isNavigatingByKeyboard:v}))}$.displayName="GameList",$.defaultProps={stickyHeader:!1},Z.displayName="ConnectedGameList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=s(n(39)),l=n(1163),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){var n=t.primarySkuId,r=(0,a.useStateFromStores)([i.default],(function(){return i.default.developerMode}));return!__OVERLAY__&&r&&l.SUPPORTS_COPY?f(o.MenuItem,{id:"application-dev",label:u.default.Messages.COPY,action:function(){return(0,l.copy)(t.id)}},void 0,f(o.MenuItem,{id:"app-id",label:u.default.Messages.APPLICATION_CONTEXT_MENU_APPLICATION_ID,action:function(){return(0,l.copy)(t.id)}}),null!=e?f(o.MenuItem,{id:"branch-id",label:u.default.Messages.APPLICATION_CONTEXT_MENU_BRANCH_ID,action:function(){return(0,l.copy)(e.branchId)}}):null,null!=n?f(o.MenuItem,{id:"sku-id",label:u.default.Messages.APPLICATION_CONTEXT_MENU_SKU_ID,action:function(){return(0,l.copy)(n)}}):null):null}c.displayName="useApplicationDeveloperModeItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=f(n(9163)),l=n(8253),u=f(n(51)),s=n(41),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e){return(0,o.useStateFromStores)([u.default],(function(){return u.default.hasContext(e.id)}),[e.id])?p(l.MenuItem,{id:"ingame-voice",label:d.default.Messages.IN_GAME_VOICE_SETTINGS,action:function(){return(0,s.openModal)((function(t){return a.createElement(i.default,v({},t,{mediaEngineContext:e.id,title:e.name}))}))}}):null}y.displayName="useApplicationVoiceSettingsItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8253),i=d(n(155)),l=d(n(312)),u=d(n(16)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){var n=e.getBranchedName(t),r=(0,a.useStateFromStores)([i.default],(function(){var t=i.default.getState(e.id,e.branchId);return null==t?void 0:t.installPath}),[e.branchId,e.id]);return null!=r&&u.default.isDesktop()?c(o.MenuItem,{id:"create-shortcut",label:s.default.Messages.APPLICATION_CONTEXT_MENU_CREATE_DESKTOP_SHORTCUT,action:function(){return l.default.createShortcuts(!0,!1,n,e.id,r)}}):null}p.displayName="useCreateDesktopShortcutItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;m(n(0));var r,a=n(3),o=n(8253),i=v(n(400)),l=v(n(155)),u=v(n(120)),s=v(n(79)),d=n(263),f=m(n(1253)),c=v(n(1245)),p=v(n(6));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){var n=(0,a.useStateFromStores)([s.default],(function(){return s.default.getRunningVerifiedApplicationIds().includes(e.id)}),[e.id]),r=(0,a.useStateFromStores)([u.default,c.default,l.default,i.default],(function(){return(0,d.isLaunchable)(u.default,c.default,l.default,i.default,e.id,e.branchId)}),[e.branchId,e.id]);return n||!r?null:_(o.MenuItem,{id:"launch",label:p.default.Messages.APPLICATION_CONTEXT_MENU_LAUNCH,action:function(){return f.playApplication(e.id,e,{analyticsParams:{location:t}})}})}h.displayName="useLaunchApplicationItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;p(n(0));var r,a=n(3),o=n(8253),i=f(n(155)),l=f(n(79)),u=p(n(1253)),s=n(1),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=(0,a.useStateFromStores)([l.default],(function(){return l.default.getRunningVerifiedApplicationIds().includes(e.id)}),[e.id]),n=(0,a.useStateFromStoresArray)([i.default],(function(){return[i.default.isUpToDate(e.id,e.branchId),i.default.shouldPatch(e.id,e.branchId)]}),[e.id]),r=n[0],f=n[1];return r&&!t&&f?v(o.MenuItem,{id:"repair",label:d.default.Messages.APPLICATION_CONTEXT_MENU_REPAIR,action:function(){return u.repairApplication(e.id,e.branchId,s.AnalyticsLocations.APPLICATION_CONTEXT_MENU_TOGGLE_INSTALL)}}):null}y.displayName="useRepairApplicationItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=I;var r,a=g(n(0)),o=n(3),i=g(n(1286)),l=n(8253),u=h(n(155)),s=h(n(120)),d=h(n(29)),f=h(n(466)),c=n(41),p=h(n(24)),v=h(n(13)),y=n(99),m=n(1),_=h(n(6));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e,t){var n=(0,o.useStateFromStores)([u.default],(function(){return u.default.isInstalled(e.id,e.branchId)}),[e.branchId,e.id]),r=(0,o.useStateFromStores)([s.default],(function(){return!s.default.hasRemovedLibraryApplicationThisSession}));if(n&&!e.isHidden())return null;function h(){var t=(0,y.toggleFlag)(e.getFlags(),m.LibraryApplicationFlags.HIDDEN);i.updateFlags(e.id,e.branchId,t),v.default.track(m.AnalyticEvents.APPLICATION_SETTINGS_UPDATED,O({hidden_enabled:(0,y.hasFlag)(t,m.LibraryApplicationFlags.HIDDEN)},e.getAnalyticsData()))}return S(l.MenuItem,{id:"in-library",label:e.isHidden()?_.default.Messages.APPLICATION_CONTEXT_MENU_SHOW:_.default.Messages.APPLICATION_CONTEXT_MENU_HIDE,action:function(){null!=e&&null!=t&&(e.isHidden()||!r?h():(0,c.openModal)((function(e){return a.createElement(f.default,O({header:_.default.Messages.APPLICATION_LIBRARY_REMOVE_CONFIRM_HEADER,confirmText:_.default.Messages.APPLICATION_LIBRARY_REMOVE_CONFIRM_CONFIRM,cancelText:_.default.Messages.CANCEL,onConfirm:function(){return n&&h()},confirmButtonColor:d.default.Colors.BRAND},e),S(p.default,{size:p.default.Sizes.SIZE_16},void 0,_.default.Messages.APPLICATION_LIBRARY_REMOVE_CONFIRM_BODY.format({name:t.name})))})))}})}I.displayName="useToggleInLibraryItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;y(n(0));var r,a=n(3),o=n(10304),i=n(8253),l=p(n(155)),u=p(n(79)),s=p(n(306)),d=y(n(1253)),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e){var t=(0,a.useStateFromStores)([u.default],(function(){return u.default.getRunningVerifiedApplicationIds().includes(e.id)}),[e.id]),n=(0,a.useStateFromStores)([l.default],(function(){return l.default.isInstalled(e.id,e.branchId)}),[e.branchId,e.id]),r=(0,a.useStateFromStores)([s.default],(function(){return s.default.getTargetManifests(e.id,e.branchId)}),[e.branchId,e.id]);return n?t?null:m(i.MenuItem,{id:"uninstall",label:c.default.Messages.APPLICATION_CONTEXT_MENU_UNINSTALL,action:function(){return(0,o.uninstallBranchPrompt)(e.id,e.branchId,f.AnalyticsLocations.APPLICATION_CONTEXT_MENU_TOGGLE_INSTALL)}}):null==r?null:m(i.MenuItem,{id:"install",label:c.default.Messages.APPLICATION_CONTEXT_MENU_INSTALL,action:function(){return d.installApplication(e.id,e.branchId,f.AnalyticsLocations.APPLICATION_CONTEXT_MENU_TOGGLE_INSTALL)}})}_.displayName="useToggleInstallItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;c(n(0));var r,a=c(n(1286)),o=n(8253),i=d(n(13)),l=n(99),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e){return null==e?null:p(o.MenuCheckboxItem,{id:"on-overlay",label:s.default.Messages.APPLICATION_CONTEXT_MENU_TOGGLE_OVERLAY_DISABLE,action:function(){if(null!=e){var t=(0,l.toggleFlag)(e.getFlags(),u.LibraryApplicationFlags.OVERLAY_DISABLED);a.updateFlags(e.id,e.branchId,t),i.default.track(u.AnalyticEvents.APPLICATION_SETTINGS_UPDATED,v({overlay_disabled:(0,l.hasFlag)(t,u.LibraryApplicationFlags.OVERLAY_DISABLED)},e.getAnalyticsData()))}},checked:e.hasFlag(u.LibraryApplicationFlags.OVERLAY_DISABLED)})}y.displayName="useToggleOverlayItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;c(n(0));var r,a=c(n(1286)),o=n(8253),i=d(n(13)),l=n(99),u=n(1),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}function y(e){return null==e?null:p(o.MenuCheckboxItem,{id:"private",label:s.default.Messages.APPLICATION_CONTEXT_MENU_PRIVATE_STATUS,action:function(){if(null!=e){var t=(0,l.toggleFlag)(e.getFlags(),u.LibraryApplicationFlags.PRIVATE);a.updateFlags(e.id,e.branchId,t),i.default.track(u.AnalyticEvents.APPLICATION_SETTINGS_UPDATED,v({private_enabled:(0,l.hasFlag)(t,u.LibraryApplicationFlags.PRIVATE)},e.getAnalyticsData()))}},checked:e.hasFlag(u.LibraryApplicationFlags.PRIVATE)})}y.displayName="useTogglePrivateItem"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r},l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,u=e.color,f=void 0===u?"currentColor":u,c=e.foregroundColor,p=void 0===c?l.Colors.STATUS_RED:c,v=e.foreground,y=e.background,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foregroundColor","foreground","background"]);return o.createElement("svg",s({},(0,i.default)(m),{width:n,height:a,viewBox:"0 0 24 24"}),d("rect",{fill:p,className:v,x:"2",y:"21.2154",width:"26",height:"2",transform:"rotate(-45 2 21.2154)"}),d("path",{fill:f,className:y,fillRule:"evenodd",clipRule:"evenodd",d:"M10.1843 18.8115C10.7713 18.9328 11.3775 19 12 19C18.352 19 23 12 23 12C23 12 21.9643 10.4402 20.2026 8.79322L15.8265 13.1693C15.4393 14.4384 14.4382 15.4393 13.1694 15.8264L10.1843 18.8115ZM12.4818 8.02871C12.3238 8.00975 12.1631 8 12 8C9.791 8 8 9.79 8 12C8 12.1631 8.00975 12.3239 8.0287 12.4818L4.59645 15.914C2.35293 14.0375 1 12 1 12C1 12 5.648 5 12 5C13.0508 5 14.055 5.19157 14.9992 5.51132L12.4818 8.02871Z"}))}f.displayName="EyeHidden"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=m(n(3)),l=n(57),u=m(n(1342)),s=m(n(149)),d=m(n(9235)),f=m(n(11434)),c=m(n(11435)),p=m(n(11436)),v=n(1),y=m(n(6));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(){return(E=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}).apply(this,arguments)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var S=new Set([v.CloudSyncStateTypes.PUSHING,v.CloudSyncStateTypes.PULLING]),O=Object.freeze(((r={})[v.CloudSyncStateTypes.DONE]=d.default,r[v.CloudSyncStateTypes.PLANNING]=d.default,r[v.CloudSyncStateTypes.PREPARING]=d.default,r[v.CloudSyncStateTypes.PUSHING]=p.default,r[v.CloudSyncStateTypes.PULLING]=c.default,r[v.CloudSyncStateTypes.CONFLICT]=d.default,r[v.CloudSyncStateTypes.ERROR]=d.default,r)),I=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._doneTimer=new l.Timeout,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var a=r.prototype;return a.componentDidMount=function(){this.getIsRecentlySynced()&&this.setRecentlySyncedTimeout()},a.componentDidUpdate=function(e){null!=this.props.cloudSyncState&&(this.props.cloudSyncState.type!==v.CloudSyncStateTypes.DONE||null==this.props.cloudSyncState.timestamp||null!=e.cloudSyncState&&null!=e.cloudSyncState.timestamp||this.setRecentlySyncedTimeout())},a.componentWillUnmount=function(){this._doneTimer.stop()},a.setRecentlySyncedTimeout=function(){var e=this;this._doneTimer.start(2e3,(function(){return e.forceUpdate()}))},a.getIsRecentlySynced=function(){var e=this.props.cloudSyncState;if(null!=e&&e.type===v.CloudSyncStateTypes.DONE){var t=e.timestamp;return null!=t&&Date.now()-t<=2e3}return!1},a.getStop=function(e,t){return t?1:e.type===v.CloudSyncStateTypes.PUSHING||e.type===v.CloudSyncStateTypes.PULLING?e.progress/e.total:0},a.getTooltip=function(e,t){switch(e.type){case v.CloudSyncStateTypes.DONE:return t?y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_DONE:y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_SUPPORTED;case v.CloudSyncStateTypes.CONFLICT:case v.CloudSyncStateTypes.ERROR:return y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_SUPPORTED;case v.CloudSyncStateTypes.PLANNING:return y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_PLANNING;case v.CloudSyncStateTypes.PREPARING:return y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_PREPARING;case v.CloudSyncStateTypes.PUSHING:return y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_PUSHING;case v.CloudSyncStateTypes.PULLING:return y.default.Messages.CLOUD_SYNC_ICON_TOOLTIP_PULLING;default:return null}},a.render=function(){var e=this.props,t=e.cloudSyncState,n=e.libraryApplication,r=e.className,a=null==t?{type:v.CloudSyncStateTypes.DONE}:t,i=this.getIsRecentlySynced(),l={};(S.has(a.type)||i)&&(l.gradientConfig={id:n.id,startColor:"rgba(199, 208, 240, 1)",stopColor:"rgba(114, 137, 218, 1)",stop:this.getStop(a,i)});var u=i?f.default:O[a.type];return h(s.default,{text:this.getTooltip(a,i)},void 0,(function(e){return o.createElement(u,E({className:r},l,e))}))},r}(o.PureComponent);I.displayName="CloudSyncIcon";var T=i.default.connectStores([u.default],(function(e){var t=e.libraryApplication;return{cloudSyncState:u.default.getState(t.id,t.branchId)}}))(I);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(10224)),i=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(){return(d=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}).apply(this,arguments)}function f(e){return"CloudDone-"+e}var c=s("path",{d:"M0 0h24v24H0z",fill:"none"});function p(e){var t=e.width,n=void 0===t?24:t,r=e.height,l=void 0===r?24:r,u=e.color,p=void 0===u?"currentColor":u,v=e.foreground,y=e.gradientConfig,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","gradientConfig"]),_=null;return null!=y&&(_=a.createElement(o.default,d({},y,{color:p,id:f(y.id)}))),a.createElement("svg",d({},(0,i.default)(m),{width:n,height:l,viewBox:"0 0 24 24"}),s("defs",{},void 0,_),c,s("path",{fill:null!=y?"url(#"+f(y.id)+")":p,className:v,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"}))}p.displayName="CloudDone"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(10224)),i=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(){return(d=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}).apply(this,arguments)}function f(e){return"CloudDownload-"+e}var c=s("path",{d:"M0 0h24v24H0z",fill:"none"});function p(e){var t=e.width,n=void 0===t?24:t,r=e.height,l=void 0===r?24:r,u=e.color,p=void 0===u?"currentColor":u,v=e.foreground,y=e.gradientConfig,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","gradientConfig"]),_=null;return null!=y&&(_=a.createElement(o.default,d({},y,{color:p,id:f(y.id)}))),a.createElement("svg",d({},(0,i.default)(m),{width:n,height:l,viewBox:"0 0 24 24"}),s("defs",{},void 0,_),c,s("path",{fill:null!=y?"url(#"+f(y.id)+")":p,className:v,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"}))}p.displayName="CloudDownload"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(10224)),i=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(){return(d=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}).apply(this,arguments)}function f(e){return"CloudUpload-"+e}var c=s("path",{d:"M0 0h24v24H0z",fill:"none"});function p(e){var t=e.width,n=void 0===t?24:t,r=e.height,l=void 0===r?24:r,u=e.color,p=void 0===u?"currentColor":u,v=e.foreground,y=e.gradientConfig,m=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground","gradientConfig"]),_=null;return null!=y&&(_=a.createElement(o.default,d({},y,{color:p,id:f(y.id)}))),a.createElement("svg",d({},(0,i.default)(m),{width:n,height:l,viewBox:"0 0 24 24"}),s("defs",{},void 0,_),c,s("path",{fill:null!=y?"url(#"+f(y.id)+")":p,className:v,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"}))}p.displayName="CloudUpload"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u=z(n(0)),s=W(n(9)),d=W(n(8)),f=W(n(3)),c=W(n(2)),p=z(n(389)),v=z(n(266)),y=W(n(8892)),m=W(n(8273)),_=W(n(8299)),h=W(n(10463)),E=W(n(155)),g=W(n(405)),S=W(n(71)),O=W(n(120)),I=W(n(39)),T=W(n(161)),C=W(n(29)),b=W(n(55)),M=W(n(477)),N=n(8432),A=W(n(8635)),P=W(n(11438)),R=W(n(10464)),L=W(n(149)),D=W(n(9237)),w=W(n(255)),j=W(n(9104)),k=W(n(8723)),U=n(380),G=z(n(136)),F=W(n(9034)),B=W(n(11439)),H=n(1),x=W(n(6)),V=W(n(8111));function W(e){return e&&e.__esModule?e:{default:e}}function Y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Y=function(){return e},e}function z(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Z(e,t)}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function q(){return(q=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}).apply(this,arguments)}function X(e,t,n,r){l||(l="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var i=new Array(o),u=0;u<o;u++)i[u]=arguments[u+3];t.children=i}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:l,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var J=function(e){var t=e.className,n=e.children,r=e.onContextMenu,a=e.item;return X("div",{className:t,onContextMenu:function(e){return r(e,a)}},void 0,n)};J.displayName="Row";var Q=[H.Colors.LINK,"var(--interactive-normal)"],ee=function(e){var t=e.tooltip,n=e.onClick,r=e.icon;return X(L.default,{text:t},void 0,(function(e){var a=e.onMouseEnter,o=e.onMouseLeave;return X(C.default,{"aria-label":t,className:V.default.actionButton,innerClassName:V.default.actionButtonContents,color:C.default.Colors.GREY,size:C.default.Sizes.ICON,onClick:n,onMouseEnter:a,onMouseLeave:o},void 0,X(r,{className:V.default.actionIcon}))}))};function te(e,t){switch(t){case H.DispatchApplicationStages.POST_INSTALL_SCRIPTS:case H.DispatchApplicationStages.PLANNING:case H.DispatchApplicationStages.FINALIZING:case H.DispatchApplicationStages.ALLOCATING_DISK:return""+e;default:return(0,U.formatSize)(e,{useKibibytes:!0})}}ee.displayName="ActionButton";var ne=((i={})[H.LocalDispatchApplicationStates.INSTALLING]=((r={})[N.TimeUnits.NONE]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING.format({percent:e,progress:t,total:n})},r[N.TimeUnits.SECONDS]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING_SECONDS.format({percent:e,progress:t,total:n,timeRemaining:r})},r[N.TimeUnits.MINUTES]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING_MINUTES.format({percent:e,progress:t,total:n,timeRemaining:r})},r[N.TimeUnits.HOURS]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING_HOURS.format({percent:e,progress:t,total:n,timeRemaining:r})},r),i[H.LocalDispatchApplicationStates.UPDATING]=((a={})[N.TimeUnits.NONE]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_UPDATING.format({percent:e,progress:t,total:n})},a[N.TimeUnits.SECONDS]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_UPDATING_UPDATING_SECONDS.format({percent:e,progress:t,total:n,timeRemaining:r})},a[N.TimeUnits.MINUTES]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_UPDATING_UPDATING_MINUTES.format({percent:e,progress:t,total:n,timeRemaining:r})},a[N.TimeUnits.HOURS]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_UPDATING_UPDATING_HOURS.format({percent:e,progress:t,total:n,timeRemaining:r})},a),i[H.LocalDispatchApplicationStates.REPAIRING]=((o={})[N.TimeUnits.NONE]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING.format({percent:e,progress:t,total:n})},o[N.TimeUnits.SECONDS]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING_SECONDS.format({percent:e,progress:t,total:n,timeRemaining:r})},o[N.TimeUnits.MINUTES]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING_MINUTES.format({percent:e,progress:t,total:n,timeRemaining:r})},o[N.TimeUnits.HOURS]=function(e,t,n,r){return x.default.Messages.GAME_LIBRARY_UPDATES_INSTALLING_HOURS.format({percent:e,progress:t,total:n,timeRemaining:r})},o),i);function re(e,t,n,r,a){var o=null!=e?e/60:null,i=ne[t],l=null!=i?Object.keys(i):[],u=(0,N.getTimeAndUnit)(o,l),s=u.unit,d=u.time;if(null!=i&&null!=s){var f=i[s];return null!=f?f(n,r,a,d):null}return null}function ae(e,t,n,r,a,o){var i=te(a,t),l=te(r,t);switch(t){case H.DispatchApplicationStages.QUEUED:return 0===r?x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_WAITING_FOR_ANOTHER_NO_TRANSITION:x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_WAITING_FOR_ANOTHER.format({percent:n,progress:l,total:i});case H.DispatchApplicationStages.PLANNING:return x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_PLANNING.format({percent:n});case H.DispatchApplicationStages.ALLOCATING_DISK:return x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_ALLOCATING_DISK.format({percent:n});case H.DispatchApplicationStages.PATCHING:return re(o,e,n,l,i);case H.DispatchApplicationStages.FINALIZING:return x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_FINALIZING.format({percent:n});case H.DispatchApplicationStages.PAUSING:return x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_PAUSING.format({percent:n,progress:l,total:i});case H.DispatchApplicationStages.VERIFYING:return x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_VERIFYING.format({percent:n,progress:l,total:i});case H.DispatchApplicationStages.POST_INSTALL_SCRIPTS:return x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_POST_INSTALL_SCRIPTS.format({percent:n,progress:l,total:i});case H.DispatchApplicationStages.REPAIRING:return e===H.LocalDispatchApplicationStates.REPAIRING?re(o,e,n,l,i):x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_REPAIRING.format({percent:n,progress:l,total:i})}throw new Error("Invalid Dispatch stage")}var oe="name",ie="progress",le="actions",ue=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderProgressPatchingBody=function(e,n){var r=t.props.item.state;if(null==r)return null;var a=r.stage,o=r.progress,i=r.total,l=r.type,u=r.readerProgress;if(null==o||null==i||null==a)return null;var s=G.calculateProgressPercentage(o,i),d=G.calculateProgressPercentage(u||0,i),f=e[e.length-1]/n*1e3,c=i-o,p=0!==f?Math.max(1,c/f):null,v=ae(l,a,Math.floor(s),o,i,p);return t.renderStackedProgress({percents:[s,d],message:v})},t}$(t,e);var n,r,a,o=t.prototype;return o.renderBody=function(e){var t=e.percent,n=e.foregroundColor,r=e.foregroundGradientColor,a=e.message;return X(b.default,{direction:b.default.Direction.VERTICAL},void 0,X(A.default,{percent:t,size:A.default.Sizes.SMALL,foregroundColor:n,foregroundGradientColor:r,animate:this.isFocused}),X("div",{className:V.default.progressCellText},void 0,null!=a?a:""))},o.renderStackedProgress=function(e){var t=e.percents,n=e.message;return X(b.default,{direction:b.default.Direction.VERTICAL},void 0,X(P.default,{percents:t,size:A.default.Sizes.SMALL,foregroundColors:Q,animate:this.isFocused}),X("div",{className:V.default.progressCellText},void 0,null!=n?n:""))},o.renderFinished=function(){var e=this.props.item;return this.renderBody({message:x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_FINISHED.format({remove:function(){return v.removeFinished(e.applicationId,e.branchId)}}),foregroundColor:e.theme===H.ThemeTypes.LIGHT?H.Colors.PRIMARY_DARK_300:H.Colors.PRIMARY_DARK,percent:100})},o.renderQueued=function(){var e,t,n=this.props.item,r=n.state,a=n.theme;if(null!=r){var o=r.progress,i=r.total,l=r.stage;if(null!=o&&null!=i){var u=te(i,l),s=te(o,l);t=G.calculateProgressPercentage(o,i);var d=Math.floor(t);e=l===H.DispatchApplicationStages.PAUSING?x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_PAUSING.format({percent:d,progress:s,total:u}):x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_QUEUED.format({percent:d,progress:s,total:u})}}return null!=t&&null!=e||(t=0,e=x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_QUEUED_NO_TRANSITION),this.renderBody({percent:t,foregroundColor:a===H.ThemeTypes.LIGHT?H.Colors.PRIMARY_DARK_300:H.Colors.PRIMARY_DARK,message:e})},o.renderPaused=function(){var e=this.props.item,t=e.state,n=e.theme;if(null==t)return null;var r=t.progress,a=t.total;if(null==r||null==a)return null;var o=G.calculateProgressPercentage(r,a),i=Math.floor(o),l=0===r&&1===a?x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_PAUSED_NO_TRANSITION:x.default.Messages.GAME_LIBRARY_UPDATES_PROGRESS_PAUSED.format({percent:i,progress:(0,U.formatSize)(r),total:(0,U.formatSize)(a)});return this.renderBody({message:l,foregroundColor:n===H.ThemeTypes.LIGHT?H.Colors.PRIMARY_DARK_300:H.Colors.PRIMARY_DARK,percent:o})},o.renderProgressPatching=function(){return X(F.default,{getHistoricalTotalBytes:E.default.getHistoricalTotalBytesWritten,updateInterval:5e3},void 0,this.renderProgressPatchingBody)},o.renderProgressDefault=function(){var e=this.props.item.state;if(null==e)return null;var t=e.total,n=e.progress,r=e.stage,a=e.type;if(null==t||null==n||null==r)return null;var o=G.calculateProgressPercentage(n,t),i=Math.floor(o);return this.renderBody({percent:o,message:ae(a,r,i,n,t),foregroundColor:H.Colors.LINK})},o.renderProgress=function(){var e=this.props.item.state;switch(null!=e?e.stage:null){case H.DispatchApplicationStages.PATCHING:case H.DispatchApplicationStages.REPAIRING:return this.renderProgressPatching();default:return this.renderProgressDefault()}},o.render=function(){var e=this.props,t=e.item,n=e.cellProps;return t.finished?this.renderFinished():t.index>0?this.renderQueued():null==t.state||t.state.type!==H.LocalDispatchApplicationStates.UPDATING&&t.state.type!==H.LocalDispatchApplicationStates.REPAIRING&&t.state.type!==H.LocalDispatchApplicationStates.INSTALLING?null:null!=n&&n.paused?this.renderPaused():this.renderProgress()},n=t,(r=[{key:"isFocused",get:function(){var e=this.props.cellProps;return null!=e&&e.isFocused}}])&&K(n.prototype,r),a&&K(n,a),t}(u.PureComponent);ue.displayName="ProgressCell";var se=function(){return X(ee,{icon:k.default,tooltip:x.default.Messages.GAME_LIBRARY_UPDATES_ACTION_RESUME,onClick:function(){return v.resume()}})};se.displayName="ResumeButton";var de=function(){return X(ee,{icon:j.default,tooltip:x.default.Messages.GAME_LIBRARY_UPDATES_ACTION_PAUSE,onClick:function(){return v.pause()}})};de.displayName="PauseButton";var fe=function(e){var t=e.item;return X(ee,{icon:D.default,tooltip:x.default.Messages.GAME_LIBRARY_UPDATES_ACTION_MOVE_UP,onClick:function(){return v.moveUp(t.applicationId,t.branchId)}})};fe.displayName="MoveUpButton";var ce=function(e){var t=e.item;return X(ee,{icon:w.default,tooltip:x.default.Messages.GAME_LIBRARY_UPDATES_ACTION_REMOVE,onClick:function(){return v.cancel(t.applicationId,t.branchId)}})};ce.displayName="CancelButton";var pe=X(se,{}),ve=[{key:oe,cellClassName:V.default.nameCell,render:function(e){return X(b.default,{align:b.default.Align.CENTER},void 0,X(M.default,{game:e.application,className:V.default.gameIcon,size:M.default.Sizes.SMALL}),X("div",{className:V.default.nameCellText},void 0,e.application.name))}},{key:ie,cellClassName:V.default.progressCell,headerCellClassName:V.default.progressCellHeader,bodyCellClassName:V.default.progressCellBody,render:function(e,t){return X(ue,{item:e,cellProps:t})}},{key:le,cellClassName:V.default.actionsCell,render:function(e,t){var n,r;return e.finished?n=null!=e.libraryApplication?X(y.default,{libraryApplication:e.libraryApplication,size:C.default.Sizes.SMALL,className:V.default.gameActionButton,source:H.AnalyticsLocations.APPLICATION_LIBRARY_UPDATES}):null:null!=e.state?e.state.type!==H.LocalDispatchApplicationStates.UP_TO_DATE&&(n=e.index>0?X(fe,{item:e}):null!=t&&t.paused?pe:X(de,{item:e}),r=X(ce,{item:e})):r=X(ce,{item:e}),X(b.default,{justify:b.default.Justify.END},void 0,n,r)}}],ye=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).isUnmounted=!1,t.isTallerThanHalfViewport=!1,t.throttledUpdateHeight=d.default.throttle((function(){if(!t.isUnmounted){var e=t.props,n=e.height,r=e.onHeightTallerThanHalfViewportChange,a=n>window.innerHeight/2;t.isTallerThanHalfViewport!==a&&(t.isTallerThanHalfViewport=a,r(a))}}),1e3),t}$(t,e);var n=t.prototype;return n.componentDidMount=function(){window.addEventListener("resize",this.throttledUpdateHeight)},n.componentDidUpdate=function(e){this.props.height!==e.height&&this.throttledUpdateHeight()},n.componentWillUnmount=function(){this.props.applications.forEach((function(e){e.finished&&c.default.wait((function(){v.removeFinished(e.applicationId,e.branchId)}))})),window.removeEventListener("resize",this.throttledUpdateHeight),this.isUnmounted=!0},n.render=function(){var e=this.props,t=e.applications,n=e.paused,r=e.isFocused,a=e.theme,o=e.analyticsContext;return 0===t.length?null:X("div",{className:V.default.gameUpdates},void 0,X("div",{className:V.default.headerRow},void 0,X(B.default,{className:(0,s.default)(V.default.headerCell,V.default.networkProgress),title:x.default.Messages.GAME_LIBRARY_UPDATES_HEADER_NETWORK,getHistoricalTotalBytes:E.default.getHistoricalTotalBytesDownloaded,color:H.Colors.STATUS_GREEN_600,animate:r}),X(B.default,{className:(0,s.default)(V.default.headerCell,V.default.diskProgress),title:x.default.Messages.GAME_LIBRARY_UPDATES_HEADER_DISK,getHistoricalTotalBytes:E.default.getHistoricalTotalBytesWritten,color:H.Colors.LINK,animate:r})),X(R.default,{hasHeader:!1,columns:ve,data:t,className:V.default.table,rowClassName:V.default.row,rowComponent:J,cellProps:{paused:n,isFocused:r,theme:a},rowProps:{onContextMenu:function(e,t){return function(e,t,n){p.openContextMenu(e,(function(e){return u.createElement(h.default,q({},e,{applicationId:t.applicationId,branchId:t.branchId,analyticsContext:n}))}))}(e,t,o)}},bodyCellClassName:V.default.cell}))},t}(u.PureComponent);function me(e,t,n,r){return e.reduce((function(e,a,o){var i=a.applicationId,l=a.branchId,u=n.getGame(i),s=r.getState(i,l);return null!=u&&e.push({key:i+":"+l,applicationId:i,branchId:l,state:s,application:u,libraryApplication:O.default.getLibraryApplication(i,l),finished:t,index:o}),e}),[])}ye.displayName="GameUpdates";var _e=(0,_.default)(f.default.connectStores([g.default,I.default,T.default,S.default,E.default],(function(){var e=me(g.default.activeItems,!1,S.default,E.default),t=me(g.default.finishedItems,!0,S.default,E.default);return{applications:[].concat(e,t),paused:g.default.paused,isFocused:T.default.isFocused(),theme:I.default.theme}}))((0,m.default)(ye)));t.default=_e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a,o=s(n(9)),i=s(n(8)),l=n(1),u=s(n(8108));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){return(c=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}).apply(this,arguments)}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.LARGE="large"}(a||(a={}));var p=function(e){var t=e.className,n=e.percents,r=e.size,s=void 0===r?a.SMALL:r,d=e.foregroundColors,p=void 0===d?[l.Colors.BRAND]:d,v=e.backgroundColor,y=void 0===v?"var(--background-modifier-active)":v,m=e.animate,_=void 0===m||m,h=i.default.zip(n,p).map((function(e,t){var n,r,a=e[0],i=e[1];return r=Array.isArray(i)?{background:"linear-gradient(to right, "+i[0]+", "+i[1]+")"}:{backgroundColor:i},f("div",{className:(0,o.default)(u.default.progressBar,u.default[s],(n={},n[u.default.animating]=_,n)),style:c({transform:"translate3d("+(Math.min(Math.max(0,a),100)-100)+"%, 0, 0)"},r)},t)})).reverse();return f("div",{className:(0,o.default)(t,u.default.progress,u.default[s]),style:{backgroundColor:y}},void 0,h)};p.displayName="StackedProgress",p.Sizes=a;var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(9)),i=f(n(55)),l=f(n(11440)),u=f(n(9034)),s=f(n(6)),d=f(n(8110));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){return e>1e3?s.default.Messages.FILE_RATE_MB.format({size:Math.round(e/1e3)}):s.default.Messages.FILE_RATE_KB.format({size:Math.round(e)})}var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderBody=function(e,n,r){var a=t.props,u=a.title,s=a.className,f=a.color,c=a.animate,v=a.gradientStopColor;return p("div",{className:(0,o.default)(d.default.monitor,s)},void 0,p(i.default,{align:i.default.Align.CENTER},void 0,p(i.default,{className:d.default.text,direction:i.default.Direction.VERTICAL},void 0,p("div",{className:d.default.title},void 0,u),p("div",{className:d.default.rate},void 0,y(e[e.length-1]/n*1e3))),p("div",{className:d.default.overflowContainer},void 0,p(l.default,{data:e,maxValue:Math.max(Math.max.apply(null,e),1e3),className:d.default.sparkChart,updateInterval:n,color:f,gradientStopColor:v,numUpdatesToShow:r,animate:c,pixelWidth:600,pixelHeight:48,lineWidth:4}))))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.prototype.render=function(){return p(u.default,{getHistoricalTotalBytes:this.props.getHistoricalTotalBytes},void 0,this.renderBody)},r}(a.PureComponent);m.displayName="GameUpdateActivityMonitor";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=d(n(0)),o=u(n(8)),i=d(n(483)),l=u(n(8109));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).canvas=a.createRef(),t.updateAnimation=function(e){var n=t.canvas.current;if(null!=n){var r=t.props,a=r.data,o=r.updateInterval,l=r.color,u=r.numUpdatesToShow,s=r.lineWidth,d=r.animate,f=r.gradientStopColor;if(!(a.length<2)){var c=Math.max(Math.min((e-t.dataChangedAt)/o,1),0),p=n.getContext("2d"),v=t.maxValue;p.strokeStyle=l,p.lineWidth=s;var y=n.height-p.lineWidth,m=p.createLinearGradient(0,0,0,y);if(null!=f)m.addColorStop(0,f);else{var _=i.hexToRgb(l),h=_.r,E=_.g,g=_.b;m.addColorStop(0,"rgba("+h+", "+E+", "+g+", 0)")}m.addColorStop(1,t.fillColor),p.fillStyle=m;var S=a.length>=u?u:a.length;p.setTransform(1,0,0,-1,0,n.height),p.clearRect(0,0,n.width,n.height),p.translate(0,.5*p.lineWidth);var O,I,T=Math.floor(n.width/(S-3)),C=.5*T,b=T-T*c;p.translate(b,0),p.beginPath();var M=-T;a.forEach((function(e,t){O={x:M,y:y*e/v},0===t?p.moveTo(O.x,O.y):p.bezierCurveTo(I.x+C,I.y,O.x-C,O.y,O.x,O.y),I=O,M+=T})),p.stroke(),p.lineTo(M-T,0),p.lineTo(0,0),p.fill(),d&&c<1&&(t.animationFrameRequestId=window.requestAnimationFrame(t.updateAnimation))}}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var u=r.prototype;return u.onDataUpdate=function(e,t){var n=this.props,r=n.maxValue,a=n.data,l=n.animate,u=null==e||e.data!==t.data&&!o.default.isEqual(e.data,t.data);if(u&&(this.dataChangedAt=performance.now(),this.maxValue=null!=r?r:Math.max.apply(Math,a)),u||null==e||!e.animate&&l||e.color!==this.props.color){var s=i.hexToRgb(this.props.color);this.fillColor="rgba("+s.r+", "+s.g+", "+s.b+", 0.5)",window.cancelAnimationFrame(this.animationFrameRequestId),this.animationFrameRequestId=window.requestAnimationFrame(this.updateAnimation)}},u.componentDidMount=function(){this.animationFrameRequestId=0,this.onDataUpdate(null,this.props)},u.componentDidUpdate=function(e){this.onDataUpdate(e,this.props)},u.componentWillUnmount=function(){window.cancelAnimationFrame(this.animationFrameRequestId),this.animationFrameRequestId=0},u.render=function(){var e=this.props,t=e.className,n=e.pixelWidth,r=e.pixelHeight;return f("div",{className:t},void 0,a.createElement("canvas",{ref:this.canvas,className:l.default.canvas,width:n,height:r}))},r}(a.PureComponent);p.displayName="SparkChart",p.defaultProps={animate:!0};var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=T(n(3)),i=b(n(1286)),l=T(n(274)),u=T(n(39)),s=T(n(1341)),d=T(n(61)),f=T(n(55)),c=T(n(8267)),p=n(131),v=T(n(255)),y=n(272),m=T(n(13)),_=n(263),h=b(n(99)),E=T(n(10462)),g=T(n(11442)),S=n(1),O=T(n(6)),I=T(n(8116));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(){return(M=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}).apply(this,arguments)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e){var t=e.applicationViewItems,n=e.restoreApplication;if(0===t.length)return null;var r=t.map((function(e){var t=e.libraryApplication.getDistributor();return A("div",{className:I.default.hiddenLibraryApplication},e.key,A(f.default,{direction:f.default.Direction.VERTICAL,className:I.default.hiddenLibraryApplicationContent},void 0,A("div",{className:I.default.applicationName},void 0,e.libraryApplication.getBranchedName(e.application)),null!=t?A("div",{className:I.default.applicationSubText},void 0,S.DistributorNames[t]):null),A(d.default,{className:I.default.restoreButton,onClick:function(){return n(e.libraryApplication)}},void 0,A(v.default,{className:I.default.restoreIcon})))}));return A(p.FormSection,{className:I.default.hiddenLibraryApplications},void 0,A(p.FormTitle,{className:I.default.hiddenLibraryApplicationsTitle},void 0,O.default.Messages.SETTINGS_GAMES_HIDDEN_LIBRARY_APPLICATIONS_LABEL),r)}P.displayName="HiddenLibraryApplications";var R=A(g.default,{}),L=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRestoreHiddenLibraryApplication=function(e){var n=h.toggleFlag(e.getFlags(),S.LibraryApplicationFlags.HIDDEN);i.updateFlags(e.id,e.branchId,n),t.trackRestoreApplication(e,h.hasFlag(n,S.LibraryApplicationFlags.HIDDEN))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var o=r.prototype;return o.handleToggleShortcutDesktop=function(e){l.default.updateLocalSettings({installShortcutDesktop:e})},o.handleToggleShortcutStartMenu=function(e){l.default.updateLocalSettings({installShortcutStartMenu:e})},o.trackRestoreApplication=function(e,t){m.default.track(S.AnalyticEvents.APPLICATION_SETTINGS_UPDATED,M({hidden_enabled:t},e.getAnalyticsData()))},o.renderBody=function(){var e=this.props,t=e.hiddenLibraryApplicationViewItems,n=e.installShortcutDesktop,r=e.installShortcutStartMenu;return A("div",{className:I.default.body},void 0,(0,_.isSupportedPlatform)()?A(a.Fragment,{},void 0,A(c.default,{value:n,onChange:this.handleToggleShortcutDesktop,note:O.default.Messages.USER_SETTINGS_GAMES_SHORTCUTS_DESKTOP_NOTE},void 0,O.default.Messages.USER_SETTINGS_GAMES_SHORTCUTS_DESKTOP),A(c.default,{value:r,onChange:this.handleToggleShortcutStartMenu,note:O.default.Messages.USER_SETTINGS_GAMES_SHORTCUTS_START_MENU_NOTE},void 0,O.default.Messages.USER_SETTINGS_GAMES_SHORTCUTS_START_MENU),R):null,A(P,{restoreApplication:this.handleRestoreHiddenLibraryApplication,applicationViewItems:t}))},o.render=function(){return a.createElement(a.Fragment,null,A(E.default,{currentRoute:S.Routes.APPLICATION_LIBRARY_SETTINGS}),A(y.ScrollerAuto,{className:I.default.scroller},void 0,this.renderBody()))},r}(a.PureComponent);L.displayName="GameLibrarySettings";var D=o.default.connectStores([u.default,s.default],(function(){return{hiddenLibraryApplicationViewItems:s.default.hiddenLibraryApplicationViewItems,installShortcutDesktop:u.default.installShortcutDesktop,installShortcutStartMenu:u.default.installShortcutStartMenu}}))(L);t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(3)),i=n(1432),l=b(n(210)),u=b(n(29)),s=b(n(467)),d=b(n(1160)),f=b(n(11443)),c=b(n(55)),p=b(n(10225)),v=b(n(153)),y=n(131),m=b(n(466)),_=n(41),h=b(n(47)),E=b(n(24)),g=n(380),S=b(n(16)),O=b(n(43)),I=b(n(6)),T=b(n(8115)),C=b(n(370));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(){return(N=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}).apply(this,arguments)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,R(e,t)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={label:void 0,isDefault:null},t.handleStartEditing=function(){var e=t.props,n=e.path,r=e.label,a=e.isDefault;(0,e.onToggleEditing)(n),t.setState({label:r,isDefault:a})},t.handleStopEditing=function(){(0,t.props.onToggleEditing)(null),t.setState({label:void 0,isDefault:null})},t.handleRemoveLocation=function(){(0,_.openModal)((function(e){return a.createElement(m.default,N({},e,{header:I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_REMOVE,confirmText:I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_REMOVE,cancelText:I.default.Messages.CANCEL,onConfirm:function(){t.handleStopEditing(),(0,i.removeInstallLocation)(t.props.path)}}),A(E.default,{size:E.default.Sizes.SIZE_16},void 0,I.default.Messages.USER_SETTINGS_GAMES_REMOVE_LOCATION_BODY))}))},t.handleSaveChanges=function(){(0,i.updateInstallLocation)(t.props.path,{label:null!=t.state.label?t.state.label:t.props.label,isDefault:null!=t.state.isDefault?t.state.isDefault:t.props.isDefault}),t.handleStopEditing()},t.handleLabelChange=function(e){t.setState({label:e})},t.handleToggleDefault=function(){t.setState({isDefault:!t.state.isDefault})},t}P(t,e);var n=t.prototype;return n.renderDiskUsageCircle=function(){var e=this.props.metadata;return null!=e&&null!=e.availableKB&&null!=e.totalKB?A(f.default,{total:e.totalKB,used:e.totalKB-e.availableKB}):null},n.renderViewing=function(){var e,t,n=this.props,r=n.path,a=n.label,o=n.editingPath,i=n.isDefault,s=n.metadata;return null!=s&&(e=null!=s.availableKB?(0,g.formatSize)(s.availableKB,{useKibibytes:!0}):null,t=null!=s.totalKB?(0,g.formatSize)(s.totalKB,{useKibibytes:!0}):null),A(c.default,{className:T.default.installationPath,align:c.default.Align.CENTER},void 0,this.renderDiskUsageCircle(),A(c.default,{direction:c.default.Direction.VERTICAL,className:T.default.descriptionWrapper},void 0,A(c.default,{align:c.default.Align.CENTER},void 0,A(h.default,{className:T.default.rowTitle,size:h.default.Sizes.SIZE_16},void 0,null!=a?a:l.default.getLabelFromPath(r)),i?A("span",{className:T.default.defaultIndicator},void 0,I.default.Messages.DEFAULT):null),null!=s&&null!=e&&null!=t?A(p.default,{className:T.default.rowBody,hoverText:I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_SPACE.format({available:e,total:t})},void 0,r):A(E.default,{className:T.default.rowBody,size:E.default.Sizes.SIZE_12},void 0,r)),A(u.default,{size:u.default.Sizes.SMALL,disabled:null!=o,color:u.default.Colors.PRIMARY,onClick:this.handleStartEditing},void 0,I.default.Messages.EDIT))},n.renderEditing=function(){var e=this.props,t=e.path,n=e.hasGamesInstalledInPath,r=this.state,a=r.label,o=r.isDefault;return A(s.default,{editable:!0,className:T.default.installationPathEditing},void 0,A(c.default,{},void 0,this.renderDiskUsageCircle(),A(c.default.Child,{},void 0,A(y.FormItem,{title:I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_NAME},void 0,A(v.default,{value:a,placeholder:l.default.getLabelFromPath(t),onChange:this.handleLabelChange})),A(y.FormItem,{title:I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION,className:C.default.marginTop20},void 0,A(v.default,{disabled:!0,value:t})),A(d.default,{type:d.default.Types.INVERTED,value:null!=o?o:this.props.isDefault,disabled:this.props.isDefault,className:T.default.defaultLocationCheckbox,onChange:this.handleToggleDefault},void 0,I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_MAKE_DEFAULT),A(y.FormDivider,{className:T.default.separator}),A(c.default,{},void 0,A(u.default,{disabled:n||this.props.isDefault,size:u.default.Sizes.SMALL,color:u.default.Colors.RED,look:u.default.Looks.OUTLINED,onClick:this.handleRemoveLocation},void 0,I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_REMOVE),A(c.default,{justify:c.default.Justify.END},void 0,A(u.default,{size:u.default.Sizes.SMALL,color:u.default.Colors.PRIMARY,look:u.default.Looks.LINK,onClick:this.handleStopEditing},void 0,I.default.Messages.CANCEL),A(u.default,{disabled:t===this.props.path&&a===this.props.label&&o===this.props.isDefault,size:u.default.Sizes.SMALL,color:u.default.Colors.GREEN,onClick:this.handleSaveChanges},void 0,I.default.Messages.SAVE))))))},n.render=function(){return this.props.editingPath===this.props.path?this.renderEditing():this.renderViewing()},t}(a.PureComponent);L.displayName="PathItem";var D=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={editingPath:null},t.handleAddInstallationLocation=function(){O.default.showOpenDialog(["openDirectory"]).then((function(e){null!=e&&0!==e.length&&null!=e[0]&&"undefined"!==e[0]&&(0,i.addInstallLocation)(e[0])}))},t.handleToggleEditing=function(e){t.setState({editingPath:e})},t}P(t,e);var n=t.prototype;return n.componentDidMount=function(){(0,i.fetchMetadata)(this.props.installationPaths.map((function(e){return e.path})))},n.render=function(){var e=this,t=this.props,n=t.installationPaths,r=t.installationPathsMetadata,a=t.defaultInstallationPath,o=this.state.editingPath;return A(y.FormSection,{className:T.default.wrapper,title:I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATIONS},void 0,n.map((function(t){var n=t.path,i=t.label;return A(L,{path:n,label:i,metadata:r[n],isDefault:a===n,editingPath:o,hasGamesInstalledInPath:l.default.hasGamesInstalledInPath(n),onToggleEditing:e.handleToggleEditing},n)})),A("div",{className:T.default.buttonRowWrapper},void 0,A(u.default,{disabled:!S.default.embedded,onClick:this.handleAddInstallationLocation,size:u.default.Sizes.SMALL},void 0,I.default.Messages.USER_SETTINGS_GAMES_INSTALL_LOCATION_ADD)))},t}(a.PureComponent);D.displayName="GameInstallLocations";var w=o.default.connectStores([l.default],(function(){return{installationPaths:l.default.installationPaths,installationPathsMetadata:l.default.installationPathsMetadata,defaultInstallationPath:l.default.defaultInstallationPath}}))(D);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(149)),i=u(n(6)),l=u(n(8113));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=Math.ceil(2*Math.PI*20);function p(e){return"rgb("+Math.round(-85*e+199)+", "+Math.round(-71*e+208)+", "+Math.round(-22*e+240)+")"}function v(e){return Math.floor(c*e)+", "+c}var y=function(e){var t=e.total,n=e.used,r=Math.max(0,Math.min(1,n/t)),u=Math.floor(100*r)+"%";return f(o.default,{text:i.default.Messages.APPLICATION_INSTALLATION_SPACE_USED.format({used:u})},void 0,(function(e){return a.createElement("div",d({className:l.default.wrapper,role:"progressbar","aria-label":i.default.Messages.APPLICATION_INSTALLATION_SPACE_USED.format({used:u})},e),f("svg",{viewBox:"25 25 50 50",className:l.default.svg,"aria-hidden":!0},void 0,f("circle",{className:l.default.background,cx:"50",cy:"50",r:20}),f("circle",{className:l.default.foreground,cx:"50",cy:"50",r:20,stroke:p(r),strokeDasharray:v(r)})),f("aside",{className:l.default.usageInfo,"aria-hidden":!0},void 0,u))}))};y.displayName="DiskSpaceCircle";var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=H(n(0)),o=F(n(9)),i=F(n(8)),l=F(n(137)),u=n(262),s=F(n(273)),d=F(n(3)),f=F(n(2)),c=n(8700),p=n(6043),v=n(11445),y=n(1213),m=n(8578),_=F(n(8483)),h=F(n(11446)),E=F(n(11447)),g=F(n(11451)),S=n(42),O=n(5687),I=F(n(1265)),T=H(n(1275)),C=F(n(15)),b=F(n(39)),M=F(n(470)),N=F(n(29)),A=F(n(47)),P=F(n(24)),R=n(468),L=H(n(701)),D=F(n(10467)),w=n(1),j=F(n(6)),k=F(n(7898)),U=F(n(11456)),G=F(n(11457));function F(e){return e&&e.__esModule?e:{default:e}}function B(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return B=function(){return e},e}function H(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=B();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function x(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function V(){return(V=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}).apply(this,arguments)}function W(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function Y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){W(o,r,a,i,l,"next",e)}function l(e){W(o,r,a,i,l,"throw",e)}i(void 0)}))}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var K=L.AnalyticsContexts,$=x(g.default,{}),Z=x(u.Helmet,{title:"Discord"}),q=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._scroller=a.createRef(),t._guildIdsSeen=new Set,t.loadId=L.makeAnalyticsID(),t.state={animatedValue:new s.default.Value(0),loadingGuildId:null},t.scrollToTop=function(){null!=t._scroller.current&&t._scroller.current.scrollTo({to:0})},t.handleScroll=function(){var e,n,r=t.state.animatedValue,a=null!==(e=null===(n=t._scroller.current)||void 0===n?void 0:n.getScrollerState().scrollTop)&&void 0!==e?e:0;r.setValue(Math.min(1,a/200))},t.handleViewGuild=function(){var e=Y(regeneratorRuntime.mark((function e(n,r,a){var o,i,l,u,s,d,f,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=t.props.currentCategoryId,u=t.state.loadingGuildId,n!==u){e.next=4;break}return e.abrupt("return");case 4:return s=null!==(o=null===(i=t._scroller.current)||void 0===i?void 0:i.getScrollerState().scrollTop)&&void 0!==o?o:0,d=(0,S.getHistory)(),f=d.location,(0,S.replaceWith)(V({},f,{state:s})),t.setState({loadingGuildId:n}),c=l!==y.DISCOVERY_ALL_CATEGORIES_ID?l:null,e.prev=9,e.next=12,L.viewGuild(t.loadId,n,r,a,c);case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),t.setState({loadingGuildId:null});case 17:case"end":return e.stop()}}),e,null,[[9,14]])})));return function(t,n,r){return e.apply(this,arguments)}}(),t.handleGuildCardSeen=function(e){t._guildIdsSeen.add(e)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,z(t,n);var i=r.prototype;return i.componentDidMount=function(){var e,t=this.props,n=t.isFetching,r=t.guilds,a=r.gamesYouPlay,o=r.featured,i=t.searchRoute,u=t.currentHomepageCategoryId,s=t.mostRecentQuery;if((0,p.fetchActivityStatistics)(),(0,m.maybeFetchGuildDiscoveryCategories)(),null==T.default.getSearchIndex()&&(0,c.createAlgoliaIndex)(),f.default.wait((function(){(0,v.markView)(w.ViewHistoryKeys.SERVER_DISCOVERY_BADGE)})),n||0!==s.length||L.trackDiscoveryViewed(this.loadId,a.guilds,o.guilds,u),null!=i){var d=l.default.parse(i),_=d.query,h=d.offset,E=d.limit,g=d.preferredLocale,I=d.categoryId;(0,c.doAlgoliaSearch)(_,{categoryId:parseInt(I,10),preferredLocale:g,offset:parseInt(h,10),length:parseInt(E,10)})}else null!=u&&u!==y.DISCOVERY_ALL_CATEGORIES_ID&&f.default.wait((function(){return(0,c.selectCategory)(u)}));var C,b=(null===(e=(0,S.getHistory)().location.state)||void 0===e?void 0:e.scrollTop)||0;b>0&&(null===(C=this._scroller.current)||void 0===C||C.scrollTo({to:b}));(0,O.trackAppUIViewed)("guild_discovery")},i.componentDidUpdate=function(e){var t,n=this.props,r=n.guilds,a=r.gamesYouPlay,o=r.featured,i=n.isFetching,l=n.mostRecentQuery,u=n.currentHomepageCategoryId,s=n.currentCategoryId;(e.isFetching&&!i&&L.trackDiscoveryViewed(this.loadId,a.guilds,o.guilds,u),e.currentCategoryId!==s)&&(null===(t=this._scroller.current)||void 0===t||t.scrollTo({to:0}));e.mostRecentQuery.length>0&&l.length<1&&u!==s&&(0,c.selectCategory)(u)},i.componentWillUnmount=function(){L.trackDiscoveryExited(this.loadId,Array.from(this._guildIdsSeen))},i.renderGamesYouPlay=function(){var e=this.props,t=e.guilds,n=e.mightHaveGamesYouPlay,r=e.theme,a=e.userGuilds,o=Object.keys(a),i=t[w.GuildDiscoverySections.GAMES_YOU_PLAY];i.guilds=i.guilds.filter((function(e){return!o.includes(e.id)}));var l=this.state.loadingGuildId;return n?x(h.default,{title:j.default.Messages.GUILD_DISCOVERY_HEADER_GAMES_YOU_PLAY,guildsData:i,loadingGuildId:l,analyticsContext:K.RECOMMENDED,onViewGuild:this.handleViewGuild,onGuildCardSeen:this.handleGuildCardSeen,fetchGuilds:c.fetchGamesYouPlayGuilds,theme:r}):null},i.renderSearchBar=function(){var e,t,n=this.props,r=n.mostRecentQuery,a=n.guilds.search,o=n.defaultLanguage,i=n.isFetchingSearch,l=n.currentCategoryId,u=n.categories,s=n.currentCategoryName,d=l===y.DISCOVERY_ALL_CATEGORIES_ID?j.default.Messages.GUILD_DISCOVERY_SEARCH_PLACEHOLDER:j.default.Messages.GUILD_DISCOVERY_CATEGORY_SEARCH_PLACEHOLDER.format({categoryName:s}),f=null!==(e=null===(t=a[r])||void 0===t?void 0:t[l])&&void 0!==e?e:T.EMPTY_DISCOVERABLE_GUILDS_SECTION;return x(D.default,{loadId:this.loadId,searchResults:f,mostRecentQuery:r,isFetchingSearch:i,defaultLanguage:o,placeholder:d,currentCategoryId:l,categories:u})},i.renderFeaturedGuildsSection=function(){var e=this.props,t=e.guilds,n=e.theme,r=e.currentCategoryId,a=this.state.loadingGuildId;return r===y.DISCOVERY_ALL_CATEGORIES_ID?x(h.default,{title:j.default.Messages.GUILD_DISCOVERY_FEATURED_HEADER,guildsData:t[w.GuildDiscoverySections.FEATURED],loadingGuildId:a,analyticsContext:K.RECOMMENDED,onViewGuild:this.handleViewGuild,onGuildCardSeen:this.handleGuildCardSeen,fetchGuilds:function(){return(0,c.fetchFeaturedOrPopularGuilds)(0,24)},currentCategoryId:r,theme:n}):x(h.default,{title:j.default.Messages.GUILD_DISCOVERY_POPULAR_HEADER,guildsData:t[r],loadingGuildId:a,analyticsContext:K.POPULAR,onViewGuild:this.handleViewGuild,onGuildCardSeen:this.handleGuildCardSeen,fetchGuilds:function(){return(0,c.fetchPopularGuildsForCategory)(r)},currentCategoryId:r,theme:n})},i.renderSearchResults=function(){var e,t,n=this.props,r=n.mostRecentQuery,a=n.guilds.search,o=n.availableLanguages,i=n.defaultLanguage,l=n.isFetchingSearch,u=n.theme,s=n.currentCategoryId,d=n.currentCategoryName,f=this.state.loadingGuildId,c=s===y.DISCOVERY_ALL_CATEGORIES_ID?j.default.Messages.GUILD_DISCOVERY_SEARCH_PLACEHOLDER:j.default.Messages.GUILD_DISCOVERY_CATEGORY_SEARCH_PLACEHOLDER.format({categoryName:d}),p=null!==(e=null===(t=a[r])||void 0===t?void 0:t[s])&&void 0!==e?e:T.EMPTY_DISCOVERABLE_GUILDS_SECTION;return x(E.default,{loadId:this.loadId,availableLanguages:o,defaultLanguage:i,placeholder:c,isFetchingSearch:l,searchResults:p,mostRecentQuery:r,loadingGuildId:f,currentCategoryId:s,currentCategoryName:d,scroller:this._scroller.current,theme:u,onViewGuild:this.handleViewGuild,onGuildCardSeen:this.handleGuildCardSeen})},i.render=function(){var e,t,n=this.props,r=n.currentCategoryName,i=n.mostRecentQuery,l=n.currentCategoryId,u=i.length>0;return l===y.DISCORD_HUB_ID?$:x("div",{className:k.default.pageWrapper},void 0,Z,x("div",{className:(0,o.default)(k.default.dragRegion,k.default.pageHeaderDrag,(e={},e[k.default.searchPageDrag]=u,e))}),a.createElement(R.AdvancedScrollerAuto,{className:k.default.scroller,ref:this._scroller,onScroll:this.handleScroll},x("div",{className:(0,o.default)(k.default.viewWrapper,(t={},t[k.default.searchPage]=u,t))},void 0,u?this.renderSearchResults():a.createElement(a.Fragment,null,x("div",{className:k.default.searchHeader},void 0,x("img",{alt:"",className:k.default.headerImage,src:G.default}),x("div",{className:k.default.headerContentWrapper},void 0,x("div",{className:k.default.headerContent},void 0,x(A.default,{size:A.default.Sizes.SIZE_24,className:k.default.searchTitle},void 0,l===y.DISCOVERY_ALL_CATEGORIES_ID?j.default.Messages.GUILD_DISCOVERY_HOME_TITLE:j.default.Messages.GUILD_DISCOVERY_CATEGORY_TITLE.format({categoryName:r})),x(P.default,{size:P.default.Sizes.SIZE_16,className:k.default.searchSubtitle},void 0,l===y.DISCOVERY_ALL_CATEGORIES_ID&&j.default.Messages.GUILD_DISCOVERY_HOME_SUBTITLE),this.renderSearchBar()))),x("div",{className:k.default.featuredBody},void 0,this.renderFeaturedGuildsSection(),l===y.DISCOVERY_ALL_CATEGORIES_ID&&this.renderGamesYouPlay()),x("div",{className:k.default.footer},void 0,x("img",{alt:"",src:U.default,className:k.default.footerImage}),x(A.default,{size:A.default.Sizes.SIZE_16},void 0,j.default.Messages.GUILD_DISCOVERY_CATEGORY_FOOTER_TITLE),x(N.default,{look:N.default.Looks.LINK,color:N.default.Colors.LINK,size:N.default.Sizes.MIN,onClick:this.scrollToTop},void 0,j.default.Messages.GUILD_DISCOVERY_FOOTER_BODY))))))},r}(a.PureComponent);q.displayName="GuildDiscovery";var X=d.default.connectStores([b.default,M.default,I.default,T.default,_.default,C.default],(function(){var e,t=y.LANGUAGE_OPTIONS,n=b.default.locale,r=null!==(e=i.default.find(t,{code:n}))&&void 0!==e?e:t[0],a=M.default.applicationStatistics,o=Object.keys(a),l=I.default.hasConsented(w.Consents.PERSONALIZATION)&&o.length>0,u=T.default.getCurrentCategoryId(),s=T.default.getCurrentHomepageCategoryId();return{isFetching:T.default.isFetching(),isFetchingSearch:T.default.isFetchingSearch(),guilds:T.default.getDiscoverableGuilds(),mostRecentQuery:T.default.getMostRecentQuery(),currentCategoryId:u,currentHomepageCategoryId:s,currentCategoryName:_.default.getCategoryName(u),categories:_.default.getDiscoveryCategories(),userGuilds:C.default.getGuilds(),theme:b.default.theme,mightHaveGamesYouPlay:l,availableLanguages:t,defaultLanguage:r}}))(q);t.default=X},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markView=function(e){a.default.dispatch({type:o.ActionTypes.VIEW_HISTORY_MARK_VIEW,key:e})};var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=m(n(0)),o=v(n(2)),i=n(8444),l=v(n(8445)),u=v(n(10466)),s=v(n(47)),d=v(n(24)),f=m(n(701)),c=n(1),p=v(n(7897));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function E(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}f.AnalyticsContexts;var S=[[1696,20],[1432,16],[1168,12],[0,8]],O=function(e){var t=e.title,n=e.subtitle,r=e.guildsData,f=e.analyticsContext,v=e.theme,y=e.onViewGuild,m=e.fetchGuilds,g=e.onGuildCardSeen,O=e.currentCategoryId;a.useEffect((function(){o.default.wait((function(){return m()}))}),[O]);var I=a.useState(0),T=I[0],C=I[1],b=function(){for(var e,t=window.innerWidth,n=E(S);!(e=n()).done;){var r=e.value,a=r[0],o=r[1];if(t>=a)return void C(o)}};if(a.useEffect((function(){b()}),[]),a.useEffect((function(){return window.addEventListener("resize",b),function(){window.removeEventListener("resize",b)}})),null==r)return null;var M=r.guilds,N=r.loading,A=null==M||0===M.length;if(!N&&A)return null;var P,R=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,i.isAtGuildCapAndNonPremium)()){e.next=4;break}(0,l.default)({analyticsSource:{page:c.AnalyticsPages.GUILD_DISCOVERY},analyticsLocation:{page:c.AnalyticsPages.GUILD_DISCOVERY,section:c.AnalyticsSections.GUILD_CAP_UPSELL_MODAL}}),e.next=7;break;case 4:return n=M.findIndex((function(e){return e.id===t})),e.next=7,y(t,n,f);case 7:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){h(o,r,a,i,l,"next",e)}function l(e){h(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();if(N||null==M){for(var L=[],D=0;D<T;D++)L.push(_(u.default.Placeholder,{},D));P=L}else P=M.slice(0,T).map((function(e){return _(u.default,{className:p.default.guildCard,guild:e,onView:R,theme:v,onGuildCardSeen:g},e.id)}));return _("section",{className:p.default.guildListSection},void 0,_(s.default,{className:p.default.title,size:s.default.Sizes.SIZE_20},void 0,t),null!=n&&_(d.default,{className:p.default.subtitle,size:d.default.Sizes.SIZE_14,color:d.default.Colors.HEADER_SECONDARY},void 0,n),_("div",{className:p.default.guildList},void 0,P))};O.displayName="DiscoverFeaturedGuildsSection";var I=O;t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=T(n(0)),o=O(n(8)),i=O(n(137)),l=n(3),u=T(n(8700)),s=O(n(11448)),d=O(n(10467)),f=O(n(11449)),c=n(42),p=O(n(1275)),v=O(n(61)),y=O(n(8354)),m=O(n(47)),_=O(n(24)),h=T(n(701)),E=n(1213),g=O(n(6)),S=O(n(8121));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}h.AnalyticsContexts;var b=function(e){var t=e.categoryId,n=e.categoryName,r=e.onClick,a=t===E.DISCOVERY_ALL_CATEGORIES_ID,o=a?g.default.Messages.GUILD_DISCOVERY_SEARCH_EMPTY_HEADER:g.default.Messages.GUILD_DISCOVERY_SEARCH_EMPTY_CATEGORY_HEADER.format({categoryName:n}),i=a?g.default.Messages.GUILD_DISCOVERY_SEARCH_EMPTY_BODY:g.default.Messages.GUILD_DISCOVERY_SEARCH_EMPTY_CATEGORY_BODY.format({onClick:r});return C("div",{className:S.default.emptyContainer},void 0,C("div",{className:S.default.emptyImage}),C(m.default,{size:m.default.Sizes.SIZE_24,className:S.default.emptyHeader},void 0,o),C(_.default,{size:_.default.Sizes.SIZE_16,color:_.default.Colors.HEADER_SECONDARY},void 0,i))};b.displayName="EmptySearchResults";var M=function(){return C("div",{className:S.default.emptyContainer},void 0,C("div",{className:S.default.errorImage}),C(_.default,{size:_.default.Sizes.SIZE_16,color:_.default.Colors.HEADER_SECONDARY,className:S.default.emptyHeader},void 0,g.default.Messages.GUILD_DISCOVERY_SEARCH_ERROR))};M.displayName="ErrorState";var N=C(M,{}),A=function(e){var t=e.loadId,n=e.searchResults,r=e.mostRecentQuery,_=e.defaultLanguage,O=e.availableLanguages,I=e.isFetchingSearch,T=e.scroller,M=e.loadingGuildId,A=e.theme,P=e.currentCategoryId,R=e.currentCategoryName,L=e.onViewGuild,D=e.onGuildCardSeen,w=e.placeholder,j=o.default.uniqueId("GuildDiscovery"),k=n.guilds,U=n.loading,G=n.total,F=a.useState(!1),B=F[0],H=F[1],x=(0,l.useStateFromStores)([p.default],(function(){return p.default.hasSearchError()})),V=function(e,t,n){u.doAlgoliaSearch(r,{categoryId:n?E.DISCOVERY_ALL_CATEGORIES_ID:P,preferredLocale:_.code,offset:e,length:t}),H(!1)};a.useEffect((function(){var e=(0,c.getHistory)().location.search,t=(null!=e&&e.length>0&&e.startsWith("?")?i.default.parse(e):{}).offset;1===(null!=t?Math.floor(parseInt(t,10)/12)+1:1)&&H(!0)}),[r]);var W=P===E.DISCOVERY_ALL_CATEGORIES_ID?g.default.Messages.GUILD_DISCOVERY_SEARCH_RESULTS_HEADER.format({count:null!=G?G.toLocaleString():"0",query:r}):g.default.Messages.GUILD_DISCOVERY_SEARCH_RESULTS_CATEGORY_HEADER.format({count:null!=G?G.toLocaleString():"0",query:r,category:R});return C("div",{className:S.default.container},void 0,C("div",{className:S.default.searchHeader},void 0,C(v.default,{onClick:function(){u.clearSearch()},className:S.default.arrow},void 0,C(y.default,{direction:y.default.Directions.LEFT})),C(m.default,{size:m.default.Sizes.SIZE_24,className:S.default.header},void 0,W)),C(d.default,{loadId:t,searchResults:n,mostRecentQuery:r,isFetchingSearch:I,defaultLanguage:_,placeholder:w,availableLanguages:O,isSearchPage:!0,currentCategoryId:P}),x?N:G<=0?C(b,{categoryId:P,categoryName:R,onClick:function(){u.selectCategory(E.DISCOVERY_ALL_CATEGORIES_ID),V(0,12,!0)}}):C("div",{className:S.default.results},void 0,C(s.default,{pageSize:12,totalCount:G,resetCurrentPage:B,onPageChange:function(e){V(12*(e-1),12),null==T||T.scrollTo({to:0})}},void 0,(function(e){var t=e.controller;return C("section",{"aria-labelledby":j},void 0,C(f.default,{guilds:k,loading:U,loadingPlaceholderCount:12,onViewGuild:L,loadingGuildId:M,theme:A,analyticsContext:h.AnalyticsContexts.SEARCH,onGuildCardSeen:D}),t)}))))};A.displayName="DiscoverSearchResults";var P=A;t.default=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(137)),i=n(42),l=u(n(8972));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).handlePageChange=function(e){var t=n.props.onPageChange;n.setState({currentPage:e}),null!=t&&t(e)};var r=(0,i.getHistory)().location.search,a=(null!=r&&r.length>0&&r.startsWith("?")?o.default.parse(r):{}).offset,l=null!=a?Math.floor(parseInt(a,10)/t.pageSize)+1:1;return n.state={currentPage:l},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.componentDidUpdate=function(e){var t=this.props.resetCurrentPage;!e.resetCurrentPage&&t&&this.setState({currentPage:1})},a.render=function(){var e=this.props,t=e.totalCount,n=e.pageSize,r=e.maxVisiblePages,a=e.children,o=this.state.currentPage;return a({controller:d(l.default,{totalCount:t,pageSize:n,currentPage:o,maxVisiblePages:r,onPageChange:this.handlePageChange})})},r}(a.PureComponent);c.displayName="GuildDiscoveryPaginator";var p=c;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=d(n(0)),i=n(122),l=d(n(11450)),u=(r=n(7898))&&r.__esModule?r:{default:r};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,l,"next",e)}function l(e){c(o,r,a,i,l,"throw",e)}i(void 0)}))}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleViewGuild=function(){var e=p(regeneratorRuntime.mark((function e(n){var r,a,o,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,a=r.guilds,o=r.analyticsContext,i=r.onViewGuild,l=a.findIndex((function(e){return e.id===n})),e.next=4,i(n,l,o);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.renderGuild=function(e,n){var r=t.props.theme;return f(l.default,{guild:e,theme:r,onView:t.handleViewGuild},n)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var a=r.prototype;return a.renderPlaceholders=function(){for(var e=this.props.loadingPlaceholderCount,t=[],n=0;n<e;n++)t.push(f(l.DiscoverSearchResultPlaceholder,{},n));return t},a.render=function(){var e=this,t=this.props,n=t.guilds,r=t.loading;return f(i.Spring,{from:{opacity:r?0:1},to:{opacity:1},delay:100},void 0,(function(t){return f(i.animated.div,{className:u.default.guildList,style:t},void 0,r||null==n?e.renderPlaceholders():n.map(e.renderGuild))}))},r}(o.PureComponent);y.displayName="GuildList",y.defaultProps={loadingPlaceholderCount:12};var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DiscoverSearchResultPlaceholder=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=T();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=I(n(9)),i=n(389),l=I(n(8502)),u=n(8444),s=I(n(8445)),d=I(n(61)),f=I(n(375)),c=I(n(151)),p=I(n(47)),v=I(n(248)),y=I(n(24)),m=I(n(150)),_=n(193),h=n(1),E=I(n(6)),g=I(n(8120)),S=I(n(8993)),O=I(n(8994));function I(e){return e&&e.__esModule?e:{default:e}}function T(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return T=function(){return e},e}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var N=function(){return M("div",{className:g.default.placeholder})};t.DiscoverSearchResultPlaceholder=N,N.displayName="DiscoverSearchResultPlaceholder";var A=function(e){var t,n=e.guild,r=e.theme,I=e.onView,T=n.id,N=n.discoverySplash,A=n.icon,P=n.name,R=n.description,L=n.presenceCount,D=n.memberCount,w=a.useState(!1),j=w[0],k=w[1],U=a.useState(!1),G=U[0],F=U[1],B=m.default.getGuildDiscoverySplashURL({id:T,splash:N,size:240*(0,_.getDevicePixelRatio)()}),H=null!=B?B:function(e){switch(e){case h.ThemeTypes.DARK:return S.default;case h.ThemeTypes.LIGHT:return O.default}}(r),x=m.default.getGuildIconURL({id:T,icon:A,size:32})||void 0,V=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,u.isAtGuildCapAndNonPremium)()){e.next=3;break}return(0,s.default)({analyticsSource:{page:h.AnalyticsPages.GUILD_DISCOVERY},analyticsLocation:{page:h.AnalyticsPages.GUILD_DISCOVERY,section:h.AnalyticsSections.GUILD_CAP_UPSELL_MODAL}}),e.abrupt("return");case 3:if(F(!0),e.prev=4,e.t0=null!=I,!e.t0){e.next=9;break}return e.next=9,I(n.id);case 9:return e.prev=9,F(!1),e.finish(9);case 12:case"end":return e.stop()}}),e,null,[[4,,9,12]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){b(o,r,a,i,l,"next",e)}function l(e){b(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return a.createElement(a.Fragment,null,M("div",{className:g.default.card},void 0,G?M(c.default,{type:c.default.Type.PULSING_ELLIPSIS,className:g.default.spinner}):null,M(d.default,{className:(0,o.default)(g.default.container,(t={},t[g.default.hover]=j,t[g.default.submitting]=G,t)),onClick:V,onContextMenu:function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(l.default,C({},e,{id:n.id}))}))},onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)}},void 0,M("div",{className:g.default.splashContainer},void 0,M("img",{src:H,alt:"",className:g.default.splashImage,width:240})),M("div",{className:g.default.content},void 0,M("div",{className:g.default.header},void 0,M(v.default,{mask:v.default.Masks.SQUIRCLE,width:32,height:32},void 0,M("img",{src:x,alt:"",className:g.default.avatar})),M("div",{className:g.default.headerName},void 0,M(f.default,{guild:n,className:g.default.guildBadge}),M(p.default,{size:p.default.Sizes.SIZE_16},void 0,P))),M(y.default,{className:g.default.description},void 0,R),M("div",{className:g.default.memberInfo},void 0,null!=L&&M("div",{className:g.default.memberCount},void 0,M(y.default,{size:y.default.Sizes.SIZE_12,color:y.default.Colors.HEADER_SECONDARY},void 0,E.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:L}))),null!=D&&a.createElement(a.Fragment,null,M("div",{className:g.default.dotSeparator}),M("div",{className:g.default.memberCount},void 0,M(y.default,{size:y.default.Sizes.SIZE_12,color:y.default.Colors.HEADER_SECONDARY},void 0,E.default.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:D})))))))),M("hr",{className:g.default.separator}))};t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=v(n(47)),o=v(n(24)),i=v(n(272)),l=v(n(11452)),u=v(n(11453)),s=v(n(9100)),d=v(n(9101)),f=v(n(6)),c=v(n(8123)),p=v(n(11455));function v(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var _=m(s.default,{}),h=m(d.default,{}),E=function(){var e=(0,l.default)();return e.length>0?m(i.default,{className:c.default.scroller},void 0,m("div",{className:c.default.headerContainer},void 0,m("img",{alt:"",className:c.default.headerImage,src:p.default}),m("div",{className:c.default.headerContent},void 0,m(a.default,{className:c.default.headerText,size:o.default.Sizes.SIZE_24},void 0,f.default.Messages.HUB_DIRECTORY_SEARCH_TITLE),m(o.default,{className:c.default.headerDescription,size:o.default.Sizes.SIZE_16,color:o.default.Colors.CUSTOM},void 0,f.default.Messages.HUB_DIRECTORY_SEARCH_SUBTITLE))),m(u.default,{guilds:e}),m("div",{className:c.default.divider}),m(o.default,{className:c.default.footerDescription,size:o.default.Sizes.SIZE_14,color:o.default.Colors.HEADER_SECONDARY},void 0,f.default.Messages.HUB_DISCOVERY_FOOTER_DESCRIPTION)):m("div",{className:c.default.container},void 0,m("div",{className:c.default.content},void 0,m(i.default,{className:c.default.contentScroll},void 0,m("div",{className:c.default.contentContainer},void 0,_))),m("div",{className:c.default.sidebar},void 0,m(i.default,{className:c.default.sidebarScroll},void 0,h)))};t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,a.useStateFromStores)([o.default],(function(){var e=o.default.getGuilds();return Object.entries(e).filter((function(e){e[0];return e[1].hasFeature(i.GuildFeatures.HUB)})).map((function(e){e[0];return e[1]}))}))};var r,a=n(3),o=(r=n(15))&&r.__esModule?r:{default:r},i=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=f(n(199)),i=f(n(39)),l=f(n(10466)),u=f(n(47)),s=f(n(11454)),d=f(n(7897));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(){return(v=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}).apply(this,arguments)}var y=p(s.default,{}),m=function(e){var t=e.guilds,n=(0,a.useStateFromStores)([i.default],(function(){return i.default.theme})),r=t.map((function(e){return p(l.default,{className:d.default.guildCard,onView:function(){return o.default.transitionToGuildSync(e.id)},guild:v({},e,{presenceCount:void 0,memberCount:void 0,premiumSubscriptionCount:void 0,emojis:void 0}),theme:n},e.id)}));return p("section",{className:d.default.guildListSection},void 0,p(u.default,{className:d.default.title,size:u.default.Sizes.SIZE_20},void 0,"Your Hubs"),p("div",{className:d.default.guildList},void 0,r,y))};m.displayName="HubDiscoveryGuildList";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(29)),i=n(41),l=f(n(24)),u=f(n(8720)),s=f(n(6)),d=f(n(8122));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=function(){return p("div",{className:d.default.container},void 0,p("div",{className:d.default.iconContainer},void 0,p("div",{className:d.default.icon})),p(l.default,{strong:!0,color:l.default.Colors.HEADER_PRIMARY,size:l.default.Sizes.SIZE_20,className:d.default.header},void 0,s.default.Messages.HUB_EMAIL_CONNECTION_ADD_HEADER),p(l.default,{color:l.default.Colors.HEADER_SECONDARY,size:l.default.Sizes.SIZE_14,className:d.default.description},void 0,s.default.Messages.HUB_EMAIL_CONNECTION_ADD_DESCRIPTION),p("div",{className:d.default.gap}),p(o.default,{size:o.default.Sizes.LARGE,color:o.default.Colors.GREY,onClick:function(){return(0,i.openModal)((function(e){return a.createElement(u.default,e)}))}},void 0,p(l.default,{size:l.default.Sizes.SIZE_14,className:d.default.addButton,color:l.default.Colors.CUSTOM},void 0,s.default.Messages.HUB_EMAIL_CONNECTION_JOIN_ANOTHER)))};v.displayName="HubDiscoveryAddHubCard";var y=v;t.default=y},function(e,t,n){e.exports=n.p+"d5855245c19ceeab8d982420cc80746a.svg"},function(e,t,n){e.exports=n.p+"6429567e7cc7b7c04d1791a58d21795d.svg"},function(e,t,n){e.exports=n.p+"3e0acf6d69894a5d20deb7c513cd1412.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(8700),i=y(n(10305)),l=y(n(8483)),u=y(n(11459)),s=n(10468),d=y(n(11460)),f=n(11464),c=y(n(1275)),p=y(n(272)),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(){return(h=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}).apply(this,arguments)}var E=function(e){switch(e){case 1:return s.CategoryIcons.Activity;case 2:return s.CategoryIcons.Music;case 3:return s.CategoryIcons.Television;case 5:return s.CategoryIcons.Science;case 6:return s.CategoryIcons.Education;default:return s.CategoryIcons.Discover}},g=function(){var e=(0,a.useStateFromStoresObject)([c.default],(function(){return{currentCategoryId:c.default.getCurrentCategoryId(),isViewingSearchResults:c.default.getMostRecentQuery().length>0}})),t=e.currentCategoryId,n=e.isViewingSearchResults,r=(0,a.useStateFromStores)([l.default],(function(){return l.default.getDiscoveryCategories()})),s=null==r?void 0:r.map((function(e){return h({},e,{icon:E(e.categoryId)})})),y=function(e){(0,o.selectCategory)(e,!0),n&&(0,o.clearSearch)()};i.default.trackExposure({});var m=i.default.useExperiment({})[0];return _(p.default,{},void 0,_(f.DiscoverySidebarHeader,{text:v.default.Messages.DISCOVER}),_(d.default,{categories:s,handleCategorySelect:y,currentCategoryId:t,shouldDisplaySelectedCategory:!n}),m.showTab&&_(u.default,{handleCategorySelect:y,currentCategoryId:t,shouldDisplaySelectedCategory:!n}))};g.displayName="GuildDiscoveryCategorySidebar";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(1213),i=n(8277),l=p(n(702)),u=p(n(9207)),s=p(n(8553)),d=p(n(24)),f=p(n(6)),c=p(n(7899));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var m=y(u.default,{}),_=function(e){var t=e.handleCategorySelect,n=e.shouldDisplaySelectedCategory,r=e.currentCategoryId,u=(0,a.useStateFromStores)([l.default],(function(){return l.default.hasHotspot(i.HotspotLocations.HUB_NEW)}));return y(s.default,{avatar:m,name:f.default.Messages.HUB_SCHOOL_HUBS,focusProps:{offset:{right:4,top:1,bottom:1}},onClick:function(){t(o.DISCORD_HUB_ID),(0,i.hideHotspot)(i.HotspotLocations.HUB_NEW)},wrapContent:!0,selected:n&&o.DISCORD_HUB_ID===r,className:c.default.categoryItem,selectedClassName:c.default.selectedCategoryItem,innerClassName:c.default.itemInner},o.DISCORD_HUB_ID,u&&y("div",{className:c.default.new},void 0,y(d.default,{strong:!0,color:d.default.Colors.CUSTOM,size:d.default.Sizes.SIZE_12,className:c.default.newText},void 0,f.default.Messages.NEW)))};_.displayName="HubDiscoveryListItem";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(8762)),i=m(n(1313)),l=m(n(11461)),u=m(n(11462)),s=m(n(11463)),d=m(n(291)),f=m(n(9158)),c=m(n(8553)),p=n(48),v=n(10468),y=m(n(7899));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=h(o.default,{}),g=h(i.default,{}),S=h(l.default,{}),O=h(u.default,{}),I=h(s.default,{}),T=h(d.default,{height:22,width:22}),C=h(f.default,{}),b=function(e){switch(e){case v.CategoryIcons.Activity:return E;case v.CategoryIcons.Discover:return g;case v.CategoryIcons.Education:return S;case v.CategoryIcons.Music:return O;case v.CategoryIcons.Science:return I;case v.CategoryIcons.Stage:return T;case v.CategoryIcons.Television:return C;default:(0,p.assertNever)(e)}},M=function(e){var t=e.categories,n=e.currentCategoryId,r=e.handleCategorySelect,o=e.shouldDisplaySelectedCategory,i=void 0===o||o;return a.createElement(a.Fragment,null,t.map((function(e){return h(c.default,{avatar:b(e.icon),name:e.name,focusProps:{offset:{right:4,top:1,bottom:1}},onClick:function(){return r(e.categoryId)},wrapContent:!0,selected:i&&e.categoryId===n,className:y.default.categoryItem,selectedClassName:y.default.selectedCategoryItem,innerClassName:y.default.itemInner},e.categoryId)})))};M.Icons=v.CategoryIcons;var N=M;t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.className,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{className:f,width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:c,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M22.447 8.11002L12.447 3.11002C12.166 2.96902 11.834 2.96902 11.552 3.11002L1.552 8.11002C1.35 8.21002 1.197 8.38402 1.107 8.57302C1.046 8.69502 1 8.90202 1 9.00502V14.77C1 15.322 1.448 15.77 2 15.77C2.552 15.77 3 15.322 3 14.77V10.172L12.015 13.927L22.372 9.93302C22.737 9.78602 22.983 9.44002 22.999 9.04602C23.016 8.65202 22.799 8.28702 22.447 8.11002ZM12 16.005C11.869 16.005 11.738 15.979 11.615 15.928L5 13.172V16.185C5 16.564 5.214 16.91 5.553 17.08C5.7173 17.1621 5.88209 17.2461 6.04836 17.3308C7.61773 18.1306 9.31996 18.998 12 18.998C14.6812 18.998 16.3872 18.1284 17.956 17.3287C18.1208 17.2447 18.2842 17.1614 18.447 17.08C18.786 16.911 19 16.564 19 16.186V13.385L12.359 15.939C12.243 15.982 12.122 16.005 12 16.005ZM1 18.005C1 17.453 1.448 17.005 2 17.005C2.552 17.005 3 17.453 3 18.005V20.005C3 20.557 2.552 21.005 2 21.005C1.448 21.005 1 20.557 1 20.005V18.005Z"}))}d.displayName="Education"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.className,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{className:f,width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:c,fill:d,d:"M19.396 3.29898C19.016 3.01598 18.524 2.93098 18.07 3.06498L8.07 6.06498C7.435 6.25498 7 6.83998 7 7.50298V15.054C6.835 15.03 6.671 15.003 6.5 15.003C4.566 15.003 3 16.571 3 18.503C3 20.434 4.566 22.003 6.5 22.003C8.434 22.003 10 20.434 10 18.503V8.61798L17 6.51798V13.054C16.835 13.03 16.671 13.003 16.5 13.003C14.566 13.003 13 14.571 13 16.503C13 18.434 14.566 20.003 16.5 20.003C18.434 20.003 20 18.434 20 16.503V4.50298C20 4.02698 19.775 3.58198 19.396 3.29898Z"}))}d.displayName="Music"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.className,c=e.foreground,p=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","className","foreground"]);return o.createElement("svg",u({},(0,i.default)(p),{className:f,width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:c,fill:d,fillRule:"evenodd",clipRule:"evenodd",d:"M18.6683 11.9964C19.5992 13.2208 20.3732 14.4331 20.9422 15.5701C22.5858 18.8593 22.0118 20.4688 21.2418 21.2398C20.895 21.5846 20.2596 21.9978 19.1951 21.9978C17.3645 21.9978 14.7478 20.7553 12.0004 18.6683C9.25198 20.7553 6.63527 21.9978 4.80569 21.9978C3.74111 21.9978 3.10478 21.5846 2.75896 21.2398C1.98792 20.4677 1.41392 18.8593 3.05853 15.5701C3.62751 14.4331 4.40257 13.2218 5.33245 11.9964C2.51569 8.28291 1.00176 4.51719 2.75896 2.75898C3.10578 2.41316 3.74111 2 4.80569 2C6.63628 2 9.25298 3.24251 12.0004 5.32944C14.7488 3.24251 17.3655 2 19.1951 2C20.2596 2 20.895 2.41216 21.2418 2.75898C22.999 4.51618 21.4851 8.28191 18.6683 11.9964ZM19.8203 4.18042C19.6806 4.03969 19.4032 4.01053 19.1951 4.01053C18.0481 4.01053 15.9933 4.9203 13.6209 6.64835C15.0262 7.86472 16.2346 9.08512 17.3655 10.395C19.752 7.13188 20.3541 4.71422 19.8203 4.18042ZM14.1325 14.1316C14.8654 13.3987 15.5108 12.689 16.0928 12.0024C15.4876 11.2856 14.8342 10.5689 14.1325 9.86621C13.4128 9.14744 12.701 8.51312 12.0004 7.92202C11.2997 8.51312 10.588 9.14744 9.86821 9.86621C9.16653 10.5689 8.51311 11.2856 7.90794 12.0024C8.48999 12.689 9.13637 13.3987 9.86821 14.1316C10.588 14.8513 11.2997 15.4856 12.0004 16.0747C12.701 15.4856 13.4128 14.8513 14.1325 14.1316ZM4.80569 4.01053C4.5986 4.01053 4.32115 4.03969 4.18142 4.18042C3.64661 4.71422 4.24977 7.13088 6.63628 10.394C7.83556 9.00469 9.05696 7.79435 10.3799 6.64735C8.00645 4.9203 5.95269 4.01053 4.80569 4.01053ZM4.18041 19.8183C4.32014 19.9581 4.5976 19.9872 4.80569 19.9872C5.95269 19.9872 8.00746 19.0785 10.3799 17.3514C8.98357 16.1421 7.7873 14.9348 6.6413 13.6078C5.92053 14.593 5.31133 15.56 4.85695 16.4688C3.79539 18.5909 3.9502 19.5881 4.18041 19.8183ZM19.1941 19.9872C19.4021 19.9872 19.6796 19.9581 19.8193 19.8183C20.0495 19.5881 20.2044 18.5919 19.1428 16.4688C18.6884 15.559 18.0792 14.592 17.3584 13.6078C16.2114 14.9358 15.0152 16.1431 13.6199 17.3514C15.9933 19.0785 18.0471 19.9872 19.1941 19.9872ZM14.0109 11.9984C14.0109 13.1088 13.1108 14.0089 12.0004 14.0089C10.89 14.0089 9.98984 13.1088 9.98984 11.9984C9.98984 10.888 10.89 9.98784 12.0004 9.98784C13.1108 9.98784 14.0109 10.888 14.0109 11.9984Z"}))}d.displayName="Science"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverySidebarHeader=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(47)),o=i(n(8124));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.text;return u(a.default,{tag:a.default.Tags.H2,size:a.default.Sizes.SIZE_24,className:o.default.discoverHeader},void 0,t)}s.displayName="DiscoverySidebarHeader"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=he;var r,a=se(n(0)),o=le(n(9)),i=n(3),l=n(57),u=n(389),s=le(n(473)),d=le(n(11466)),f=le(n(8257)),c=le(n(1431)),p=n(307),v=le(n(11470)),y=le(n(10373)),m=le(n(9700)),_=le(n(11471)),h=le(n(9702)),E=le(n(1413)),g=le(n(8732)),S=n(8277),O=n(395),I=le(n(702)),T=le(n(11472)),C=le(n(11473)),b=le(n(11689)),M=le(n(9705)),N=le(n(10)),A=le(n(694)),P=le(n(51)),R=le(n(690)),L=le(n(94)),D=le(n(479)),w=le(n(283)),j=le(n(160)),k=le(n(39)),U=le(n(12)),G=le(n(1147)),F=le(n(61)),B=le(n(55)),H=le(n(10225)),x=le(n(278)),V=le(n(5707)),W=se(n(149)),Y=le(n(8367)),z=le(n(1240)),K=le(n(1281)),$=le(n(8602)),Z=le(n(407)),q=le(n(1261)),X=le(n(8710)),J=le(n(8777)),Q=le(n(9070)),ee=se(n(279)),te=le(n(24)),ne=n(1163),re=le(n(43)),ae=n(1),oe=le(n(6)),ie=le(n(8189));function le(e){return e&&e.__esModule?e:{default:e}}function ue(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ue=function(){return e},e}function se(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ue();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function de(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function fe(){return(fe=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}).apply(this,arguments)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return(pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ve=re.default.getEnableHardwareAcceleration()?ee.AnimatedAvatar:ee.default;var ye=de(m.default,{onClose:u.closeContextMenu,renderInputDevices:!0,renderInputModes:!0,renderInputVolume:!0}),me=de(m.default,{onClose:u.closeContextMenu,renderOutputDevices:!0,renderOutputVolume:!0}),_e=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).copiedTimeout=new l.Timeout,t.copiedDecayTimeout=new l.Timeout,t.speakingWhileMutedTooltipTimeout=new l.Timeout,t.state={hovered:!1,copiedStreak:0,shouldShowNametagTooltip:!1,shouldShowCopiedFeedback:!1,shouldShowSpeakingWhileMutedTooltip:!1,hoveringOnMute:!1},t.handleToggleSelfMute=function(){var e=t.props,n=e.serverMute,r=e.suppress;(0,h.default)(n,r)},t.handleToggleSelfDeaf=function(){var e=t.props.serverDeaf;(0,_.default)(e)},t.handleOpenSettings=function(){t.maybeHideHotspot(),s.default.open(ae.UserSettingsSections.ACCOUNT)},t.handleOpenSettingsContextMenu=function(e){(0,u.openContextMenu)(e,(function(e){return a.createElement(C.default,fe({},e,{user:t.props.currentUser,premiumSubscription:t.props.premiumSubscription,webBuildOverride:t.props.webBuildOverride}))}))},t.handleInputAudioContextMenu=function(e){(0,u.openContextMenu)(e,(function(){return ye}))},t.handleOutputAudioContextMenu=function(e){(0,u.openContextMenu)(e,(function(){return me}))},t.handleMouseEnter=function(){t.setState({hovered:!0})},t.handleMouseLeave=function(){t.setState({hovered:!1})},t.handleMouseEnterMute=function(){t.setState({hoveringOnMute:!0,shouldShowSpeakingWhileMutedTooltip:!1}),t.speakingWhileMutedTooltipTimeout.stop()},t.handleMouseLeaveMute=function(){t.setState({hoveringOnMute:!1})},t.handleCopyTag=function(){var e=t.props.currentUser,n=t.state,r=n.shouldShowNametagTooltip,a=n.copiedStreak;(0,ne.copy)(e.tag);var o={shouldShowCopiedFeedback:!0,shouldShowNametagTooltip:!0};r||(o.copiedStreak=a+1),t.setState(o,(function(){t.copiedTimeout.start(1e3,(function(){return t.setState({shouldShowNametagTooltip:!1})})),t.copiedDecayTimeout.start(2e3,(function(){return t.setState({copiedStreak:0})}))}))},t.handleOccludedChanged=function(){t.props.occluded&&t.setState({shouldShowNametagTooltip:!1,shouldShowSpeakingWhileMutedTooltip:!1})},t.handleSpeakingWhileMutedChanged=function(){var e=t.props,n=e.selfMute,r=e.serverMute,a=e.suppress,o=e.speakingWhileMuted,i=e.occluded,l=t.state.hoveringOnMute;o?l||!n||r||a||i||t.setState({shouldShowSpeakingWhileMutedTooltip:!0},(function(){t.speakingWhileMutedTooltipTimeout.start(2e3,(function(){return t.setState({shouldShowSpeakingWhileMutedTooltip:!1})}))})):(t.setState({shouldShowSpeakingWhileMutedTooltip:!1}),t.speakingWhileMutedTooltipTimeout.stop())},t.maybeHideHotspot=function(){t.props.hasProfileCustomizationPopout&&(0,S.hideHotspot)(O.HotspotLocations.PROFILE_CUSTOMIZATION_MARKETING)},t.renderStatusPickerPopout=function(e){var n=e.closePopout;return de(d.default,{onClose:function(){t.handleMouseLeave(),n&&n()}})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,pe(t,n);var i,c,p,m=r.prototype;return m.componentDidUpdate=function(e){var t=e.speakingWhileMuted,n=e.occluded,r=this.props,a=r.speakingWhileMuted;r.occluded!==n&&this.handleOccludedChanged(),a!==t&&this.handleSpeakingWhileMutedChanged()},m.componentWillUnmount=function(){this.copiedTimeout.stop(),this.copiedDecayTimeout.stop(),this.speakingWhileMutedTooltipTimeout.stop()},m.renderCopiedSuccess=function(){var e=this.state.copiedStreak,t=[oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_1,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_2,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_3,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_4,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_5,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_6,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_7,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_8,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_9,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_10,oe.default.Messages.ACCOUNT_USERNAME_COPY_SUCCESS_11],n=Math.min(Math.max(0,e-1),t.length-1);return de(V.default,{isShaking:this.isCopiedStreakGodlike},void 0,t[n])},m.renderNameTag=function(){var e=this,t=this.props,n=t.customStatusActivity,r=t.hidePrivateData,i=t.currentUser,l=this.state,u=l.hovered,s=l.shouldShowNametagTooltip,d=l.shouldShowCopiedFeedback,f=r?null:"#"+i.discriminator,c=null!=n?de(H.default,{hoverText:f,forceHover:u},void 0,de(g.default,{activity:n,emojiClassName:ie.default.emoji,className:ie.default.customStatus})):f,p=null,v=W.TooltipColors.PRIMARY;return ne.SUPPORTS_COPY&&(p=oe.default.Messages.ACCOUNT_CLICK_TO_COPY,d&&(p=this.renderCopiedSuccess(),v=this.isCopiedStreakGodlike?W.TooltipColors.RED:W.TooltipColors.GREEN)),de(W.default,{text:p,forceOpen:s,"aria-label":!!ne.SUPPORTS_COPY&&oe.default.Messages.ACCOUNT_CLICK_TO_COPY,color:v,delay:500,onAnimationRest:function(t,n){d&&!s&&n===ae.SpringTransitionPhases.LEAVE&&e.setState({shouldShowCopiedFeedback:!1})}},void 0,(function(t){var n,r=t.onClick,l=t.onMouseEnter,u=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["onClick","onMouseEnter"]);return a.createElement(F.default,fe({},u,{onMouseEnter:function(){d?(e.copiedTimeout.stop(),e.setState({shouldShowNametagTooltip:!1},l)):l&&l()},onClick:function(){r&&r(),e.handleCopyTag()},className:(0,o.default)(ie.default.nameTag,(n={},n[ie.default.canCopy]=ne.SUPPORTS_COPY,n))}),de(te.default,{className:ie.default.usernameContainer},void 0,de(Q.default,{},void 0,i.username)),null!=c?de(J.default,{className:ie.default.discriminator},void 0,c):null)}))},m.render=function(){var e,t,n=this,r=this.props,i=r.currentUser,l=r.selfDeaf,u=r.selfMute,s=r.serverMute,d=r.serverDeaf,c=r.suppress,p=r.speaking,m=r.streaming,_=r.status,h=r.webBuildOverride,E=r.hasProfileCustomizationPopout,g=this.state.shouldShowSpeakingWhileMutedTooltip;if(null==i)return null;var S=u||c||s,O=l||d,I=de(ve,{size:ee.Sizes.SIZE_32,src:i.getAvatarURL(void 0,!1),"aria-label":i.username,status:m?ae.StatusTypes.STREAMING:_,isSpeaking:p,className:ie.default.avatar});return de("div",{className:ie.default.container,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},void 0,de(f.default,{object:ae.AnalyticsObjects.AVATAR},void 0,de(x.default,{renderPopout:this.renderStatusPickerPopout,position:x.default.Positions.TOP,align:x.default.Align.LEFT,animation:x.default.Animation.SCALE,spacing:14},void 0,(function(e){return a.createElement(F.default,fe({},e,{"aria-label":oe.default.Messages.SET_STATUS,className:ie.default.avatarWrapper}),I)}))),this.renderNameTag(),de(B.default,{grow:0},void 0,de(X.default,{tooltipText:g?oe.default.Messages.ACCOUNT_SPEAKING_WHILE_MUTED:(0,y.default)(u,s,c),tooltipColor:g?W.TooltipColors.GREEN:void 0,tooltipForceOpen:g||void 0,onMouseEnter:this.handleMouseEnterMute,onMouseLeave:this.handleMouseLeaveMute,icon:S?q.default:Z.default,iconForeground:S?ie.default.strikethrough:null,onClick:this.handleToggleSelfMute,innerClassName:(0,o.default)((e={},e[ie.default.redIcon]=s||c,e)),onContextMenu:this.handleInputAudioContextMenu,role:"switch","aria-label":oe.default.Messages.MUTE,"aria-checked":S}),de(X.default,{tooltipText:(0,v.default)(l,d),icon:l?K.default:z.default,onClick:this.handleToggleSelfDeaf,onContextMenu:this.handleOutputAudioContextMenu,innerClassName:(0,o.default)((t={},t[ie.default.redIcon]=d,t)),iconForeground:O?ie.default.strikethrough:null,role:"switch","aria-label":oe.default.Messages.DEAFEN,"aria-checked":O}),de(x.default,{position:x.default.Positions.TOP,align:x.default.Align.CENTER,shouldShow:E,renderPopout:function(e){return a.createElement(T.default,fe({},e,{closePopout:n.maybeHideHotspot}))}},void 0,(function(){return de(X.default,{tooltipText:null!=h?oe.default.Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format({webBuildOverride:h.id}):oe.default.Messages.USER_SETTINGS,onClick:n.handleOpenSettings,onContextMenu:n.handleOpenSettingsContextMenu,innerClassName:null!=h?ie.default.buildOverrideButton:null,icon:Y.default},void 0,null!=h?de($.default,{width:9,height:9,className:ie.default.hasBuildOverride,"aria-hidden":!0}):null)}))))},i=r,(c=[{key:"isCopiedStreakGodlike",get:function(){return this.state.copiedStreak>=10}}])&&ce(i.prototype,c),p&&ce(i,p),r}(a.PureComponent);function he(){var e=(0,i.useStateFromStores)([U.default],(function(){return U.default.getCurrentUser()})),t=null==e?void 0:e.id,n=(0,i.useStateFromStores)([k.default],(function(){return k.default.customStatus})),r=a.useMemo((function(){return null!=n?(0,E.default)(n):null}),[n]),o=(0,i.useStateFromStoresObject)([D.default],(function(){return{streaming:null!=D.default.findActivity((function(e){return e.type===ae.ActivityTypes.STREAMING})),status:D.default.getStatus()}})),l=o.streaming,u=o.status,s=(0,i.useStateFromStores)([w.default],(function(){return null!=t&&w.default.isSpeaking(t)}),[t]),d=(0,i.useStateFromStores)([j.default],(function(){return j.default.hidePersonalInformation})),f=(0,i.useStateFromStores)([L.default,N.default],(function(){var e=L.default.getChannelId();return null!=e?N.default.getChannel(e):null})),v=(0,M.default)(f),y=v.mute,m=v.selfMute,_=v.suppress,h=(0,b.default)(f),g=h.selfDeaf,S=h.deaf,T=(0,i.useStateFromStores)([c.default],(function(){var e;return(0,p.probablyHasBuildOverride)()?null===(e=c.default.getCurrentBuildOverride().overrides)||void 0===e?void 0:e.discord_web:null})),C=(0,i.useStateFromStores)([G.default],(function(){return G.default.getPremiumTypeSubscription()})),F=(0,i.useStateFromStores)([P.default],(function(){return P.default.getEverSpeakingWhileMuted()})),B=(0,i.useStateFromStores)([A.default,R.default],(function(){return A.default.hasLayers()||R.default.hasModalOpen()})),H=(0,i.useStateFromStores)([I.default],(function(){return I.default.hasHotspot(O.HotspotLocations.PROFILE_CUSTOMIZATION_MARKETING)&&null!=e&&Date.now()-e.createdAt.getTime()>2592e5})),x=(null==e?void 0:e.bio)||null!=(null==e?void 0:e.banner);return de(_e,{hidePrivateData:d,currentUser:e,selfMute:m,serverMute:y,suppress:_,serverDeaf:S,selfDeaf:g,status:u,speaking:s,streaming:l,customStatusActivity:r,webBuildOverride:T,premiumSubscription:C,speakingWhileMuted:F,occluded:B,hasProfileCustomizationPopout:H&&!x})}_e.displayName="Account",he.displayName="AccountConnected"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=b(n(0)),o=T(n(9)),i=n(3),l=T(n(274)),u=T(n(8273)),s=T(n(8732)),d=b(n(8253)),f=T(n(1255)),c=T(n(39)),p=T(n(29)),v=T(n(149)),y=T(n(686)),m=n(41),_=n(1312),h=T(n(13)),E=n(716),g=T(n(11467)),S=n(1),O=T(n(6)),I=T(n(8126));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e){var t=e.status,n=e.description,r=e.focused;return N("div",{className:I.default.statusItem},void 0,N(_.Status,{status:t,className:I.default.icon,size:10,color:r?"currentColor":void 0}),N("div",{className:I.default.status},void 0,(0,E.humanizeStatus)(t)),null!=n&&N("div",{className:I.default.description},void 0,n))}function P(e){var t=e.customStatus,n=function(e){e.stopPropagation(),l.default.updateRemoteSettings({customStatus:null})};return null!=t?N("div",{"aria-label":O.default.Messages.CUSTOM_STATUS_EDIT_CUSTOM_STATUS_PLACEHOLDER},void 0,N(s.default,{className:null!=t.emoji?I.default.customStatusWithEmoji:I.default.customStatusItem,activity:t,emojiClassName:I.default.customEmoji,textClassName:I.default.customText,placeholderText:O.default.Messages.CUSTOM_STATUS_EDIT_CUSTOM_STATUS_PLACEHOLDER},void 0,N(v.default,{text:O.default.Messages.CUSTOM_STATUS_CLEAR_CUSTOM_STATUS},void 0,(function(e){return a.createElement(p.default,M({},e,{className:I.default.clearStatusButton,onClick:n,look:p.default.Looks.BLANK,size:p.default.Sizes.NONE,tabIndex:-1,"aria-hidden":!0}),N(y.default,{className:I.default.clearStatusIcon}))})))):N("div",{className:(0,o.default)(I.default.statusItem,I.default.customStatusContentIcon),"aria-label":O.default.Messages.CUSTOM_STATUS_SET_CUSTOM_STATUS},void 0,N("div",{className:I.default.customEmojiPlaceholder}),N("div",{className:I.default.status},void 0,O.default.Messages.CUSTOM_STATUS_SET_CUSTOM_STATUS))}A.displayName="StatusMenuItem";var R=N(d.MenuSeparator,{}),L=N(d.MenuSeparator,{}),D=function(e){var t=e.customStatus,n=e.onClose,r=e.analyticsContext,o=e.onSelect;a.useEffect((function(){h.default.track(S.AnalyticEvents.OPEN_POPOUT,{type:"User Status Menu",has_custom_status:null!=t,location:r.location})}),[]);var i=function(e){l.default.updateRemoteSettings({status:e})},u=N(P,{customStatus:t});return N(d.default,{navId:"status-picker",style:d.MenuStyle.FIXED,"aria-label":O.default.Messages.SET_STATUS,onClose:n,onSelect:o},void 0,N(d.MenuItem,{id:"online",keepItemStyles:!0,render:function(e){var t=e.isFocused;return N(A,{status:_.StatusTypes.ONLINE,focused:t})},action:function(){return i(_.StatusTypes.ONLINE)}}),R,N(d.MenuItem,{id:"idle",keepItemStyles:!0,render:function(e){var t=e.isFocused;return N(A,{status:_.StatusTypes.IDLE,focused:t})},action:function(){return i(_.StatusTypes.IDLE)}}),N(d.MenuItem,{id:"dnd",keepItemStyles:!0,render:function(e){var t=e.isFocused;return N(A,{status:_.StatusTypes.DND,description:O.default.Messages.STATUS_DND_HELP,focused:t})},action:function(){return i(_.StatusTypes.DND)}}),N(d.MenuItem,{id:"invisible",keepItemStyles:!0,render:function(e){var t=e.isFocused;return N(A,{status:_.StatusTypes.INVISIBLE,description:O.default.Messages.STATUS_INVISIBLE_HELPER,focused:t})},action:function(){return i(_.StatusTypes.INVISIBLE)}}),L,N(d.MenuItem,{id:"custom-status",keepItemStyles:!0,render:function(){return u},action:function(){(0,m.openModal)((function(e){return a.createElement(g.default,M({},e,{sourceAnalyticsContext:r}))}))}}))};D.displayName="StatusPickerPopout";var w=(0,u.default)((function(e){var t=(0,i.useStateFromStores)([f.default],(function(){return f.default.getCustomStatusActivity()})),n=(0,i.useStateFromStores)([c.default],(function(){return c.default.status}));return a.createElement(D,M({},e,{customStatus:t,status:n}))}));t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=P(n(3)),i=P(n(274)),l=P(n(5938)),u=P(n(8257)),s=n(10469),d=P(n(11468)),f=P(n(8408)),c=P(n(1255)),p=P(n(39)),v=P(n(12)),y=P(n(29)),m=P(n(8564)),_=P(n(278)),h=P(n(153)),E=P(n(1165)),g=P(n(681)),S=P(n(686)),O=n(35),I=n(374),T=n(1312),C=P(n(13)),b=n(716),M=n(1),N=P(n(6)),A=P(n(8125));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(){return(L=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}).apply(this,arguments)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(){var e=p.default.customStatus;return null!=e&&null==e.expiresAt?null:s.ClearAfterValues.TODAY}function U(e){return j("div",{className:A.default.statusOptionItem},void 0,j(T.Status,{status:e.value,size:10,className:A.default.statusIcon}),e.label)}U.displayName="renderStatusOptionItem";var G=[{key:1,value:T.StatusTypes.ONLINE,label:(0,b.humanizeStatus)(T.StatusTypes.ONLINE)},{key:2,value:T.StatusTypes.IDLE,label:(0,b.humanizeStatus)(T.StatusTypes.IDLE)},{key:3,value:T.StatusTypes.DND,label:(0,b.humanizeStatus)(T.StatusTypes.DND)},{key:4,value:T.StatusTypes.INVISIBLE,label:(0,b.humanizeStatus)(T.StatusTypes.INVISIBLE)}];function F(){var e=p.default.status;return G.some((function(t){return t.value===e}))?e:T.StatusTypes.ONLINE}var B=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={emojiInfo:null!=t.props.customStatus?t.props.customStatus.emoji:null,text:null!=t.props.customStatus&&null!=t.props.customStatus.state?t.props.customStatus.state:"",clearAfter:k(),status:F()},t.handleClearStatus=function(){t.setState({emojiInfo:null,text:""})},t.handleSubmit=function(e){e.preventDefault(),t.handleSaveStatus()},t.handleStatusChange=function(e){t.setState({text:e})},t.handleEmojiChange=function(e){if(null!=e){var n=null!=e.id?{id:e.id,name:e.name,animated:e.animated}:{id:null,name:e.optionallyDiverseSequence,animated:!1};t.setState({emojiInfo:n})}},t.handleChangeClearAfter=function(e){t.setState({clearAfter:e})},t.handleChangeStatus=function(e){t.setState({status:e})},t.handleSaveStatus=function(){var e=t.props,n=e.sourceAnalyticsContext,r=e.onClose,a=t.state,o=a.emojiInfo,l=a.text,u=a.clearAfter,s=a.status;i.default.updateRemoteSettings({status:s}),(0,d.default)(l,o,u,n),r()},t.handleKeyPress=function(e){e.which===M.KeyboardKeys.ENTER&&t.handleSaveStatus()},t.renderEmojiPicker=function(e){var n=e.closePopout,r=t.props.onClose;return j(f.default,{closePopout:n,onSelectEmoji:function(e,r){t.handleEmojiChange(e),r&&n()},pickerIntention:M.EmojiIntention.STATUS,onNavigateAway:r})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,w(t,n);var o,c,p,v=r.prototype;return v.componentDidMount=function(){var e=this.props.sourceAnalyticsContext;C.default.track(M.AnalyticEvents.OPEN_MODAL,{source:e.location,type:M.AnalyticsSections.CUSTOM_STATUS_MODAL,load_id:e.loadId})},v.getEmojiButtonRenderer=function(){var e=this.state.emojiInfo;return e?function(){return j(l.default,{className:A.default.emoji,emojiId:e.id,emojiName:e.name,animated:Boolean(e.animated)})}:null},v.renderCustomStatusInput=function(){var e=this,t=this.props.user,n=this.state,r=n.text,o=n.emojiInfo;return j(g.default,{className:A.default.formGroup,title:N.default.Messages.CUSTOM_STATUS_MODAL_BODY.format({username:t.username})},void 0,j("div",{className:A.default.inputContainer},void 0,j("div",{className:A.default.emojiButtonContainer},void 0,j(_.default,{renderPopout:this.renderEmojiPicker,position:_.default.Positions.LEFT,animation:_.default.Animation.NONE,align:_.default.Align.BOTTOM},void 0,(function(t,n){return a.createElement(m.default,L({},t,{active:n,className:A.default.emojiButton,tabIndex:0,renderButtonContents:e.getEmojiButtonRenderer()}))}))),j(h.default,{maxLength:s.STATUS_MAX_LENGTH,value:r,inputClassName:A.default.input,placeholder:N.default.Messages.CUSTOM_STATUS_MODAL_PLACEHOLDER,onChange:this.handleStatusChange,onKeyPress:this.handleKeyPress,autoFocus:!0}),r.length>0||null!=o?j(y.default,{focusProps:{offset:{top:8,bottom:8,left:-2,right:-2}},className:A.default.clearButton,onClick:this.handleClearStatus,look:y.default.Looks.BLANK,size:y.default.Sizes.NONE},void 0,j(S.default,{className:A.default.clearIcon})):null))},v.renderClearAfter=function(){var e=this.state.clearAfter;return j(g.default,{className:A.default.formGroup,title:N.default.Messages.CUSTOM_STATUS_CLEAR_AFTER},void 0,j(I.SingleSelect,{placeholder:N.default.Messages.CUSTOM_STATUS_CLEAR_AFTER,maxVisibleItems:5,value:e,options:this.clearAfterOptions,onChange:this.handleChangeClearAfter}))},v.renderStatusInput=function(){var e=this.state.status;return j(g.default,{className:A.default.formGroup,title:N.default.Messages.CUSTOM_STATUS_STATUS_TITLE},void 0,j(I.SingleSelect,{maxVisibleItems:4,value:e,options:G,onChange:this.handleChangeStatus,renderOptionLabel:U}))},v.render=function(){var e=this.props,t=e.transitionState,n=e.onClose;return a.createElement(u.default,this.analyticsLocation,j(O.ModalRoot,{transitionState:t,className:A.default.modalRoot,"aria-label":N.default.Messages.CUSTOM_STATUS_SET_CUSTOM_STATUS},void 0,j(O.ModalHeader,{separator:!1,className:A.default.headerContainer},void 0,j("div",{className:A.default.art}),j("div",{className:A.default.header},void 0,j("h4",{className:A.default.headerText},void 0,N.default.Messages.CUSTOM_STATUS_SET_CUSTOM_STATUS)),j(O.ModalCloseButton,{onClick:n,className:A.default.modalCloseButton})),j(O.ModalContent,{},void 0,this.renderCustomStatusInput(),this.renderClearAfter(),j(E.default,{className:A.default.formDivider}),this.renderStatusInput()),j(O.ModalFooter,{},void 0,j(y.default,{onClick:this.handleSubmit},void 0,N.default.Messages.SAVE),j(y.default,{onClick:n,look:y.default.Looks.LINK,color:A.default.cancelButton},void 0,N.default.Messages.CANCEL))))},o=r,(c=[{key:"clearAfterOptions",get:function(){return[{key:1,value:s.ClearAfterValues.TODAY,label:N.default.Messages.CUSTOM_STATUS_TODAY},{key:2,value:s.ClearAfterValues.HOURS_4,label:N.default.Messages.CUSTOM_STATUS_HOURS.format({hours:4})},{key:3,value:s.ClearAfterValues.HOURS_1,label:N.default.Messages.CUSTOM_STATUS_HOURS.format({hours:1})},{key:4,value:s.ClearAfterValues.MINUTES_30,label:N.default.Messages.CUSTOM_STATUS_MINUTES.format({minutes:30})},{key:5,value:null,label:N.default.Messages.CUSTOM_STATUS_DONT_CLEAR}]}},{key:"analyticsLocation",get:function(){return{page:M.AnalyticsPages.CUSTOM_STATUS_MODAL}}}])&&D(o.prototype,c),p&&D(o,p),r}(a.PureComponent);B.displayName="CustomStatusModal";var H=o.default.connectStores([c.default,v.default],(function(){return{customStatus:c.default.getCustomStatusActivity(),user:v.default.getCurrentUser()}}),{forwardRef:!0})(B);t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,u){var d=e.trim();if(d.length>0||null!=t){var f={text:d.length>0?d:null,expiresAt:null!=n?(0,r.default)().add((0,i.default)(n),"ms").toISOString():null,emojiId:null!=t?t.id:null,emojiName:null!=t?t.name:null};a.default.updateRemoteSettings({customStatus:f}),o.default.track(l.AnalyticEvents.CUSTOM_STATUS_UPDATED,{location:null!=u?u.location:null,emoji_type:s(t),text_len:d.length,clear_after:null!=n?""+n:null})}else a.default.updateRemoteSettings({customStatus:null})};var r=u(n(5)),a=u(n(274)),o=u(n(13)),i=u(n(11469)),l=n(1);function u(e){return e&&e.__esModule?e:{default:e}}function s(e){return null==e?null:null!=e.id?"custom":"unicode"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e===o.ClearAfterValues.TODAY){var t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1).getTime()-t.getTime()}return(0,a.default)("number"==typeof e,"Invalid custom status clear timeout"),e};var r,a=(r=n(23))&&r.__esModule?r:{default:r},o=n(10469)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t)return a.default.Messages.SERVER_DEAFENED_DIALOG_TITLE;return e?a.default.Messages.UNDEAFEN:a.default.Messages.DEAFEN};var r,a=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e)return void(0,i.openModal)((function(e){return r.createElement(o.default,d({},e,{title:l.default.Messages.SERVER_DEAFENED_DIALOG_TITLE,body:l.default.Messages.SERVER_DEAFENED_DIALOG_BODY}))}));a.default.toggleSelfDeaf()};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=u(n(288)),o=u(n(218)),i=n(41),l=u(n(6));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(){return(d=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}).apply(this,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(29)),i=f(n(24)),l=f(n(13)),u=n(1),s=f(n(6)),d=f(n(8127));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.closePopout;return a.useEffect((function(){l.default.track(u.AnalyticEvents.TOOLTIP_VIEWED,{type:"User Settings Cog - Custom Profiles"})}),[]),p("div",{className:d.default.container},void 0,p("div",{className:d.default.content},void 0,p("div",{className:d.default.art}),p(i.default,{className:d.default.headerText,size:i.default.Sizes.SIZE_16,color:i.default.Colors.CUSTOM},void 0,s.default.Messages.PROFILE_CUSTOMIZATION_MARKETING_TOOLTIP_HEADER),p(i.default,{className:d.default.bodyText,size:i.default.Sizes.SIZE_14,color:i.default.Colors.CUSTOM},void 0,s.default.Messages.PROFILE_CUSTOMIZATION_MARKETING_TOOLTIP_BODY),p(o.default,{className:d.default.button,size:o.default.Sizes.MAX,onClick:t,color:o.default.Colors.WHITE},void 0,s.default.Messages.PROFILE_CUSTOMIZATION_MARKETING_TOOLTIP_CTA),p("div",{className:d.default.pointer})))}v.displayName="ProfileCustomizationMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r,a=S(n(0)),o=n(389),i=E(n(473)),l=n(10470),u=E(n(9061)),s=n(1394),d=S(n(8253)),f=n(8256),c=E(n(11684)),p=E(n(11685)),v=E(n(11686)),y=E(n(11688)),m=E(n(10491)),_=n(1),h=E(n(6));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))}}function b(e){var t=e.webBuildOverride,n=e.user,r=e.premiumSubscription,E=e.onSelect,g=a.useState(!1),S=g[0],T=g[1],b=(0,y.default)(),M=(0,p.default)(),N=(0,c.default)(),A=(0,m.default)(),P=(0,v.default)(),R=u.default.useExperiment({})[0].useStandaloneSubscriptionsTab;function L(){return(L=C(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,T(!0),e.next=4,(0,s.clearBuildOverride)();case 4:window.location.reload(!0),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),T(!1);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}return O(d.default,{navId:"user-settings-cog",onClose:o.closeContextMenu,"aria-label":h.default.Messages.USER_SETTINGS_ACTIONS_MENU_LABEL,onSelect:E},void 0,(0,l.getUserSettingsSections)({user:n,premiumSubscription:r,badgeCustomProfiles:!1,useStandaloneSubscriptionsTab:R}).map((function(e){var t=e.section,n=e.label,r=e.onClick,o={label:n,action:function(){return null!=r?r():function(e){var t=Object.values(_.UserSettingsSections).filter((function(t){return t===e}))[0];null!=t&&i.default.open(t)}(t)}},l=t.replace(/\W/gi,"_");switch(t){case _.UserSettingsSections.STREAMER_MODE:return a.createElement(d.MenuItem,I({id:l},o),b);case _.UserSettingsSections.APPEARANCE:return a.createElement(d.MenuItem,I({id:l},o),M);case _.UserSettingsSections.ACCESSIBILITY:return a.createElement(d.MenuItem,I({id:l},o),N);case _.UserSettingsSections.VOICE:return a.createElement(d.MenuItem,I({id:l},o),A);case _.UserSettingsSections.EXPERIMENTS:return a.createElement(d.MenuItem,I({id:l},o),P);case"logout":return null;default:return a.createElement(d.MenuItem,I({id:l},o))}})),null!=t?O(d.MenuGroup,{},void 0,O(d.MenuItem,{id:"clear-build-override",disabled:S,label:"Clear Build Override",action:function(){return L.apply(this,arguments)},color:f.MenuItemColor.DANGER})):null)}b.displayName="UserSettingsCogContextMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(208),l=h(n(382)),u=h(n(61)),s=h(n(5942)),d=h(n(1159)),f=n(131),c=h(n(47)),p=h(n(24)),v=h(n(8761)),y=n(11475),m=h(n(8128)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e){var t,n,r=a.useState(!!e.descriptor),o=r[0],l=r[1],s=a.useCallback((function(){l((function(e){return!e}))}),[]),c=(t=e.experiment.description,Array.isArray(t)?t:[t]),h=(0,y.getExperimentDateFromId)(e.experimentId);return g("div",{className:m.default.group},void 0,g(f.FormSection,{},void 0,g(u.default,{onClick:s},void 0,g(f.FormTitle,{tag:f.FormTitleTags.H3,className:m.default.title},void 0,g("div",{},void 0,g("span",{},void 0,e.experiment.title),g(p.default,{color:p.default.Colors.MUTED},void 0,e.experimentId)),g("span",{className:m.default.experimentDate},void 0,h))),o?g("div",{},void 0,g(f.FormItem,{title:"Bucket Override"},void 0,g(d.default,{value:e.descriptor?e.descriptor.bucket:null,clearable:!0,searchable:!1,options:(n=e.experiment.buckets,n.map((function(e){return{label:v.default.getExperimentBucketName(e),value:e}}))),onChange:function(t){(0,i.overrideBucket)(e.experimentId,t&&t.value)}})),g("div",{className:_.default.marginTop4},void 0,c.map((function(e,t){return g(f.FormText,{type:f.FormTextTypes.DESCRIPTION},t,e," ")})))):null),g(f.FormDivider,{className:_.default.marginTop20}))}function O(){var e=(0,o.useStateFromStoresObject)([l.default],(function(){return{experiments:l.default.getRegisteredExperiments(),overrides:l.default.getExperimentOverrides()}})),t=e.experiments,n=e.overrides,r=a.useState(""),i=r[0],u=r[1],d=(0,y.getBestMatches)((0,y.sortEntries)((0,y.getEntries)(t)),i);return g(f.FormSection,{tag:f.FormTitleTags.H1,title:"Experiments"},void 0,g(s.default,{size:s.default.Sizes.LARGE,query:i,onChange:u,onClear:function(){return u("")}}),d.length?d.map((function(e){return g(S,{experiment:e.experiment,experimentId:e.id,descriptor:n[e.id]},e.id)})):g("div",{className:m.default.emptyState},void 0,g(c.default,{size:c.default.Sizes.SIZE_16},void 0,"No Experiments Found")))}S.displayName="ExperimentGroup",O.displayName="UserSettingsExperiments"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExperimentDateFromId=u,t.getEntries=function(e){return Array.from(Object.entries(e)).map((function(e){return{id:e[0],experiment:e[1]}}))},t.matchesDeep=s,t.sortEntries=function(e){return e.slice().sort((function(e,t){var n=u(e.id),r=u(t.id);if(null!=n&&null!=r){var a=r.localeCompare(n);if(0!==a)return a}return e.experiment.title.localeCompare(t.experiment.title)}))},t.getBestMatches=function(e,t){var n=t.split(/\s+/g).filter((function(e){return""!==e}));if(0===n.length)return e;for(var r,i=[],l=o(e);!(r=l()).done;){for(var u,d=r.value,f=0,c=o(n);!(u=c()).done;){var p=u.value;s(d,p)&&(f+=1)}0!==f&&(i[f]||(i[f]=[]),i[f].push(d))}i[1]&&i[1].length&&(i=i.slice(1));return(0,a.default)(i.reverse())};var r,a=(r=n(760))&&r.__esModule?r:{default:r};function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=/^(\d{4}-\d{1,2})/;function u(e){var t=l.exec(e);return t?t[1]:null}function s(e,t){if(Array.isArray(e))for(var n,r=o(e);!(n=r()).done;){if(s(n.value,t))return!0}else if("object"==typeof e&&null!==e)for(var a=0,i=Object.values(e);a<i.length;a++){if(s(i[a],t))return!0}else if("string"==typeof e&&e.toLowerCase().includes(t.toLowerCase()))return!0;return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(1171),l=d(n(8292)),u=d(n(5956)),s=d(n(39));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){p(o,r,a,i,l,"next",e)}function l(e){p(o,r,a,i,l,"throw",e)}i(void 0)}))}}function y(){var e=(0,o.useStateFromStores)([s.default],(function(){return s.default.theme})),t=a.useState(!1),n=t[0],r=t[1],d=a.useCallback(v(regeneratorRuntime.mark((function e(){var t,n,a,o,l,s,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),t={},n=u.default.getAllPending(),a=n.pendingAvatar,o=n.pendingBanner,l=n.pendingBio,s=n.pendingBannerColor,void 0!==a&&(t.avatar=a),void 0!==o&&(t.banner=o),null!=l&&(t.bio=l),void 0!==s&&(t.bannerColor=s),e.next=9,(0,i.saveAccountChanges)(t);case 9:(null==(d=e.sent)?void 0:d.ok)&&(0,i.resetAllPending)(),r(!1);case 12:case"end":return e.stop()}}),e)}))),[]),f=a.useCallback((function(){(0,i.resetAllPending)()}),[]);return c(l.default,{theme:e,submitting:n,onSave:d,onReset:f})}y.displayName="UserSettingsAccountNotice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r,a=P(n(0)),o=n(3),i=N(n(2)),l=n(1171),u=N(n(8316)),s=N(n(11478)),d=P(n(8555)),f=n(8277),c=n(1220),p=N(n(160)),v=N(n(5956)),y=N(n(12)),m=n(131),_=N(n(96)),h=n(10471),E=N(n(11479)),g=N(n(11483)),S=N(n(11484)),O=N(n(9068)),I=N(n(11485)),T=N(n(11486)),C=n(1),b=N(n(6)),M=N(n(8136));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var L=R(u.default,{});function D(){var e=(0,o.useStateFromStores)([y.default],(function(){return y.default.getCurrentUser()})),t=(0,o.useStateFromStores)([p.default],(function(){return p.default.hidePersonalInformation})),n=(0,o.useStateFromStoresObject)([v.default],(function(){var e=v.default.getAllPending();return{pendingAvatar:e.pendingAvatar,pendingBannerColor:e.pendingBannerColor,pendingBanner:e.pendingBanner,errors:v.default.getErrors()}})),r=n.pendingAvatar,u=n.pendingBanner,N=n.pendingBannerColor,A=n.errors,P=s.default.useExperiment({})[0].showBannerColorPicker;s.default.trackExposure({});var D=_.default.canUsePremiumProfileCustomization(e),w=void 0===r?e.getAvatarURL(void 0):r,j=(0,d.default)(w,C.Colors.PRIMARY_DARK_530,d.ColorFormats.HEX),k=void 0===N?e.bannerColor:N,U=void 0===r?null!=e.avatar:null!=r,G=void 0===u?null!=e.banner:null!=u;return a.useEffect((function(){return(0,c.hideHotspot)(f.HotspotLocations.PROFILE_CUSTOMIZATION_MARKETING),function(){return i.default.wait((function(){return(0,c.hideHotspot)(f.HotspotLocations.PROFILE_CUSTOMIZATION_SETTINGS_BADGE)}))}}),[]),a.useEffect((function(){return function(){return(0,l.resetAllPending)()}}),[]),t?L:R(m.FormSection,{tag:m.FormTitleTags.H1,title:b.default.Messages.USER_SETTINGS_USER_PROFILE,className:M.default.userProfileCustomizationSection},void 0,R("div",{className:M.default.baseLayout},void 0,R("div",{},void 0,R(S.default,{showRemoveAvatarButton:U,errors:A.avatar}),P&&R(T.default,{defaultAvatarColor:j,savedUserColor:e.bannerColor,pendingColor:N}),R(I.default,{canUsePremiumCustomization:D,showRemoveBannerButton:G,errors:A.banner,user:e}),R(g.default,{user:e,errors:A.bio})),R(O.default,{title:b.default.Messages.FORM_LABEL_VIDEO_PREVIEW,className:M.default.preview},void 0,R(E.default,{user:e,canUsePremiumCustomization:D,bannerColor:null!=k?k:j,onUpsellClick:h.handleUpsellClick}))))}D.displayName="UserSettingsProfileCustomization"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_banner_color_picker",label:"Banner Color Picker",defaultConfig:{showBannerColorPicker:!1},treatments:[{id:1,label:"Banner Color Picker",config:{showBannerColorPicker:!0}}]});t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var r,a=R(n(0)),o=n(3),i=n(1171),l=A(n(473)),u=A(n(8338)),s=n(123),d=A(n(11480)),f=n(8549),c=n(9112),p=A(n(256)),v=A(n(5956)),y=A(n(161)),m=A(n(61)),_=A(n(8722)),h=n(41),E=A(n(47)),g=A(n(13)),S=R(n(150)),O=A(n(96)),I=n(9240),T=A(n(11481)),C=A(n(10226)),b=n(1),M=A(n(6)),N=A(n(8131));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(){return(D=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}).apply(this,arguments)}function w(){g.default.track(b.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:b.AnalyticsPages.USER_SETTINGS,location_section:b.AnalyticsSections.SETTINGS_ACCOUNT,location_object:b.AnalyticsObjects.BADGE}),l.default.setSection(b.UserSettingsSections.PREMIUM)}var j=L(T.default,{});function k(e){var t=e.user,n=e.bannerColor,r=e.canUsePremiumCustomization,l=e.onUpsellClick,g=a.useState(!1),T=g[0],A=g[1],P=(0,o.useStateFromStores)([p.default],(function(){return p.default.findActivity(t.id,(function(e){return e.type===b.ActivityTypes.CUSTOM_STATUS}))})),R=(0,o.useStateFromStores)([v.default],(function(){return v.default.getAllPending()})),k=R.pendingBanner,U=R.pendingBio,G=R.pendingAvatar,F=a.useContext(s.AccessibilityPreferencesContext).reducedMotion,B=(0,o.useStateFromStores)([y.default],(function(){return y.default.isFocused()})),H=a.useRef(null),x=S.hasAnimatedUserBanner(t),V=a.useCallback((function(){var e,t;null===(e=H.current)||void 0===e||null===(t=e.inputRef.current)||void 0===t||t.activateUploadDialogue()}),[]),W=a.useCallback((function(e,n,r){if(null==t.avatar&&null==e)(0,i.setPendingAvatar)(void 0);else if(null!=e&&null!=n&&r&&!O.default.isPremium(t)){var o=new Image;o.src=e,(0,h.openModal)((function(t){return a.createElement(d.default,D({},t,{imgURI:o.src,avatar:e,onChangeAvatar:function(){t.onClose(),V()}}))}))}else(0,i.setPendingAvatar)(e)}),[t,V]),Y=a.useCallback((function(e){var n=D({},t,{avatar:e});return S.getUserAvatarURL(n,!0)}),[t]),z=void 0!==G?G:t.avatar;return a.useEffect((function(){var e;x&&F.enabled&&((new Image).src=null!==(e=S.getUserBannerURL({id:t.id,banner:t.banner},!0))&&void 0!==e?e:"")}),[t.id,t.banner,F.enabled,x]),L("div",{className:N.default.profileBannerPreview},void 0,function(){if(r){var e=F.enabled?T:B;return L("div",{onMouseMove:function(){return A(!0)},onMouseLeave:function(){return A(!1)}},void 0,L(u.default,{className:N.default.bannerUploader,showRemoveButton:!1,disabled:!r,avatar:t.banner,makeURL:function(){return void 0===k?t.getBannerURL(e):k},onChange:i.setPendingBanner,avatarStyle:{backgroundColor:n},avatarClassName:N.default.bannerUploaderInnerSquare,hint:M.default.Messages.CHANGE_BANNER,uploadType:f.UploadTypes.BANNER,showEditingModal:!0,hideSize:!0,maxFileSizeBytes:I.MAX_IMAGE_UPLOAD_FILESIZE_BYTES,onFileSizeError:C.default}),F.enabled&&x?L(_.default,{className:N.default.gifTag}):null)}return L("div",{className:N.default.bannerNormal,style:{backgroundColor:n}},void 0,L(m.default,{onClick:l,className:N.default.bannerNitroUpsell},void 0,L(E.default,{className:N.default.bannerNitroUpsellText,size:E.default.Sizes.SIZE_12,uppercase:!0},void 0,M.default.Messages.USER_SETTINGS_UNLOCK_BANNER)))}(),a.createElement(u.default,{ref:H,showIcon:!0,showRemoveButton:!1,className:r?N.default.avatarUploaderPremium:N.default.avatarUploaderNormal,avatarClassName:N.default.avatarUploaderInner,avatar:z,onChange:W,makeURL:Y,maxFileSizeBytes:I.MAX_IMAGE_UPLOAD_FILESIZE_BYTES,onFileSizeError:C.default}),L(c.UserPopoutInfo,{user:t,nickname:null,onOpenPremiumSettings:w,hasCustomStatus:null!=P}),L("div",{className:N.default.popoutInfo},void 0,L(c.UserPopoutProfileText,{userBio:null!=U?U:t.bio,customStatus:null!=P?L(c.UserPopoutCustomStatus,{customStatusActivity:P}):void 0}),j))}k.displayName="UserSettingsProfilePreview"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=_(n(0)),o=n(1171),i=y(n(5948)),l=_(n(29)),u=n(131),s=n(35),d=_(n(279)),f=y(n(24)),c=n(1),p=y(n(6)),v=y(n(8129));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}var g=function(e){var t=e.imgURI,n=e.transitionState,r=e.onClose,y=e.onChangeAvatar,m=e.avatar,_=a.useState(!1),g=_[0],S=_[1],O=a.useState(!1),I=O[0],T=O[1],C=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),e.next=3,(0,o.saveAccountChanges)({avatar:m});case 3:(null==(t=e.sent)?void 0:t.ok)&&(0,o.setPendingAvatar)(void 0),S(!1),r();case 7:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){E(o,r,a,i,l,"next",e)}function l(e){E(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return h(s.ModalRoot,{transitionState:n,size:s.ModalSize.SMALL,"aria-label":p.default.Messages.IMAGE},void 0,h(s.ModalContent,{className:v.default.modalContent,paddingFix:!1,orientation:"horizontal"},void 0,h(s.ModalHeader,{separator:!1,className:v.default.header},void 0,h(u.FormTitle,{tag:u.FormTitleTags.H1},void 0,p.default.Messages.PREMIUM_UPSELL_ANIMATED_AVATAR)),h(f.default,{color:f.default.Colors.STANDARD,size:f.default.Sizes.SIZE_16},void 0,p.default.Messages.PREMIUM_UPSELL_ANIMATED_AVATAR_SUBTITLE),h("div",{className:v.default.promo},void 0,h(f.default,{color:f.default.Colors.STANDARD,size:f.default.Sizes.SIZE_14,className:v.default.promoText},void 0,p.default.Messages.PREMIUM_UPSELL_ANIMATED_AVATAR_TEXT),h(i.default,{submitting:I,premiumModalAnalyticsLocation:{section:c.AnalyticsSections.AVATAR_UPSELL_MODAL,object:c.AnalyticsObjects.BUTTON_CTA},size:l.default.Sizes.SMALL,color:l.default.Colors.GREEN,onClick:function(){T(!0)},onSubscribeModalClose:function(e){T(!1),e&&(C(),r())},buttonText:p.default.Messages.PREMIUM_REQUIRED_GET_NITRO}))),h(s.ModalFooter,{className:v.default.modalFooter},void 0,h(l.default,{look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY,size:l.ButtonSizes.SMALL,onClick:y},void 0,p.default.Messages.CHANGE_AVATAR_A11Y_LABEL),h("div",{className:v.default.modalFooterActions},void 0,h(l.default,{className:v.default.cancelButton,look:l.default.Looks.LINK,color:l.default.Colors.PRIMARY,size:l.ButtonSizes.SMALL,onClick:r},void 0,p.default.Messages.AVATAR_UPLOAD_CANCEL),h(l.default,{size:l.ButtonSizes.SMALL,onClick:C,submitting:g},void 0,p.default.Messages.SAVE_CHANGES))),h(d.default,{src:t,"aria-hidden":!0,className:v.default.avatar,size:d.Sizes.SIZE_120}))};g.displayName="AvatarUploadPremiumUpsellModal";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(122),i=f(n(47)),l=f(n(24)),u=f(n(6)),s=f(n(8130)),d=f(n(11482));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function y(e){return e-=5399,Math.min(10,e/300*10)}var m=a.memo((function(){var e,t,n=a.useState(0),r=n[0],f=n[1],c=(0,o.useSpring)((function(){return{from:{rotate:"0deg"},config:{tension:1e3,friction:5}}})),m=c[0],_=c[1],h=a.useRef({seconds:r,jitter:(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=y(h.current.seconds),_({rotate:"-"+t+"deg"}),e.next=5,new Promise((function(e){return setTimeout(e,80)}));case 5:return _({rotate:t+"deg"}),e.next=8,new Promise((function(e){return setTimeout(e,80)}));case 8:e.next=0;break;case 10:case"end":return e.stop()}}),e)})),t=function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){v(o,r,a,i,l,"next",e)}function l(e){v(o,r,a,i,l,"throw",e)}i(void 0)}))},function(){return t.apply(this,arguments)})});return a.useEffect((function(){h.current.seconds=r})),a.useEffect((function(){var e=setInterval((function(){f((function(e){return 5399===e&&h.current.jitter(),++e}))}),1e3);return function(){return clearInterval(e)}}),[]),p("div",{"aria-hidden":!0},void 0,p(i.default,{className:s.default.fakeActivityTitle,size:i.default.Sizes.SIZE_12,uppercase:!0,muted:!0},void 0,u.default.Messages.USER_SETTINGS_CUSTOMIZE_PROFILE_TITLE),p("div",{className:s.default.fakeActivityLayout},void 0,p("div",{className:s.default.fakeActivityIcon},void 0,p(o.animated.img,{className:s.default.fakeActivityPencil,src:d.default,style:m})),p("div",{className:s.default.fakeActivityContent},void 0,p(l.default,{size:l.default.Sizes.SIZE_14,strong:!0},void 0,u.default.Messages.USER_SETTINGS_USER_PROFILE),p(l.default,{size:l.default.Sizes.SIZE_14},void 0,u.default.Messages.PROFILE_CUSTOMIZATION_ACTIVITY_TIME.format({renderTimeHook:function(e,t){var n=r%60,a=(r-n)/60;return p("span",{className:s.default.fakeActivityTimeValues},t,a.toString().padStart(2,"0"),":",n.toString().padStart(2,"0"))}})))))}));t.default=m},function(e,t,n){e.exports=n.p+"edb417bfb84d53275aad9b7996447ed6.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=n(1171),i=d(n(5956)),l=d(n(8272)),u=d(n(9068)),s=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e){var t=e.user,n=e.errors,r=(0,a.useStateFromStores)([i.default],(function(){return i.default.getPendingBio()}));return c(u.default,{title:s.default.Messages.USER_SETTINGS_ABOUT_ME,description:s.default.Messages.USER_SETTINGS_ABOUT_ME_DETAILS,errors:n},void 0,c(l.default,{placeholder:s.default.Messages.PROFILE_CUSTOMIZATION_BIO_PLACEHOLDER,maxLength:190,value:null!=r?r:t.bio,onChange:function(e){e!==t.bio?(0,o.setPendingBio)(e):(0,o.setPendingBio)(void 0)},rows:6}))}p.displayName="AboutMeSection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(1171),o=p(n(8327)),i=n(8549),l=p(n(29)),u=n(9240),s=p(n(10226)),d=p(n(9068)),f=p(n(6)),c=p(n(8133));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e){var t=e.showRemoveAvatarButton,n=e.errors;return y(d.default,{title:f.default.Messages.USER_SETTINGS_AVATAR,errors:n},void 0,y("div",{className:c.default.buttonsContainer},void 0,y(l.default,{size:l.default.Sizes.SMALL},void 0,f.default.Messages.CHANGE_AVATAR_A11Y_LABEL,y(o.default,{onChange:a.setPendingAvatar,uploadType:i.UploadTypes.AVATAR,showEditingModal:!0,maxFileSizeBytes:u.MAX_IMAGE_UPLOAD_FILESIZE_BYTES,onFileSizeError:s.default})),t&&y(l.default,{className:c.default.removeButton,color:l.default.Colors.PRIMARY,look:l.default.Looks.LINK,size:l.default.Sizes.SMALL,onClick:function(){return(0,a.setPendingAvatar)(null)}},void 0,f.default.Messages.USER_SETTINGS_REMOVE_AVATAR)))}m.displayName="AvatarSection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(1171),i=S(n(8327)),l=n(8549),u=n(280),s=S(n(29)),d=S(n(5828)),f=S(n(149)),c=S(n(5686)),p=S(n(13)),v=n(10471),y=n(9240),m=S(n(10226)),_=S(n(9068)),h=n(1),E=S(n(6)),g=S(n(8134));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e){var t=e.user.premiumType===h.PremiumTypes.TIER_1?E.default.Messages.USER_SETTINGS_CUSTOMIZATION_UPGRADE_UPSELL:E.default.Messages.USER_SETTINGS_CUSTOMIZATION_UPSELL;return a.useEffect((function(){p.default.track(h.AnalyticEvents.PREMIUM_UPSELL_VIEWED,{type:u.PremiumUpsellTypes.CUSTOM_PROFILE_SETTINGS_BANNER_BUTTON,location:{page:h.AnalyticsPages.USER_SETTINGS,section:h.AnalyticsSections.SETTINGS_CUSTOMIZE_PROFILE,object:h.AnalyticsObjects.BUTTON_CTA}})}),[]),T(d.default,{color:s.default.Colors.GREEN,onClick:v.handleUpsellClick,innerClassName:g.default.nitroUpsellButtonInner},void 0,T(c.default,{className:g.default.nitroUpsellButtonWheel}),t)}function b(e){var t=e.canUsePremiumCustomization,n=e.showRemoveBannerButton,r=e.errors,u=e.user;return T(_.default,{title:a.createElement(a.Fragment,null,E.default.Messages.USER_SETTINGS_PROFILE_BANNER," ",T(f.default,{text:E.default.Messages.PROFILE_CUSTOMIZATION_NITRO_ICON_TOOLTIP},void 0,(function(e){return a.createElement(c.default,I({},e,{className:g.default.nitroWheel}))}))),errors:r,description:E.default.Messages.USER_SETTINGS_BANNER_SPECS},void 0,t?T("div",{className:g.default.buttonsContainer},void 0,T(s.default,{size:s.default.Sizes.SMALL,disabled:!t},void 0,E.default.Messages.CHANGE_BANNER,T(i.default,{disabled:!t,onChange:o.setPendingBanner,uploadType:l.UploadTypes.BANNER,showEditingModal:!0,maxFileSizeBytes:y.MAX_IMAGE_UPLOAD_FILESIZE_BYTES,onFileSizeError:m.default})),n&&T(s.default,{className:g.default.removeButton,color:s.default.Colors.PRIMARY,look:s.default.Looks.LINK,size:s.default.Sizes.SMALL,onClick:function(){return(0,o.setPendingBanner)(null)},disabled:!t},void 0,E.default.Messages.USER_SETTINGS_REMOVE_BANNER)):T(C,{user:u}))}C.displayName="UpsellButton",b.displayName="ProfileBannerSection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=O(n(9)),i=n(202),l=n(1171),u=O(n(1166)),s=O(n(29)),d=O(n(61)),f=n(10227),c=O(n(278)),p=O(n(149)),v=O(n(372)),y=O(n(9241)),m=n(8263),_=O(n(24)),h=O(n(9068)),E=n(1),g=O(n(6)),S=O(n(8135));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(){return(C=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}).apply(this,arguments)}function b(e){var t=(0,i.hex2int)(e);return(t?(0,i.getDarkness)(t):1)>.25}function M(){return T(p.default,{text:g.default.Messages.USER_SETTINGS_PROFILE_COLOR_BETA},void 0,(function(e){return a.createElement(m.TextBadge,C({},e,{className:S.default.betaBadge,color:E.Colors.BRAND_NEW_500,text:g.default.Messages.BETA}))}))}M.displayName="BetaBadge";var N=T(M,{});function A(e){var t=e.defaultAvatarColor,n=e.savedUserColor,r=e.pendingColor,p=a.useState(n),m=p[0],O=p[1],I=(0,u.default)()===E.ThemeTypes.DARK?E.HEXColors.PRIMARY_DARK_600:E.HEXColors.WHITE,M=void 0!==r&&null==r||null==r&&null==n;function A(e){(0,l.setPendingBannerColor)((0,i.int2hex)(e)),O((0,i.int2hex)(e))}a.useEffect((function(){void 0===r&&O(n)}),[r,n]);var P=null!=m?m:I,R=P===I,L=b(P)?E.Colors.WHITE:E.Colors.PRIMARY_DARK_530,D=b(M?t:P)?E.Colors.WHITE:E.Colors.PRIMARY_DARK_530,w=T(v.default,{width:32,height:24,color:D});return T(h.default,{title:T("div",{className:S.default.profileColorTitle},void 0,g.default.Messages.USER_SETTINGS_PROFLE_COLOR," ",N)},void 0,T("div",{className:S.default.buttonsContainer},void 0,T("div",{className:S.default.colorSwatch},void 0,T(d.default,{"aria-label":g.default.Messages.USER_SETTINGS_PROFILE_COLOR_DEFAULT,onClick:function(){null==n&&void 0===r||(0,l.setPendingBannerColor)(null)},className:S.default.swatch,style:{backgroundColor:t}},void 0,M?w:null),T(_.default,{className:S.default.swatchDescription,color:_.default.Colors.HEADER_SECONDARY,size:_.default.Sizes.SIZE_12},void 0,g.default.Messages.USER_SETTINGS_PROFILE_COLOR_DEFAULT)),T("div",{className:S.default.colorSwatch},void 0,T(c.default,{onRequestOpen:function(){if(P===n)return(0,l.setPendingBannerColor)(void 0);(0,l.setPendingBannerColor)(P)},renderPopout:function(e){return a.createElement(f.CustomColorPicker,C({},e,{value:(0,i.hex2int)(P),onChange:A}))}},void 0,(function(e){var t;return a.createElement(s.default,C({},e,{className:(0,o.default)(S.default.customSwatch,(t={},t[S.default.defaultSwatch]=R,t)),style:{backgroundColor:P,borderColor:R?void 0:P}}),T(y.default,{className:S.default.dropperIcon,width:14,height:14,color:L}),M?null:w)})),T(_.default,{className:S.default.swatchDescription,color:_.default.Colors.HEADER_SECONDARY,size:_.default.Sizes.SIZE_12},void 0,g.default.Messages.USER_SETTINGS_PROFILE_COLOR_CUSTOM))))}A.displayName="ProfileColorSection"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(66)),i=s(n(118)),l=s(n(24)),u=s(n(8137));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){var e=window.GLOBAL_ENV.RELEASE_CHANNEL,t=null==="337b0b53d10875228a5b553e10dbfb3f270aa0dd"?void 0:"337b0b53d10875228a5b553e10dbfb3f270aa0dd".substr(0,7),n=null!=i.default?i.default.remoteApp.getVersion():null,r=o.default&&o.default.os?o.default.os.toString():null,s=i.default?"("+i.default.os.release+")":null;return f("div",{className:u.default.info},void 0,f(l.default,{tag:"span",className:u.default.line,size:l.default.Sizes.SIZE_12,color:l.default.Colors.MUTED},void 0,e," ","90176"," ",f("span",{className:u.default.versionHash},void 0,"(",t,")"))," ",n?a.createElement(a.Fragment,null,f(l.default,{tag:"span",className:u.default.line,size:l.default.Sizes.SIZE_12,color:l.default.Colors.MUTED},void 0,"Host ",n)," "):null,null!=r?f(l.default,{tag:"span",className:u.default.line,size:l.default.Sizes.SIZE_12,color:l.default.Colors.MUTED},void 0,r," ",s):null)}c.displayName="ClientDebugInfo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=f(n(1295)),o=f(n(271)),i=f(n(10450)),l=f(n(10451)),u=f(n(10066)),s=n(1),d=f(n(8138));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v={offset:{top:-8}};function y(){return p("div",{className:d.default.socialLinks},void 0,p(o.default,{target:"_blank",rel:"author",title:"Twitter",href:(0,a.default)(s.LocalizedLinks.TWITTER),className:d.default.link,focusProps:v},void 0,p(u.default,{foreground:d.default.foreground,"aria-hidden":!0})),p(o.default,{target:"_blank",rel:"author",title:"Facebook",href:s.SOCIAL_LINKS.FACEBOOK_URL,className:d.default.link,focusProps:v},void 0,p(i.default,{foreground:d.default.foreground,"aria-hidden":!0})),p(o.default,{target:"_blank",rel:"author",title:"Instagram",href:s.SOCIAL_LINKS.INSTAGRAM_URL,className:d.default.link,focusProps:v},void 0,p(l.default,{foreground:d.default.foreground,"aria-hidden":!0})))}y.displayName="SocialLinks"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=x;var r,a=G(n(0)),o=k(n(9)),i=k(n(8)),l=n(3),u=k(n(274)),s=k(n(473)),d=G(n(1301)),f=n(285),c=k(n(105)),p=n(297),v=k(n(1263)),y=n(682),m=k(n(8975)),_=k(n(11573)),h=n(398),E=k(n(39)),g=k(n(29)),S=k(n(467)),O=k(n(1160)),I=k(n(8496)),T=k(n(1162)),C=k(n(8360)),b=k(n(8267)),M=n(131),N=G(n(279)),A=k(n(24)),P=k(n(93)),R=n(1),L=k(n(6)),D=k(n(8139)),w=k(n(370)),j=k(n(1350));function k(e){return e&&e.__esModule?e:{default:e}}function U(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return U=function(){return e},e}function G(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=U();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function F(){return(F=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}).apply(this,arguments)}function B(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var H=i.default.debounce((function(e){(0,f.setSaturation)(e)}),250);function x(e){return B(M.FormSection,{tag:M.FormTitleTags.H1,title:L.default.Messages.ACCESSIBILITY},void 0,W,z,$,q,B(A.default,{size:A.default.Sizes.SIZE_16},void 0,L.default.Messages.ACCESSIBILITY_SETTINGS_APPEARANCE_LINK.format({onAppearanceClick:function(){s.default.open(R.UserSettingsSections.APPEARANCE)}})))}function V(){var e=(0,l.useStateFromStoresObject)([c.default,E.default],(function(){return{saturation:c.default.saturation,desaturateUserColors:c.default.desaturateUserColors,messageDisplayCompact:E.default.messageDisplayCompact}})),t=e.saturation,n=e.desaturateUserColors,r=e.messageDisplayCompact,i=a.useState((function(){var e=(0,p.createMessageRecord)(F({},(0,v.default)("1337",L.default.Messages.ACCESSIBILITY_SETTINGS_SATURATION_PREVIEW_MESSAGE),{state:R.MessageStates.SENT,id:"0"}));return e.colorString="green",e}))[0];return B(M.FormSection,{},void 0,B(M.FormTitle,{className:w.default.marginBottom8},void 0,L.default.Messages.ACCESSIBILITY_SETTINGS_SATURATION_TITLE),B(M.FormText,{type:M.FormText.Types.DESCRIPTION,className:w.default.marginBottom20},void 0,L.default.Messages.ACCESSIBILITY_SETTINGS_SATURATION_DESCRIPTION),B(C.default,{markers:R.Accessibility.SATURATION_INCREMENTS,equidistant:!0,stickToMarkers:!0,maxValue:1,minValue:0,initialValue:t,onValueChange:H,onMarkerRender:function(e){return 100*e%2==0?100*e+"%":void 0}}),B(b.default,{hideBorder:!0,className:(0,o.default)(w.default.marginTop8,w.default.marginBottom20),value:n,onChange:f.toggledesaturateUserColors,note:L.default.Messages.ACCESSIBILITY_SETTINGS_SATURATION_CUSTOM_COLORS_DESCRIPTION},void 0,L.default.Messages.ACCESSIBILITY_SETTINGS_SATURATION_CUSTOM_COLORS_LABEL),B(I.default,{},void 0,B(S.default,{className:D.default.preview,"aria-hidden":!0},void 0,B("div",{className:D.default.previewHeader},void 0,B(g.default,{size:g.default.Sizes.SMALL,color:g.default.Colors.BRAND},void 0,"Example Button"),B("div",{className:D.default.previewAvatars},void 0,[R.StatusTypes.ONLINE,R.StatusTypes.DND,R.StatusTypes.IDLE].map((function(e){return B(N.AnimatedAvatar,{"aria-label":"avatar",src:j.default,size:N.default.Sizes.SIZE_32,status:e})})))),B("div",{className:D.default.previewMessage},void 0,B(m.default,{compact:r,author:F({},(0,y.getMessageAuthor)(i),{colorString:"#DD80F4"}),message:i})))))}x.displayName="UserSettingsAccessibility",V.displayName="UserSettingsAccessibilityContrast";var W=B(V,{});function Y(){var e=(0,l.useStateFromStoresObject)([c.default,E.default],(function(){return{systemPrefersReducedMotion:c.default.systemPrefersReducedMotion,rawPrefersReducedMotion:c.default.rawPrefersReducedMotion,useReducedMotion:c.default.useReducedMotion,gifAutoPlay:E.default.gifAutoPlay,gifAutoPlayOverrideReason:E.default.getAppliedOverrideReasonKey("gifAutoPlay"),animateEmoji:E.default.animateEmoji,animateEmojiOverrideReason:E.default.getAppliedOverrideReasonKey("animateEmoji")}})),t=e.useReducedMotion,n=e.rawPrefersReducedMotion,r=e.systemPrefersReducedMotion,i=e.gifAutoPlay,s=e.gifAutoPlayOverrideReason,d=e.animateEmoji,p=e.animateEmojiOverrideReason,v="auto"===n,y=a.useCallback((function(e,t){(0,f.setPrefersReducedMotion)(t?"auto":r)}),[r]),m=a.useCallback((function(e){(0,f.setPrefersReducedMotion)(e?"reduce":"no-preference")}),[]),h=a.useCallback((function(e){u.default.updateRemoteSettings({gifAutoPlay:e})}),[]),g=a.useCallback((function(e){u.default.updateRemoteSettings({animateEmoji:e})}),[]);return B(M.FormItem,{title:L.default.Messages.ACCESSIBILITY_PREFERS_REDUCED_MOTION,className:w.default.marginTop20},void 0,B(M.FormText,{type:M.FormText.Types.DESCRIPTION,className:w.default.marginBottom8},void 0,L.default.Messages.ACCESSIBILITY_PREFERS_REDUCED_MOTION_DESCRIPTION.format({helpdeskArticle:P.default.getArticleURL(R.HelpdeskArticles.REDUCED_MOTION)})),B(O.default,{className:w.default.marginTop20,value:v,shape:O.default.Shapes.BOX,type:O.default.Types.INVERTED,onChange:y},void 0,B(A.default,{},void 0,L.default.Messages.ACCESSIBILITY_PREFERS_REDUCED_MOTION_AUTO)),B(b.default,{className:w.default.marginTop20,value:t,onChange:m},void 0,L.default.Messages.ACCESSIBILITY_PREFERS_REDUCED_MOTION_ENABLE),B(b.default,{className:w.default.marginBottom40,value:i,note:null!=s?(0,_.default)(s):void 0,onChange:h},void 0,L.default.Messages.GIF_AUTO_PLAY_LABEL),B(b.default,{className:(0,o.default)(w.default.marginTop8,w.default.marginBottom20),value:d,note:null!=p?(0,_.default)(p):void 0,onChange:g},void 0,L.default.Messages.ANIMATE_EMOJI))}Y.displayName="UserSettingsAccessibilityReducedMotion";var z=B(Y,{});function K(){var e=(0,l.useStateFromStoresObject)([E.default],(function(){return{animateStickers:E.default.animateStickers,animateStickersOverrideReason:E.default.getAppliedOverrideReasonKey("animateStickers")}})),t=e.animateStickers,n=e.animateStickersOverrideReason,r=a.useCallback((function(e){u.default.updateRemoteSettings({animateStickers:e.value})}),[]);return B(M.FormItem,{className:w.default.marginBottom40,title:L.default.Messages.STICKERS_AUTO_PLAY_HEADING},void 0,B(M.FormText,{type:M.FormText.Types.DESCRIPTION,className:w.default.marginBottom8},void 0,null!=n?(0,_.default)(n):L.default.Messages.STICKERS_AUTO_PLAY_HELP),B(T.default,{options:[{name:L.default.Messages.STICKERS_ALWAYS_ANIMATE,value:h.StickerAnimationSettings.ALWAYS_ANIMATE},{name:L.default.Messages.STICKERS_ANIMATE_ON_INTERACTION,desc:L.default.Messages.STICKERS_ANIMATE_ON_INTERACTION_DESCRIPTION,value:h.StickerAnimationSettings.ANIMATE_ON_INTERACTION},{name:L.default.Messages.STICKERS_NEVER_ANIMATE,value:h.StickerAnimationSettings.NEVER_ANIMATE}],onChange:r,value:t}))}K.displayName="UserSettingsAccessibilityStickers";var $=B(K,{});function Z(){var e=(0,l.useStateFromStores)([E.default],(function(){return E.default.enableTTSCommand})),t=a.useCallback((function(e){u.default.updateRemoteSettings({enableTTSCommand:e})}),[]);return d.supported?B(M.FormSection,{},void 0,B(M.FormTitle,{className:w.default.marginBottom8},void 0,L.default.Messages.FORM_LABEL_TTS),B(b.default,{className:w.default.marginTop8,value:e,onChange:t},void 0,L.default.Messages.ALLOW_TTS_COMMAND)):null}var q=B(Z,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){switch(e){case a.SettingsOverrideReasonKeys.REDUCED_MOTION:return o.default.Messages.ACCESSIBILITY_REDUCED_MOTION_SETTINGS_OVERRIDE.format();case a.SettingsOverrideReasonKeys.REDUCED_MOTION_STICKERS:return o.default.Messages.STICKERS_AUTO_PLAY_HELP_DISABLED;default:return}};var r,a=n(1271),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=k(n(0)),o=w(n(9)),i=n(3),l=w(n(9242)),u=n(1171),s=w(n(8316)),d=w(n(8650)),f=w(n(10482)),c=n(8277),p=w(n(8264)),v=w(n(11575)),y=w(n(11576)),m=w(n(11579)),_=w(n(15)),h=w(n(10233)),E=w(n(160)),g=w(n(39)),S=w(n(12)),O=k(n(29)),I=w(n(55)),T=n(131),C=n(466),b=n(41),M=w(n(24)),N=w(n(5994)),A=w(n(11580)),P=n(1),R=w(n(6)),L=w(n(7902)),D=w(n(370));function w(e){return e&&e.__esModule?e:{default:e}}function j(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return j=function(){return e},e}function k(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=j();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function U(){return(U=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}).apply(this,arguments)}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var B=G(y.default,{}),H=G(s.default,{}),x=function(e){var t,r;function i(t){var n;return(n=e.call(this,t)||this).state={disableAccountErrorMessage:null,shouldRenderOwnedGuildsModal:!1,shouldRenderDeleteAccountConfirmModal:!1,shouldRenderDisableAccountErrorModal:!1},n}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,F(t,r);var s=i.prototype;return s.componentDidMount=function(){var e=this.props.currentUser;(0,p.default)(e.id,e.getAvatarURL(void 0))},s.componentWillUnmount=function(){l.default.clearBackupCodes(),(0,u.accountDetailsClose)()},s.renderAccountWarning=function(){var e=this.props.currentUser;if(!e.isClaimed()){var t=G("section",{},void 0,G("div",{className:L.default.accountWarningBodyText},void 0,R.default.Messages.UNCLAIMED_ACCOUNT_BODY_2),G(O.default,{look:O.ButtonLooks.INVERTED,size:O.ButtonSizes.SMALL,color:O.default.Colors.RED,onClick:function(){return f.default.openClaimAccountModal()}},void 0,R.default.Messages.CLAIM_ACCOUNT_LONG));return G(T.FormNotice,{type:T.FormNotice.Types.DANGER,className:D.default.marginBottom20,imageData:{src:n(11592),width:60,height:60},title:R.default.Messages.UNCLAIMED_ACCOUNT_TITLE,body:t})}if(null==e.email)return null;if(!e.verified){var r=G("section",{},void 0,G("div",{className:L.default.accountWarningBodyText},void 0,R.default.Messages.USER_SETTINGS_UNVERIFIED_EMAIL_BODY),G(N.default,{size:O.ButtonSizes.SMALL,color:O.default.Colors.PRIMARY}));return G(T.FormNotice,{type:T.FormNotice.Types.PRIMARY,className:D.default.marginBottom20,imageData:{src:n(11593),width:60,height:60},title:R.default.Messages.UNVERIFIED_EMAIL_TITLE,body:r})}},s.renderAccountSettings=function(){return G(T.FormSection,{tag:T.FormTitleTags.H1,title:R.default.Messages.USER_SETTINGS_MY_ACCOUNT,className:L.default.userSettingsAccount},void 0,this.renderAccountWarning(),B)},s.renderSecuritySettings=function(){var e=this.props,t=e.backupCodes,r=e.currentUser,i=e.theme===P.ThemeTypes.DARK?n(11594):n(11595);return G(T.FormSection,{className:(0,o.default)(L.default.userSettingsSecurity,D.default.marginTop40),title:R.default.Messages.USER_SETTINGS_ACCOUNT_PASSWORD_AND_AUTHENTICATION,tag:T.FormTitle.Tags.H1},void 0,G("div",{},void 0,G(O.default,{size:O.default.Sizes.SMALL,className:L.default.changePasswordButton,onClick:function(){return(0,b.openModal)((function(e){return a.createElement(m.default,e)}))}},void 0,R.default.Messages.CHANGE_PASSWORD)),G(I.default,{align:I.default.Align.STRETCH},void 0,G(I.default.Child,{wrap:!0},void 0,G(A.default,{backupCodes:t})),r.mfaEnabled?null:G(I.default,{align:I.default.Align.CENTER,basis:"323px",grow:0},void 0,G("img",{src:i,className:L.default.userSettingsSecurityImage,alt:""}))))},s.renderConfirmModals=function(){var e=this,t=this.state,n=t.shouldRenderOwnedGuildsModal,r=t.shouldRenderDeleteAccountConfirmModal,a=t.shouldRenderDisableAccountErrorModal,o=t.disableAccountErrorMessage;if(n){var i=function(){return e.setState({shouldRenderOwnedGuildsModal:!1})};return G(C.DeclarativeConfirmModal,{dismissable:!0,header:R.default.Messages.DELETE_ACCOUNT_TRANSFER_OWNERSHIP,confirmText:R.default.Messages.OKAY,confirmButtonColor:O.ButtonColors.BRAND,onCancel:i,onConfirm:i},void 0,G(M.default,{size:M.default.Sizes.SIZE_16},void 0,R.default.Messages.DELETE_ACCOUNT_TRANSFER_OWNERSHIP_BODY))}if(r){var l=function(){return e.setState({shouldRenderDeleteAccountConfirmModal:!1})};return G(C.DeclarativeConfirmModal,{dismissable:!0,header:R.default.Messages.DELETE_ACCOUNT,confirmText:R.default.Messages.DELETE_ACCOUNT,cancelText:R.default.Messages.CANCEL,onCancel:l,onConfirm:function(){return(0,u.disableAccount)("",!0).then(l)}},void 0,G(M.default,{size:M.default.Sizes.SIZE_16},void 0,R.default.Messages.DELETE_ACCOUNT_BODY))}if(a){var s=function(){return e.setState({shouldRenderDisableAccountErrorModal:!1,disableAccountErrorMessage:null})};return G(C.DeclarativeConfirmModal,{dismissable:!0,header:R.default.Messages.DELETE_ACCOUNT_ERROR,confirmText:R.default.Messages.OKAY,confirmButtonColor:O.ButtonColors.BRAND,onCancel:s,onConfirm:s},void 0,G(M.default,{size:M.default.Sizes.SIZE_16},void 0,o))}},s.render=function(){var e=this;if(this.props.hide)return H;var t=this.props.currentUser;return G("div",{},void 0,this.renderConfirmModals(),this.renderAccountSettings(),t.isClaimed()?a.createElement(a.Fragment,null,G(T.FormDivider,{className:D.default.marginTop40}),this.renderSecuritySettings(),G(T.FormDivider,{className:D.default.marginTop40})):null,G(v.default,{className:D.default.marginTop40,currentUser:t,handleDisableAccount:function(){return e.handleDisableAccount(!1)},handleDeleteAccount:function(){return e.handleDisableAccount(!0)}}))},s.handleDisableAccountError=function(e){if(e.body.code===P.AbortCodes.INVALID_PASSWORD)throw e;this.setState({shouldRenderDisableAccountErrorModal:!0,disableAccountErrorMessage:e.body.message})},s.handleSubmitDisableAccount=function(e,t){return(0,u.disableAccount)(e,t).then(P.NOOP,this.handleDisableAccountError)},s.handleDisableAccount=function(e){var t=this;void 0===e&&(e=!1);var n=this.props.currentUser,r=_.default.getGuilds();Object.keys(r).filter((function(e){return r[e].ownerId===n.id})).length>0?this.setState({shouldRenderOwnedGuildsModal:!0}):n.isClaimed()?(0,b.openModal)((function(n){return a.createElement(d.default,U({},n,{handleSubmit:function(n){return t.handleSubmitDisableAccount(n,e)},title:e?R.default.Messages.DELETE_ACCOUNT:R.default.Messages.DISABLE_ACCOUNT,actionText:e?R.default.Messages.DELETE_ACCOUNT:R.default.Messages.DISABLE_ACCOUNT}),e?R.default.Messages.DELETE_ACCOUNT_BODY:R.default.Messages.DISABLE_ACCOUNT_BODY)})):this.setState({shouldRenderDeleteAccountConfirmModal:!0})},i}(a.PureComponent);x.displayName="UserSettingsAccount";var V=function(){var e=(0,i.useStateFromStores)([S.default],(function(){return S.default.getCurrentUser()})),t=(0,i.useStateFromStores)([h.default],(function(){return h.default.getBackupCodes()})),n=(0,i.useStateFromStores)([E.default],(function(){return E.default.hidePersonalInformation})),r=(0,i.useStateFromStores)([g.default],(function(){return g.default.theme})),a=(0,i.useStateFromStores)([c.HotspotStore],(function(){return c.HotspotStore.hasHotspot(c.HotspotLocations.PROFILE_CUSTOMIZATION_SETTINGS_BADGE)}));return G(x,{currentUser:e,backupCodes:t,hide:n,theme:r,showNewBadge:a})};V.displayName="ConnectedUserAccountSettings";var W=V;t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;d(n(0));var r,a=d(n(29)),o=n(131),i=u(n(6)),l=u(n(8140));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e){var t=e.className,n=e.currentUser,r=e.handleDisableAccount,u=e.handleDeleteAccount,s=n.isClaimed();return f(o.FormSection,{className:t,title:i.default.Messages.USER_SETTINGS_ACCOUNT_REMOVAL_SECTION},void 0,f(o.FormText,{className:l.default.description,type:o.FormText.Types.DESCRIPTION},void 0,s?i.default.Messages.USER_SETTINGS_ACCOUNT_REMOVAL_DESCRIPTION:i.default.Messages.USER_SETTINGS_ACCOUNT_REMOVAL_DESCRIPTION_UNCLAIMED),f("div",{className:l.default.buttonContainer},void 0,s?f(a.default,{className:l.default.disableButton,look:a.ButtonLooks.FILLED,color:a.ButtonColors.RED,size:a.ButtonSizes.SMALL,onClick:r},void 0,i.default.Messages.DISABLE_ACCOUNT):null,f(a.default,{look:a.ButtonLooks.OUTLINED,color:a.ButtonColors.RED,size:a.ButtonSizes.SMALL,onClick:u},void 0,i.default.Messages.DELETE_ACCOUNT)))}c.displayName="UserSettingsAccountDisableAccountSection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=J;var r,a=H(n(0)),o=F(n(9)),i=n(3),l=F(n(473)),u=F(n(8300)),s=F(n(8650)),d=F(n(8447)),f=F(n(10482)),c=F(n(8258)),p=F(n(8253)),v=F(n(5834)),y=n(5831),m=F(n(8363)),_=H(n(8822)),h=H(n(8827)),E=F(n(5956)),g=F(n(39)),S=F(n(12)),O=F(n(29)),I=F(n(61)),T=F(n(278)),C=n(131),b=F(n(8331)),M=n(41),N=H(n(279)),A=F(n(24)),P=F(n(13)),R=n(1163),L=F(n(43)),D=n(11577),w=F(n(5995)),j=F(n(11578)),k=n(1),U=F(n(6)),G=F(n(8142));function F(e){return e&&e.__esModule?e:{default:e}}function B(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return B=function(){return e},e}function H(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=B();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function x(){return(x=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}).apply(this,arguments)}function V(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var W=L.default.getEnableHardwareAcceleration()?N.AnimatedAvatar:N.default;function Y(e){var t=e.className,n=e.user,r=a.useRef(null),i=null!=r.current&&r.current.scrollWidth>r.current.clientWidth;return V("div",{className:(0,o.default)(G.default.field,t)},void 0,V("div",{className:G.default.constrainedRow},void 0,V("div",{className:G.default.usernameRow},void 0,V(C.FormTitle,{className:G.default.fieldTitle},void 0,U.default.Messages.USER_SETTINGS_LABEL_USERNAME),a.createElement("div",{className:G.default.usernameInnerRow,ref:r},V(A.default,{tag:"span",color:A.default.Colors.HEADER_PRIMARY,size:A.default.Sizes.SIZE_16},void 0,n.username),V(A.default,{tag:"span",color:A.default.Colors.HEADER_SECONDARY,size:A.default.Sizes.SIZE_16},void 0,"#",n.discriminator)))),V(O.default,{className:G.default.fieldButton,size:O.default.Sizes.SMALL,color:O.default.Colors.GREY,onClick:function(){return(0,M.openModal)((function(e){return a.createElement(j.default,e)}))}},void 0,i?U.default.Messages.DISAPPROVAL:U.default.Messages.EDIT))}function z(e){var t=e.text,n=e.censor,r=a.useState(!1),o=r[0],i=r[1],l=o?t:n(t);return a.createElement(a.Fragment,null,l,V(O.default,{look:O.default.Looks.LINK,size:O.default.Sizes.MIN,color:O.default.Colors.LINK,onClick:function(){return i(!o)}},void 0,o?U.default.Messages.HIDE:U.default.Messages.REVEAL))}function K(e){var t,n=e.className,r=e.user;if(r.isClaimed())if(null==r.email)t={buttonText:U.default.Messages.ADD,buttonColor:O.default.Colors.GREY,valueMessage:U.default.Messages.USER_SETTINGS_NO_EMAIL_PLACEHOLDER,handleClick:function(){return(0,M.openModal)((function(e){return a.createElement(w.default,e)}))}};else{var i=r.email;t={buttonText:U.default.Messages.EDIT,buttonColor:O.default.Colors.GREY,valueMessage:V(z,{text:i,censor:D.censorEmail}),handleClick:function(){return(0,M.openModal)((function(e){return a.createElement(w.default,e)}))}}}else t={buttonText:U.default.Messages.CLAIM_ACCOUNT_SHORT,buttonColor:O.default.Colors.BRAND,valueMessage:U.default.Messages.USER_SETTINGS_ADD_EMAIL_CLAIM,handleClick:function(){return f.default.openClaimAccountModal()}};return V("div",{className:(0,o.default)(G.default.field,n)},void 0,V("div",{className:G.default.constrainedRow},void 0,V("div",{},void 0,V(C.FormTitle,{className:G.default.fieldTitle},void 0,U.default.Messages.USER_SETTINGS_LABEL_EMAIL),V("div",{},void 0,V(A.default,{tag:"span",color:A.default.Colors.HEADER_PRIMARY,size:A.default.Sizes.SIZE_16},void 0,t.valueMessage)))),V(O.default,{className:G.default.fieldButton,size:O.default.Sizes.SMALL,color:t.buttonColor,onClick:t.handleClick},void 0,t.buttonText))}function $(e){var t=e.className,n=e.user;if(!n.isClaimed())return null;var r,i=n.phone,l=n.email;return r=null==i?U.default.Messages.USER_SETTINGS_NO_PHONE_PLACEHOLDER:V(z,{text:i,censor:D.censorPhone}),V("div",{className:(0,o.default)(G.default.field,t)},void 0,V("div",{className:G.default.constrainedRow},void 0,V("div",{},void 0,V(C.FormTitle,{className:G.default.fieldTitle},void 0,U.default.Messages.USER_SETTINGS_LABEL_PHONE_NUMBER),V("div",{},void 0,V(A.default,{tag:"span",color:A.default.Colors.HEADER_PRIMARY,size:A.default.Sizes.SIZE_16},void 0,r)))),V("div",{className:G.default.fieldButtonList},void 0,null!=i&&null!=l?V(O.default,{className:(0,o.default)(G.default.fieldButton,G.default.removeButton),size:O.default.Sizes.SMALL,look:O.default.Looks.LINK,color:O.default.Colors.PRIMARY,onClick:function(){(0,M.openModal)((function(e){return a.createElement(s.default,x({},e,{title:U.default.Messages.USER_SETTINGS_ACCOUNT_REMOVE_PHONE_NUMBER_TITLE,children:n.hasFlag(k.UserFlags.MFA_SMS)?U.default.Messages.USER_SETTINGS_ACCOUNT_REMOVE_PHONE_SMS_BACKUP_WARNING:void 0,actionText:U.default.Messages.REMOVE,handleSubmit:v.default.removePhone}))}))}},void 0,U.default.Messages.REMOVE):null,V(O.default,{className:G.default.fieldButton,size:O.default.Sizes.SMALL,color:O.default.Colors.GREY,onClick:function(){(0,M.openModal)((function(e){return a.createElement(d.default,e)}),{modalKey:y.PHONE_VERIFICATION_MODAL_KEY})}},void 0,null==i?U.default.Messages.ADD:U.default.Messages.EDIT)))}function Z(e){var t=e.user,n=(0,c.default)(t.id);return(0,i.useStateFromStores)([g.default],(function(){return g.default.developerMode}))&&R.SUPPORTS_COPY?V(T.default,{renderPopout:function(e){var t=e.closePopout;return V(p.default,{onClose:t,onSelect:void 0,navId:"copy-id","aria-label":U.default.Messages.COPY_ID},void 0,n)}},void 0,(function(e){return a.createElement(I.default,x({className:G.default.overflowMenuButton},e),V(b.default,{className:G.default.overflowMenuIcon,height:24,width:24}))})):null}function q(){l.default.setSection(k.UserSettingsSections.PROFILE_CUSTOMIZATION)}function X(){P.default.track(k.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:k.AnalyticsPages.USER_SETTINGS,location_section:k.AnalyticsSections.SETTINGS_ACCOUNT,location_object:k.AnalyticsObjects.TOOLTIP}),l.default.setSection(k.UserSettingsSections.PREMIUM)}function J(){var e,t=(0,i.useStateFromStores)([S.default],(function(){return S.default.getCurrentUser()})),n=(0,i.useStateFromStores)([m.default],(function(){return m.default.getUserProfile(t.id)})),r=(0,i.useStateFromStores)([g.default],(function(){return g.default.status})),a=(0,i.useStateFromStores)([E.default],(function(){return E.default.getErrors()})),o=null==a||null===(e=a.avatar)||void 0===e?void 0:e[0];return V("div",{className:G.default.accountProfileCard},void 0,V(_.default,{user:t,allowEdit:!1,guildId:void 0,bannerType:_.UserBannerTypes.SETTINGS}),V("div",{className:G.default.userInfo},void 0,V(W,{className:G.default.avatar,src:t.getAvatarURL(void 0,!0),status:r,size:N.default.Sizes.SIZE_80,"aria-label":t.username}),V("div",{},void 0,V("div",{className:G.default.profileCardUsernameRow},void 0,V(u.default,{user:t,className:G.default.userTag,discriminatorClass:G.default.discriminator}),V(Z,{user:t})),V(h.default,{user:t,premiumSince:null==n?void 0:n.premiumSince,premiumGuildSince:null==n?void 0:n.premiumGuildSince,size:h.BadgeSizes.SIZE_22,openPremiumSettings:X})),V(O.default,{onClick:q,size:O.default.Sizes.SMALL},void 0,U.default.Messages.USER_SETTINGS_EDIT_PROFILE)),V("div",{className:G.default.background},void 0,null!=o?V(A.default,{className:G.default.avatarError,size:A.default.Sizes.SIZE_12,color:A.default.Colors.STATUS_RED},void 0,o):null,V("div",{className:G.default.fieldList},void 0,V(Y,{user:t}),V(K,{className:G.default.fieldSpacer,user:t}),V($,{className:G.default.fieldSpacer,user:t}))))}Y.displayName="EditUsernameRow",K.displayName="EditEmailRow",$.displayName="EditPhoneRow",Z.displayName="CopyUserIdMenu",J.displayName="UserSettingsAccountProfileCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.censorPhone=function(e){return""+"*".repeat(e.length-4)+e.slice(-4)},t.censorEmail=function(e){var t=e.split("@"),n=t[0],r=t[1];return"*".repeat(n.length)+"@"+r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=N(n(9)),i=N(n(378)),l=n(3),u=n(1171),s=N(n(473)),d=N(n(5956)),f=N(n(12)),c=N(n(29)),p=N(n(61)),v=N(n(153)),y=N(n(149)),m=n(85),_=n(131),h=N(n(8745)),E=n(35),g=n(217),S=N(n(24)),O=N(n(13)),I=N(n(96)),T=n(1),C=N(n(6)),b=N(n(8141)),M=N(n(1244));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){R(o,r,a,i,l,"next",e)}function l(e){R(o,r,a,i,l,"throw",e)}i(void 0)}))}}function D(e){var t,n,r=e.transitionState,N=e.onClose,A=(0,m.useUID)(),R=(0,l.useStateFromStores)([f.default],(function(){return f.default.getCurrentUser()})),D=a.useMemo((function(){return I.default.canEditDiscriminator(R)}),[R]),w=a.useState(!1),j=w[0],k=w[1],U=a.useState(R.username),G=U[0],F=U[1],B=a.useState(R.discriminator),H=B[0],x=B[1],V=a.useState(""),W=V[0],Y=V[1],z=a.useState(!1),K=z[0],$=z[1],Z=(0,l.useStateFromStores)([d.default],(function(){return d.default.getErrors()})),q=a.useRef(null),X=a.useMemo((function(){var e,t,n;return null!==(e=null==Z||null===(t=Z.username)||void 0===t?void 0:t[0])&&void 0!==e?e:null==Z||null===(n=Z.discriminator)||void 0===n?void 0:n[0]}),[Z]);a.useEffect((function(){var e;r===g.ModalTransitionState.ENTERED&&(null===(e=q.current)||void 0===e||e.focus())}),[r]);var J=H!==R.discriminator;function Q(){return(Q=L(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),$(!0),e.next=4,(0,u.saveAccountChanges)({username:G,discriminator:D?H:void 0,password:W});case 4:n=e.sent,$(!1),(null==n?void 0:n.ok)&&N();case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ee=a.useMemo((function(){return(0,i.default)(k,50)}),[]),te=a.useCallback((function(){O.default.track(T.AnalyticEvents.PREMIUM_PROMOTION_OPENED,{location_page:T.AnalyticsPages.USER_SETTINGS,location_section:T.AnalyticsSections.SETTINGS_ACCOUNT,location_object:T.AnalyticsObjects.TOOLTIP}),s.default.setSection(T.UserSettingsSections.PREMIUM),N()}),[N]);return P(E.ModalRoot,{transitionState:r,"aria-labelledby":A},void 0,P(E.ModalHeader,{id:A,separator:!1,className:b.default.header},void 0,P(S.default,{color:S.default.Colors.HEADER_PRIMARY,size:S.default.Sizes.SIZE_24,className:b.default.title},void 0,C.default.Messages.USER_SETTINGS_ACCOUNT_CHANGE_USERNAME_TITLE_DESKTOP),P(S.default,{color:S.default.Colors.HEADER_SECONDARY,size:S.default.Sizes.SIZE_16,className:b.default.subtitle},void 0,C.default.Messages.USER_SETTINGS_ACCOUNT_CHANGE_USERNAME_PROMPT_DESKTOP),P(E.ModalCloseButton,{onClick:N,className:b.default.modalCloseButton})),P("form",{onSubmit:function(e){return Q.apply(this,arguments)}},void 0,P(E.ModalContent,{className:b.default.content},void 0,P(_.FormItem,{title:C.default.Messages.FORM_LABEL_USERNAME,error:X},void 0,P("div",{className:(0,o.default)(M.default.input,b.default.multiInput,(t={},t[M.default.error]=null!=X,t[M.default.focused]=j,t))},void 0,P(v.default,{name:"username","aria-label":C.default.Messages.USER_SETTINGS_LABEL_USERNAME,value:G,onChange:F,onFocus:function(){return ee(!0)},onBlur:function(){return ee(!1)},inputRef:q,className:b.default.multiInputFirst,inputClassName:b.default.multiInputField}),P(v.default,{name:"discriminator","aria-label":C.default.Messages.USER_SETTINGS_LABEL_DISCRIMINATOR,maxLength:4,value:H,onChange:x,onFocus:function(){return ee(!0)},onBlur:function(){return ee(!1)},inputPrefix:"#",disabled:!D,className:b.default.multiInputLast,inputClassName:b.default.multiInputField}),D?null:P(y.default,{text:C.default.Messages.PREMIUM_CHANGE_DISCRIMINATOR_TOOLTIP,position:y.default.Positions.BOTTOM},void 0,(function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return P(p.default,{"aria-label":C.default.Messages.PREMIUM_CHANGE_DISCRIMINATOR_TOOLTIP,tag:"span",className:b.default.questionMark,onClick:te,onMouseEnter:t,onMouseLeave:n},void 0,P(h.default,{className:b.default.icon,"aria-hidden":!0}))})))),J?P(S.default,{size:S.default.Sizes.SIZE_12,color:S.default.Colors.HEADER_SECONDARY,className:b.default.discriminatorChangeWarning},void 0,C.default.Messages.PREMIUM_CHANGE_DISCRIMINATOR_WARNING):null,P(_.FormItem,{className:b.default.password,title:C.default.Messages.USER_SETTINGS_LABEL_CURRENT_PASSWORD,error:null==Z||null===(n=Z.password)||void 0===n?void 0:n[0]},void 0,P(v.default,{type:"password",value:W,onChange:Y}))),P(E.ModalFooter,{},void 0,P(c.default,{type:"submit",color:c.default.Colors.BRAND,size:c.default.Sizes.MEDIUM,submitting:K},void 0,C.default.Messages.DONE),P(c.default,{className:b.default.cancel,look:c.default.Looks.LINK,color:c.default.Colors.PRIMARY,onClick:N},void 0,C.default.Messages.CANCEL))))}D.displayName="ChangeUsernameModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(1171),l=_(n(5956)),u=_(n(29)),s=_(n(153)),d=n(85),f=n(131),c=n(35),p=n(217),v=_(n(24)),y=_(n(6)),m=_(n(8143));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function g(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){g(o,r,a,i,l,"next",e)}function l(e){g(o,r,a,i,l,"throw",e)}i(void 0)}))}}function O(e){var t,n,r=e.transitionState,_=e.onClose,h=(0,d.useUID)(),g=a.useState(""),O=g[0],I=g[1],T=a.useState(""),C=T[0],b=T[1],M=a.useState(!1),N=M[0],A=M[1],P=(0,o.useStateFromStores)([l.default],(function(){return l.default.getErrors()})),R=a.useRef(null);function L(){return(L=S(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),A(!0),e.next=4,(0,i.saveAccountChanges)({password:O,newPassword:C});case 4:n=e.sent,A(!1),(null==n?void 0:n.ok)&&_();case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return a.useEffect((function(){var e;r===p.ModalTransitionState.ENTERED&&(null===(e=R.current)||void 0===e||e.focus(),A(!1))}),[r]),E(c.ModalRoot,{transitionState:r,"aria-labelledby":h},void 0,E(c.ModalHeader,{id:h,separator:!1,className:m.default.header},void 0,E(v.default,{color:v.default.Colors.HEADER_PRIMARY,size:v.default.Sizes.SIZE_24,className:m.default.title},void 0,y.default.Messages.USER_SETTINGS_ACCOUNT_CHANGE_PASSWORD_TITLE_DESKTOP),E(v.default,{color:v.default.Colors.HEADER_SECONDARY,size:v.default.Sizes.SIZE_16,className:m.default.subtitle},void 0,y.default.Messages.USER_SETTINGS_ACCOUNT_CHANGE_PASSWORD_PROMPT_DESKTOP),E(c.ModalCloseButton,{onClick:_,className:m.default.modalCloseButton})),E("form",{onSubmit:function(e){return L.apply(this,arguments)}},void 0,E(c.ModalContent,{className:m.default.content},void 0,E(f.FormItem,{title:y.default.Messages.FORM_LABEL_CURRENT_PASSWORD,error:null==P||null===(t=P.password)||void 0===t?void 0:t[0]},void 0,E(s.default,{type:"password",value:O,onChange:I,inputRef:R})),E(f.FormItem,{className:m.default.newPassword,title:y.default.Messages.FORM_LABEL_NEW_PASSWORD,error:null==P||null===(n=P.new_password)||void 0===n?void 0:n[0]},void 0,E(s.default,{type:"password",value:C,onChange:b}))),E(c.ModalFooter,{},void 0,E(u.default,{type:"submit",color:u.default.Colors.BRAND,size:u.default.Sizes.MEDIUM,submitting:N},void 0,y.default.Messages.DONE),E(u.default,{className:m.default.cancel,look:u.default.Looks.LINK,color:u.default.Colors.PRIMARY,onClick:_},void 0,y.default.Messages.CANCEL))))}O.displayName="ChangePasswordModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=L(n(0)),o=P(n(9)),i=P(n(3)),l=P(n(9242)),u=P(n(10483)),s=P(n(11584)),d=P(n(11589)),f=P(n(8650)),c=P(n(8447)),p=n(5831),v=n(11590),y=P(n(10233)),m=P(n(12)),_=P(n(271)),h=L(n(29)),E=P(n(1160)),g=P(n(61)),S=P(n(55)),O=n(131),I=n(41),T=n(10484),C=n(1163),b=n(1),M=P(n(6)),N=P(n(7902)),A=P(n(370));function P(e){return e&&e.__esModule?e:{default:e}}function R(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return R=function(){return e},e}function L(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=R();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function D(){return(D=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}).apply(this,arguments)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(e){var t=e.code,n=t.code,r=t.consumed,o=n.substr(0,4)+"-"+n.substr(4),i=a.useRef(null),l=a.useCallback((function(e){var t;"c"===e.key&&e.metaKey&&C.SUPPORTS_COPY&&(e.preventDefault(),e.stopPropagation(),(0,C.copy)(o),null==i||null===(t=i.current)||void 0===t||t.focus())}),[o]);return j("li",{className:A.default.marginBottom20},void 0,j(g.default,{innerRef:i,className:N.default.backupCode,onKeyDown:l},void 0,j(E.default,{displayOnly:!0,readOnly:!0,className:N.default.codeCheckbox,value:r},void 0,j("span",{className:N.default.code},void 0,o))))}k.displayName="BackupCodeItem";var U=function(e){var t,r;function i(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={revealed:!1,password:""},t.togglePhoneNumberVisibility=function(e){e.preventDefault(),t.setState({revealed:!t.state.revealed})},t.handlePasswordChange=function(e){t.setState({password:e})},t.handleEnableMFA=function(){(0,I.openModal)((function(e){return a.createElement(f.default,D({},e,{handleSubmit:function(e){return l.default.enableMFAStart(e)},onError:function(n){n.code===b.AbortCodes.MFA_INVALID_SECRET&&(e.onClose(),(0,I.openModal)((function(e){return a.createElement(s.default,D({},e,{password:t.state.password,handleEnableMFASuccess:t.handleEnableMFASuccess}))})))},onPasswordChange:t.handlePasswordChange,title:M.default.Messages.TWO_FA_ENABLE,actionText:M.default.Messages.CONTINUE}))}))},t.handleEnableMFASuccess=function(){(0,I.openModal)((function(e){return a.createElement(d.default,e)}),{onCloseRequest:b.NOOP_NULL})},t.handleDisableMFA=function(){l.default.disable()},t.generateBackupCodes=function(){(0,I.openModal)((function(e){return a.createElement(f.default,D({},e,{handleSubmit:function(e){return l.default.viewBackupCodes(e,!0)},title:M.default.Messages.TWO_FA_GENERATE_CODES,actionText:M.default.Messages.TWO_FA_GENERATE_CODES}),M.default.Messages.TWO_FA_GENERATE_CODES_CONFIRM_TEXT)}))},t.viewBackupCodes=function(){(0,I.openModal)((function(e){return a.createElement(f.default,D({},e,{handleSubmit:function(e){return l.default.viewBackupCodes(e)},title:M.default.Messages.TWO_FA_VIEW_BACKUP_CODES,actionText:M.default.Messages.TWO_FA_VIEW_CODES}))}))},t.getDownloadFileContents=function(){var e=t.props.backupCodes.map((function(e){var t=e.consumed,n=e.code;return"* "+n.substr(0,4)+"-"+n.substr(4)+" "+(t?"(used)":"")})).join("\r\n");return M.default.Messages.TWO_FA_DISCORD_BACKUP_CODES.format({email:t.props.currentUser.email})+"\r\n\r\n"+e},t.handleChangePhoneNumber=function(){t.openPhoneVerificationModal()},t.handleEnableSMS=function(){var e=function(){(0,I.openModal)((function(e){return a.createElement(f.default,D({},e,{handleSubmit:l.default.enableSMS,title:M.default.Messages.MFA_SMS_ENABLE}))}))};null==t.props.currentUser.phone?t.openPhoneVerificationModal({onAddedPhone:e}):e()},t.handleDisableSMS=function(){(0,I.openModal)((function(e){return a.createElement(f.default,D({},e,{handleSubmit:l.default.disableSMS,title:M.default.Messages.MFA_SMS_REMOVE}),M.default.Messages.MFA_SMS_CONFIRM_REMOVE_BODY)}))},t}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,w(t,r);var y=i.prototype;return y.maskPhoneNumber=function(e){return null==e?"":""+"*".repeat(e.length-4)+e.slice(-4)},y.renderMFASMS=function(){var e,t,n=this.state.revealed,r=this.props,a=r.currentUser,o=r.togglingSMS,i=null!=a.phone,l=a.hasFlag(b.UserFlags.MFA_SMS);if(i||l){var u=n?a.phone:this.maskPhoneNumber(a.phone);t=j(O.FormText,{type:O.FormText.Types.DESCRIPTION,className:A.default.marginBottom8},void 0,M.default.Messages.MFA_SMS_AUTH_CURRENT_PHONE.format({phoneNumber:u}),j(_.default,{onClick:this.togglePhoneNumberVisibility,className:N.default.phoneRevealer},void 0,n?M.default.Messages.MFA_SMS_PHONE_NUMBER_HIDE:M.default.Messages.MFA_SMS_PHONE_NUMBER_REVEAL))}if(l)e=j(S.default,{className:i?"":A.default.marginTop8},void 0,j(h.default,{color:h.default.Colors.RED,look:h.default.Looks.OUTLINED,size:h.default.Sizes.SMALL,submitting:o,onClick:this.handleDisableSMS},void 0,M.default.Messages.MFA_SMS_REMOVE));else{var s=(0,v.getSMSBackupDisabledMessage)(a);e=j(S.default,{className:i?"":A.default.marginTop8},void 0,j(h.default,{onClick:this.handleEnableSMS,size:h.default.Sizes.SMALL,submitting:o,disabled:null!=s},void 0,null!=s?s:M.default.Messages.MFA_SMS_ENABLE),i?j(h.default,{onClick:this.handleChangePhoneNumber,color:h.default.Colors.PRIMARY,size:h.default.Sizes.SMALL,look:h.default.Looks.LINK},void 0,M.default.Messages.CHANGE_PHONE_NUMBER):null)}return j(O.FormSection,{className:A.default.marginTop40,title:M.default.Messages.MFA_SMS_AUTH},void 0,j(O.FormText,{type:O.FormText.Types.DESCRIPTION},void 0,M.default.Messages.MFA_SMS_AUTH_SALES_PITCH),t,e)},y.renderEnabled=function(){var e,t=this.props.backupCodes,r=j(h.default,{onClick:this.viewBackupCodes,size:h.default.Sizes.SMALL},void 0,M.default.Messages.TWO_FA_VIEW_BACKUP_CODES);if(t.length){r=j(u.default,{fileContents:this.getDownloadFileContents,contentType:"text/plain",fileName:"discord_backup_codes.txt",className:(0,o.default)(N.default.btn,N.default.btnPrimary)},void 0,j(h.default,{size:h.default.Sizes.SMALL},void 0,M.default.Messages.TWO_FA_DOWNLOAD_CODES));var a=function(e){return e.map((function(e){return j(k,{code:e},e.code)}))};e=j(O.FormSection,{title:M.default.Messages.TWO_FA_BACKUP_CODES_LABEL},void 0,j(O.FormText,{type:O.FormText.Types.DESCRIPTION,className:A.default.marginBottom20},void 0,M.default.Messages.TWO_FA_BACKUP_CODES_BODY.format()),j(S.default,{},void 0,j(S.default.Child,{},void 0,j("ul",{className:N.default.checkboxGroup},void 0,a(t.slice(0,t.length/2)))),j(S.default.Child,{},void 0,j("ul",{className:N.default.checkboxGroup},void 0,a(t.slice(t.length/2))))),j("div",{},void 0,j(h.default,{onClick:this.generateBackupCodes,look:h.ButtonLooks.LINK,size:h.ButtonSizes.MIN},void 0,M.default.Messages.TWO_FA_GENERATE_CODES)),j(O.FormDivider,{className:A.default.marginTop20}))}return j(O.FormSection,{},void 0,j(O.FormTitle,{className:(0,o.default)(N.default.isEnabled,A.default.marginTop4,A.default.marginBottom8)},void 0,j("img",{alt:"",className:(0,o.default)(N.default.lockIcon),src:n(11591)}),M.default.Messages.TWO_FA_ENABLED),j(O.FormText,{type:O.FormText.Types.DESCRIPTION,className:A.default.marginBottom20},void 0,M.default.Messages.TWO_FA_DESCRIPTION),j(S.default,{justify:S.default.Justify.START,className:A.default.marginBottom20},void 0,j(S.default.Child,{wrap:!0,grow:0},void 0,r),j(S.default.Child,{wrap:!0},void 0,j(h.default,{onClick:this.handleDisableMFA,size:h.default.Sizes.SMALL,color:h.ButtonColors.RED,look:h.ButtonLooks.OUTLINED},void 0,M.default.Messages.TWO_FA_REMOVE))),e,this.renderMFASMS())},y.renderDisabled=function(){return j(O.FormSection,{title:M.default.Messages.TWO_FA},void 0,j(O.FormText,{type:O.FormText.Types.DESCRIPTION,className:A.default.marginBottom20},void 0,M.default.Messages.TWO_FA_SALES_PITCH),j(O.FormItem,{},void 0,j(h.default,{onClick:this.handleEnableMFA,size:h.ButtonSizes.SMALL},void 0,M.default.Messages.TWO_FA_ENABLE)))},y.render=function(){var e=this.props.currentUser;return T.hasCrypto?e.verified?e.mfaEnabled?this.renderEnabled():this.renderDisabled():j(O.FormSection,{title:M.default.Messages.TWO_FA},void 0,j(O.FormText,{type:O.FormText.Types.DESCRIPTION},void 0,M.default.Messages.TWO_FA_NOT_VERIFIED)):j(O.FormSection,{title:M.default.Messages.TWO_FA},void 0,j(O.FormText,{type:O.FormText.Types.DESCRIPTION},void 0,M.default.Messages.TWO_FA_USE_DESKTOP_APP))},y.openPhoneVerificationModal=function(e){void 0===e&&(e={}),(0,I.openModal)((function(t){return a.createElement(c.default,D({},t,e))}),{modalKey:p.PHONE_VERIFICATION_MODAL_KEY})},i}(a.PureComponent);U.displayName="TwoFactorAuth";var G=i.default.connectStores([m.default,y.default],(function(){return{currentUser:m.default.getCurrentUser(),togglingSMS:y.default.togglingSMS}}))(U);t.default=G},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(8)),i=S(n(9242)),l=S(n(1190)),u=S(n(12)),s=S(n(29)),d=S(n(55)),f=S(n(153)),c=S(n(1165)),p=S(n(474)),v=S(n(159)),y=n(35),m=S(n(47)),_=S(n(24)),h=n(10484),E=S(n(6)),g=S(n(8144));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var C=function(e){var t=e.image,n=e.label,r=e.text,a=e.children;return T(d.default,{className:g.default.spacing},void 0,T(d.default,{grow:0,shrink:0,basis:"156px",justify:d.default.Justify.CENTER,className:g.default.image},void 0,t),T(d.default,{direction:d.default.Direction.VERTICAL,justify:d.default.Justify.CENTER},void 0,T("div",{},void 0,T(v.default,{tag:v.default.Tags.H5,className:g.default.headerSpacing},void 0,n),T(p.default,{type:p.default.Types.DESCRIPTION},void 0,r),a)))};C.displayName="ModalSection";var b=function(e){var t,r;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).headerID=o.default.uniqueId(),t.state={code:"",totpSecret:(0,h.generateTotpSecret)(),error:null,isVerifying:!1},t.handleCodeChange=function(e){t.setState({code:e})},t.handleActivate=function(e){e.preventDefault();var n=t.props.password,r=t.state,a=r.totpSecret,o=r.code;t.setState({isVerifying:!0}),i.default.enable({password:n,code:o,secret:(0,h.encodeTotpSecret)(a)}).then(t.handleActivateSuccess,(function(e){return t.setState({error:e.body.message,isVerifying:!1})}))},t.handleActivateSuccess=function(){var e=t.props,n=e.onClose,r=e.handleEnableMFASuccess;t.setState({isVerifying:!1}),null!=n&&n(),r()},t}return r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,I(t,r),a.prototype.render=function(){var e=this.props,t=e.transitionState,r=e.onClose,a=this.state,o=a.totpSecret,i=a.code,p=a.isVerifying,S=u.default.getCurrentUser().email,O=(0,h.encodeTotpSecretAsUrl)(null!=S?S:"",o),I=T("form",{onSubmit:this.handleActivate},void 0,T(d.default,{className:g.default.inputContainer,align:d.default.Align.START},void 0,T(f.default,{value:i,className:g.default.input,placeholder:"000 000",maxLength:7,autoComplete:"off",onChange:this.handleCodeChange,error:this.state.error,autoFocus:!0}),T(d.default.Child,{grow:0,shrink:0},void 0,T(s.default,{type:"submit",submitting:p},void 0,E.default.Messages.TWO_FA_ACTIVATE))));return T(y.ModalRoot,{"aria-labelledby":this.headerID,transitionState:t,size:y.ModalSize.DYNAMIC,className:g.default.customWidth},void 0,T(y.ModalHeader,{separator:!1},void 0,T(d.default.Child,{grow:1,shrink:1},void 0,T(m.default,{tag:m.default.Tags.H2,size:m.default.Sizes.SIZE_20},void 0,E.default.Messages.TWO_FA_ENABLE),T(_.default,{size:_.default.Sizes.SIZE_12,className:g.default.subHeader},void 0,E.default.Messages.TWO_FA_ENABLE_SUBHEADER)),T(d.default.Child,{grow:0},void 0,T(y.ModalCloseButton,{onClick:r}))),T(y.ModalContent,{},void 0,T(C,{image:T("img",{alt:"",src:n(11587),width:100,height:100}),label:E.default.Messages.TWO_FA_DOWNLOAD_APP_LABEL,text:E.default.Messages.TWO_FA_DOWNLOAD_APP_BODY.format({googleAuthURL:"https://support.google.com/accounts/answer/1066447?hl=en",authyURL:"https://www.authy.com/"})}),T(c.default,{className:g.default.divider}),T(C,{image:T(l.default,{text:O}),label:E.default.Messages.TWO_FA_QR_LABEL,text:E.default.Messages.TWO_FA_QR_BODY},void 0,T("div",{className:g.default.topSpacing},void 0,T(v.default,{tag:v.default.Tags.H5,className:g.default.headerSpacing},void 0,E.default.Messages.TWO_FA_KEY),T(_.default,{size:_.default.Sizes.SIZE_16,className:g.default.secret,selectable:!0},void 0,o))),T(c.default,{className:g.default.divider}),T(C,{image:T("img",{alt:"",src:n(11588)}),label:E.default.Messages.TWO_FA_LOGIN_LABEL,text:E.default.Messages.TWO_FA_LOGIN_BODY},void 0,I)))},a}(a.PureComponent);b.displayName="MFAEnable";var M=b;t.default=M},,,function(e,t,n){e.exports=n.p+"0b8465d21b4c248c18f7e0a44fda86cc.png"},function(e,t,n){e.exports=n.p+"cdec1a78913423b428eb0013e9678244.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=M(n(3)),i=M(n(9242)),l=M(n(10483)),u=M(n(8447)),s=M(n(8295)),d=n(5831),f=M(n(10233)),c=M(n(12)),p=M(n(29)),v=M(n(55)),y=n(85),m=M(n(1165)),_=M(n(159)),h=n(466),E=n(35),g=n(41),S=M(n(47)),O=M(n(24)),I=M(n(8650)),T=n(1),C=M(n(6)),b=M(n(8145));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(){return(P=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}).apply(this,arguments)}function R(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var L=function(e){var t=e.label,n=e.text,r=e.children,o=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["label","text","children"]);return a.createElement(v.default,P({direction:v.default.Direction.VERTICAL},o),R(_.default,{tag:_.default.Tags.H2},void 0,t),null!=n?R(O.default,{size:O.default.Sizes.SIZE_16,className:b.default.sectionBody},void 0,n):null,R(v.default.Child,{wrap:!0},void 0,r))};L.displayName="ModalSection";var D=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={didAddBackup:!1,showConfirmModal:!1},t.headerId=(0,y.uid)(),t.handleCloseModal=function(){var e=t.props,n=e.onClose,r=e.currentUser,a=t.state.didAddBackup,o=r.hasFlag(T.UserFlags.MFA_SMS);a||o?n&&n():t.setState({showConfirmModal:!0})},t.getDownloadFileContents=function(){var e=t.props.backupCodes.map((function(e){var t=e.consumed,n=e.code;return"* "+n.substr(0,4)+"-"+n.substr(4)+" "+(t?"("+C.default.Messages.TWO_FA_BACKUP_CODE_USED+")":"")})).join("\r\n");return C.default.Messages.TWO_FA_DISCORD_BACKUP_CODES.format({email:t.props.currentUser.email})+"\r\n\r\n"+e},t.handleChangePhoneNumber=function(){t.openPhoneVerificationModal()},t.handleEnableSMS=function(){var e=function(){(0,g.openModal)((function(e){return a.createElement(I.default,P({},e,{handleSubmit:function(e){return t.setState({didAddBackup:!0}),i.default.enableSMS(e)},title:C.default.Messages.MFA_SMS_ENABLE}))}))};null==t.props.currentUser.phone?t.openPhoneVerificationModal({onAddedPhone:e}):e()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var o=r.prototype;return o.renderSMSSection=function(){var e=this.props.currentUser,t=null!=this.props.currentUser.phone,n=e.hasFlag(T.UserFlags.MFA_SMS),r=e.hasFlag(T.UserFlags.PARTNER)||e.hasFlag(T.UserFlags.STAFF);return t?R(L,{label:C.default.Messages.MFA_SMS_ENABLE,text:C.default.Messages.MFA_SMS_AUTH_SALES_PITCH},void 0,R(O.default,{size:O.default.Sizes.SIZE_16,className:b.default.sectionBody},void 0,R("strong",{className:b.default.phoneNumber},void 0,C.default.Messages.MFA_SMS_AUTH_CURRENT_PHONE.format({phoneNumber:e.phone})),R(p.default,{look:p.default.Looks.LINK,color:p.default.Colors.LINK,size:p.default.Sizes.MIN,className:b.default.linkButton,onClick:this.handleChangePhoneNumber},void 0,C.default.Messages.CHANGE_PHONE_NUMBER)),R(p.default,{onClick:this.handleEnableSMS,disabled:n||r,color:p.default.Colors.GREEN,size:p.default.Sizes.SMALL},void 0,r?C.default.Messages.MFA_SMS_DISABLED_PARTNER:n?C.default.Messages.MFA_SMS_ALREADY_ENABLED:C.default.Messages.MFA_SMS_ENABLE)):R(L,{label:C.default.Messages.MFA_SMS_ENABLE,text:C.default.Messages.MFA_SMS_AUTH_SALES_PITCH},void 0,R(p.default,{onClick:this.handleEnableSMS,color:p.default.Colors.GREEN,size:p.default.Sizes.SMALL,disabled:r},void 0,r?C.default.Messages.MFA_SMS_DISABLED_PARTNER:C.default.Messages.MFA_SMS_ADD_PHONE))},o.renderBackupCodesSection=function(){var e=this;return R(L,{label:C.default.Messages.TWO_FA_DOWNLOAD_CODES,text:C.default.Messages.TWO_FA_BACKUP_CODES_WARNING.format()},void 0,R(l.default,{fileContents:this.getDownloadFileContents,contentType:"text/plain",fileName:"discord_backup_codes.txt",onDownload:function(){return e.setState({didAddBackup:!0})}},void 0,R(p.default,{color:p.default.Colors.GREEN,size:p.default.Sizes.SMALL},void 0,C.default.Messages.TWO_FA_DOWNLOAD_CODES)))},o.renderHeader=function(){return R(E.ModalHeader,{separator:!1,id:this.headerId},void 0,R(v.default.Child,{grow:1,shrink:1},void 0,R(S.default,{tag:S.default.Tags.H2,size:S.default.Sizes.SIZE_20,className:b.default.header},void 0,s.default.parse(C.default.Messages.TWO_FA_SUCCESS_HEADER)),R(O.default,{size:O.default.Sizes.SIZE_12,className:b.default.subHeader},void 0,C.default.Messages.MFA_SMS_ENABLE_SHOULD_DO.format())),R(v.default.Child,{grow:0},void 0,R(E.ModalCloseButton,{onClick:this.handleCloseModal})))},o.renderConfirmModal=function(){var e=this,t=this.props.onClose;return R(h.DeclarativeConfirmModal,{dismissable:!0,header:C.default.Messages.TWO_FA_CONFIRM_TITLE,confirmText:C.default.Messages.TWO_FA_CONFIRM_CONFIRM,cancelText:C.default.Messages.CANCEL,onCancel:function(){return e.setState({showConfirmModal:!1})},onConfirm:t},void 0,R(O.default,{size:O.default.Sizes.SIZE_16,color:O.default.Colors.STANDARD},void 0,C.default.Messages.TWO_FA_CONFIRM_BODY))},o.render=function(){var e=this.props.transitionState,t=this.state.showConfirmModal;return R(E.ModalRoot,{transitionState:e,className:b.default.modal,"aria-labelledby":this.headerId},void 0,this.renderHeader(),R(E.ModalContent,{className:b.default.modalInner},void 0,this.renderSMSSection(),R(m.default,{className:b.default.divider}),this.renderBackupCodesSection()),t&&this.renderConfirmModal())},o.openPhoneVerificationModal=function(e){void 0===e&&(e={}),(0,g.openModal)((function(t){return a.createElement(u.default,P({},t,e))}),{modalKey:d.PHONE_VERIFICATION_MODAL_KEY})},r}(a.PureComponent);D.displayName="MFAEnableSuccess";var w=o.default.connectStores([c.default,f.default],(function(){return{currentUser:c.default.getCurrentUser(),backupCodes:f.default.getBackupCodes()}}))(D);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSMSBackupDisabledMessage=function(e){if(e.hasFlag(a.UserFlags.STAFF)||e.hasFlag(a.UserFlags.PARTNER))return o.default.Messages.MFA_SMS_DISABLED_PARTNER;if(null==e.email)return o.default.Messages.MFA_SMS_DISABLED_NO_EMAIL;return null};var r,a=n(1),o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){e.exports=n.p+"acea8fd38500a12d0509c027a274caaa.svg"},function(e,t,n){e.exports=n.p+"0694f38cb0b10cc3b5b89366a0893768.svg"},function(e,t,n){e.exports=n.p+"d367b6d89c7688783cd3287f485484b6.svg"},function(e,t,n){e.exports=n.p+"cdea41ede63f61153e4a3c0531fa3873.svg"},function(e,t,n){e.exports=n.p+"f8696a3854655998a24c219403420867.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=M;var r,a=T(n(0)),o=n(3),i=T(n(8786)),l=O(n(274)),u=O(n(120)),s=O(n(39)),d=O(n(1167)),f=O(n(8267)),c=n(131),p=O(n(466)),v=n(41),y=O(n(24)),m=O(n(16)),_=n(1163),h=O(n(43)),E=O(n(11597)),g=n(1),S=O(n(6));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(){return(C=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}).apply(this,arguments)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(){var e=a.useState((function(){return h.default.getEnableHardwareAcceleration()}))[0],t=(0,o.useStateFromStoresObject)([s.default,d.default,u.default],(function(){return{developerMode:s.default.developerMode,hasLibraryApplication:u.default.hasLibraryApplication(),disableLibrary:s.default.disableGamesTab,testModeApplicationId:d.default.testModeApplicationId}})),n=t.developerMode,r=t.hasLibraryApplication,O=t.disableLibrary,I=t.testModeApplicationId,T=a.useCallback((function(e){l.default.updateRemoteSettings({developerMode:e})}),[]),M=a.useCallback((function(e){l.default.updateRemoteSettings({disableGamesTab:!e})}),[]),N=a.useCallback((function(e){e?(0,v.openModal)((function(e){return a.createElement(E.default,e)})):i.reset()}),[]),A=a.useCallback((function(e){(0,v.openModal)((function(t){return a.createElement(p.default,C({header:S.default.Messages.SWITCH_HARDWARE_ACCELERATION,confirmText:S.default.Messages.OKAY,cancelText:S.default.Messages.CANCEL,onConfirm:function(){return h.default.setEnableHardwareAcceleration(e)}},t),b(y.default,{},void 0,S.default.Messages.SWITCH_HARDWARE_ACCELERATION_BODY))}))}),[]);return b(c.FormSection,{tag:c.FormTitleTags.H1,title:S.default.Messages.SETTINGS_ADVANCED},void 0,_.SUPPORTS_COPY&&b(f.default,{value:n,onChange:T,note:S.default.Messages.DEVELOPER_MODE_HELP_TEXT.format({apiDocsUrl:g.MarketingURLs.API_DOCS})},void 0,S.default.Messages.DEVELOPER_MODE),m.default.embedded&&b(f.default,{value:e,onChange:A,note:S.default.Messages.HARDWARE_ACCELERATION_HELP_TEXT},void 0,S.default.Messages.HARDWARE_ACCELERATION),r&&b(f.default,{value:!O,onChange:M,note:S.default.Messages.USER_SETTINGS_SHOW_LIBRARY_NOTE},void 0,S.default.Messages.USER_SETTINGS_SHOW_LIBRARY),n&&b(f.default,{value:null!=I,note:S.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_NOTE,onChange:N},void 0,S.default.Messages.DEVELOPER_APPLICATION_TEST_MODE))}M.displayName="UserSettingsAdvanced"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=I(n(0)),o=n(3),i=S(n(2)),l=I(n(8786)),u=S(n(1359)),s=S(n(1167)),d=S(n(29)),f=S(n(55)),c=S(n(1164)),p=S(n(153)),v=n(85),y=n(131),m=n(35),_=n(374),h=S(n(6)),E=S(n(8146)),g=S(n(370));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function T(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function C(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){C(o,r,a,i,l,"next",e)}function l(e){C(o,r,a,i,l,"throw",e)}i(void 0)}))}}var M,N=/^\d+$|^$/;function A(e,t,n){if(null==e)return null;switch(e){case M.LOCALHOST:return"https://localhost:"+t;case M.PROXY:return(0,u.default)(n)}}function P(e){var t=e.onClose,n=e.transitionState,r=(0,o.useStateFromStoresObject)([s.default],(function(){return{authorizedApplicationId:s.default.testModeApplicationId,authorizationError:s.default.error,authorizing:s.default.isFetchingAuthorization}})),u=r.authorizedApplicationId,S=r.authorizationError,O=r.authorizing,I=a.useState(null!=u?u:""),C=I[0],P=I[1],R=a.useState(""),L=R[0],D=R[1],w=a.useState(null),j=w[0],k=w[1],U=(0,v.useUID)(),G=N.test(C);function F(){return(F=b(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.resetError(),n=A(j,L,C),e.next=4,l.authorizeAndSetTestModeApplication(C,n);case 4:e.sent&&t();case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}a.useEffect((function(){return function(){return i.default.wait((function(){return l.resetError()}))}}),[]);var B=null!=u&&u===C,H=B?function(){l.reset(),P(""),k(null)}:function(){return F.apply(this,arguments)};return T(m.ModalRoot,{"aria-labelledby":U,transitionState:n},void 0,T(m.ModalHeader,{justify:f.default.Justify.BETWEEN,separator:!1},void 0,T(y.FormTitle,{id:U,tag:y.FormTitle.Tags.H1,className:g.default.marginReset},void 0,h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_MODAL_HEADER),T(m.ModalCloseButton,{onClick:t})),T(m.ModalContent,{className:E.default.modalContent},void 0,T(y.FormText,{className:g.default.marginBottom20,type:y.FormText.Types.DESCRIPTION},void 0,h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_MODAL_BODY),null==S?null:T(c.default,{className:g.default.marginBottom20},void 0,S),T("form",{onSubmit:function(e){e.preventDefault(),H()}},void 0,T(f.default,{direction:f.default.Direction.VERTICAL,align:f.default.Align.START},void 0,T(y.FormItem,{className:E.default.inputWrapper,title:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_PLACEHOLDER,required:!0},void 0,T(p.default,{value:C,maxLength:19,error:G?null:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_INVALID,onChange:function(e){P(e)},disabled:O})),T(y.FormItem,{className:E.default.inputWrapper,title:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_ORIGIN_LABEL},void 0,T(_.SingleSelect,{isDisabled:!G||""===C,value:j,options:[{value:M.LOCALHOST,label:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_LOCALHOST_OPTION,key:"localhost"},{value:M.PROXY,label:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_PROXY_OPTION,key:"proxy"}],onChange:function(e){k(e)},placeholder:"URL Origin Type"})),j!==M.LOCALHOST?null:T(y.FormItem,{className:E.default.inputWrapper,title:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_PORT_NUMBER_LABEL,required:!0},void 0,T(p.default,{value:L,maxLength:5,onChange:function(e){return D(e)},disabled:O})),T(d.default,{submitting:O,type:"submit",disabled:!G||0===C.length||j===M.LOCALHOST&&0===L.length,color:B?d.default.Colors.RED:d.default.Colors.GREEN},void 0,B?h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_CLEAR:h.default.Messages.DEVELOPER_APPLICATION_TEST_MODE_ACTIVATE)))))}!function(e){e.LOCALHOST="localhost",e.PROXY="proxy"}(M||(M={})),P.displayName="TextModeModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=L(n(9)),i=L(n(3)),l=L(n(274)),u=L(n(473)),s=L(n(403)),d=n(285),f=L(n(105)),c=n(1254),p=n(297),v=L(n(1263)),y=n(682),m=L(n(8975)),_=n(1348),h=L(n(39)),E=L(n(467)),g=L(n(55)),S=L(n(8496)),O=L(n(1162)),I=L(n(8360)),T=L(n(8267)),C=n(131),b=L(n(24)),M=L(n(16)),N=n(1),A=L(n(6)),P=L(n(8147)),R=L(n(370));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(){return(k=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}).apply(this,arguments)}var U="cozy",G="compact",F=function(e){var t=0;return[(0,p.createMessageRecord)(k({},(0,v.default)("1337",A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_1),{state:N.MessageStates.SENT,id:""+t++})),(0,p.createMessageRecord)(k({},(0,v.default)("1337",e===N.ThemeTypes.DARK?A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_2_DARK:A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_2_LIGHT),{state:N.MessageStates.SENT,id:""+t++})),(0,p.createMessageRecord)(k({},(0,v.default)("1337",A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_3),{state:N.MessageStates.SENT,id:""+t++})),(0,p.createMessageRecord)(k({},(0,v.default)("1337",A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_4),{state:N.MessageStates.SENT,id:""+t++})),(0,p.createMessageRecord)(k({},(0,v.default)("1337",A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_5),{state:N.MessageStates.SENT,id:"4"}))]},B=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).darkMessages=F(N.ThemeTypes.DARK),t.lightMessages=F(N.ThemeTypes.LIGHT),t.handleThemeChange=function(e){var t=e.value;"system"!==t&&l.default.updateRemoteSettings({theme:t}),l.default.updateLocalSettings({useSystemTheme:"system"===t?_.SystemThemeState.ON:_.SystemThemeState.OFF})},t.handleMessageDisplayModeChange=function(e){var t=e.value;l.default.updateRemoteSettings({messageDisplayCompact:t===G}),(0,d.setMessageGroupSpacing)()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,j(t,n);var i=r.prototype;return i.getPreviewMessage=function(e){return e===N.ThemeTypes.DARK?A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_2_DARK:A.default.Messages.USER_SETTINGS_APPEARANCE_PREVIEW_MESSAGE_2_LIGHT},i.renderZoomSlider=function(){return M.default.embedded?w(C.FormItem,{title:A.default.Messages.ACCESSIBILITY_ZOOM_LEVEL_LABEL,className:R.default.marginTop20},void 0,w(I.default,{className:(0,o.default)(R.default.marginTop20,R.default.marginBottom4),initialValue:this.props.zoom,defaultValue:N.Accessibility.ZOOM_DEFAULT,markers:N.Accessibility.ZOOM_SCALES,stickToMarkers:!0,onValueChange:this.handleZoomChange,onValueRender:this.handleSliderRender}),w(C.FormText,{type:C.FormText.Types.DESCRIPTION},void 0,A.default.Messages.USER_SETTINGS_APPEARANCE_ZOOM_TIP.format({modKey:s.default.modKey}))):null},i.renderFontScaleSlider=function(){return w(C.FormItem,{title:A.default.Messages.ACCESSIBILITY_FONT_SCALING_LABEL,className:R.default.marginTop20},void 0,w(g.default,{align:g.default.Align.CENTER},void 0,w(I.default,{className:(0,o.default)(R.default.marginTop20,R.default.marginBottom4),initialValue:this.props.fontSize,defaultValue:N.Accessibility.FONT_SIZE_DEFAULT,markers:N.Accessibility.FONT_SIZES,stickToMarkers:!0,onValueChange:this.handleFontSizeChange,onValueRender:this.handleSliderRenderPX,onMarkerRender:this.handleSliderRenderPX})))},i.renderMessageGroupSpacingSlider=function(){var e=this.props,t=e.messageDisplayCompact,n=e.messageGroupSpacing;return w(C.FormItem,{title:A.default.Messages.ACCESSIBILITY_MESSAGE_GROUP_SPACING,className:R.default.marginTop20},void 0,w(I.default,{className:(0,o.default)(R.default.marginTop20,R.default.marginBottom4),initialValue:n,defaultValue:t?c.DEFAULT_COMPACT_SPACING:c.DEFAULT_COZY_SPACING,markers:c.MESSAGE_GROUP_SPACING,stickToMarkers:!0,onValueChange:this.handleMessageSpacingChange,onValueRender:this.handleSliderRenderPX,onMarkerRender:this.handleSliderRenderPX}))},i.renderPreview=function(){var e=this.props,t=e.messageDisplayCompact,n=e.theme,r=e.messageGroupSpacing,a=e.renderMediaEmbeds,i=n===N.ThemeTypes.DARK?this.darkMessages:this.lightMessages;return w(S.default,{},void 0,w(E.default,{className:(0,o.default)(P.default.preview,t?P.default.compactPreview:void 0,"group-spacing-"+(null!=r?r:t?c.DEFAULT_COMPACT_SPACING:c.DEFAULT_COZY_SPACING)),outline:!0,"aria-hidden":!0},void 0,i.map((function(e,n){return w(m.default,{author:(0,y.getMessageAuthor)(e),message:e,compact:t,isGroupStart:n%2==0,className:0===n?P.default.firstMessage:void 0,renderMediaEmbeds:a},e.id)}))))},i.renderTheme=function(){var e=this.props,t=e.theme,n=e.useSystemTheme,r=e.darkSidebar;return w(C.FormItem,{title:A.default.Messages.THEME,className:R.default.marginTop40},void 0,w(O.default,{options:[{name:A.default.Messages.THEME_DARK,value:N.ThemeTypes.DARK},{name:A.default.Messages.THEME_LIGHT,value:N.ThemeTypes.LIGHT},{name:A.default.Messages.THEME_SYSTEM,value:"system"}],onChange:this.handleThemeChange,value:n===_.SystemThemeState.ON?"system":t}),w(T.default,{value:r&&t===N.ThemeTypes.LIGHT,disabled:t!==N.ThemeTypes.LIGHT,onChange:this.handleDarkSidebarChecked,className:R.default.marginTop20},void 0,A.default.Messages.ACCESSIBILITY_DARK_SIDEBAR))},i.renderDisplayMode=function(){return w(C.FormItem,{title:A.default.Messages.MESSAGE_DISPLAY_MODE_LABEL,className:R.default.marginTop8},void 0,w(O.default,{options:[{name:A.default.Messages.COZY_MODE,value:U},{name:A.default.Messages.COMPACT_MODE,value:G}],onChange:this.handleMessageDisplayModeChange,value:this.props.messageDisplayCompact?G:U}))},i.handleDarkSidebarChecked=function(){(0,d.toggleDarkSidebar)()},i.renderScalingAndSpacing=function(){return a.createElement(a.Fragment,null,this.renderFontScaleSlider(),this.renderMessageGroupSpacingSlider(),this.renderZoomSlider(),w(C.FormDivider,{className:R.default.marginTop20}))},i.render=function(){return w(C.FormSection,{tag:C.FormTitleTags.H1,title:A.default.Messages.APPEARANCE},void 0,this.renderPreview(),this.renderTheme(),this.renderDisplayMode(),w(C.FormDivider,{className:R.default.marginTop20}),this.renderScalingAndSpacing(),w(b.default,{size:b.default.Sizes.SIZE_16,className:R.default.marginTop20},void 0,A.default.Messages.APPEARANCE_SETTINGS_ACCESSIBILITY_LINK.format({onAccessibilityClick:function(){u.default.open(N.UserSettingsSections.ACCESSIBILITY)}})))},i.handleSliderRender=function(e){return e.toFixed(0)+"%"},i.handleSliderRenderPX=function(e){return e.toFixed(0)+"px"},i.handleFontSizeChange=function(e){(0,d.setFontSize)(e)},i.handleMessageSpacingChange=function(e){switch(e){case 0:case 4:case 8:case 16:case 24:(0,d.setMessageGroupSpacing)(e)}},i.handleZoomChange=function(e){(0,d.setZoom)(e)},r}(a.Component);B.displayName="UserSettingsAppearance";var H=i.default.connectStores([h.default,f.default],(function(){return{theme:h.default.theme,useSystemTheme:h.default.useSystemTheme,darkSidebar:f.default.darkSidebar,messageDisplayCompact:h.default.messageDisplayCompact,fontSize:f.default.fontSize,zoom:f.default.zoom,messageGroupSpacing:f.default.messageGroupSpacing,renderMediaEmbeds:h.default.inlineEmbedMedia&&h.default.renderEmbeds}}))(B);t.default=H},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=A(n(0)),o=M(n(9)),i=A(n(3)),l=M(n(11600)),u=M(n(8316)),s=M(n(218)),d=n(1297),f=M(n(294)),c=M(n(9152)),p=M(n(160)),v=M(n(39)),y=A(n(29)),m=A(n(467)),_=A(n(8302)),h=M(n(55)),E=M(n(151)),g=n(131),S=n(41),O=M(n(150)),I=n(1),T=M(n(6)),C=M(n(8148)),b=M(n(370));function M(e){return e&&e.__esModule?e:{default:e}}function N(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}function A(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function P(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(){return(R=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}).apply(this,arguments)}var L=i.default.connectStores([v.default],(function(){return{theme:v.default.theme}}))(_.default),D=function(e){var t,n,r=e.scopes,i=e.application,l=e.onDelete,u=function(){return(0,S.openModal)((function(e){return a.createElement(s.default,R({title:T.default.Messages.DEAUTHORIZE_APP,body:T.default.Messages.DELETE_APP_CONFIRM_MSG,confirmText:T.default.Messages.DEAUTHORIZE,cancelText:T.default.Messages.CANCEL,onConfirm:l},e))}))};return P(m.default,{className:(0,o.default)(C.default.authedApp,b.default.marginBottom8),outline:!0},void 0,(t=O.default.getApplicationIconURL({id:i.id,icon:i.icon}),n=t?P(h.default.Child,{className:C.default.appAvatar,grow:0},void 0,P("img",{src:t,alt:""})):null,P(h.default,{className:(0,o.default)(C.default.header,b.default.marginBottom20)},void 0,P(h.default,{className:C.default.headerInfo},void 0,n,P(h.default.Child,{},void 0,P(g.FormText,{type:g.FormTextTypes.LABEL_BOLD},void 0,P("span",{},void 0,i.name)))),P(h.default.Child,{wrap:!0,grow:0},void 0,P(y.default,{className:C.default.deleteApp,color:y.ButtonColors.RED,look:y.ButtonLooks.OUTLINED,size:y.ButtonSizes.SMALL,onClick:u},void 0,T.default.Messages.DEAUTHORIZE)))),function(){if(i.description)return P(g.FormItem,{faded:!0,title:T.default.Messages.ABOUT_THIS_APP},void 0,P(g.FormText,{},void 0,i.description))}(),function(){var e=r.map((function(e){var t;switch(e){case I.OAuth2Scopes.IDENTIFY:t=T.default.Messages.SCOPE_IDENTIFY;break;case I.OAuth2Scopes.EMAIL:t=T.default.Messages.SCOPE_EMAIL;break;case I.OAuth2Scopes.CONNECTIONS:t=T.default.Messages.SCOPE_CONNECTIONS;break;case I.OAuth2Scopes.GUILDS:t=T.default.Messages.SCOPE_GUILDS;break;case I.OAuth2Scopes.GUILDS_JOIN:t=T.default.Messages.SCOPE_GUILDS_JOIN;break;case I.OAuth2Scopes.GDM_JOIN:t=T.default.Messages.SCOPE_GDM_JOIN;break;case I.OAuth2Scopes.BOT:t=T.default.Messages.SCOPE_BOT;break;case I.OAuth2Scopes.RPC:t=T.default.Messages.SCOPE_RPC;break;case I.OAuth2Scopes.RPC_NOTIFICATIONS_READ:t=T.default.Messages.SCOPE_RPC_NOTIFICATIONS_READ;break;case I.OAuth2Scopes.RPC_VOICE_WRITE:t=T.default.Messages.SCOPE_RPC_VOICE_WRITE;break;case I.OAuth2Scopes.RPC_VOICE_READ:t=T.default.Messages.SCOPE_RPC_VOICE_READ;break;case I.OAuth2Scopes.RPC_ACTIVITIES_WRITE:t=T.default.Messages.SCOPE_RPC_ACTIVITIES_WRITE;break;case I.OAuth2Scopes.MESSAGES_READ:t=T.default.Messages.SCOPE_MESSAGES_READ;break;case I.OAuth2Scopes.APPLICATIONS_BUILDS_UPLOAD:t=T.default.Messages.SCOPE_APPLICATIONS_BUILDS_UPLOAD;break;case I.OAuth2Scopes.APPLICATIONS_BUILDS_READ:t=T.default.Messages.SCOPE_APPLICATIONS_BUILDS_READ;break;case I.OAuth2Scopes.APPLICATIONS_STORE_UPDATE:t=T.default.Messages.SCOPE_APPLICATIONS_STORE_UPDATE;break;case I.OAuth2Scopes.APPLICATIONS_ENTITLEMENTS:t=T.default.Messages.SCOPE_APPLICATIONS_ENTITLEMENTS;break;case I.OAuth2Scopes.APPLICATIONS_COMMANDS:t=T.default.Messages.SCOPE_APPLICATIONS_COMMANDS;break;case I.OAuth2Scopes.APPLICATIONS_COMMANDS_UPDATE:t=T.default.Messages.SCOPE_APPLICATIONS_COMMANDS_UPDATE;break;case I.OAuth2Scopes.ACTIVITIES_READ:t=T.default.Messages.SCOPE_ACTIVITIES_READ;break;case I.OAuth2Scopes.ACTIVITIES_WRITE:t=T.default.Messages.SCOPE_ACTIVITIES_WRITE;break;case I.OAuth2Scopes.RELATIONSHIPS_READ:t=T.default.Messages.SCOPE_RELATIONSHIPS_READ;break;default:t=e}return P("li",{className:(0,o.default)(C.default.permission,b.default.marginTop8)},e,P("i",{className:C.default.permissionCheckmark}),P(g.FormText,{},void 0,t))}));if(e.length)return P(g.FormItem,{faded:!0,title:T.default.Messages.PERMISSIONS,className:b.default.marginTop20},void 0,P("ul",{},void 0,e))}())};D.displayName="AuthorizedApp";var w=P(u.default,{}),j=function(){var e=(0,i.useStateFromStores)([p.default],(function(){return p.default.hidePersonalInformation})),t=(0,i.useStateFromStores)([c.default],(function(){return c.default.getApps()})),r=(0,i.useStateFromStores)([f.default],(function(){return f.default.getSelfEmbeddedActivities()}));a.useEffect((function(){l.default.fetch()}),[]);return e?w:P(g.FormSection,{tag:g.FormTitleTags.H1,title:T.default.Messages.AUTHORIZED_APPS},void 0,P(g.FormNotice,{className:b.default.marginBottom40,type:m.Types.PRIMARY,title:T.default.Messages.APPLICATIONS_AND_CONNECTIONS,body:T.default.Messages.APPLICATIONS_AND_CONNECTIONS_BODY}),null==t?P(E.default,{className:b.default.marginTop20,type:E.default.Type.SPINNING_CIRCLE}):0===t.length?P(L,{className:C.default.marginTop20},void 0,P(_.EmptyStateImage,{darkSrc:n(11601),lightSrc:n(11602),width:380,height:282}),P(_.EmptyStateText,{note:T.default.Messages.NO_AUTHORIZED_APPS_NOTE},void 0,T.default.Messages.NO_AUTHORIZED_APPS)):t.map((function(e){return a.createElement(D,R({key:e.id,onDelete:function(){return function(e){var t=e.id,n=e.application;l.default.delete(t);var a=r.get(n.id);null!=a&&(0,d.stopEmbeddedActivity)(a.channelId,n.id)}(e)}},e))})))};j.displayName="UserSettingsAuthedApps";var k=j;t.default=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(14)),a=i(n(2)),o=n(1);function i(e){return e&&e.__esModule?e:{default:e}}var l={fetch:function(){r.default.get({url:o.Endpoints.OAUTH2_TOKENS,oldFormErrors:!0}).then((function(e){return a.default.dispatch({type:o.ActionTypes.USER_AUTHORIZED_APPS_UPDATE,apps:e.body})}),(function(){return a.default.dispatch({type:o.ActionTypes.USER_AUTHORIZED_APPS_UPDATE,apps:[]})}))},delete:function(e){var t=this;r.default.delete({url:o.Endpoints.OAUTH2_TOKEN(e),oldFormErrors:!0}).then((function(){t.fetch()}))}};t.default=l},function(e,t,n){e.exports=n.p+"b47564b3086d0d8d941aae95a4b7b78c.svg"},function(e,t,n){e.exports=n.p+"68b37187aee175514a1402d4088cf90b.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=M(n(0)),o=C(n(3)),i=C(n(2)),l=M(n(287)),u=C(n(473)),s=C(n(8316)),d=C(n(6109)),f=C(n(11604)),c=C(n(160)),p=C(n(39)),v=C(n(12)),y=C(n(5833)),m=C(n(693)),_=C(n(1147)),h=C(n(467)),E=C(n(55)),g=C(n(151)),S=C(n(159)),O=n(1),I=C(n(6)),T=C(n(8152));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=N(s.default,{}),R=N(g.default,{}),L=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var a=r.prototype;return a.componentDidMount=function(){i.default.wait((function(){l.fetchPaymentSources(),l.fetchSubscriptions()}))},a.handleRedemptionRedirect=function(){u.default.setSection(O.UserSettingsSections.INVENTORY)},a.render=function(){var e=this.props,t=e.syncing,n=e.hide,r=e.paymentSources,a=e.defaultPaymentSourceId,o=e.locale,i=e.premiumSubscription,l=e.isRemovingPaymentSource,u=e.isUpdatingPaymentSource;return n?P:N("div",{className:T.default.userSettingsBilling},void 0,t&&0===Object.keys(r).length?N("div",{className:T.default.syncing},void 0,R):N(f.default,{paymentSources:r,defaultPaymentSourceId:a,premiumSubscriptionPaymentSourceId:null!=i&&i.status!==O.SubscriptionStatusTypes.CANCELED?i.paymentSourceId:null,locale:o,removing:l,submitting:u}),N("div",{className:T.default.paymentHistory},void 0,N(S.default,{tag:S.default.Tags.H1},void 0,N(E.default,{align:E.default.Align.CENTER},void 0,I.default.Messages.BILLING_PAYMENT_HISTORY)),N(d.default,{locale:o})),N(h.default,{className:T.default.codeRedemptionRedirect,type:h.default.Types.CUSTOM},void 0,I.default.Messages.BILLING_CODE_REDEMPTION_REDIRECT.format({onClick:this.handleRedemptionRedirect})))},r}(a.PureComponent);L.displayName="UserSettingsBilling";var D=o.default.connectStores([p.default,y.default,m.default,v.default,c.default,_.default],(function(){var e=_.default.getPremiumTypeSubscription(),t=v.default.getCurrentUser();return{locale:p.default.locale,hide:c.default.enabled,isClaimed:t.isClaimed(),isVerified:t.verified,premiumSubscription:e,defaultPaymentSourceId:m.default.defaultPaymentSourceId,paymentSources:m.default.paymentSources,syncing:y.default.isSyncing,isRemovingPaymentSource:y.default.isRemovingPaymentSource,isUpdatingPaymentSource:y.default.isUpdatingPaymentSource}}))(L);t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=O(n(0)),o=g(n(8)),i=O(n(287)),l=g(n(29)),u=g(n(55)),s=g(n(149)),d=g(n(1165)),f=g(n(159)),c=g(n(11605)),p=n(41),v=g(n(24)),y=g(n(6007)),m=g(n(11606)),_=g(n(6045)),h=g(n(6)),E=g(n(8151));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))}}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleEditClick=function(){t.props.onEditClick(t.props.paymentSource.id)},t}return M(t,e),t.prototype.render=function(){var e=this.props,t=e.paymentSource,n=e.isDefault,r=e.isEditing,a=e.index,o=e.hideDivider,i=e.isForSubscription,s=e.locale,f=e.removing,c=e.submitting,p=e.onSubmit,v=e.onCancel,y=e.onDelete;return r?b(m.default,{paymentSource:t,isDefault:n,removing:f,submitting:c,locale:s,isForSubscription:i,onSubmit:p,onCancel:v,onDelete:y}):b("div",{className:E.default.paymentSourceItem},void 0,a>0&&!o?b(d.default,{className:E.default.sourceDivider}):null,b(u.default,{align:u.default.Align.CENTER,justify:u.default.Justify.BETWEEN,className:E.default.paymentSourceRow},void 0,b(_.default,{paymentSource:t,isDefault:n,isForSubscription:i,locale:s,showSubtext:!0}),r?null:b(l.default,{color:l.default.Colors.PRIMARY,onClick:this.handleEditClick,size:l.default.Sizes.SMALL},void 0,h.default.Messages.EDIT)))},t}(a.PureComponent);A.displayName="PaymentSourceItem",A.defaultProps={isEditing:!1,hideDivider:!1,onEditClick:function(){}};var P=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={editingPayment:null},t.handleEditClick=function(e){t.setState({editingPayment:e})},t.handleCancel=function(){t.setState({editingPayment:null})},t.handleDelete=function(){var e=C(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.deletePaymentSource(n);case 3:t.setState({editingPayment:null}),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),t.handleSubmit=function(){var e=C(regeneratorRuntime.mark((function e(n,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=9;break}return e.prev=1,e.next=4,i.updatePaymentSource(n,r);case 4:t.setState({editingPayment:null}),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t,n){return e.apply(this,arguments)}}(),t}M(t,e);var n=t.prototype;return n.handleAddPaymentMethod=function(){(0,p.openModal)((function(e){return a.createElement(y.default,e)}))},n.renderFooter=function(){var e=this.props.paymentSources;return b(u.default,{justify:u.default.Justify.END,className:E.default.footer},void 0,0===Object.keys(e).length?b(u.default.Child,{},void 0,b(v.default,{},void 0,h.default.Messages.BILLING_NO_PAYMENT_METHOD),b("div",{className:E.default.subText},void 0,h.default.Messages.BILLING_NO_PAYMENT_METHOD_DESCRIPTION)):null,b(l.default,{onClick:this.handleAddPaymentMethod},void 0,h.default.Messages.BILLING_ADD_PAYMENT_METHOD))},n.render=function(){var e=this,t=this.props,n=t.defaultPaymentSourceId,r=t.paymentSources,i=t.locale,l=t.removing,p=t.submitting,v=t.premiumSubscriptionPaymentSourceId,y=o.default.values(r).sort((function(e,t){return e.id===n?-1:t.id===n||e.id>t.id?1:-1})),m=this.state.editingPayment,_=y.findIndex((function(e){return e.id===m})),g=y.map((function(t,r){return b(A,{locale:i,paymentSource:t,isDefault:n===t.id,onCancel:e.handleCancel,onDelete:e.handleDelete,isForSubscription:t.id===v,hideDivider:_===r-1,onSubmit:e.handleSubmit,index:r,submitting:p,removing:l,isEditing:m===t.id,onEditClick:e.handleEditClick},t.id)}));return b("div",{},void 0,b(f.default,{tag:f.default.Tags.H1},void 0,b(u.default,{align:u.default.Align.CENTER},void 0,b(s.default,{position:s.default.Positions.LEFT,text:h.default.Messages.BILLING_SECURE_TOOLTIP},void 0,(function(e){return a.createElement(c.default,I({className:E.default.lockIcon},e))})),h.default.Messages.BILLING_PAYMENT_SOURCES)),g,_!==y.length-1?b(d.default,{className:E.default.sourceDivider}):null,this.renderFooter())},t}(a.PureComponent);P.displayName="PaymentMethods";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24"}),s("path",{className:f,fill:d,id:"a",d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H8.9V6zM16 16h-3v3h-2v-3H8v-2h3v-3h2v3h3v2z"}))}d.displayName="SecureLock"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(9)),i=b(n(3)),l=b(n(2)),u=n(287),s=n(383),d=b(n(5833)),f=b(n(29)),c=b(n(467)),p=b(n(1160)),v=b(n(55)),y=b(n(1164)),m=b(n(149)),_=n(131),h=b(n(24)),E=n(48),g=b(n(5846)),S=b(n(11607)),O=b(n(6045)),I=n(1),T=b(n(6)),C=b(n(8150));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(){return(A=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}).apply(this,arguments)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var R="isDefault",L=N(_.FormDivider,{}),D=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).handleSubmit=function(e){if(e.preventDefault(),e.stopPropagation(),0===Object.values(n.state.dirtyFields).filter(E.isNotNullish).length)n.props.onCancel();else{var t=n.state,r=t.billingAddress,a=t.isDefault,o=t.expiresMonth,i=t.expiresYear;n.props.onSubmit(n.props.paymentSource.id,{billingAddress:r,expiresMonth:o,expiresYear:i,isDefault:a})}},n.handleCancel=function(){n.props.onCancel()},n.handleDelete=function(){var e=n.props;(0,e.onDelete)(e.paymentSource.id)},n.handleAddressUpdate=function(e,t,r){n.setState({billingAddress:e,billingAddressValid:t,dirtyFields:A({},n.state.dirtyFields,{billingAddress:r})})},n.handleExpirationDateUpdate=function(e){var t=e.expirationDate.split("/"),r=t[0],a=t[1];n.handleFieldChange(Number(r),"expiresMonth"),n.handleFieldChange(Number(""+(new Date).getFullYear().toString().slice(0,2)+a),"expiresYear")},n.handleFieldChange=function(e,t){var r,a;null!=t&&n.setState(((a={})[t]=e,a.dirtyFields=A({},n.state.dirtyFields,((r={})[t]=!0,r)),a))};var r=t.paymentSource,a=t.isDefault,o=r.billingAddress;return n.state={billingAddress:{name:o.name||"",line1:o.line1||"",line2:o.line2||"",country:o.country||"",state:o.state||"",city:o.city||"",postalCode:o.postalCode||""},expiresMonth:r instanceof s.CreditCardSourceRecord?r.expiresMonth:void 0,expiresYear:r instanceof s.CreditCardSourceRecord?r.expiresYear:void 0,billingAddressValid:!1,isDefault:a,dirtyFields:{}},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,P(t,n);var i=r.prototype;return i.componentWillUnmount=function(){l.default.wait((function(){(0,u.clearUpdatePaymentSourceError)(),(0,u.clearRemovePaymentSourceError)()}))},i.renderError=function(){var e=this.props,t=e.updateError,n=e.removeError;return null==t||t.hasCardError()||t.hasAddressError()?null!=n?N(y.default,{className:C.default.formError},void 0,n.message):null:N(y.default,{className:C.default.formError},void 0,t.message)},i.renderBillingAddressSection=function(){var e=this.state.billingAddress,t=this.props,n=t.locale,r=t.updateError;return N("div",{className:C.default.addressSection},void 0,N(h.default,{className:C.default.sectionHeader},void 0,T.default.Messages.BILLING_ADDRESS),a.createElement(g.default,A({},e,{mode:g.default.Modes.EDIT,layout:"en-US"===n?g.default.Layouts.SETTINGS_US:g.default.Layouts.SETTINGS_INTL,onBillingAddressChange:this.handleAddressUpdate,error:r})))},i.renderCardExpirationSection=function(){var e=this.state,t=e.expiresMonth,n=e.expiresYear;if(null==t||null==n)return null;var r=t.toString().padStart(2,"0")+"/"+n.toString().padStart(2,"0").slice(-2);return N("div",{className:C.default.addressSection},void 0,N(h.default,{className:C.default.sectionHeader},void 0,T.default.Messages.BILLING_STEP_CREDIT_CARD_INFORMATION),N(S.default,{expirationDate:r,layout:S.default.Layouts.SETTINGS,onCardInfoChange:this.handleExpirationDateUpdate,error:this.props.updateError}))},i.renderActions=function(){var e=this.props,t=e.submitting,n=e.removing,r=e.isForSubscription,o=this.state.billingAddressValid;return N(v.default,{justify:v.default.Justify.BETWEEN,className:C.default.formActions},void 0,N("div",{className:C.default.disabledTooltipWrapper},void 0,r?N(m.default,{text:T.default.Messages.PAYMENT_SOURCE_DELETE_DISABLED_TOOLTIP},void 0,(function(e){return a.createElement("div",A({"aria-hidden":!0,className:C.default.disabledTooltipTarget},e))})):null,N(f.default,{type:"button",disabled:r||t,submitting:n,onClick:this.handleDelete,look:f.default.Looks.OUTLINED,color:f.default.Colors.RED},void 0,T.default.Messages.PAYMENT_SOURCE_DELETE)),N(v.default,{grow:0},void 0,N(f.default,{type:"button",disabled:t||n,onClick:this.handleCancel,look:f.default.Looks.LINK,color:f.default.Colors.PRIMARY},void 0,T.default.Messages.CANCEL),N(f.default,{submitting:t,disabled:!o||n,type:"submit",color:f.default.Colors.GREEN},void 0,T.default.Messages.SAVE)))},i.render=function(){var e=this,t=this.props,n=t.paymentSource,r=t.isDefault,a=t.locale,i=t.className,l=t.isForSubscription,u=this.state.isDefault,d=n instanceof s.CreditCardSourceRecord;return N(c.default,{editable:!0,className:(0,o.default)(C.default.card,i)},void 0,N("form",{onSubmit:this.handleSubmit,noValidate:!0},void 0,this.renderError(),N("div",{className:C.default.paymentSection},void 0,N(O.default,{paymentSource:n,isDefault:r,isForSubscription:l,locale:a}),n.invalid?N("div",{className:C.default.errorSubText},void 0,T.default.Messages.PAYMENT_SOURCE_INVALID_HELP):null,N("div",{className:C.default.subText},void 0,d?T.default.Messages.PAYMENT_SOURCE_EDIT_HELP_CARD:T.default.Messages.PAYMENT_SOURCE_EDIT_HELP_PAYPAL.format({paypalURL:I.PAYPAL_URL}))),this.renderCardExpirationSection(),this.renderBillingAddressSection(),N(p.default,{name:R,value:u,onChange:function(t,n){return e.handleFieldChange(n,R)},type:p.default.Types.INVERTED,className:C.default.defaultSection},void 0,N(h.default,{className:C.default.defaultCheckboxLabel},void 0,T.default.Messages.PAYMENT_SOURCE_MAKE_DEFAULT)),L,this.renderActions()))},r}(a.PureComponent);D.displayName="EditPaymentSourceForm",D.defaultProps={onDelete:function(){},onSubmit:function(){},onCancel:function(){}};var w=i.default.connectStores([d.default],(function(){return{updateError:d.default.editSourceError,removeError:d.default.removeSourceError}}))(D);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l,u,s,d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),f=S(n(8)),c=S(n(153)),p=S(n(10234)),v=n(295),y=S(n(11609)),m=S(n(11610)),_=S(n(11611)),h=S(n(5847)),E=S(n(6)),g=S(n(5708));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,r){i||(i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var l=new Array(o),u=0;u<o;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:i,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(){return(b=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}).apply(this,arguments)}!function(e){e.CARD_NUMBER="cardNumber",e.EXPIRATION_DATE="expirationDate",e.CVC="cvc",e.NAME="name"}(u||(u={})),function(e){e.MODAL="modal",e.SETTINGS="settings"}(s||(s={}));var M=((r={})[u.CARD_NUMBER]={name:u.CARD_NUMBER,title:function(){return E.default.Messages.CREDIT_CARD_NUMBER},autoComplete:"cc-number",placeholder:function(){return E.default.Messages.PAYMENT_SOURCE_CARD_NUMBER},pattern:"\\d*",getClassNameForLayout:function(){return g.default.width100},renderInput:function(e,t){return d.createElement(m.default,b({},e,{inputRef:function(n){return t.setInputRef(e.name,n)},flipped:t.codeFocused,autoFocus:!0}))}},r[u.EXPIRATION_DATE]={name:u.EXPIRATION_DATE,title:function(){return E.default.Messages.CREDIT_CARD_EXPIRATION_DATE},autoComplete:"cc-exp",placeholder:function(){return E.default.Messages.PAYMENT_SOURCE_EXPIRATION_DATE_PLACEHOLDER},pattern:"\\d*",getClassNameForLayout:function(){return g.default.width50},renderInput:function(e,t){return d.createElement(_.default,b({},e,{inputRef:function(n){return t.setInputRef(e.name,n)}}))}},r[u.CVC]={name:u.CVC,title:function(){return E.default.Messages.CREDIT_CARD_CVC},autoComplete:"cc-csc",placeholder:function(){return E.default.Messages.CREDIT_CARD_SECURITY_CODE},pattern:"\\d*",getClassNameForLayout:function(){return g.default.width50},renderInput:function(e,t){return d.createElement(y.default,b({},e,{cardType:t.cardType,inputRef:function(n){return t.setInputRef(e.name,n)}}))}},r[u.NAME]={name:u.NAME,title:function(){return E.default.Messages.CREDIT_CARD_NAME_ON_CARD},autoComplete:"cc-name",placeholder:function(){return E.default.Messages.CREDIT_CARD_NAME},getClassNameForLayout:function(){return g.default.width100},renderInput:function(e,t){return d.createElement(c.default,b({},e,{inputRef:function(n){return t.setInputRef(e.name,n)}}))}},r),N=((a={})[s.MODAL]=[{fields:[M[u.CARD_NUMBER]]},{fields:[M[u.EXPIRATION_DATE],M[u.CVC]]},{fields:[M[u.NAME]]}],a[s.SETTINGS]=[{fields:[M[u.EXPIRATION_DATE]]}],a),A=function(e){var t,n;function r(){for(var t,n,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(n=e.call.apply(e,[this].concat(a))||this).state={codeFocused:!1,values:(t={},t[u.CARD_NUMBER]=n.props[u.CARD_NUMBER],t[u.EXPIRATION_DATE]=n.props[u.EXPIRATION_DATE],t[u.CVC]=n.props[u.CVC],t[u.NAME]=n.props[u.NAME],t),dirtyFields:{},errors:{}},n._refs={},n.setRef=function(e,t){n._refs[e]=t},n.handleFieldBlur=function(e,t){var r={errors:n.validateForm(!0)};t===u.CVC&&(r.codeFocused=!1),n.setState(r)},n.handleFieldFocus=function(e,t){t===u.CVC&&n.setState({codeFocused:!0})},n.handleFieldChange=function(e,t,r){var a,o;if(void 0===r&&(r=!1),null==t)throw new Error("You must provide a name for the field.");var i=n.state,l=i.values,u=i.dirtyFields,s=i.errors;delete s[t],n.setState({values:b({},l,(a={},a[t]=e,a)),dirtyFields:b({},u,(o={},o[t]=!0,o)),errors:s},(function(){if(r){if(null==t)throw new Error("You must provide a name for the field.");var e,a=n.getNextFieldName(t);if(null!=a)null===(e=n._refs[a])||void 0===e||e.focus()}}))},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var a=r.prototype;return a.componentDidMount=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,v.ensureStripeIsLoaded)();case 2:l=e.sent,this.handleInfoChange();case 4:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),a.componentDidUpdate=function(e,t){this.state!==t&&this.handleInfoChange()},a.getNextFieldName=function(e){var t=this.props.layout,n=N[t],r=(0,f.default)(n).flatMap((function(e){return e.fields})).map((function(e){return e.name})).value(),a=r.indexOf(e);return-1===a||a===r.length-1?null:r[a+1]},a.validateForm=function(e){if(null==l)return{};var t=this.state,n=t.values,r=t.dirtyFields,a={};return e&&!r[u.CARD_NUMBER]||(n[u.CARD_NUMBER]?l.card.validateCardNumber(n[u.CARD_NUMBER])||(a[u.CARD_NUMBER]=E.default.Messages.CREDIT_CARD_ERROR_NUMBER):a[u.CARD_NUMBER]=E.default.Messages.CREDIT_CARD_ERROR_REQUIRED),e&&!r[u.EXPIRATION_DATE]||l.card.validateExpiry(n[u.EXPIRATION_DATE])||(a[u.EXPIRATION_DATE]=E.default.Messages.CREDIT_CARD_ERROR_EXPIRATION),e&&!r[u.CVC]||l.card.validateCVC(n[u.CVC])||(a[u.CVC]=E.default.Messages.CREDIT_CARD_ERROR_SECURITY_CODE),e&&!r[u.NAME]||n[u.NAME]||(a[u.NAME]=E.default.Messages.PAYMENT_SOURCE_NAME_ERROR_REQUIRED),a},a.handleInfoChange=function(){var e=this.state.values,t=this.validateForm(!1);this.props.onCardInfoChange(e,0===Object.keys(t).length)},a.render=function(){var e=this.props,t=e.layout,n=e.error,r=e.className,a=this.state,o=a.errors,i=a.codeFocused,l=a.values,s=N[t];if(null==s)throw new Error("Provide a proper layout property.");var d=p.default.getCreditCardType(l[u.CARD_NUMBER]);return I(h.default,{className:r,form:s,layout:t,values:l,errors:o,formError:n,onFieldChange:this.handleFieldChange,onFieldBlur:this.handleFieldBlur,onFieldFocus:this.handleFieldFocus,codeFocused:i,cardType:d,setInputRef:this.setRef})},r}(d.PureComponent);A.displayName="CardInfoForm",A.Layouts=s,A.defaultProps=((o={})[u.CARD_NUMBER]="",o[u.EXPIRATION_DATE]="",o[u.CVC]="",o[u.NAME]="",o.layout=s.MODAL,o);var P=A;t.default=P},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(153))&&r.__esModule?r:{default:r};function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._inputRef=null,t.setRef=function(e){var n=t.props.inputRef;t._inputRef=e,null!=n&&n(e)},t.handleChange=function(e,n){if(null!=t._inputRef){var r=t.props,a=r.cardType,o=r.onChange,i=a.code.size,l=e.length===i&&t._inputRef.selectionStart===i;null!=o&&o(e,n,l)}},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),r.prototype.render=function(){var e=this.props,t=e.cardType,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["cardType"]);return a.createElement(o.default,l({},n,{inputMode:"numeric",onChange:this.handleChange,maxLength:t.code.size,inputRef:this.setRef}))},r}(a.PureComponent);t.default=s,s.displayName="CVCField"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(9)),i=d(n(700)),l=d(n(153)),u=d(n(10234)),s=d(n(8149));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(){return(c=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}).apply(this,arguments)}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).selectionStart=0,t.setRef=function(e){var n=t.props.inputRef;t._inputRef=e,null!=n&&n(e)},t.handleChange=function(e,n){var r=t.props,a=r.value,o=r.onChange,i=t._inputRef;if(e!==a&&null!=i&&null!=a){var l=u.default.prettifyCreditCardNumber(e),s=i.selectionStart;if(a===l)s-=1,l=u.default.prettifyCreditCardNumber(l.substring(0,s)+l.substring(s+1));else{var d=l.length-e.length;d>0&&(s+=d)}t.selectionStart=s;var f=t.getMaxLength(l),c=l.length===f&&t.selectionStart===f;null!=o&&o(l,n,c)}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var d=r.prototype;return d.componentDidUpdate=function(e){var t=this._inputRef;e.value!==this.props.value&&null!=t&&t.setSelectionRange(this.selectionStart,this.selectionStart)},d.getMaxLength=function(e){var t=null!=e?u.default.getCreditCardType(e):u.default.DEFAULT_CARD_TYPE;return t.lengths[t.lengths.length-1]+t.gaps.length},d.render=function(){var e=this.props,t=e.value,n=e.flipped,r=e.inputClassName,d=e.className,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["value","flipped","inputClassName","className"]),v=u.default.getCreditCardType(t),y=this.getMaxLength(t);return p("div",{className:(0,o.default)(s.default.cardNumberWrapper,d)},void 0,p(i.default,{className:s.default.cardIcon,type:v.type,flipped:n}),a.createElement(l.default,c({},f,{inputMode:"numeric",value:u.default.prettifyCreditCardNumber(t),onChange:this.handleChange,inputRef:this.setRef,maxLength:y,inputClassName:(0,o.default)(s.default.cardNumberInput,r)})))},r}(a.PureComponent);y.displayName="CardNumberField",y.defaultProps={flipped:!1};var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=(r=n(153))&&r.__esModule?r:{default:r},i=n(10234);function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=/[^0-9]/g,f=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).selectionStart=0,t.setRef=function(e){var n=t.props.inputRef;t._inputRef=e,null!=n&&n(e)},t.handleChange=function(e,n){var r=t.props,a=r.value,o=r.onChange,l=t._inputRef;if(e!==a&&null!=l&&null!=a){var u=(0,i.formatExpiration)(e),s=l.selectionStart;u===a&&u.length<=3&&a.includes("/")&&!e.includes("/")?u=u.replace(d,""):u===a&&e.includes("/")&&!a.includes("/")&&(u+="/"),u.length>e.length&&(s+=u.length-e.length),t.selectionStart=s;var f=u.split("/")[1],c=null!=f&&2===f.length&&s===u.length;null!=o&&o(u,n,c)}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.componentDidUpdate=function(e){var t=this._inputRef;e.value!==this.props.value&&null!=t&&t.setSelectionRange(this.selectionStart,this.selectionStart)},l.render=function(){return a.createElement(o.default,u({},this.props,{inputMode:"numeric",onChange:this.handleChange,inputRef:this.setRef}))},r}(a.PureComponent);f.displayName="ExpirationDateTextField";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=j(n(0)),o=D(n(9)),i=j(n(3)),l=D(n(739)),u=D(n(274)),s=D(n(8316)),d=D(n(9180)),f=D(n(218)),c=D(n(183)),p=D(n(8377)),v=D(n(725)),y=D(n(15)),m=D(n(160)),_=D(n(39)),h=D(n(271)),E=j(n(29)),g=D(n(61)),S=j(n(8302)),O=D(n(371)),I=D(n(151)),T=D(n(8267)),C=n(131),b=D(n(255)),M=n(41),N=D(n(16)),A=n(1),P=D(n(6)),R=D(n(8153)),L=D(n(370));function D(e){return e&&e.__esModule?e:{default:e}}function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function j(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function k(){return(k=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}).apply(this,arguments)}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var F=i.default.connectStores([_.default],(function(){return{theme:_.default.theme}}))(S.default),B=function(e){var t,n,r,a=e.integration,o=(0,i.useStateFromStores)([v.default],(function(){return v.default.isJoining(a.id)}),[a.id]);return(0,i.useStateFromStores)([y.default],(function(){return y.default.getGuild(a.guild.id)}),[a.guild.id])||(r=G(E.default,{size:E.ButtonSizes.SMALL,onClick:function(){l.default.joinServer(a.id,(function(){}))},disabled:o},void 0,G("span",{},void 0,o?P.default.Messages.JOINING_GUILD:P.default.Messages.JOIN_GUILD))),G("div",{className:R.default.integration},void 0,G("div",{},void 0,G(O.default,{size:O.default.Sizes.SMALL,guild:a.guild,className:R.default.guildIcon}),G("div",{className:R.default.integrationInner},void 0,G(C.FormText,{className:R.default.integrationName},void 0,a.guild.toString()),G(h.default,{className:R.default.channelLink,href:null===(t=c.default.get(a.type))||void 0===t||null===(n=t.getPlatformUserUrl)||void 0===n?void 0:n.call(t,a.account)},void 0,a.account.name))),r)};B.displayName="Integration";var H=G(b.default,{width:16,height:16}),x=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).handleReconnect=function(){(0,p.default)(n.props.account.type,"User Settings")},n.handleDisconnect=function(){var e=c.default.get(n.props.account.type);(0,M.openModal)((function(t){return a.createElement(f.default,k({title:P.default.Messages.DISCONNECT_ACCOUNT_TITLE.format({name:e.name}),body:P.default.Messages.DISCONNECT_ACCOUNT_BODY,confirmText:P.default.Messages.DISCONNECT_ACCOUNT,cancelText:P.default.Messages.CANCEL,onConfirm:n.props.onDisconnect},t))}))},n.handleVisibilityChange=function(e){var t=n.props.account,r=e?1:0;if(!t.verified)return n._inProgressVisibility=r,void(0,p.default)(t.type);n.setState({visibility:r}),l.default.setVisibility(t.type,t.id,r)},n.handleInProgressVisibilityChange=function(){if(null!=n._inProgressVisibility){var e=n.props.account;l.default.setVisibility(e.type,e.id,n._inProgressVisibility),n._inProgressVisibility=null}},n.handleFriendSyncChange=function(e){var t=n.props.account;n.setState({friendSync:e}),l.default.setFriendSync(t.type,t.id,e)},n.handleShowActivityChange=function(e){var t=n.props.account;n.setState({showActivity:e}),l.default.setShowActivity(t.type,t.id,e)};var r=t.account,o=r.friendSync,i=r.visibility,u=r.showActivity;return n.state={friendSync:o,visibility:i,showActivity:u,accountProps:t.account},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,U(t,n),r.getDerivedStateFromProps=function(e,t){var n=t.accountProps,r=n.friendSync,a=n.visibility,o=n.showActivity,i=e.account,l=i.friendSync,u=i.visibility,s=i.showActivity;return r!==l||a!==u||o!==s?{friendSync:l,visibility:u,showActivity:s,accountProps:e.account}:null};var o=r.prototype;return o.componentDidUpdate=function(e){var t=e.account.verified,n=this.props.account.verified;!t&&n&&this.handleInProgressVisibilityChange()},o.renderHeader=function(e){var t=this.props.account;return G("div",{className:R.default.connectionHeader},void 0,G("img",{alt:e.name,className:R.default.connectionIcon,src:e.icon.color}),G("div",{},void 0,G(C.FormText,{className:R.default.connectionAccountValue},void 0,t.name),G(C.FormText,{className:R.default.connectionAccountLabel,type:C.FormTextTypes.DESCRIPTION},void 0,c.default.get(t.type).name)),G(g.default,{className:R.default.connectionDelete,onClick:this.handleDisconnect,"aria-label":P.default.Messages.SERVICE_CONNECTIONS_DISCONNECT,focusProps:{offset:{top:-4,left:-4,right:-4}}},void 0,H))},o.renderConnectionOptions=function(e){var t,n,r=this.state,a=r.visibility,o=r.friendSync,i=r.showActivity,l=this.props.account;return A.FRIEND_SYNC_PLATFORM_TYPES.has(l.type)&&(t=G(T.default,{className:R.default.connectionOptionSwitch,hideBorder:!0,value:o,onChange:this.handleFriendSyncChange},void 0,G("span",{className:R.default.subEnabledTitle},void 0,P.default.Messages.SYNC_FRIENDS))),A.ACTIVITY_PLATFORM_TYPES.has(l.type)&&(n=G(T.default,{className:R.default.connectionOptionSwitch,hideBorder:!0,value:i,onChange:this.handleShowActivityChange},void 0,G("span",{className:R.default.subEnabledTitle},void 0,P.default.Messages.DISPLAY_ACTIVITY.format({platform:e.name})))),G("div",{className:R.default.connectionOptionsWrapper},void 0,G("div",{className:R.default.connectionOptions},void 0,G(T.default,{className:R.default.connectionOptionSwitch,hideBorder:!0,value:1===a,onChange:this.handleVisibilityChange},void 0,G("span",{className:R.default.subEnabledTitle},void 0,P.default.Messages.DISPLAY_ON_PROFILE)),n,t))},o.renderIntegrations=function(){var e=this.props.account;return e.revoked?G(C.FormItem,{className:R.default.integrationsWrapper},void 0,G(C.FormTitle,{tag:C.FormTitleTags.H5},void 0,G("span",{className:R.default.subEnabledTitle},void 0,P.default.Messages.SUB_ENABLED_SERVERS)),G(C.FormText,{},void 0,P.default.Messages.CONNECTED_ACCOUNT_REVOKED.format({onReconnect:this.handleReconnect}))):e.integrations.length>0?G(C.FormItem,{className:R.default.integrationsWrapper},void 0,G(C.FormTitle,{tag:C.FormTitleTags.H5},void 0,G("span",{className:R.default.subEnabledTitle},void 0,P.default.Messages.SUB_ENABLED_SERVERS)),G("div",{},void 0,e.integrations.map((function(e){return G(B,{integration:e},e.id)})))):void 0},o.renderDivider=function(){var e=this.props.account,t=e.revoked,n=e.integrations;if(t||n.length>0)return G(C.FormDivider,{className:R.default.connectedAccountSeparator})},o.render=function(){var e=this.props.account,t=c.default.get(e.type);return G("div",{className:R.default.connection},void 0,this.renderHeader(t),this.renderConnectionOptions(t),this.renderDivider(),this.renderIntegrations())},r}(a.PureComponent);x.displayName="ConnectedAccount";var V=G(s.default,{}),W=function(){var e,t,r=(0,i.useStateFromStores)([m.default],(function(){return m.default.hidePersonalInformation})),s=(0,i.useStateFromStores)([v.default],(function(){return v.default.isFetching()})),f=(0,i.useStateFromStores)([v.default],(function(){return v.default.getAccounts()})),p=(0,i.useStateFromStores)([_.default],(function(){return _.default.detectPlatformAccounts}));function y(e){u.default.updateRemoteSettings({detectPlatformAccounts:e})}return a.useEffect((function(){l.default.fetch()}),[]),r?V:G(C.FormSection,{className:R.default.connections,tag:C.FormTitleTags.H1,title:P.default.Messages.CONNECTIONS},void 0,G("div",{className:(0,o.default)(R.default.accountList,(t={},t[L.default.marginBottom20]=!N.default.embedded,t))},void 0,G(C.FormTitle,{className:L.default.marginBottom4},void 0,P.default.Messages.CONNECT_ACCOUNT_TITLE),G(C.FormText,{className:L.default.marginBottom8},void 0,P.default.Messages.CONNECT_ACCOUNT_DESCRIPTION),G("div",{className:R.default.connectedAccounts},void 0,c.default.filter((function(e){return e.enabled})).map((function(e){return G(d.default,{type:e.type,className:R.default.accountBtn,innerClassName:R.default.accountBtnInner},e.type)})))),function(){if(N.default.embedded)return G(T.default,{value:p,onChange:y,className:(0,o.default)(L.default.marginTop20,L.default.marginBottom20)},void 0,P.default.Messages.DETECT_PLATFORM_ACCOUNTS)}(),(e=s?G(I.default,{className:L.default.marginTop20,type:I.default.Type.SPINNING_CIRCLE}):0===f.length?G(F,{className:L.default.marginTop40},void 0,G(S.EmptyStateImage,{darkSrc:n(11613),lightSrc:n(11614),width:230,height:220}),G(S.EmptyStateText,{note:P.default.Messages.CONNECTED_ACCOUNTS_NONE},void 0,P.default.Messages.CONNECTED_ACCOUNTS_NONE_TITLE)):f.filter((function(e){return c.default.isSupported(e.type)})).map((function(e,t){return G(x,{account:e,onDisconnect:function(){return n=(t=e).type,r=t.id,void l.default.disconnect(n,r);var t,n,r}},t)})),G(C.FormItem,{className:R.default.connectionList},void 0,e)))};W.displayName="UserSettingsConnections";var Y=W;t.default=Y},function(e,t,n){e.exports=n.p+"65c84ff0161c0f951f99b035170afb1e.svg"},function(e,t,n){e.exports=n.p+"caefee6eec712590e489b96139423f9f.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=j(n(9)),i=j(n(8)),l=j(n(3)),u=n(1402),s=j(n(8416)),d=j(n(8688)),f=n(1394),c=n(11616),p=n(307),v=n(277),y=j(n(267)),m=j(n(39)),_=U(n(29)),h=j(n(467)),E=U(n(8302)),g=j(n(55)),S=j(n(1159)),O=j(n(151)),I=j(n(8267)),T=j(n(153)),C=n(131),b=n(35),M=n(41),N=j(n(47)),A=j(n(24)),P=n(1),R=j(n(8154)),L=j(n(7347)),D=j(n(370)),w=j(n(5701));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function F(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){G(o,r,a,i,l,"next",e)}function l(e){G(o,r,a,i,l,"throw",e)}i(void 0)}))}}function B(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,H(e,t)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(){return(x=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}).apply(this,arguments)}function V(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var W=["discord_web","discord_marketing","discord_ios"],Y=[{value:"branch",label:"Branch Name"},{value:"id",label:"Build ID"}];function z(e){return new Promise((function(t){(0,M.openModal)((function(n){var r=function(e){n.onClose(),t(e)};return a.createElement(b.ModalRoot,x({},n,{"aria-label":"Choose A Project to Override"}),V(b.ModalHeader,{separator:!1},void 0,V(N.default,{tag:N.default.Tags.H2,size:N.default.Sizes.SIZE_20},void 0,"Choose A Project to Override")),V(b.ModalContent,{},void 0,V(g.default,{},void 0,e.map((function(e){return V(g.default.Child,{grow:0},e,V(_.default,{value:e,color:_.default.Colors.GREEN,onClick:function(){return r(e)}},void 0,e))})))),V(b.ModalFooter,{},void 0,V(_.default,{color:_.default.Colors.PRIMARY,look:_.default.Looks.LINK,onClick:function(){return r(null)}},void 0,"Nevermind")))}))}))}var K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRemoveBuildOverride=function(){t.props.onBuildOverrideRemoved(t.props.project)},t.handleOverrideIdChanged=function(e){t.props.onBuildOverrideUpdated(t.props.project,{id:e})},t.handleOverrideTypeChanged=function(e){t.props.onBuildOverrideUpdated(t.props.project,{type:e.value,id:""})},t}return B(t,e),t.prototype.render=function(){var e,t=this.props,n=t.project,r=t.overrideType,a=t.overrideId,i=t.disabled,l=t.error,u="branch"===r?"Branch Name":"Build ID";return V(g.default,{direction:g.default.Direction.VERTICAL,className:(0,o.default)(R.default.buildOverrideGroup,D.default.marginBottom20,L.default.card,R.default.row)},void 0,V(s.default,{className:(0,o.default)(R.default.removeBuildOverride,(e={},e[R.default.removeBuildOverrideDisabled]=i,e)),onClick:i?void 0:this.handleRemoveBuildOverride}),V(g.default,{className:D.default.marginBottom8},void 0,V(g.default.Child,{basis:"50%"},void 0,V(C.FormItem,{title:"Override Type",className:R.default.item},void 0,V(S.default,{options:Y,onChange:this.handleOverrideTypeChanged,value:r,disabled:i,clearable:!1,searchable:!1}))),V(g.default.Child,{basis:"50%"},void 0,V(C.FormItem,{title:u,className:R.default.item},void 0,V(T.default,{value:a,onChange:this.handleOverrideIdChanged,disabled:i})))),V(g.default.Child,{},void 0,l&&V(C.FormText,{className:R.default.item,style:{color:P.Colors.STATUS_RED},type:C.FormText.Types.DESCRIPTION},void 0,l),V(C.FormText,{className:R.default.item,type:C.FormText.Types.DESCRIPTION},void 0,"This controls the build that will be served for the ",V("code",{},void 0,n)," project.")))},t}(a.Component);K.displayName="BuildOverride";var $=V(E.EmptyStateText,{},void 0,"You have no build overrides configured."),Z=V(C.FormDivider,{}),q=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={loading:!0,buildOverrides:{},loadedBuildOverrides:{},errors:{},saving:!1,didSave:!1},t.handleAddBuildOverride=F(regeneratorRuntime.mark((function e(){var n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(t.getAvailableProjects());case 2:if(null!=(r=e.sent)){e.next=5;break}return e.abrupt("return");case 5:a=x({},t.state.buildOverrides,((n={})[r]={type:"branch",id:""},n)),t.setState({buildOverrides:a});case 7:case"end":return e.stop()}}),e)}))),t.handleBuildOverrideUpdated=function(e,n){var r,a=t.state.buildOverrides,o=x({},null!=a?a[e]:{},{},n),i=x({},t.state.buildOverrides,((r={})[e]=o,r));t.setState({buildOverrides:i})},t.handleBuildOverrideRemoved=function(e){var n=x({},t.state.buildOverrides);delete n[e],t.setState({buildOverrides:n})},t.handleDiscardChanges=function(){t.setState({buildOverrides:i.default.cloneDeep(t.state.loadedBuildOverrides),errors:{},didSave:!1})},t.handleSaveChanges=F(regeneratorRuntime.mark((function e(){var n,r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(n=t.state.buildOverrides)){e.next=3;break}return e.abrupt("return");case 3:return t.setState({saving:!0}),e.next=6,(0,f.applyStaffBuildOverride)(n);case 6:200===(r=e.sent).status?(a=r.body,t.setState({buildOverrides:a,loadedBuildOverrides:i.default.cloneDeep(a),errors:{},didSave:!0,saving:!1})):400===r.status?(o=r.body,t.setState({errors:o,saving:!1,didSave:!1})):t.setState({saving:!1,didSave:!1});case 8:case"end":return e.stop()}}),e)}))),t.handleLinkGeneration=function(){var e=t.state.buildOverrides;(0,M.openModal)((function(t){return a.createElement(X,x({},t,{buildOverrides:e}))}))},t}B(t,e);var r=t.prototype;return r.refreshBuildOverrides=function(){var e=F(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({loading:!0}),e.next=3,(0,p.getBuildOverride)();case 3:t=e.sent,this.setState({loading:!1,buildOverrides:t,loadedBuildOverrides:i.default.cloneDeep(t),errors:{}});case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.isDirty=function(){var e=this.state,t=e.buildOverrides,n=e.loadedBuildOverrides;return!i.default.isEqual(t,n)},r.componentDidMount=function(){this.refreshBuildOverrides()},r.getAvailableProjects=function(){var e=this.state.buildOverrides;if(null==e)return[];var t=Object.keys(e);return i.default.without.apply(i.default,[W].concat(t))},r.renderEmpty=function(){return V(E.default,{theme:m.default.theme,className:(0,o.default)(D.default.marginTop40,D.default.marginBottom20)},void 0,V(E.EmptyStateImage,{darkSrc:n(11617),lightSrc:n(11618),width:294,height:192}),$)},r.renderItems=function(){var e=this,t=this.state,n=t.buildOverrides,r=t.saving,a=t.errors;return null==n?null:i.default.map(n,(function(t,n){return V(K,{project:n,overrideType:t.type,overrideId:t.id,disabled:r,error:a[n],onBuildOverrideUpdated:e.handleBuildOverrideUpdated,onBuildOverrideRemoved:e.handleBuildOverrideRemoved},n)}))},r.renderRefreshButton=function(){return!this.state.didSave||this.isDirty()?null:V(g.default,{grow:0,direction:g.default.Direction.HORIZONTAL_REVERSE},void 0,V(g.default.Child,{grow:0},void 0,V(_.default,{onClick:function(){return location.reload()},color:_.default.Colors.PRIMARY},void 0,"Reload App")))},r.renderLinkButton=function(){var e=this.state.buildOverrides;return null==e||0===Object.keys(e).length?null:V(g.default,{grow:0,direction:g.default.Direction.HORIZONTAL_REVERSE},void 0,V(g.default.Child,{grow:0},void 0,V(_.default,{onClick:this.handleLinkGeneration,color:_.default.Colors.BRAND},void 0,"Generate Public Link")))},r.renderSaveButton=function(){if(!this.isDirty())return null;var e=this.state,t=e.saving,n=e.buildOverrides;return V(g.default,{grow:0,direction:g.default.Direction.HORIZONTAL_REVERSE},void 0,V(g.default.Child,{grow:0},void 0,V(_.default,{disabled:"discord_ios"in(n||{}),onClick:this.handleSaveChanges,submitting:t,color:_.default.Colors.GREEN},void 0,"Save Build Overrides")),V(g.default.Child,{grow:0},void 0,V(_.default,{onClick:this.handleDiscardChanges,disabled:t,color:_.default.Colors.RED},void 0,"Discard Changes")))},r.render=function(){var e,t=this.state,n=t.loading,r=t.saving,a=t.buildOverrides;e=n?V(O.default,{className:D.default.marginTop20}):null!=a&&0===Object.keys(a).length?this.renderEmpty():this.renderItems();var o=!r&&!n&&this.getAvailableProjects().length>0,i=null!=a&&"discord_ios"in a&&"stable"!==window.GLOBAL_ENV.RELEASE_CHANNEL?V(A.default,{color:A.default.Colors.STATUS_RED},void 0,"iOS build overrides must be generated on stable right now!"):null;return V(C.FormSection,{className:D.default.marginTop60},void 0,V(g.default,{className:D.default.marginBottom20},void 0,V(g.default.Child,{},void 0,V(C.FormTitle,{tag:C.FormTitleTags.H1},void 0,"Build Overrides")),V(g.default.Child,{grow:0},void 0,V(_.default,{size:_.ButtonSizes.SMALL,onClick:this.handleAddBuildOverride,disabled:!o},void 0,"Add Build Override"))),Z,V(g.default,{direction:g.default.Direction.VERTICAL},void 0,i,e,V(g.default,{grow:0,direction:g.default.Direction.HORIZONTAL_REVERSE},void 0,this.renderRefreshButton(),this.renderSaveButton(),this.renderLinkButton())))},t}(a.Component);q.displayName="BuildOverrides";var X=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={ttlSeconds:3600,releaseChannel:"all",userIds:[],userIdEntry:"",userIdEntryError:null,allowedVersions:[],allowedVersionEntry:"",allowedVersionEntryError:null,publicLink:" ",statusText:null,statusTextColor:A.default.Colors.STATUS_RED,allowLoggedOut:!1},t.setUserEntryError=function(e){t.setState({userIdEntryError:e})},t.setStatusMessage=function(e,n){t.setState({statusText:e,statusTextColor:n||A.default.Colors.STATUS_RED})},t.handleUserIDEntry=function(e){if(e=e.trim(),!/^\d+$/.test(e))return t.setUserEntryError("User IDs are numbers!");t.setState({userIdEntry:e})},t.handleUserEnter=function(e){e.charCode===P.KeyboardKeys.ENTER&&t.handleAddUser()},t.handleAddUser=function(){var e=t.state,n=e.userIds,r=e.userIdEntry;return 0===r.length?t.setUserEntryError("Enter a valid user ID!"):n.indexOf(r)>=0?t.setUserEntryError("You already added that user!"):void t.setState({userIds:[].concat(n,[r]),userIdEntry:""})},t.handleRemoveUser=function(e){var n=t.state.userIds;n=n.filter((function(t){return t!==e.value})),t.setState({userIds:n})},t.setAllowedVersionError=function(e){t.setState({allowedVersionEntryError:e})},t.handleAllowedVersionEntry=function(e){t.setState({allowedVersionEntry:e})},t.handleAllowedVersionEnter=function(e){e.charCode===P.KeyboardKeys.ENTER&&t.handleAddAllowedVersion()},t.handleAddAllowedVersion=function(){var e=t.state,n=e.allowedVersions,r=e.allowedVersionEntry;return 0===(r=r.trim()).length?t.setAllowedVersionError("Enter a valid version number!"):n.indexOf(r)>=0?t.setAllowedVersionError("You already added that version!"):void t.setState({allowedVersions:[].concat(n,[r]),allowedVersionEntry:"",allowedVersionEntryError:""})},t.handleRemoveAllowedVersion=function(e){var n=t.state.allowedVersions;n=n.filter((function(t){return t!==e.value})),t.setState({allowedVersions:n})},t.handleAllowLoggedOut=function(e){t.setState({allowLoggedOut:e})},t.handleExpirationChange=function(e){var n=e.value;t.setState({ttlSeconds:n})},t.handleReleaseChannelChange=function(e){var n=e.value;t.setState({releaseChannel:n})},t.generatePayload=function(){return{overrides:t.props.buildOverrides,meta:{release_channel:"all"===t.state.releaseChannel?null:t.state.releaseChannel,ttl_seconds:t.state.ttlSeconds,user_ids:t.state.userIds,allowed_versions:t.isIos()?t.state.allowedVersions:void 0,allow_logged_out:t.state.allowLoggedOut}}},t.handleGenerateLink=F(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.isIos()||0!==t.state.allowedVersions.length){e.next=3;break}return t.setAllowedVersionError("You must add at least one allowed version for iOS"),e.abrupt("return");case 3:return t.setStatusMessage(null),n=t.generatePayload(),e.next=7,(0,f.getPublicBuildOverrideLink)(n);case 7:!1!==(r=e.sent).error?t.setStatusMessage(r.error.toString(),A.default.Colors.STATUS_RED):(t.setState({publicLink:r.url.toString()}),0===n.meta.user_ids.length&&t.setStatusMessage("Warning! No users added to the whitelist! This link could be used by anyone to override their build.",A.default.Colors.STATUS_YELLOW));case 9:case"end":return e.stop()}}),e)}))),t}B(t,e);var r=t.prototype;return r.isIos=function(){return"discord_ios"in(this.props.buildOverrides||{})},r.renderSettingsForm=function(){var e=this,t=this.state,n=t.ttlSeconds,r=t.releaseChannel,o=t.userIdEntry,i=t.userIdEntryError,l=t.userIds,u=t.allowedVersions,s=t.allowedVersionEntry,d=t.allowedVersionEntryError,f=t.allowLoggedOut,p=c.BUILD_OVERRIDE_EXPIRATION_OPTIONS.find((function(e){return e.value===n})),v=u.map((function(e){return{label:e,value:e}})),y=l.map((function(e){return{label:e,value:e}}));return V(g.default,{direction:g.default.Direction.VERTICAL},void 0,V(C.FormItem,{title:"Expire After",className:D.default.marginBottom20},void 0,V(S.default,{value:null!=p?p.value:null,clearable:!1,searchable:!1,options:c.BUILD_OVERRIDE_EXPIRATION_OPTIONS,onChange:this.handleExpirationChange})),this.isIos()?null:V(C.FormItem,{title:"Release Channel",className:D.default.marginBottom20},void 0,V(S.default,{value:r,clearable:!1,searchable:!1,options:c.BUILD_OVERRIDE_RELEASE_CHANNEL_OPTIONS,onChange:this.handleReleaseChannelChange})),this.isIos()?a.createElement(a.Fragment,null,V(C.FormItem,{title:"Add allowed app version (required)",className:D.default.marginBottom20},void 0,V(g.default,{direction:g.default.Direction.HORIZONTAL},void 0,V(g.default.Child,{wrap:!0,basis:"90%"},void 0,V(T.default,{autoFocus:!0,value:s,onKeyPress:this.handleAllowedVersionEnter,error:d,onChange:this.handleAllowedVersionEntry,placeholder:"Example: 34.0"})),V(_.default,{onClick:this.handleAddAllowedVersion},void 0,"Add"))),V(C.FormItem,{title:"Remove allowed app version",className:D.default.marginBottom20},void 0,V(S.default,{options:v,onChange:this.handleRemoveAllowedVersion,disabled:0===u.length}))):null,this.isIos()?null:a.createElement(a.Fragment,null,V(C.FormItem,{title:"Add User ID (optional)",className:D.default.marginBottom20},void 0,V(g.default,{direction:g.default.Direction.HORIZONTAL},void 0,V(g.default.Child,{wrap:!0,basis:"90%"},void 0,V(T.default,{autoFocus:!0,value:o,onKeyPress:this.handleUserEnter,error:i,onBlur:function(){return e.setUserEntryError("")},onChange:this.handleUserIDEntry})),V(_.default,{onClick:this.handleAddUser},void 0,"Add"))),V(C.FormItem,{title:"Remove User ID",className:D.default.marginBottom20},void 0,V(S.default,{options:y,onChange:this.handleRemoveUser,disabled:0===l.length}))),V(I.default,{onChange:this.handleAllowLoggedOut,value:f},void 0,"Allow logged out users"))},r.renderPayloadBlock=function(){var e=JSON.stringify(this.generatePayload(),null,2),t=function(){return e},r=V(v.LazyLibrary,{createPromise:function(){return Promise.resolve().then(n.t.bind(null,1231,7))},webpackId:1231,renderFallback:t,render:function(n){var r=n.highlight("json",e,!0);return null==r?t():V("code",{className:"hljs scroller "+r.language+" "+w.default.scrollbarGhost+" "+R.default.codebox,dangerouslySetInnerHTML:{__html:r.value}})}});return V(h.default,{},void 0,V("pre",{},void 0,r))},r.renderLinkForm=function(){var e=this.state,t=e.statusTextColor,n=e.statusText,r=e.publicLink;return V("div",{},void 0,V(C.FormItem,{title:"Signed Link"},void 0,V(g.default,{},void 0,V(g.default.Child,{wrap:!0,basis:"75%"},void 0,V(d.default,{value:r})),V(_.default,{onClick:this.handleGenerateLink},void 0,"Generate Link"))),V(A.default,{color:t,className:D.default.marginBottom8+" "+D.default.marginTop8},void 0,n))},r.render=function(){var e=this.props,t=e.onClose,n=e.transitionState;return V(b.ModalRoot,{size:b.ModalSize.LARGE,transitionState:n,"aria-label":"Generate Public Build Override Link"},void 0,V(b.ModalHeader,{justify:g.default.Justify.BETWEEN,separator:!1},void 0,V(N.default,{tag:N.default.Tags.H2,size:N.default.Sizes.SIZE_20},void 0,"Generate Public Build Override Link"),V(b.ModalCloseButton,{onClick:t})),V(b.ModalContent,{},void 0,V(g.default,{},void 0,this.renderSettingsForm(),this.renderPayloadBlock()),this.renderLinkForm()))},t}(a.Component);X.displayName="BuildOverrideLinkModal";var J=function(e){var t=e.isTracingRequests,n=e.isForcedCanary,r=e.isLoggingGatewayEvents,a=e.isLoggingOverlayEvents,o=e.isLoggingAnalyticsEvents,i=(e.isAxeEnabled,e.isSourceMapsEnabled),l=e.isAnalyticsDebuggerEnabled;return V(C.FormSection,{title:"Developer Flags",tag:C.FormTitleTags.H1},void 0,V(I.default,{value:t,note:"Force trace all client requests with APM",onChange:function(e){return(0,u.setDeveloperOptionSettings)({trace:e})}},void 0,"Enable Tracing Requests"),V(I.default,{value:n,note:"Force all API requests to canary instances",onChange:function(e){return(0,u.setDeveloperOptionSettings)({canary:e})}},void 0,"Enable Forced Canary"),V(I.default,{value:r,note:"Logs all incoming and outgoing gateway events to the developer console, enable verbose logging in the developer console to see!",onChange:function(e){return(0,u.setDeveloperOptionSettings)({logGatewayEvents:e})}},void 0,"Enable Logging of Gateway Events to Console"),V(I.default,{value:a,note:"Logs all overlay related RPC events. Super noisy if an overlay is connected",onChange:function(e){return(0,u.setDeveloperOptionSettings)({logOverlayEvents:e})}},void 0,"Enable Logging of Overlay RPC Events & Commands"),V(I.default,{value:o,note:"Logs all analytics events to the developer console",onChange:function(e){return(0,u.setDeveloperOptionSettings)({logAnalyticsEvents:e})}},void 0,"Enable Logging of Analytics Events"),V(I.default,{value:i,note:"Only enable on devices you trust.",onChange:function(e){return(0,u.setDeveloperOptionSettings)({sourceMapsEnabled:e})}},void 0,"Enable source maps to be loaded on this client"),V(I.default,{value:l,note:"Displays a floating debugger with viewed impressions",onChange:function(e){return(0,u.setDeveloperOptionSettings)({analyticsDebuggerEnabled:e})}},void 0,"Enable standard analytics debugger view"),null)};J.displayName="DeveloperFlagsInner";var Q=l.default.connectStores([y.default],(function(){return{isTracingRequests:y.default.isTracingRequests,isForcedCanary:y.default.isForcedCanary,isLoggingGatewayEvents:y.default.isLoggingGatewayEvents,isLoggingOverlayEvents:y.default.isLoggingOverlayEvents,isLoggingAnalyticsEvents:y.default.isLoggingAnalyticsEvents,isAxeEnabled:y.default.isAxeEnabled,isSourceMapsEnabled:y.default.sourceMapsEnabled,isAnalyticsDebuggerEnabled:y.default.isAnalyticsDebuggerEnabled}}))(J),ee=V(a.Fragment,{},void 0,V(Q,{}),V(q,{})),te=function(e){function t(){return e.apply(this,arguments)||this}return B(t,e),t.prototype.render=function(){return ee},t}(a.PureComponent);te.displayName="UserSettingsModalDeveloperOptions";var ne=te;t.default=ne},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BUILD_OVERRIDE_RELEASE_CHANNEL_OPTIONS=t.BUILD_OVERRIDE_EXPIRATION_OPTIONS=void 0;t.BUILD_OVERRIDE_EXPIRATION_OPTIONS=[{value:3600,label:"1 Hour"},{value:86400,label:"1 Day"},{value:259200,label:"3 Days"},{value:604800,label:"1 Week"},{value:1209600,label:"2 Weeks"},{value:1814400,label:"3 Weeks"},{value:2628e3,label:"1 Month"}];t.BUILD_OVERRIDE_RELEASE_CHANNEL_OPTIONS=[{value:"all",label:"All"},{value:"canary",label:"Canary"},{value:"ptb",label:"PTB"},{value:"stable",label:"Stable"},{value:"staging",label:"Staging"}]},function(e,t,n){e.exports=n.p+"59c726954bd8424f376ca3a7eedc4c54.svg"},function(e,t,n){e.exports=n.p+"fe5ef0f14b8d025d73465e2d76913e20.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=U(n(0)),o=j(n(9)),i=j(n(3)),l=j(n(478)),u=j(n(274)),s=j(n(8416)),d=j(n(79)),f=j(n(39)),c=U(n(29)),p=j(n(61)),v=j(n(282)),y=U(n(8302)),m=j(n(1175)),_=j(n(10225)),h=j(n(1159)),E=j(n(8267)),g=j(n(149)),S=j(n(8382)),O=n(131),I=j(n(8662)),T=j(n(10465)),C=j(n(489)),b=n(393),M=j(n(16)),N=n(1),A=j(n(6)),P=j(n(8155)),R=j(n(5958)),L=j(n(1170)),D=j(n(7347)),w=j(n(370));function j(e){return e&&e.__esModule?e:{default:e}}function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function U(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=k();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function G(){return(G=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}).apply(this,arguments)}function F(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function B(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,H(e,t)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=i.default.connectStores([f.default],(function(){return{theme:f.default.theme}}))(y.default),V=M.default.isWindows(),W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={selectedValue:null},t.handleGameChange=function(e){var n=e.value;t.setState({selectedValue:n})},t.handleAdd=function(){var e=t.state.selectedValue;null!=e&&(l.default.addGame(e),(0,t.props.onClose)())},t.handleClose=function(){(0,t.props.onClose)()},t}return B(t,e),t.prototype.render=function(){var e=this.props.candidates,t=this.state.selectedValue,n=e.map((function(e){return{value:e.pid,label:null!=e.name?e.name:""}}));return F(v.default,{className:(0,o.default)(P.default.addGamePopout,R.default.elevationBorderHigh),"aria-label":A.default.Messages.SETTINGS_GAMES_ADD_NEW_GAME},void 0,F(h.default,{clearable:!1,options:n,onChange:this.handleGameChange,value:t,autofocus:!0}),F(O.FormDivider,{className:(0,o.default)(w.default.marginTop8,w.default.marginBottom8)}),F("div",{className:(0,o.default)(P.default.actions,L.default.horizontal)},void 0,F(c.default,{className:P.default.cancelButton,look:c.ButtonLooks.LINK,color:c.ButtonColors.GREY,onClick:this.handleClose},void 0,A.default.Messages.CANCEL),F(c.default,{disabled:null==t,onClick:this.handleAdd},void 0,A.default.Messages.SETTINGS_GAMES_ADD_NEW_GAME)))},t}(a.PureComponent);W.displayName="AddGamePopout";var Y=i.default.connectStores([d.default],(function(){return{candidates:d.default.getCandidateGames()}}))(W),z=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={editingName:null!=t.props.game&&t.props.game.name||"",gameName:null!=t.props.game&&t.props.game.name||""},t.handleRemoveClick=function(){var e=t.props.game;null!=e&&l.default.deleteEntry(e)},t.handleNameEdit=function(){var e=t.props.game,n=t.state.editingName;null!=e&&e.name!==n&&l.default.editName(e,n)},t.handleNameChange=function(e){t.setState({editingName:e.target.value})},t.handleOverlayToggle=function(){var e=t.props.game;null!=e&&l.default.toggleOverlay(e)},t}B(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.game,r=e.nowPlaying,a=t.editingName,o=t.gameName;return r&&null!=n&&n.name!==o&&n.name!==a?{editingName:n.name,gameName:n.name}:{gameName:null!=n?n.name:""}};var n=t.prototype;return n.renderName=function(){var e=this.props,t=e.game,n=e.isOverride;return null==t?F("div",{className:P.default.gameName},void 0,A.default.Messages.SETTINGS_GAMES_NO_GAME_DETECTED):t.verified&&!n?F("div",{className:P.default.detectedApplication},void 0,F("div",{className:P.default.gameName},void 0,t.name),F(g.default,{text:A.default.Messages.SETTINGS_GAMES_VERIFIED_ICON},void 0,(function(e){return a.createElement(m.default,G({className:P.default.gameVerifiedIcon,size:18,color:N.Colors.BRAND_500},e),F(C.default,{width:18,height:18,color:N.Colors.WHITE}))}))):F("input",{className:(0,o.default)(P.default.gameName,P.default.gameNameInput),type:"text",maxLength:128,value:this.state.editingName,onBlur:this.handleNameEdit,onKeyDown:this.handleEnterKey,onChange:this.handleNameChange})},n.renderLastPlayed=function(){var e=this.props,t=e.game,n=e.nowPlaying;if(null==t)return F("div",{className:P.default.lastPlayed},void 0,A.default.Messages.SETTINGS_GAMES_NOT_PLAYING);var r,a=t.played,o=t.exePath;return n?r=A.default.Messages.SETTINGS_GAMES_NOW_PLAYING_STATE:a&&(r=A.default.Messages.SETTINGS_GAMES_LAST_PLAYED.format({when:a})),F("div",{className:P.default.lastPlayed},void 0,F(_.default,{hoverText:o?o.toUpperCase():""},void 0,r))},n.renderOverlayToggle=function(){var e=this,t=this.props.game;if(!V||null==t)return null;var n=t.overlay,r=t.overlayWarn,i=n?A.default.Messages.SETTINGS_GAMES_OVERLAY_ON:A.default.Messages.SETTINGS_GAMES_OVERLAY_OFF,l=n?F(I.default,{className:P.default.overlayToggleIconOn,foreground:P.default.fill}):F(T.default,{className:P.default.overlayToggleIconOff,foreground:P.default.fill}),u=r?F(g.default,{text:A.default.Messages.SETTINGS_GAMES_OVERLAY_WARNING},void 0,(function(e){return a.createElement("i",G({className:P.default.overlayWarningIcon},e))})):null;return F("div",{className:(0,o.default)(L.default.flexCenter,L.default.noWrap,L.default.justifyBetween)},void 0,u,F("div",{className:P.default.overlayStatusText},void 0,i),F(g.default,{text:A.default.Messages.SETTINGS_GAMES_TOGGLE_OVERLAY},void 0,(function(t){var n=t.onMouseEnter,r=t.onMouseLeave;return F(p.default,{"aria-label":A.default.Messages.SETTINGS_GAMES_TOGGLE_OVERLAY,className:P.default.overlayToggleIcon,onClick:e.handleOverlayToggle,onMouseEnter:n,onMouseLeave:r},void 0,l)})))},n.renderRemove=function(){return F(s.default,{className:P.default.removeGame,onClick:this.handleRemoveClick})},n.render=function(){var e,t=this.props,n=t.nowPlaying,r=t.game,a=t.isOverride,i=null!=r;return F("div",{className:(0,o.default)(L.default.flexCenter,((e={})[P.default.game]=!n,e[P.default.activeGame]=n,e[D.default.card]=!n,e[P.default.nowPlaying]=i&&n,e[P.default.notDetected]=!i&&n,e))},void 0,F("div",{className:(0,o.default)(P.default.gameNameLastPlayed,L.default.vertical)},void 0,this.renderName(),this.renderLastPlayed()),this.renderOverlayToggle(),null==r||n&&!a?null:this.renderRemove())},n.handleEnterKey=function(e){13===e.keyCode&&(e.target.blur(),e.preventDefault())},t}(a.PureComponent);function K(e){var t=e.children;return F(x,{className:w.default.marginTop40},void 0,F(y.EmptyStateImage,{darkSrc:n(11620),lightSrc:n(11621),width:430,height:250}),t)}z.displayName="Game",z.defaultProps={nowPlaying:!1,isOverride:!1},K.displayName="GameEmptyStateImage";var $=F(K,{}),Z=function(e){function t(){return e.apply(this,arguments)||this}B(t,e);var n=t.prototype;return n.componentDidMount=function(){d.default.watchCandidateGames(!0)},n.componentWillUnmount=function(){d.default.watchCandidateGames(!1)},n.handleToggleShowCurrentGame=function(e){u.default.updateRemoteSettings({showCurrentGame:e})},n.renderPopout=function(e){return a.createElement(Y,e)},n.renderGameList=function(){var e=this.props,t=e.gameHistory,n=e.overrideExePaths;return t.length?F(O.FormSection,{className:w.default.marginTop40},void 0,F(O.FormTitle,{className:w.default.marginBottom4},void 0,A.default.Messages.SETTINGS_GAMES_ADDED_GAMES_LABEL),t.map((function(e){return F(z,{game:e,isOverride:n.has(e.exePath)},e.exePath)}))):F(K,{},void 0,F(y.EmptyStateText,{},void 0,A.default.Messages.SETTINGS_GAMES_NO_GAMES_HEADER))},n.renderGameDetails=function(){if(!M.default.embedded)return $;var e=this.props,t=e.runningGame,n=e.overrideExePaths;return a.createElement(a.Fragment,null,F(z,{game:t,isOverride:null!=t&&n.has(t.exePath),nowPlaying:!0}),F("div",{className:(0,o.default)(P.default.nowPlayingAdd,w.default.marginReset,w.default.marginTop8,w.default.marginBottom20)},void 0,F("span",{},void 0,A.default.Messages.SETTINGS_GAMES_NOT_SEEING_GAME),F(S.default,{closeOnScroll:!1,render:this.renderPopout,shadow:!1,position:S.default.Positions.BOTTOM},void 0,F(c.default,{look:c.ButtonLooks.LINK,size:c.ButtonSizes.MIN,color:c.ButtonColors.LINK},void 0,A.default.Messages.SETTINGS_GAMES_ADD_GAME))),this.renderGameList())},n.render=function(){var e=this.props.showCurrentGame,t=M.default.embedded?A.default.Messages.SHOW_CURRENT_ACTIVITY_DESC_EMBEDDED:A.default.Messages.SHOW_CURRENT_ACTIVITY_DESC;return F(a.Fragment,{},void 0,F(O.FormSection,{tag:O.FormTitle.Tags.H1,title:A.default.Messages.ACTIVITY_STATUS},void 0,F(E.default,{value:e,onChange:this.handleToggleShowCurrentGame,note:t},void 0,A.default.Messages.SHOW_CURRENT_ACTIVITY),this.renderGameDetails()))},t}(a.PureComponent);Z.displayName="UserSettingsGameActivity";var q=(0,b.cachedFunction)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Set(t.map((function(e){return e.exePath})))})),X=i.default.connectStores([f.default,d.default],(function(){return{showCurrentGame:f.default.showCurrentGame,gameHistory:d.default.getGamesSeen(!0),runningGame:d.default.getSettingsGame(),overrideExePaths:q.apply(void 0,d.default.getOverrides())}}))(Z);t.default=X},function(e,t,n){e.exports=n.p+"d01c53acda73318e5b39676ef8242eb7.svg"},function(e,t,n){e.exports=n.p+"bb8e02d970950bdadb649d765f3b8488.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(3)),i=h(n(11623)),l=h(n(11626)),u=h(n(11641)),s=h(n(11642)),d=h(n(12)),f=h(n(467)),c=h(n(47)),p=h(n(24)),v=h(n(11643)),y=n(1),m=h(n(6)),_=h(n(8165));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=g(i.default,{}),I=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var o=r.prototype;return o.renderIntroHeader=function(){return null==this.props.houseMembership?m.default.Messages.HYPESQUAD_HEADING:m.default.Messages.HYPESQUAD_HEADING_EXISTING_MEMBER},o.render=function(){var e=this.props,t=e.houseMembership,n=e.isClaimed,r=e.isVerified;return g(a.Fragment,{},void 0,g("div",{className:_.default.intro},void 0,g(c.default,{size:c.default.Sizes.SIZE_32,className:_.default.introHeader},void 0,this.renderIntroHeader()),g(p.default,{size:p.default.Sizes.SIZE_20},void 0,m.default.Messages.HYPESQUAD_SUBHEADING)),g(v.default,{className:_.default.verificationNotice,unclaimedNotice:m.default.Messages.HYPESQUAD_UNCLAIMED_ACCOUNT_NOTICE,unverifiedNotice:m.default.Messages.HYPESQUAD_UNVERIFIED_EMAIL_NOTICE}),g(l.default,{houseMembership:t,isClaimed:n,isVerified:r}),O,g(u.default,{isHypeSquadOnlineMember:null!=t}),g(f.default,{className:_.default.attendeeCTA},void 0,m.default.Messages.HYPESQUAD_ATTENDEE_CTA.format({url:y.MarketingURLs.HYPESQUAD})))},r}(a.PureComponent);I.displayName="UserSettingsHypeSquad";var T=o.default.connectStores([d.default,s.default],(function(){var e=d.default.getCurrentUser();return{houseMembership:s.default.getHouseMembership(),isClaimed:e.isClaimed(),isVerified:e.verified}}))(I);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(11624)),i=d(n(11625)),l=d(n(47)),u=d(n(6)),s=d(n(8158));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.render=function(){return c("div",{className:s.default.features},void 0,c(i.default,{className:s.default.video,videoID:"SWzB1mx2o5k"}),c(l.default,{className:s.default.perksHeading},void 0,u.default.Messages.HYPESQUAD_PERKS_HEADING),c(o.default,{features:[{icon:s.default.perkNewsletter,title:u.default.Messages.HYPESQUAD_PERK_TITLE_NEWSLETTER,description:u.default.Messages.HYPESQUAD_PERK_DESCRIPTION_NEWSLETTER},{icon:s.default.perkBadge,title:u.default.Messages.HYPESQUAD_PERK_TITLE_PROFILE_BADGE,description:u.default.Messages.HYPESQUAD_PERK_DESCRIPTION_PROFILE_BADGE},{icon:s.default.perkChallenges,title:u.default.Messages.HYPESQUAD_PERK_TITLE_SQUAD_CHALLENGES,description:u.default.Messages.HYPESQUAD_PERK_DESCRIPTION_SQUAD_CHALLENGES}]}))},r}(a.Component);v.displayName="HypeSquadPerks";var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(55)),l=s(n(8156)),u=s(n(370));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e=this.props,t=e.features,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["features"]);return t.map((function(e,t){var r;return null==e.predicate||e.predicate(n)?f(i.default,{align:i.default.Align.CENTER,className:(0,o.default)(u.default.marginTop20,l.default.feature,(r={},r[l.default.featureBorder]=0!==t,r))},t,null!=e.icon?f("div",{className:(0,o.default)(l.default.icon,e.icon)}):null,f("div",{},void 0,null!=e.title?f("div",{className:(0,o.default)(u.default.marginBottom8,l.default.title)},void 0,e.title):null,f("div",{className:l.default.description},void 0,e.description))):null}))},r}(a.Component);t.default=p,p.displayName="FeatureList"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=s(n(8524)),l=n(1),u=s(n(8157));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.prototype.render=function(){var e=this.props,t=e.className,n=e.videoID,r=e.videoClassName;return f(i.default,{aspectRatio:16/9,className:(0,o.default)(t,u.default.videoWrapper)},void 0,f("iframe",{className:(0,o.default)(r,u.default.video),src:"https://www.youtube.com/embed/"+n+"?rel=0&showinfo=0&controls=1&origin=https://"+l.PRIMARY_DOMAIN,allowFullScreen:!0,sandbox:"allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"}))},r}(a.Component);t.default=p,p.displayName="PromoVideo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i,l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),u=g(n(9)),s=g(n(29)),d=g(n(61)),f=g(n(55)),c=n(41),p=g(n(47)),v=g(n(24)),y=n(10485),m=g(n(11627)),_=n(1),h=g(n(6)),E=g(n(8162));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,r){i||(i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var l=new Array(o),u=0;u<o;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:i,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=((r={})[_.HypeSquadHouses.HOUSE_1]=E.default.membershipDialogHouse1,r[_.HypeSquadHouses.HOUSE_2]=E.default.membershipDialogHouse2,r[_.HypeSquadHouses.HOUSE_3]=E.default.membershipDialogHouse3,r),C=((a={})[_.HypeSquadHouses.HOUSE_1]=E.default.houseLogoHouse1,a[_.HypeSquadHouses.HOUSE_2]=E.default.houseLogoHouse2,a[_.HypeSquadHouses.HOUSE_3]=E.default.houseLogoHouse3,a),b=((o={})[_.HypeSquadHouses.HOUSE_1]=n(11638),o[_.HypeSquadHouses.HOUSE_2]=n(11639),o[_.HypeSquadHouses.HOUSE_3]=n(11640),o),M=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleJoinHypeSquadClick=function(){(0,c.openModal)((function(e){return l.createElement(m.default,e)}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n),r.prototype.render=function(){var e,t,n=this.props,r=n.houseMembership,a=n.isClaimed,o=n.isVerified;if(!a||!o)return null;if(null!=r){var i=h.default.Messages.HYPESQUAD_MEMBERSHIP_HEADING.format({houseName:(0,y.getHouseNameFromHouseID)(r)});return O("div",{className:(0,u.default)(E.default.membershipDialog,T[r])},void 0,O("div",{className:E.default.membershipDialogContent},void 0,O(f.default,{},void 0,O(f.default.Child,{grow:1,shrink:1},void 0,O(v.default,{className:E.default.membershipDialogHeading,size:v.default.Sizes.SIZE_12},void 0,h.default.Messages.HYPESQUAD_YOUR_HOUSE),O(p.default,{className:E.default.membershipDialogHouseName},void 0,i),O(v.default,{className:E.default.membershipDialogHouseDescription,size:v.default.Sizes.SIZE_16},void 0,(e=r,((t={})[_.HypeSquadHouses.HOUSE_1]=h.default.Messages.HYPESQUAD_DESCRIPTION_HOUSE_1,t[_.HypeSquadHouses.HOUSE_2]=h.default.Messages.HYPESQUAD_DESCRIPTION_HOUSE_2,t[_.HypeSquadHouses.HOUSE_3]=h.default.Messages.HYPESQUAD_DESCRIPTION_HOUSE_3,t)[e]))),O(f.default.Child,{className:E.default.houseLogoWrapper,grow:0,shrink:0,wrap:!0},void 0,O("img",{className:(0,u.default)(E.default.houseLogo,C[r]),src:b[r],alt:i}))),O(v.default,{className:E.default.membershipDialogSwitchHouses,size:v.default.Sizes.SIZE_16},void 0,h.default.Messages.HYPESQUAD_SWITCH_HOUSES_PROMPT,O(d.default,{className:E.default.membershipDialogSwitchHousesAction,onClick:this.handleJoinHypeSquadClick,tag:"span"},void 0,h.default.Messages.HYPESQUAD_SWITCH_HOUSES_ACTION))))}return O("div",{className:E.default.joinCTAWrapper},void 0,O(f.default,{className:E.default.joinCTA,align:f.default.Align.CENTER,justify:f.default.Justify.CENTER,direction:f.default.Direction.HORIZONTAL},void 0,O(f.default.Child,{grow:0,shrink:0},void 0,O(v.default,{},void 0,h.default.Messages.HYPESQUAD_READY_TO_REP)),O(f.default.Child,{grow:0,shrink:0},void 0,O(s.default,{onClick:this.handleJoinHypeSquadClick},void 0,h.default.Messages.HYPESQUAD_JOIN))),O(v.default,{className:E.default.newsletterWarning},void 0,h.default.Messages.HYPESQUAD_NEWSLETTER_WARNING))},r}(l.Component);t.default=M,M.displayName="JoinHypeSquadCTA"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),l=O(n(9)),u=O(n(469)),s=O(n(10486)),d=O(n(29)),f=n(85),c=n(35),p=O(n(47)),v=O(n(24)),y=n(10485),m=O(n(11628)),_=O(n(11629)),h=n(1),E=O(n(6)),g=O(n(8161)),S=O(n(370));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(){return(T=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}).apply(this,arguments)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n,r){o||(o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&a)for(var s in a)void 0===t[s]&&(t[s]=a[s]);else t||(t=a||{});return{$$typeof:o,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M=function(e){return b("div",{className:g.default.innerContentWrapper},void 0,e.children)};M.displayName="InnerContentWrapper";var N=((r={})[h.HypeSquadHouses.HOUSE_1]=n(11635),r[h.HypeSquadHouses.HOUSE_2]=n(11636),r[h.HypeSquadHouses.HOUSE_3]=n(11637),r),A=((a={})[h.HypeSquadHouses.HOUSE_1]=g.default.quizResultLogoWrapperHouse1,a[h.HypeSquadHouses.HOUSE_2]=g.default.quizResultLogoWrapperHouse2,a[h.HypeSquadHouses.HOUSE_3]=g.default.quizResultLogoWrapperHouse3,a),P=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={currentStep:0,hasSubmittedHouse:!1,hasUnknownError:!1,isRequestPending:!1,questions:(0,y.getQuestions)(),responses:{},selectedHouse:null},t.headerId=(0,f.uid)(),t.handleQuestionSelect=function(e){t.setState((function(t){var n;return{responses:T({},t.responses,(n={},n[t.currentStep]=e,n))}}))},t.handleSubmitButtonClick=function(){var e=t.getSelectedHouseID();t.setState({isRequestPending:!0},(function(){s.default.joinHypeSquadOnline({houseID:e}).then((function(){t.setState({hasUnknownError:!1,hasSubmittedHouse:!0,isRequestPending:!1,selectedHouse:e})})).catch((function(){t.setState({hasUnknownError:!0,hasSubmittedHouse:!1,isRequestPending:!1})}))}))},t.handleKeyDown=function(e){e.keyCode===h.KeyboardKeys.ENTER&&t.handleSubmitButtonClick()},t.handleNextQuestionButtonClick=function(){t.setState((function(e){return{currentStep:e.currentStep+1}}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var a=r.prototype;return a.getSelectedHouseID=function(){var e,t=this.state.responses,n={},r=0;return Object.keys(t).forEach((function(a){var o=t[a];null==n[o]&&(n[o]=0),n[o]++,n[o]>r&&(e=o,r=n[o])})),null==e||e===h.RANDOM_HYPESQUAD_HOUSE?(0,y.getRandomHouse)():e},a.renderUnknownErrorMessage=function(){return b(m.default,{},"error",b(i.Fragment,{},void 0,b(p.default,{className:g.default.quizResultHeading,size:p.default.Sizes.SIZE_24},void 0,E.default.Messages.HYPESQUAD_ERROR_HEADING),b(v.default,{},void 0,E.default.Messages.HYPESQUAD_ERROR_BODY.format({emailAddress:"hypesquad@"+h.EMAIL_DOMAIN,emailAddressLink:"mailto:hypesquad@"+h.EMAIL_DOMAIN}))))},a.renderQuizResult=function(){var e=this.state.selectedHouse;if(null==e)return null;var t,n,r=E.default.Messages.HYPESQUAD_QUIZ_TITLE.format({house:(0,y.getHouseNameFromHouseID)(e)});return b(m.default,{},"submit-step",b(i.Fragment,{},void 0,b("div",{className:(0,l.default)(g.default.quizResultLogoWrapper,A[e],S.default.marginBottom20)},void 0,b("img",{alt:r,className:g.default.quizResultLogo,src:N[e]})),b(p.default,{className:g.default.quizResultHeading,size:p.default.Sizes.SIZE_24},void 0,r),b(v.default,{className:g.default.quizResultBody},void 0,(t=e,((n={})[h.HypeSquadHouses.HOUSE_1]=E.default.Messages.HYPESQUAD_QUIZ_BODY_HOUSE_1,n[h.HypeSquadHouses.HOUSE_2]=E.default.Messages.HYPESQUAD_QUIZ_BODY_HOUSE_2,n[h.HypeSquadHouses.HOUSE_3]=E.default.Messages.HYPESQUAD_QUIZ_BODY_HOUSE_3,n)[t]))))},a.renderContent=function(){var e=this.state,t=e.currentStep,n=e.hasUnknownError,r=e.hasSubmittedHouse,a=e.questions;if(n)return this.renderUnknownErrorMessage();if(r)return this.renderQuizResult();var o=a[t];return b(m.default,{},t,b(_.default,{onSelect:this.handleQuestionSelect,options:o.options,prompt:o.prompt},t))},a.renderHeaderCopy=function(){var e=this.state,t=e.currentStep,n=e.hasUnknownError,r=e.hasSubmittedHouse,a=e.questions;return n?E.default.Messages.HYPESQUAD_QUIZ_ERROR_MODAL_TITLE:r?E.default.Messages.HYPESQUAD_QUIZ_COMPLETED_MODAL_TITLE:E.default.Messages.HYPESQUAD_QUIZ_ONGOING_MODAL_TITLE.format({currentQuestion:t+1,questionCount:a.length})},a.renderNewsletterWarning=function(){return b(m.default,{},void 0,b(v.default,{className:g.default.nameFormPreface,size:v.default.Sizes.SIZE_16},void 0,E.default.Messages.HYPESQUAD_NEWSLETTER_WARNING))},a.renderPrimaryAction=function(){var e=this.state,t=e.currentStep,n=e.responses,r=e.hasUnknownError,a=e.hasSubmittedHouse,o=e.isRequestPending,i=e.questions,l=null==n[t];return r?b(d.default,{type:"submit",color:d.default.Colors.BRAND,onClick:this.handleSubmitButtonClick,submitting:o},void 0,E.default.Messages.HYPESQUAD_QUIZ_RETRY):a?b(d.default,{type:"submit",color:d.default.Colors.BRAND,onClick:this.props.onClose},void 0,E.default.Messages.HYPESQUAD_QUIZ_CLOSE):t===i.length-1?b(d.default,{disabled:l,type:"submit",color:d.default.Colors.BRAND,onClick:this.handleSubmitButtonClick,submitting:o},void 0,E.default.Messages.HYPESQUAD_QUIZ_SHOW_MY_HOUSE):b(d.default,{disabled:l,type:"submit",color:d.default.Colors.BRAND,onClick:this.handleNextQuestionButtonClick},void 0,E.default.Messages.HYPESQUAD_QUIZ_NEXT_QUESTION)},a.renderSecondaryAction=function(){return this.state.hasSubmittedHouse?null:b(d.default,{type:"button",look:d.default.Looks.LINK,color:d.default.Colors.PRIMARY,onClick:this.props.onClose},void 0,E.default.Messages.HYPESQUAD_QUIZ_CANCEL)},a.render=function(){var e=this.state.selectedHouse,t=this.props.transitionState;return b(c.ModalRoot,{size:null==e?c.ModalSize.MEDIUM:c.ModalSize.SMALL,transitionState:t,"aria-labelledby":this.headerId},void 0,b(c.ModalHeader,{separator:!1,id:this.headerId},void 0,b(p.default,{tag:p.default.Tags.H2,size:p.default.Sizes.SIZE_20},void 0,this.renderHeaderCopy())),b("div",{className:g.default.outerContentWrapper},void 0,b(u.default,{component:M},void 0,this.renderContent())),b(c.ModalFooter,{},void 0,this.renderPrimaryAction(),this.renderSecondaryAction()))},r}(i.Component);P.displayName="HouseSelectionModal";var R=P;t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(273)),i=n(35),l=u(n(8159));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={isExiting:!1,offset:new o.default.Value(0),selectedValue:null},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var a=r.prototype;return a.componentWillEnter=function(e){var t=this.state.offset;t.setValue(1),o.default.spring(t,{toValue:0,duration:75}).start(e)},a.componentWillLeave=function(e){var t=this.state.offset;t.setValue(0),this.setState({isExiting:!0},(function(){o.default.spring(t,{toValue:-1,duration:75}).start(e)}))},a.render=function(){var e=this.state,t=e.isExiting,n=e.offset;return d(o.default.div,{className:l.default.wrapper,style:{left:0,position:t?"absolute":"relative",top:0,transform:[{translateX:n.interpolate({inputRange:[-1,1],outputRange:["-100%","100%"]})}]}},void 0,d(i.ModalContent,{className:l.default.contentWrapper},void 0,this.props.children))},r}(a.Component);t.default=c,c.displayName="HouseSelectionContent"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(9116)),i=c(n(11630)),l=c(n(1162)),u=c(n(47)),s=c(n(24)),d=c(n(6)),f=c(n(8160));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={selectedValue:null},t.getQuestionOptions=(0,o.default)((function(){return(0,i.default)(t.props.options.map((function(e){return{name:e.copy,value:e.house}})))})),t.handleOptionChange=function(e){var n=t.props.onSelect;t.setState({selectedValue:e.value}),n(e.value)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.prototype.render=function(){var e=this.state.selectedValue;return v(a.Fragment,{},void 0,v(u.default,{className:f.default.prompt,size:u.default.Sizes.SIZE_16},void 0,this.props.prompt),v("hr",{className:f.default.separator}),v(s.default,{className:f.default.selectYourAnswer,size:s.default.Sizes.SIZE_12},void 0,d.default.Messages.HYPESQUAD_QUIZ_SELECT_ANSWER),v(l.default,{options:this.getQuestionOptions(),onChange:this.handleOptionChange,value:e}))},r}(a.Component);t.default=m,m.displayName="QuestionGroup"},,,,,,function(e,t,n){e.exports=n.p+"a359371246d6353de6bc32715e092eba.svg"},function(e,t,n){e.exports=n.p+"8c59bddd746488fe8acf23d8d36c1a60.svg"},function(e,t,n){e.exports=n.p+"07ed671b6c823a6cae5be39860ac8bf0.svg"},function(e,t,n){e.exports=n.p+"59419b0683ef50f5e8ecd8748ecbcfeb.svg"},function(e,t,n){e.exports=n.p+"0f1eadc1ec3616e0b1c9ce515ee5683a.svg"},function(e,t,n){e.exports=n.p+"ac89ab7dd6f700d02b0ac958b98a3309.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=d(n(10486)),i=d(n(29)),l=d(n(24)),u=d(n(6)),s=d(n(8163));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={isRequestPending:!1,hasError:!1},t.handleLeaveHypeSquadError=function(){t.setState({hasError:!0})},t.handleLeaveHypeSquadClick=function(){t.setState({isRequestPending:!0},(function(){o.default.leaveHypeSquadOnline().then((function(){t.setState({isRequestPending:!1})})).catch((function(){t.setState({hasError:!0,isRequestPending:!1})}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var a=r.prototype;return a.renderErrorMessage=function(){return this.state.hasError?c("div",{className:s.default.error},void 0,u.default.Messages.HYPESQUAD_LEAVE_ERROR):null},a.render=function(){var e=this.state.isRequestPending;return this.props.isHypeSquadOnlineMember?c("div",{className:s.default.leaveActionWrapper},void 0,this.renderErrorMessage(),c(l.default,{},void 0,u.default.Messages.HYPESQUAD_LEAVE_PROMPT,c(i.default,{className:s.default.leaveButton,color:i.default.Colors.LINK,look:i.default.Looks.LINK,onClick:this.handleLeaveHypeSquadClick,size:i.default.Sizes.NONE,submitting:e},void 0,u.default.Messages.HYPESQUAD_LEAVE_ACTION))):null},r}(a.PureComponent);t.default=v,v.displayName="UserSettingsHypeSquad"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=l(n(12)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=null;var d=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),r.prototype.getHouseMembership=function(){return s},r}(r.default.Store))(a.default,{CONNECTION_OPEN:function(e){var t;(t=o.default.getCurrentUser()).hasFlag(i.UserFlags.HYPESQUAD_ONLINE_HOUSE_1)?s=i.HypeSquadHouses.HOUSE_1:t.hasFlag(i.UserFlags.HYPESQUAD_ONLINE_HOUSE_2)?s=i.HypeSquadHouses.HOUSE_2:t.hasFlag(i.UserFlags.HYPESQUAD_ONLINE_HOUSE_3)&&(s=i.HypeSquadHouses.HOUSE_3)},HYPESQUAD_ONLINE_MEMBERSHIP_LEAVE_SUCCESS:function(e){s=null},HYPESQUAD_ONLINE_MEMBERSHIP_JOIN_SUCCESS:function(e){s=e.houseID}});t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(3)),l=h(n(1184)),u=h(n(5995)),s=h(n(12)),d=h(n(29)),f=h(n(467)),c=h(n(55)),p=n(41),v=h(n(24)),y=h(n(5994)),m=h(n(6)),_=h(n(8164));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=g(c.default.Child,{grow:0,shrink:0},void 0,g(y.default,{})),I=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,S(t,n);var i=r.prototype;return i.renderNotice=function(){var e=this.props,t=e.isClaimed,n=e.unclaimedNotice,r=e.unverifiedNotice;return t?r:n},i.renderPrimaryAction=function(){return this.props.isClaimed?this.props.hasEmail?O:g(d.default,{size:d.default.Sizes.MEDIUM,color:d.default.Colors.BRAND,onClick:this.openChangeEmailModal},void 0,m.default.Messages.ADD_EMAIL_SHORT):g(c.default.Child,{grow:0,shrink:0},void 0,g(d.default,{size:d.default.Sizes.MEDIUM,color:d.default.Colors.BRAND,onClick:this.openClaimAccountModal},void 0,m.default.Messages.CLAIM_ACCOUNT))},i.renderSecondaryAction=function(){return this.props.isClaimed&&this.props.hasEmail?g(c.default.Child,{grow:0,shrink:0},void 0,g(d.default,{color:d.default.Colors.GREY,look:d.default.Looks.LINK,onClick:this.openChangeEmailModal},void 0,m.default.Messages.CHANGE_EMAIL_SHORT)):null},i.openClaimAccountModal=function(){(0,p.openModal)((function(e){return a.createElement(l.default,e)}))},i.openChangeEmailModal=function(){(0,p.openModal)((function(e){return a.createElement(u.default,e)}))},i.render=function(){var e=this.props,t=e.className,n=e.isClaimed,r=e.isVerified;return n&&r?null:g(f.default,{className:(0,o.default)(_.default.wrapper,t)},void 0,g(c.default,{align:c.default.Align.CENTER},void 0,g(c.default.Child,{className:_.default.image,grow:0,shrink:0}),g(c.default.Child,{},void 0,g(v.default,{},void 0,this.renderNotice()),g(c.default,{justify:c.default.Justify.CENTER,className:_.default.content},void 0,this.renderPrimaryAction(),this.renderSecondaryAction()))))},r}(a.Component);I.displayName="EmailNotice",I.defaultProps={unclaimedNotice:m.default.Messages.NOTICE_UNCLAIMED_ACCOUNT,unverifiedNotice:m.default.Messages.NOTICE_UNVERIFIED_ACCOUNT};var T=i.default.connectStores([s.default],(function(){var e=s.default.getCurrentUser();return{isClaimed:e.isClaimed(),isVerified:e.verified,hasEmail:null!=e.email}}))(I);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return a.createElement(a.Fragment,null,p(o.default,{section:s.AnalyticsSections.LIBRARY_INVENTORY_CODE_REDEMPTION},void 0,v),p(i.FormDivider,{className:d.default.divider}),p(o.default,{section:s.AnalyticsSections.LIBRARY_INVENTORY_GIFTS_LIST},void 0,y))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=f(n(8257)),i=n(131),l=f(n(11645)),u=f(n(11646)),s=n(1),d=f(n(8171));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var v=p(l.default,{}),y=p(u.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r,a=S(n(0)),o=n(3),i=E(n(5960)),l=E(n(8834)),u=E(n(160)),s=E(n(29)),d=E(n(55)),f=E(n(153)),c=n(131),p=n(41),v=S(n(13)),y=n(402),m=n(1),_=E(n(6)),h=E(n(8166));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(){return(I=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}).apply(this,arguments)}function T(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){T(o,r,a,i,l,"next",e)}function l(e){T(o,r,a,i,l,"throw",e)}i(void 0)}))}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var N=function(e){var t,n,r,o,u;function E(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={codeInput:"",submitting:!1,hasError:!1},t.handleChange=function(e){t.setState({codeInput:e,hasError:!1})},t.handleSubmit=function(){var e=C(regeneratorRuntime.mark((function e(n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.preventDefault(),""!==(r=t.state.codeInput)){e.next=4;break}return e.abrupt("return");case 4:if(null!=(o=(0,y.processGiftCodeInput)(r))){e.next=8;break}return t.setState({hasError:!0}),e.abrupt("return");case 8:return t.setState({submitting:!0}),e.prev=9,e.next=12,i.default.resolveGiftCode(o);case 12:v.default.track(m.AnalyticEvents.OPEN_MODAL,{type:"gift_accept",location:I({},t.analyticsLocation,{object:m.AnalyticsObjects.BUTTON_CTA})}),(0,p.openModal)((function(e){return a.createElement(l.default,I({code:o},e))})),t.setState({codeInput:""}),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(9),t.setState({hasError:!0});case 20:return e.prev=20,t.setState({submitting:!1}),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[9,17,20,23]])})));return function(t){return e.apply(this,arguments)}}(),t}return n=e,(t=E).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n),E.prototype.render=function(){var e=this.props.obscureInput,t=this.state,n=t.codeInput,r=t.submitting,a=t.hasError;return O(c.FormSection,{tag:c.FormTitleTags.H1,title:_.default.Messages.GIFT_INVENTORY_REDEEM_CODES},void 0,O(c.FormTitle,{},void 0,_.default.Messages.APPLICATION_ENTITLEMENT_CODE_REDEMPTION_PROMPT),O("form",{onSubmit:this.handleSubmit},void 0,O(d.default,{},void 0,O(f.default,{type:e?"password":"text",value:n,onChange:this.handleChange,placeholder:m.GIFT_CODE_REDEMPTION_PLACEHOLDER,error:a?_.default.Messages.APPLICATION_ENTITLEMENT_CODE_REDEMPTION_INVALID:null,className:h.default.codeRedemptionInput}),O(s.default,{type:"submit",submitting:r},void 0,_.default.Messages.APPLICATION_ENTITLEMENT_CODE_REDEMPTION_REDEEM))))},r=E,(o=[{key:"analyticsLocation",get:function(){return I({},this.props.analyticsContext.location,{object:m.AnalyticsObjects.BUTTON_CTA})}}])&&b(r.prototype,o),u&&b(r,u),E}(a.Component);function A(){var e=a.useContext(v.AnalyticsContext),t=(0,o.useStateFromStores)([u.default],(function(){return u.default.enabled}));return O(N,{analyticsContext:e,obscureInput:t})}N.displayName="CodeRedemption",A.displayName="ConnectedCodeRedemption"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=L(n(9)),i=L(n(8)),l=L(n(5)),u=n(3),s=L(n(2)),d=n(5829),f=L(n(473)),c=L(n(1166)),p=L(n(8295)),v=n(280),y=n(5979),m=n(11647),_=L(n(11648)),h=L(n(71)),E=L(n(5826)),g=L(n(29)),S=L(n(151)),O=n(131),I=L(n(35)),T=L(n(47)),C=L(n(24)),b=n(1161),M=n(402),N=L(n(11649)),A=n(1),P=L(n(6)),R=L(n(8170));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(){return(w=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}).apply(this,arguments)}function j(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function k(e){var t,n=e.outboundPromotion,r=e.code,i=e.addClaimedOutboundPromotionCode,u=a.useState(!1),s=u[0],d=u[1],f=a.useState(!1),m=f[0],h=f[1],E=function(){return d((function(e){return!e}))},S=(0,c.default)(),O=(0,y.getPromotionImageURL)(n.id,S),M=null!=r,N=M?(0,b.dateFormat)((0,l.default)(n.endDate).add(v.OUTBOUND_PROMOTION_REDEMPTION_EXPIRATION_WINDOW),"LL"):(0,b.dateFormat)((0,l.default)(n.endDate),"LL");M&&s?t=P.default.Messages.OUTBOUND_PROMOTION_CARD_CLAIMED_EXPANDED_BODY.format({endDate:N,onClickDetails:E}):M&&!s?t=P.default.Messages.OUTBOUND_PROMOTION_CARD_CLAIMED_UNEXPANDED_BODY.format({endDate:N,onClickDetails:E}):!M&&s?t=P.default.Messages.OUTBOUND_PROMOTION_CARD_UNCLAIMED_EXPANDED_BODY.format({endDate:N,onClickDetails:E}):M||s||(t=P.default.Messages.OUTBOUND_PROMOTION_CARD_UNCLAIMED_UNEXPANDED_BODY.format({endDate:N,onClickDetails:E}));var A=M?P.default.Messages.OUTBOUND_PROMOTION_SEE_CODE:P.default.Messages.PROMOTION_CARD_ACTION_CLAIM,L=a.useCallback((function(){return h(!1)}),[]),D=n.outboundTitle,k=n.outboundTermsAndConditions;return a.createElement(a.Fragment,null,j("div",{className:(0,o.default)(R.default.skuCard,R.default.promotionCard)},void 0,j("div",{className:R.default.mainPromotionCardContainer},void 0,j("div",{className:R.default.promotionCardLeftContainer},void 0,j("div",{className:R.default.promotionIcon},void 0,j("img",{alt:"",src:O,className:R.default.promotionIconImage})),j("div",{},void 0,j(T.default,{size:T.default.Sizes.SIZE_16},void 0,D),j(C.default,{size:C.default.Sizes.SIZE_14,color:C.default.Colors.STANDARD,className:R.default.promotionText},void 0,t))),j(g.default,{color:g.default.Colors.BRAND,size:g.default.Sizes.SMALL,onClick:function(){return h(!0)}},void 0,A)),s&&j(C.default,{className:R.default.promotionLegalese,size:C.default.Sizes.SIZE_12,color:C.default.Colors.HEADER_SECONDARY},void 0,p.default.parse(k))),m&&j(I.default,{renderModal:function(e){return a.createElement(_.default,w({},e,{onClose:L,onClaim:i,code:r,outboundPromotion:n}))},onCloseRequest:L}))}var U=function(){var e=(0,u.useStateFromStores)([h.default],(function(){return Boolean(h.default.lastFetched)})),t=(0,u.useStateFromStores)([E.default],(function(){return E.default.getGiftable()})),n=i.default.partition(t,(function(e){return null==e.giftCodeBatchId})),r=n[0],o=n[1],l=i.default.groupBy(r,(function(e){return(0,M.makeComboId)(e.skuId,e.subscriptionPlanId)})),c=a.useState(!1),p=c[0],y=c[1];a.useEffect((function(){s.default.wait((function(){(0,d.fetchGiftableEntitlements)().then((function(){return y(!0)}))}))}),[]);var _,g,I,T,C,b,L=(0,m.useOutboundPromotions)(),D=L.promotionsLoaded,w=L.activeOutboundPromotions,U=L.claimedEndedOutboundPromotions,G=L.claimedOutboundPromotionCodeMap,F=L.addClaimedOutboundPromotionCode;function B(){f.default.open(A.UserSettingsSections.PREMIUM)}return e&&p&&D?a.createElement(a.Fragment,null,(g=o.find((function(e){return e.giftCodeBatchId===v.BLACK_FRIDAY_2020_GIFT_CODE_BATCH_ID&&!e.consumed})),I=null!==(_=o.filter((function(e){return e.giftCodeBatchId===v.STICKERS_GIFT_CODE_BATCH_ID&&!e.consumed})))&&void 0!==_?_:[],T=i.default.partition(I,(function(e){return e.subscriptionPlanId===A.SubscriptionPlans.PREMIUM_YEAR_TIER_2})),C=T[0],b=T[1],j(O.FormSection,{tag:O.FormTitleTags.H1,title:w.length+U.length>0?P.default.Messages.GIFT_INVENTORY_YOUR_GIFTS:void 0},void 0,U.map((function(e){var t=e.code,n=e.promotion;return j(k,{outboundPromotion:n,code:t,addClaimedOutboundPromotionCode:F},n.id)})),w.map((function(e){return j(k,{outboundPromotion:e,code:G[e.id],addClaimedOutboundPromotionCode:F},e.id)})),null!=g?j(N.default,{className:R.default.skuCard,skuId:g.skuId,subscriptionPlanId:g.subscriptionPlanId,entitlements:[g],giftCodeBatchId:v.BLACK_FRIDAY_2020_GIFT_CODE_BATCH_ID},(0,M.makeComboId)(g.skuId,g.subscriptionPlanId)):null,C.length>0?j(N.default,{className:R.default.skuCard,skuId:C[0].skuId,subscriptionPlanId:C[0].subscriptionPlanId,entitlements:C,giftCodeBatchId:v.STICKERS_GIFT_CODE_BATCH_ID},(0,M.makeComboId)(C[0].skuId,C[0].subscriptionPlanId)):null,b.length>0?j(N.default,{className:R.default.skuCard,skuId:b[0].skuId,subscriptionPlanId:b[0].subscriptionPlanId,entitlements:b,giftCodeBatchId:v.STICKERS_GIFT_CODE_BATCH_ID},(0,M.makeComboId)(b[0].skuId,b[0].subscriptionPlanId)):null)),j(O.FormSection,{tag:O.FormTitleTags.H1,title:P.default.Messages.GIFT_INVENTORY_GIFTS_YOU_PURCHASED},void 0,0===Object.keys(l).length?j("div",{className:R.default.emptyState},void 0,j("div",{className:R.default.emptyStateImage}),j("h2",{className:R.default.emptyStateHeader},void 0,P.default.Messages.GIFT_INVENTORY_NO_GIFTS),j("p",{className:R.default.emptyStateSubtext},void 0,P.default.Messages.GIFT_INVENTORY_NO_GIFTS_SUBTEXT.format({onClick:B}))):i.default.keys(l).map((function(e){var t=(0,M.parseComboId)(e),n=t.skuId,r=t.subscriptionPlanId;return j(N.default,{className:R.default.skuCard,skuId:n,subscriptionPlanId:r,entitlements:l[e]},e)})))):j(S.default,{className:R.default.loading})};t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOutboundPromotions=function(){var e=(0,a.useStateFromStores)([s.default],(function(){return s.default.lastFetchedActivePromotions})),t=(0,a.useStateFromStores)([s.default],(function(){return s.default.getEligibleActiveOutboundPromotions()})),n=(0,a.useStateFromStores)([i.default],(function(){return i.default.getNullableCurrentUser()})),f=r.useState(!1),c=f[0],v=f[1],y=r.useState([]),m=y[0],_=y[1];r.useEffect((function(){null!=e&&o.default.wait((function(){return u.default.markOutboundPromotionsSeen()}))}),[e]);var h=r.useCallback((function(e){_((function(t){return t.some((function(t){return t.promotion.id===e.promotion.id}))?t:[].concat(t,[e])}))}),[]),E=(null==n?void 0:n.premiumType)===d.PremiumTypes.TIER_2;r.useEffect((function(){o.default.wait((function(){E&&(null==e&&u.default.fetchActiveOutboundPromotions(),(0,l.fetchClaimedOutboundPromotionCodes)().then((function(e){_(e),v(!0)})).catch((function(){_([]),v(!0)})))}))}),[e,E]);for(var g,S={},O=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(m);!(g=O()).done;){var I=g.value,T=I.code,C=I.promotion;S[C.id]=T}var b=new Set(t.map((function(e){return e.id}))),M=m.filter((function(e){var t=e.promotion;return!b.has(t.id)}));return{promotionsLoaded:!E||null!=e&&c,activeOutboundPromotions:t,claimedEndedOutboundPromotions:M,claimedOutboundPromotionCodeMap:S,addClaimedOutboundPromotionCode:h}};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=f(n(2)),i=f(n(12)),l=n(5979),u=f(n(9729)),s=f(n(8759)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(8688)),i=m(n(29)),l=m(n(151)),u=n(85),s=n(131),d=n(35),f=m(n(47)),c=m(n(24)),p=n(5979),v=m(n(6)),y=m(n(8167));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e){var t=e.onClose;return a.createElement(a.Fragment,null,h(d.ModalHeader,{separator:!1,className:y.default.errorHeader},void 0,h("div",{className:y.default.errorArt}),h(f.default,{size:f.default.Sizes.SIZE_24},void 0,v.default.Messages.GENERIC_ERROR_TITLE)),h(d.ModalContent,{className:y.default.errorBody},void 0,h(c.default,{size:c.default.Sizes.SIZE_16,className:y.default.bodyText},void 0,v.default.Messages.GENERIC_ERROR_BODY)),h(d.ModalFooter,{},void 0,h(i.default,{color:i.default.Colors.BRAND,onClick:t},void 0,v.default.Messages.CLOSE)))}function g(e){var t=e.onClose,n=e.onClaim,r=e.code,m=e.outboundPromotion,_=e.transitionState,g=a.useState(null),S=g[0],O=g[1],I=(0,u.useUID)();a.useEffect((function(){null==r&&(0,p.claimOutboundPromotion)(m.id).then((function(e){return n(e)})).catch((function(e){return O(e)}))}),[r,m.id,n]);var T=h(E,{onClose:t});return h(d.ModalRoot,{transitionState:_,"aria-labelledby":I},void 0,null!=S?T:null==r?h(d.ModalContent,{},void 0,h(l.default,{className:y.default.loading})):a.createElement(a.Fragment,null,h(d.ModalHeader,{separator:!1,className:y.default.headerContainer},void 0,h("div",{className:y.default.art}),h(f.default,{size:f.default.Sizes.SIZE_24},void 0,v.default.Messages.OUTBOUND_PROMOTION_REDEMPTION_MODAL_TITLE)),h(d.ModalContent,{},void 0,h(c.default,{size:c.default.Sizes.SIZE_16,className:y.default.bodyText},void 0,m.outboundRedemptionModalBody),h(s.FormDivider,{className:y.default.formDivider}),h(s.FormSection,{title:v.default.Messages.REDEMPTION_CODE,className:y.default.formSection},void 0,h(o.default,{value:r,buttonColor:i.default.Colors.BRAND,buttonLook:i.default.Looks.FILLED,delay:1e3,inputClassName:y.default.textInput}),h(c.default,{size:c.default.Sizes.SIZE_12,color:c.default.Colors.HEADER_SECONDARY,className:y.default.confirmationText},void 0,v.default.Messages.OUTBOUND_PROMOTION_CODE_CONFIRMATION_EMAIL))),h(d.ModalFooter,{},void 0,h(i.default,{color:i.default.Colors.BRAND,onClick:function(){var e=(0,p.getOutboundPromotionRedemptionUrl)(r,m);window.open(e,"_blank")}},void 0,v.default.Messages.REDEEM),h(i.default,{onClick:t,look:i.default.Looks.LINK,color:y.default.maybeLaterButton},void 0,v.default.Messages.MAYBE_LATER))))}g.displayName="OutboundPromotionRedemptionModal";var S=g;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=R(n(0)),o=A(n(5)),i=A(n(3)),l=n(57),u=A(n(5960)),s=n(280),d=A(n(11)),f=A(n(71)),c=A(n(8557)),p=A(n(160)),v=A(n(257)),y=A(n(373)),m=A(n(11650)),_=A(n(29)),h=A(n(61)),E=R(n(5969)),g=A(n(55)),S=A(n(477)),O=A(n(151)),I=A(n(683)),T=n(402),C=n(1163),b=n(1),M=A(n(6)),N=A(n(8169));function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function L(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function D(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){L(o,r,a,i,l,"next",e)}function l(e){L(o,r,a,i,l,"throw",e)}i(void 0)}))}}function w(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U(e,t)}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var G=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._copyModeTimeout=new l.Timeout,t.state={copyMode:E.CopyInputModes.DEFAULT},t.handleCopy=function(e){var n=t.props,r=n.giftCode,a=n.sku;(0,T.trackGiftCodeCopy)(r,a);try{(0,C.copy)(e),t.setState({copyMode:E.CopyInputModes.SUCCESS})}catch(e){t.setState({copyMode:E.CopyInputModes.ERROR})}t._copyModeTimeout.start(1e3,(function(){t.setState({copyMode:E.CopyInputModes.DEFAULT})}))},t}k(t,e);var n,r,i,s=t.prototype;return s.componentWillUnmount=function(){this._copyModeTimeout.stop()},s.handleRevoke=function(e){u.default.revokeGiftCode(e)},s.render=function(){var e=this,t=this.props,n=t.hideCode,r=t.giftCode,i=this.state.copyMode;return w(g.default,{direction:g.default.Direction.VERTICAL,className:N.default.giftCodeRow},void 0,w(E.default,{className:N.default.codeText,value:(0,T.getGiftCodeURL)(r.code),text:this.copyButtonText,mode:i,supportsCopy:C.SUPPORTS_COPY,hideMessage:n?M.default.Messages.GIFT_INVENTORY_HIDDEN:null,onCopy:this.handleCopy,buttonColor:E.default.ButtonColors.BRAND,buttonLook:E.default.ButtonLooks.FILLED}),w("div",{className:N.default.subTextRow},void 0,null!=r.expiresAt?w(a.Fragment,{},void 0,M.default.Messages.GIFT_INVENTORY_EXPIRES_IN.format({hours:r.expiresAt.diff((0,o.default)(),"h")})," ","— "):null,w(h.default,{tag:"a",onClick:function(){return e.handleRevoke(r.code)}},void 0,M.default.Messages.REVOKE)))},n=t,(r=[{key:"copyButtonText",get:function(){switch(this.state.copyMode){case E.CopyInputModes.SUCCESS:return M.default.Messages.BILLING_GIFT_COPIED;case E.CopyInputModes.ERROR:return M.default.Messages.FAILED;default:return M.default.Messages.COPY}}}])&&j(n.prototype,r),i&&j(n,i),t}(a.PureComponent);G.displayName="GiftCodeRow";var F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._loadedAt=null,t.state={isOpen:!1,isCreating:!1},t.handleGenerateGiftCode=function(){var e=D(regeneratorRuntime.mark((function e(n){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.stopPropagation(),r=t.props,a=r.skuId,o=r.subscriptionPlanId,t.setState({isCreating:!0}),e.next=5,u.default.createGiftCode(a,o);case 5:t.setState({isCreating:!1,isOpen:!0});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.handleToggleOpen=function(){var e=t.props,n=e.skuId,r=e.subscriptionPlanId,a=e.loadedAt,o=!t.state.isOpen;(null==a||null==t._loadedAt||a<t._loadedAt)&&o&&u.default.fetchUserGiftCodesForSKU(n,r),t.setState({isOpen:!t.state.isOpen})},t}k(t,e);var n=t.prototype;return n.componentDidMount=function(){this._loadedAt=Date.now()},n.renderTitle=function(){var e,t=this.props,n=t.sku,r=t.subscriptionPlan,a=t.giftCodeBatchId;return e=a===s.BLACK_FRIDAY_2020_GIFT_CODE_BATCH_ID?M.default.Messages.BLACK_FRIDAY_PROMOTION_GIFT_INVENTORY_TITLE:a===s.STICKERS_GIFT_CODE_BATCH_ID&&null!=r?(r.interval===b.SubscriptionIntervalTypes.MONTH?M.default.Messages.STICKERS_GIFT_INVENTORY_TITLE_MONTH:M.default.Messages.STICKERS_GIFT_INVENTORY_TITLE_YEAR).format({skuName:n.name,intervalCount:r.intervalCount}):null==r?n.name:(r.interval===b.SubscriptionIntervalTypes.MONTH?M.default.Messages.GIFT_INVENTORY_SUBSCRIPTION_MONTHS:M.default.Messages.GIFT_INVENTORY_SUBSCRIPTION_YEARS).format({skuName:n.name,intervalCount:r.intervalCount}),w("div",{className:N.default.gameName},void 0,e)},n.renderGenerateGiftCodeRow=function(){return w(g.default,{justify:g.default.Justify.BETWEEN,align:g.default.Align.CENTER,className:N.default.generateCodeRow},void 0,w("div",{className:N.default.codeText},void 0,M.default.Messages.GIFT_INVENTORY_GENERATE_HELP),w(_.default,{submitting:this.state.isCreating,size:_.default.Sizes.SMALL,color:_.default.Colors.BRAND,onClick:this.handleGenerateGiftCode},void 0,M.default.Messages.GIFT_INVENTORY_GENERATE_LINK))},n.render=function(){var e=this.props,t=e.entitlements,n=e.application,r=e.giftCodes,o=e.className,i=e.sku,l=e.isFetching,u=e.hideCodes,s=this.state.isOpen;return w(m.default,{className:o},void 0,w(h.default,{onClick:this.handleToggleOpen,className:N.default.card},void 0,w(m.default.Header,{splashArtURL:n.getSplashURL(512)},void 0,w("div",{className:N.default.cardHeader},void 0,w(g.default,{align:g.default.Align.CENTER},void 0,w(S.default,{game:n,size:S.default.Sizes.MEDIUM,skuId:i.id}),w("div",{className:N.default.headerText},void 0,this.renderTitle(),w("div",{className:N.default.subTextHeader},void 0,M.default.Messages.GIFT_INVENTORY_COPIES.format({copies:t.length})))),w(I.default,{direction:s?I.default.Directions.UP:I.default.Directions.DOWN,className:N.default.expandIcon})))),s?w(m.default.Body,{},void 0,l?w(O.default,{className:N.default.spinner}):w(a.Fragment,{},void 0,r.length<t.length?this.renderGenerateGiftCodeRow():null,r.map((function(e){return w(G,{giftCode:e,sku:i,hideCode:u},e.code)})))):null)},t}(a.PureComponent);F.displayName="EntitlementGiftGroupCard";var B=i.default.connectStores([y.default,p.default,c.default,f.default,v.default,d.default],(function(e){var t=e.skuId,n=e.subscriptionPlanId,r=y.default.get(t);if(null==r)throw new Error("SKU was unavailable while rendering gift.");return{sku:r,hideCodes:p.default.enabled,isFetching:c.default.getUserGiftCodesFetchingForSKUAndPlan(t,n),loadedAt:c.default.getUserGiftCodesLoadedAtForSKUAndPlan(t,n),application:f.default.getGame(r.applicationId),subscriptionPlan:null!=n?v.default.get(n):null,giftCodes:c.default.getForGifterSKUAndPlan(d.default.getId(),t,n).filter((function(e){return!e.isClaimed}))}}))(F);t.default=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=u(n(9)),i=u(n(55)),l=u(n(8168));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var c=function(e){var t=e.children,n=e.className,r=e.splashArtURL;return f(i.default,{className:(0,o.default)(l.default.header,n),align:i.default.Align.CENTER},void 0,f("div",{className:l.default.splashArt,style:null!=r?{backgroundImage:"url("+r+")"}:void 0}),t)};c.displayName="ActivityFeedCardHeader";var p=function(e){var t=e.children,n=e.className;return f("div",{className:(0,o.default)(l.default.body,n)},void 0,t)};p.displayName="ActivityFeedCardBody";var v=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),r.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=e.onMouseEnter,a=e.onMouseLeave;return f("div",{className:(0,o.default)(l.default.card,n),onMouseEnter:r,onMouseLeave:a},void 0,t)},r}(a.PureComponent);v.displayName="ActivityFeedCard",v.Header=c,v.Body=p;var y=v;t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=x(n(0)),o=B(n(9)),i=B(n(8)),l=B(n(3)),u=B(n(10488)),s=B(n(8416)),d=B(n(8766)),f=B(n(1257)),c=n(1298),p=n(8535),v=n(9069),y=B(n(403)),m=B(n(1273)),_=n(1435),h=B(n(1180)),E=B(n(694)),g=B(n(51)),S=B(n(1287)),O=B(n(39)),I=x(n(29)),T=x(n(8302)),C=B(n(55)),b=x(n(8353)),M=B(n(1159)),N=n(131),A=x(n(474)),P=B(n(47)),R=B(n(24)),L=B(n(93)),D=B(n(16)),w=x(n(401)),j=n(1),k=B(n(6)),U=B(n(8172)),G=B(n(7347)),F=B(n(370));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Y(){return(Y=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}).apply(this,arguments)}function z(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,K(e,t)}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(e){return(0,e.children)([p.KeybindGroup.MESSAGE,p.KeybindGroup.NAVIGATION,p.KeybindGroup.CHAT,p.KeybindGroup.VOICE_AND_VIDEO,p.KeybindGroup.MISCELLANEOUS])}var Z=(0,i.default)((0,p.getDefaultLayoutContent)()).filter((function(e){return e.description!==k.default.Messages.KEYBIND_DESCRIPTION_MODAL_EASTER_EGG})).groupBy((function(e){return e.group})).value(),q=l.default.connectStores([O.default],(function(){return{theme:O.default.theme}}))(T.default),X=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleActionChanged=function(e){u.default.setKeybind(Y({},t.props.keybind,{action:e.value}))},t.handleShortcutChange=function(e){u.default.setKeybind(Y({},t.props.keybind,{shortcut:e}))},t.handleDeleteKeybind=function(){u.default.deleteKeybind(t.props.keybind.id)},t}z(t,e);var n=t.prototype;return n.renderMessage=function(){var e=this.props.keybind,t=w.toString(e.shortcut);return y.default.hasBind(t)?W(A.default,{className:U.default.keybindMessage,type:A.Types.DESCRIPTION,style:{color:j.Colors.STATUS_RED}},void 0,k.default.Messages.KEYBIND_CONFLICT):_.NavigationShortcuts.has(t)?W(A.default,{className:U.default.keybindMessage,type:A.Types.DESCRIPTION,style:{color:j.Colors.STATUS_RED}},void 0,k.default.Messages.KEYBIND_NAVIGATION_CONFLICT.format({keyboardNavArticle:L.default.getArticleURL(j.HelpdeskArticles.KEYBOARD_NAVIGATION)})):W(A.default,{className:U.default.keybindMessage,type:A.Types.DESCRIPTION},void 0,this.props.keybindDescriptions[e.action])},n.render=function(){var e=this.props.keybind.managed;return W(C.default,{direction:C.default.Direction.VERTICAL,className:(0,o.default)(U.default.keybindGroup,G.default.card)},void 0,!e&&W(s.default,{"aria-label":k.default.Messages.REMOVE_KEYBIND,className:U.default.removeKeybind,onClick:this.handleDeleteKeybind,look:s.default.Looks.FILLED}),W(C.default,{className:F.default.marginBottom8},void 0,W(C.default.Child,{basis:"50%"},void 0,W(N.FormItem,{title:k.default.Messages.USER_SETTINGS_KEYBINDS_ACTION,className:U.default.item},void 0,W(M.default,{options:this.props.keybindActionTypes,onChange:this.handleActionChanged,value:this.props.keybind.action,clearable:!1,searchable:!1,disabled:e}))),W(C.default.Child,{basis:"50%"},void 0,W(N.FormItem,{title:k.default.Messages.USER_SETTINGS_KEYBINDS_KEYBIND,className:U.default.item},void 0,W(d.default,{defaultValue:this.props.keybind.shortcut,onChange:this.handleShortcutChange})))),W(C.default.Child,{},void 0,this.renderMessage()))},t}(a.PureComponent);X.displayName="KeybindEntry";var J=W(N.FormDivider,{}),Q=W(N.FormDivider,{}),ee=W(N.FormDivider,{}),te=W(N.FormDivider,{}),ne=W(N.FormDivider,{}),re=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleAddKeybind=function(){u.default.addKeybind()},t}z(t,e);var r,l,s,d=t.prototype;return d.componentDidMount=function(){y.default.disable()},d.componentWillUnmount=function(){y.default.enable(),E.default.getLayers().indexOf(j.Layers.USER_SETTINGS)>=0&&y.default.enableTemp(v.SETTINGS_LAYERS_LAYOUT)},d.renderKeybinds=function(e){var t=this;return e.map((function(e){return W("div",{className:U.default.row},e.id,W(X,{keybind:e,keybindDescriptions:t.keybindDescriptions,keybindActionTypes:t.keybindActionTypes},e.id))}))},d.renderEmpty=function(e){if(0===e.length)return W(q,{className:F.default.marginTop60},void 0,W(T.EmptyStateImage,{darkSrc:n(11652),lightSrc:n(11653),width:320,height:170}))},d.render=function(){var e=(0,i.default)(this.props.keybinds).reject((function(e){return e.managed&&e.action!==j.KeybindCustomActions.OVERLAY_ACTIVATE_REGION_TEXT_WIDGET})).sortBy((function(e){return e.id})).sortBy((function(e){return!0===e.managed?-1:0})).value();return a.createElement(a.Fragment,null,W(N.FormSection,{tag:N.FormTitleTags.H1,title:k.default.Messages.KEYBINDS},void 0,D.default.embedded?a.createElement(a.Fragment,null,W(C.default,{justify:C.default.Justify.BETWEEN,className:F.default.marginBottom20},void 0,W(C.default.Child,{grow:0},void 0,W(b.default,{messageType:b.HelpMessageTypes.WARNING},void 0,k.default.Messages.ADD_KEYBIND_WARNING)),W(C.default.Child,{wrap:!0,grow:0},void 0,W(I.default,{size:I.ButtonSizes.LARGE,onClick:this.handleAddKeybind},void 0,k.default.Messages.ADD_KEYBIND))),J,W(N.FormSection,{},void 0,this.renderKeybinds(e),this.renderEmpty(e))):W(b.default,{messageType:b.HelpMessageTypes.INFO,fontSize:b.HelpMessageFontSizes.FONT_SIZE_16,className:U.default.browserNotice},void 0,k.default.Messages.KEYBIND_IN_BROSWER_NOTICE.format({downloadLink:j.MarketingURLs.DOWNLOAD}))),Q,W(N.FormSection,{tag:N.FormTitleTags.H1,title:k.default.Messages.USER_SETTINGS_KEYBINDS_DEFAULT_KEYBINDS_TITLE,className:F.default.marginTop60},void 0,W("div",{className:U.default.defaultKeybind},void 0,W(R.default,{size:R.default.Sizes.SIZE_16},void 0,k.default.Messages.USER_SETTINGS_KEYBINDS_SHOW_LIST_TITLE),W("div",{className:U.default.defaultKeybindShortcutGroup},void 0,W(f.default,{shortcut:c.TOGGLE_HOTKEYS.binds[0],className:U.default.defaultKeybindShortcut}))),ee,W($,{},void 0,(function(e){return a.createElement(a.Fragment,null,e.map((function(e){var t,n=(0,p.getNameForKeybindGroup)(e),r=(0,p.getDescriptionForKeybindGroup)(e),i=Z[e];return W("div",{className:U.default.defaultKeybindGroup},void 0,W(P.default,{tag:P.default.Tags.H3,size:P.default.Sizes.SIZE_12,className:(0,o.default)(U.default.defaultKeybindGroupHeader,(t={},t[U.default.defaultKeybindGroupWithDescription]=null!=r,t))},void 0,n),null!=r&&W(R.default,{color:R.default.Colors.HEADER_SECONDARY,className:U.default.defaultKeybindGroupDescription},void 0,r),te,i.map((function(e){return W(a.Fragment,{},e.description,W("div",{className:U.default.defaultKeybind},void 0,W(R.default,{size:R.default.Sizes.SIZE_16},void 0,e.description),W("div",{className:U.default.defaultKeybindShortcutGroup},void 0,e.binds.map((function(e){return W(f.default,{shortcut:e,className:U.default.defaultKeybindShortcut},e)})))),ne)})))})))}))))},r=t,(l=[{key:"keybindActionTypes",get:function(){var e=this.props,t=e.overlaySupported,n=e.canGoLive,r=[{value:j.KeybindCustomActions.UNASSIGNED,label:k.default.Messages.KEYBIND_UNASSIGNED},{value:j.KeybindCustomActions.PUSH_TO_TALK,label:k.default.Messages.KEYBIND_PUSH_TO_TALK},{value:j.KeybindCustomActions.PUSH_TO_TALK_PRIORITY,label:k.default.Messages.KEYBIND_PUSH_TO_TALK_PRIORITY},{value:j.KeybindCustomActions.PUSH_TO_MUTE,label:k.default.Messages.KEYBIND_PUSH_TO_MUTE},{value:j.KeybindCustomActions.TOGGLE_MUTE,label:k.default.Messages.KEYBIND_TOGGLE_MUTE},{value:j.KeybindCustomActions.TOGGLE_DEAFEN,label:k.default.Messages.KEYBIND_TOGGLE_DEAFEN},{value:j.KeybindCustomActions.TOGGLE_VOICE_MODE,label:k.default.Messages.KEYBIND_TOGGLE_VOICE_MODE},{value:j.KeybindCustomActions.TOGGLE_STREAMER_MODE,label:k.default.Messages.KEYBIND_TOGGLE_STREAM_MODE}];return t&&(r.push({value:j.KeybindCustomActions.TOGGLE_OVERLAY,label:k.default.Messages.KEYBIND_TOGGLE_OVERLAY}),r.push({value:j.KeybindCustomActions.TOGGLE_OVERLAY_INPUT_LOCK,label:k.default.Messages.KEYBIND_TOGGLE_OVERLAY_INPUT_LOCK}),r.push({value:j.KeybindCustomActions.OVERLAY_ACTIVATE_REGION_TEXT_WIDGET,label:k.default.Messages.KEYBIND_ACTIVATE_OVERLAY_CHAT})),n&&D.default.isWindows()&&r.push({value:j.KeybindCustomActions.TOGGLE_GO_LIVE_STREAMING,label:k.default.Messages.KEYBIND_TOGGLE_GO_LIVE_STREAMING}),D.default.isDesktop()&&r.push({value:j.KeybindCustomActions.NAVIGATE_BACK,label:k.default.Messages.KEYBIND_NAVIGATE_BACK},{value:j.KeybindCustomActions.NAVIGATE_FORWARD,label:k.default.Messages.KEYBIND_NAVIGATE_FORWARD}),r}},{key:"keybindDescriptions",get:function(){var e,t=this.props,n=t.overlaySupported,r=t.canGoLive,a=((e={})[j.KeybindCustomActions.UNASSIGNED]=k.default.Messages.KEYBIND_DESCRIPTION_UNASSIGNED,e[j.KeybindCustomActions.PUSH_TO_MUTE]=k.default.Messages.KEYBIND_DESCRIPTION_PUSH_TO_MUTE,e[j.KeybindCustomActions.PUSH_TO_TALK]=k.default.Messages.KEYBIND_DESCRIPTION_PUSH_TO_TALK,e[j.KeybindCustomActions.PUSH_TO_TALK_PRIORITY]=k.default.Messages.KEYBIND_DESCRIPTION_PUSH_TO_TALK_PRIORITY,e[j.KeybindCustomActions.TOGGLE_MUTE]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_MUTE,e[j.KeybindCustomActions.TOGGLE_DEAFEN]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_DEAFEN,e[j.KeybindCustomActions.TOGGLE_VOICE_MODE]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_VOICE_MODE,e[j.KeybindCustomActions.TOGGLE_STREAMER_MODE]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_STREAMER_MODE,e);return n&&(a[j.KeybindCustomActions.TOGGLE_OVERLAY]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_OVERLAY,a[j.KeybindCustomActions.TOGGLE_OVERLAY_INPUT_LOCK]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_OVERLAY_INPUT_LOCK),r&&D.default.isWindows()&&(a[j.KeybindCustomActions.TOGGLE_GO_LIVE_STREAMING]=k.default.Messages.KEYBIND_DESCRIPTION_TOGGLE_GO_LIVE_STREAMING),D.default.isDesktop()&&(a[j.KeybindCustomActions.NAVIGATE_BACK]=k.default.Messages.KEYBIND_DESCRIPTION_NAVIGATE_BACK,a[j.KeybindCustomActions.NAVIGATE_FORWARD]=k.default.Messages.KEYBIND_DESCRIPTION_NAVIGATE_FORWARD),a}}])&&V(r.prototype,l),s&&V(r,s),t}(a.PureComponent);re.displayName="UserSettingsKeybinds";var ae=l.default.connectStores([h.default,g.default,S.default],(function(){return{keybinds:h.default.getState(),canGoLive:(0,m.default)(g.default),overlaySupported:S.default.isSupported()}}))(re);t.default=ae},function(e,t,n){e.exports=n.p+"f3bb89a27e9d102f748da035cd7e5df7.svg"},function(e,t,n){e.exports=n.p+"21b610d45d1f2175431413ad53258aa6.svg"},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(3)),i=c(n(274)),l=c(n(39)),u=c(n(1162)),s=n(131),d=c(n(6)),f=c(n(8173));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(t){var r=a.useState(t.currentLocale),o=r[0],l=r[1],c=a.useState((function(){return d.default.getAvailableLocales().map((function(e){var t;try{t=n(1358)("./"+e.value+".png")}catch(e){t=n(1409)}return y({},e,{name:v("div",{className:f.default.option},void 0,v("span",{className:f.default.localeName},void 0,e.name),v("span",{className:f.default.localizedName},void 0,e.localizedName),v("div",{className:f.default.flag,"aria-hidden":!0},void 0,v("img",{alt:"",src:t,className:f.default.flagImage})))})}))}))[0],p=a.useCallback((function(t){var n=t.value;l(n),e.nextTick((function(){return i.default.updateRemoteSettings({locale:n})}))}),[]);return v(s.FormSection,{tag:s.FormTitleTags.H1,title:d.default.Messages.LANGUAGE},void 0,v(s.FormSection,{},void 0,v(s.FormTitle,{},void 0,d.default.Messages.LANGUAGE_SELECT),v(u.default,{onChange:p,options:c,value:o})))}m.displayName="UserSettingsLocale";var _=o.default.connectStores([l.default],(function(){return{currentLocale:l.default.locale}}))(m);t.default=_}).call(this,n(100))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=N(n(9)),i=N(n(8)),l=N(n(3)),u=N(n(5848)),s=N(n(274)),d=N(n(1436)),f=P(n(1301)),c=N(n(11656)),p=N(n(8359)),v=N(n(39)),y=N(n(61)),m=N(n(1162)),_=N(n(1159)),h=N(n(8267)),E=n(131),g=N(n(8276)),S=N(n(10222)),O=N(n(16)),I=P(n(1247)),T=n(1),C=N(n(6)),b=N(n(8174)),M=N(n(370));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e){var t=e.label,n=e.enabled,r=e.onPreview,a=e.onChange;return L(h.default,{className:b.default.soundRow,value:n,onChange:a},void 0,L("div",{className:b.default.notificationSound},void 0,L("div",{className:b.default.soundName},void 0,t),L(y.default,{className:b.default.soundIcon,onClick:r,"aria-label":C.default.Messages.USER_SETTINGS_NOTIFICATIONS_PREVIEW_SOUND},void 0,L(g.default,{width:16,height:16,className:b.default.icon,"aria-hidden":!0}))))}D.displayName="NotificationSound";var w=L(c.default,{});function j(e){var t=e.disabledSounds,n=d.default.useExperiment({})[0].allowSoundpacks;a.useEffect((function(){d.default.trackExposure({})}),[]);var r=a.useRef(),i=a.useCallback((function(e,t){t.stopPropagation(),t.preventDefault(),null!=r.current&&r.current.stop(),r.current=I.playSound(e)}),[]),l=a.useCallback((function(e,n){var r=t.filter((function(t){return t!==e}));n||r.push(e),u.default.setDisabledSounds(r)}),[t]),s=[{label:C.default.Messages.SOUND_MESSAGE,sound:"message1"},{label:C.default.Messages.SOUND_DEAFEN,sound:"deafen"},{label:C.default.Messages.SOUND_UNDEAFEN,sound:"undeafen"},{label:C.default.Messages.MUTE,sound:"mute"},{label:C.default.Messages.UNMUTE,sound:"unmute"},{label:C.default.Messages.SOUND_VOICE_DISCONNECTED,sound:"disconnect"},{label:C.default.Messages.SOUND_PTT_ACTIVATE,sound:"ptt_start"},{label:C.default.Messages.SOUND_PTT_DEACTIVATE,sound:"ptt_stop"},{label:C.default.Messages.SOUND_USER_JOIN,sound:"user_join"},{label:C.default.Messages.SOUND_USER_LEAVE,sound:"user_leave"},{label:C.default.Messages.SOUND_USER_MOVED,sound:"user_moved"},{label:C.default.Messages.SOUND_OUTGOING_RING,sound:"call_calling"},{label:C.default.Messages.SOUND_INCOMING_RING,sound:"call_ringing"},{label:C.default.Messages.SOUND_STREAM_STARTED,sound:"stream_started"},{label:C.default.Messages.SOUND_STREAM_STOPPED,sound:"stream_ended"},{label:C.default.Messages.SOUND_VIEWER_JOIN,sound:"stream_user_joined"},{label:C.default.Messages.SOUND_VIEWER_LEAVE,sound:"stream_user_left"},{label:C.default.Messages.SOUND_INVITED_TO_SPEAK,sound:"reconnect"}];return L(E.FormSection,{},void 0,n?a.createElement(a.Fragment,null,L(E.FormTitle,{className:M.default.marginBottom20},void 0,C.default.Messages.SOUNDPACK_LABEL),w):null,L(E.FormTitle,{className:(0,o.default)(M.default.marginBottom20,M.default.marginTop20)},void 0,C.default.Messages.SOUNDS),s.map((function(e){var n=e.label,r=e.sound;return L(D,{label:n,onChange:function(e){return l(r,e)},onPreview:function(e){return i(r,e)},enabled:!t.includes(r)},r)})))}j.displayName="NotificationSounds";var k=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleAFKTimeoutChange=function(e){var t=e.value;s.default.updateRemoteSettings({afkTimeout:t})},t.handleToggleShowUnreadBadge=function(){u.default.setDisableUnreadBadge(!t.props.disableUnreadBadge)},t.handleToggleShowFlash=function(){u.default.setTaskbarFlash(!t.props.taskbarFlash)},t.renderTTS=function(){if(!f.supported)return null;var e=[{name:C.default.Messages.TTS_ALLS,value:T.TTSNotificationTypes.ALL_CHANNELS},{name:C.default.Messages.TTS_CURRENT,value:T.TTSNotificationTypes.SELECTED_CHANNEL},{name:C.default.Messages.TTS_NEVER,value:T.TTSNotificationTypes.NEVER}];return L(E.FormItem,{title:C.default.Messages.FORM_LABEL_TTS_NOTIFICATIONS},void 0,L(E.FormText,{type:E.FormTextTypes.DESCRIPTION,className:M.default.marginBottom8},void 0,C.default.Messages.FORM_DESCRIPTION_TTS),L(m.default,{options:e,onChange:t.handleTTSChange,value:t.props.ttsType}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n);var a=r.prototype;return a.handleDesktopChange=function(e){var t,n=e?T.DesktopNotificationTypes.ALL:T.DesktopNotificationTypes.NEVER;n!==T.DesktopNotificationTypes.NEVER?(t="UserSettingsModal",S.default.requestPermission((function(e){var n=e?T.NotificationPermissionTypes.ENABLED:T.NotificationPermissionTypes.BLOCKED;u.default.setPermissionsState(n,t)}))):u.default.setDesktopType(n)},a.handleTTSChange=function(e){var t=e.value;u.default.setTTSType(t)},a.render=function(){var e=this.props,t=e.desktopType,n=e.afkTimeout,r=e.disableUnreadBadge,a=e.taskbarFlash,l=e.disabledSounds,u=O.default.embedded&&O.default.isWindows(),s=i.default.range(1,11).map((function(e){return{value:60*e,label:C.default.Messages.DURATION_MINUTES.format({minutes:e})}}));return L(E.FormSection,{tag:E.FormTitleTags.H1,title:C.default.Messages.NOTIFICATIONS},void 0,L(h.default,{className:M.default.marginBottom20,value:t!==T.DesktopNotificationTypes.NEVER,onChange:this.handleDesktopChange,note:C.default.Messages.DESKTOP_NOTIFICATIONS_ENABLE_BODY},void 0,C.default.Messages.DESKTOP_NOTIFICATIONS_ENABLE),L(h.default,{className:u?M.default.marginBottom20:M.default.marginBottom40,value:!r,note:C.default.Messages.USER_SETTINGS_NOTIFICATIONS_SHOW_BADGE_BODY,onChange:this.handleToggleShowUnreadBadge},void 0,C.default.Messages.USER_SETTINGS_NOTIFICATIONS_SHOW_BADGE_LABEL),u?L(h.default,{className:M.default.marginBottom40,value:a,note:C.default.Messages.USER_SETTINGS_NOTIFICATIONS_SHOW_FLASH_BODY,onChange:this.handleToggleShowFlash},void 0,C.default.Messages.USER_SETTINGS_NOTIFICATIONS_SHOW_FLASH_LABEL):null,L(E.FormItem,{title:C.default.Messages.FORM_LABEL_PUSH_AFK_TIMEOUT},void 0,L(_.default,{searchable:!1,value:n,onChange:this.handleAFKTimeoutChange,options:s}),L(E.FormText,{type:E.FormTextTypes.DESCRIPTION,className:M.default.marginTop8},void 0,C.default.Messages.FORM_DESCRIPTION_PUSH_AFK_TIMEOUT),L(E.FormDivider,{className:(0,o.default)(M.default.marginTop40,M.default.marginBottom40)})),this.renderTTS(),L(E.FormDivider,{className:(0,o.default)(M.default.marginTop40,M.default.marginBottom40)}),L(E.FormItem,{},void 0,L(j,{disabledSounds:l})))},r}(a.PureComponent);k.displayName="UserSettingsNotifications";var U=l.default.connectStores([p.default,v.default],(function(){return{disableUnreadBadge:p.default.getDisableUnreadBadge(),taskbarFlash:p.default.taskbarFlash,disabledSounds:p.default.getDisabledSounds(),desktopType:p.default.getDesktopType(),ttsType:p.default.getTTSType(),afkTimeout:v.default.afkTimeout}}))(k);t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=s(n(1159)),i=n(11657),l=s(n(1299)),u=n(769);function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){var e=(0,a.useStateFromStores)([l.default],(function(){return l.default.getSoundpack()})),t=(0,u.getSoundpackOptions)();return f(o.default,{onChange:function(e){var t=e.value;return(0,i.setSoundpack)(t)},value:e,searchable:!1,options:t})}c.displayName="SoundpackSelect"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSoundpack=function(e){a.default.track(i.AnalyticEvents.SOUNDPACK_UPDATED,{soundpack:e,previous_soundpack:o.default.getSoundpack()}),r.default.dispatch({type:i.ActionTypes.SET_SOUNDPACK,soundpack:e})};var r=l(n(2)),a=l(n(13)),o=l(n(1299)),i=n(1);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=T(n(3)),i=T(n(10488)),l=T(n(695)),u=T(n(8766)),s=T(n(1180)),d=T(n(1287)),f=T(n(376)),c=T(n(55)),p=T(n(1162)),v=T(n(8267)),y=n(131),m=T(n(476)),_=T(n(10235)),h=T(n(13)),E=(T(n(93)),n(401)),g=n(1),S=T(n(6)),O=T(n(8175)),I=T(n(370));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function M(){return(M=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}).apply(this,arguments)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(){var e=f.default.getNotificationPositionMode(),t=e!==g.OverlayNotificationPositions.DISABLED,n=s.default.getOverlayKeybind(),r=s.default.getOverlayChatKeybind();h.default.track(g.AnalyticEvents.OVERLAY_SETTINGS_UPDATED,{enabled:d.default.enabled,notifications_enabled:t,notifications_position:t?e:null,text_notifications_mode:f.default.getTextChatNotificationMode(),hotkey:null!=n?(0,E.toString)(n.shortcut):null,text_activation_hotkey:null!=r?(0,E.toString)(r.shortcut):null,text_opacity_slider:f.default.getTextWidgetOpacity()})}var P=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleChangeEnabled=function(e){l.default.setEnabled(e),A(),h.default.track(g.AnalyticEvents.OVERLAY_TOGGLED,{enabled:e,setting_type:"overlay toggled - global"})},t.handleChangeDisplayNameMode=function(e){var t=e.value;l.default.setDisplayNameMode(t)},t.handleChangeAvatarSizeMode=function(e){var t=e.value;l.default.setAvatarSizeMode(t)},t.handleChangeDisplayUserMode=function(e){var t=e.value;l.default.setDisplayUserMode(t)},t.handleChangeTextNotificationMode=function(){var e=g.OverlayNotificationTextChatTypes.ENABLED,n=g.OverlayNotificationTextChatTypes.DISABLED,r=t.props.textChatNotificationMode===e?n:e;l.default.setTextChatNotificationMode(r),A()},t.handleChangeNotificationPositionMode=function(e,t){l.default.setNotificationPositionMode(t),A()},t.handleInputLockShortcutChange=function(e){i.default.setKeybind(M({},t.props.inputLockKeybind,{shortcut:e})),A()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var o=r.prototype;return o.renderExplanation=function(){return null},o.renderOverlayToggle=function(){var e=this.props,t=e.enabled,n=e.inputLockKeybind;return b(c.default,{className:I.default.marginBottom20},void 0,b(c.default.Child,{basis:"50%"},void 0,b(m.default,{},void 0,b(y.FormTitle,{tag:y.FormTitleTags.H5},void 0,S.default.Messages.SETTINGS_GAMES_ENABLE_OVERLAY_LABEL),b(v.default,{className:I.default.marginBottom20,style:{marginTop:16},value:t,hideBorder:!0,onChange:this.handleChangeEnabled},void 0,S.default.Messages.ENABLE_INGAME_OVERLAY))),b(c.default.Child,{basis:"50%"},void 0,b(m.default,{title:S.default.Messages.KEYBIND_TOGGLE_OVERLAY_INPUT_LOCK},void 0,b(u.default,{disabled:!t,defaultValue:null!=n?n.shortcut:[],onChange:this.handleInputLockShortcutChange}))))},o.renderAvatarSize=function(){return b(c.default,{className:I.default.marginBottom20},void 0,b(c.default.Child,{},void 0,b(m.default,{title:S.default.Messages.FORM_LABEL_AVATAR_SIZE},void 0,b(p.default,{options:[{name:S.default.Messages.AVATAR_SIZE_OPTION_LARGE,value:g.OverlayAvatarSizes.LARGE},{name:S.default.Messages.AVATAR_SIZE_OPTION_SMALL,value:g.OverlayAvatarSizes.SMALL}],onChange:this.handleChangeAvatarSizeMode,value:this.props.avatarSizeMode}))))},o.renderDisplayNames=function(){return b(c.default,{className:I.default.marginBottom20},void 0,b(c.default.Child,{},void 0,b(m.default,{title:S.default.Messages.FORM_LABEL_DISPLAY_NAMES},void 0,b(p.default,{options:[{name:S.default.Messages.DISPLAY_OPTION_ALWAYS,value:g.OverlayDisplayNames.ALWAYS},{name:S.default.Messages.DISPLAY_OPTION_ONLY_WHILE_SPEAKING,value:g.OverlayDisplayNames.ONLY_WHILE_SPEAKING},{name:S.default.Messages.DISPLAY_OPTION_NEVER,value:g.OverlayDisplayNames.NEVER}],onChange:this.handleChangeDisplayNameMode,value:this.props.displayNameMode}))))},o.renderDisplayUsers=function(){return b(c.default,{className:I.default.marginBottom20},void 0,b(c.default.Child,{},void 0,b(m.default,{title:S.default.Messages.FORM_LABEL_DISPLAY_USERS},void 0,b(p.default,{options:[{name:S.default.Messages.DISPLAY_OPTION_ALWAYS,value:g.OverlayDisplayUsers.ALWAYS},{name:S.default.Messages.DISPLAY_OPTION_ONLY_WHILE_SPEAKING,value:g.OverlayDisplayUsers.ONLY_WHILE_SPEAKING}],onChange:this.handleChangeDisplayUserMode,value:this.props.displayUserMode}))))},o.renderTextNotificationMode=function(){var e=this.props.notificationPositionMode!==g.OverlayNotificationPositions.DISABLED,t=e&&this.props.textChatNotificationMode===g.OverlayNotificationTextChatTypes.ENABLED;return b(c.default,{className:I.default.marginBottom20},void 0,b(c.default.Child,{},void 0,b(m.default,{},void 0,b(v.default,{value:t,disabled:!e,onChange:this.handleChangeTextNotificationMode,hideBorder:!0},void 0,S.default.Messages.FORM_LABEL_OVERLAY_TEXT_CHAT_NOTIFICATIONS))))},o.renderNotificationPosition=function(){return b(c.default,{className:I.default.marginBottom20},void 0,b(c.default.Child,{},void 0,b(m.default,{title:S.default.Messages.FORM_LABEL_NOTIFICATION_POSITION},void 0,b("div",{className:O.default.notificationSettings},void 0,b(_.default,{position:this.props.notificationPositionMode,onChange:this.handleChangeNotificationPositionMode})))))},o.render=function(){return b(a.Fragment,{},void 0,b(y.FormSection,{tag:y.FormTitleTags.H1,title:S.default.Messages.OVERLAY},void 0,this.renderExplanation(),this.renderOverlayToggle(),this.renderAvatarSize(),this.renderDisplayNames(),this.renderDisplayUsers()),b(y.FormSection,{tag:y.FormTitleTags.H1,title:S.default.Messages.OVERLAY_NOTIFICATIONS_SETTINGS,className:I.default.marginTop40},void 0,this.renderNotificationPosition(),this.renderTextNotificationMode()))},r}(a.PureComponent);P.displayName="UserSettingsOverlay";var R=o.default.connectStores([d.default,f.default,s.default],(function(){return{enabled:d.default.enabled,avatarSizeMode:f.default.getAvatarSizeMode(),displayNameMode:f.default.getDisplayNameMode(),displayUserMode:f.default.getDisplayUserMode(),notificationPositionMode:f.default.getNotificationPositionMode(),textChatNotificationMode:f.default.getTextChatNotificationMode(),inputLockKeybind:s.default.getOverlayKeybind()}}))(P);t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=q;var r,a=x(n(0)),o=B(n(9)),i=n(3),l=B(n(2)),u=x(n(287)),s=n(687),d=n(5946),f=B(n(11660)),c=B(n(11661)),p=B(n(8747)),v=B(n(8748)),y=n(42),m=B(n(36)),_=B(n(361)),h=B(n(1147)),E=B(n(5832)),g=B(n(61)),S=B(n(371)),O=B(n(10489)),I=B(n(10058)),T=B(n(151)),C=n(131),b=B(n(5954)),M=B(n(1240)),N=B(n(8448)),A=B(n(5830)),P=B(n(9130)),R=B(n(11665)),L=B(n(5980)),D=B(n(47)),w=B(n(24)),j=n(48),k=B(n(93)),U=n(1),G=B(n(6)),F=B(n(8181));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function V(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function W(e){var t=e.guild;return V(g.default,{onClick:function(){(0,y.transitionTo)(U.Routes.CHANNEL(t.id,m.default.getChannelId(t.id)),{state:{shouldShowSubscribeTooltip:!0}}),(0,s.popLayer)()},className:F.default.cardWrapper},void 0,V(I.default,{className:F.default.card},void 0,V(S.default,{guild:t,size:S.default.Sizes.LARGE,"aria-hidden":!0}),V("div",{className:F.default.guildInfo},void 0,V(w.default,{size:w.default.Sizes.SIZE_16,className:F.default.guildName},void 0,t.name),V("div",{className:F.default.subscriptionInfo},void 0,V(A.default,{className:F.default.premiumGuildIcon}),V(w.default,{className:F.default.subscriberCount},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SUBSCRIBER_COUNT_TOOLTIP.format({subscriberCount:t.premiumSubscriberCount})))),V(O.default,{subscriberCount:t.premiumSubscriberCount})))}W.displayName="GuildSubscriptionInfoCard";var Y=V(p.default,{});function z(){var e=(0,i.useStateFromStores)([_.default],(function(){return _.default.getFlattenedGuilds().slice(0,U.PREMIUM_GUILD_UPSELL_LIST_AMT)}));return a.createElement(a.Fragment,null,V("div",{className:F.default.marketingLogo},void 0,V(P.default,{className:F.default.marketingLogoIcon,"aria-label":G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TITLE,role:"heading"}),V("div",{className:F.default.marketingLogoImage})),V(D.default,{className:F.default.marketingHeader,size:D.default.Sizes.SIZE_20},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_MARKETING_HEADER),V(w.default,{size:w.default.Sizes.SIZE_16},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_MARKETING_BLURB),V(D.default,{className:F.default.featureHeaderTop,size:D.default.Sizes.SIZE_20,muted:!0},void 0,G.default.Messages.PREMIUM_GUILD_USER_FEATURES_HEADER),V(f.default,{features:[{description:G.default.Messages.PREMIUM_GUILD_USER_FEATURE_MEMBER_BADGE,icon:A.default,iconClass:F.default.memberBadgeIcon},{description:G.default.Messages.PREMIUM_GUILD_USER_FEATURE_PROFILE_BADGE,overrideIcon:function(e){return V("div",{className:(0,o.default)(e,F.default.profileBadgeIcon)})}},{description:G.default.Messages.PREMIUM_GUILD_USER_FEATURE_ROLE,icon:N.default,iconClass:F.default.roleIcon}],columns:3}),V(D.default,{className:F.default.featureHeader,size:D.default.Sizes.SIZE_20,muted:!0},void 0,G.default.Messages.PREMIUM_GUILD_GUILD_FEATURES_HEADER),V(f.default,{features:[{description:G.default.Messages.PREMIUM_GUILD_GUILD_FEATURE_EMOJI,icon:b.default,iconClass:F.default.emojiIcon},{description:G.default.Messages.PREMIUM_GUILD_GUILD_FEATURE_STICKERS,icon:R.default,iconClass:F.default.stickerIcon},{description:G.default.Messages.PREMIUM_GUILD_GUILD_FEATURE_AUDIO_QUALITY,icon:M.default,iconClass:F.default.audioQualityIcon},{description:G.default.Messages.PREMIUM_GUILD_GUILD_FEATURE_UPLOAD_SIZE,icon:L.default,iconClass:F.default.uploadSizeIcon}].filter(j.isNotNullish),columns:3}),V(w.default,{className:F.default.guildFullFeatures,size:w.default.Sizes.SIZE_16},void 0,G.default.Messages.PREMIUM_GUILD_FULL_FEATURE_LIST.format({helpdeskArticle:k.default.getArticleURL(U.HelpdeskArticles.GUILD_SUBSCRIPTIONS)})),V("section",{className:F.default.guildsSection},void 0,V(v.default,{className:F.default.guildSubscriptionHeading}),null==e||0===e.length?a.createElement(a.Fragment,null,V("div",{className:F.default.emptyGuilds}),V(w.default,{size:D.default.Sizes.SIZE_20,className:F.default.emptyGuildsTitle},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_MARKETING_GUILDS_EMPTY_DESCRIPTION_TITLE),V(w.default,{size:D.default.Sizes.SIZE_16,className:F.default.emptyGuildsText},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_MARKETING_GUILDS_EMPTY_DESCRIPTION_TEXT)):a.createElement(a.Fragment,null,V(w.default,{size:D.default.Sizes.SIZE_16,className:F.default.guildsBlurb},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_MARKETING_GUILDS_BLURB),V("div",{className:F.default.guilds},void 0,e.map((function(e){return V(W,{guild:e},e.id)}))))),Y)}var K=V(T.default,{}),$=V(c.default,{}),Z=V(z,{});function q(){a.useEffect((function(){l.default.wait((function(){u.fetchSubscriptions(),(0,d.fetchUserPremiumGuildSubscriptionSlots)()}))}),[]);var e=(0,i.useStateFromStores)([h.default],(function(){return h.default.hasFetchedSubscriptions()})),t=(0,i.useStateFromStores)([E.default],(function(){return E.default.slots}));return e?V("div",{className:F.default.container},void 0,V("div",{className:F.default.background}),V("div",{className:F.default.content},void 0,Object.keys(t).length>0?a.createElement(a.Fragment,null,V(C.FormTitle,{tag:C.FormTitle.Tags.H1},void 0,G.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TITLE),$,V("div",{className:F.default.divider})):null,Z)):V("div",{className:(0,o.default)(F.default.container,F.default.loading)},void 0,K)}q.displayName="UserSettingsPremiumGuildSubscriptions"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=l(n(9)),i=l(n(8176));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).renderFeature=function(e,n){return s("div",{className:i.default.feature},n,t.renderIcon(e),s("div",{},void 0,null!=e.title?s("div",{className:i.default.title},void 0,e.title):null,s("div",{className:null==e.title?i.default.descriptionStandalone:i.default.description},void 0,e.description)))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.renderIcon=function(e){if(null!=e.overrideIcon)return e.overrideIcon(i.default.icon);if(null!=e.icon&&null!=e.iconClass)return s(e.icon,{className:(0,o.default)(i.default.icon,e.iconClass)});throw new Error("Missing overrideIcon or iconName and iconClass")},a.render=function(){return s("div",{className:i.default.features,style:{gridTemplateColumns:Array(this.props.columns).fill("1fr").join(" ")}},void 0,this.props.features.map(this.renderFeature))},r}(a.Component);f.displayName="PremiumFeaturesList";var c=f;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,l.useStateFromStores)([p.default],(function(){return p.default.getPremiumTypeSubscription()})),t=(0,l.useStateFromStores)([v.default],(function(){return v.default.slots})),n=(0,i.default)(t).filter((function(e){return e.isAvailable()})).value(),r=(0,i.default)(t).groupBy((function(e){var t=e.premiumGuildSubscription;return null!=t?t.guildId:"0"})).value(),o=r[0],u=Object.keys(r).filter((function(e){return"0"!==e}));if(0===u.length&&null==o||null==e)return null;var s=(0,i.default)(t).filter((function(e){return!e.canceled})).value().length,d=A.default.getNumIncludedPremiumGuildSubscriptionSlots(e.planId),f=s>d;return a.createElement(a.Fragment,null,G(C.default,{size:C.default.Sizes.SIZE_14,className:j.default.blurb},void 0,w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SUBTITLE.format({helpdeskArticle:M.default.getArticleURL(D.HelpdeskArticles.GUILD_SUBSCRIPTIONS)})),null!=o?G(W,{guildId:"0",premiumGuildSubscriptionSlots:o,premiumSubscription:e,availablePremiumGuildSubscriptionSlots:n,hasCancelablePremiumGuildSubscriptionSlot:f}):null,u.length>0?a.createElement(a.Fragment,null,G(T.default,{size:T.default.Sizes.SIZE_12,className:j.default.subSectionHeader},void 0,w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_ACTIVE_TITLE),u.map((function(t){return G(W,{guildId:t,premiumGuildSubscriptionSlots:r[t],premiumSubscription:e,availablePremiumGuildSubscriptionSlots:n,hasCancelablePremiumGuildSubscriptionSlot:f},t)}))):null)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=U();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=k(n(9)),i=k(n(8)),l=n(3),u=n(687),s=k(n(8687)),d=n(42),f=k(n(15)),c=k(n(36)),p=k(n(1147)),v=k(n(5832)),y=k(n(271)),m=k(n(61)),_=k(n(371)),h=k(n(278)),E=k(n(10489)),g=k(n(8663)),S=k(n(5830)),O=k(n(5827)),I=n(41),T=k(n(47)),C=k(n(24)),b=k(n(150)),M=k(n(93)),N=n(5935),A=k(n(96)),P=k(n(97)),R=k(n(8922)),L=k(n(11662)),D=n(1),w=k(n(6)),j=k(n(8180));function k(e){return e&&e.__esModule?e:{default:e}}function U(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return U=function(){return e},e}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(){return(F=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}).apply(this,arguments)}function B(e){var t=e.deadline,n=(0,s.default)(t,1e3),r=n.days,o=n.hours,i=n.minutes;return a.createElement(a.Fragment,null,w.default.Messages.PREMIUM_GUILD_COOLDOWN_AVAILABLE_COUNTDOWN.format({days:r,hours:o,minutes:i}))}function H(e){var t=e.guild,n=e.premiumGuildSubscriptionSlots,r=e.availablePremiumGuildSubscriptionSlots,o=t.premiumSubscriberCount,i=n.sort((function(e,t){return Number(null!=e.premiumGuildSubscription?e.premiumGuildSubscription.id:0)-Number(null!=t.premiumGuildSubscription?t.premiumGuildSubscription.id:0)}))[0];if(null==i)return null;var l=null!=i.premiumGuildSubscription?P.default.extractTimestamp(i.premiumGuildSubscription.id):0,s=(0,N.getPremiumGuildSubscriptionMonths)(l);var f=null!=t.banner?b.default.getGuildBannerURL(t):null;return G("div",{className:j.default.guildHeader},void 0,G("div",{className:j.default.guildHeaderBackground,style:{backgroundImage:null!=f?"url("+f+")":void 0}}),G(_.default,{guild:t,className:j.default.guildIcon}),G("div",{className:j.default.guildHeaderContent},void 0,G(T.default,{size:T.default.Sizes.SIZE_16,className:j.default.guildName},void 0,t.name),G(C.default,{size:C.default.Sizes.SIZE_12,className:j.default.guildSubscriptionDuration},void 0,w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_DURATION.format({months:s,date:new Date(l)})),G(C.default,{size:C.default.Sizes.SIZE_12,className:j.default.guildSubscriberCount},void 0,G(S.default,{className:j.default.guildSubscriberCountIcon}),G("div",{},void 0,w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SUBSCRIBER_COUNT_TOOLTIP.format({subscriberCount:n.length})),0!==r.length?G(y.default,{onClick:function(){if(0!==r.length){var e=r.length>1;(0,I.openModal)((function(n){return a.createElement(R.default,F({},n,{selectedGuild:t,locationSection:D.AnalyticsSections.SETTINGS_PREMIUM,userPremiumGuildSubscriptionSlots:e?void 0:r}))}))}},className:j.default.guildSubscribeButton},void 0,w.default.Messages.PREMIUM_GUILD_PERKS_MODAL_BUTTON_SUBSCRIBE_THIS_SERVER):null)),G("div",{className:j.default.guildGemIndicatorContainer},void 0,G(m.default,{onClick:function(){(0,d.transitionTo)(D.Routes.CHANNEL(t.id,c.default.getChannelId(t.id))),(0,u.popLayer)()}},void 0,G(E.default,{className:j.default.gemIndicator,subscriberCount:o}))))}H.displayName="PremiumGuildHeader";var x=G(g.default,{});function V(e){var t,n=e.premiumGuildSubscriptionSlot,r=e.premiumSubscription,i=e.hasCancelablePremiumGuildSubscriptionSlot,l=null!=n.cooldownEndsAt?new Date(n.cooldownEndsAt):null,u=l&&l>new Date,s=null!=n.premiumGuildSubscription?new Date(P.default.extractTimestamp(n.premiumGuildSubscription.id)):null,d=n.canceled;var f=d?O.default:S.default;return G("div",{className:j.default.guildSubscriptionSlot},void 0,G(f,{className:(0,o.default)(j.default.guildSubscriptionSlotIcon,(t={},t[j.default.guildSubscriptionSlotIconCanceled]=d,t))}),G("div",{className:j.default.guildSubscriptionSlotContent},void 0,G(C.default,{size:C.default.Sizes.SIZE_14,className:j.default.guildSubscriptionCreationDate},void 0,null!=s?w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CREATION_DATE.format({date:s}):w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_UNUSED_SLOT_DESCRIPTION),G(C.default,{size:C.default.Sizes.SIZE_12,color:C.default.Colors.MUTED},void 0,u&&null!=l?G(B,{deadline:l.getTime()}):null,u&&d?" • ":null,d?w.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_PENDING_CANCELATION.format({date:r.currentPeriodEnd}):null)),G(h.default,{renderPopout:function(e){var t=e.closePopout;return G(L.default,{onClose:t,userPremiumGuildSubscriptionSlot:n,premiumSubscription:r,hasCancelablePremiumGuildSubscriptionSlot:i})},position:h.default.Positions.RIGHT,align:h.default.Align.CENTER},void 0,(function(e){return a.createElement(m.default,F({},e,{className:j.default.guildSubscriptionSlotMenuIcon}),x)})))}function W(e){var t=e.guildId,n=e.premiumGuildSubscriptionSlots,r=e.premiumSubscription,a=e.availablePremiumGuildSubscriptionSlots,o=e.hasCancelablePremiumGuildSubscriptionSlot,i=(0,l.useStateFromStores)([f.default],(function(){return"0"!==t?f.default.getGuild(t):null}));return null==i&&"0"!==t?null:G("div",{className:j.default.guild},void 0,null!=i?G(H,{guild:i,premiumGuildSubscriptionSlots:n,availablePremiumGuildSubscriptionSlots:a}):null,G("div",{className:j.default.guildSubscriptionSlots},void 0,n.map((function(e){return G(V,{premiumGuildSubscriptionSlot:e,premiumSubscription:r,hasCancelablePremiumGuildSubscriptionSlot:o},e.id)}))))}V.displayName="PremiumGuildSubscriptionSlot",W.displayName="PremiumGuild"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r,a=y(n(0)),o=y(n(8253)),i=n(8256),l=n(11663),u=n(11664),s=n(41),d=p(n(8922)),f=n(1),c=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(){return(_=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}).apply(this,arguments)}function h(e){var t=e.userPremiumGuildSubscriptionSlot,n=e.onClose,r=e.hasCancelablePremiumGuildSubscriptionSlot,p=e.premiumSubscription,v=e.onSelect;var y=p.status===f.SubscriptionStatusTypes.PAST_DUE;return m(o.default,{onSelect:v,navId:"subscription-context",style:o.MenuStyle.FIXED,"aria-label":c.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onClose:n},void 0,m(o.MenuItem,{id:"apply",label:null!=t.premiumGuildSubscription?c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TRANSFER_BUTTON:c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SELECT_SERVER_BUTTON,subtext:t.isOnCooldown()?c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_TRANSFER_BUTTON_DISABLED_TOOLTIP:null,action:function(){(0,s.openModal)((function(e){return a.createElement(d.default,_({},e,{userPremiumGuildSubscriptionSlots:[t],locationSection:f.AnalyticsSections.SETTINGS_PREMIUM}))}))},disabled:t.isOnCooldown()}),t.canceled?m(o.MenuItem,{id:"uncancel",label:c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SLOT_UNCANCEL_BUTTON,subtext:y?c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BUTTON_DISABLED_PAST_DUE_TOOLTIP:null,action:function(){(0,u.openPremiumGuildSubscriptionUncancellationModal)(t.id)},disabled:y}):m(o.MenuItem,{id:"cancel",label:c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_SLOT_CANCEL_BUTTON,subtext:r?y?c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BUTTON_DISABLED_PAST_DUE_TOOLTIP:null:c.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BUTTON_DISABLED_TOOLTIP,action:function(){(0,l.openPremiumGuildSubscriptionCancellationModal)(t)},disabled:!r||y,color:i.MenuItemColor.DANGER}))}h.displayName="UserPremiumGuildSubscriptionSlotPopout"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=$,t.openPremiumGuildSubscriptionCancellationModal=function(e){(0,g.openModal)((function(t){return o.createElement($,j({},t,{subscriptionSlot:e}))}))};var r,a,o=w(n(0)),i=L(n(8)),l=n(92),u=n(3),s=n(287),d=n(5946),f=L(n(257)),c=L(n(1147)),p=L(n(5832)),v=L(n(29)),y=L(n(55)),m=L(n(151)),_=n(85),h=n(131),E=n(35),g=n(41),S=w(n(96)),O=n(281),I=n(1169),T=n(6002),C=L(n(6009)),b=n(1237),M=L(n(5695)),N=n(5676),A=n(1),P=L(n(6)),R=L(n(8178));function L(e){return e&&e.__esModule?e:{default:e}}function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function w(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=D();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function j(){return(j=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}).apply(this,arguments)}function k(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){k(o,r,a,i,l,"next",e)}function l(e){k(o,r,a,i,l,"throw",e)}i(void 0)}))}}function G(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function F(e){var t=e.premiumSubscription,n=e.isInventory,r=e.headerId,a=e.onNext,i=e.onClose;return o.createElement(o.Fragment,null,G(E.ModalHeader,{separator:!1,id:r},void 0,G(h.FormTitle,{tag:h.FormTitleTags.H4},void 0,n?P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_TITLE_INVENTORY:P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_TITLE_GUILD),G(E.ModalCloseButton,{onClick:i})),G(E.ModalContent,{className:R.default.body},void 0,G("div",{className:R.default.cancelImage}),G("div",{},void 0,t.isPurchasedExternally&&t.paymentGateway?P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BODY_EXTERNAL.format({paymentGatewayName:l.PaymentGatewayToFriendlyName[t.paymentGateway],subscriptionManagementLink:(0,S.getExternalSubscriptionMethodUrl)(t.paymentGateway,"SUBSCRIPTION_MANAGEMENT")}):n?P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BODY_INVENTORY.format({endDate:t.currentPeriodEnd}):P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BODY_GUILD.format({endDate:t.currentPeriodEnd}))),t.isPurchasedExternally?null:G(E.ModalFooter,{justify:y.default.Justify.START},void 0,G(v.default,{onClick:a},void 0,P.default.Messages.NEXT),G(v.default,{look:v.default.Looks.LINK,onClick:i},void 0,P.default.Messages.CANCEL)))}function B(){var e=Object.values(p.default.slots),t=i.default.sortBy(e.filter((function(e){return!e.canceled})),(function(e){return[null!=e.premiumGuildSubscription,null!=e.cooldownEndsAt?new Date(e.cooldownEndsAt):null]}))[0];return null!=t?t.id:null}function H(e,t,n){return x.apply(this,arguments)}function x(){return(x=U(regeneratorRuntime.mark((function e(t,n,r){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(a=null!=r?r:B())){e.next=3;break}throw new Error("No slot to cancel");case 3:return e.next=5,(0,d.cancelUserPremiumGuildSubscriptionSlot)(a);case 5:return e.next=7,(0,s.updateSubscription)(t,{items:(0,S.getItemsFromNewAdditionalPlans)(t,n)});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.START=1]="START",e[e.PREVIEW=2]="PREVIEW",e[e.CONFIRM=3]="CONFIRM"}(a||(a={}));var V=G(m.default,{}),W=G(b.PremiumInvoiceTableDivider,{});function Y(e){var t,n,r=e.premiumSubscription,a=e.subscriptionSlotId,i=e.headerId,l=e.onBack,s=e.onNext,d=e.onClose,c=o.useState(!1),p=c[0],m=c[1],_=o.useMemo((function(){try{return[(0,T.calculateAdditionalPlansWithPremiumGuildAdjustment)(r,-1),!1]}catch(e){return[[],!0]}}),[r]),h=_[0],g=_[1];o.useEffect((function(){g&&d()}),[g]);var L=(0,u.useStateFromStoresObject)([f.default],(function(){var e=f.default.getHardcoded(r.planId);return{premiumSubscriptionPlan:e,premiumGuildPlan:f.default.getHardcodedForSkuAndInterval(A.PremiumSubscriptionSKUs.GUILD,e.interval)}})),D=L.premiumSubscriptionPlan,w=L.premiumGuildPlan,j=(0,I.useSubscriptionInvoicePreview)({subscriptionId:r.id,items:(0,S.getItemsWithUpsertedPremiumGuildPlan)(r,null!==(t=null===(n=h[0])||void 0===n?void 0:n.quantity)&&void 0!==t?t:0,w.id),renewal:!0})[0];if(null==j)return V;var k=D.currency,F=D.interval,B=null!=r.renewalMutations?r.renewalMutations.planId:r.planId;return o.createElement(o.Fragment,null,G(C.default,{onClose:d,headerId:i}),G(E.ModalContent,{className:R.default.body},void 0,G("div",{},void 0,P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_PREVIEW.format({endDate:j.subscriptionPeriodStart})),G(b.PremiumInvoiceTable,{className:R.default.invoiceTable},void 0,G(b.PremiumInvoiceTableHeader,{},void 0,P.default.Messages.PREMIUM_SUBSCRIPTION_UPDATES),G(b.PremiumInvoiceTableRow,{label:P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_INVOICE_SUBSCRIPTION_CANCELLED.format({subscriptionCount:1}),value:(0,O.formatRate)((0,O.formatPrice)(null!=S.default.getPremiumType(B)?-w.getPriceForPremiumUser():-w.price,k),F),className:R.default.invoiceCancelRow}),W,G(N.SubscriptionInvoiceFooter,{premiumSubscription:r,renewalInvoice:j,isUpdate:!0}))),G(E.ModalFooter,{align:y.default.Align.CENTER,justify:y.default.Justify.BETWEEN},void 0,G(v.default,{color:v.default.Colors.RED,disabled:p,onClick:U(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(!0),e.next=4,H(r,h,a);case 4:s(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),m(!1);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))},void 0,P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CANCEL_BUTTON),G(M.default,{onClick:l})))}function z(e){var t=e.premiumSubscription,n=e.headerId,r=e.onClose;return o.createElement(o.Fragment,null,G(E.ModalHeader,{separator:!1,id:n},void 0,G(h.FormTitle,{tag:h.FormTitleTags.H4},void 0,P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CONFIRM_TITLE),G(E.ModalCloseButton,{onClick:r})),G(E.ModalContent,{className:R.default.body},void 0,G("div",{className:R.default.cancelImage}),G("div",{},void 0,P.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_CONFIRM_BODY.format({endDate:t.currentPeriodEnd}))),G(E.ModalFooter,{},void 0,G(v.default,{onClick:r},void 0,P.default.Messages.OKAY)))}var K=G(E.ModalContent,{},void 0,G(m.default,{}));function $(e){var t=e.subscriptionSlot,n=e.transitionState,r=e.onClose,i=(0,_.useUID)();o.useEffect((function(){c.default.hasFetchedSubscriptions()||(0,s.fetchSubscriptions)()}),[]);var l,d=(0,u.useStateFromStores)([c.default],(function(){return c.default.getPremiumTypeSubscription()})),f=o.useState(a.START),p=f[0],v=f[1];if(null==d)l=K;else switch(p){case a.START:l=G(F,{premiumSubscription:d,isInventory:null==t.premiumGuildSubscription,headerId:i,onNext:function(){return v(a.PREVIEW)},onClose:r});break;case a.PREVIEW:l=G(Y,{premiumSubscription:d,subscriptionSlotId:t.id,headerId:i,onBack:function(){return v(a.START)},onNext:function(){return v(a.CONFIRM)},onClose:r});break;case a.CONFIRM:l=G(z,{premiumSubscription:d,headerId:i,onClose:r});break;default:throw new Error("Unexpected step: "+p)}return G(E.ModalRoot,{transitionState:n,"aria-labelledby":i},void 0,l)}$.displayName="PremiumGuildSubscriptionCancellationModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=j,t.openPremiumGuildSubscriptionUncancellationModal=function(e){(0,h.openModal)((function(t){return o.createElement(j,b({},t,{subscriptionSlotId:e}))}))};var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=T(n(23)),l=n(3),u=n(287),s=n(5946),d=T(n(39)),f=T(n(1147)),c=T(n(29)),p=T(n(55)),v=T(n(151)),y=n(85),m=n(131),_=n(35),h=n(41),E=n(96),g=n(6002),S=n(1),O=T(n(6)),I=T(n(8179));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(){return(b=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}).apply(this,arguments)}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){N(o,r,a,i,l,"next",e)}function l(e){N(o,r,a,i,l,"throw",e)}i(void 0)}))}}function P(e,t,n){return R.apply(this,arguments)}function R(){return(R=A(regeneratorRuntime.mark((function e(t,n,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.uncancelUserPremiumGuildSubscriptionSlot)(r);case 2:return e.next=4,(0,u.updateSubscription)(t,{items:(0,E.getItemsFromNewAdditionalPlans)(t,n)});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){var t=e.premiumSubscription,n=e.subscriptionSlotId,r=e.headerId,a=e.onNext,u=e.onClose,s=o.useState(!1),f=s[0],v=s[1],y=(0,l.useStateFromStores)([d.default],(function(){return d.default.theme}));return o.createElement(o.Fragment,null,M(_.ModalHeader,{separator:!1,id:r},void 0,M(m.FormTitle,{tag:m.FormTitleTags.H4},void 0,O.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_INVENTORY_UNCANCEL_TITLE),M(_.ModalCloseButton,{onClick:u})),M(_.ModalContent,{className:I.default.body},void 0,O.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_INVENTORY_UNCANCEL_DESCRIPTION),M(_.ModalFooter,{justify:p.default.Justify.START},void 0,M(c.default,{onClick:A(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,v(!0),(0,i.default)(null!=t.renewalMutations,"Cannot uncancel guild subscription without renewal mutations"),r=(0,g.calculateAdditionalPlansWithPremiumGuildAdjustment)(t,1),(0,i.default)((0,E.getNumPremiumGuildSubscriptions)(r)<=(0,E.getNumPremiumGuildSubscriptions)(t.additionalPlans),"Uncanceling should not increase the number of guild subscriptions"),e.next=7,P(t,r,n);case 7:a(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),v(!1);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))},void 0,O.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_INVENTORY_UNCANCEL_BUTTON),M(c.default,{look:c.default.Looks.LINK,color:y===S.ThemeTypes.LIGHT?c.default.Colors.PRIMARY:c.default.Colors.WHITE,onClick:u,disabled:f},void 0,O.default.Messages.NEVERMIND)))}function D(e){var t=e.headerId,n=e.onClose;return o.createElement(o.Fragment,null,M(_.ModalHeader,{separator:!1,id:t},void 0,M(m.FormTitle,{tag:m.FormTitleTags.H4},void 0,O.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_INVENTORY_UNCANCEL_CONFIRM_TITLE),M(_.ModalCloseButton,{onClick:n})),M(_.ModalContent,{className:I.default.body},void 0,M("div",{className:I.default.uncancelImage}),M("div",{},void 0,O.default.Messages.PREMIUM_GUILD_SUBSCRIPTION_INVENTORY_UNCANCEL_CONFIRM_DESCRIPTION)),M(_.ModalFooter,{},void 0,M(c.default,{onClick:n},void 0,O.default.Messages.OKAY)))}!function(e){e[e.START=1]="START",e[e.CONFIRM=2]="CONFIRM"}(a||(a={}));var w=M(_.ModalContent,{},void 0,M(v.default,{}));function j(e){var t=e.subscriptionSlotId,n=e.transitionState,r=e.onClose,i=(0,y.useUID)();o.useEffect((function(){f.default.hasFetchedSubscriptions()||(0,u.fetchSubscriptions)()}),[]);var s,d=(0,l.useStateFromStores)([f.default],(function(){return f.default.getPremiumTypeSubscription()})),c=o.useState(a.START),p=c[0],v=c[1];if(null==d)s=w;else switch(p){case a.START:s=M(L,{premiumSubscription:d,subscriptionSlotId:t,headerId:i,onNext:function(){return v(a.CONFIRM)},onClose:r});break;case a.CONFIRM:s=M(D,{headerId:i,onClose:r});break;default:throw new Error("Unexpected step: "+p)}return M(_.ModalRoot,{transitionState:n,"aria-labelledby":i},void 0,s)}j.displayName="PremiumGuildSubscriptionUncancellationModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color"]);return o.createElement("svg",u({width:n,height:a},(0,i.default)(f),{viewBox:"0 0 24 24"}),s("path",{d:"M13.8003 3.59643V7.86267C13.8003 9.15683 14.8448 10.2011 16.1393 10.2011H20.4067C20.9334 10.2011 21.2012 9.56739 20.8263 9.19253L14.8091 3.17694C14.4341 2.80208 13.8003 3.06092 13.8003 3.59643Z",fill:d}),s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9727 7.88073C11.9727 10.1692 13.8304 12.0269 16.1189 12.0269H20.9471V19.2064C20.9471 20.1936 20.1394 21.0013 19.1523 21.0013H4.79318C3.80599 21.0013 2.99829 20.1936 2.99829 19.2064V4.84737C2.99829 3.86019 3.80599 3.05249 4.79318 3.05249H11.9727V7.88073ZM13.8 14C13.8 14.9941 12.9941 15.8 12 15.8C11.0059 15.8 10.2 14.9941 10.2 14H9C9 15.6569 10.3431 17 12 17C13.6569 17 15 15.6569 15 14H13.8ZM7 15C7 15.5523 6.55228 16 6 16C5.44772 16 5 15.5523 5 15C5 14.4477 5.44772 14 6 14C6.55228 14 7 14.4477 7 15ZM18 16C18.5523 16 19 15.5523 19 15C19 14.4477 18.5523 14 18 14C17.4477 14 17 14.4477 17 15C17 15.5523 17.4477 16 18 16Z",fill:d}))}d.displayName="StickerPadded"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(85);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return(l=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}).apply(this,arguments)}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s=u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.84006 5.4367C2.19536 5.4367 2.49139 5.14651 2.49139 4.79823C2.49139 4.44996 2.19536 4.15977 1.84006 4.15977H1.48476C1.12947 4.15977 0.83329 4.44996 0.83329 4.79823C0.83329 5.14651 1.12947 5.4367 1.48476 5.4367H1.84006ZM15.282 13.1569C18.6574 11.6477 20.0785 7.81669 18.539 4.6241C17.4731 2.36029 15.2229 1.02527 12.8542 0.909088H6.16283C5.57062 0.909088 5.15606 1.37355 5.15606 1.89597C5.15606 2.47634 5.62989 2.88271 6.16283 2.88271H7.88006C8.23535 2.88271 8.53139 3.17289 8.53139 3.52117C8.53139 3.86945 8.23535 4.15977 7.88006 4.15977H3.67575C3.32046 4.15977 3.02428 4.44996 3.02428 4.79823C3.02428 5.14651 3.32046 5.4367 3.67575 5.4367H6.69578C7.05108 5.4367 7.34711 5.72702 7.34711 6.0753C7.34711 6.42358 7.05108 6.71376 6.69578 6.71376H4.80077C4.44547 6.71376 4.14943 7.00395 4.14943 7.35222C4.14943 7.7005 4.44547 7.99083 4.80077 7.99083H6.10357C6.16283 8.68738 6.34048 9.38394 6.63652 10.0224C8.11697 13.215 12.0252 14.6081 15.282 13.1569ZM9.22163 8.83321C8.36181 6.99779 9.18283 4.82663 11.0552 3.98379C12.9277 3.14096 15.1426 3.94576 16.0024 5.78119C16.8622 7.61661 16.0413 9.78777 14.1688 10.6306C12.2964 11.4734 10.0814 10.6686 9.22163 8.83321Z"}),d=u("path",{d:"M14.0385 5.20456L15.2228 7.17818C15.2821 7.29423 15.2821 7.35232 15.2228 7.46837L14.0385 9.44199C13.9793 9.55803 13.8609 9.55803 13.8016 9.55803H11.4922C11.3738 9.55803 11.3146 9.49994 11.2554 9.44199L10.071 7.46837C10.0119 7.35232 10.0119 7.29423 10.071 7.17818L11.2554 5.20456C11.3146 5.08852 11.4331 5.08852 11.4922 5.08852H13.8016C13.9202 5.03042 13.9793 5.08852 14.0385 5.20456Z"}),f=u("stop",{stopColor:"#B473F5"}),c=u("stop",{offset:"1",stopColor:"#E292AA"});function p(e){var t=(0,o.useUID)();return a.createElement("svg",l({},e,{width:"20",height:"14",viewBox:"0 0 20 14",xmlns:"http://www.w3.org/2000/svg",fill:"url(#"+t+")"}),s,d,u("defs",{},void 0,u("linearGradient",{id:t,x1:"0.833291",y1:"13.7309",x2:"12.8788",y2:"-3.48465",gradientUnits:"userSpaceOnUse"},void 0,f,c)))}p.displayName="UserSettingsPremiumSubscriptionsIcon"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=q;var r,a=x(n(0)),o=B(n(9)),i=B(n(5)),l=B(n(98)),u=n(3),s=B(n(154)),d=n(10439),f=n(1171),c=B(n(274)),p=B(n(473)),v=n(10343),y=B(n(1265)),m=B(n(15)),_=B(n(39)),h=B(n(12)),E=B(n(29)),g=B(n(467)),S=B(n(55)),O=B(n(1162)),I=B(n(8267)),T=B(n(149)),C=B(n(1165)),b=B(n(1370)),M=B(n(681)),N=x(n(474)),A=x(n(159)),P=B(n(466)),R=n(41),L=B(n(24)),D=B(n(93)),w=n(9179),j=n(9166),k=n(1),U=B(n(6)),G=B(n(8182)),F=B(n(370));function B(e){return e&&e.__esModule?e:{default:e}}function H(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return H=function(){return e},e}function x(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=H();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(){return(W=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}).apply(this,arguments)}function Y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var z=(0,l.default)();function K(e){var t=e.body,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["body"]);(0,R.openModal)((function(e){return a.createElement(P.default,W({},e,n),Y(L.default,{size:L.default.Sizes.SIZE_16},void 0,t))}))}function $(e){var t=e.message;K({header:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_FAILURE_TITLE,confirmText:U.default.Messages.OKAY,red:!0,body:t})}var Z=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).handleChangeDefaultGuildsRestricted=function(e){n.setState({defaultGuildsRestricted:!e},(function(){return n.showGuildRestrictionModal(!e)}))},n.handleUsageStatisticsChange=function(){!n.props.usageStatistics?(0,d.setConsents)([k.Consents.USAGE_STATISTICS],[]).catch($):K({header:U.default.Messages.USAGE_STATISTICS_DISABLE_MODAL_TITLE,body:U.default.Messages.USAGE_STATISTICS_DISABLE_MODAL_BODY,confirmText:U.default.Messages.USAGE_STATISTICS_DISABLE_MODAL_CONFIRM,cancelText:U.default.Messages.USAGE_STATISTICS_DISABLE_MODAL_CANCEL,onConfirm:function(){return(0,d.setConsents)([],[k.Consents.USAGE_STATISTICS]).catch($)}})},n.handlePersonalizationChange=function(){!n.props.personalization?(0,d.setConsents)([k.Consents.PERSONALIZATION],[]).catch($):K({header:U.default.Messages.PERSONALIZATION_DISABLE_MODAL_TITLE,confirmText:U.default.Messages.PERSONALIZATION_DISABLE_MODAL_CONFIRM,cancelText:U.default.Messages.PERSONALIZATION_DISABLE_MODAL_CANCEL,onConfirm:function(){return(0,d.setConsents)([],[k.Consents.PERSONALIZATION]).catch($)},body:U.default.Messages.PERSONALIZATION_DISABLE_MODAL_BODY})},n.handleAccessibilityDetectionChange=function(){var e=!n.props.allowAccessibilityDetection;c.default.updateRemoteSettings({allowAccessibilityDetection:e})},n.handleDataDownloadRequest=function(){K({header:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_MODAL_TITLE,body:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_MODAL_NOTE,confirmText:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_MODAL_CONFIRM,cancelText:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_MODAL_CANCEL,onConfirm:function(){n.setState({requestingHarvest:!0},(function(){(0,f.requestHarvest)().then((function(e){null!=e&&null!=e.body?(n.setState({currentHarvestRequest:e.body}),s.default.show({body:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_MODAL_SUCCESS})):s.default.show({title:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_FAILURE_TITLE,body:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_FAILURE_BODY})}),(function(){return s.default.show({title:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_FAILURE_TITLE,body:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_FAILURE_BODY})})).finally((function(){return n.setState({requestingHarvest:!1})}))}))}})};var r=t.defaultGuildsRestricted;return n.state={defaultGuildsRestricted:r,currentHarvestRequest:null,requestingHarvest:!0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,V(t,n);var l=r.prototype;return l.componentDidMount=function(){var e=this;(0,d.fetchConsents)(),(0,f.getHarvestStatus)().then((function(t){var n={requestingHarvest:!1,currentHarvestRequest:t.body};e.setState(n)}),(function(){e.setState({requestingHarvest:!1})}))},l.componentDidUpdate=function(e){e.defaultGuildsRestricted!==this.props.defaultGuildsRestricted&&this.setState({defaultGuildsRestricted:this.props.defaultGuildsRestricted})},l.hasPermittedSourceFlag=function(e){var t=this.props.friendSourceFlags,n=function(e){return!0===t[e]};return!!n(k.FriendSourceFlagKeys.ALL)||n(e)},l.onFieldChange=function(e,t){var n,r,a,o=this.props.friendSourceFlags;if(e===k.FriendSourceFlagKeys.ALL)t?((r={})[k.FriendSourceFlagKeys.ALL]=!0,r[k.FriendSourceFlagKeys.FRIENDS]=!0,r[k.FriendSourceFlagKeys.GUILDS]=!0,n=r):((a={})[k.FriendSourceFlagKeys.ALL]=!1,a[k.FriendSourceFlagKeys.FRIENDS]=!0,a[k.FriendSourceFlagKeys.GUILDS]=!0,n=a);else if(t){var i,l=!1;switch(e){case k.FriendSourceFlagKeys.FRIENDS:l=!0===o[k.FriendSourceFlagKeys.GUILDS];break;default:l=!0===o[k.FriendSourceFlagKeys.FRIENDS]}n=W({},o,((i={})[k.FriendSourceFlagKeys.ALL]=l,i[e]=!0,i))}else{var u;n=W({},o,((u={})[k.FriendSourceFlagKeys.ALL]=!1,u[e]=!1,u))}this.updatePermittedFriendSourceFlags(n)},l.updatePermittedFriendSourceFlags=function(e){c.default.updateRemoteSettings({friendSourceFlags:e})},l.handleExplicitContentFilterChange=function(e){var t=e.value;c.default.updateRemoteSettings({explicitContentFilter:t})},l.showGuildRestrictionModal=function(e){K({header:U.default.Messages.USER_DM_SETTINGS,body:U.default.Messages.USER_DM_SETTINGS_QUESTION,confirmText:U.default.Messages.YES_TEXT,cancelText:U.default.Messages.NO_TEXT,onConfirm:function(){c.default.updateRemoteSettings({defaultGuildsRestricted:e,restrictedGuilds:e?Object.keys(m.default.getGuilds()):[]})},onCancel:function(){c.default.updateRemoteSettings({defaultGuildsRestricted:e})}})},l.renderFriendSettings=function(){var e=this;return Y(M.default,{title:U.default.Messages.FRIEND_PERMITTED_SOURCE,className:F.default.marginBottom40},void 0,Y(I.default,{className:(0,o.default)(F.default.marginTop8,F.default.marginBottom20),value:this.hasPermittedSourceFlag(k.FriendSourceFlagKeys.ALL),onChange:function(t){return e.onFieldChange(k.FriendSourceFlagKeys.ALL,t)}},void 0,U.default.Messages.FRIEND_PERMITTED_SOURCE_ALL),Y(I.default,{value:this.hasPermittedSourceFlag(k.FriendSourceFlagKeys.FRIENDS),onChange:function(t){return e.onFieldChange(k.FriendSourceFlagKeys.FRIENDS,t)}},void 0,U.default.Messages.FRIEND_PERMITTED_SOURCE_MUTUAL_FRIENDS),Y(I.default,{className:F.default.marginReset,value:this.hasPermittedSourceFlag(k.FriendSourceFlagKeys.GUILDS),onChange:function(t){return e.onFieldChange(k.FriendSourceFlagKeys.GUILDS,t)}},void 0,U.default.Messages.FRIEND_PERMITTED_SOURCE_MUTUAL_GUILDS))},l.renderDMSafety=function(){return Y(M.default,{className:F.default.marginBottom40},void 0,Y(A.default,{tag:A.Tags.H5,className:F.default.marginBottom4,id:z},void 0,U.default.Messages.USER_EXPLICIT_CONTENT_FILTER),Y(N.default,{type:N.Types.DESCRIPTION,className:F.default.marginBottom8},void 0,U.default.Messages.USER_EXPLICIT_CONTENT_FILTER_HELP),Y(O.default,{labelledBy:z,value:this.props.explicitContentFilter,options:(0,w.generateDMSafetyOptions)(),onChange:this.handleExplicitContentFilterChange}))},l.renderServerPrivacy=function(){var e=this.props,t=e.viewNsfwGuilds,n=e.showAgeRestrictedToggle;return Y(M.default,{className:F.default.marginBottom40},void 0,Y(A.default,{tag:A.Tags.H5,className:F.default.marginBottom8},void 0,U.default.Messages.USER_DM_SETTINGS),Y(I.default,{className:F.default.marginReset,value:!this.state.defaultGuildsRestricted,note:U.default.Messages.USER_DM_SETTINGS_HELP,onChange:this.handleChangeDefaultGuildsRestricted},void 0,U.default.Messages.NEW_GUILDS_DM_ALLOWED),n?Y(I.default,{className:F.default.marginReset,value:t,note:U.default.Messages.NSFW_GUILDS_TOGGLE_CAPTION,onChange:function(e){return c.default.updateRemoteSettings({viewNsfwGuilds:e})}},void 0,U.default.Messages.NSFW_GUILDS_TOGGLE_HEADER):null)},l.renderActivityPartyPrivacy=function(){var e=this.props,t=e.allowActivityPartyPrivacyFriends,n=e.allowActivityPartyPrivacyVoiceChannel;return Y(M.default,{className:F.default.marginBottom40},void 0,Y(A.default,{tag:A.Tags.H5,className:F.default.marginBottom8},void 0,U.default.Messages.ACTIVITY_PARTY_PRIVACY),Y(I.default,{value:t,note:U.default.Messages.ACTIVITY_PARTY_PRIVACY_FRIENDS_HELP,onChange:function(e){return c.default.updateLocalSettings({allowActivityPartyPrivacyFriends:e})}},void 0,U.default.Messages.ACTIVITY_PARTY_PRIVACY_FRIENDS),Y(I.default,{value:n,note:U.default.Messages.ACTIVITY_PARTY_PRIVACY_VOICE_CHANNEL_HELP,onChange:function(e){return c.default.updateLocalSettings({allowActivityPartyPrivacyVoiceChannel:e})}},void 0,U.default.Messages.ACTIVITY_PARTY_PRIVACY_VOICE_CHANNEL))},l.renderDataPrivacy=function(){var e=this.props,t=e.usageStatistics,n=e.personalization,r=e.allowAccessibilityDetection;return Y(M.default,{className:F.default.marginBottom40},void 0,Y(A.default,{tag:A.Tags.H5,className:F.default.marginBottom8},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS),Y(I.default,{value:t,note:U.default.Messages.DATA_PRIVACY_CONTROLS_USAGE_STATISTICS_NOTE.format({helpdeskArticle:D.default.getArticleURL(k.HelpdeskArticles.DATA_PRIVACY_CONTROLS)}),onChange:this.handleUsageStatisticsChange},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_USAGE_STATISTICS_TITLE),Y(I.default,{value:n,note:U.default.Messages.DATA_PRIVACY_CONTROLS_PERSONALIZATION_NOTE_LEARN_MORE.format({helpdeskArticle:D.default.getArticleURL(k.HelpdeskArticles.DATA_PRIVACY_CONTROLS)}),onChange:this.handlePersonalizationChange},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_PERSONALIZATION_TITLE),Y(I.default,{value:r,note:U.default.Messages.DATA_PRIVACY_CONTROLS_ALLOW_ACCESSIBILITY_DETECTION_NOTE.format({helpdeskArticle:D.default.getArticleURL(k.HelpdeskArticles.ACCESSIBILITY_TRACKING)}),onChange:this.handleAccessibilityDetectionChange},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_ALLOW_ACCESSIBILITY_DETECTION_TITLE),Y(A.default,{tag:A.Tags.H3,className:(0,o.default)(F.default.marginTop20,F.default.marginBottom8)},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_BASIC_SERVICE_TITLE),Y(N.default,{type:N.Types.DESCRIPTION,className:F.default.marginBottom20},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_BASIC_SERVICE_NOTE.format({onClick:function(){p.default.setSection(k.UserSettingsSections.ACCOUNT)}})),this.renderHarvestRequest())},l.renderHarvestRequest=function(){var e,t=this,n=this.props.currentUser,r=this.state,o=r.requestingHarvest,l=r.currentHarvestRequest,u=(0,j.harvestDisabled)(l,n),s=Y(T.default,{text:n.verified?null:U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_TOOLTIP},void 0,(function(e){var n=e.onMouseEnter,r=e.onMouseLeave;return Y(E.default,{disabled:u,onClick:t.handleDataDownloadRequest,onMouseEnter:n,onMouseLeave:r,look:E.default.Looks.OUTLINED,color:E.default.Colors.BRAND,submitting:o},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_DOWNLOAD)}));return u&&null!=l&&(e=Y(g.default,{className:G.default.card},void 0,Y(L.default,{size:L.default.Sizes.SIZE_16},void 0,U.default.Messages.DATA_DOWNLOAD_REQUESTED_STATUS_NOTE.format({date:(0,i.default)(l.created_at).add(k.REQUEST_DATA_LIMIT_DAYS,"days").format("MMMM Do YYYY")}))),s=null),null!=s&&(s=Y(S.default,{},void 0,s)),Y(a.Fragment,{},void 0,Y(C.default,{className:F.default.marginBottom20}),Y(A.default,{tag:A.Tags.H3},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_PERSONAL_DATA_TITLE),Y(N.default,{type:N.Types.DESCRIPTION,className:F.default.marginBottom20},void 0,U.default.Messages.DATA_PRIVACY_CONTROLS_REQUEST_DATA_NOTE.format({helpdeskArticle:D.default.getArticleURL(k.HelpdeskArticles.GDPR_REQUEST_DATA)})),e,s)},l.renderPrivacyAndTermsNote=function(){return Y(M.default,{className:F.default.marginBottom40},void 0,Y(b.default,{type:b.default.Types.PRIMARY,body:U.default.Messages.USER_SETTINGS_PRIVACY_TERMS.format({termsLink:k.MarketingURLs.TERMS,privacyLink:k.MarketingURLs.PRIVACY})}))},l.render=function(){var e=this.props.fetchedConsents;return Y(M.default,{tag:A.Tags.H1,title:U.default.Messages.PRIVACY_AND_SAFETY},void 0,this.renderDMSafety(),this.renderServerPrivacy(),this.renderFriendSettings(),this.renderActivityPartyPrivacy(),e?this.renderDataPrivacy():null,this.renderPrivacyAndTermsNote())},r}(a.PureComponent);function q(){var e=v.AgeRestrictedGuildsExperiment.useExperiment({})[0],t=(0,u.useStateFromStores)([h.default],(function(){return h.default.getCurrentUser()})),n=(0,u.useStateFromStoresObject)([_.default],(function(){var e=_.default.explicitContentFilter,t=_.default.defaultGuildsRestricted,n=_.default.allowAccessibilityDetection,r=_.default.allowActivityPartyPrivacyFriends,a=_.default.viewNsfwGuilds;return{explicitContentFilter:e,defaultGuildsRestricted:t,allowAccessibilityDetection:n,allowActivityPartyPrivacyFriends:r,allowActivityPartyPrivacyVoiceChannel:_.default.allowActivityPartyPrivacyVoiceChannel,viewNsfwGuilds:a,friendSourceFlags:(0,j.computeFlags)()}})),r=(0,u.useStateFromStoresObject)([y.default],(function(){return{fetchedConsents:y.default.fetchedConsents,usageStatistics:y.default.hasConsented(k.Consents.USAGE_STATISTICS),personalization:y.default.hasConsented(k.Consents.PERSONALIZATION)}}));return a.createElement(Z,W({currentUser:t,showAgeRestrictedToggle:e.enabled},n,r))}Z.displayName="UserSettingsPrivacySafety",q.displayName="ConnectedUserSettingsPrivacySafety"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=h(n(9)),i=h(n(3)),l=h(n(1343)),u=h(n(473)),s=h(n(160)),d=h(n(39)),f=h(n(8267)),c=n(131),p=h(n(16)),v=n(1),y=h(n(6)),m=h(n(8183)),_=h(n(370));function h(e){return e&&e.__esModule?e:{default:e}}function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function g(){return(g=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}).apply(this,arguments)}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(e){var t,r;function a(){return e.apply(this,arguments)||this}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,O(t,r);var i=a.prototype;return i.renderNotice=function(){return S(c.FormNotice,{className:_.default.marginBottom40,iconClassName:m.default.noticeIcon,type:c.FormNoticeTypes.PRIMARY,imageData:{src:n(11669),width:184,height:110,position:c.FormNoticeImagePositions.RIGHT},title:y.default.Messages.USER_SETTINGS_STREAMER_NOTICE_TITLE,body:y.default.Messages.USER_SETTINGS_STREAMER_NOTICE_BODY.format({streamkitURL:v.MarketingURLs.STREAMKIT})})},i.renderAutoToggle=function(){if(p.default.embedded)return S(f.default,{value:this.props.autoToggle,onChange:this.handleChange.bind(this,"autoToggle"),note:y.default.Messages.AUTO_TOGGLE_STREAMER_MODE_DESCRIPTION},void 0,y.default.Messages.AUTO_TOGGLE_STREAMER_MODE_LABEL)},i.render=function(){return S(c.FormSection,{className:m.default.container,tag:c.FormTitleTags.H1,title:y.default.Messages.STREAMER_MODE},void 0,this.renderNotice(),S(f.default,{value:this.props.enabled,onChange:this.handleChange.bind(this,"enabled"),note:y.default.Messages.ENABLE_STREAMER_MODE_DESCRIPTION.format({onClick:this.handleGotoKeybinds})},void 0,y.default.Messages.ENABLE_STREAMER_MODE_LABEL),this.renderAutoToggle(),S(c.FormTitle,{className:(0,o.default)(_.default.marginTop40,_.default.marginBottom8)},void 0,y.default.Messages.OPTIONS),S(f.default,{value:this.props.hidePersonalInformation,onChange:this.handleChange.bind(this,"hidePersonalInformation"),note:y.default.Messages.HIDE_PERSONAL_INFORMATION_DESCRIPTION},void 0,y.default.Messages.HIDE_PERSONAL_INFORMATION_LABEL),S(f.default,{value:this.props.hideInstantInvites,onChange:this.handleChange.bind(this,"hideInstantInvites"),note:y.default.Messages.HIDE_INSTANT_INVITES_DESCRIPTION},void 0,y.default.Messages.HIDE_INSTANT_INVITES_LABEL),S(f.default,{value:this.props.disableSounds,onChange:this.handleChange.bind(this,"disableSounds"),note:y.default.Messages.DISABLE_SOUNDS_DESCRIPTION},void 0,y.default.Messages.DISABLE_SOUNDS_LABEL),S(f.default,{value:this.props.disableNotifications,onChange:this.handleChange.bind(this,"disableNotifications"),note:y.default.Messages.DISABLE_NOTIFICATIONS_DESCRIPTION},void 0,y.default.Messages.DISABLE_NOTIFICATIONS_LABEL))},i.handleChange=function(e,t){var n;l.default.update(((n={})[e]=t,n))},i.handleGotoKeybinds=function(){u.default.setSection(v.UserSettingsSections.KEYBINDS)},a}(a.PureComponent);I.displayName="UserSettingsModalStreamerMode";var T=i.default.connectStores([d.default,s.default],(function(){return g({},s.default.getSettings(),{theme:d.default.theme})}))(I);t.default=T},function(e,t,n){e.exports=n.p+"616e078b351d0df460971441949c53a3.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=T(n(0)),o=O(n(9)),i=T(n(3)),l=O(n(274)),u=n(8742),s=O(n(8560)),d=O(n(8295)),f=O(n(39)),c=O(n(1162)),p=O(n(8267)),v=O(n(476)),y=O(n(681)),m=O(n(474)),_=T(n(159)),h=O(n(13)),E=n(1),g=O(n(6)),S=O(n(370));function O(e){return e&&e.__esModule?e:{default:e}}function I(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return I=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=I();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var M=function(){var e=(0,i.useStateFromStores)([s.default],(function(){return s.default.expressionSuggestionsEnabled}));return b(v.default,{className:S.default.marginBottom20,title:g.default.Messages.STICKERS_AUTO_PLAY_HEADING},void 0,b(p.default,{className:(0,o.default)(S.default.marginTop20,S.default.marginBottom20),value:e,note:g.default.Messages.AUTO_SUGGEST_STICKERS_DESCRIPTION,onChange:function(t){h.default.track(E.AnalyticEvents.STICKER_SUGGESTIONS_ENABLED_TOGGLED,{enabled:!e,location:{section:E.AnalyticsSections.SETTINGS_TEXT_AND_IMAGES}}),(0,u.toggleExpressionSuggestionsEnabled)()}},void 0,g.default.Messages.AUTO_SUGGEST_STICKERS))};M.displayName="StickersUserSettings";var N=b(M,{}),A=b(M,{}),P=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var a=r.prototype;return a.onFieldChange=function(e,t){var n;l.default.updateRemoteSettings(((n={})[e]=t,n))},a.onLocalFieldChanged=function(e,t){var n;"useRichChatTextBox"===e&&h.default.track(E.AnalyticEvents.RICH_CHAT_TEXT_BOX_TOGGLED,{is_enabled:t}),l.default.updateLocalSettings(((n={})[e]=t,n))},a.renderSpoilerSettings=function(){var e=this;return b(v.default,{title:g.default.Messages.SHOW_SPOILER_CONTENT},void 0,b(m.default,{type:m.default.Types.DESCRIPTION,className:S.default.marginBottom8},void 0,g.default.Messages.SHOW_SPOILER_CONTENT_HELP),b(c.default,{options:[{name:g.default.Messages.SHOW_SPOILER_ON_CLICK,value:E.SpoilerRenderSetting.ON_CLICK},{name:g.default.Messages.SHOW_SPOILER_ON_SERVERS_I_MOD,value:E.SpoilerRenderSetting.IF_MODERATOR},{name:g.default.Messages.SHOW_SPOILER_ALWAYS,value:E.SpoilerRenderSetting.ALWAYS}],onChange:function(t){return e.onLocalFieldChanged("renderSpoilers",t.value)},value:this.props.renderSpoilers}))},a.renderStickersSettings=function(){return N},a.render=function(){var e=this,t=this.props,n=t.inlineEmbedMedia,r=t.inlineAttachmentMedia,a=t.renderEmbeds,i=t.renderReactions,l=t.convertEmoticons;return b(y.default,{tag:_.Tags.H1,title:g.default.Messages.TEXT_AND_IMAGES},void 0,b(_.default,{className:S.default.marginBottom8},void 0,g.default.Messages.INLINE_MEDIA_LABEL),b(p.default,{className:(0,o.default)(S.default.marginTop8,S.default.marginBottom20),value:n,onChange:function(t){return e.onFieldChange("inlineEmbedMedia",t)}},void 0,g.default.Messages.INLINE_EMBED_MEDIA),b(p.default,{className:(0,o.default)(S.default.marginTop8,S.default.marginBottom20),value:r,note:g.default.Messages.INLINE_ATTACHMENT_MEDIA_HELP.format({maxSize:10}),onChange:function(t){return e.onFieldChange("inlineAttachmentMedia",t)}},void 0,g.default.Messages.INLINE_ATTACHMENT_MEDIA),b(_.default,{className:S.default.marginBottom8},void 0,g.default.Messages.RENDER_EMBEDS_LABEL),b(p.default,{className:(0,o.default)(S.default.marginTop8,S.default.marginBottom40),value:a,onChange:function(t){return e.onFieldChange("renderEmbeds",t)}},void 0,g.default.Messages.RENDER_EMBEDS),b(_.default,{className:S.default.marginBottom8},void 0,g.default.Messages.EMOJI),b(p.default,{className:(0,o.default)(S.default.marginTop8,S.default.marginBottom20),value:i,onChange:function(t){return e.onFieldChange("renderReactions",t)}},void 0,g.default.Messages.RENDER_REACTIONS),b(p.default,{className:S.default.marginBottom40,value:l,note:d.default.parse(g.default.Messages.CONVERT_EMOTICONS_HELP),onChange:function(t){return e.onFieldChange("convertEmoticons",t)}},void 0,g.default.Messages.CONVERT_EMOTICONS),A,b(y.default,{className:S.default.marginBottom40},void 0,b(_.default,{className:S.default.marginBottom8},void 0,g.default.Messages.FORM_LABEL_USE_RICH_CHAT_BOX),b(p.default,{className:S.default.marginTop8,value:this.props.useRichChatTextBox,onChange:function(t){return e.onLocalFieldChanged("useRichChatTextBox",t)}},void 0,g.default.Messages.USE_RICH_CHAT_BOX_DESCRIPTION)),this.renderSpoilerSettings())},r}(a.PureComponent);P.displayName="UserSettingsTextImages";var R=i.default.connectStores([f.default],(function(){return{inlineAttachmentMedia:f.default.inlineAttachmentMedia,inlineEmbedMedia:f.default.inlineEmbedMedia,renderEmbeds:f.default.renderEmbeds,renderReactions:f.default.renderReactions,useRichChatTextBox:f.default.useRichChatTextBox,convertEmoticons:f.default.convertEmoticons,renderSpoilers:f.default.renderSpoilers}}))(P);t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=re(n(0)),o=te(n(9)),i=te(n(8)),l=te(n(3)),u=n(34),s=n(57),d=te(n(288)),f=re(n(744)),c=te(n(473)),p=re(n(10490)),v=te(n(8766)),y=te(n(218)),m=n(1228),_=n(11673),h=te(n(118)),E=te(n(738)),g=te(n(51)),S=te(n(1292)),O=te(n(283)),I=te(n(39)),T=te(n(12)),C=te(n(271)),b=te(n(29)),M=n(467),N=te(n(55)),A=te(n(1162)),P=te(n(1159)),R=te(n(8360)),L=te(n(8522)),D=te(n(8267)),w=n(85),j=te(n(1165)),k=te(n(476)),U=re(n(1370)),G=te(n(681)),F=te(n(474)),B=re(n(159)),H=te(n(466)),x=n(41),V=te(n(24)),W=te(n(13)),Y=te(n(93)),z=n(8425),K=te(n(16)),$=te(n(43)),Z=n(1),q=te(n(6)),X=te(n(8186)),J=te(n(1170)),Q=te(n(370)),ee=te(n(7395));function te(e){return e&&e.__esModule?e:{default:e}}function ne(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ne=function(){return e},e}function re(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ne();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ae(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function oe(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){ae(o,r,a,i,l,"next",e)}function l(e){ae(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ie(){return(ie=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}).apply(this,arguments)}function le(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function se(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,de(e,t)}function de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var fe=ue("div",{className:"grow"}),ce=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this)._timeout=new s.Timeout,t.state={volume:-100,speaking:!1},t.setupVoiceActivity=function(){g.default.getMediaEngine().on("voiceactivity",t.handleVoiceActivity),t._timeout.stop()},t.handleVoiceActivity=function(e,n){t.setState({volume:e,speaking:(n&u.SpeakingFlags.VOICE)===u.SpeakingFlags.VOICE})},t.handleAutoThresholdChange=function(e){var n=t.props,r=n.onThresholdChange,a=n.threshold;r&&r(a,e)},t.handleSensitivityChange=function(e){var n=t.props,r=n.onThresholdChange,a=n.auto;r&&r(-1*(100-e),a)},t}se(t,e);var n=t.prototype;return n.componentDidMount=function(){this._timeout.start(1e3,this.setupVoiceActivity)},n.componentWillUnmount=function(){g.default.getMediaEngine().removeListener("voiceactivity",this.handleVoiceActivity),this._timeout.stop()},n.handleValueRender=function(e){return(-1*(100-e)).toFixed(0)+"dB"},n.renderAutomaticVADToggle=function(){var e=this,t=this.props.auto;if(g.default.supports(u.Features.AUTOMATIC_VAD))return ue(w.UID,{},void 0,(function(n){return ue("div",{className:(0,o.default)(J.default.horizontal,Q.default.marginBottom4)},void 0,ue(B.default,{tag:B.Tags.H3,className:Q.default.marginReset},void 0,ue("label",{htmlFor:n},void 0,q.default.Messages.FORM_LABEL_AUTOMATIC_VAD)),ue(L.default,{id:n,checked:t,onChange:e.handleAutoThresholdChange}))}))},n.renderSlider=function(){var e,t=this.props,n=t.auto,r=t.threshold,a=this.state.speaking;return n?ue("section",{className:X.default.inputSensitivityToggle},void 0,ue("div",{className:ee.default.slider},void 0,ue("div",{className:(0,o.default)(ee.default.bar,X.default.sliderBar,(e={},e[X.default.speaking]=a||this.state.speaking,e))})),ue(F.default,{type:F.default.Types.DESCRIPTION,className:Q.default.marginBottom8},void 0,q.default.Messages.FORM_HELP_AUTOMATIC_VAD)):ue("section",{className:(0,o.default)(X.default.inputSensitivityToggle,X.default.manual)},void 0,ue(R.default,{initialValue:r+100,onValueRender:this.handleValueRender,onValueChange:this.handleSensitivityChange,barStyles:{background:Z.Colors.STATUS_GREEN_500},fillStyles:{background:Z.Colors.STATUS_YELLOW_400}},void 0,ue("div",{className:(0,o.default)(X.default.sliderBar,X.default.microphone,ee.default.bar)},void 0,ue("div",{className:(0,o.default)(X.default.fill,ee.default.barFill),style:{width:this.state.volume+100+"%"}}),fe)))},n.renderInputDisabledWarning=function(){if(!g.default.isEnabled())return ue(F.default,{type:F.default.Types.DESCRIPTION,className:(0,o.default)(X.default.inputDisabledWarning,Q.default.marginBottom8)},void 0,q.default.Messages.FORM_WARNING_INPUT_SENSITIVTY.format({onEnableClick:d.default.enable}))},n.render=function(){return ue(k.default,{className:X.default.sensitivity},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom8},void 0,q.default.Messages.FORM_LABEL_INPUT_SENSITIVTY),ue("div",{},void 0,this.renderAutomaticVADToggle(),this.renderSlider()),this.renderInputDisabledWarning())},t}(a.PureComponent);ce.displayName="VoiceSensitivity";var pe=l.default.connectStores([O.default],(function(){return{speaking:O.default.isCurrentUserSpeaking()}}))(ce),ve=function(e){function t(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).state={showCamera:!1,disableDebugUpload:!1},t.handleInputModeChange=function(e){var r=e.value;r===Z.InputModes.PUSH_TO_TALK&&t.props.usePTTLimited&&(0,x.openModal)((function(e){return a.createElement(y.default,ie({title:q.default.Messages.PTT_LIMITED_TITLE,confirmText:q.default.Messages.DOWNLOAD,cancelText:q.default.Messages.OKAY,onConfirm:t.handleDownload.bind(le(t),"PTT Limited Modal"),body:q.default.Messages.PTT_LIMITED_BODY,iconUrl:n(11674)},e))})),d.default.setMode(r)},t.handleDelayChange=function(e){d.default.setMode(t.props.inputMode,{delay:e})},t.handleThresholdChange=function(e,n){d.default.setMode(t.props.inputMode,{threshold:e,autoThreshold:n})},t.handleAdvancedVoiceActivityChange=function(e){d.default.setMode(t.props.inputMode,{vadUseKrisp:e})},t.handleHardwareH264Change=function(e){d.default.setHardwareH264(e)},t.handleDebugLoggingChange=function(e){(0,x.openModal)((function(t){return a.createElement(H.default,ie({header:q.default.Messages.SET_DEBUG_LOGGING,confirmText:q.default.Messages.OKAY,cancelText:q.default.Messages.CANCEL,onCancel:t.onClose,onConfirm:function(){return d.default.setDebugLogging(e)}},t),ue(V.default,{size:V.default.Sizes.SIZE_16},void 0,q.default.Messages.SET_DEBUG_LOGGING_BODY))}))},t.handleAecDumpChange=function(e){d.default.setAecDump(e)},t.handleAttenuationChange=function(e){d.default.setAttenuation(e,t.props.attenuateWhileSpeakingSelf,t.props.attenuateWhileSpeakingOthers)},t.handleAttenuateSelfChanged=function(e){d.default.setAttenuation(t.props.attenuation,e,t.props.attenuateWhileSpeakingOthers)},t.handleAttenuateOthersChanged=function(e){var n=t.props,r=n.attenuation,a=n.attenuateWhileSpeakingSelf;d.default.setAttenuation(r,a,e)},t.handleShortcutChange=function(e){d.default.setMode(t.props.inputMode,{shortcut:e})},t.handleShowCamera=function(){t.setState({showCamera:!0})},t.handleShowVoiceModuleFolder=oe(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==h.default.fileManager.getModulePath){e.next=6;break}return e.next=3,h.default.fileManager.getModulePath();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=h.default.fileManager.modulePath;case 7:t=e.t0,n=h.default.fileManager.join(t,"discord_voice"),h.default.fileManager.showItemInFolder(n);case 10:case"end":return e.stop()}}),e)}))),t.handleUploadDebugFiles=function(){t.setState({disableDebugUpload:!0}),g.default.getMediaEngine().writeAudioDebugState().finally((function(){return(0,_.uploadDebugFiles)().then((function(){return(0,x.openModal)((function(e){return a.createElement(H.default,ie({header:q.default.Messages.UPLOAD_DEBUG_LOG_SUCCESS_HEADER,confirmButtonColor:b.default.Colors.BRAND,confirmText:q.default.Messages.OKAY},e),ue(V.default,{size:V.default.Sizes.SIZE_16},void 0,q.default.Messages.UPLOAD_DEBUG_LOG_SUCCESS))}))})).catch((function(e){return(0,x.openModal)((function(t){return a.createElement(H.default,ie({header:q.default.Messages.UPLOAD_DEBUG_LOG_FAILURE_HEADER,confirmButtonColor:b.default.Colors.BRAND,confirmText:q.default.Messages.OKAY},t),ue(V.default,{size:V.default.Sizes.SIZE_16},void 0,e.displayMessage))}))})).finally((function(){t.setState({disableDebugUpload:!1})}))}))},t.handleConnectionLogChange=function(e){f.setShouldRecordNextConnection(e)},t.handleOpenConnectionReplay=function(){f.openReplay()},t.handleOpenH264Change=function(e){d.default.setOpenH264(e),d.default.setHardwareH264(e)},t.handleEnableSoundshare=function(){d.default.enableSoundshare()},t.renderDevice=function(e){var r,a=e.label,o=e.value;E.default.isCertified(o)&&(r=ue("img",{src:t.props.theme===Z.ThemeTypes.LIGHT?n(11675):n(11676),alt:"Certified",className:X.default.deviceOptionCertified}));return ue("span",{className:X.default.deviceOption},o,ue("span",{className:X.default.deviceOptionLabel},void 0,E.default.getCertifiedDeviceName(o,a)),r)},t.handleKrispLinkClick=function(e){var t=e.currentTarget;W.default.track(Z.AnalyticEvents.NOISE_CANCELLATION_LINK_CLICKED,{text:t.text,href:t.href,location:{page:Z.AnalyticsPages.USER_SETTINGS,section:Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO}})},t}se(t,e);var r=t.prototype;return r.handleInputDeviceChange=function(e){var t=e.value;d.default.setInputDevice(t,"Settings")},r.handleOutputDeviceChange=function(e){var t=e.value;d.default.setOutputDevice(t,"Settings")},r.handleDownload=function(e){(0,m.showAppDownloadModal)(e)},r.handleInputVolumeChange=function(e){d.default.setInputVolume((0,z.perceptualToAmplitude)(e))},r.handleOutputVolumeChange=function(e){d.default.setOutputVolume((0,z.perceptualToAmplitude)(e))},r.handleDelayValueRender=function(e){return e>=1e3?(e/=1e3).toFixed(2)+"s":e.toFixed(0)+" ms"},r.handleVideoDeviceChange=function(e){var t=e.value;d.default.setVideoDevice(t,Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO)},r.handleNoiseSuppressionChange=function(e){d.default.setNoiseSuppression(e,{page:Z.AnalyticsPages.USER_SETTINGS,section:Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO})},r.handleNoiseCancellationChange=function(e){d.default.setNoiseCancellation(e,{page:Z.AnalyticsPages.USER_SETTINGS,section:Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO})},r.handleEchoCancellationChange=function(e){d.default.setEchoCancellation(e,{page:Z.AnalyticsPages.USER_SETTINGS,section:Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO})},r.handleAutomaticGainControlChange=function(e){d.default.setAutomaticGainControl(e,{page:Z.AnalyticsPages.USER_SETTINGS,section:Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO})},r.handleExperimentalEncodersChange=function(e){d.default.setExperimentalEncoders(e)},r.handleSilenceWarningChange=function(e){d.default.setSilenceWarning(e)},r.handleVideoHookChange=function(e){d.default.setVideoHook(e)},r.handleExperimentalSoundshareChange=function(e){d.default.setExperimentalSoundshare(e)},r.handleQoSChanged=function(e){d.default.setQoS(e)},r.handleVoiceReset=function(){(0,x.openModal)((function(e){return a.createElement(H.default,ie({header:q.default.Messages.RESET_VOICE_SETTINGS,confirmText:q.default.Messages.OKAY,cancelText:q.default.Messages.CANCEL,onConfirm:d.default.reset},e),ue(V.default,{size:V.default.Sizes.SIZE_16},void 0,q.default.Messages.RESET_VOICE_SETTINGS_BODY))}))},r.handleAudioSubsystemChanged=function(e){var t=e.value;(0,x.openModal)((function(e){return a.createElement(H.default,ie({header:q.default.Messages.SWITCH_SUBSYSTEM,confirmText:q.default.Messages.OKAY,cancelText:q.default.Messages.CANCEL,onConfirm:function(){return d.default.setAudioSubsystem(t)}},e),ue(V.default,{size:V.default.Sizes.SIZE_16},void 0,q.default.Messages.SWITCH_SUBSYSTEM_BODY))}))},r.renderDevices=function(){var e,t,n=this.props,r=n.inputDevices,a=n.inputDeviceId,o=n.outputDeviceId,l=n.outputDevices,u=n.canSetInputDevice,s=n.canSetOutputDevice;u||(e=ue(F.default,{type:F.default.Types.DESCRIPTION,className:Q.default.marginTop8},void 0,q.default.Messages.BROWSER_INPUT_DEVICE_WARNING.format({onDownloadClick:this.handleDownload.bind(this,"Help Text Input Devices")}))),s||(t=ue(F.default,{type:F.default.Types.DESCRIPTION,className:Q.default.marginTop8},void 0,q.default.Messages.BROWSER_OUTPUT_DEVICE_WARNING.format({onDownloadClick:this.handleDownload.bind(this,"Help Text Output Devices")})));var d=(0,i.default)(r).values().first(),f=null!=d?d.disabled:null!=e,c=(0,i.default)(l).values().first(),p=null!=c?c.disabled:null!=t;return ue(N.default,{className:Q.default.marginBottom20},void 0,ue(N.default.Child,{basis:"50%"},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom8},void 0,q.default.Messages.FORM_LABEL_INPUT_DEVICE),ue(P.default,{value:a,clearable:!1,searchable:!1,onChange:this.handleInputDeviceChange,options:i.default.map(r,(function(e){return{value:e.id,label:e.name}})),disabled:f,valueRenderer:this.renderDevice,optionRenderer:this.renderDevice}),e),ue(N.default.Child,{basis:"50%"},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom8},void 0,q.default.Messages.FORM_LABEL_OUTPUT_DEVICE),ue(P.default,{value:o,clearable:!1,searchable:!1,onChange:this.handleOutputDeviceChange,options:i.default.map(l,(function(e){return{value:e.id,label:e.name}})),disabled:p,valueRenderer:this.renderDevice,optionRenderer:this.renderDevice}),t))},r.renderVolumeControls=function(){var e=this.props,t=e.inputVolume,n=e.outputVolume;return ue(N.default,{className:"volume"},void 0,ue(N.default.Child,{basis:"50%"},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom4},void 0,q.default.Messages.FORM_LABEL_INPUT_VOLUME),ue(R.default,{initialValue:(0,z.amplitudeToPerceptual)(t),asValueChanges:this.handleInputVolumeChange})),ue(N.default.Child,{basis:"50%"},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom4},void 0,q.default.Messages.FORM_LABEL_OUTPUT_VOLUME),ue(R.default,{initialValue:(0,z.amplitudeToPerceptual)(n),maxValue:200,onValueRender:function(e){return e.toFixed(0)+"%"},asValueChanges:this.handleOutputVolumeChange})))},r.renderMicTest=function(){return g.default.supports(u.Features.LOOPBACK)?ue("div",{className:X.default.micTest},void 0,ue(p.default,{title:q.default.Messages.USER_SETTINGS_VOICE_MIC_TEST_TITLE,description:q.default.Messages.USER_SETTINGS_VOICE_MIC_TEST_DESCRIPTION,notchBackground:p.NotchBackground.GRAY,captionVoice:q.default.Messages.USER_SETTINGS_VOICE_MIC_TEST_VOICE_CAPTION,captionNoVoice:a.createElement(a.Fragment,null,q.default.Messages.USER_SETTINGS_VOICE_MIC_TEST_VOICE_NO_INPUT_NOTICE,ue(C.default,{className:X.default.micTestHelpLink,href:Y.default.getArticleURL(Z.HelpdeskArticles.NO_INPUT_DETECTED)},void 0,q.default.Messages.NOTICE_NO_INPUT_DETECTED_HELP_LINK_TEXT)),buttonTest:q.default.Messages.USER_SETTINGS_VOICE_MIC_TEST_BUTTON_INACTIVE,buttonStop:q.default.Messages.USER_SETTINGS_VOICE_MIC_TEST_BUTTON_ACTIVE,buttonClassName:X.default.micTestButton,buttonColor:b.default.Colors.BRAND,location:{page:Z.AnalyticsPages.USER_SETTINGS,section:Z.AnalyticsSections.SETTINGS_VOICE_AND_VIDEO}})):null},r.renderInputMode=function(){var e=this.props,t=e.usePTTLimited,n=e.inputMode,r=[{value:Z.InputModes.VOICE_ACTIVITY,name:q.default.Messages.INPUT_MODE_VAD},{value:Z.InputModes.PUSH_TO_TALK,name:t?q.default.Messages.INPUT_MODE_PTT_LIMITED:q.default.Messages.INPUT_MODE_PTT}];return ue(k.default,{title:q.default.Messages.FORM_LABEL_INPUT_MODE,className:Q.default.marginBottom20},void 0,ue(A.default,{onChange:this.handleInputModeChange,options:r,value:n}))},r.renderPTTTools=function(){var e,t=this.props,n=t.inputMode,r=t.delay,a=t.shortcut;return n!==Z.InputModes.PUSH_TO_TALK?null:(e=K.default.embedded||n!==Z.InputModes.PUSH_TO_TALK?ue(F.default,{type:F.default.Types.DESCRIPTION,className:(0,o.default)(X.default.pttToolsMessage,Q.default.marginBottom8)},void 0,q.default.Messages.USER_SETTINGS_VOICE_ADD_MULTIPLE.format({onClick:function(){return c.default.setSection(Z.UserSettingsSections.KEYBINDS)}})):ue(F.default,{type:F.default.Types.DESCRIPTION,className:(0,o.default)(X.default.pttToolsMessage,X.default.pttToolsWarning,Q.default.marginBottom8)},void 0,q.default.Messages.PTT_LIMITED_WARNING.format({onDownloadClick:this.handleDownload.bind(this,"Help Text PTT")})),ue("div",{className:X.default.pttTools},void 0,ue(N.default,{},void 0,ue(N.default.Child,{basis:"50%"},void 0,ue(k.default,{title:q.default.Messages.FORM_LABEL_SHORTCUT},void 0,ue(v.default,{defaultValue:a,onChange:this.handleShortcutChange}))),ue(N.default.Child,{basis:"50%"},void 0,ue(k.default,{title:q.default.Messages.INPUT_MODE_PTT_RELEASE_DELAY},void 0,ue(R.default,{initialValue:r,onValueChange:this.handleDelayChange,onValueRender:this.handleDelayValueRender,maxValue:Z.MAX_PTT_RELEASE_DELAY})))),e))},r.renderVoiceSensitivityTools=function(){var e=this.props,t=e.inputMode,n=e.vadThreshold,r=e.vadAutoThreshold;return t!==Z.InputModes.VOICE_ACTIVITY?null:ue(pe,{inputMode:t,threshold:n,auto:r,onThresholdChange:this.handleThresholdChange})},r.renderVideoDevices=function(){var e,t,r,a=this.props,l=a.videoDevices,u=a.videoDeviceId,s=a.theme;g.default.isEnabled()||(r=ue(F.default,{type:F.default.Types.DESCRIPTION,className:Q.default.marginTop8},void 0,q.default.Messages.FORM_WARNING_VIDEO_PREVIEW.format({onEnableClick:d.default.enable})));var f=(0,i.default)(l).values().first(),c=null!=f?f.disabled:null!=r,p=g.default.getCameraComponent(),v=s===Z.ThemeTypes.LIGHT?n(11677):n(11678);return ue(N.default,{},void 0,ue(N.default.Child,{basis:"50%"},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom8},void 0,q.default.Messages.FORM_LABEL_VIDEO_DEVICE),ue(P.default,{value:u,clearable:!1,searchable:!1,disabled:c,onChange:this.handleVideoDeviceChange,options:i.default.map(l,(function(e){return{value:e.id,label:e.name}})),valueRenderer:this.renderDevice,optionRenderer:this.renderDevice}),r),ue(N.default.Child,{basis:"50%"},void 0,ue(B.default,{tag:B.Tags.H5,className:Q.default.marginBottom8},void 0,q.default.Messages.FORM_LABEL_VIDEO_PREVIEW),ue("div",{className:X.default.previewContainer},void 0,ue(p,{deviceId:u,disabled:!this.state.showCamera||c}),ue(N.default,{className:(0,o.default)(X.default.previewOverlay,(e={},e[X.default.dismiss]=this.state.showCamera,e))},void 0,ue(N.default,{className:(0,o.default)(X.default.previewOverlayInner,(t={},t[X.default.dismiss]=this.state.showCamera,t)),direction:N.default.Direction.VERTICAL,justify:N.default.Justify.CENTER,align:N.default.Align.CENTER},void 0,ue("img",{className:Q.default.marginBottom20,alt:"",src:v}),ue(b.default,{onClick:this.handleShowCamera,disabled:this.state.showCamera||c},void 0,q.default.Messages.TEST_VIDEO))))))},r.renderVideoWarnings=function(){return ue(U.default,{type:M.Types.PRIMARY,title:q.default.Messages.VIDEO_UNSUPPORTED_BROWSER_TITLE,body:q.default.Messages.VIDEO_UNSUPPORTED_BROWSER_BODY,button:ue(b.default,{size:b.default.Sizes.SMALL,className:Q.default.marginTop20,onClick:this.handleDownload.bind(this,"Video unsupported browser")},void 0,q.default.Messages.DOWNLOAD_APP)})},r.renderNoiseCancellation=function(){var e,t=this.props,r=t.theme,a=t.noiseCancellation;if(t.noiseCancellationSupported)return e=r===Z.ThemeTypes.LIGHT?n(11679):n(11680),ue(G.default,{className:Q.default.marginBottom20},void 0,ue(D.default,{className:(0,o.default)(Q.default.marginTop8,Q.default.marginBottom20),value:a,hideBorder:!0,onChange:this.handleNoiseCancellationChange,note:q.default.Messages.USER_SETTINGS_NOISE_CANCELLATION_DESCRIPTION},void 0,q.default.Messages.USER_SETTINGS_NOISE_CANCELLATION),ue(U.default,{className:Q.default.marginBottom20,type:U.Types.PRIMARY,imageData:{src:e,width:70,height:40},align:N.default.Align.CENTER,body:ue(C.default,{href:Y.default.getArticleURL(Z.HelpdeskArticles.NOISE_SUPPRESSION),onClick:this.handleKrispLinkClick},void 0,q.default.Messages.LEARN_MORE)}))},r.renderCodec=function(){var e;return e=this.props.theme===Z.ThemeTypes.LIGHT?n(11681):n(11682),ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.USER_SETTINGS_VOICE_CODEC_TITLE},void 0,ue(U.default,{className:Q.default.marginBottom20,type:U.Types.PRIMARY,imageData:{src:e,width:70,height:40},align:N.default.Align.CENTER,body:q.default.Messages.USER_SETTINGS_VOICE_CODEC_DESCRIPTION}))},r.renderVideoCodec=function(){if(!g.default.supports(u.Features.OPEN_H264))return null;var e,t=this.props,n=t.openH264,r=t.experimentalEncoders,a=t.hardwareH264;return"stable"!==$.default.releaseChannel&&g.default.isExperimentalEncodersSupported()&&(e=ue(D.default,{className:(0,o.default)(Q.default.marginTop8,Q.default.marginBottom20),value:r,onChange:this.handleExperimentalEncodersChange,disabled:!1},void 0,q.default.Messages.EXPERIMENTAL_ENCODERS)),ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.USER_SETTINGS_VOICE_VIDEO_CODEC_TITLE},void 0,ue(D.default,{className:(0,o.default)(Q.default.marginTop8,Q.default.marginBottom20),value:n,onChange:this.handleOpenH264Change,disabled:!1,note:q.default.Messages.FORM_HELP_OPEN_H264},void 0,q.default.Messages.USER_SETTINGS_VOICE_OPEN_H264),ue(D.default,{className:(0,o.default)(Q.default.marginTop8,Q.default.marginBottom20),value:a,onChange:this.handleHardwareH264Change,disabled:!n,note:q.default.Messages.FORM_HELP_HARDWARE_H264},void 0,q.default.Messages.USER_SETTINGS_VOICE_HARDWARE_H264),e)},r.renderVoiceProcessing=function(){if(!g.default.supports(u.Features.VOICE_PROCESSING))return null;var e,t,n=this.props,r=n.noiseSuppression,a=n.echoCancellation,i=n.automaticGainControl,l=n.inputDeviceId,s=n.noiseCancellation,d=n.vadUseKrisp,f=n.inputMode,c=n.vadAutoThreshold,p=n.advancedVoiceActivitySupported,v=E.default.hasEchoCancellation(l),y=E.default.hasNoiseSuppression(l),m=E.default.hasAutomaticGainControl(l);if((v||v||m)&&(e=ue(F.default,{className:Q.default.marginBottom20,type:F.default.Types.DESCRIPTION},void 0,q.default.Messages.FORM_HELP_CERTIFIED_VOICE_PROCESSING)),p){var _=f===Z.InputModes.VOICE_ACTIVITY&&c;t=ue(D.default,{value:d,onChange:this.handleAdvancedVoiceActivityChange,note:q.default.Messages.USER_SETTINGS_DISABLE_ADVANCED_VOICE_ACTIVITY,disabled:!_},void 0,q.default.Messages.ADVANCED_VOICE_ACTIVITY)}return ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.FORM_LABEL_VOICE_PROCESSING},void 0,e,ue(D.default,{className:(0,o.default)(Q.default.marginTop8,Q.default.marginBottom20),value:a,onChange:this.handleEchoCancellationChange,disabled:v},void 0,q.default.Messages.ECHO_CANCELLATION),ue(D.default,{value:r,onChange:this.handleNoiseSuppressionChange,note:s&&q.default.Messages.USER_SETTINGS_DISABLE_NOISE_SUPPRESSION,disabled:y||s},void 0,q.default.Messages.NOISE_SUPPRESSION),t,ue(D.default,{className:"",value:i,onChange:this.handleAutomaticGainControlChange,disabled:m},void 0,q.default.Messages.AUTOMATIC_GAIN_CONTROL))},r.renderQoS=function(){if(!g.default.supports(u.Features.QOS))return null;var e=this.props.qosEnabled;return ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.FORM_LABEL_QOS},void 0,ue(D.default,{className:"",value:e,onChange:this.handleQoSChanged,note:q.default.Messages.FORM_HELP_QOS},void 0,q.default.Messages.FORM_CHECKBOX_QOS))},r.renderAttenutation=function(){if(!g.default.supports(u.Features.ATTENUATION))return null;var e=this.props,t=e.attenuation,n=e.attenuateWhileSpeakingSelf,r=e.attenuateWhileSpeakingOthers;return ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.FORM_LABEL_ATTENUATION},void 0,ue(R.default,{initialValue:t,onValueChange:this.handleAttenuationChange}),ue(F.default,{className:Q.default.marginBottom20,type:F.default.Types.DESCRIPTION},void 0,q.default.Messages.FORM_HELP_ATTENUATION),ue(j.default,{className:Q.default.marginBottom20}),ue(D.default,{value:n,onChange:this.handleAttenuateSelfChanged},void 0,q.default.Messages.ATTENUATE_WHILE_SPEAKING_SELF),ue(D.default,{className:"",value:r,onChange:this.handleAttenuateOthersChanged},void 0,q.default.Messages.ATTENUATE_WHILE_SPEAKING_OTHERS))},r.renderAudioSubsystem=function(){if(!g.default.supports(u.Features.LEGACY_AUDIO_SUBSYSTEM)&&!g.default.supports(u.Features.EXPERIMENTAL_AUDIO_SUBSYSTEM))return null;var e=[{value:u.AudioSubsystems.STANDARD,label:"Standard"}];g.default.supports(u.Features.LEGACY_AUDIO_SUBSYSTEM)&&e.push({value:u.AudioSubsystems.LEGACY,label:"Legacy"}),g.default.supports(u.Features.EXPERIMENTAL_AUDIO_SUBSYSTEM)&&e.push({value:u.AudioSubsystems.EXPERIMENTAL,label:"Experimental"});var t=this.props.audioSubsystem;return ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.FORM_LABEL_SUBSYSTEM},void 0,ue(P.default,{className:Q.default.marginBottom20,value:t,clearable:!1,searchable:!1,options:e,onChange:this.handleAudioSubsystemChanged}),ue(j.default,{className:Q.default.marginBottom20}))},r.renderScreenshare=function(){if(!K.default.embedded)return null;var e,t,n,r=this.props,a=r.videoHook,o=r.experimentalSoundshare,i=r.soundshareEnabled;if(g.default.supports(u.Features.VIDEO_HOOK)&&(e=ue(D.default,{value:a,onChange:this.handleVideoHookChange},void 0,q.default.Messages.USER_SETTINGS_VOICE_VIDEO_HOOK_LABEL)),g.default.supportsExperimentalSoundshare()&&(t=ue(D.default,{value:o,onChange:this.handleExperimentalSoundshareChange},void 0,q.default.Messages.USER_SETTINGS_VOICE_EXPERIMENTAL_SOUNDSHARE_LABEL)),g.default.supportsEnableSoundshare()){var l=q.default.Messages.USER_SETTINGS_VOICE_SOUNDSHARE_NOT_ENABLED_LABEL;i===Z.SoundshareEnableState.ENABLING?l=q.default.Messages.USER_SETTINGS_VOICE_SOUNDSHARE_ENABLING_LABEL:i===Z.SoundshareEnableState.ENABLED&&(l=q.default.Messages.USER_SETTINGS_VOICE_SOUNDSHARE_ENABLED_LABEL),n=ue(k.default,{},void 0,ue(F.default,{className:Q.default.marginBottom20},void 0,l.format({helpdeskArticle:Y.default.getArticleURL(Z.HelpdeskArticles.OSX_SOUNDSHARE)})),ue(N.default,{},void 0,ue(N.default.Child,{grow:0,shrink:0},void 0,ue(b.default,{className:Q.default.marginBottom20,size:b.default.Sizes.SMALL,onClick:this.handleEnableSoundshare,disabled:i!==Z.SoundshareEnableState.NOT_ENABLED},void 0,i===Z.SoundshareEnableState.NOT_ENABLED?q.default.Messages.USER_SETTINGS_VOICE_INSTALL_LABEL:q.default.Messages.USER_SETTINGS_VOICE_INSTALLED_LABEL))),ue(j.default,{className:Q.default.marginBottom20}))}return null==e&&null==t&&null==n?null:ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.FORM_LABEL_SCREENSHARE},void 0,e,t,n)},r.renderDiagnostics=function(){if(!K.default.embedded)return null;var e=this.props.silenceWarning;return ue(G.default,{className:Q.default.marginBottom20,title:q.default.Messages.FORM_LABEL_VOICE_DIAGNOSTICS},void 0,ue(D.default,{className:"",value:e,onChange:this.handleSilenceWarningChange},void 0,q.default.Messages.DISPLAY_SILENCE_WARNING))},r.renderDebugLogs=function(){if(K.default.embedded&&g.default.supports(u.Features.DEBUG_LOGGING)&&null!=h.default.fileManager.readLogFiles){var e=this.props,t=e.debugLogging,n=e.aecDumpSupported,r=e.aecDumpEnabled,o=e.shouldRecordNextConnection,i=e.isStaff,l=this.state.disableDebugUpload,s=a.createElement(a.Fragment,null,ue(D.default,{hideBorder:!0,value:t,onChange:this.handleDebugLoggingChange,note:q.default.Messages.FORM_HELP_DEBUG_LOGGING},void 0,q.default.Messages.FORM_CHECKBOX_DEBUG_LOGGING)),d=n?a.createElement(a.Fragment,null,ue(D.default,{value:r,onChange:this.handleAecDumpChange,note:q.default.Messages.FORM_HELP_AEC_DUMP},void 0,q.default.Messages.FORM_CHECKBOX_AEC_DUMP)):null,f=("canary"===$.default.releaseChannel||"development"===$.default.releaseChannel)&&i&&g.default.supports(u.Features.CONNECTION_REPLAY)?a.createElement(a.Fragment,null,ue(D.default,{hideBorder:!0,value:o,onChange:this.handleConnectionLogChange,note:q.default.Messages.FORM_HELP_CONNECTION_LOG},void 0,q.default.Messages.FORM_CHECKBOX_CONNECTION_LOG),ue(k.default,{},void 0,ue(N.default,{className:Q.default.marginBottom20},void 0,ue(N.default.Child,{grow:0,shrink:0},void 0,ue(b.default,{size:b.default.Sizes.SMALL,onClick:this.handleOpenConnectionReplay},void 0,q.default.Messages.OPEN_CONNECTION_REPLAY))))):null;return ue(G.default,{className:Q.default.marginBottom40,title:q.default.Messages.FORM_LABEL_DEBUG},void 0,d,f,s,ue(k.default,{},void 0,ue(N.default,{},void 0,ue(N.default.Child,{grow:0,shrink:0},void 0,ue(b.default,{disabled:l,size:b.default.Sizes.SMALL,onClick:this.handleUploadDebugFiles},void 0,q.default.Messages.UPLOAD)),ue(N.default.Child,{grow:0,shrink:0},void 0,ue(b.default,{size:b.default.Sizes.SMALL,onClick:this.handleShowVoiceModuleFolder},void 0,q.default.Messages.SHOW_FOLDER)))))}},r.renderResetVoiceSettings=function(){return ue(k.default,{},void 0,ue(b.default,{look:b.default.Looks.OUTLINED,color:b.default.Colors.RED,onClick:this.handleVoiceReset,size:b.default.Sizes.SMALL},void 0,q.default.Messages.RESET_VOICE_SETTINGS))},r.renderVideoSettings=function(){var e=g.default.supports(u.Features.VIDEO);return ue("div",{},void 0,ue(B.default,{tag:B.Tags.H1,className:Q.default.marginBottom20},void 0,q.default.Messages.VIDEO_SETTINGS),e?this.renderVideoDevices():this.renderVideoWarnings(),ue(j.default,{className:(0,o.default)(Q.default.marginBottom40,Q.default.marginTop40)}))},r.render=function(){var e=Y.default.getArticleURL(Z.HelpdeskArticles.VOICE_VIDEO_TROUBLESHOOTING)+"?utm_source=discord&utm_medium=blog&utm_campaign=2020-06_help-voice-video&utm_content=--t%3Apm";return ue(G.default,{className:X.default.userSettingsVoice,tag:B.Tags.H1,title:q.default.Messages.VOICE_SETTINGS},void 0,this.renderDevices(),this.renderVolumeControls(),this.renderMicTest(),ue(F.default,{className:Q.default.marginBottom20,type:F.default.Types.DESCRIPTION},void 0,q.default.Messages.FORM_HELP_VOICE_VIDEO_TROUBLESHOOTING_GUIDE.format({guideURL:e})),ue(j.default,{className:(0,o.default)(Q.default.marginBottom40)}),this.renderInputMode(),this.renderPTTTools(),this.renderVoiceSensitivityTools(),ue(j.default,{className:Q.default.marginBottom40}),this.renderVideoSettings(),ue(B.default,{tag:B.Tags.H1,className:Q.default.marginBottom20},void 0,q.default.Messages.SETTINGS_ADVANCED),this.renderNoiseCancellation(),this.renderCodec(),this.renderVideoCodec(),this.renderVoiceProcessing(),this.renderQoS(),this.renderAttenutation(),this.renderAudioSubsystem(),this.renderScreenshare(),this.renderDiagnostics(),this.renderDebugLogs(),this.renderResetVoiceSettings())},t}(a.PureComponent);ve.displayName="UserSettingsVoice";var ye=l.default.connectStores([I.default,T.default,g.default,E.default,S.default],(function(){var e;return{theme:I.default.theme,canSetInputDevice:g.default.supports(u.Features.AUDIO_INPUT_DEVICE),canSetOutputDevice:g.default.supports(u.Features.AUDIO_OUTPUT_DEVICE),inputVolume:g.default.getInputVolume(),outputVolume:g.default.getOutputVolume(),inputDeviceId:g.default.getInputDeviceId(),inputDevices:g.default.getInputDevices(),outputDevices:g.default.getOutputDevices(),outputDeviceId:g.default.getOutputDeviceId(),videoDevices:g.default.getVideoDevices(),videoDeviceId:g.default.getVideoDeviceId(),echoCancellation:g.default.getEchoCancellation(),loopback:g.default.getLoopback(),noiseSuppression:g.default.getNoiseSuppression(),automaticGainControl:g.default.getAutomaticGainControl(),noiseCancellation:g.default.getNoiseCancellation(),noiseCancellationSupported:g.default.isNoiseCancellationSupported(),advancedVoiceActivitySupported:g.default.isAdvancedVoiceActivitySupported(),inputMode:g.default.getMode(),shortcut:g.default.getModeOptions().shortcut,vadThreshold:g.default.getModeOptions().threshold,vadAutoThreshold:g.default.getModeOptions().autoThreshold,vadUseKrisp:g.default.getModeOptions().vadUseKrisp,delay:g.default.getModeOptions().delay,usePTTLimited:!K.default.embedded,attenuation:g.default.getAttenuation(),attenuateWhileSpeakingSelf:g.default.getAttenuateWhileSpeakingSelf(),attenuateWhileSpeakingOthers:g.default.getAttenuateWhileSpeakingOthers(),silenceWarning:g.default.getEnableSilenceWarning(),debugLogging:g.default.getDebugLogging(),qosEnabled:g.default.getQoS(),audioSubsystem:g.default.getAudioSubsystem(),certifiedDeviceRevision:E.default.getRevision(),videoHook:g.default.getVideoHook(),experimentalSoundshare:g.default.getExperimentalSoundshare(),openH264:g.default.getOpenH264(),experimentalEncoders:g.default.getExperimentalEncoders(),hardwareH264:g.default.getHardwareH264(),aecDumpSupported:g.default.isAecDumpSupported(),aecDumpEnabled:g.default.getAecDump(),shouldRecordNextConnection:S.default.shouldRecordNextConnection(),isStaff:!!(null===(e=T.default.getNullableCurrentUser())||void 0===e?void 0:e.isStaff()),soundshareEnabled:g.default.getSoundshareEnabled()}}))(ve);t.default=ye},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NotchBackground=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=s(n(9)),i=n(139),l=n(1),u=s(n(8184));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=(0,i.cssValueToNumber)(u.default.notchWidth),v=Object.freeze({BLACK:u.default.black,GRAY:u.default.gray});t.NotchBackground=v;var y=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={barWidth:0},t.sizerRef=a.createRef(),t.computeBars=function(){var e=t.sizerRef.current;t.setState({barWidth:null!=e?t.roundToNearestStep(e.clientWidth):0})},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var i=r.prototype;return i.componentDidMount=function(){this.computeBars(),window.addEventListener("resize",this.computeBars)},i.componentWillUnmount=function(){window.removeEventListener("resize",this.computeBars)},i.roundToNearestStep=function(e){return Math.round(e/p)*p},i.getProgressStyles=function(){var e=this.props.progress,t=100-Math.max(0,Math.min(100,e)),n=this.state.barWidth,r=n*t/100,a=this.roundToNearestStep(r);return{transform:"translateX("+Math.abs(a-n)+"px)"}},i.getGradientStyles=function(){var e=this.props,t=e.gradientEnd,n=e.gradientStart,r=e.progress;return{width:this.state.barWidth+"px",background:r<=0?"none":"linear-gradient(to right, "+n+", "+t+")"}},i.render=function(){var e=this.props,t=e.className,n=e.notchBackground;return a.createElement("div",{className:u.default.wrapper,ref:this.sizerRef},f("div",{className:(0,o.default)(u.default.container,t),style:this.getGradientStyles()},void 0,f("div",{className:u.default.progress,style:this.getProgressStyles()}),f("div",{className:(0,o.default)(u.default.notches,n)})))},r}(a.Component);y.displayName="GradientProgress",y.defaultProps={gradientStart:l.Colors.STATUS_YELLOW_400,gradientEnd:l.Colors.STATUS_GREEN_600};var m=y;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadDebugFiles=function(){return p.apply(this,arguments)};var r=d(n(419)),a=n(275),o=d(n(26)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(8289)),l=d(n(118)),u=n(1);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){f(o,r,a,i,l,"next",e)}function l(e){f(o,r,a,i,l,"throw",e)}i(void 0)}))}}function p(){return(p=c(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=l.default.fileManager.readLogFiles){e.next=2;break}throw new a.UploadVoiceDebugLogsError(a.UploadErrorCodes.GENERAL);case 2:return t=[],e.prev=3,e.next=6,l.default.fileManager.readLogFiles(25e5,i.makeFile);case 6:t=(t=e.sent).map((function(e){return i.transformNativeFile(e,"application/octet-stream")})),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(3),new a.UploadVoiceDebugLogsError(a.UploadErrorCodes.READ);case 13:if(0!==t.length){e.next=15;break}throw new a.UploadVoiceDebugLogsError(a.UploadErrorCodes.NO_FILE);case 15:return e.prev=15,n=r.default.post(u.Endpoints.DEBUG_LOGS(u.DebugLogCategory.RTC)),t.forEach((function(e){return n.attach(e.name,e,e.name)})),e.next=20,n;case 20:e.next=30;break;case 22:if(e.prev=22,e.t1=e.catch(15),429!==e.t1.status){e.next=28;break}throw new a.UploadVoiceDebugLogsError(a.UploadErrorCodes.PROGRESS);case 28:throw new o.default("DebugUploadManager").error("Debug log upload error: status: "+e.t1.status+", message: "+e.t1.message),new a.UploadVoiceDebugLogsError(a.UploadErrorCodes.UPLOAD);case 30:case"end":return e.stop()}}),e,null,[[3,10],[15,22]])})))).apply(this,arguments)}},function(e,t,n){e.exports=n.p+"d630d71d5d2a19c1a81607b7b77f8717.svg"},function(e,t,n){e.exports=n.p+"799da7cb8e1aa0bf9588a2d789c03926.svg"},function(e,t,n){e.exports=n.p+"f98fe1aef65b144ddb4dbc7eedfac860.svg"},function(e,t,n){e.exports=n.p+"baf6cccc846651d5ca897296163227f5.svg"},function(e,t,n){e.exports=n.p+"aba3ec7874f7f01fe9a8275a3e5c21a0.svg"},function(e,t,n){e.exports=n.p+"ebfb23f0cdb11b1871ed8beb3f9ec0ee.svg"},function(e,t,n){e.exports=n.p+"c28317e203e00b2d7390d5ece2399228.svg"},function(e,t,n){e.exports=n.p+"8c49c7d4a59675bb6ceaee1bb80b5803.png"},function(e,t,n){e.exports=n.p+"e8b66317ab0dc9ba3bf8d41a4f3ec914.png"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=y(n(0)),o=p(n(9)),i=p(n(8267)),l=p(n(681)),u=y(n(159)),s=p(n(16)),d=p(n(43)),f=p(n(6)),c=p(n(370));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function m(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleToggleOpenOnStartup=function(){var e=!n.state.openOnStartup;n.setState({openOnStartup:e}),d.default.send("TOGGLE_OPEN_ON_STARTUP",e)},n.handleToggleStartMinimized=function(){var e=!n.state.startMinimized;n.setState({startMinimized:e}),d.default.send("TOGGLE_START_MINIMIZED",e)},n.handleToggleMinimizeToTray=function(){var e=!n.state.minimizeToTray;n.setState({minimizeToTray:e}),d.default.send("TOGGLE_MINIMIZE_TO_TRAY",e)},n.state={openOnStartup:!0,startMinimized:!1,minimizeToTray:!0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var a=r.prototype;return a.componentDidMount=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=this,e.next=3,d.default.getSetting("OPEN_ON_STARTUP",!0);case 3:return e.t1=e.sent,e.next=6,d.default.getSetting("START_MINIMIZED",!1);case 6:return e.t2=e.sent,e.next=9,d.default.getSetting("MINIMIZE_TO_TRAY",!0);case 9:e.t3=e.sent,e.t4={openOnStartup:e.t1,startMinimized:e.t2,minimizeToTray:e.t3},e.t0.setState.call(e.t0,e.t4);case 12:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){_(o,r,a,i,l,"next",e)}function l(e){_(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),a.render=function(){var e=this.state,t=e.openOnStartup,n=e.startMinimized,r=e.minimizeToTray,a=s.default.isLinux()?f.default.Messages.USER_SETTINGS_LINUX_SETTINGS:f.default.Messages.USER_SETTINGS_WINDOWS_SETTINGS;return m(l.default,{tag:u.Tags.H1,title:a},void 0,m(u.default,{},void 0,f.default.Messages.USER_SETTINGS_STARTUP_BEHAVIOR),m(i.default,{className:c.default.marginBottom20,value:t,note:f.default.Messages.USER_SETTINGS_OPEN_ON_STARTUP_BODY,onChange:this.handleToggleOpenOnStartup},void 0,f.default.Messages.USER_SETTINGS_OPEN_ON_STARTUP_LABEL),s.default.isWindows()?m(i.default,{disabled:!t,className:(0,o.default)(c.default.marginTop8,c.default.marginBottom20),value:!!t&&n,note:f.default.Messages.USER_SETTINGS_START_MINIMIZED_BODY,onChange:this.handleToggleStartMinimized},void 0,f.default.Messages.USER_SETTINGS_START_MINIMIZED_LABEL):null,m(u.default,{className:(0,o.default)(c.default.marginTop20,c.default.marginBottom8)},void 0,f.default.Messages.USER_SETTINGS_CLOSE_BUTTON),m(i.default,{className:c.default.marginBottom20,value:r,note:f.default.Messages.USER_SETTINGS_MINIMIZE_TO_TRAY_BODY,onChange:this.handleToggleMinimizeToTray},void 0,f.default.Messages.USER_SETTINGS_MINIMIZE_TO_TRAY_LABEL))},r}(a.PureComponent);E.displayName="UserSettingsWindows";var g=E;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,o.useStateFromStoresObject)([l.default],(function(){return{saturation:l.default.saturation,useReducedMotion:l.default.useReducedMotion}})),t=e.saturation,n=e.useReducedMotion;return[v(u.MenuGroup,{},void 0,v(u.MenuCheckboxItem,{id:"reduced-motion",label:d.default.Messages.ACCESSIBILITY_PREFERS_REDUCED_MOTION_ENABLE,checked:n,action:function(){return(0,i.setPrefersReducedMotion)(n?"no-preference":"reduce")}})),v(u.MenuGroup,{},void 0,v(u.MenuControlItem,{id:"input",label:"Saturation",control:function(e,n){return a.createElement(s.default,p({},e,{ref:n,value:100*t,onChange:function(e){return(0,i.setSaturation)(e/100)},"aria-label":d.default.Messages.FORM_LABEL_INPUT_VOLUME}))}}))]};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(3),i=n(285),l=f(n(105)),u=n(8253),s=f(n(8733)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(){return(p=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}).apply(this,arguments)}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,a.useStateFromStoresObject)([s.default],(function(){return{theme:s.default.theme,useSystemTheme:s.default.useSystemTheme,isCompact:s.default.messageDisplayCompact}})),t=e.theme,n=e.useSystemTheme,r=e.isCompact,c=function(e,r){return v(l.MenuRadioItem,{id:e,group:"input-modes",label:r,checked:n===u.SystemThemeState.ON?"system"===e:e===t,action:function(){"system"!==e&&o.default.updateRemoteSettings({theme:e}),o.default.updateLocalSettings({useSystemTheme:"system"===e?u.SystemThemeState.ON:u.SystemThemeState.OFF})}})};return[v(l.MenuGroup,{},void 0,c(d.ThemeTypes.DARK,f.default.Messages.THEME_DARK),c(d.ThemeTypes.LIGHT,f.default.Messages.THEME_LIGHT),c("system",f.default.Messages.THEME_SYSTEM)),v(l.MenuGroup,{},void 0,v(l.MenuItem,{id:"compact-mode",label:r?f.default.Messages.SWITCH_TO_COZY_MODE:f.default.Messages.SWITCH_TO_COMPACT_MODE,action:function(){o.default.updateRemoteSettings({messageDisplayCompact:!r}),(0,i.setMessageGroupSpacing)()}}))]};!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(274)),i=n(285),l=n(8253),u=n(1348),s=c(n(39)),d=n(1),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,l.useStateFromStores)([s.default,p.default],(function(){var e=p.default.getRegisteredExperiments();return Object.keys(e).map((function(t){var n=e[t],r=s.default.getExperimentOverrideDescriptor(t);return{id:t,experiment:n,currentBucket:r?r.bucket:-1}}))}),[],o.default),t=a.useState(""),n=t[0],r=t[1],u=a.useState([]),f=u[0],v=u[1];a.useEffect((function(){0!==n.trim().length?v(e.filter((function(e){return(0,i.default)(n,e.experiment.title.toLowerCase())}))):v(e)}),[e,n]);var y=a.useMemo((function(){return f.map(S)}),[f]);return[g(d.MenuControlItem,{id:"experiments-search",control:function(e,t){return a.createElement(c.default,E({},e,{query:n,onChange:r,ref:t,placeholder:m.default.Messages.SEARCH}))}}),O].concat(y)};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(130)),i=_(n(480)),l=n(3),u=n(208),s=_(n(187)),d=n(8253),f=n(8256),c=_(n(11687)),p=_(n(382)),v=_(n(8676)),y=_(n(8761)),m=_(n(6));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(){return(E=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}).apply(this,arguments)}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function S(e){var t=e.id,n=e.experiment,r=e.currentBucket;return g(d.MenuItem,{id:t,label:n.title,action:function(){return(0,u.overrideBucket)(t,null)}},void 0,n.buckets.map((function(e){return g(d.MenuCheckboxItem,{id:""+e,label:y.default.getExperimentBucketName(e),checked:e===r,action:function(){return(0,u.overrideBucket)(t,e)}})})),g(d.MenuGroup,{},void 0,-1!==r&&g(d.MenuItem,{id:"clear-override",label:"Clear Override",color:f.MenuItemColor.DANGER,icon:v.default,action:function(){return(0,u.overrideBucket)(t,null)}})))}S.displayName="renderExperimentItem";var O=g(d.MenuSeparator,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=p(n(9)),i=p(n(88)),l=p(n(61)),u=p(n(151)),s=p(n(255)),d=p(n(5968)),f=p(n(6)),c=p(n(8188));function p(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t,n){return t?y("div",{className:c.default.iconContainer},void 0,y(u.default,{type:u.default.Type.SPINNING_CIRCLE,className:(0,o.default)(c.default.icon)})):e.length>0?y(l.default,{"aria-label":f.default.Messages.SEARCH_CLEAR,className:(0,o.default)(c.default.iconContainer,c.default.iconClickable),onClick:function(e){e.stopPropagation(),n("")},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},focusProps:{offset:{top:-3,right:-3,bottom:-3,left:-3}}},void 0,y(s.default,{width:18,height:18,className:c.default.icon,"aria-label":f.default.Messages.CLOSE})):y("div",{className:c.default.iconContainer},void 0,y(d.default,{width:18,height:18,className:c.default.icon,"aria-label":f.default.Messages.SEARCH}))}m.displayName="getIcon";var _=a.forwardRef((function(e,t){var n=e.query,r=e.onChange,o=e.loading,l=void 0!==o&&o,u=e.disabled,s=void 0!==u&&u,d=e.placeholder,p=void 0===d?f.default.Messages.SEARCH:d,v=e["aria-label"],_=a.useRef(null),h=a.useRef(null);a.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.focus()},blur:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.blur()},activate:function(){return!1}}}),[]);var E=m(n,l,r);return y(i.default,{focusTarget:h,ringTarget:_,offset:{top:2,bottom:2,left:4,right:4}},void 0,a.createElement("div",{className:c.default.container,ref:_},a.createElement("input",{role:"searchbox","aria-busy":l,ref:h,className:c.default.input,value:n,onChange:function(e){return r(e.currentTarget.value)},"aria-label":v,placeholder:p,disabled:s}),E))}));t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=s(n(1343)),i=n(8253),l=s(n(160)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(){var e=(0,a.useStateFromStores)([l.default],(function(){return l.default.enabled}),[]);return f(i.MenuCheckboxItem,{id:"streamer-mode-toggle",label:u.default.Messages.ENABLE_STREAMER_MODE_LABEL,action:function(){o.default.setEnabled(!e)},checked:e})}c.displayName="useStreamerModeItems"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(3),a=l(n(11)),o=l(n(51)),i=l(n(80));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return(0,r.useStateFromStoresObject)([i.default,o.default,a.default],(function(){var t,n=null!=e?i.default.getVoiceState(e.getGuildId(),a.default.getId()):null;return{selfDeaf:o.default.isSelfDeaf(),deaf:null!==(t=null==n?void 0:n.deaf)&&void 0!==t&&t}}))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=E(n(8)),i=E(n(3)),l=n(389),u=E(n(11691)),s=E(n(1412)),d=E(n(708)),f=E(n(8351)),c=E(n(8268)),p=E(n(8647)),v=E(n(70)),y=E(n(12)),m=E(n(11692)),_=n(48),h=E(n(6));function E(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleUserContextMenu=function(e,t){(0,l.openContextMenu)(e,(function(e){return a.createElement(f.default,O({},e,{user:t}))}))},t.renderOverflowPopout=function(){var e=t.props.party;return t.hasParty(e)?S(u.default,{party:e,header:h.default.Messages.SPOTIFY_LISTEN_ALONG_LISTENING_ALONG_COUNT.format({count:e.length})}):null},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var o=r.prototype;return o.hasParty=function(e){return e.length>1},o.handleStopListening=function(){(0,s.default)()},o.renderUserPopout=function(e,t){return a.createElement(c.default,O({},e,{userId:t.id}))},o.render=function(){var e=this.props,t=e.currentUser,n=e.host,r=e.party;return this.hasParty(r)?S(m.default,{currentUser:t,host:n,party:r,renderUserPopout:this.renderUserPopout,renderOverflowPopout:this.renderOverflowPopout,onStopListening:this.handleStopListening,onUserContextMenu:this.handleUserContextMenu}):null},r}(a.PureComponent);T.displayName="ListeningAlong";var C=i.default.connectStores([d.default,y.default,v.default,p.default],(function(){var e,t,n=d.default.getSyncingWith(),r=d.default.getActivity(),a=y.default.getCurrentUser(),i=[];return null!=n?(e=y.default.getUser(n.userId),t=n.partyId):null!=r&&null!=r.party&&null!=r.party.id&&(e=a,t=r.party.id),null!=t&&(i=(0,o.default)(Array.from(p.default.getParty(t)||[])).map((function(e){return y.default.getUser(e)})).filter(_.isNotNullish).orderBy([function(t){return null==e||e.id===t.id},function(e){return v.default.isFriend(e.id)}],["desc","desc"]).value()),{currentUser:a,host:e,party:i}}))(T);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(389),i=c(n(8300)),l=c(n(8351)),u=c(n(55)),s=c(n(279)),d=c(n(272)),f=c(n(8190));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(){return(y=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}).apply(this,arguments)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var c=r.prototype;return c.handleContextMenu=function(e,t){(0,o.openContextMenu)(e,(function(e){return a.createElement(l.default,y({},e,{user:t}))}))},c.renderUser=function(e){var t=this;return null==e?null:v(u.default,{className:f.default.user,align:u.default.Align.CENTER,onContextMenu:function(n){null!=e&&t.handleContextMenu(n,e)}},e.id,v(s.default,{src:e.getAvatarURL(void 0),"aria-label":e.username,size:s.default.Sizes.SIZE_24,className:f.default.avatar}),v(i.default,{user:e,className:f.default.tag,usernameClass:f.default.username,discriminatorClass:f.default.discriminator}))},c.render=function(){var e=this,t=this.props,n=t.party,r=t.header,a=n.map((function(t){return e.renderUser(t)}));return v("div",{className:f.default.userList},void 0,v("div",{className:f.default.header},void 0,r),v(d.default,{className:f.default.content,fade:!0},void 0,a))},r}(a.PureComponent);_.displayName="UserListPopout";var h=_;t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=S(n(9)),i=S(n(8264)),l=S(n(55)),u=S(n(278)),s=S(n(149)),d=S(n(8409)),f=S(n(255)),c=S(n(8602)),p=S(n(279)),v=S(n(93)),y=S(n(8710)),m=S(n(8777)),_=S(n(9070)),h=n(1),E=S(n(6)),g=S(n(8191));function S(e){return e&&e.__esModule?e:{default:e}}function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(){return(T=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}).apply(this,arguments)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=5,M=4,N=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).renderPartyMember=function(e,n){if(null==e)return null;var r,l=t.props,d=l.host,f=l.renderUserPopout,c=l.onUserContextMenu;return r=d.id===e.id?E.default.Messages.SPOTIFY_LISTEN_ALONG_HOST:E.default.Messages.SPOTIFY_LISTEN_ALONG_LISTENER,I(u.default,{preload:function(){return(0,i.default)(e.id,e.getAvatarURL(void 0))},renderPopout:function(t){return null!=e&&f(t,e)},position:u.default.Positions.TOP,align:u.default.Align.CENTER},e.id,(function(t){return I(s.default,{text:r},void 0,(function(r){var i=r.onMouseEnter,l=r.onMouseLeave;return a.createElement(p.default,T({},t,{key:e.id,src:e.getAvatarURL(void 0),size:p.default.Sizes.SIZE_24,className:(0,o.default)(g.default.avatar,n),"aria-label":e.username,onMouseEnter:i,onMouseLeave:l,onContextMenu:function(t){null!=e&&(null==c||c(t,e))}}))}))}))},t.renderPartyMemberOverflow=function(e,n,r){var i=t.props.renderOverflowPopout;return I(u.default,{renderPopout:i},r,(function(t){return I(s.default,{text:E.default.Messages.SPOTIFY_LISTEN_ALONG_LISTENERS},void 0,(function(r){return a.createElement("div",T({className:(0,o.default)(g.default.overflow,n)},r,t),e)}))}))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,C(t,n);var S=r.prototype;return S.isHost=function(){var e=this.props,t=e.currentUser,n=e.host;return t.id===n.id},S.renderTitle=function(){return I("div",{},void 0,I(_.default,{},void 0,this.isHost()?E.default.Messages.SPOTIFY_LISTEN_ALONG_TITLE_HOST.format({count:this.props.party.length}):E.default.Messages.SPOTIFY_LISTEN_ALONG_TITLE_LISTENER),I(m.default,{},void 0,E.default.Messages.SPOTIFY_LISTEN_ALONG_SUBTITLE_LISTENER))},S.renderStopListeningButton=function(){var e=this.props.onStopListening;return this.isHost()?null:I(y.default,{tooltipText:E.default.Messages.SPOTIFY_LISTEN_ALONG_STOP,onClick:e,icon:f.default})},S.renderHelpIcon=function(){if(!this.isHost())return null;return I(y.default,{tooltipText:E.default.Messages.SPOTIFY_LISTEN_ALONG_INFO,onClick:function(){window.open(v.default.getArticleURL(h.HelpdeskArticles.SPOTIFY_CONNECTION),"_blank")},icon:c.default})},S.render=function(){return I("div",{className:g.default.listeningAlong},void 0,this.renderTitle(),I(l.default,{justify:l.default.Justify.END,className:g.default.party},void 0,I(d.default,{users:this.props.party,max:this.isHost()?b:M,renderUser:this.renderPartyMember,renderMoreUsers:this.renderPartyMemberOverflow})),I("div",{className:g.default.icons},void 0,this.renderHelpIcon(),this.renderStopListeningButton()))},r}(a.PureComponent);N.displayName="ListeningAlong";var A=N;t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=ke(n(0)),o=we(n(9)),i=we(n(23)),l=n(192),u=n(3),s=we(n(288)),d=n(389),f=we(n(1226)),c=we(n(132)),p=ke(n(10490)),v=we(n(10239)),y=we(n(8273)),m=we(n(9699)),_=we(n(10309)),h=n(156),E=we(n(294)),g=we(n(8646)),S=we(n(11696)),O=we(n(11697)),I=we(n(11698)),T=we(n(11699)),C=we(n(11700)),b=we(n(11701)),M=we(n(8478)),N=we(n(9701)),A=n(180),P=we(n(88)),R=we(n(1273)),L=we(n(5966)),D=n(395),w=ke(n(1220)),j=we(n(702)),k=n(42),U=we(n(302)),G=n(260),F=we(n(9704)),B=we(n(6012)),H=we(n(6013)),x=ke(n(8940)),V=we(n(8754)),W=we(n(9678)),Y=we(n(8755)),z=n(8937),K=we(n(712)),$=we(n(163)),Z=we(n(10)),q=we(n(15)),X=we(n(694)),J=we(n(51)),Q=we(n(40)),ee=we(n(94)),te=we(n(70)),ne=we(n(39)),re=we(n(12)),ae=we(n(80)),oe=we(n(365)),ie=we(n(271)),le=we(n(29)),ue=we(n(55)),se=n(721),de=we(n(278)),fe=we(n(8267)),ce=we(n(149)),pe=ke(n(159)),ve=we(n(8938)),ye=we(n(8313)),me=we(n(11702)),_e=we(n(11703)),he=we(n(9157)),Ee=we(n(8939)),ge=we(n(9728)),Se=we(n(8710)),Oe=we(n(8777)),Ie=we(n(47)),Te=we(n(24)),Ce=we(n(13)),be=we(n(93)),Me=n(716),Ne=we(n(11704)),Ae=we(n(11705)),Pe=n(1),Re=we(n(6)),Le=we(n(7914)),De=we(n(370));function we(e){return e&&e.__esModule?e:{default:e}}function je(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return je=function(){return e},e}function ke(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=je();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ge(){return(Ge=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}).apply(this,arguments)}function Fe(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function Be(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var He=new Set([h.YOUTUBE_APPLICATION_ID,h.POKER_NIGHT_APPLICATION_ID,h.YOUTUBE_APPLICATION_ID,h.FISHINGTON_APPLICATION_ID]);function xe(e){var t=e.currentTarget;Ce.default.track(Pe.AnalyticEvents.NOISE_CANCELLATION_LINK_CLICKED,{text:t.text,href:t.href,location:{section:Pe.AnalyticsSections.NOISE_CANCELLATION_POPOUT}})}function Ve(){var e=a.useRef(null);(0,se.useFocusLock)(e),a.useEffect((function(){return Ce.default.track(Pe.AnalyticEvents.OPEN_POPOUT,{type:Pe.AnalyticsSections.NOISE_CANCELLATION_POPOUT})}),[]);var t=(0,u.useStateFromStores)([J.default],(function(){return J.default.getNoiseCancellation()}));return a.createElement("div",{ref:e,className:Le.default.noiseCancellationPopout},Be(fe.default,{hideBorder:!0,className:De.default.marginBottom4,value:t,onChange:function(){return s.default.setNoiseCancellation(!t,{section:Pe.AnalyticsSections.NOISE_CANCELLATION_POPOUT})},note:Re.default.Messages.NOISE_CANCELLATION_POPOUT_DESCRIPTION},void 0,Re.default.Messages.NOISE_CANCELLATION_POPOUT_HEADER),Be(p.default,{title:Re.default.Messages.NOISE_CANCELLATION_POPOUT_MIC_TEST_TITLE,notchBackground:p.NotchBackground.BLACK,buttonTest:Re.default.Messages.NOISE_CANCELLATION_POPOUT_TEST,buttonStop:Re.default.Messages.NOISE_CANCELLATION_POPOUT_STOP,buttonClassName:Le.default.micTestButton,buttonColor:le.default.Colors.GREY,location:{section:Pe.AnalyticsSections.NOISE_CANCELLATION_POPOUT}}),Be(pe.default,{tag:pe.Tags.H5,className:(0,o.default)(De.default.marginBottom8,De.default.marginTop20)},void 0,Re.default.Messages.NOISE_CANCELLATION_POPOUT_FOOTER),Be(ue.default,{justify:ue.default.Justify.BETWEEN,className:Le.default.footer},void 0,Be(ie.default,{href:Pe.MarketingURLs.KRISP,onClick:function(e){return xe(e)}},void 0,Be("div",{className:Le.default.krispLogo})),Be(ie.default,{href:be.default.getArticleURL(Pe.HelpdeskArticles.NOISE_SUPPRESSION),className:Le.default.krispLink,onClick:function(e){return xe(e)}},void 0,Re.default.Messages.LEARN_MORE)))}function We(e){var t,n,r=e.channel,i=(0,F.default)(),l=(0,H.default)(r),d=null!==(t=r.getGuildId())&&void 0!==t?t:"",f=m.default.useExperiment({guildId:d})[0].rtcPanelIconsOnly,c=(0,u.useStateFromStoresObject)([E.default],(function(){return{userInActivity:null!=E.default.getSelfEmbeddedActivityForChannel(r.id)}})).userInActivity,p=(0,B.default)(r),v=p.reachedLimit,y=p.limit,_=a.useCallback((function(){(0,V.default)()}),[]),h=a.useCallback((function(e){var t;J.default.isVideoEnabled()!==e&&(s.default.setVideoEnabled(e),e&&(0,k.transitionTo)(Pe.Routes.CHANNEL(null!==(t=r.getGuildId())&&void 0!==t?t:Pe.ME,r.id)))}),[r]),g=c||f,S=Be(ye.default,{className:(0,o.default)(Le.default.buttonIcon,(n={},n[Le.default.withText]=!g,n))});return a.createElement(z.VideoButtonWrapper,Ge({onChange:h,onCameraUnavailable:_,hasPermission:l,channelLimit:y,channelLimitReached:v},i),(function(e){var t=e.unavailable,n=e.active,r=e.label,i=(e.iconComponent,Fe(e,["unavailable","active","label","iconComponent"]));return Be(de.default,{renderPopout:function(e){var t=e.closePopout;return Be(N.default,{onClose:t})},position:de.default.Positions.TOP,align:de.default.Align.CENTER,animation:de.default.Animation.FADE},void 0,(function(e,l){var u=e.onClick,s=Fe(e,["onClick"]);return Be(ce.default,{text:r},void 0,(function(e){var r;return a.createElement(le.default,Ge({},i,e,s,{onClick:function(t){var n;i.onClick(t),null===(n=e.onClick)||void 0===n||n.call(e),l&&u(t)},onContextMenu:function(t){var n;u(t),null===(n=e.onContextMenu)||void 0===n||n.call(e)},size:le.default.Sizes.SMALL,className:(0,o.default)(Le.default.button,Le.default.buttonColor,(r={},r[Le.default.buttonActive]=n,r[Le.default.fauxDisabled]=t,r[Le.default.disabled]=i.disabled,r)),wrapperClassName:Le.default.button}),g?S:Be(ue.default,{align:ue.default.Align.CENTER},void 0,S,Re.default.Messages.VIDEO))}))}))}))}function Ye(e){var t=e.closePopout,n=e.showPokerTooltip,r=e.showBetrayalTooltip,a=e.showYouTubeTooltip,o=e.showFishingtonTooltip,i=e.showDiscordGameTooltip,l=e.discordEmbeddedGameID;return o?Be(T.default,{closePopout:t}):a?Be(b.default,{closePopout:t}):r?Be(O.default,{closePopout:t}):n?Be(C.default,{closePopout:t}):i&&null!=l?Be(I.default,{closePopout:t,embeddedGameID:l}):null}function ze(e){var t,n=e.channel,r=e.shouldShowVoicePanelIntroduction,i=null!==(t=n.getGuildId())&&void 0!==t?t:"",l=m.default.useExperiment({guildId:i})[0],s=l.enabledApplicationIds,d=l.showDiscordGameTooltips,f=s.find((function(e){return!He.has(e)})),c=null!=f?f+"_ACTIVITY_TOOLTIP":null;m.default.trackExposure({guildId:i});var p=(0,u.useStateFromStoresObject)([j.default,J.default,X.default],(function(){return{hasBetrayalTooltip:j.default.hasHotspot(D.HotspotLocations.BETRAYAL_TOOLTIP),hasPokerTooltip:j.default.hasHotspot(D.HotspotLocations.POKER_NIGHT_TOOLTIP),hasYouTubeTooltip:j.default.hasHotspot(D.HotspotLocations.YOUTUBE_TOOLTIP),hasFishingtonTooltip:j.default.hasHotspot(D.HotspotLocations.FISHINGTON_TOOLTIP),hasDiscordGameTooltip:null!=c&&j.default.hasHotspot(c),shouldShowTooltip:!X.default.hasLayers()&&!r&&!J.default.isInteractionRequired()}})),v=p.shouldShowTooltip,y=p.hasBetrayalTooltip,_=p.hasYouTubeTooltip,O=p.hasPokerTooltip,I=p.hasFishingtonTooltip,T=p.hasDiscordGameTooltip,C=(0,g.default)(n.id)[0],b=(0,u.useStateFromStoresObject)([E.default],(function(){return{userInActivity:null!=E.default.getSelfEmbeddedActivityForChannel(n.id)}})).userInActivity,N=(0,M.default)(null!=C?[C.applicationId]:[])[0];if(0===s.length&&!b)return null;var A=s.includes(h.END_GAME_APPLICATION_ID),P=s.includes(h.YOUTUBE_APPLICATION_ID),R=s.includes(h.POKER_NIGHT_APPLICATION_ID),L=s.includes(h.FISHINGTON_APPLICATION_ID),k=y&&A,U=_&&P,G=O&&R,F=I&&L,B=T&&d;function H(){U&&w.hideHotspot(D.HotspotLocations.YOUTUBE_TOOLTIP),k&&w.hideHotspot(D.HotspotLocations.BETRAYAL_TOOLTIP),G&&w.hideHotspot(D.HotspotLocations.POKER_NIGHT_TOOLTIP),F&&w.hideHotspot(D.HotspotLocations.FISHINGTON_TOOLTIP),B&&null!=c&&w.hideHotspot(c)}var x=Re.default.Messages.EMBEDDED_ACTIVITIES_START_AN_ACTIVITY;return null!=C&&(b?x=Re.default.Messages.EMBEDDED_ACTIVITIES_IN_ACTIVITY_TOOLTIP:null!=N&&(x=Re.default.Messages.EMBEDDED_ACTIVITIES_CHANNEL_ACTIVITY_ACTIVE.format({applicationName:N.name}))),Be(de.default,{renderPopout:function(e){var t=e.closePopout;return Be(Ye,{showYouTubeTooltip:U,showBetrayalTooltip:k,showPokerTooltip:G,showFishingtonTooltip:F,showDiscordGameTooltip:B,discordEmbeddedGameID:f,closePopout:function(){H(),t()}})},position:de.default.Positions.TOP,align:de.default.Align.CENTER,animation:de.default.Animation.TRANSLATE,shouldShow:v&&(k||G||U||F||B)},void 0,(function(){return Be(de.default,{renderPopout:function(e){var t=e.closePopout;return Be(S.default,{channel:n,onClose:t})},position:de.default.Positions.TOP,align:de.default.Align.CENTER,animation:de.default.Animation.FADE},void 0,(function(e){var t=e.onClick,n=Fe(e,["onClick"]);return Be(ce.default,{text:x},void 0,(function(e){var r;return a.createElement(le.default,Ge({},e,n,{size:le.default.Sizes.SMALL,onClick:function(n){var r;H(),t(n),null===(r=e.onClick)||void 0===r||r.call(e)},className:(0,o.default)(Le.default.button,Le.default.buttonColor,(r={},r[Le.default.buttonActive]=b||null!=C,r)),wrapperClassName:Le.default.button}),Be(he.default,{className:Le.default.buttonIcon}))}))}))}))}function Ke(e){var t,n,r=e.channel,i=e.canGoLive,l=(0,u.useStateFromStores)([re.default],(function(){return re.default.getCurrentUser()})),s=(0,u.useStateFromStores)([$.default],(function(){return $.default.getAllActiveStreams()})),d=(0,H.default)(r),f=r.getGuildId(),c=m.default.useExperiment({guildId:null!=f?f:""})[0].rtcPanelIconsOnly,p=(0,u.useStateFromStoresObject)([E.default],(function(){return{userInActivity:null!=E.default.getSelfEmbeddedActivityForChannel(r.id)}})).userInActivity,v=a.useCallback((function(){(0,Y.default)(f,r.id,Pe.AnalyticsSections.ACTIVITY_PANEL)}),[f,r.id]),y=s.find((function(e){return e.ownerId===l.id})),_=(0,x.useOtherStreams)(r,l,s);n=null==y?i?v:W.default:function(){return(0,L.default)(y)};var h=null!=y||_.length>0,g=d?Re.default.Messages.SHARE_YOUR_SCREEN:Re.default.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_VOICE,S=!d,O=p||c,I=Be(Ee.default,{className:(0,o.default)(Le.default.buttonIcon,(t={},t[Le.default.withText]=!O,t))});return Be(de.default,{renderPopout:function(e){var t=e.closePopout;return Be(x.default,{channel:r,currentUser:l,activeStreams:s,onClose:t,handleGoLive:i?v:W.default})},position:de.default.Positions.TOP,align:de.default.Align.CENTER,animation:de.default.Animation.FADE},void 0,(function(e){var t=e.onClick,r=Fe(e,["onClick"]);return Be(ce.default,{text:g},void 0,(function(e){var i;return a.createElement(le.default,Ge({},e,{size:le.default.Sizes.SMALL,onClick:function(r){var a;h?t(r):n(),null===(a=e.onClick)||void 0===a||a.call(e)},disabled:S,className:(0,o.default)(Le.default.button,Le.default.buttonColor,(i={},i[Le.default.buttonActive]=null!=y,i[Le.default.disabled]=S,i))},h?r:null,{wrapperClassName:Le.default.button}),O?I:Be(ue.default,{align:ue.default.Align.CENTER},void 0,I,Re.default.Messages.GO_LIVE_SHARE_SCREEN))}))}))}function $e(e){var t=e.channel.isGuildStageVoice();return Be(Se.default,{tooltipText:t?Re.default.Messages.STAGE_CHANNEL_LEAVE_BUTTON:Re.default.Messages.DISCONNECT_SELF,onClick:function(){return c.default.disconnect()},icon:t?ge.default:ve.default})}Ve.displayName="NoiseCancellationPopout",We.displayName="ConnectedVideoButton",ze.displayName="ConnectedActivityButton",Ke.displayName="ConnectedStreamButton",$e.displayName="DisconnectButton";var Ze=Be(Ve,{}),qe=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=e.call.apply(e,[this].concat(r))||this).canScreenshare=function(){var e=t.props,n=e.channel;return e.canGoLive&&null!=n&&null!=n.getGuildId()},t.handleNoiseCancellationClicked=function(){var e=t.props.noiseCancellationActive;s.default.setNoiseCancellation(!e,{section:Pe.AnalyticsSections.NOISE_CANCELLATION_POPOUT})},t.handleGoLive=function(){var e=t.props,n=e.guild,r=e.channel,a=null!=r?r.getGuildId():null!=n?n.id:null;null!=a&&(0,Y.default)(a,r.id,Pe.AnalyticsLocations.VOICE_PANEL)},t.handleChannelLinkClick=function(e){var n=t.props,r=n.guild,a=n.channel;(0,i.default)(null!=a,"Channel is null during navigation click"),e.stopPropagation(),f.default.channelListScrollTo(r?r.id:Pe.ME,a.id)},t.handleChannelLinkContextMenu=function(e){(0,d.openContextMenu)(e,(function(e){return a.createElement(Ne.default,e)}))},t.handleCloseVoicePanelIntroduction=function(){w.hideHotspot(D.HotspotLocations.VOICE_PANEL_INTRODUCTION)},t.renderVoicePanelIntroduction=function(){return Be("div",{className:(0,o.default)(Le.default.voicePanelIntroductionWrapper,"theme-light")},void 0,Be(Ie.default,{className:Le.default.voicePanelIntroductionHeader,size:Ie.default.Sizes.SIZE_16},void 0,Re.default.Messages.VOICE_PANEL_INTRODUCTION_HEADER),Be(Te.default,{className:Le.default.voicePanelIntroductionText,size:Te.default.Sizes.SIZE_14},void 0,Re.default.Messages.VOICE_PANEL_INTRODUCTION_TEXT),Be(le.default,{className:Le.default.voicePanelIntroductionButton,color:le.default.Colors.BRAND,onClick:t.handleCloseVoicePanelIntroduction},void 0,Re.default.Messages.VOICE_PANEL_INTRODUCTION_CLOSE))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ue(t,n);var u=r.prototype;return u.renderConnectionStatus=function(){var e=this.props,t=e.channel,n=e.guild,r=e.rtcConnectionQuality,a=e.rtcConnectionState,o=e.rtcConnectionLastPing,i=e.hasVideo;if(null==t)return null;var u,s=(0,A.computeChannelName)(t,re.default,te.default,!0);return null!=n?(u=Pe.Routes.CHANNEL(n.id,t.id),s=s+" / "+n.name):u=Pe.Routes.CHANNEL(Pe.ME,t.id),Be(v.default,{statusTextClassName:Le.default.statusWithPopout,quality:r,state:a,lastPing:o,hasVideo:i},void 0,Be(P.default,{},void 0,Be(l.Link,{to:u,onClick:this.handleChannelLinkClick,onContextMenu:this.handleChannelLinkContextMenu},void 0,Be(Oe.default,{className:Le.default.channel},void 0,s))))},u.renderNoiseCancellation=function(){var e=this.props,t=e.noiseCancellationActive,n=e.noiseCancellationError;return!e.hasLayers&&n?Be(ce.default,{text:Re.default.Messages.NOISE_CANCELLATION_CPU_OVERUSE,tooltipClassName:Le.default.noiseCancellationTooltip,forceOpen:!0},void 0,(function(e){var t=e["aria-label"];return Be(Se.default,{"aria-label":t,tooltipText:null,disabled:!0,icon:_e.default})})):Be(de.default,{position:de.default.Positions.TOP,align:de.default.Align.CENTER,renderPopout:function(){return Ze}},"krisp-popout",(function(e,n){return a.createElement(Se.default,Ge({},e,{tooltipClassName:Le.default.noiseCancellationTooltip,tooltipText:n?null:Re.default.Messages.NOISE_CANCELLATION_TOOLTIP,icon:t?me.default:_e.default}))}))},u.renderVoiceStates=function(){var e=this.props,t=e.channel,n=e.voiceStates,r=e.showVoiceStates;return null!=t&&r&&0!==n.length?Be(Ae.default,{voiceStates:n,channel:t,className:Le.default.voiceUsers}):null},u.renderChannelButtons=function(){var e=this.props,t=e.channel,n=e.shouldShowVoicePanelIntroduction,r=e.guild,a=e.canGoLive;return null==t||t.type===Pe.ChannelTypes.GUILD_STAGE_VOICE?null:Be("div",{className:Le.default.actionButtons},void 0,Be(We,{channel:t}),Be(Ke,{channel:t,canGoLive:a}),null!=r&&["us-west","us-east","us-central","us-south"].includes(r.region)?Be(ze,{channel:t,shouldShowVoicePanelIntroduction:null!=n&&n}):null)},u.render=function(){var e=this,t=this.props,n=t.channel,r=t.noiseCancellationSupported,a=t.shouldShowVoicePanelIntroduction;if(null==n)return null;var o=Be($e,{channel:n});return Be(de.default,{renderPopout:this.renderVoicePanelIntroduction,position:de.default.Positions.TOP,align:de.default.Align.CENTER,animation:de.default.Animation.TRANSLATE,shouldShow:a},void 0,(function(){return Be("div",{className:Le.default.container},void 0,Be(ue.default,{className:Le.default.connection,align:ue.default.Align.CENTER},void 0,Be("div",{className:Le.default.inner},void 0,e.renderConnectionStatus()),Be(ue.default,{grow:0,shrink:0},void 0,r?e.renderNoiseCancellation():null,o)),e.renderVoiceStates(),e.renderChannelButtons())}))},r}(a.PureComponent);function Xe(e){var t=(0,u.useStateFromStores)([re.default],(function(){return re.default.getNullableCurrentUser()})),n=(0,u.useStateFromStoresObject)([ee.default],(function(){return{guildId:ee.default.getGuildId(),channelId:ee.default.getChannelId(),rtcConnectionQuality:ee.default.getQuality(),rtcConnectionState:ee.default.getState(),rtcConnectionLastPing:ee.default.getLastPing(),rtcConnectionConnected:ee.default.isConnected()}})),r=n.guildId,o=n.channelId,i=Fe(n,["guildId","channelId"]),l=(0,u.useStateFromStores)([q.default],(function(){return q.default.getGuild(r)}),[r]),s=(0,u.useStateFromStores)([Z.default],(function(){return Z.default.getChannel(o)}),[o]),d=(0,u.useStateFromStoresObject)([J.default],(function(){return{noiseCancellationSupported:J.default.isNoiseCancellationSupported(),noiseCancellationActive:J.default.getNoiseCancellation(),noiseCancellationError:J.default.isNoiseCancellationError(),canGoLive:(0,R.default)(J.default)}})),f=(0,u.useStateFromStores)([J.default,j.default],(function(){return j.default.hasHotspot(D.HotspotLocations.VOICE_PANEL_INTRODUCTION)&&(0,Me.isNewUser)(t)&&!J.default.isInteractionRequired()&&!(null==s?void 0:s.isGuildStageVoice())})),c=(0,u.useStateFromStores)([ae.default],(function(){return null!=o&&ae.default.hasVideo(o)}),[o]),p=(0,u.useStateFromStores)([$.default],(function(){return null!=t?$.default.getActiveStreamForUser(t.id):null}),[t]),v=(0,u.useStateFromStores)([X.default],(function(){return X.default.hasLayers()}));f&&_.default.trackExposure({});var y=_.default.useExperiment({})[0],m=(0,u.useStateFromStores)([K.default],(function(){return K.default.isViewingRoles(r)})),h=(0,u.useStateFromStores)([Q.default],(function(){return m&&!Q.default.can(Pe.Permissions.VIEW_CHANNEL,s)}),[m,s]),E=(0,u.useStateFromStores)([ne.default],(function(){return ne.default.rtcPanelShowVoiceStates})),g=(0,u.useStateFromStoresArray)([oe.default,U.default],(function(){return(null==s?void 0:s.isGuildStageVoice())?[U.default.getMutableParticipants(s.id,G.StageChannelParticipantNamedIndex.SPEAKER),U.default.getParticipantsVersion(s.id),null]:[null,null,null!=s?oe.default.getVoiceStatesForChannel(s):null]}),[s]),S=g[0],O=g[1],I=g[2],T=a.useMemo((function(){var e,t;return null!==(e=null!==(t=null==S?void 0:S.map((function(e){return{user:e.user,nick:e.userNick,voiceState:e.voiceState}})))&&void 0!==t?t:I)&&void 0!==e?e:[]}),[S,O,I]),C=a.useState(!1),b=C[0],M=C[1];return a.useEffect((function(){(m||h)&&M(!1)}),[m,h,M]),Be("div",{className:Le.default.wrapper},void 0,a.createElement(qe,Ge({},e,d,i,{guild:l,channel:s,hasVideo:c,selfStream:p,hasLayers:v,voiceStates:T,showVoiceStates:E,shouldShowVoicePanelIntroduction:y.showPopout&&f})),!b&&m&&null!=r?Be("div",{className:Le.default.viewAsRolesWarning},void 0,Be(Te.default,{size:Te.default.Sizes.SIZE_14,className:Le.default.viewAsRolesWarningText},void 0,h?Re.default.Messages.VIEW_AS_ROLES_HIDDEN_VC_WARNING:Re.default.Messages.VIEW_AS_ROLES_VOICE_WARNING),Be(le.default,{className:Le.default.viewAsRolesWarningButton,size:le.default.Sizes.MIN,onClick:function(){M(!0)}},void 0,Re.default.Messages.DISMISS)):null)}qe.displayName="RTCConnection",Xe.displayName="ConnectedRTCConnection";var Je=(0,y.default)(Xe);t.default=Je},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var r,a=M(n(0)),o=n(3),i=C(n(478)),l=C(n(9699)),u=C(n(8478)),s=M(n(8253)),d=n(42),f=C(n(1167)),c=C(n(477)),p=C(n(8762)),v=C(n(10360)),y=n(8263),m=C(n(24)),_=C(n(13)),h=M(n(1297)),E=C(n(294)),g=C(n(8646)),S=n(156),O=n(1),I=C(n(6)),T=C(n(8192));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var A=N(s.MenuSeparator,{});function P(e){var t,n=e.onClose,r=e.channel,C=e.onSelect;a.useEffect((function(){_.default.track(O.AnalyticEvents.OPEN_POPOUT,{type:"Activity Menu",channel_id:r.id,guild_id:r.getGuildId()})}),[r]);var b=null!==(t=r.getGuildId())&&void 0!==t?t:"",M=l.default.useExperiment({guildId:b})[0].enabledApplicationIds,P=(0,o.useStateFromStores)([f.default],(function(){return f.default.testModeEmbeddedApplicationId}));null==P||M.includes(P)||M.push(P);var R=(0,u.default)(M),L=(0,o.useStateFromStores)([E.default],(function(){return E.default.getSelfEmbeddedActivityForChannel(r.id)})),D=(0,g.default)(r.id)[0],w=(0,u.default)(null!=(null==D?void 0:D.applicationId)?[null==D?void 0:D.applicationId]:[])[0],j=null;if(null!=L)j=N(s.MenuItem,{id:"stop",action:function(){return h.stopEmbeddedActivity(r.id,null==L?void 0:L.applicationId)},icon:v.default,label:I.default.Messages.EMBEDDED_ACTIVITIES_LEAVE_ACTIVITY},"stop");else if(null!=D){var k=I.default.Messages.EMBEDDED_ACTIVITIES_LAUNCHING_ACTIVITY;D.canJoin&&(k=null!=w?I.default.Messages.EMBEDDED_ACTIVITIES_START_APPLICATION.format({applicationName:w.name}):I.default.Messages.EMBEDDED_ACTIVITIES_JOIN_ACTIVITY),j=N(s.MenuItem,{id:"start",disabled:!D.canJoin,action:function(){i.default.join(D.userId,D.sessionId,D.applicationId,r.id,null,S.ActivityIntent.PLAY,!0),(0,d.transitionTo)(O.Routes.CHANNEL(r.getGuildId(),r.id))},icon:p.default,label:k},"start")}else j=a.createElement(a.Fragment,null,N(s.MenuGroup,{},void 0,R.map((function(e,t){var n,a;return N(s.MenuItem,{id:null!==(a=null==e?void 0:e.id)&&void 0!==a?a:String(t),action:function(){null!=e&&(h.startEmbeddedActivity(r.id,e.id),(0,d.transitionTo)(O.Routes.CHANNEL(r.getGuildId(),r.id)))},render:function(){var t,n,r=null!==(t=null==e?void 0:e.getMaxParticipants())&&void 0!==t?t:0;return N("div",{className:T.default.activityItem},void 0,N(c.default,{game:e,className:T.default.activityIcon}),N("div",{className:T.default.activityItemText},void 0,N(m.default,{className:T.default.activityHeader,size:m.default.Sizes.SIZE_16},void 0,null!==(n=null==e?void 0:e.name)&&void 0!==n?n:I.default.Messages.LOADING),N(m.default,{className:T.default.subtitle,size:m.default.Sizes.SIZE_12},void 0,r>0?I.default.Messages.EMBEDDED_ACTIVITIES_MAX_PARTICIPANTS.format({count:r}):I.default.Messages.EMBEDDED_ACTIVITIES_UNLIMITED_PARTICIPANTS)))}},null!==(n=null==e?void 0:e.id)&&void 0!==n?n:t)}))),A,N(s.MenuItem,{id:"beta",render:function(){return N("div",{className:T.default.beta},void 0,N(y.TextBadge,{text:I.default.Messages.BETA,color:O.Colors.BRAND,className:T.default.betaTag}),N(m.default,{className:T.default.subtitle,size:m.default.Sizes.SIZE_12},void 0,I.default.Messages.EMBEDDED_ACTIVITIES_LOOK_FOR_MORE))}}));return N(s.default,{navId:"activity-popout",style:s.MenuStyle.FIXED,onClose:n,"aria-label":"Activity Menu",onSelect:C},void 0,j)}P.displayName="ActivityMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9072)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.closePopout;return u(a.default,{closePopout:t,header:o.default.Messages.EMBEDDED_ACTIVITIES_BETRAYAL_MARKETING_TOOLTIP_HEADER,body:o.default.Messages.EMBEDDED_ACTIVITIES_BETRAYAL_MARKETING_TOOLTIP_BODY})}s.displayName="BetrayalMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=l(n(8478)),o=l(n(9072)),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.embeddedGameID,n=e.closePopout,r=(0,a.default)([t])[0];return null==r?null:s(o.default,{closePopout:n,header:i.default.Messages.EMBEDDED_ACTIVITIES_DISCORD_GAME_MARKETING_TOOLTIP_HEADER.format({applicationName:r.name}),body:r.description})}d.displayName="DiscordGameMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9072)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.closePopout;return u(a.default,{closePopout:t,header:o.default.Messages.EMBEDDED_ACTIVITIES_FISHINGTON_MARKETING_TOOLTIP_HEADER,body:o.default.Messages.EMBEDDED_ACTIVITIES_FISHINGTON_MARKETING_TOOLTIP_BODY})}s.displayName="FishingtonMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9072)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.closePopout;return u(a.default,{closePopout:t,header:o.default.Messages.EMBEDDED_ACTIVITIES_MARKETING_TOOLTIP_HEADER,body:o.default.Messages.EMBEDDED_ACTIVITIES_MARKETING_TOOLTIP_BODY})}s.displayName="PokerMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=i(n(9072)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e){var t=e.closePopout;return u(a.default,{closePopout:t,header:o.default.Messages.EMBEDDED_ACTIVITIES_YOUTUBE_MARKETING_TOOLTIP_HEADER,body:o.default.Messages.EMBEDDED_ACTIVITIES_YOUTUBE_MARKETING_TOOLTIP_BODY})}s.displayName="YouTubeMarketingTooltip"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),s("path",{className:f,d:"M10.889 4C10.889 3.44772 11.3367 3 11.889 3H12.1112C12.6635 3 13.1112 3.44772 13.1112 4V20C13.1112 20.5523 12.6635 21 12.1112 21H11.889C11.3367 21 10.889 20.5523 10.889 20V4Z",fill:d}),s("path",{className:f,d:"M6.44439 6.25C6.44439 5.69772 6.89211 5.25 7.44439 5.25H7.66661C8.2189 5.25 8.66661 5.69772 8.66661 6.25V17.75C8.66661 18.3023 8.2189 18.75 7.66661 18.75H7.44439C6.89211 18.75 6.44439 18.3023 6.44439 17.75V6.25Z",fill:d}),s("path",{className:f,d:"M3.22222 15.375C3.77451 15.375 4.22222 14.9273 4.22222 14.375L4.22222 9.625C4.22222 9.07272 3.77451 8.625 3.22222 8.625H3C2.44772 8.625 2 9.07272 2 9.625V14.375C2 14.9273 2.44772 15.375 3 15.375H3.22222Z",fill:d}),s("path",{className:f,d:"M22.0001 13.25C22.0001 13.8023 21.5523 14.25 21.0001 14.25H20.7778C20.2255 14.25 19.7778 13.8023 19.7778 13.25V10.75C19.7778 10.1977 20.2255 9.75 20.7778 9.75H21.0001C21.5523 9.75 22.0001 10.1977 22.0001 10.75V13.25Z",fill:d}),s("path",{className:f,d:"M16.3333 7.5C15.781 7.5 15.3333 7.94772 15.3333 8.5V15.5C15.3333 16.0523 15.781 16.5 16.3333 16.5H16.5555C17.1078 16.5 17.5555 16.0523 17.5555 15.5V8.5C17.5555 7.94772 17.1078 7.5 16.5555 7.5H16.3333Z",fill:d}))}d.displayName="NoiseCancellationActive"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?24:t,r=e.height,a=void 0===r?24:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),s("path",{d:"M30.6666 24.9644L35.1111 20.5199V31C35.1111 32.1046 34.2156 33 33.1111 33H32.6666C31.562 33 30.6666 32.1046 30.6666 31V24.9644Z",fill:d}),s("path",{d:"M26.2224 14.1463V8C26.2224 6.89543 25.327 6 24.2224 6H23.7779C22.6734 6 21.7779 6.89543 21.7779 8V18.5907L26.2224 14.1463Z",fill:d}),s("path",{d:"M21.7779 33.8543L21.9254 33.7056L26.2224 29.4086V40C26.2224 41.1046 25.327 42 24.2224 42H23.7779C22.6734 42 21.7779 41.1046 21.7779 40V33.8543Z",fill:d}),s("path",{d:"M17.3332 23.0354L12.8888 27.4799V12.5C12.8888 11.3954 13.7842 10.5 14.8888 10.5H15.3332C16.4378 10.5 17.3332 11.3954 17.3332 12.5V23.0354Z",fill:d}),s("path",{d:"M8.44445 28.75C8.44445 29.8546 7.54902 30.75 6.44445 30.75H6C4.89543 30.75 4 29.8546 4 28.75V19.25C4 18.1454 4.89543 17.25 6 17.25H6.44445C7.54902 17.25 8.44445 18.1454 8.44445 19.25L8.44445 28.75Z",fill:d}),s("path",{d:"M44.0001 26.5C44.0001 27.6046 43.1047 28.5 42.0001 28.5H41.5557C40.4511 28.5 39.5557 27.6046 39.5557 26.5V21.5C39.5557 20.3954 40.4511 19.5 41.5557 19.5H42.0001C43.1047 19.5 44.0001 20.3954 44.0001 21.5V26.5Z",fill:d}),s("path",{d:"M42 8.54L39.46 6L6 39.46L8.54 42L16.92 33.64L19.38 31.16L22.7 27.84L29.98 20.56L42 8.54Z",fill:d,className:f}))}d.displayName="NoiseCancellationDisabled"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;p(n(0));var r,a=n(3),o=n(389),i=f(n(274)),l=p(n(8253)),u=f(n(10491)),s=f(n(39)),d=f(n(6));function f(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.onSelect,n=(0,u.default)(),r=(0,a.useStateFromStores)([s.default],(function(){return s.default.rtcPanelShowVoiceStates}));return v(l.default,{navId:"rtc-channel","aria-label":d.default.Messages.GENERIC_ACTIONS_MENU_LABEL,onClose:o.closeContextMenu,onSelect:t},void 0,n,v(l.MenuGroup,{},void 0,v(l.MenuCheckboxItem,{id:"show-voice-states",checked:r,action:function(){return i.default.updateLocalSettings({rtcPanelShowVoiceStates:!r})},label:d.default.Messages.VOICE_PANEL_SHOW_VOICE_USERS})))}y.displayName="RTCConnectionMenu"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=L;var r,a=b(n(0)),o=T(n(9)),i=n(3),l=n(389),u=T(n(8322)),s=T(n(8351)),d=T(n(8264)),f=T(n(8268)),c=T(n(283)),p=b(n(8352)),v=T(n(61)),y=T(n(278)),m=T(n(149)),_=T(n(1281)),h=T(n(1261)),E=T(n(5951)),g=T(n(6010)),S=T(n(272)),O=T(n(6)),I=T(n(8194));function T(e){return e&&e.__esModule?e:{default:e}}function C(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return C=function(){return e},e}function b(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=C();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function M(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function N(){return(N=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}).apply(this,arguments)}var A={offset:2},P={serverDeaf:{icon:_.default,colorize:!0,status:O.default.Messages.SERVER_DEAFENED},serverMute:{icon:h.default,colorize:!0,status:O.default.Messages.SERVER_MUTED},deaf:{icon:_.default,colorize:!1,status:O.default.Messages.VOICE_CHANNEL_DEAFENED},mute:{icon:h.default,colorize:!1,status:O.default.Messages.VOICE_CHANNEL_MUTED}};function R(e){var t,n,r=e.channel,p=e.user,_=e.nick,h=e.mute,E=e.deaf,g=e.serverMute,S=e.serverDeaf,T=(0,i.useStateFromStores)([c.default],(function(){return c.default.isSpeaking(p.id)||c.default.isSoundSharing(p.id)}),[p.id]),C=null!==(t=r.getGuildId())&&void 0!==t?t:void 0,b=p.getAvatarURL(r.guild_id),R=null!=_?_:p.username,L=null!==(n=S?P.serverDeaf:E?P.deaf:g?P.serverMute:h?P.mute:void 0)&&void 0!==n?n:{},D=L.icon,w=L.colorize,j=L.status,k=null!=j?O.default.Messages.VOICE_PANEL_USER_TOOLTIP.format({userName:R,status:j}):R;function U(e){(0,l.openContextMenu)(e,(function(e){return null!=C?a.createElement(u.default,N({},e,{user:p,guildId:C,channelId:r.id,showMediaItems:!0})):a.createElement(s.default,N({},e,{user:p,channelId:r.id,showMediaItems:!0}))}))}return M(y.default,{preload:function(){return(0,d.default)(p.id,p.getAvatarURL(C))},position:y.default.Positions.TOP,renderPopout:function(e){return a.createElement(f.default,N({userId:p.id,guildId:C,channelId:r.id},e))}},void 0,(function(e){return M(m.default,{text:k},void 0,(function(t){var n,r;return a.createElement(v.default,N({},t,e,{className:I.default.avatarContainer,onContextMenu:U,focusProps:A}),M("div",{className:(0,o.default)(I.default.avatar,(n={},n[I.default.speaking]=T,n)),style:{backgroundImage:"url("+b+")"}},void 0,null!=D?M(D,{className:(0,o.default)(I.default.avatarIconOverlay,(r={},r[I.default.avatarIconRed]=w,r)),width:16,height:16,foreground:I.default.avatarIconRed}):null))}))}))}function L(e){var t=e.voiceStates,n=e.channel,r=e.className,i=t.length>8,l=a.useState(!1),u=l[0],s=l[1],d=u?g.default:E.default,f=M(p.default,{className:I.default.expandButton,onClick:function(){return s(!u)},color:p.CircleIconButtonColors.PRIMARY,size:p.CircleIconButtonSizes.SIZE_24,tooltip:u?O.default.Messages.VOICE_PANEL_HIDE_EXTRAS:O.default.Messages.VOICE_PANEL_SHOW_EXTRAS,icon:M(d,{width:16,height:16}),focusProps:A}),c=!i||u?t:t.slice(0,7);return M(S.default,{className:(0,o.default)(I.default.scroller,r),fade:!0},void 0,M("div",{className:I.default.voiceUsers,role:"group","aria-label":O.default.Messages.VOICE_PANEL_USERS_A11Y_LABEL},void 0,c.map((function(e){var t=e.user,r=e.nick,a=e.voiceState;return M(R,{channel:n,user:t,nick:r,mute:a.isVoiceMuted(),deaf:a.isVoiceDeafened(),video:a.selfVideo,serverMute:a.mute,serverDeaf:a.deaf},t.id)})),i?f:null))}R.displayName="User",L.displayName="RTCConnectionVoiceUsers"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=P();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(3),o=A(n(478)),i=A(n(486)),l=n(106),u=A(n(11707)),s=n(766),d=A(n(26)),f=A(n(81)),c=A(n(10)),p=A(n(709)),v=A(n(71)),y=A(n(56)),m=A(n(15)),_=A(n(51)),h=A(n(94)),E=A(n(79)),g=A(n(36)),S=A(n(107)),O=A(n(479)),I=A(n(12)),T=A(n(8690)),C=A(n(10061)),b=A(n(13)),M=n(48),N=n(1);function A(e){return e&&e.__esModule?e:{default:e}}function P(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return P=function(){return e},e}function R(){return(R=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}).apply(this,arguments)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var D=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,L(t,n);var a=r.prototype;return a.componentDidMount=function(){var e=this.props,t=e.selectedChannelId,n=e.connected,r=e.isNSFWChannel;n&&null!=t&&(0,l.trackWithMetadata)(N.AnalyticEvents.CHANNEL_OPENED,{channel_is_nsfw:r})},a.componentDidUpdate=function(e){var t=this.props,n=t.voiceChannelId,r=t.voiceChannelIdJoined,a=t.voiceChannelGuildId,i=t.voiceChannelType,p=t.voiceChannelBitrate,y=t.videoEnabled,m=t.isScreenSharing,_=t.runningGame,g=t.runningGamePid,S=t.selectedChannelId,O=t.selectedGuildId,I=t.connected,T=t.homeLink,C=t.friendsTabSection,A=t.isNSFWChannel,P=t.isMemberPending,L=t.hasPreviewEnabled,D=t.rtcConnectionId;if(e.voiceChannelId!==n&&null!=e.voiceChannelId){var w=E.default.getCurrentGame(),j=null!=w?w.name:"",k=f.default.getStageInstanceByChannel(e.voiceChannelId);b.default.track(N.AnalyticEvents.LEAVE_VOICE_CHANNEL,R({channel_id:e.voiceChannelId,channel_type:e.voiceChannelType,channel_bitrate:e.voiceChannelBitrate,guild_id:e.voiceChannelGuildId,rtc_connection_id:e.rtcConnectionId,game_name:j,duration:h.default.getDuration(),game_platform:this.props.gamePlatform,game_id:this.props.gameId,media_session_id:e.mediaSessionId,stage_instance_id:null==k?void 0:k.id},(0,l.getVoiceStateMetadata)(e.voiceChannelGuildId,e.voiceChannelId,e.videoEnabled),{},h.default.getVoiceStateStats()))}if(e.voiceChannelIdJoined!==r&&null!=r){var U=E.default.getCurrentGame(),G=null!=U?U.name:"";if(null!=r&&null!=n){var F=f.default.getStageInstanceByChannel(n);b.default.track(N.AnalyticEvents.JOIN_VOICE_CHANNEL,R({channel_id:n,channel_type:i,channel_bitrate:p,guild_id:a,rtc_connection_id:D,game_name:G,game_platform:this.props.gamePlatform,game_id:this.props.gameId,stage_instance_id:null==F?void 0:F.id},(0,l.getCustomStatusMetadata)(a,n),{},(0,l.getVoiceStateMetadata)(a,n,y)))}}if(e.runningGame!==_&&null!=_&&!_.isLauncher){var B=v.default.getGameByName(_.name);if(b.default.track(N.AnalyticEvents.LAUNCH_GAME,{game:_.name,game_id:null==B?null:B.id,verified:null!=B,elevated:_.elevated,game_platform:N.ActivityGamePlatforms.DESKTOP,distributor:_.distributor}),null!=_.name&&null!=g&&v.default.shouldReport(_.name)){var H=_.name,x=g;o.default.identifyGame(x,H).then((function(e){return o.default.reportUnverifiedGame(e)})).catch((function(e){return new d.default("AutoAnalytics").error("Cannot identify game",e)}))}}if((e.videoEnabled!==y||e.isScreenSharing!==m)&&null!=n){var V="none",W=[m?"screen":null,y?"camera":null].filter(M.isNotNullish),Y=null;m?(V="screen",Y=(0,s.getDesktopSourceMetadata)()):y&&(V="camera"),b.default.track(N.AnalyticEvents.VIDEO_INPUT_TOGGLED,R({video_input_type:V,video_toggle_source:__OVERLAY__?"overlay":"app",enabled_inputs:W},Y,{},this.getGameMetadata(),{},(0,l.collectVoiceAnalyticsMetadata)(n)))}if(I&&null!=O&&(O!==e.selectedGuildId||!e.connected||P&&!e.isMemberPending)){var z=P?{is_pending:P,preview_enabled:L}:{};(0,l.trackWithMetadata)(N.AnalyticEvents.GUILD_VIEWED,z)}else!I||null!=O||T!==N.Routes.FRIENDS||e.connected&&C===e.friendsTabSection&&T===e.homeLink||b.default.track(N.AnalyticEvents.FRIENDS_LIST_VIEWED,R({tab_opened:C},(0,u.default)()));if(I&&null!=S&&(S!==e.selectedChannelId||!e.connected)){var K=(0,l.collectThreadMetadata)(c.default.getChannel(S),!0);(0,l.trackWithMetadata)(N.AnalyticEvents.CHANNEL_OPENED,R({channel_is_nsfw:A},K))}},a.getGameMetadata=function(){return{game_platform:this.props.gamePlatform,game_name:this.props.gameName,game_exe_name:this.props.gameExeName,game_id:this.props.gameId}},a.render=function(){return null},r}(r.PureComponent);function w(){var e=(0,a.useStateFromStoresArray)([g.default],(function(){return[g.default.getVoiceChannelId(),g.default.getChannelId()]}),[]),t=e[0],n=e[1],o=(0,a.useStateFromStores)([c.default],(function(){return c.default.getChannel(n)}),[n]),l=null==o?void 0:o.nsfw,u=(0,a.useStateFromStores)([c.default],(function(){return c.default.getChannel(t)}),[t]),s=(0,a.useStateFromStores)([S.default],(function(){return S.default.getGuildId()}),[]),d=(0,a.useStateFromStores)([m.default],(function(){return m.default.getGuild(s)}),[s]),f=(0,a.useStateFromStores)([I.default],(function(){return I.default.getCurrentUser()}),[]),v=(0,a.useStateFromStores)([y.default],(function(){var e,t;return null!=f&&null!=s&&(null!==(e=null===(t=y.default.getMember(s,f.id))||void 0===t?void 0:t.isPending)&&void 0!==e&&e)}),[f,s]),b=(0,a.useStateFromStores)([C.default],(function(){return C.default.getState().section}),[]),M=(0,a.useStateFromStores)([T.default],(function(){return T.default.getHomeLink()}),[]),A=(0,a.useStateFromStores)([p.default],(function(){return p.default.isConnected()}),[]),P=(0,a.useStateFromStoresArray)([_.default],(function(){return[_.default.isVideoEnabled(),_.default.isScreenSharing()]}),[]),R=P[0],L=P[1],w=(0,a.useStateFromStores)([h.default],(function(){return h.default.getChannelId()}),[]),j=(0,a.useStateFromStores)([O.default],(function(){return O.default.getPrimaryActivity()}),[]),k=(0,a.useStateFromStores)([E.default],(function(){return E.default.getCurrentGame()}),[]),U=(0,a.useStateFromStores)([h.default],(function(){return h.default.getMediaSessionId()}),[]),G=(0,a.useStateFromStores)([h.default],(function(){return h.default.getRTCConnectionId()}),[]),F={selectedChannelId:n,isNSFWChannel:l,selectedGuildId:s,friendsTabSection:b,homeLink:M,connected:A,videoEnabled:R,isScreenSharing:L,voiceChannelId:null==u?void 0:u.id,voiceChannelIdJoined:w,voiceChannelGuildId:null==u?void 0:u.getGuildId(),voiceChannelType:null==u?void 0:u.type,voiceChannelBitrate:null==u?void 0:u.bitrate,runningGame:k,runningGamePid:null!=k?k.pid:null,gamePlatform:(0,i.default)(j),gameName:null!=j?j.name:null,gameId:null!=j?j.application_id:null,gameExeName:null!=k?k.exeName:null,hasPreviewEnabled:null==d?void 0:d.features.has(N.GuildFeatures.PREVIEW_ENABLED),isMemberPending:v,mediaSessionId:U,rtcConnectionId:G};return r.createElement(D,F)}D.displayName="AutoAnalytics",w.displayName="ConnectedAutoAnalytics"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(11708).default;t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=y(n(8)),o=n(276),i=n(122),l=n(3),u=y(n(11710)),s=n(769),d=y(n(1299)),f=y(n(10383)),c=y(n(8359)),p=y(n(160)),v=n(1247);function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(){return(_=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}).apply(this,arguments)}var h={transform:"scale(0.7)",opacity:0},E={transform:"scale(1)",opacity:1},g=function(){var e=(0,l.useStateFromStoresArray)([f.default],(function(){return f.default.getIncomingCalls()})),t=(0,l.useStateFromStores)([f.default],(function(){return f.default.hasIncomingCalls()})),n=(0,l.useStateFromStores)([c.default],(function(){return c.default.isSoundDisabled("call_ringing")})),y=(0,l.useStateFromStores)([p.default],(function(){return p.default.disableSounds})),m=(0,l.useStateFromStores)([d.default],(function(){return d.default.getSoundpack()})),g=r.useRef(!1),S=(0,o.useStableMemo)((function(){return m===s.Soundpacks.CLASSIC?(0,v.createSound)(500===a.default.random(1,1e3)?"call_ringing_beat":"call_ringing"):(0,v.createSoundForPack)("call_ringing",m)}),[m]);return r.useEffect((function(){return function(){S.stop()}}),[S]),r.useEffect((function(){y||n?g.current&&(S.stop(),g.current=!1):t&&!g.current?(S.loop(),g.current=!0):!t&&g.current&&(S.stop(),g.current=!1)}),[n,y,t,S]),(0,i.useTransition)(e,{keys:function(e){var t;return null===(t=e.channel)||void 0===t?void 0:t.id},enter:{from:h,to:E},leave:h,config:{mass:1,tension:500,friction:18,clamp:!0}})((function(e,t){return r.createElement(u.default,_({},t,{animatedStyle:e}))}))};t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Z;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=F();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=G(n(9)),i=n(122),l=n(3),u=n(34),s=G(n(728)),d=G(n(11711)),f=G(n(132)),c=G(n(11712)),p=n(5937),v=G(n(180)),y=n(42),m=G(n(9704)),_=G(n(6013)),h=G(n(8754)),E=n(8288),g=G(n(10371)),S=G(n(8937)),O=G(n(51)),I=G(n(161)),T=G(n(29)),C=G(n(278)),b=G(n(151)),M=G(n(255)),N=n(314),A=G(n(1376)),P=G(n(24)),R=n(259),L=G(n(688)),D=G(n(9701)),w=n(1),j=G(n(6)),k=G(n(8196)),U=G(n(5958));function G(e){return e&&e.__esModule?e:{default:e}}function F(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return F=function(){return e},e}function B(){return(B=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}).apply(this,arguments)}function H(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var x={width:232,height:315},V={width:232,height:267},W=475,Y=267,z=H(b.default,{});function K(e){var t=e.header,n=O.default.getCameraComponent(),r=(0,l.useStateFromStores)([O.default],(function(){return O.default.getVideoDeviceId()}));return H("div",{className:k.default.previewRoot},void 0,z,H("div",{className:k.default.preview},void 0,H(n,{disabled:!1,deviceId:r,width:W,height:Y})),H("div",{className:k.default.previewChannelHeader},void 0,t))}function $(e){var t=e.canVideo,n=e.channel,r=e.numVideoDevices,a=(0,m.default)(),i=a.cameraUnavailable,l=a.enabled,u=(0,_.default)(n);return H("div",{className:k.default.actions},void 0,H(E.CenterControlButton,{iconComponent:M.default,color:"red",className:k.default.actionButton,label:j.default.Messages.DISMISS,onClick:function(){return s.default.stopRinging(n.id)}}),t&&H(C.default,{renderPopout:function(e){var t=e.closePopout;return H(D.default,{onClose:t})},position:C.default.Positions.TOP,align:C.default.Align.CENTER,animation:C.default.Animation.FADE},void 0,(function(e,t){var a=e.onClick;return H(S.default,{join:!0,enabled:l,color:"green",centerButton:!0,hasPermission:u,cameraUnavailable:i,channel:n,onPopoutClick:r>1?a:null,className:k.default.actionButton,popoutOpen:t,onCameraUnavailable:h.default,onChange:function(){f.default.selectVoiceChannel(n.id,!0),(0,y.transitionToGuild)(w.ME,n.id)}})})),H(g.default,{channel:n,color:"green",centerButton:!0,className:(0,o.default)(k.default.actionButton,k.default.last),onClick:function(){return f.default.selectVoiceChannel(n.id)}}))}function Z(e){var t,n=e.animatedStyle,r=e.y,f=e.x,y=e.channel,m=a.useState(!1),_=m[0],h=m[1],E=(0,p.getChannelIconURL)(y),g=(0,v.default)(y),S=(0,l.useStateFromStoresArray)([O.default],(function(){return[O.default.supports(u.Features.VIDEO),Object.keys(O.default.getVideoDevices()).length]})),C=S[0],b=S[1],M=(0,l.useStateFromStores)([I.default],(function(){return I.default.isFocused()})),D=(0,l.useStateFromStores)([L.default],(function(){return L.default.getMode(y.id)})),G=a.useCallback((function(e){null!=e.top&&null!=e.left&&d.default.move(e.left,e.top)}),[]),F=(0,i.useSpring)({value:_?1:0,config:B({},i.config.stiff,{clamp:!0})});a.useEffect((function(){var e=function(e){e.keyCode===w.KeyboardKeys.ESCAPE&&s.default.stopRinging(y.id)};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}),[y]);var z=D===w.ChannelModes.VIDEO&&C&&b>0,Z=a.createElement(a.Fragment,null,H(A.default,{className:k.default.icon,ringing:M,src:null!=E?E:"",ringingType:A.default.RingingType.INCOMING,size:_?N.Sizes.SIZE_40:N.Sizes.SIZE_80}),H("div",{className:k.default.titleGroup},void 0,H(P.default,{color:P.default.Colors.CUSTOM,className:k.default.title,size:_?P.default.Sizes.SIZE_16:P.default.Sizes.SIZE_20},void 0,g),H(P.default,{color:P.default.Colors.CUSTOM,className:k.default.subtitle,size:_?P.default.Sizes.SIZE_14:P.default.Sizes.SIZE_16},void 0,D===w.ChannelModes.VOICE?j.default.Messages.INCOMING_CALL_ELLIPSIS:j.default.Messages.INCOMING_VIDEO_CALL_ELLIPSIS))),q=z?x:V;return H(c.default,{className:k.default.wrapper,selector:"."+k.default.root,initialPosition:{left:f,top:r},maxX:window.innerWidth,maxY:window.innerHeight,onDragEnd:G,dragAnywhere:!0},void 0,a.createElement(a.Fragment,null,H(i.animated.div,{className:(0,o.default)(k.default.root,U.default.elevationHigh,(t={},t[k.default.previewCamera]=_,t),_?(0,R.getThemeClass)("dark"):null),style:B({},n,{width:F.value.interpolate([0,1],[q.width,W]),minHeight:F.value.interpolate([0,1],[q.height,Y]),translateX:F.value.interpolate([0,1],[0,-1*Math.abs(W-q.width)/2])})},void 0,_?H(K,{header:Z}):H("div",{className:k.default.mainChannelInfo},void 0,Z),H($,{canVideo:z,channel:y,numVideoDevices:b}),z&&!_?H(T.default,{size:T.default.Sizes.SMALL,fullWidth:!0,look:T.default.Looks.LINK,color:T.default.Colors.PRIMARY,className:k.default.previewButton,onClick:function(){return h(!0)}},void 0,j.default.Messages.INCOMING_CALL_PREVIEW_CAMERA):null)))}K.displayName="CameraPreview",$.displayName="CallActionButtons",Z.displayName="IncomingCallModal"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(2))&&r.__esModule?r:{default:r},o=n(1);var i={move:function(e,t){a.default.dispatch({type:o.ActionTypes.INCOMING_CALL_MOVE,x:e,y:t})}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=n(1);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l,u,s=Math.pow(3,2);function d(e,t,n,r,a){var o=e.top,i=e.bottom,l=e.left,u=e.right;if(null==o&&null==i?(o=0,i=n-a):null==o&&null!=i?o=n-(i+a):null!=o&&(i=n-(o+a)),null==l&&null==u?(l=0,u=t-r):null==l&&null!=u?l=t-(u+r):null==u&&null!=l&&(u=t-(l+r)),null==o||null==i||null==l||null==u)throw new Error("Logically this can never happen based on our if/else statements");return{top:o,left:l,bottom:i,right:u}}function f(e){return[null==e.bottom?u.TOP:u.BOTTOM,null==e.right?u.LEFT:u.RIGHT]}function c(e){var t=e,n=t.top,r=t.left,a=t.bottom,o=t.right;return 0===n||n<=a?a=null:n=null,0===r||r<=o?o=null:r=null,{top:n,left:r,bottom:a,right:o}}function p(e){var t=e.top,n=e.left,r=e.bottom,a=e.right;return r<0&&(t+=r,r=0),t<0&&(r+=t,t=0),a<0&&(n+=a,a=0),n<0&&(a+=n,n=0),{top:t,left:n,bottom:r,right:a}}function v(e){return null!=e?e+"px":"auto"}!function(e){e[e.DISABLED=0]="DISABLED",e[e.DEFAULT=1]="DEFAULT",e[e.OFFSET=2]="OFFSET"}(l||(l={})),function(e){e.TOP="TOP",e.BOTTOM="BOTTOM",e.RIGHT="RIGHT",e.LEFT="LEFT"}(u||(u={}));var y=function(e){var t,n;function o(t){var n;(n=e.call(this,t)||this).draggableRef=r.createRef(),n._dragStart={x:0,y:0},n.handleMouseDown=function(e){var t=n.position,r=t.top,o=t.left,i=t.bottom,l=t.right,u=n.props,s=u.dragAnywhere,f=u.selector,c=u.maxX,p=u.maxY,v=e.target,y=n.draggableRef.current;if(null!=y&&e.button===a.MouseButtons.PRIMARY&&(s||null!=v&&f&&null!=v.closest(f))){var m=function(e){var t=e.top;return{x:e.left,y:t}}(d({top:r,left:o,bottom:i,right:l},c,p,y.clientWidth,y.clientHeight)),_=m.x,h=m.y;n._dragStart={x:e.clientX,y:e.clientY},n._offsetX=e.clientX-_,n._offsetY=e.clientY-h,window.addEventListener("mousemove",n.handleMouseMove),window.addEventListener("mouseup",n.handleMouseUp)}},n.handleMouseMove=function(e){e.preventDefault();var t=e.clientX,r=e.clientY,a=n.draggableRef.current,o=n.props,i=o.maxX,u=o.maxY,v=o.flipVertical,y=o.flipHorizontal,m=o.onDragStart,_=o.onDrag,h=o.onFlip,E=o.snapOrientation,g=n.state,S=g.dragging,O=g.dragging,I=g.verticalOrientation,T=g.horizontalOrientation,C=!1;if(!(null==a||!S&&(b=n._dragStart,M={x:t,y:r},N=b.x,A=b.y,P=M.x,R=M.y,Math.pow(N-P,2)+Math.pow(A-R,2)<s))){var b,M,N,A,P,R;S=!0;var L=a.clientWidth,D=a.clientHeight,w=p(d({top:r-n._offsetY,left:t-n._offsetX},i,u,L,D));if(E){var j=f(w=c(w));I=j[0],T=j[1]}else w={top:w.top,left:w.left};y===l.OFFSET&&T!==n.state.horizontalOrientation&&(n._offsetX=L-n._offsetX,C=!0),v===l.OFFSET&&I!==n.state.verticalOrientation&&(n._offsetY=D-n._offsetY,C=!0),n.setDOMPositions(w),O||m&&m(w,a),_&&_(w,a),C&&h&&h([I,T]),n.setState({dragging:S,verticalOrientation:I,horizontalOrientation:T,atTopEdge:0===w.top})}},n.handleMouseUp=function(){window.removeEventListener("mousemove",n.handleMouseMove),window.removeEventListener("mouseup",n.handleMouseUp),n.state.dragging&&n.setState({dragging:!1},(function(){var e=n.props.onDragEnd,t=n.draggableRef.current;null!=t&&null!=e&&e(n.position,t)}))},n._checkBoundsRAF=null,n.checkBounds=function(){null!=n._checkBoundsRAF&&cancelAnimationFrame(n._checkBoundsRAF),n._checkBoundsRAF=requestAnimationFrame(n._performCheckBounds)},n._performCheckBounds=function(){var e=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),t=e.position,r=e.state,a=e.draggableRef.current,o=e.props,i=o.maxX,l=o.maxY,u=o.onRelocated,s=o.snapOrientation,v=n.state,y=v.verticalOrientation,m=v.horizontalOrientation;if(null!=a){var _,h=a.clientHeight,E=d(t,i,l,a.clientWidth,h);if(E=p(E),s){var g=f(_=c(E));y=g[0],m=g[1]}else _={top:E.top,left:E.left,right:null,bottom:null};if(t.left!==_.left||t.right!==_.right||t.top!==_.top||t.bottom!==_.bottom){u&&u(_,a),n.setDOMPositions(_);var S=0===_.top;y===r.verticalOrientation&&m===r.horizontalOrientation&&S===r.atTopEdge||n.setState({verticalOrientation:y,horizontalOrientation:m,atTopEdge:S})}}};var o,i,u,v,y,m=f(t.initialPosition),_=m[0],h=m[1];return n.position=(o=t.initialPosition,i=o.top,u=o.left,v=o.bottom,y=o.right,null==u&&null==y&&(u=0),null!=u&&null!=y&&(y=null),null==i&&null==v&&(i=0),null!=i&&null!=v&&(v=null),{top:i,left:u,bottom:v,right:y}),n.state={dragging:!1,verticalOrientation:_,horizontalOrientation:h,atTopEdge:0===n.position.top},n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var y=o.prototype;return y.componentDidMount=function(){this.checkBounds(),this.setDOMPositions(this.position)},y.componentDidUpdate=function(e,t){var n=this.state,r=n.verticalOrientation,a=n.horizontalOrientation,o=n.atTopEdge,i=this.props,l=i.maxX,u=i.maxY,s=i.onRelocated,d=i.snapOrientation;(e.maxX!==l||e.maxY!==u||e.onRelocated!==s||e.snapOrientation!==d||t.verticalOrientation!==r||t.horizontalOrientation!==a||t.atTopEdge!==o)&&this.checkBounds()},y.componentWillUnmount=function(){window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("mouseup",this.handleMouseUp)},y.setDOMPositions=function(e){var t=e.top,n=e.left,r=e.bottom,a=e.right,o=this.draggableRef.current;this.position={top:t,left:n,bottom:r,right:a},null!=o&&(o.style.top=v(t),o.style.bottom=v(r),o.style.left=v(n),o.style.right=v(a))},y.render=function(){var e=this.props,t=e.children,n=e.className,a=this.state,o=a.dragging,i=a.verticalOrientation,l=a.horizontalOrientation,s=a.atTopEdge,d=this.position,f=d.top,c=d.left,p=d.right,v={pointerEvents:o?"none":"auto",position:"absolute",top:f,left:c,bottom:d.bottom,right:p};return r.createElement("div",{ref:this.draggableRef,className:n,onMouseDown:this.handleMouseDown,style:v},r.cloneElement(r.Children.only(t),{flipped:l===u.RIGHT,verticalFlipped:i===u.BOTTOM,checkBounds:this.checkBounds,atTopEdge:s}))},o}(r.PureComponent);t.default=y,y.displayName="Draggable",y.FlipTypes=l,y.defaultProps={snapOrientation:!1,maxX:0,maxY:0,flipVertical:l.DISABLED,flipHorizontal:l.DISABLED,dragAnywhere:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=H;var r,a,o=N(n(0)),i=b(n(9)),l=b(n(273)),u=N(n(3)),s=b(n(469)),d=n(687),f=n(9069),c=b(n(403)),p=n(123),v=b(n(105)),y=b(n(694)),m=b(n(721)),_=n(1230),h=n(121),E=n(259),g=b(n(11714)),S=b(n(9170)),O=b(n(11736)),I=b(n(10470)),T=n(1),C=b(n(8206));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function A(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function P(){return(P=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}).apply(this,arguments)}function R(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,L(e,t)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var D=A(I.default,{}),w=A(g.default,{}),j=A(S.default,{}),k=A(O.default,{}),U=((r={})[T.Layers.USER_SETTINGS]=function(){return D},r[T.Layers.CHANNEL_SETTINGS]=function(){return w},r[T.Layers.GUILD_SETTINGS]=function(){return j},r[T.Layers.RTC_DEBUG]=function(){return k},r),G={friction:10,tension:100},F=function(e){function t(t){var n;(n=e.call(this,t)||this).containerRef=o.createRef();var r=1,a=1;return"HIDDEN"===t.mode&&(r=.93,a=0),n.state={animating:!1,scale:new l.default.Value(r),opacity:new l.default.Value(a),mode:t.mode},n}R(t,e),t.getDerivedStateFromProps=function(e,t){return e.mode!==t.mode?{animating:!0,mode:e.mode}:null};var n=t.prototype;return n.componentDidUpdate=function(e){var t=this.props.mode,n=e.mode;if(t!==n)return"SHOWN"===t&&"HIDDEN"===n?this.animateIn():"HIDDEN"===t&&"SHOWN"===n?this.animateUnder():void 0},n.componentWillEnter=function(e){var t=this,n=this.state,r=n.opacity;n.scale.setValue(1.1),r.setValue(0),e(),this.setState({animating:!0},(function(){return t.animateIn()}))},n.componentWillLeave=function(e){var t=this;this.setState({animating:!0},(function(){return t.animateOut(e)}))},n.animateIn=function(e){var t=this;u.default.Store.pauseEmittingChanges(500);var n=this.state,r=n.opacity,a=n.scale;l.default.parallel([l.default.spring(r,P({toValue:1},G)),l.default.spring(a,P({toValue:1},G))]).start((function(){return t.animateComplete(e)}))},n.animateOut=function(e){u.default.Store.pauseEmittingChanges(500);var t=this.state,n=t.opacity,r=t.scale;h.ComponentDispatch.dispatch(T.ComponentActions.LAYER_POP_START),l.default.parallel([l.default.spring(n,P({toValue:0},G)),l.default.spring(r,P({toValue:1.1},G))]).start((function(){e(),h.ComponentDispatch.dispatch(T.ComponentActions.LAYER_POP_COMPLETE)}))},n.animateUnder=function(){var e=this;u.default.Store.pauseEmittingChanges(500);var t=this.state,n=t.opacity,r=t.scale;l.default.parallel([l.default.spring(n,P({toValue:0},G)),l.default.spring(r,P({toValue:.93},G))]).start((function(){return e.animateComplete()}))},n.animateComplete=function(e){this.setState({animating:!1},e)},n.render=function(){var e,t=this,n=this.state.animating,r=this.props,a=r.mode,u=r.children,s=r.baseLayer,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(r,["mode","children","baseLayer"]),f=n||"HIDDEN"===a?this.getAnimatedStyle():null,c=o.createElement(l.default.div,P({ref:function(e){return t.containerRef.current=null!=e?e.refs.node:void 0},"aria-hidden":"HIDDEN"===a,className:(0,i.default)(C.default.layer,(e={},e[C.default.baseLayer]=s,e[C.default.animating]=n,e["stop-animations"]="HIDDEN"===a,e)),style:f},d),u);return s?c:A(m.default,{containerRef:this.containerRef},void 0,c)},n.getAnimatedStyle=function(){var e=this.state,t=e.opacity,n=e.scale;return{opacity:t,transform:this.context.reducedMotion.enabled?void 0:[{scale:n},{translateZ:0}]}},t}(o.PureComponent);F.displayName="Layer",F.defaultProps={baseLayer:!1},F.contextType=p.AccessibilityPreferencesContext;var B=function(e){function t(){return e.apply(this,arguments)||this}R(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props.layers;e[e.length-1]===T.Layers.USER_SETTINGS&&(c.default.enable(),c.default.enableTemp(f.SETTINGS_LAYERS_LAYOUT)),h.ComponentDispatch.subscribe(T.ComponentActions.LAYER_POP_ESCAPE_KEY,d.popLayer)},n.componentDidUpdate=function(e){var t=this.props,n=t.layers,r=t.hasFullScreenLayer,a=e.layers.length>0||e.hasFullScreenLayer,o=n.length>0||r;!a&&o||o&&n===e.layers&&n[0]===T.Layers.USER_SETTINGS?c.default.enableTemp(f.SETTINGS_LAYERS_LAYOUT):a&&!o&&c.default.disableTemp()},n.componentWillUnmount=function(){h.ComponentDispatch.unsubscribe(T.ComponentActions.LAYER_POP_ESCAPE_KEY,d.popLayer)},n.renderLayers=function(){var e=this,t=this.props,n=t.children,r=t.layers,a=t.hasFullScreenLayer,o=r.length,i=[];return i.push(A(F,{mode:0!==o||a?"HIDDEN":"SHOWN",baseLayer:!0},"layer-base",n)),r.forEach((function(t,n){return i.push(e.renderComponent(t,n,o))})),i},n.renderComponent=function(e,t,n){var r,a=t===n-1,o="layer";return"string"==typeof e?(o=e,r=U[e]()):r=A(e,{}),A(F,{"aria-label":o,mode:a?"SHOWN":"HIDDEN"},"layer-"+t,r)},n.renderArtisanalHack=function(){return A("div",{className:(0,i.default)(C.default.bg,(0,E.getThemeClass)(this.props.sidebarTheme))})},n.render=function(){return o.createElement(o.Fragment,null,this.renderArtisanalHack(),A(s.default,{component:"div",className:(0,i.default)(C.default.layers,this.props.className)},void 0,this.renderLayers()))},t}(o.PureComponent);function H(e){var t=(0,u.useStateFromStores)([v.default],(function(){return v.default.darkSidebar}))?T.ThemeTypes.DARK:void 0,n=(0,u.useStateFromStores)([y.default],(function(){return y.default.getLayers()})),r=(0,_.useFullScreenLayerStore)((function(e){return e.fullScreenLayers.length>0}));return o.createElement(B,P({},e,{sidebarTheme:t,layers:n,hasFullScreenLayer:r}))}B.displayName="Layers",H.displayName="ConnectedLayers"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=Y;var r,a=G(n(0)),o=n(3),i=k(n(2)),l=n(8330),u=n(687),s=k(n(8575)),d=n(8305),f=k(n(9126)),c=k(n(105)),p=k(n(106)),v=n(180),y=n(8328),m=k(n(11715)),_=n(1209),h=n(31),E=k(n(10493)),g=k(n(9247)),S=k(n(8711)),O=k(n(10)),I=k(n(40)),T=k(n(70)),C=k(n(39)),b=k(n(12)),M=n(41),N=n(121),A=G(n(11728)),P=k(n(11729)),R=G(n(11730)),L=n(10492),D=n(1),w=k(n(6)),j=k(n(8205));function k(e){return e&&e.__esModule?e:{default:e}}function U(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return U=function(){return e},e}function G(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=U();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(){return(B=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}).apply(this,arguments)}function H(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function x(e){var t=e.channel,n=e.category,r=e.canManageRoles,o=e.canManageChannels,i=e.canDeleteChannels,s=e.canManageWebhooks,c=(0,y.getChannelIconComponent)(t),p=D.ChannelTypes.GUILD_CATEGORY,_=h.THREAD_CHANNEL_TYPES.has(t.type);return[{section:d.SectionTypes.HEADER,label:null!=t?H("span",{},void 0,null!=c?H(c,{width:11,height:11,className:j.default.channelIcon,background:j.default.background}):null,(0,v.computeChannelName)(t,b.default,T.default),null!=n?H("span",{className:j.default.category},void 0,(0,v.computeChannelName)(n,b.default,T.default)):null):w.default.Messages.CHANNEL_SETTINGS},{section:D.ChannelSettingsSections.OVERVIEW,label:w.default.Messages.OVERVIEW,element:R.default,notice:{element:R.ChannelSettingsOverviewNotice,store:S.default}},{section:D.ChannelSettingsSections.PERMISSIONS,label:w.default.Messages.PERMISSIONS,element:m.default,notice:{element:L.ChannelSettingsPermissionsNotice,store:g.default},predicate:function(){return r&&!_}},{section:D.ChannelSettingsSections.INSTANT_INVITES,label:w.default.Messages.INVITES,element:P.default,type:d.ContentTypes.CUSTOM,predicate:function(){return t.type!==p&&o&&!_}},{section:D.ChannelSettingsSections.INTEGRATIONS,label:w.default.Messages.INTEGRATIONS_OVERVIEW,ariaLabel:w.default.Messages.INTEGRATIONS_OVERVIEW,element:A.default,notice:{store:E.default,element:A.ChannelSettingsIntegrationsNotice},predicate:function(){return(0,h.isGuildTextChannelType)(t.type)&&s&&!_}},{section:d.SectionTypes.DIVIDER},{section:D.ChannelSettingsSections.DELETE,onClick:function(){(0,M.openModal)((function(e){return a.createElement(f.default,B({},e,{onConfirm:function(){e.onClose(),N.ComponentDispatch.subscribeOnce(D.ComponentActions.LAYER_POP_COMPLETE,(function(){(0,l.deleteChannel)(t.id)})),(0,u.popLayer)()},channel:t}))}))},label:t.type===p?w.default.Messages.DELETE_CATEGORY:_?w.default.Messages.DELETE_THREAD:w.default.Messages.DELETE_CHANNEL,color:D.Colors.STATUS_RED,predicate:function(){return i}}]}function V(e,t){void 0===t&&(t=null),p.default.trackWithMetadata(D.AnalyticEvents.SETTINGS_PANE_VIEWED,{settings_type:"channel",origin_pane:t,destination_pane:e})}var W=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,F(t,n);var a=r.prototype;return a.componentDidMount=function(){V(this.props.section)},a.componentWillUnmount=function(){i.default.wait((function(){return(0,l.close)()}))},a.componentDidUpdate=function(e){var t=e.formState,n=e.section,r=this.props,a=r.formState,o=r.section,i=r.canManageRoles,l=r.canManageChannels,s=r.canManageWebhooks;!l&&!i&&!s||a===D.FormStates.CLOSED&&a!==t||!i&&o===D.ChannelSettingsSections.PERMISSIONS||!s&&o===D.ChannelSettingsSections.INTEGRATIONS?(0,u.popLayer)():o!==n&&V(o,n)},a.render=function(){var e=this.props,t=e.theme,n=e.sidebarTheme,r=e.section,a=e.channel,o=e.category,i=e.canManageRoles,d=e.canManageChannels,f=e.canDeleteChannels,c=e.canManageWebhooks;return null==a?null:H(s.default,{theme:t,sidebarTheme:n,section:r||D.ChannelSettingsSections.OVERVIEW,onSetSection:l.setSection,onClose:u.popLayer,sections:x({channel:a,category:o,canManageRoles:i,canManageChannels:d,canDeleteChannels:f,canManageWebhooks:c})})},r}(a.PureComponent);function Y(){var e=(0,o.useStateFromStores)([S.default],(function(){return S.default.getProps()})).channel,t=(0,o.useStateFromStores)([S.default],(function(){return S.default.getFormState()})),n=(0,o.useStateFromStores)([S.default],(function(){return S.default.getSection()})),r=(0,o.useStateFromStores)([C.default],(function(){return C.default.theme})),a=(0,o.useStateFromStores)([c.default],(function(){return c.default.darkSidebar?D.ThemeTypes.DARK:void 0})),i=(0,_.useCanManageThread)(e),l=(0,_.useIsThreadModerator)(e),u=(0,o.useStateFromStoresObject)([I.default],(function(){return{canManageChannels:I.default.can(D.Permissions.MANAGE_CHANNELS,e),canManageRoles:null!=e&&I.default.can(D.Permissions.MANAGE_ROLES,e),canManageWebhooks:null!=e&&I.default.can(D.Permissions.MANAGE_WEBHOOKS,e)}})),s=u.canManageChannels,d=u.canManageRoles,f=u.canManageWebhooks,p=(0,o.useStateFromStores)([O.default],(function(){return O.default.getChannel(null==e?void 0:e.parent_id)}));return H(W,{channel:e,category:p,canManageChannels:(null==e?void 0:e.isThread())?i:s,canDeleteChannels:(null==e?void 0:e.isThread())?l:s,canManageRoles:d,canManageWebhooks:f,formState:t,theme:r,sidebarTheme:a,section:n})}W.displayName="ChannelSettings",Y.displayName="ConnectedChannelSettings"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=te(n(0)),o=Q(n(9)),i=n(92),l=te(n(3)),u=Q(n(154)),s=Q(n(391)),d=n(8330),f=n(8481),c=Q(n(9191)),p=n(286),v=n(1294),y=n(203),m=n(734),_=Q(n(9169)),h=Q(n(9247)),E=Q(n(56)),g=Q(n(15)),S=Q(n(40)),O=Q(n(160)),I=Q(n(12)),T=Q(n(1222)),C=Q(n(29)),b=Q(n(61)),M=Q(n(55)),N=te(n(8353)),A=te(n(149)),P=n(131),R=Q(n(474)),L=Q(n(159)),D=Q(n(686)),w=Q(n(1221)),j=Q(n(8448)),k=Q(n(291)),U=Q(n(9236)),G=Q(n(11716)),F=n(41),B=Q(n(279)),H=Q(n(24)),x=Q(n(1210)),V=Q(n(78)),W=n(1229),Y=te(n(8574)),z=Q(n(8482)),K=Q(n(11717)),$=Q(n(11726)),Z=Q(n(11727)),q=n(1),X=Q(n(6)),J=Q(n(8204));function Q(e){return e&&e.__esModule?e:{default:e}}function ee(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return ee=function(){return e},e}function te(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=ee();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function ne(){return(ne=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}).apply(this,arguments)}function re(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ae(e){var t=e.channel,n=e.roles,r=e.members,i=e.disabledReason,d=e.getRemoveTooltipHint,c=(0,l.useStateFromStores)([O.default],(function(){return O.default.enabled}));function y(e,n,r){u.default.show({title:X.default.Messages.SETTINGS_PERMISSIONS_DELETE_TITLE,body:X.default.Messages.SETTINGS_PERMISSIONS_DELETE_BODY.format({name:n}),cancelText:X.default.Messages.CANCEL,onConfirm:function(){return function(e,n){if(t.isGuildStageVoice()){var r=(0,v.removeModeratorOverwrite)(e,n===W.RowType.ROLE?p.PermissionOverwriteType.ROLE:p.PermissionOverwriteType.MEMBER,t);(0,v.isEmptyOverwrite)(r)?s.default.clearPermissionOverwrite(t.id,r.id):(0,f.savePermissionUpdates)(t.id,[r])}else s.default.clearPermissionOverwrite(t.id,e)}(e,r)}})}return re(x.default,{className:J.default.roleMemberList,sections:[n.length,r.length],renderRow:function(e){var t,l,u,s=e.section,f=e.row,p=!1;switch(s){case W.AddMembersSections.ROLES:u=n[f],l=a.createElement(a.Fragment,null,re("div",{className:J.default.rowHeight},void 0,re(j.default,{color:u.colorString,height:20})),re(H.default,{className:J.default.rowLabel,color:u.disabled?H.default.Colors.MUTED:H.default.Colors.STANDARD},void 0,u.name)),p=u.disabled;break;case W.AddMembersSections.MEMBERS:u=r[f],l=a.createElement(a.Fragment,null,re(B.default,{src:u.avatarURL,size:B.default.Sizes.SIZE_24,"aria-label":u.name}),re(H.default,{className:J.default.rowLabel},void 0,u.name),u.bot&&re(T.default,{verified:u.verifiedBot,className:J.default.rowBotTag}),!c&&re(H.default,{color:H.default.Colors.MUTED,className:J.default.rowLabelSubText},void 0,u.userTag)),p=u.disabled;break;default:u=null}return null!=u?re(M.default,{justify:M.default.Justify.BETWEEN,align:M.default.Align.CENTER,className:J.default.memberRow},u.id,re(M.default,{justify:M.default.Justify.START,align:M.default.Align.CENTER,className:J.default.memberRowBody},void 0,l),re(H.default,{color:H.default.Colors.MUTED,size:H.default.Sizes.SIZE_12},void 0,Y.getRowTypeLabel(u.rowType)),u.rowType!==W.RowType.EMPTY_STATE&&re(A.TooltipContainer,{className:J.default.removeIconContainer,text:null!=i?i:d(u.rowType,u.disabled)},void 0,re(b.default,{onClick:function(){return!p&&null==i&&null!=u&&u.id&&y(u.id,u.name,u.rowType)}},void 0,re(D.default,{className:(0,o.default)(J.default.removeIcon,(t={},t[J.default.disabledRemoveIcon]=p||i,t))})))):null},rowHeight:40,renderSection:function(e){switch(e.section){case W.AddMembersSections.ROLES:return re(le,{title:X.default.Messages.ROLES},"roles-title");case W.AddMembersSections.MEMBERS:return re(le,{title:X.default.Messages.MEMBERS},"members-title")}},sectionHeight:49})}function oe(e){var t=e.guild,n=e.channel,r=e.permissionUpdates,i=Y.getExistingRolesRowWithPermissionDisabled(t,n,y.MODERATE_STAGE_CHANNEL_PERMISSIONS,r),u=(0,l.useStateFromStores)([E.default],(function(){return Y.getExistingMembersRows(E.default.getMemberIds(t.id),n,t,y.MODERATE_STAGE_CHANNEL_PERMISSIONS,r)})),s=(0,v.useCanUpdateStageChannelModerators)(n.id);function d(){(0,F.openModal)((function(e){return a.createElement(_.default,ne({},e,{channelId:n.id}))}))}return re("div",{className:(0,o.default)(J.default.settingCard,J.default.active)},void 0,re($.default,{label:X.default.Messages.CHANNEL_PERMISSIONS_MODERATOR_TITLE,description:X.default.Messages.CHANNEL_PERMISSIONS_MODERATOR_DESCRIPTION,icon:re(k.default,{className:J.default.cardIcon,height:20,width:20}),id:"StageModeratorSettingCard"}),re("div",{className:J.default.cardFolder},void 0,re(M.default,{justify:M.default.Justify.BETWEEN,align:M.default.Align.CENTER,className:J.default.folderHeader},void 0,re(L.default,{tag:L.default.Tags.H5,className:J.default.folderTitle},void 0,X.default.Messages.CHANNEL_PERMISSIONS_MODERATOR_LABEL),re(A.default,{text:X.default.Messages.CHANNEL_PERMISSIONS_NOT_MODERATOR,shouldShow:!s},void 0,(function(e){return a.createElement(C.default,ne({},e,{size:C.default.Sizes.SMALL,color:C.default.Colors.BRAND,onClick:d,disabled:!s}),X.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE)}))),re(ae,{channel:n,roles:i,members:u,disabledReason:s?null:X.default.Messages.CHANNEL_PERMISSIONS_NOT_MODERATOR,getRemoveTooltipHint:m.getRemoveModeratorTooltipHint})))}function ie(e){var t,n=e.guild,r=e.channel,u=e.isPrivateGuildChannel,s=e.roles,d=e.members,f=(0,l.useStateFromStores)([S.default],(function(){return S.default.can(i.Permissions.ADMINISTRATOR,n)})),c=V.default.canEveryoneRole(i.Permissions.VIEW_CHANNEL,n),p=V.default.canEveryoneRole(i.Permissions.ADMINISTRATOR,n);var v={title:X.default.Messages.PRIVATE_CHANNEL,subtitle:X.default.Messages.CHANNEL_PERMISSIONS_PRIVATE_CHANNEL_DESCRIPTION,formLabel:X.default.Messages.FORM_LABEL_CHANNEL_PERMISSIONS};return r.isCategory()?(v.title=X.default.Messages.PRIVATE_CATEGORY,v.subtitle=X.default.Messages.CHANNEL_PERMISSIONS_PRIVATE_CATEGORY_DESCRIPTION,v.formLabel=X.default.Messages.FORM_LABEL_CATEGORY_PERMISSIONS):r.type===q.ChannelTypes.GUILD_VOICE&&(v.subtitle=X.default.Messages.CHANNEL_PERMISSIONS_PRIVATE_CHANNEL_DESCRIPTION_VOICE),re("div",{className:(0,o.default)(J.default.settingCard,(t={},t[J.default.active]=u,t))},void 0,re($.default,{description:v.subtitle,icon:re(w.default,{className:J.default.cardIcon,height:20,width:20}),id:"PrivateChannelSettingCard",label:v.title,onChange:function(){var e=r.accessPermissions;if(Y.toggleChannelEveryonePermission(r,e,u),!u){var t=I.default.getCurrentUser();(null==n?void 0:n.isOwner(t))||f||Y.grantUserChannelAccess(r,e)}},value:u}),re("div",{className:J.default.cardFolder},void 0,p&&re("div",{className:J.default.adminWarning},void 0,re(N.default,{messageType:N.HelpMessageTypes.WARNING},void 0,X.default.Messages.CHANNEL_PERMISSIONS_EVERYONE_IS_ADMIN_WARNING)),!c&&!p&&!u&&re("div",{className:J.default.adminWarning},void 0,re(N.default,{messageType:N.HelpMessageTypes.WARNING},void 0,X.default.Messages.CHANNEL_PERMISSIONS_EVERYONE_CAN_NOT_VIEW_WARNING)),u&&a.createElement(a.Fragment,null,re(M.default,{justify:M.default.Justify.BETWEEN,align:M.default.Align.CENTER,className:J.default.folderHeader},void 0,re(L.default,{tag:L.default.Tags.H5,className:J.default.folderTitle},void 0,v.formLabel),re(C.default,{size:C.default.Sizes.SMALL,color:C.default.Colors.BRAND,onClick:function(){(0,F.openModal)((function(e){return a.createElement(z.default,ne({},e,{channelId:r.id,inSettings:!0}))}))}},void 0,X.default.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE)),re(ae,{channel:r,roles:s,members:d,getRemoveTooltipHint:Y.getRemoveTooltipHint}))))}function le(e){var t=e.title;return re("div",{},void 0,re(P.FormDivider,{className:J.default.divider}),re(L.default,{className:(0,o.default)(J.default.folderTitle,J.default.sectionTitle),tag:L.default.Tags.H5},void 0,t))}ae.displayName="RolesMembersList",oe.displayName="StageModeratorSettingCard",ie.displayName="PrivateChannelSettingCard",le.displayName="SectionTitle";var ue=re(K.default,{});var se=l.default.connectStores([h.default,S.default,E.default,g.default],(function(){var e,t=h.default.channel,n=h.default.category,r=[],a=[],o={},l=!1;if(null!=t){var u;e=g.default.getGuild(t.getGuildId());var s=E.default.getMemberIds(null===(u=e)||void 0===u?void 0:u.id);null!=e&&(o=h.default.editedPermissionIds.reduce((function(e,t){var n=h.default.getPermissionOverwrite(t);return null!=n&&(e[t]=n),e}),{}),r=Y.getExistingRolesRows(e,t,t.viewPermission,o),a=Y.getExistingMembersRows(s,t,e,t.viewPermission,o),l=Y.isPrivateGuildChannel(t,o))}return{canSyncChannel:null!=n&&S.default.can(i.Permissions.MANAGE_ROLES,n),category:n,channel:t,filteredMembers:a,filteredRoles:r,guild:e,isPrivateGuildChannel:l,locked:h.default.locked,permissionUpdates:o}}))((function(e){var t=e.canSyncChannel,n=e.category,r=e.channel,o=e.filteredMembers,l=e.filteredRoles,u=e.guild,s=e.isPrivateGuildChannel,f=e.locked,p=e.permissionUpdates,v=a.useState(!V.default.canEveryoneRole(i.Permissions.SEND_MESSAGES,r));if(v[0],v[1],null==r||null==u)return null;function y(){null!=n&&(0,F.openModal)((function(e){return a.createElement(c.default,ne({},e,{channel:r,category:n,onConfirm:function(){var e=n.guild_id,t=ne({},n.permissionOverwrites);null!=e&&null==t[e]&&(t[e]=V.default.makeEveryoneOverwrite(e)),(0,d.saveChannel)(r.id,{permissionOverwrites:Object.values(t)})}}))}))}var m={title:X.default.Messages.CHANNEL_PERMISSIONS,subtitle:X.default.Messages.CHANNEL_PERMISSIONS_SUBTITLE};return r.isCategory()&&(m.title=X.default.Messages.CATEGORY_SETTINGS,m.subtitle=X.default.Messages.CATEGORY_PERMISSIONS_SUBTITLE),a.createElement(a.Fragment,null,re(L.default,{tag:L.default.Tags.H1},void 0,m.title),re(R.default,{},void 0,m.subtitle),null!=n&&t?re(Z.default,f?{canSync:!1,icon:U.default,noticeText:X.default.Messages.CHANNEL_LOCKED_TO_CATEGORY.format({categoryName:n.name})}:{buttonText:X.default.Messages.SYNC_NOW,canSync:!0,icon:G.default,noticeText:X.default.Messages.PERMISSIONS_UNSYNCED.format({categoryName:n.name}),onClick:y}):null,r.isGuildStageVoice()?re(oe,{guild:u,channel:r,permissionUpdates:p}):null,re(ie,{channel:r,guild:u,isPrivateGuildChannel:s,roles:l,members:o}),!1,ue)}));t.default=se},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n)}(n(0));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var i=o("polygon",{points:"0 0 18 0 18 18 0 18"});function l(e){var t=e.width,n=void 0===t?18:t,r=e.height,a=void 0===r?18:r,l=e.color,u=void 0===l?"currentColor":l,s=e.foreground,d=e.background;return o("svg",{width:n,height:a,className:e.className,viewBox:"0 0 18 18"},void 0,o("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},void 0,i,o("path",{d:"M2.25,9 C2.25,10.6575 2.9325,12.15 4.02,13.23 L2.25,15 L6.75,15 L6.75,10.5 L5.07,12.18 C4.26,11.3625 3.75,10.245 3.75,9 C3.75,7.0425 5.0025,5.3775 6.75,4.7625 L6.75,3.195 C4.1625,3.8625 2.25,6.2025 2.25,9 Z M15.75,3 L11.25,3 L11.25,7.5 L12.93,5.82 C13.74,6.6375 14.25,7.755 14.25,9 C14.25,10.9575 12.9975,12.6225 11.25,13.2375 L11.25,14.805 C13.8375,14.1375 15.75,11.7975 15.75,9 C15.75,7.3425 15.0675,5.85 13.98,4.77 L15.75,3 Z",fillOpacity:"0.3",fill:u,fillRule:"nonzero",className:d}),o("path",{d:"M8.25,12.75 L8.25,11.25 L9.75,11.25 L9.75,12.75 L8.25,12.75 Z M8.25,9.75 L8.25,5.25 L9.75,5.25 L9.75,9.75 L8.25,9.75 Z",fill:u,className:s})))}l.displayName="Unsynced"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,i.useStateFromStores)([s.default],(function(){return s.default.advancedMode})),t=a.useState(e?new o.default.Value(1):new o.default.Value(0))[0];return a.createElement(a.Fragment,null,h(f.FormDivider,{className:y.default.advancedModeDivider}),h(d.default,{look:d.default.Looks.BLANK,color:d.default.Colors.TRANSPARENT,onClick:function(){e?o.default.timing(t,{toValue:0,duration:250}).start((function(){(0,l.setAdvancedMode)(!1)})):((0,l.setAdvancedMode)(!0),o.default.timing(t,{toValue:1,duration:250}).start())}},void 0,h(c.default,{tag:c.default.Tags.H1,className:y.default.advancedTitle},void 0,v.default.Messages.CHANNEL_PERMISSIONS_ADVANCED_PERMISSIONS,h(p.default,{expanded:e,className:y.default.titleCaret,width:20,height:20}))),e&&h(o.default.div,{style:{opacity:t}},void 0,E))};var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=m(n(273)),i=n(3),l=n(8481),u=m(n(10492)),s=m(n(9247)),d=m(n(29)),f=n(131),c=m(n(159)),p=m(n(683)),v=m(n(6)),y=m(n(8201));function m(e){return e&&e.__esModule?e:{default:e}}function _(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _=function(){return e},e}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=h(u.default,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=_(n(9)),i=_(n(3)),l=_(n(105)),u=_(n(61)),s=_(n(282)),d=_(n(278)),f=_(n(1210)),c=n(393),p=_(n(264)),v=n(1),y=_(n(6)),m=_(n(8197));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){switch(e){case d.default.Positions.BOTTOM:return m.default.positionBottom;default:return m.default.positionTop}}var C=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).inputRef=a.createRef(),t.state={query:null,selectedSection:null,selectedRow:0},t.memoizedGetRows=(0,c.cachedFunction)((function(e,t,n){var r=new RegExp("^"+p.default.escape(null!=e?e.trim():""),"i"),a=function(e){return r.test(e)};return n.map((function(e,n){return t(a,n)}))})),t.getRows=function(){var e=t.props,n=e.onFilterResults,r=e.sections,a=t.state.query;return t.memoizedGetRows(a,n,r)},t.handleChange=function(e){var n=e.target.value;t.props.onQueryChange&&t.props.onQueryChange(n),t.setState({query:n,selectedSection:null,selectedRow:0})},t.handleMouseEnter=function(e,n){t.setState({selectedSection:e,selectedRow:n})},t.handleClick=function(e,n){var r=t.getRows();t.props.onSelect(r[e][n],e),t.props.onClose()},t.handleKeyDown=function(e){var n=t.props.keyboardModeEnabled,r=t.state.selectedRow,a=t.getRows(),o=t.getSelectedSection(a);switch(e.keyCode){case v.KeyboardKeys.TAB:if(n)break;case v.KeyboardKeys.ARROW_DOWN:e.preventDefault(),t.props.sections.length>o&&++r>=a[o].length&&(++o>=t.props.sections.length&&(o=0),r=0),t.setState({selectedSection:o,selectedRow:r});break;case v.KeyboardKeys.ARROW_UP:e.preventDefault(),--r<0&&(--o<0&&(o=t.props.sections.length-1),r=a[o].length-1),t.setState({selectedSection:o,selectedRow:r});break;case v.KeyboardKeys.ENTER:e.preventDefault(),t.props.sections.length>o&&a[o].length>r&&(t.props.onSelect(a[o][r],o),t.props.onClose());break;case v.KeyboardKeys.ESCAPE:e.preventDefault(),t.props.onSelect(null,null),t.props.onClose()}},t.isEmpty=function(){return 0===t.getRows().reduce((function(e,t){return e+t.length}),0)},t.getSectionHeight=function(e){var n=t.props.sections[e];return t.isEmpty()||null==n?0:44},t.renderSection=function(e){var n=e.section,r=t.props.sections[n];return t.isEmpty()||null==r?null:S("div",{className:m.default.section},n,r)},t.renderRow=function(e){var n,r,a=e.section,i=e.row,l=t.state.selectedRow;if(t.isEmpty())return S("div",{className:m.default.empty},"empty",S("h4",{className:m.default.noResultsHeader},void 0,y.default.Messages.AUTOCOMPLETE_NO_RESULTS_HEADER),S("p",{},void 0,y.default.Messages.AUTOCOMPLETE_NO_RESULTS_BODY));var s=t.getRows(),d=t.getSelectedSection(s),f=null===(n=s[a])||void 0===n?void 0:n[i];return S(u.default,{onClick:t.handleClick.bind(O(t),a,i),onMouseEnter:t.handleMouseEnter.bind(O(t),a,i),className:(0,o.default)(m.default.row,(r={},r[m.default.selected]=d===a&&l===i,r))},a+"-"+i,S("div",{className:m.default.rowInner},void 0,t.props.onRenderResult(f,a)))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var i=r.prototype;return i.getSelectedSection=function(e){var t=this.state.selectedSection;if(null!=t)return t;for(var n=0;n<e.length;n++)if(e[n].length>0)return n;return 0},i.componentDidMount=function(){this.focus()},i.render=function(){var e=this.props.position,t=this.getRows(),n=[];if(this.isEmpty())n.push(1);else for(var r,i=E(t);!(r=i()).done;){var l=r.value;n.push(l.length)}return S(s.default,{className:(0,o.default)(m.default.container,T(e)),"aria-label":this.props["aria-label"]},void 0,S("div",{className:m.default.autocompleteShadow}),S("div",{className:m.default.autocompleteArrowWrapper},void 0,S("div",{className:m.default.autocompleteArrow})),S("header",{className:m.default.header},void 0,S("div",{className:m.default.autocompleteHeaderBackground}),S("h3",{className:m.default.headerText},void 0,this.props.label),a.createElement("input",{type:"text",className:m.default.input,placeholder:this.props.placeholder,ref:this.inputRef,onChange:this.handleChange,onKeyDown:this.handleKeyDown})),S("section",{className:m.default.sectionTag},void 0,S(f.default,{className:m.default.autocompleteScroller,fade:!0,sections:n,sectionHeight:this.getSectionHeight,rowHeight:40,renderRow:this.renderRow,renderSection:this.renderSection})))},i.focus=function(){null!=this.inputRef.current&&this.inputRef.current.focus()},r}(a.Component);C.displayName="AutocompletePopout",C.defaultProps={sections:[null]};var b=i.default.connectStores([l.default],(function(){return{keyboardModeEnabled:l.default.keyboardModeEnabled}}))(C);t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=T;var r,a=E(n(0)),o=_(n(9)),i=n(389),l=_(n(8502)),u=E(n(8576)),s=_(n(61)),d=_(n(55)),f=_(n(11720)),c=n(8293),p=_(n(149)),v=_(n(8331)),y=n(1),m=_(n(8199));function _(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function E(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function g(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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}).apply(this,arguments)}var O=g(v.default,{width:20,height:20});function I(e){var t,n=e.role,r=e.guild,l=a.useState(!1),d=l[0],f=l[1];if(!(0,u.useHasGuildRoleItems)(r,n))return null;return g(s.default,{onClick:function(e){f(!0),(0,i.openContextMenu)(e,(function(e){return a.createElement(u.default,S({},e,{role:n,guild:r}))}),{onClose:function(){return f(!1)}})},className:(0,o.default)(m.default.roleOverflow,(t={},t[m.default.open]=d,t))},void 0,O)}function T(e){var t=e.color,r=e.id,o=e.role,u=e.guild,s=e.children,v=e.isDragging,_=e.selectedItem,h=e.onItemSelect,E=e.itemType,O=e.locked,T=e.lockTooltip,C=e.showContextMenu,b=e.theme,M=a.useCallback((function(e){(0,i.openContextMenu)(e,(function(e){return a.createElement(l.default,S({},e,{id:r}))}))}),[r]);return v?g("div",{className:m.default.dragged}):g(c.Item,{className:m.default.role,id:r,color:t||void 0,selectedItem:_,onItemSelect:h,itemType:E,"aria-label":null!=T?s+", "+T:s},void 0,g(d.default,{align:d.default.Align.CENTER},void 0,function(){if(!O)return null;var e=b===y.ThemeTypes.DARK?n(11721):n(11722);return g(d.default,{shrink:0,grow:0,align:d.default.Align.CENTER,style:{marginRight:0}},void 0,g(p.default,{text:T,color:p.default.Colors.RED},void 0,(function(t){return a.createElement(f.default,S({className:m.default.lock,src:e},t))})))}(),g(d.default.Child,{className:m.default.roleInner,onContextMenu:M},void 0,s),C&&null!=o?g(I,{guild:u,role:o}):null))}I.displayName="GuildRoleOverflowIcon",T.displayName="GuildRole"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=l(n(9)),o=n(252),i=l(n(8198));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f={XSMALL:i.default.xsmall,SMALL:i.default.small,MEDIUM:i.default.medium,LARGE:i.default.large},c="default",p="static",v=function(e){var t,n;function l(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={hovered:!1},t.getMode=function(){return null!=t.props.srcHover?p:c},t.handleHover=function(e){var n=t.props.onMouseEnter;n&&n(e),t.state.hovered||t.setState({hovered:!0})},t.handleBlur=function(e){var n=t.props.onMouseLeave;n&&n(e),t.state.hovered&&t.setState({hovered:!1})},t}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),l.prototype.render=function(){var e=this.props,t=e.size,n=e.src,l=e.srcHover,u=e.className,d=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["size","src","srcHover","className"]),f={backgroundImage:"url('"+(this.state.hovered&&l?l:n)+"')"},c=this.getMode();return r.createElement("button",s({className:(0,a.default)((0,o.getClass)(i.default,"iconButton",c),u,t),style:f,onMouseEnter:this.handleHover,onFocus:this.handleHover,onMouseLeave:this.handleBlur,onBlur:this.handleBlur},d))},l}(r.PureComponent);v.displayName="IconButton",v.Sizes=f,v.defaultProps={size:f.MEDIUM,disabled:!1};var y=v;t.default=y},function(e,t,n){e.exports=n.p+"959a1978f7be567071a1354a98b46ecd.svg"},function(e,t,n){e.exports=n.p+"89c5bd0afd63d925ba6a8fcd18eeb530.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showPermissionLockoutModal=function(e){r.default.show({title:i.default.Messages.SELF_DENY_PERMISSION_TITLE,body:i.default.Messages.SELF_DENY_PERMISSION_BODY.format({name:e}),cancelText:i.default.Messages.HELP_DESK,onCancel:function(){window.open(a.default.getArticleURL(o.HelpdeskArticles.PERMISSIONS_LOCKOUT))}})};var r=l(n(154)),a=l(n(93)),o=n(1),i=l(n(6));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=n.p+"cef02719c12d8aaf38894c16dca7fbe6.svg"},function(e,t,n){e.exports=n.p+"808132e382c228d8fc8c7f9111b9abf7.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=u(n(55)),o=u(n(8522)),i=u(n(24)),l=u(n(8202));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e){var t=e.description,n=e.icon,r=e.id,u=e.label,s=e.onChange,f=e.value;return d("div",{className:l.default.cardContent},void 0,d(a.default,{justify:a.default.Justify.BETWEEN,align:a.default.Align.CENTER},void 0,n,d(a.default.Child,{grow:1},void 0,d(i.default,{size:i.default.Sizes.SIZE_16,className:l.default.cardTitle},void 0,u)),null!=s&&null!=f?d(o.default,{id:r,checked:f,onChange:s}):null),d(i.default,{size:i.default.Sizes.SIZE_12,color:i.default.Colors.STANDARD,className:l.default.cardDescription},void 0,t))}f.displayName="PermissionSettingCard"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=d(n(29)),o=d(n(467)),i=d(n(55)),l=d(n(24)),u=n(1),s=d(n(8203));function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var p=function(e){var t=e.icon,n=e.noticeText,r=e.buttonText,d=e.onClick,f=e.canSync;return c(o.default,{className:s.default.card},void 0,c(i.default,{justify:i.default.Justify.BETWEEN,align:i.default.Align.CENTER},void 0,c(t,{width:20,height:20,color:u.Colors.STATUS_YELLOW}),c("div",{className:s.default.label},void 0,c(l.default,{size:l.default.Sizes.SIZE_16},void 0,n)),f&&c(a.default,{size:a.default.Sizes.SMALL,color:a.default.Colors.GREY,onClick:d},void 0,r)))};p.displayName="SyncStatusCard";var v=p;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=y,t.ChannelSettingsIntegrationsNotice=m;!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(0));var r,a=n(3),o=c(n(8317)),i=c(n(8292)),l=c(n(9177)),u=c(n(10493)),s=c(n(8711)),d=c(n(15)),f=c(n(39));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.refToScroller,n=(0,a.useStateFromStores)([s.default],(function(){return s.default.getProps()}),[]).channel,r=(0,a.useStateFromStores)([d.default],(function(){return null!=n?d.default.getGuild(n.getGuildId()):null}),[n]),o=(0,a.useStateFromStores)([u.default],(function(){return u.default.getProps()}),[]),i=o.section,f=o.webhooks,c=o.editedWebhook,p=o.isFetching,y=o.errors;return null==r||null==n?null:v(l.default,{guild:r,channel:n,section:i,webhooks:f,editedWebhook:c,isFetching:p,hasChanges:u.default.hasChanges,errors:y,refToScroller:t})}function m(){var e=(0,a.useStateFromStores)([s.default],(function(){return s.default.getProps()})),t=e.channel,n=e.submitting,r=(0,a.useStateFromStores)([d.default],(function(){return null!=t?d.default.getGuild(t.getGuildId()):null}),[t]),l=(0,a.useStateFromStores)([f.default],(function(){return f.default.theme}));return v(i.default,{theme:l,submitting:n,onReset:function(){o.default.init()},onSave:function(){null!=r&&null!=u.default.editedWebhook&&o.default.saveWebhook(r.id,u.default.editedWebhook)}})}y.displayName="ChannelSettingsIntegrations",m.displayName="ChannelSettingsIntegrationsNotice"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(3)),a=f(n(9178)),o=f(n(8711)),i=f(n(15)),l=f(n(40)),u=f(n(160)),s=f(n(39)),d=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=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}).apply(this,arguments)}var p=r.default.connectStores([o.default,s.default,u.default,i.default,l.default],(function(){var e=o.default.getProps().channel;return c({channel:e,guild:null!=e?i.default.getGuild(e.getGuildId()):null,theme:s.default.theme,hide:u.default.hideInstantInvites,canCreateInvites:null!=e&&l.default.can(d.Permissions.CREATE_INSTANT_INVITE,e)},o.default.getInvites())}))(a.default);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=W,t.ChannelSettingsOverviewNotice=void 0;var r,a=F(n(0)),o=U(n(9)),i=F(n(3)),l=n(8330),u=U(n(8664)),s=U(n(8292)),d=U(n(1331)),f=U(n(185)),c=U(n(180)),p=n(8566),v=n(392),y=n(1209),m=U(n(10453)),_=n(31),h=U(n(8711)),E=U(n(15)),g=U(n(40)),S=U(n(8665)),O=U(n(39)),I=U(n(55)),T=U(n(1162)),C=U(n(1159)),b=U(n(8360)),M=U(n(8267)),N=U(n(8272)),A=U(n(153)),P=n(131),R=n(292),L=U(n(93)),D=n(11731),w=n(1),j=U(n(6)),k=U(n(370));function U(e){return e&&e.__esModule?e:{default:e}}function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function F(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function B(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=i.default.connectStores([h.default],(function(){var e=h.default.getProps(),t=e.channel,n=e.submitting;return{channel:t,submitting:n,onReset:function(){null!=t&&(0,l.init)(t.id)},onSave:function(){if(null!=t){var e=t.name,n=t.type,r=t.topic,a=t.bitrate,o=t.userLimit,i=t.nsfw,u=t.rateLimitPerUser,s=t.threadMetadata,d=t.defaultAutoArchiveDuration,f=t.rtcRegion,c=t.videoQualityMode;t.isThread()&&(e=(0,m.default)(e,!0)),(0,l.saveChannel)(t.id,{name:e,type:n,topic:r,bitrate:a,userLimit:o,nsfw:i,rateLimitPerUser:u,autoArchiveDuration:null==s?void 0:s.autoArchiveDuration,defaultAutoArchiveDuration:d,rtcRegion:f,videoQualityMode:c})}}}}))(s.default);t.ChannelSettingsOverviewNotice=x;var V=function(e){var t,r;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleChangeName=function(e){var n=t.props.channel;null!=n&&(n.isThread()?e=(0,m.default)(e,!1):(0,_.isGuildTextChannelType)(n.type)&&(e=(0,R.sanitizeGuildTextChannelName)(e)),(0,l.updateChannel)({name:e}))},t.handleBlurName=function(){var e=t.props,n=e.channel,r=e.channelName;if((null==n?void 0:n.isThread())&&null!=r){var a=(0,m.default)(r,!0);a!==r&&(0,l.updateChannel)({name:a})}},t.handleChangeTopic=function(e){(0,l.updateChannel)({topic:f.default.translateInlineEmojiToSurrogates(e)})},t.handleChangeBitrate=function(e){(0,l.updateChannel)({bitrate:1e3*Math.round(e/1e3)})},t.handleUserLimitChange=function(e){(0,l.updateChannel)({userLimit:Math.round(e)})},t.handleNSFWChange=function(e){(0,l.updateChannel)({nsfw:e})},t.handleNewsChange=function(e){(0,l.updateChannel)({type:e?w.ChannelTypes.GUILD_ANNOUNCEMENT:w.ChannelTypes.GUILD_TEXT})},t.handleChangeSlowmode=function(e){(0,l.updateChannel)({rateLimitPerUser:e})},t.handleChangeDefaultAutoArchiveDuration=function(e){(0,l.updateChannel)({defaultAutoArchiveDuration:e})},t.handleRegionChange=function(e){var t=e.value;(0,l.updateChannel)({rtcRegion:"AUTOMATIC_RTC_REGION"===t?null:t})},t.handleVideoQualityModeChange=function(e){(0,l.updateChannel)({videoQualityMode:e})},t.handleAutoArchiveDurationChanged=function(e){(0,l.updateChannel)({autoArchiveDuration:e})},t}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,H(t,r);var i=a.prototype;return i.componentDidMount=function(){null==this.props.regions&&null!=this.props.guild&&u.default.fetchRegions(this.props.guild.id)},i.getError=function(e){var t=this.props.errors;return t&&t[e]?t[e]:""},i.getCooldownSliderMarker=function(e){return(0,D.getSecondsSliderLabel)(e,!0)},i.getAutoArchiveDurationSliderMarker=function(e){return(0,D.getSecondsSliderLabel)(e*w.Durations.MINUTE,!0)},i.renderChannelInfo=function(e,t){var n,r,a,i=this.props,l=i.canSeeThreads,u=i.canManageChannels,s=i.isThreadModerator,d=i.guild,c=_.THREAD_CHANNEL_TYPES.has(e.type),y=(0,_.isGuildTextChannelType)(e.type)&&!c?B("div",{},void 0,B(P.FormItem,{title:j.default.Messages.FORM_LABEL_CHANNEL_TOPIC,className:k.default.marginTop20},void 0,B(N.default,{placeholder:j.default.Messages.CHANNEL_TOPIC_EMPTY,value:f.default.translateSurrogatesToInlineEmoji(e.topic),onChange:this.handleChangeTopic,error:this.getError("topic"),maxLength:1024,disabled:!u,autosize:!0})),B(P.FormDivider,{className:(0,o.default)(k.default.marginTop40,k.default.marginBottom40)})):null,m=c?s:u,h=e.type===w.ChannelTypes.GUILD_TEXT||c?B("div",{},void 0,B(P.FormItem,{title:j.default.Messages.FORM_LABEL_SLOWMODE},void 0,B(b.default,{className:k.default.marginTop20,initialValue:e.rateLimitPerUser,markers:w.SLOWMODE_VALUES,stickToMarkers:!0,onValueChange:this.handleChangeSlowmode,onMarkerRender:this.getCooldownSliderMarker,disabled:!m,equidistant:!0}),B(P.FormText,{type:P.FormText.Types.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_SLOWMODE)),B(P.FormDivider,{className:(0,o.default)(k.default.marginTop40,k.default.marginBottom40)})):null,E=c?B("div",{},void 0,B(P.FormItem,{title:j.default.Messages.FORM_THREAD_AUTO_ARCHIVE_SECTION_LABEL},void 0,B(b.default,{className:k.default.marginTop20,initialValue:null!==(n=null===(r=e.threadMetadata)||void 0===r?void 0:r.autoArchiveDuration)&&void 0!==n?n:v.DEFAULT_AUTO_ARCHIVE_DURATION,markers:(0,p.getAutoArchiveDurations)(d),stickToMarkers:!0,onValueChange:this.handleAutoArchiveDurationChanged,onMarkerRender:this.getAutoArchiveDurationSliderMarker,disabled:!u,equidistant:!0})),B(P.FormText,{type:P.FormText.Types.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_AUTO_ARCHIVE_DURATION),B(P.FormDivider,{className:(0,o.default)(k.default.marginTop40,k.default.marginBottom40)})):null,g=(0,_.isGuildTextChannelType)(e.type)&&!c?B("div",{},void 0,B(M.default,{note:j.default.Messages.FORM_HELP_NSFW,onChange:this.handleNSFWChange,value:e.isNSFW(),hideBorder:!0,disabled:!u},void 0,j.default.Messages.FORM_LABEL_NSFW_CHANNEL)):null,S=(0,_.isGuildTextChannelType)(e.type)&&!c&&null!=d&&d.hasFeature(w.GuildFeatures.NEWS)&&e.id!==(null==d?void 0:d.rulesChannelId)&&e.id!==(null==d?void 0:d.publicUpdatesChannelId)?B("div",{},void 0,B(M.default,{note:j.default.Messages.FORM_HELP_NEWS.format({documentationLink:L.default.getArticleURL(w.HelpdeskArticles.ANNOUNCEMENT_CHANNELS)}),onChange:this.handleNewsChange,value:e.type===w.ChannelTypes.GUILD_ANNOUNCEMENT,hideBorder:!0,disabled:!u},void 0,j.default.Messages.FORM_LABEL_NEWS_CHANNEL)):null,O=l&&_.THREADED_CHANNEL_TYPES.has(e.type)?B("div",{},void 0,B(P.FormDivider,{className:(0,o.default)(k.default.marginTop40,k.default.marginBottom40)}),B(P.FormItem,{title:j.default.Messages.FORM_THREAD_AUTO_ARCHIVE_SECTION_LABEL},void 0,B(b.default,{className:k.default.marginTop20,initialValue:(0,p.getAutoArchiveDuration)(e,d,null),markers:(0,p.getAutoArchiveDurations)(d),stickToMarkers:!0,onValueChange:this.handleChangeDefaultAutoArchiveDuration,onMarkerRender:this.getAutoArchiveDurationSliderMarker,disabled:!u,equidistant:!0}),B(P.FormText,{type:P.FormText.Types.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_DEFAULT_AUTO_ARCHIVE_DURATION))):null;return a=e.type===w.ChannelTypes.GUILD_CATEGORY?j.default.Messages.CATEGORY_NAME:c?j.default.Messages.THREAD_NAME:j.default.Messages.FORM_LABEL_CHANNEL_NAME,B("div",{},void 0,B(P.FormItem,{title:a},void 0,B(A.default,{value:t,onChange:this.handleChangeName,onBlur:this.handleBlurName,error:this.getError("name"),autoFocus:!0,disabled:!u,maxLength:w.MAX_CHANNEL_NAME_LENGTH})),c?B(P.FormDivider,{className:(0,o.default)(k.default.marginTop40,k.default.marginBottom40)}):null,y,h,E,g,S,O)},i.renderBitrate=function(e){return Math.round(e/1e3)+"kbps"},i.renderVoiceBitrate=function(e,t){var n=this.props.canManageChannels;if(!e.isVocal())return null;var r=(0,R.getBitrateLimit)(t,e);return B(I.default,{direction:I.default.Direction.VERTICAL,className:k.default.marginBottom40},void 0,B(P.FormTitle,{},void 0,j.default.Messages.FORM_LABEL_BITRATE),B(P.FormText,{type:P.FormTextTypes.DESCRIPTION,style:{color:w.Colors.STATUS_RED},className:k.default.marginBottom8},void 0,this.getError("bitrate")),B(b.default,{initialValue:Math.min(e.bitrate,r),onValueChange:this.handleChangeBitrate,onValueRender:this.renderBitrate,onMarkerRender:this.renderBitrate,markers:[w.BITRATE_MIN,w.BITRATE_DEFAULT,r],minValue:w.BITRATE_MIN,maxValue:r,keyboardStep:w.BITRATE_STEP,disabled:!n}),r>w.BITRATE_DEFAULT?B(P.FormText,{type:P.FormTextTypes.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_BITRATE.format({bitrate:w.BITRATE_DEFAULT/1e3})):null)},i.renderVideoQualityMode=function(e){var t,n=this,r=this.props.canManageChannels;if(!e.isGuildVoice())return null;var a=[{value:w.VideoQualityMode.AUTO,name:j.default.Messages.VIDEO_QUALITY_MODE_AUTO},{value:w.VideoQualityMode.FULL,name:j.default.Messages.VIDEO_QUALITY_MODE_FULL}];return B(I.default,{direction:I.default.Direction.VERTICAL,className:k.default.marginBottom40},void 0,B(P.FormItem,{title:j.default.Messages.FORM_LABEL_VIDEO_QUALITY},void 0,B(T.default,{onChange:function(e){var t=e.value;return n.handleVideoQualityModeChange(t)},options:a,value:null!==(t=e.videoQualityMode)&&void 0!==t?t:w.VideoQualityMode.AUTO,disabled:!r})),B(P.FormText,{type:P.FormTextTypes.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_VIDEO_QUALITY_MODE.format()))},i.onRenderUserLimit=function(e){return 0===(e=Math.round(e))?j.default.Messages.NO_USER_LIMIT:j.default.Messages.NUM_USERS.format({num:e})},i.renderUserLimit=function(e){var t=this.props.canManageChannels;return e.isGuildVoice()?B(I.default,{direction:I.default.Direction.VERTICAL,className:k.default.marginBottom40},void 0,B(P.FormTitle,{},void 0,j.default.Messages.FORM_LABEL_USER_LIMIT),B(P.FormText,{type:P.FormTextTypes.DESCRIPTION,style:{color:w.Colors.STATUS_RED},className:k.default.marginBottom8},void 0,this.getError("user_limit")),B(b.default,{initialValue:Math.min(e.userLimit,w.MAX_VOICE_USER_LIMIT),onValueChange:this.handleUserLimitChange,onValueRender:this.onRenderUserLimit,onMarkerRender:function(e){return 0===Math.round(e)?"∞":e},markers:[0,w.MAX_VOICE_USER_LIMIT],minValue:0,maxValue:w.MAX_VOICE_USER_LIMIT,disabled:!t}),B(P.FormText,{type:P.FormTextTypes.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_USER_LIMIT.format())):null},i.renderRegionOverride=function(e){var t=this.props,n=t.regions,r=t.canManageChannels,a=t.guild;if(!a)return null;if(!d.default.getCurrentConfig({guildId:a.id}).useGuildVoiceChannelLatencyRouting||!e.isVocal())return null;var o=[];n&&(o=n.filter((function(e){return!e.deprecated})).map((function(e){return{label:e.name,value:e.id}}))).unshift({label:j.default.Messages.AUTOMATIC_REGION,value:"AUTOMATIC_RTC_REGION"});var i=e.rtcRegion||"AUTOMATIC_RTC_REGION";return B(I.default,{direction:I.default.Direction.VERTICAL},void 0,B(P.FormTitle,{},void 0,j.default.Messages.FORM_LABEL_REGION_OVERRIDE),B(C.default,{options:o,value:i,onChange:this.handleRegionChange,disabled:!r}),B(P.FormText,{type:P.FormTextTypes.DESCRIPTION},void 0,j.default.Messages.FORM_HELP_REGION_OVERRIDE))},i.renderJuiceImage=function(e){var t,r=this.props.theme;return t=e.type===w.ChannelTypes.GUILD_CATEGORY?r===w.ThemeTypes.DARK?n(11732):n(11733):r===w.ThemeTypes.DARK?n(11734):n(11735),B(I.default,{justify:I.default.Justify.CENTER,className:k.default.marginTop60},void 0,B("img",{alt:"",width:280,height:165,src:t}))},i.render=function(){var e=this.props,t=e.channel,n=e.channelName,r=e.guild;return null==t||null==n||null==r?null:B(P.FormSection,{className:"channel-settings-overview",tag:P.FormTitleTags.H2,title:j.default.Messages.OVERVIEW},void 0,this.renderChannelInfo(t,n),t.isVocal()?B(P.FormDivider,{className:(0,o.default)(k.default.marginTop40,k.default.marginBottom40)}):null,this.renderVoiceBitrate(t,r),this.renderVideoQualityMode(t),this.renderUserLimit(t),this.renderRegionOverride(t),this.renderJuiceImage(t))},a}(a.PureComponent);function W(){var e=(0,i.useStateFromStores)([h.default],(function(){return h.default.getProps()})),t=e.errors,n=e.channel,r=e.submitting,a=(0,i.useStateFromStores)([S.default],(function(){var e;return S.default.getRegions(null!==(e=null==n?void 0:n.getGuildId())&&void 0!==e?e:null)})),o=(0,i.useStateFromStores)([O.default],(function(){return O.default.theme})),l=(0,i.useStateFromStores)([E.default],(function(){return E.default.getGuild(null==n?void 0:n.getGuildId())})),u=(0,y.useCanSeeThreadsInChannel)(n),s=(0,y.useCanManageThread)(n),d=(0,y.useIsThreadModerator)(n),f=(0,i.useStateFromStores)([g.default],(function(){return g.default.can(w.Permissions.MANAGE_CHANNELS,n)})),p=(0,c.default)(n);return B(V,{errors:t,channel:n,channelName:p,submitting:r,regions:a,theme:o,guild:l,canSeeThreads:u,canManageChannels:(null==n?void 0:n.isThread())?s:f,isThreadModerator:d})}V.displayName="ChannelSettingsOverview",W.displayName="ConnectedChannelSettingsOverview"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSecondsSliderLabel=function(e,t,n){void 0===t&&(t=!0);void 0===n&&(n=a.default.Messages.FORM_LABEL_OFF);var o=r.default.duration(e,"seconds");return o.days()>0?(t?a.default.Messages.DURATION_DAYS_SHORT:a.default.Messages.DURATION_DAYS).format({days:o.days()}):o.hours()>0?(t?a.default.Messages.DURATION_HOURS_SHORT:a.default.Messages.DURATION_HOURS).format({hours:o.hours()}):o.minutes()>0?(t?a.default.Messages.DURATION_MINUTES_SHORT:a.default.Messages.DURATION_MINUTES).format({minutes:o.minutes()}):e>0?(t?a.default.Messages.DURATION_SECONDS_SHORT:a.default.Messages.DURATION_SECONDS).format({seconds:o.seconds()}):t?a.default.Messages.FORM_LABEL_OFF:n};var r=o(n(5)),a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=n.p+"58957d928db6fb9d4658eb882f33d7bc.svg"},function(e,t,n){e.exports=n.p+"c2c982c416a67d43d72d182f079a8d22.svg"},function(e,t,n){e.exports=n.p+"bfffd518c76d3f6bc5e96eb52e4ae2cf.svg"},function(e,t,n){e.exports=n.p+"9ad4d437577c5569dc231a787a5377f6.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=P(n(0)),o=N(n(8)),i=N(n(3)),l=n(34),u=n(744),s=N(n(8575)),d=n(8305),f=N(n(105)),c=N(n(10)),p=N(n(56)),v=N(n(94)),y=P(n(1292)),m=N(n(39)),_=N(n(12)),h=N(n(55)),E=N(n(279)),g=N(n(47)),S=N(n(11737)),O=N(n(11739)),I=N(n(11740)),T=N(n(11741)),C=n(1),b=N(n(6)),M=N(n(7394));function N(e){return e&&e.__esModule?e:{default:e}}function A(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return A=function(){return e},e}function P(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=A();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var D=function(e,t,n){return L(h.default,{align:h.default.Align.CENTER},void 0,L(h.default.Child,{},void 0,L(h.default,{align:h.default.Align.CENTER},void 0,L(E.default,{size:E.default.Sizes.SIZE_24,src:e.getAvatarURL(n||void 0),"aria-label":e.username,className:M.default.avatar}),L("span",{className:M.default.username},void 0,null!=t?t:e.toString()))))};D.displayName="UserItem";var w=function(e){return L(h.default,{align:h.default.Align.CENTER},void 0,L(h.default.Child,{},void 0,L(h.default,{align:h.default.Align.CENTER},void 0,L("span",{className:M.default.username},void 0,e))))};function j(e,t,n,r,a){var i=[];if(null==t)return i;var l=t.transport,s=t.rtp,f=s.inbound,c=s.outbound;return i.push({section:d.SectionTypes.HEADER,label:b.default.Messages.RTC_DEBUG_CONTEXT.format({context:e})}),null!=l&&i.push({section:(0,y.keySection)(e,C.RTCDebugSections.TRANSPORT,n),label:b.default.Messages.RTC_DEBUG_TRANSPORT,element:T.default,elementProps:{context:e,index:n}}),null!=c&&i.push({section:(0,y.keySection)(e,C.RTCDebugSections.OUTBOUND,n),label:b.default.Messages.RTC_DEBUG_RTP_OUTBOUND,element:O.default,elementProps:{context:e,index:n}}),null==f||o.default.isEmpty(f)||(i.push({section:d.SectionTypes.HEADER,label:b.default.Messages.RTC_DEBUG_RTP_INBOUND}),Object.keys(f).forEach((function(t){var o=_.default.getUser(t),l=p.default.getNick(a,t),s=(0,y.keySection)(e,t,n);i.push({section:s,label:null!=o?D(o,l,a):w(null!=l?l:t),ariaLabel:null!=o?o.tag:t,onClick:function(){(0,u.setSection)(s)},element:S.default,elementProps:{context:e,index:n,videoStreams:r}})}))),i}function k(e,t,n,r,a){var o=e.flatMap((function(e,t){return j(l.MediaEngineContextTypes.DEFAULT,e,t,n,null==a?void 0:a.getGuildId())})),i=t.flatMap((function(e,t){return j(l.MediaEngineContextTypes.STREAM,e,t,n,null==a?void 0:a.getGuildId())})),u=[],s={section:d.SectionTypes.DIVIDER};null!=r&&(u.push(s),u.push({section:C.RTCDebugSections.SCREENSHARE,label:b.default.Messages.RTC_DEBUG_SCREENSHARE,element:I.default,elementProps:{screenshare:r}})),i.length>0&&i.unshift(s);var f=null!=a?[{section:d.SectionTypes.CUSTOM,label:"Channel Name",element:function(){return L(g.default,{className:M.default.channelName,size:g.default.Sizes.SIZE_20},void 0,a.name)}}]:[];return[].concat(f,o,i,u)}w.displayName="UnknownUserItem";var U=i.default.connectStores([v.default,y.default,m.default,f.default,c.default],(function(){var e,t=y.default.getAllStats(l.MediaEngineContextTypes.DEFAULT),n=y.default.getAllStats(l.MediaEngineContextTypes.STREAM),r=v.default.getChannelId(),a=null===(e=t.concat(n).find((function(e){return null!=e.screenshare})))||void 0===e?void 0:e.screenshare;return{theme:m.default.theme,sidebarTheme:f.default.darkSidebar?C.ThemeTypes.DARK:void 0,section:y.default.getSection(),defaultStats:t,streamStats:n,videoStreams:y.default.getVideoStreams(),screenshare:a,channel:c.default.getChannel(r)}}))(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,R(t,n),r.prototype.render=function(){var e=this.props,t=e.theme,n=e.sidebarTheme,r=e.section,a=e.defaultStats,o=e.streamStats,i=e.videoStreams,l=e.screenshare,d=e.channel;return L(s.default,{theme:t,sidebarTheme:n,section:r,onSetSection:u.setSection,onClose:u.close,sections:k(a,o,i,l,d)})},r}(a.PureComponent));t.default=U},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=_(n(0)),o=y(n(3)),i=y(n(56)),l=y(n(94)),u=_(n(1292)),s=y(n(12)),d=y(n(151)),f=y(n(681)),c=n(159),p=n(9248),v=y(n(6));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function h(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n),r.prototype.render=function(){var e=this.props,t=e.streams,n=e.userId,r=e.mediaEngineConnectionId,a=e.videoStreams;if(null==n||null==t||0===t.length)return h(d.default,{type:d.default.Type.SPINNING_CIRCLE});var o=l.default.getGuildId(),u=s.default.getUser(n),y=i.default.getNick(o,n),m=null==u?v.default.Messages.RTC_DEBUG_RTP_INBOUND:v.default.Messages.RTC_DEBUG_RTP_INBOUND+" — "+(null!=y?y:u.toString());return h(f.default,{tag:c.Tags.H2,title:m},void 0,(0,p.renderStreams)(t,r,n,a))},r}(a.PureComponent);g.displayName="RTCDebugInbound";var S=o.default.connectStores([u.default],(function(e){var t=e.context,n=e.index,r=e.videoStreams,a=u.default.getAllStats(t)[n],o=(0,u.parseSection)(u.default.getSection()).section;if(null==o)throw new Error("Unrecognized section format");var i=null;return null!=a&&null!=a.rtp.inbound&&(i=a.rtp.inbound[o]||[]),{mediaEngineConnectionId:null==a?void 0:a.mediaEngineConnectionId,userId:o,streams:i,videoStreams:r}}))(g);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(10241),i=(r=n(1166))&&r.__esModule?r:{default:r},l=n(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}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}).apply(this,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={dataSeries:new o.TimelineDataSeries,graphView:null},t.handleSetCanvas=function(e){null!=e&&(t.state.graphView=new o.TimelineGraphView(e),t.state.graphView.backgroundColor=t.props.theme===l.ThemeTypes.LIGHT?l.HEXColors.WHITE:l.HEXColors.PRIMARY_DARK_600,t.state.graphView.textColor=t.props.theme===l.ThemeTypes.LIGHT?l.HEXColors.BLACK:l.HEXColors.WHITE,t.state.graphView.gridColor=t.props.theme===l.ThemeTypes.LIGHT?l.HEXColors.BLACK_100:l.HEXColors.WHITE_800,t.state.graphView.timeOptions={timeStyle:"short"},t.state.graphView.addDataSeries(t.state.dataSeries),t.state.dataSeries.addPoint(Date.now(),0),t.state.dataSeries.setColor(l.HEXColors.BRAND),t.state.graphView.updateEndDate())},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),r.getDerivedStateFromProps=function(e,t){var n=t.dataSeries,r=t.graphView;return n.addPoint(Date.now(),e.datapoint),null!=r&&(r.backgroundColor=e.theme===l.ThemeTypes.LIGHT?l.HEXColors.WHITE:l.HEXColors.PRIMARY_DARK_600,r.textColor=e.theme===l.ThemeTypes.LIGHT?l.HEXColors.BLACK:l.HEXColors.WHITE,r.gridColor=e.theme===l.ThemeTypes.LIGHT?l.HEXColors.BLACK_100:l.HEXColors.WHITE_800,r.updateEndDate()),{dataSeries:n,graphView:r}},r.prototype.render=function(){return a.createElement("canvas",{key:"canvas",height:"100",ref:this.handleSetCanvas})},r}(a.PureComponent);function c(e){var t=(0,i.default)();return a.createElement(f,s({},e,{theme:t}))}f.displayName="RTCDebugGraph",c.displayName="ConnectedRTCDebugGraph"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(3)),i=c(n(1292)),l=c(n(151)),u=c(n(681)),s=n(159),d=n(9248),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.prototype.render=function(){var e=this.props.outbound;return null==e?v(l.default,{type:l.default.Type.SPINNING_CIRCLE}):v(u.default,{tag:s.Tags.H2,title:f.default.Messages.RTC_DEBUG_RTP_OUTBOUND},void 0,(0,d.renderStreams)(e))},r}(a.PureComponent);m.displayName="RTCDebugOutbound";var _=o.default.connectStores([i.default],(function(e){var t=e.context,n=e.index,r=i.default.getAllStats(t)[n];return{outbound:null!=r?r.rtp.outbound:null}}))(m);t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(8)),i=c(n(151)),l=c(n(681)),u=n(159),s=n(9248),d=n(10242),f=c(n(6));function c(e){return e&&e.__esModule?e:{default:e}}function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n),r.prototype.render=function(){var e=this.props.screenshare;if(null==e)return v(i.default,{type:i.default.Type.SPINNING_CIRCLE});var t=o.default.map(e,(function(e,t){return v(d.Item,{label:t,value:e},t)}));return v(l.default,{tag:u.Tags.H2,title:f.default.Messages.RTC_DEBUG_SCREENSHARE},void 0,(0,s.renderTwoColumns)(t))},r}(a.PureComponent);m.displayName="RTCDebugScreenshare";var _=m;t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=C(n(8)),i=C(n(3)),l=n(34),u=C(n(94)),s=C(n(1292)),d=C(n(1270)),f=C(n(160)),c=C(n(12)),p=C(n(55)),v=C(n(151)),y=C(n(1165)),m=C(n(681)),_=n(159),h=C(n(8778)),E=n(9248),g=C(n(10494)),S=n(10242),O=C(n(6)),I=C(n(7394)),T=C(n(370));function C(e){return e&&e.__esModule?e:{default:e}}function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function M(){return(M=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}).apply(this,arguments)}function N(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=N("span",{},void 0,"Bitrate:"),R=N("span",{},void 0,"Packet Loss:"),L=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n),r.prototype.render=function(){var e=this.props,t=e.transport,n=e.mediaSessionId,r=e.hidePersonalInformation,a=e.hostname;if(null==t)return N(v.default,{type:v.default.Type.SPINNING_CIRCLE});var i=M({},t,{hostname:a}),l=o.default.map(i,(function(e,t){if("receiverReports"!==t&&(!r||"localAddress"!==t))return N(S.Item,{label:t,value:e},t)})),u=o.default.map(i.receiverReports,(function(e){var t=N(p.default,{id:"bitrate-"+e.id,justify:p.default.Justify.BETWEEN},void 0,P,N("span",{},void 0,(e.bitrate/1e3).toFixed(2)," Kbps")),n=N(p.default,{id:"lost-"+e.id,justify:p.default.Justify.BETWEEN},void 0,R,N("span",{},void 0,(100*e.fractionLost/256).toFixed(0),"%")),r=c.default.getUser(e.id),a=null!=r?r.username:e.id;return N(g.default,{label:e.id,valueRendered:[t,n]},e.id,a)}));return N(m.default,{tag:_.Tags.H2,title:O.default.Messages.RTC_DEBUG_TRANSPORT+(n?" - "+n:""),className:I.default.allowSelection},void 0,(0,E.renderTwoColumns)(l),i.receiverReports?N(y.default,{className:T.default.marginBottom20}):null,(0,E.renderTwoColumns)(u))},r}(a.PureComponent);L.displayName="RTCDebugTransport";var D=i.default.connectStores([s.default,u.default,f.default,d.default],(function(e){var t=e.context,n=e.index,r=s.default.getAllStats(t)[n],a=t===l.MediaEngineContextTypes.STREAM?d.default.getHostname():u.default.getHostname();return{hidePersonalInformation:f.default.hidePersonalInformation,transport:null!=r?r.transport:null,mediaSessionId:u.default.getMediaSessionId(),hostname:h.default.getShortHostname(a)}}))(L);t.default=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=i(n(23)),o=i(n(8));function i(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).ref=r.createRef(),n._animate=function(){var e=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n).animProps;if(!n.state.shaking||e.progress>e.duration||null==n.ref.current)n._animationComplete();else{var t=Date.now();if(e.progress+=t-e.last,e.last=t,e.frameCount%2){var r=e.lastDirection*e.intensity,i=o.default.random(-e.intensity,e.intensity,!0),l=Math.max(0,Math.cbrt(e.duration-e.progress/1e3));e.intensity*=Math.min(1,l),e.lastDirection*=-1,(0,a.default)(null!=n.ref.current,"Shakeable style set when not mounted"),n.ref.current.style.transform="translate3d("+r+"px,"+i+"px,0px)"}e.frameCount+=1,n._animationFrame=requestAnimationFrame(n._animate)}},n._animationCleanup=function(){null!=n.ref.current&&(n.ref.current.style.transform=""),cancelAnimationFrame(n._animationFrame)},n.state={shaking:!1},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=i.prototype;return l.getDefaultAnimProps=function(e,t){return{duration:e||300,progress:0,last:Date.now(),intensity:t||5,lastDirection:-1,frameCount:0}},l.componentWillUnmount=function(){this._animationCleanup()},l.shake=function(e,t){this.animProps=this.getDefaultAnimProps(e,t),this.state.shaking||this.setState({shaking:!0},this._animate)},l.stop=function(){this.state.shaking&&this.setState({shaking:!1})},l._animationComplete=function(){this.setState({shaking:!1},this._animationCleanup)},l.render=function(){var e=this.props,t=e.children,n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children"]);return r.createElement("div",u({},n,{ref:this.ref}),t)},i}(r.Component);d.displayName="Shakeable";var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=b(n(9)),i=b(n(8)),l=b(n(273)),u=b(n(3)),s=b(n(28)),d=b(n(8956)),f=b(n(1295)),c=b(n(1299)),p=b(n(709)),v=b(n(9155)),y=b(n(271)),m=b(n(11744)),_=b(n(10066)),h=b(n(5974)),E=b(n(16)),g=n(1247),S=b(n(43)),O=b(n(1257)),I=n(1),T=b(n(6)),C=b(n(8207));function b(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var P=function(e){var t,n;function r(t){var n,r;(n=e.call(this,t)||this).videoRef=null,n._noProblemsTimeout=null,n._problemsTimeout=null,n._connectedSound=n.createSound(),n._loadingText=(r=[T.default.Messages.LOADING_LINE_1,T.default.Messages.LOADING_LINE_2,T.default.Messages.LOADING_LINE_3,T.default.Messages.LOADING_LINE_4,T.default.Messages.LOADING_LINE_5,T.default.Messages.LOADING_LINE_6,T.default.Messages.LOADING_LINE_7,T.default.Messages.LOADING_LINE_8,T.default.Messages.LOADING_LINE_10,T.default.Messages.LOADING_LINE_11,T.default.Messages.LOADING_LINE_12,T.default.Messages.LOADING_LINE_13,T.default.Messages.LOADING_LINE_14,T.default.Messages.LOADING_LINE_15,T.default.Messages.LOADING_TIP_1,T.default.Messages.LOADING_TIP_2,T.default.Messages.LOADING_TIP_3,T.default.Messages.LOADING_TIP_4,T.default.Messages.LOADING_TIP_5,T.default.Messages.LOADING_TIP_6,T.default.Messages.LOADING_TIP_7,T.default.Messages.LOADING_TIP_8,T.default.Messages.LOADING_TIP_9,T.default.Messages.LOADING_TIP_10,T.default.Messages.LOADING_TIP_11,T.default.Messages.LOADING_TIP_12,T.default.Messages.LOADING_TIP_13,T.default.Messages.LOADING_TIP_14,T.default.Messages.LOADING_TIP_15,T.default.Messages.LOADING_TIP_16,T.default.Messages.LOADING_TIP_17,T.default.Messages.LOADING_TIP_18,T.default.Messages.LOADING_TIP_19,T.default.Messages.LOADING_TIP_20,T.default.Messages.LOADING_TIP_21,T.default.Messages.LOADING_TIP_22,T.default.Messages.LOADING_TIP_23,T.default.Messages.LOADING_TIP_24,T.default.Messages.LOADING_TIP_25,T.default.Messages.LOADING_TIP_26,T.default.Messages.LOADING_TIP_27.format({asterisks:"**"}),T.default.Messages.LOADING_KEYBIND_TIP_1.format({quickSwitcherHook:function(e,t){return A(O.default,{shortcut:"mod+k",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_2.format({markUnreadHook:function(e,t){return A(O.default,{shortcut:"alt+click",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_3.format({markServerUnreadHook:function(e,t){return A(O.default,{shortcut:"shift+esc",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_4.format({navigateUnreadHook:function(e,t){return A(O.default,{shortcut:"shift+alt+up",className:C.default.keybind},t)},downHook:function(e,t){return A(O.default,{shortcut:"down",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_5.format({keyboardShortcutsHook:function(e,t){return A(O.default,{shortcut:"mod+/",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_6.format({messageNewlineHook:function(e,t){return A(O.default,{shortcut:"shift+return",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_7.format({shiftHook:function(e,t){return A(O.default,{shortcut:"shift",className:C.default.keybind},t)}}),T.default.Messages.LOADING_KEYBIND_TIP_8.format({upHook:function(e,t){return A(O.default,{shortcut:"up",className:C.default.keybind},t)}})])[i.default.random(r.length-1)],n.handleReady=function(){n.setState({ready:!0}),E.default.isDesktop()&&(S.default.send("UPDATED_QUOTES",["Hold Tight — Loading Discord"]),S.default.send("UPDATE_OPEN_ON_STARTUP"))},n.setVideoRef=function(e){n.videoRef=e},n.setProblemsTimeout=function(){null==n._problemsTimeout&&(n._problemsTimeout=setTimeout((function(){return n.setState({problems:!0})}),1e4))},n.clearProblemsTimeout=function(){clearTimeout(n._problemsTimeout),n._problemsTimeout=null};var a=t.connected;return n.state={ready:a,hide:a,problems:!1,shouldRender:!a,opacity:new l.default.Value(a?0:1)},n._connectedSound.volume=1,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,N(t,n);var a=r.prototype;return a.createSound=function(){var e=this.props.soundpack,t=(0,g.createSoundForPack)("discodo",e);return t.volume=1,t},a.componentDidMount=function(){this.setProblemsTimeout()},a.componentDidUpdate=function(e,t){var n=this,r=this.state,a=r.ready,o=r.hide,i=r.problems,u=r.opacity,f=this.props,c=f.connected,p=f.soundpack,v=c&&a&&!o&&!i;if(e.soundpack!==p&&(this._connectedSound=this.createSound()),e.connected!==c||v)if(c&&null!=this.videoRef){var y=Math.max(Math.ceil(1e3*(this.videoRef.duration-this.videoRef.currentTime)),600);clearTimeout(this._noProblemsTimeout),s.default.get(I.DISCODO_STORAGE_KEY)&&this._connectedSound.play(),this._noProblemsTimeout=setTimeout((function(){n.setState({problems:!1,hide:c})}),y)}else this.setState({problems:!1,hide:c});else t.hide!==o?(o?this.clearProblemsTimeout():this.setProblemsTimeout(),this.setState({shouldRender:!0}),l.default.timing(u,{toValue:o?0:1,duration:200}).start((function(){return n.setState({shouldRender:!o})}))):t.problems!==i&&i&&d.default.checkIncidents()},a.componentWillUnmount=function(){this.clearProblemsTimeout(),clearTimeout(this._noProblemsTimeout)},a.render=function(){if(this.state.shouldRender){var e,t=this._loadingText,n=null;return null!=this.props.incident&&(t=this.props.incident.name,n=this.props.incident.incident_updates[0].body),A(l.default.div,{className:C.default.container,style:{opacity:this.state.opacity}},void 0,A("div",{className:C.default.content},void 0,A(h.default,{autoPlay:!0,loop:!this.props.connected,setRef:this.setVideoRef,onReady:this.handleReady,className:this.state.ready?C.default.ready:""}),A("div",{className:C.default.text},void 0,null!=this.props.incident?null:A("div",{className:C.default.tipTitle},void 0,T.default.Messages.LOADING_DID_YOU_KNOW),A("div",{className:null!=this.props.incident?C.default.title:C.default.tip},void 0,t),A("div",{className:C.default.body},void 0,n))),A("div",{className:(0,o.default)(C.default.problems,(e={},e[C.default.slideIn]=this.state.problems,e))},void 0,A("div",{className:C.default.problemsText},void 0,T.default.Messages.CONNECTING_PROBLEMS_CTA),A("div",{},void 0,A(y.default,{className:C.default.twitterLink,href:(0,f.default)(I.LocalizedLinks.TWITTER),target:"_blank"},void 0,A(_.default,{className:C.default.icon}),T.default.Messages.TWEET_US),A(y.default,{className:C.default.statusLink,href:I.Links.STATUS,target:"_blank"},void 0,A(m.default,{className:C.default.icon}),T.default.Messages.SERVER_STATUS))))}return null},r}(a.PureComponent);P.displayName="ConnectingModal";var R=u.default.connectStores([p.default,v.default,c.default],(function(){return{isTryingToConnect:p.default.isTryingToConnect(),connected:p.default.isConnected(),incident:v.default.getIncident(),soundpack:c.default.getSoundpack()}}))((function(e){var t=e.isTryingToConnect,n=e.connected,r=e.incident,a=e.soundpack;return t?A(P,{soundpack:a,connected:n,incident:r}):null}));t.default=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r,a,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=(r=n(22))&&r.__esModule?r:{default:r};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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}).apply(this,arguments)}function s(e,t,n,r){a||(a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e){var t=e.width,n=void 0===t?14:t,r=e.height,a=void 0===r?14:r,l=e.color,d=void 0===l?"currentColor":l,f=e.foreground,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["width","height","color","foreground"]);return o.createElement("svg",u({},(0,i.default)(c),{width:n,height:a,viewBox:"0 0 14 14"}),s("path",{fill:d,className:f,d:"M6.99471698,9.67522659 C8.47108874,9.67522659 9.66792453,8.47748685 9.66792453,7 C9.66792453,5.52251315 8.47108874,4.32477341 6.99471698,4.32477341 C5.51834522,4.32477341 4.32150943,5.52251315 4.32150943,7 C4.32150943,8.47748685 5.51834522,9.67522659 6.99471698,9.67522659 Z M6.99471698,2.67522659 C8.18867925,2.67522659 9.26641509,3.16163142 10.0483019,3.94410876 L11.9396226,2.05135952 C10.6822642,0.782477341 8.92830189,0 6.99471698,0 C3.12754717,0 0,3.14048338 0,7 L2.67320755,7 C2.67320755,4.6102719 4.60679245,2.67522659 6.99471698,2.67522659 Z M11.3267925,7 C11.3267925,9.3897281 9.39320755,11.3247734 7.00528302,11.3247734 C5.81132075,11.3247734 4.73358491,10.8383686 3.94113208,10.0558912 L2.04981132,11.9486405 C3.31773585,13.2175227 5.06113208,14 6.99471698,14 C10.8618868,14 14,10.8595166 14,7 L11.3267925,7 Z"}))}d.displayName="Status"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showAppDownloadModal=function(){var e=v.default.getSuperProperties();if("iOS"===(null==e?void 0:e.os)&&"Discord iOS"!==(null==e?void 0:e.browser)||"Android"===(null==e?void 0:e.os)){s.experiment.trackExposure({});var t=s.experiment.getCurrentConfig({}),n=t.showDownloadModal,r=t.excludeTablets,a=l.default.get("MOBILE_WEB_DOWNLOAD_CTA_LAST_SEEN")||0;n&&!(window.screen.width>480&&r)&&a+864e5<Date.now()&&(u.default.push(C),l.default.set("MOBILE_WEB_DOWNLOAD_CTA_LAST_SEEN",Date.now()))}},t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(411),i=n(305),l=g(n(28)),u=g(n(397)),s=n(11746),d=g(n(271)),f=g(n(29)),c=n(35),p=g(n(24)),v=g(n(13)),y=n(368),m=n(1),_=g(n(6)),h=g(n(8208)),E=g(n(11747));function g(e){return e&&e.__esModule?e:{default:e}}function S(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function O(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(){v.default.track(m.AnalyticEvents.MOBILE_APP_DOWNLOAD_MODAL_ACKED,{action:"Dismiss"}),u.default.pop()}var C=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,I(t,n);var a=r.prototype;return a.componentDidMount=function(){v.default.track(m.AnalyticEvents.MOBILE_APP_DOWNLOAD_MODAL_ACKED,{action:"Seen"})},a.renderContent=function(){var e,t=(0,y.getMobileDownloadLink)("mobile_web_app",null===(e=v.default.getSuperProperties())||void 0===e?void 0:e.os);return O("div",{className:h.default.container},void 0,O("div",{className:h.default.inner},void 0,O("img",{src:E.default,alt:"Discord Logo",className:h.default.logo}),O(p.default,{className:h.default.title},void 0,_.default.Messages.GET_MOBILE_APP),O(p.default,{className:h.default.subtitle},void 0,_.default.Messages.GET_MOBILE_APP_SUBTITLE),O(f.default,{className:h.default.downloadButton,onClick:function(){return function(e){var t=(0,o.parseDynamicLink)(e);null!=t&&v.default.track(m.AnalyticEvents.DEEP_LINK_CLICKED,{fingerprint:(0,i.maybeExtractId)(t.fingerprint),attempt_id:t.attemptId,source:t.utmSource}),v.default.track(m.AnalyticEvents.MOBILE_APP_DOWNLOAD_MODAL_ACKED,{action:"Download"}),window.location.href=e}(t)}},void 0,_.default.Messages.GET_MOBILE_APP_CTA),O(d.default,{className:h.default.skip,onClick:T},void 0,_.default.Messages.GET_MOBILE_APP_SKIP)))},a.render=function(){return O("div",{className:h.default.fullscreen},void 0,O(c.ModalContent,{},void 0,this.renderContent()))},r}(a.PureComponent);C.displayName="MobileAppDownload";var b=C;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experiment=void 0;var r=(0,n(50).createExperiment)({kind:"user",id:"2021-06_mobile_web_app_download",label:"Show app download modal for mobile web users",defaultConfig:{showDownloadModal:!1,excludeTablets:!1},treatments:[{id:1,label:"Show download modal to both mobile and tablet",config:{showDownloadModal:!0,excludeTablets:!1}},{id:2,label:"Show download modal to only mobile",config:{showDownloadModal:!0,excludeTablets:!0}}]});t.experiment=r},function(e,t,n){e.exports=n.p+"ca67c73c553d3b8627cacb9d9d3a7e6f.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(3)),a=u(n(10243)),o=u(n(10255)),i=u(n(10258)),l=u(n(11749));function u(e){return e&&e.__esModule?e:{default:e}}r.default.initialize();var s=[l.default,i.default,o.default,a.default];t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=n(1150),i=d(n(8957)),l=d(n(11750)),u=n(259),s=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function c(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={accepting:!1},t.handleAccept=function(){return t.setState({accepting:!0}),(0,o.acceptAgreements)().then((function(e){return t.setState({accepting:e})}))},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.render=function(){return c(l.default,{className:(0,u.getThemeClass)(s.ThemeTypes.LIGHT),onAccept:this.handleAccept,accepting:this.state.accepting})},r}(a.PureComponent);t.default=v,v.displayName="UserAgreements",v.modalConfig={store:i.default,center:!0,isOpen:function(){return i.default.getAction()===s.UserRequiredActions.AGREEMENTS}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=y(n(9)),i=y(n(29)),l=y(n(1160)),u=y(n(55)),s=y(n(1165)),d=y(n(474)),f=y(n(272)),c=n(1),p=y(n(6)),v=y(n(8209));function y(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function _(e,t,n,a){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=a;else if(i>1){for(var l=new Array(i),u=0;u<i;u++)l[u]=arguments[u+3];t.children=l}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=_(s.default,{}),g=_(s.default,{}),S=_(s.default,{}),O=function(e){var t,r;function a(t){var n;return(n=e.call(this,t)||this).handleCheck=function(){n.setState({checked:!n.state.checked})},n.state={checked:!1},n}return r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,h(t,r),a.prototype.render=function(){var e=this.props,t=e.className,r=e.accepting,a=e.onAccept,s=this.state.checked;return _("div",{className:(0,o.default)(v.default.modal,t)},void 0,_("div",{className:v.default.title},void 0,p.default.Messages.NEW_TERMS_TITLE),E,_(f.default,{},void 0,_(d.default,{className:v.default.description},void 0,p.default.Messages.NEW_TERMS_DESCRIPTION),_(u.default,{className:v.default.container,align:u.default.Align.CENTER,justify:u.default.Justify.CENTER},void 0,_(u.default,{direction:u.default.Direction.VERTICAL},void 0,_("div",{className:v.default.link},void 0,p.default.Messages.TERMS_OF_SERVICE.format({url:c.MarketingURLs.TERMS})),_("div",{className:v.default.link},void 0,p.default.Messages.PRIVACY_POLICY.format({url:c.MarketingURLs.PRIVACY}))),_("img",{alt:"",src:n(11751)}))),g,_("div",{className:v.default.container},void 0,_(l.default,{onChange:this.handleCheck,value:s},void 0,_("div",{className:v.default.ack},void 0,p.default.Messages.NEW_TERMS_ACK))),S,_(u.default,{className:v.default.buttonContainer,justify:u.default.Justify.END},void 0,_(i.default,{className:v.default.button,disabled:!s,submitting:r,onClick:a},void 0,p.default.Messages.NEW_TERMS_CONTINUE)))},a}(a.PureComponent);O.displayName="NewTermsModal",O.defaultProps={onAccept:c.NOOP,accepting:!1};var I=O;t.default=I},function(e,t,n){e.exports=n.p+"a13cfdd7220132fff399a76c3ed64519.svg"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=c(n(3)),o=n(57),i=c(n(2)),l=c(n(390)),u=c(n(132)),s=c(n(80)),d=c(n(365)),f=(n(1),c(n(6)));function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=new o.Timeout;function y(){null!=r&&(l.default.sendBotMessage(r,f.default.Messages.BOT_CALL_IDLE_DISCONNECT),u.default.selectVoiceChannel(null))}var m=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n),r.prototype.initialize=function(){this.waitFor(s.default)},r}(a.default.Store))(i.default,{CONNECTION_CLOSED:function(e){return r=null,void v.stop()},VOICE_STATE_UPDATE:function(e){if(null!=e.guildId)return!1;var t=s.default.getCurrentClientVoiceChannelId(null);return null==t?(v.stop(),!1):(1===d.default.countVoiceStatesForChannel(t)?(r=t,v.start(3e5,y,!1)):v.stop(),!1)}});t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MESSAGE_SOUND_VOLUME=t.MESSAGE_SOUND=void 0;var r=I(n(3)),a=I(n(2)),o=I(n(391)),i=I(n(5848)),l=n(42),u=I(n(81)),s=I(n(13)),d=n(9073),f=I(n(10222)),c=I(n(16)),p=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=O();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1247)),v=I(n(10)),y=I(n(15)),m=I(n(8359)),_=I(n(36)),h=I(n(479)),E=I(n(12)),g=n(1),S=I(n(6));function O(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return O=function(){return e},e}function I(e){return e&&e.__esModule?e:{default:e}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.MESSAGE_SOUND="message1";t.MESSAGE_SOUND_VOLUME=.4;var C=c.default.hasFocus(),b=new(function(){function e(){this._channels={}}var t=e.prototype;return t.track=function(e,t){var n=this._channels[e];for(null==n&&(n=[],this._channels[e]=n),n.push(t);n.length>1;){var r=n.shift();null!=r&&null!=r.close&&r.close()}},t.clearChannel=function(e){var t=this._channels[e];null!=t&&(delete this._channels[e],t.forEach((function(e){return e.close()})))},e}());function M(){return m.default.getDesktopType()===g.DesktopNotificationTypes.NEVER||h.default.getStatus()===g.StatusTypes.DND}var N=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,T(t,n),r.prototype.initialize=function(){this.waitFor(E.default,v.default,m.default,y.default,u.default)},r}(r.default.Store))(a.default,__OVERLAY__?{}:{NOTIFICATIONS_SET_PERMISSION_STATE:function(e){e.enabled!==g.NotificationPermissionTypes.ENABLED||c.default.embedded||f.default.showNotification(n(1403),S.default.Messages.NOTIFICATION_TITLE_DISCORD,S.default.Messages.BROWSER_NOTIFICATIONS_ENABLED_BODY,{sound:"message1",volume:.4,tag:"hello",onClick:function(){window.focus()}})},NOTIFICATION_CREATE:function(e){var t=e.icon,n=e.title,r=e.body,a=e.options;return M()||f.default.showNotification(t,n,r,a),!1},WINDOW_FOCUS:function(e){if(C=e.focused){var t=_.default.getChannelId();null!=t&&b.clearChannel(t)}},MESSAGE_CREATE:function(e){var t=e.channelId,r=e.message;if(e.optimistic)return!1;var o=v.default.getChannel(t),u=E.default.getUser(r.author.id);if(null==o||null==u)return!1;if(!(0,d.shouldNotify)(r,t))return!1;var c=n(1287).default,y=n(376).default;if(null!=c.getFocusedPID()&&y.getTextChatNotificationMode()===g.OverlayNotificationTextChatTypes.ENABLED)return!1;if(C&&t===_.default.getChannelId())return!1;var h=(0,d.makeTextChatNotification)(o,r,u),S=h.icon,O=h.title,I=h.body;a.default.dirtyDispatch({type:g.ActionTypes.RPC_NOTIFICATION_CREATE,channelId:o.id,message:r,icon:S,title:O,body:I});var T=!m.default.isSoundDisabled("message1");if(m.default.getDesktopType()===g.DesktopNotificationTypes.NEVER)return T&&p.playSound("message1",.4),!1;var M=f.default.showNotification(S,O,I,{tag:r.id,sound:T?"message1":void 0,volume:.4,onClick:function(){s.default.track(g.AnalyticEvents.NOTIFICATION_CLICKED,{notif_type:g.ActionTypes.MESSAGE_CREATE,notif_user_id:r.author.id,message_id:r.id,message_type:r.type,channel_id:o.id,channel_type:o.type,guild_id:o.guild_id}),(0,l.transitionTo)(g.Routes.CHANNEL(o.getGuildId()||g.ME,o.id)),i.default.clickedNotification()}});null!=M&&b.track(o.id,M)},CHANNEL_SELECT:function(e){var t=e.channelId;return null!=t&&b.clearChannel(t),!1},MESSAGE_ACK:function(e){var t=e.channelId;return b.clearChannel(t),!1},ACTIVITY_START:function(e){var t=e.userId,n=e.activity;if(M())return!1;switch(n.type){case g.ActivityTypes.PLAYING:var r=E.default.getUser(t);if(null==r)return!1;var a=r.toString(),i=n.name,l=r.getAvatarURL(void 0),u=S.default.Messages.NOTIFICATION_TITLE_START_GAME,d=S.default.Messages.NOTIFICATION_BODY_START_GAME.format({username:a,gameName:i});return f.default.showNotification(l,u,d,{sound:"message2",playSoundIfDisabled:!1,volume:.4,onClick:function(){s.default.track(g.AnalyticEvents.NOTIFICATION_CLICKED,{notif_type:g.ActionTypes.ACTIVITY_START,activity_type:g.ActivityTypes.PLAYING,notif_user_id:t,activity_name:i}),o.default.openPrivateChannel(t)}}),!1;default:return!1}},RELATIONSHIP_ADD:function(e){var t=e.relationship,n=t.type,r=t.user.id,a=e.shouldNotify;if(n!==g.RelationshipTypes.FRIEND||!a)return!1;if(h.default.getStatus()===g.StatusTypes.DND)return!1;var i=E.default.getUser(r);if(null==i)return!1;var l=i.toString(),u=i.getAvatarURL(void 0),d=S.default.Messages.NOTIFICATION_ACCEPTED_FRIEND_REQUEST;f.default.showNotification(u,l,d,{onClick:function(){s.default.track(g.AnalyticEvents.NOTIFICATION_CLICKED,{notif_type:g.ActionTypes.RELATIONSHIP_ADD,notif_user_id:i.id}),o.default.openPrivateChannel(i.id)}})},VOICE_STATE_UPDATE:function(e){var t=e.channelId,n=e.userId,r=e.guildId,a=e.suppress,o=e.requestToSpeakTimestamp;if(null!=n&&null!=t&&null!=r&&(!a&&null!=o)){var i=E.default.getNullableCurrentUser();if(null!=i&&n===i.id){var l=y.default.getGuild(r),s=v.default.getChannel(t),d=u.default.getStageInstanceByChannel(t);null==s||null==l||M()||f.default.showNotification(l.getIconURL(),s.name,S.default.Messages.STAGE_SPEAK_INVITE_PUSH_NOTIFICATION.format({channelName:s.name,channelTopic:null==d?void 0:d.topic}),{})}}}});t.default=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(3)),a=v(n(28)),o=n(57),i=v(n(2)),l=v(n(1234)),u=n(136),s=v(n(71)),d=v(n(120)),f=v(n(79)),c=v(n(39)),p=n(1);function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h="ActivityTrackingStore",E=a.default.get(h)||{},g={},S=!1;function O(e,t){void 0===t&&(t=!0),t&&I(e,!0);var n=g[e.applicationId];null!=n&&(n.stop(),delete g[e.applicationId]),delete E[e.applicationId],a.default.set(h,E)}function I(e,t){void 0===t&&(t=!1);var n=Date.now(),r=null!=e.updatedAt?n-e.updatedAt:0;r>21e5&&(r=0),l.default.updateActivity(e.applicationId,e.isDiscordApplication?p.Distributors.DISCORD:e.distributor,(0,u.shouldShareApplicationActivity)(e.applicationId,c.default,d.default),e.token,Math.floor(r/1e3),t),e.updatedAt=n;var i=g[e.applicationId];null==i&&(i=g[e.applicationId]=new o.Interval).start(18e5,(function(){return I(e)})),t||(E[e.applicationId]=e,a.default.set(h,E))}function T(e){void 0===e&&(e=!0);for(var t,n=f.default.getRunningGames(),r=new Set,a=m(n);!(t=a()).done;){var o=t.value,i=o.name,l=o.distributor,u=s.default.getGameByName(i);null!=u&&(r.add(u.id),u.id in E||I({applicationId:u.id,updatedAt:Date.now(),distributor:l}))}for(var d=0,c=Object.keys(E);d<c.length;d++){var p=c[d];r.has(p)||O(E[p],e)}}function C(){for(var e=0,t=Object.keys(E);e<t.length;e++){var n=t[e];O(E[n])}S=!1}var b=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var a=r.prototype;return a.initialize=function(){this.waitFor(f.default,c.default,d.default),this.syncWith([c.default],T)},a.getActivities=function(){return E},r}(r.default.Store))(i.default,{RUNNING_GAMES_CHANGE:function(e){return T()},CONNECTION_OPEN:function(e){return function(){if(S)return!1;for(var e=0,t=Object.keys(E);e<t.length;e++){var n=t[e];I(E[n])}T(!1),S=!0}()},CONNECTION_CLOSED:function(e){4004===e.code&&C()},LOGOUT:function(e){return C()},ACTIVITY_UPDATE_SUCCESS:function(e){var t=e.applicationId,n=e.token,r=E[t];if(null==r)return!1;r.token=n,a.default.set(h,E)},ACTIVITY_UPDATE_FAIL:function(e){var t=e.applicationId,n=E[t];if(null==n)return!1;n.token=null,n.updatedAt=null,a.default.set(h,E)}});t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(3)),a=l(n(2)),o=l(n(5848)),i=l(n(71));n(1);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=new(function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n),r}(r.default.Store))(a.default,{USER_ACHIEVEMENT_UPDATE:function(e){var t=e.userAchievement,n=t.application_id,r=t.achievement;if(100===t.percent_complete&&null!=r){var a=i.default.getGame(n),l=null!=a?a.getIconURL(64):null;o.default.showNotification(l,r.name,r.description)}}});t.default=s}])]);
+//# sourceMappingURL=7fbe1e6b1c5663e3a84e.js.map
\ No newline at end of file