PageSourceSearch

https://www.maestro.io/static/js/chunks/1439.68db9a2.js

js maestro.io collected 2026-09-24 18:24:59 UTC 78,387 bytes, 1,276 lines download raw bytes

1(function(){try{var fe=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},se=new fe.Error().stack;se&&(fe._sentryDebugIds=fe._sentryDebugIds||{},fe._sentryDebugIds[se]="0f8c6d62-2caf-41c5-81b2-2c2f5f7b6fee",fe._sentryDebugIdIdentifier="sentry-dbid-0f8c6d62-2caf-41c5-81b2-2c2f5f7b6fee")}catch{}})();var _global=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};_global.SENTRY_RELEASE={id:"6b3b5bcd49ac3ca4e22832378da81add8169a867"},(self.webpackChunk_maestro_io_client=self.webpackChunk_maestro_io_client||[]).push([[1439,4509],{784366:(fe,se,a)=>{a.d(se,{A:()=>q});var e=a(63696),R=a(224191),H=a.n(R),N=a(362688),g=a.n(N),i=a(670315),s=a(288745),_=a(990220),re=a(365179),F=a(463302),z=a(272568),C=a(776637),o=a.n(C),de=a(498685),me=a(654584),oe=a(551321),Q=a(86138),l=Object.defineProperty,ae=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,Y=(L,P,W)=>P in L?l(L,P,{enumerable:!0,configurable:!0,writable:!0,value:W}):L[P]=W,G=(L,P)=>{for(var W in P||(P={}))$.call(P,W)&&Y(L,W,P[W]);if(ae)for(var W of ae(P))u.call(P,W)&&Y(L,W,P[W]);return L},Ae=(L,P)=>{var W={};for(var te in L)$.call(L,te)&&P.indexOf(te)<0&&(W[te]=L[te]);if(L!=null&&ae)for(var te of ae(L))P.indexOf(te)<0&&u.call(L,te)&&(W[te]=L[te]);return W};const k=_.Ls,D={[s.aB]:"asc",[s.AZ]:"desc",[s.NF]:null},U={buttonProps:g().oneOfType([g().shape({labelKey:g().string,onClick:g().func}),g().arrayOf(g().shape({labelKey:g().string,onClick:g().func}))]),columns:g().arrayOf(g().object).isRequired,disableEditing:g().bool,disableKeyClick:g().bool,disableSelecting:g().bool,fetchObject:g().shape({endpoint:g().string,method:g().oneOf(["GET"]),service:g().string}).isRequired,forceRefresh:g().bool,formatData:g().func,helperText:g().string,onClose:g().func.isRequired,onEditItem:g().func,onKeyClick:g().func,onSelectItem:g().func.isRequired,searchPlaceholderKey:g().string,titleKey:g().string.isRequired},Z={buttonProps:[],disableEditing:!1,disableSelecting:!1,forceRefresh:!1,helperText:"",searchPlaceholderKey:""},b=L=>{const P={limit:150,sortBy:"created",sortDirection:"desc"},[W,te]=(0,e.useState)(!1),[he,ge]=(0,e.useState)(P),ye=(0,R.useSelector)(F.mC),pe=(0,R.useSelector)(re.V2d),Ne=(0,R.useSelector)(z.dO),{buttonProps:Ee,columns:xe,disableEditing:Le,disableKeyClick:Ve,disableSelecting:Ce,fetchObject:Ke,forceRefresh:Me,formatData:Te,headerAction:De,helperText:ne,onClose:_e,onEditItem:ve,onKeyClick:dt,onSelectItem:ut,searchPlaceholderKey:Ze,titleKey:qe}=L,{method:mt="GET",service:pt}=Ke,et={headers:{Authorization:`Bearer ${ye}`,"x-maestro-client-id":pe},method:mt,params:he,refreshKey:`${Ne}${Me}`,url:`${k}${pt}`},{data:Pe}=(0,de.ku)(et),tt=(0,e.useMemo)(()=>Pe?(te(!0),Te?Te(Pe):Pe):null,[o()(Pe)]),nt=le=>{var be;if(te(!1),((be=le.search)==null?void 0:be.length)===0&&he.search){const Fe=he,{search:We}=Fe,je=Ae(Fe,["search"]);ge(G({},je))}else ge(G(G({},he),le))},rt=(le={})=>{const{sort:be,title:Fe}=le,We=D[be],je=We?{sortBy:le.accessor||Fe,sortDirection:We}:{};nt(je)},Et=le=>{nt({search:le})},ft=le=>le.find(be=>!!be.sort);(0,e.useEffect)(()=>{rt(ft(xe))},[]);const At=(0,e.useCallback)(le=>{le||_e()},[_e]);return e.createElement(me.lG,{context:"admin",open:!0,onOpenChange:At},e.createElement(me.Cf,{className:"w-[80vw] max-w-[1000px] h-[min(90vh,920px)] p-0 gap-0 overflow-hidden font-[family-name:var(--admin-font-body)]",onPointerDownOutside:le=>le.preventDefault(),onFocusOutside:le=>le.preventDefault()},e.createElement(i.A,{className:"w-full h-full",buttonProps:Ee,columns:xe,disableEditing:Le,disableKeyClick:Ve,disableSelecting:Ce,headerAction:De,helperText:ne,list:tt,loaded:W,onEditItem:ve,onKeyClick:dt,onSearch:Et,onSelectItem:ut,onSort:rt,searchPlaceholderKey:Ze,setLoading:()=>te(!1),testIdSearcher:"ticketAndSubscriptionSearchInput",testIdTable:"ticketAndSubscriptionTable",titleKey:qe}),e.createElement("div",{className:"flex justify-end px-[30px] py-5"},e.createElement(oe.$,{context:"admin",className:"rounded-full px-8 bg-admin-surface-1 hover:bg-admin-surface-1/80",onClick:_e}
1,e.createElement(Q.A,{stringKey:"ADMIN_ACTION_CANCEL"})))))};b.propTypes=U,b.defaultProps=Z;const q=b},451439:(fe,se,a)=>{a.r(se),a.d(se,{default:()=>ba});var e=a(63696),R=a(224191),H=a(776637),N=a.n(H),g=a(537725),i=a(179392),s=a(797991),_=a(160788),re=a(784366),F=a(731694),z=a(942662),C=a(86138),o=a(886550),de=a(124615),me=a(884110),oe=a(269010),Q=a(154789),l=a(429195),ae=a(545290),$=a(784567),u=a(152544);const Y=(0,o.Ay)(de.A)`
2  min-width: 500px;
3  max-width: 500px;
4  border-radius: 10px;
5  background: ${l.dHK};
6`,G=o.Ay.div`
7  padding: 30px 30px 20px;
8  border-bottom: 1px solid ${l.dmy};
9`,Ae=o.Ay.div`
10  padding: 0px 28px 35px;
11`,k=o.Ay.div`
12  padding: 20px 45px 30px;
13`,D=o.Ay.div`
14  display: flex;
15  width: 85%;
16  & > *:nth-child(1) {
17    margin-right: 10px;
18  }
19  &.footer {
20    width: auto;
21    margin-bottom: 10px;
22    &:nth-child(1) {
23      align-items: center;
24    }
25  }
26`,U=o.Ay.div`
27  ${u.ig}
28  margin-bottom: 5px;
29`,Z=o.Ay.div`
30  ${u.pz}
31`,b=o.Ay.div`
32  ${u.Ns}
33  color: ${l.zkP};
34`,q=(0,o.Ay)(me.A)``,L=o.Ay.label`
35  ${u.Ns}
36  min-width: 50px;
37  margin-right: 10px;
38  &.top {
39    margin-top: 18px;
40  }
41`,P=o.Ay.div`
42  display: flex;
43  flex-direction: row;
44  &.center {
45    align-items: center;
46  }
47`,W=o.Ay.div`
48  display: flex;
49  flex-direction: row;
50  justify-content: flex-end;
51  margin-top: 10px;
52  & > button:nth-child(1) {
53    margin-right: 15px;
54  }
55`,te=(0,o.Ay)(oe.Ay)`
56  background: ${l.k6P};
57  .icon-down-open {
58    color: ${l.Qod};
59  }
60`,he=(0,o.Ay)(Q._s)`
61  background: ${l.dmy};
62`,ge=o.Ay.div`
63  display: flex;
64  flex-flow: row nowrap;
65  padding: 12px;
66  background: ${l.k6P};
67  border-radius: 5px;
68  width: 100%;
69  margin: 10px 0px;
70  span {
71    color: ${l.Lvg};
72  }
73`,ye=o.Ay.div`
74  ${u.eb};
75  color: ${l.__g};
76  display: flex;
77  justify-content: flex-end;
78`,pe=o.Ay.input.attrs({type:"text"})`
79  background: transparent;
80  color: ${l.o0B};
81  width: ${({width:t})=>`${t}px`};
82  border: none;
83  ${u.eb}
84  padding: 0;
85`,Ne=(0,o.Ay)(Q._s)`
86  ${({isLoading:t})=>t?(0,o.AH)`
87    ${ae.SA}
88    min-width: 125px;
89    background: ${l.YJk};
90    color: white;
91    display: flex;
92    column-gap: 10px;
93    `:null}
94`,Ee=(0,o.Ay)($.A).attrs(t=>({name:"three-bounce",colorOverride:(0,l.Qod)(t)}))`
95  & > div > div {
96    ${({size:t})=>t?(0,o.AH)`
97    width: ${t}px;
98    height: ${t}px;
99    `:null}
100  }
101  .sk-three-bounce {
102    height: auto;
103  }
104`;var xe=a(463296);const Le=[{label:"ADMIN_LABEL_OPTION_REFUND_DUPLICATE_MODAL",value:"duplicate",index:0},{label:"ADMIN_LABEL_OPTION_REFUND_FRAUDULENT_MODAL",value:"fraudulent",index:1},{label:"ADMIN_LABEL_OPTION_REFUND_REQUEST_CUSTOMER_MODAL",value:"requested_by_customer",index:2}],Ce=t=>{const{currency:n,refund:r,onClose:d,onConfirm:T}=t,[p,E]=(0,e.useState)(!1),[m,O]=(0,e.useState)(!1),[v,I]=(0,e.useState)(!1),[V,c]=(0,e.useState)(!1),[A,x]=(0,e.useState)({}),[S,J]=(0,e.useState)(""),[B,ee]=(0,e.useState)(r),[ce,we]=(0,e.useState)(!1),[Ie,Oe]=(0,e.useState)([0,0]),h=w=>{J(w)},K=(0,e.useRef)(null),f=(0,e.useMemo)(()=>n?.toUpperCase(),[n]);(0,e.useEffect)(()=>{var w;const[ue,Re]=Ie;(w=K.current)==null||w.setSelectionRange(ue,Re)},[B,Ie]);const y=w=>{var ue,Re;const{value:ke}=w.target,xn=new RegExp("^[0-9]*(.[0-9]{2})?$"),Lt=Number((ue=K.current)==null?void 0:ue.selectionStart),$a=Number((Re=K.current)==null?void 0:Re.selectionEnd);Oe([Lt,$a]),xn.test(ke)&&ee(parseInt(ke.startsWith(".")?`0${ke}`:ke,10))},j=w=>{let ue=!1;w.target.checked&&(ue=!0),we(ue)},M=()=>{const w=B>r||!A?.value||Number.isNaN(B);Number.isNaN(B)&&c(!0),B>r&&I(!0),A?.value||E(!0),w||(O(!0),T(A?.value||"",S,ce,B))};return e.createElement(Y,{fixedDimensions:!0,id:F.Yr,onClose:d},e.createElement(G,null,e.createElement(U,null,e.createElement(C.A,{stringKey:"ADMIN_TITLE_REFUND_ENTITLEMENT_MODAL"})),e.createElement(D,null,e.createElement(z.Info,{className:"size-5"}),e.createElement(b,null,e.createElement(C.A,{stringKey:"ADMIN_INFO_TITLE_REFUND_ENTITLEMENT_MODAL"})))),e.createElement(k,null,p&&e.createElement(ye,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_ERROR_REFUND_SELECT_ENTITLEMENT_MODAL"})),v&&e.createElement(ye,null,e.createElement(C.A,{stringKey:"ADM
104IN_LABEL_ERROR_REFUND_VALUE_ENTITLEMENT_MODAL"})),V&&e.createElement(ye,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_ERROR_REFUND_INVALID_VALUE_ENTITLEMENT_MODAL"})),e.createElement(P,{className:"center"},e.createElement(L,null,e.createElement(C.A,{stringKey:"REFUND"})),e.createElement(ge,null,e.createElement(pe,{ref:K,onChange:y,value:B.toFixed(2),width:B.toFixed(2).toString().length*7}),e.createElement("span",null,f))),e.createElement(P,{className:"center"},e.createElement(L,null,e.createElement(C.A,{stringKey:"REASON"})),e.createElement(te,{onChange:x,options:Le,placeholderKey:"SELECT",translated:!0,value:null})),e.createElement(P,null,e.createElement(L,{className:"top"},e.createElement(C.A,{stringKey:"DETAILS"})),e.createElement(q,{onChange:h,placeholderKey:"ADMIN_LABEL_DETAILS_REFUND_ENTITLEMENT_MODAL",value:S})),e.createElement(W,null,e.createElement(he,{onClick:d},e.createElement(C.A,{stringKey:"CANCEL"})),e.createElement(Ne,{isLoading:m,onClick:M},e.createElement(C.A,{stringKey:"REFUND"}),m&&e.createElement(Ee,{fade:!1,size:9})))),e.createElement(Ae,null,e.createElement(D,{className:"footer"},e.createElement(xe.S,{checked:ce,onChange:j,size:19}),e.createElement(Z,null,e.createElement(C.A,{stringKey:"ADMIN_TITLE_BOTTOM_REFUND_ENTITLEMENT_MODAL"}))),e.createElement(D,{className:"footer"},e.createElement(z.Info,{className:"size-5"}),e.createElement(b,{className:"footer-info-text"},e.createElement(C.A,{stringKey:"ADMIN_INFO_BOTTOM_REFUND_ENTITLEMENT_MODAL"})))))};var Ke=a(242689),Me=a.n(Ke),Te=a(465701),De=a(677764);const ne=(0,o.Ay)(de.A)`
105  min-width: 550px;
106  max-width: 550px;
107  border-radius: 10px;
108  background: ${l.dHK};
109`,_e=o.Ay.div`
110  padding: 30px 30px 20px;
111  border-bottom: 1px solid ${l.dmy};
112`,ve=o.Ay.div`
113  padding: 30px 45px;
114  border-top: 1px solid ${l.dmy};
115`,dt=o.Ay.div`
116  padding: 20px 45px 20px;
117`,ut=o.Ay.div`
118  ${u.ig}
119  margin-bottom: 5px;
120`,Ze=o.Ay.label`
121  ${u.Ns}
122  min-width: 50px;
123  margin-top: 10px;
124`,qe=o.Ay.div`
125  display: flex;
126  flex-direction: row;
127  & > label {
128    margin-right: 20px;
129  }
130`,mt=o.Ay.div`
131  display: flex;
132  flex-direction: row;
133  justify-content: flex-end;
134  & > button:nth-child(1) {
135    margin-right: 15px;
136  }
137`,pt=(0,o.Ay)(oe.Ay)`
138  background: ${l.YJk};
139`,Pt=(0,o.Ay)(Q._s)`
140  background: ${l.dmy};
141`,et=(0,o.Ay)(De.s)`
142  & > label > label {
143    background: ${l.dsC};
144  }
145  & > label > label > input:checked + span {
146    background: ${l.Qod};
147    background-color: ${l.Qod};
148  }
149`,Pe=o.Ay.div`
150  ${u.Ns}
151  color: ${l.o0B};
152  ${({disabled:t})=>t?(0,o.AH)`
153      color: ${l.sRE};
154      `:null}
155`,tt=o.Ay.div`
156  display: flex;
157  align-items: center;
158  padding: 5px 0px;
159  & > div:nth-child(1) {
160    margin-right: 12px;
161  }
162`,nt=o.Ay.div`
163  ${u.eb};
164  color: ${l.__g};
165  display: flex;
166  justify-content: flex-end;
167`,rt=(0,o.Ay)(Q._s)`
168  height: 40px;
169  padding: 0 10px;
170  ${({isLoading:t})=>t?(0,o.AH)`
171    ${ae.SA}
172    background: ${l.YJk};
173    color: white;
174    display: flex;
175    column-gap: 10px;
176    `:null}
177`,Et=(0,o.Ay)($.A).attrs(t=>({name:"three-bounce",colorOverride:(0,l.Qod)(t)}))`
178  & > div > div {
179    ${({size:t})=>t?(0,o.AH)`
180    width: ${t}px;
181    height: ${t}px;
182    `:null}
183  }
184  .sk-three-bounce {
185    height: auto;
186  }
187`;var ft=(t=>(t.immediately="immediately",t.schedule="schedule",t))(ft||{}),At=(t=>(t.noRefund="noRefund",t.refund="refund",t))(At||{});const le=[{label:"ADMIN_LABEL_OPTION_CANCEL_NO_REFUND_MODAL",value:"noRefund",index:0},{label:"ADMIN_LABEL_OPTION_CANCEL_REFUND_MODAL",value:"refund",index:1}],Fe=t=>{const{grantedMethod:n,currentPeriodEnd:r,onClose:d,onConfirm:T}=t,[p,E]=(0,e.useState)(!1),[m,O]=(0,e.useState)(!1),[v,I]=(0,e.useState)(le[0]),[V,c]=(0,e.useState)(n!==Te.TV.purchased),[A,x]=(0,e.useState)("immediately"),S=B=>{const ee=B.currentTarget.id;if(x(ee),ee==="schedule"||n!==Te.TV.purchased){I(le[0]),c(!0);return}c(!1)},J=()=>{if(!v?.value){E(!0);return}const B=n===Te.TV.customerService?"noRefund":v.value;O(!0),T(B==="refund",A==="immediately"?"cancel":"scheduleCancel")};return e.createElement(ne,{fixedDimensions:!0,id:F.Yr,onClose:d},e.createElement(_e,null,e.createElement(ut,null,e.createElement(C.A,{stringKey:"ADM
187IN_TITLE_CANCEL_ENTITLEMENT_MODAL"}))),e.createElement(dt,null,p&&e.createElement(nt,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_ERROR_CANCEL_ENTITLEMENT_MODAL"})),e.createElement(qe,null,e.createElement(Ze,null,e.createElement(C.A,{stringKey:"CANCEL"})),e.createElement("div",null,e.createElement(tt,null,e.createElement(et,{checked:A==="immediately",id:"immediately",onClick:S,readOnly:!0}),e.createElement(Pe,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_RADIO_IMMEDIATELY_CANCEL_MODAL"}),` ${Me()().format("MMM DD, YYYY")}`)),e.createElement(tt,null,e.createElement(et,{checked:A==="schedule",disabled:n!==Te.TV.purchased,id:"schedule",onClick:S,readOnly:!0}),e.createElement(Pe,{disabled:n!==Te.TV.purchased},e.createElement(C.A,{stringKey:"ADMIN_LABEL_RADIO_SCHEDULE_CANCEL_MODAL"}),` ${Me()(r).format("MMM DD, YYYY")}`)))),e.createElement(qe,null,e.createElement(Ze,null,e.createElement(C.A,{stringKey:"REFUND"})),e.createElement(pt,{isDisabled:V,onChange:I,options:le,placeholderKey:"SELECT",translated:!0,value:v}))),e.createElement(ve,null,e.createElement(mt,null,e.createElement(Pt,{onClick:d},e.createElement(C.A,{stringKey:"ADMIN_LABEL_DO_NOT_CANCEL_SUBSCRIPTION_MODAL"})),e.createElement(rt,{isLoading:m,onClick:J},e.createElement(C.A,{stringKey:"ADMIN_LABEL_CANCEL_SUBSCRIPTION_MODAL"}),m&&e.createElement(Et,{fade:!1,size:9})))))};var We=a(452156),je=a(514245),Cn=a(171751),Tn=a(584742),ie=a(41989),_n=a(288745),gt=a(217243),bt=a(942695),In=a(895277);const Mn=o.Ay.div`
188  width: 100%;
189  height: 100%;
190  padding: 10px;
191  z-index: 0;
192  background-color: ${l.k6P};
193`,Dn=o.Ay.div`
194  width: 100%;
195  height: 100%;
196  padding: 10px 30px;
197  background-color: ${l.YJk};
198
199  position: relative;
200  display: flex;
201  flex-flow: column nowrap;
202  ${In.EC};
203`,Sn=o.Ay.div`
204  display: flex;
205  flex-direction: row;
206  justify-content: space-between;
207  align-items: center;
208  height: 66px;
209  margin-bottom: 10px;
210`,On=o.Ay.div`
211  height: calc(100vh - 112px);
212`,Rn=o.Ay.h1`
213  ${u.ig};
214  margin: 0;
215  color: ${l.zkP};
216  &.withDescription {
217    margin-bottom: 0;
218  }
219`,ht=o.Ay.div``,$t=(0,bt.A)(ht,{admin:!0}
219);var Bt=a(613166),Nn=Object.defineProperty,Ut=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,wt=(t,n,r)=>n in t?Nn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,He=(t,n)=>{for(var r in n||(n={}))Ln.call(n,r)&&wt(t,r,n[r]);if(Ut)for(var r of Ut(n))Pn.call(n,r)&&wt(t,r,n[r]);return t};const bn=(0,ie.gV)(t=>(0,Bt.R)(()=>({month:t("ADMIN_LABEL_FREQUENCY_MONTHLY_RECURRING"),once:t("ADMIN_LABEL_FREQUENCY_ONE_TIME"),undefined:t("ADMIN_LABEL_FREQUENCY_ONE_TIME"),year:t("ADMIN_LABEL_FREQUENCY_ANNUALLY_RECURRING")}))),kt=(0,ie.gV)(t=>(0,Bt.R)(()=>({recurrence:{transformValue:n=>bn(t)[n]}}))),$n=1e4,ot=({date:t,showTime:n=!1})=>{const r={hour:"numeric",minute:"2-digit",hour12:!0};return new Intl.DateTimeFormat("en-us",He({year:"numeric",month:"short",day:"numeric"},n&&He({},r))).format(new Date(t))},Vt=t=>{const n=new Date(t),r=new Date(t);return r.setHours(0,0,0,0),n.getTime()===r.getTime()},Bn=(0,ie.gV)(t=>n=>{const r=[];return n.map(d=>{const T=d.id,p=He({accessor:T,title:T},d);return kt(t).hasOwnProperty(d.id)?r.push(He(He({},p),kt(t)[d.id])):r.push(p)}),r});var at=a(345393);const lt=(0,o.Ay)(Q.Ay)`
220  min-width: 152px;
221  height: 29px;
222  white-space: nowrap;
223  ${u.xu}
224`,Un=(0,o.Ay)(lt)`
225  min-width: 110px;
226  height: 40px;
227  ${({isLoading:t})=>t?(0,o.AH)`
228    ${at.SA}
229    background: ${l.YJk};
230    color: white;
231    display: flex;
232    column-gap: 10px;
233    `:null};
234`,st=(0,o.Ay)($.A).attrs(t=>({name:"three-bounce",colorOverride:(0,l.Qod)(t)}))`
235  & > div > div {
236    ${({size:t})=>t?(0,o.AH)`
237    width: ${t}px;
238    height: ${t}px;
239    `:null}
240  }
241  .sk-three-bounce{
242    height: auto;
243  }
244`,wn=({id:t,action:n,label:r,currentSubscription:d})=>{const T=(0,e.useMemo)(()=>d?.id===t,[d,t]),p=(0,e.useMemo)(()=>!!d.id&&d.id!==t,[d,t]);return e.createElement(Un,{className:"enable-on-row-hover","data-testid":"button-select",disabled:p,isLoading:T,onClick:n},r,T&&e.createElement(st,{fade:!1,size:9}))};var $e=a(990220),Ye=a(498685),kn=a(16357),Vn=a(221196),Kt=a.n(Vn),Kn=a(365179),Fn=a(463302),Be=a(89649),Qe=a(711678);const jn=o.Ay.div`
245  width: 100%;
246  height: 100%;
247  padding: 0;
248
249  display: flex;
250  flex-direction: column;
251
252  ${u.Z0}
253  color: ${l.o0B};
254`,Ft=o.Ay.div`
255  height: 100%;
256  flex: 1;
257
258  display: flex;
259  align-items: center;
260  justify-content: center;
261
262  ${u.pz};
263  color: ${l.o0B};
264`,Yn=o.Ay.div``,Wn=o.Ay.span`
265  display: block;
266  margin-top: 10px;
267  ${u.j4}
268`,Hn=o.Ay.div``,Qn=o.Ay.span`
269  ${u.j4}
270`,zn=o.Ay.div``;var jt=a(998524),Yt=a(789069),Gn=a(818339),Wt=a.n(Gn),Ht=a(598935),Se=a(283722),X=a(74846);const Xn=o.Ay.div`
271  & > div {
272    padding: 0;
273  }
274
275  & .${X.NK} {
276    padding: 0;
277
278    & > .rt-tr {
279      padding: 0px 15px;
280
281      & > .rt-th {
282        padding: 10px 5px;
283        font-size: 16px;
284      }
285    }
286  }
287
288  & .${X.zA} {
289    margin: 0px !important;
290    padding-top: 10px;
291
292    & > div {
293      background: ${l.k6P};
294      margin: 0 0 10px 0 !important;
295      border-radius: 10px;
296
297      &:last-child {
298        margin: 0 !important;
299        ${u.HU}
300      }
301
302      &:hover {
303        background: ${l.kjY};
304      }
305
306      & > .rt-tr {
307        background: ${l.k6P};
308        margin: 0;
309        padding: 0 15px;
310
311        & > .rt-td {
312          padding: 7px 20px 7px 0px;
313          transform: translateX(5px);
314          overflow: hidden;
315
316          & > div {
317            padding: 0;
318            line-height: 19px;
319
320            display: block;
321            white-space: nowrap;
322            text-overflow: ellipsis;
323            overflow: hidden;
324
325            button {
326              &:not(:first-child) {
327                margin-left: 15px;
328              }
329            }
330          }
331
332          &:last-child {
333            padding: 7px 0px;
334          }
335
336          &:nth-child(2) {
337            overflow: visible;
338
339            & > div {
340              overflow: visible;
341
342              & > span {
343                display: flex;
344                flex-direction: row;
345                align-items: center;
346                justify-content: center;
347
348                & > div {
349                  & > div {
350                    position: relative;
351                    & > div {
352                      position: absolute;
353                      top: -12px;
354                      left: 7px;
355                    }
356                  }
357                }
358              }
359            }
360          }
361        }
362      }
363    }
364  }
365
366`,Jn=o.Ay.div`
367  ${u.Ns}
368  width: 100%;
369  height: 70px;
370  display: flex;
371  justify-content: center;
372  align-items: center;
373  background: ${l.k6P};
374  color: ${l.zkP};
375`,Zn=o.Ay.div`
376  display: flex;
377  & > button:nth-child(2) {
378    margin-left: 10px;
379  }
380`,qn=(0,o.Ay)(lt)`
381  ${at.vE}
382  ${u.xu}
383  width: 100px;
384  min-width: 100px;
385  height: 40px;
386  background: ${l.Qod};
387  border-radius: 4.5px;
388  ${({disabled:t})=>t?(0,o.AH)`
389    background: ${l.dHK};
390    color: ${l.sRE};
391    `:null}
392`,er=o.Ay.div`
393  display: flex;
394  & > div {
395    margin-left: 7px;
396  }
397`,tr=(t=>(0,bt.A)(t,{admin:!0}
397))((0,o.Ay)(Se.Ay).attrs({name:"info"})`
398  color: ${({color:t})=>t};
399  & > svg {
400    width: 12px;
401    height: 12px;
402  }
403`);var Ue=(t=>(t.tickets="tickets",t.subscriptions="subscriptions",t))(Ue||{}),yt=(t=>(t.name="name",t.date="date",t.sku="SKU",t.status="status",t))(yt||{}),nr=Object.defineProperty,rr=Object.defineProperties,or=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,zt=(t,n,r)=>n in t?nr(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,vt=(t,n)=>{for(var r in n||(n={}))ar.call(n,r)&&zt(t,r,n[r]);if(Qt)for(var r of Qt(n))lr.call(n,r)&&zt(t,r,n[r]);return t},Gt=(t,n)=>rr(t,or(n));const Xt=({results:t,type:n})=>{const r=(0,R.useDispatch)(),d=(0,R.useSelector)(Yt.$E),T=(0,R.useSelector)(Yt.wT),[p,E]=(0,e.useState)({sorted:[{desc:!0,id:yt.date}],sortQuery:{sortBy:yt.date,sortDirection:-1}}),{t:m}=(0,ie._h)(),O=(0,e.useMemo)(()=>[{id:"date",accessor:"date",title:m("ADMIN_LABEL_DATE_GRANTED").toLocaleLowerCase(),maxWidth:200,transformValue:h=>h?ot({date:h}):"N/A"},{accessor:"status",title:m("ADMIN_LABEL_STATUS").toLocaleLowerCase(),maxWidth:220},{accessor:"name",title:m("ADMIN_LABEL_NAME").toLocaleLowerCase()},{accessor:"sku",title:m("ADMIN_LABEL_SKU")},{accessor:({methodDescription:h,accessCode:K,formattedPrice:f})=>h==="LABEL_ACCESS_CODE_METHOD"?m(h,{accessCode:K??""}):h==="LABEL_PURCHASED_METHOD"?m(h,{price:f??"--"}):m(h),title:m("ADMIN_LABEL_METHOD").toLocaleLowerCase(),preventSort:!0,maxWidth:250},{accessor:"actions",title:m("ADMIN_LABEL_ACTIONS").toLocaleLowerCase(),preventSort:!0,width:0}],[m]),v=(0,e.useCallback)(h=>{r((0,i.to)(h))},[]),I=(0,e.useCallback)(h=>{h.id&&(r((0,i.eg)({subscription:h})),v(s.VM.refund))},[]),V=(0,e.useCallback)(h=>{h.id&&r((0,Be.to)({data:{onConfirmClick:()=>r((0,i.Vh)({id:h.id,action:"remove"})),subtitleKey:"ADMIN_LABEL_REMOVE_ENTITLEMENT_SUBTITLE_MODAL",titleKey:"ADMIN_LABEL_REMOVE_ENTITLEMENT_TITLE_MODAL"},kind:Qe.V.adminConfirmation}))},[]),c=(0,e.useCallback)(h=>{h.id&&(r((0,i.eg)({subscription:h})),v(s.VM.cancel))},[]),A=(0,e.useCallback)((h,K,f,y,j)=>({text:h,func:()=>j?j(f):null,testId:K,disabled:y}),[]),x=(0,e.useCallback)(h=>{const K=n==="tickets",{canRemove:f}=h.actions,y=K&&!f,j=n==="subscriptions",M=h.status.toLocaleLowerCase()==="canceled";return!!(y||j&&M)},[n]),S=(0,e.useMemo)(()=>{const h=t.map(K=>{const{actions:f,wasRefunded:y,status:j}=K;let M=0;return f.canCancel&&M++,f.canRefund&&M++,f.canRemove&&M++,y&&M++,j.toLocaleLowerCase()==="canceled"&&!y&&n==="tickets"&&M++,M});return h.length>0?Math.max(...h):0},[t,n]),J=(0,e.useCallback)(h=>{const{id:K,actions:f,wasRefunded:y,status:j}=h,M=[];return f.canCancel&&M.push(A("CANCEL","button-cancel-subscription",h,!1,c)),f.canRefund&&M.push(A("REFUND","button-refund-ticket",h,!1,I)),f.canRemove&&M.push(A("REMOVE","button-remove-ticket",h,!1,V)),y&&M.push(A("REFUNDED","button-refunded-subscription",h,!0,void 0)),j.toLocaleLowerCase()==="canceled"&&!y&&n==="tickets"&&M.push(A("REMOVED","button-removed-ticket",h,!0,void 0)),M.map((w,ue)=>e.createElement(qn,{key:`${K}-${ue}`,"data-id":K,"data-testid":w.testId,disabled:w.disabled,onClick:w.disabled?null:w.func},e.createElement(C.A,{stringKey:w.text})))},[n]),B=(0,e.useMemo)(()=>{const h=O.map(K=>vt({},K));switch(S){case 0:case 1:h[5].width=110;break;case 2:h[5].width=220;break;case 3:h[5].width=330;break;default:h[5].width=void 0}return h},[S]),ee=(0,e.useMemo)(()=>{const h=O.map(K=>Gt(vt({},K),{testId:String(K.accessor)}));return h[5].width=110,h},[]),ce=(0,e.useMemo)(()=>{if(t)return t.map(h=>{const K=x(h);let f;if(h.status==="ADMIN_LABEL_ACTIVE")f="";else if(h.statusTooltip==="LABEL_TICKET_REMOVED")f=m(h.statusTooltip);else{const j=(h.dateCanceled||0)*1e3,M=Wt()(j);f=m(h.statusTooltip,{day:M.date(),month:m(Ht.s$[M.month()]),year:M.year()})}let y;if(h.status==="LABEL_REFUNDED_DATE"){const j=(h.dateRefunded||0)*1e3,M=Wt()(j);y=m(h.status,{day:M.date(),month:m(Ht.s$[M.month()]),year:M.year()})}else y=m(h.status);return Gt(vt({},h),{disabled:K,status:e.createElement(er,null,e.createElement("span",null,y),f&&e.createElement(tr,{color:K?d:T,tooltip:f})),actions:e.createElement(Zn,null,J(h))})})},[N()(t)]),we=(0,e.useCallback)(()=>{switch(n){case Ue.subscriptions:return ee;case Ue.tickets:return B;default:return O}},[n,ee,B]),Ie=(0,e.useCallback)(()=>n===Ue.subscriptions?m("ADMIN_PROFILE_VIEWER_HAS_NOT_PURCHASED_SUBSCRIPTION"):n===Ue.tickets?m("ADMIN_PROFILE_VIEWER_HAS_NOT_PURCHASED_TICKET"):"",[n,m]),Oe=(0,e.useCallback)(([h])=>{const{id:K,desc:f}=h,y={name:"name",date:"date",SKU:"sku",status:"status"},j=y[K];if(!j)return;let M=-1,w=!0;p.sortQuery.sortBy===y[K]&&(M=p.sortQuery.sortDirection===-1?1:-1,w=f),E({sorted:[{desc:w,id:K}],sortQuery:{sortBy:j,sortDirection:M}})},[N()(p)]);return e.createElement(Xn,{"data-testid":`community:table-${n}`},e.createElement(jt.Ay,{columns:we(),currentlySorted:p.sortQuery,data:ce,onSortedChange:Oe,sorted:p.sorted,useSelectorSorting:!0}),!t?.length&&e.createElement(Jn,null,Ie()))},sr=o.Ay.div``,ir=o.Ay.div`
404  display: flex;
405  align-items: center;
406  margin-top: 10px;
407  h1 {
408    margin-right: 10px;
409  }
410`,cr=o.Ay.span`
411  text-transform: capitalize;
412`,xt=o.Ay.div`
413  ${u.Ns}
414  color: ${l.sRE};
415  width: 80%;
416  margin: 0;
417  margin-bottom: 10px;
418  &.info-table {
419    color: ${l.sRE};
420    margin-bottom: 15px;
421  }
422`,dr=(0,o.Ay)(Q._s)`
423  ${at.vE}
424  ${u.xu}
425  height: 29px;
426  background: ${l.Qod};
427  border-radius: 4.5px;
428  margin-bottom: 15px;
429`,Jt=o.Ay.div`
430  ${u.pz}
431  color: ${l._e_};
432  margin: 25px 0px 15px;
433`,ur=o.Ay.h1`
434  ${u.$X};
435  color: ${l.o0B};
436  margin: 0 0 16px 0;
437  &.withDescription {
438    margin-bottom: 0;
439  }
440`,mr=o.Ay.div`
441  padding-bottom: 30px;
442`,pr=t=>{const n=(0,R.useDispatch)(),r=(0,e.useCallback)(()=>{n((0,i.to)(s.VM.grant))},[]);return e.createElement(sr,null,e.createElement(ir,null,e.createElement(ur,null,e.createElement(C.A,{stringKey:"ACCESS_CONTROL_TICKET_BUNDLE_SUBSCRIPTION_TITLE"})),e.createElement(dr,{"data-testid":"community:user-profile-grant-entitlement-button",onClick:r}
442,e.createElement(cr,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_COMMUNITY_GRANT_TICKET_BUNDLE_SUBSCRIPTION"})))),e.createElement(xt,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_COMMUNITY_GRANT_TICKET_BUNDLE_SUBSCRIPTION_DESCRIPTION"})),e.createElement(Jt,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_COMMUNITY_TICKETS_TITLE"})),e.createElement(xt,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_COMMUNITY_TICKETS_DESCRIPTION"})),e.createElement(e.Fragment,null,e.createElement(Xt,{results:t.tickets,type:Ue.tickets}),e.createElement(Jt,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_COMMUNITY_SUBSCRIPTIONS"}))),e.createElement(mr,null,e.createElement(xt,null,e.createElement(C.A,{stringKey:"ADMIN_LABEL_COMMUNITY_SUBSCRIPTIONS_DESCRIPTION"})),e.createElement(Xt,{results:t.subscriptions,type:Ue.subscriptions})))};var Er=a(976633),fr=a.n(Er),Ar=a(334509),Zt=a(904400),qt=a(11411);const gr=o.Ay.div`
443`,hr=o.Ay.h2`
444  ${u.$X};
445  margin: 10px 0px;
446`,yr=o.Ay.div`
447  display: flex;
448  margin: 20px 0px;
449`,vr=o.Ay.img`
450  max-height: 121px;
451  max-width: 121px;
452  min-height: 121px;
453  min-width: 121px;
454  border-radius: 100%;
455  margin-right: 15px;
456`,xr=o.Ay.div`
457  display: grid;
458  grid-template-columns: 45% 55%;
459  width: 50%;
460  row-gap: 10px;
461  max-width: 450px;
462`,Cr=o.Ay.a`
463  margin-left: 10px;
464  color: ${l.zkP};
465  text-decoration: underline;
466  ${u.EE}
467`,ze=o.Ay.div`
468  color: ${l.o0B};
469  ${({ellipsis:t})=>t?(0,o.AH)`
470    white-space: nowrap;
471    overflow: hidden;
472    text-overflow: ellipsis;
473    `:null}
474  .capitalize {
475    text-transform: capitalize;
476  }
477  .info {
478    ${u.Zf}
479  }
480`,Ge=o.Ay.h5`
481  margin: 0;
482  color: ${l.sRE};
483  ${u.EE}
484  margin-bottom: 5px;
485  text-transform: uppercase;
486`,Xe=o.Ay.span`
487  ${u.pz};
488`,Tr={"Site Admin":"ADMIN_INVITE_TAB_SITE_ADMIN",Producer:"ADMIN_ROLE_PRODUCER",Moderator:"ADMIN_INVITE_TAB_MODERATOR",User:"ADMIN_ROLE_USER",Creator:"ADMIN_ROLE_CREATOR"},_r=({accountData:t,onUpdateUserRole:n})=>{const{thumbnail:r,name:d,userId:T,service:p,roles:E,lastLogin:m}=t,v=(0,Ye.I4)({feature:qt.Xj.PAGES_V3,type:"feature"})?Zt.A:Ye.$M,[I]=v({collection:"pages"}),V=(0,R.useDispatch)(),{t:c}=(0,ie._h)(),A=(0,e.useMemo)(()=>(0,gt.startCase)((0,gt.lowerCase)((0,Ar.getUserRoleBasedOnPermissions)(E.map(J=>J.scope)).replace("_"," "))),[N()(E)]),x=()=>{V((0,Be.y_)(Qe.V.addUserRole))},S=()=>{var J,B;V((0,Be.to)({kind:Qe.V.addUserRole,data:{name:d,thumbnail:r,permissions:(J=E[0])==null?void 0:J.scope,specificChannelsIds:((B=E[0])==null?void 0:B.pageId)||[],pages:I,onChangeRole:n,onCancel:x}}))};return e.createElement(gr,null,e.createElement(hr,null,c("USER_PROFILE_TITLE")),e.createElement(yr,null,e.createElement(vr,{"data-testid":"community:user-profile-picture",src:r||fr()}),e.createElement(xr,null,e.createElement(ze,{ellipsis:!0},e.createElement(Ge,null,c("NAME")),e.createElement(Xe,{"data-testid":"community:user-profile-name"},d)),e.createElement(ze,{ellipsis:!0},e.createElement(Ge,null,c("SERVICE")),e.createElement(Xe,{"data-testid":"community:user-profile-service"},p)),e.createElement(ze,null,e.createElement(Ge,null,c("ADMIN_LABEL_ROLE")),e.createElement("div",null,e.createElement(Xe,{"data-testid":"community:user-profile-role"},c(Tr[A])),e.createElement(Cr,{onClick:S},c("CHANGE")))),e.createElement(ze,null,e.createElement(Ge,null,c("ADMIN_PROFILE_USER_ID")),e.createElement(Xe,{"data-testid":"community:user-profile-id"},T)),m&&e.createElement(ze,null,e.createElement(Ge,null,c("ADMIN_PROFILE_LAST_LOGIN")),e.createElement(Xe,{"data-testid":"community:user-last-login-date"},new Date(m).toLocaleDateString())))))},Ir=o.Ay.div`
489  display: flex;
490  align-items: center;
491  padding-top: 15px;
492  border-top: 1px solid ${l.kjY};
493  div {
494    margin-right: 9px;
495  }
496`,en=o.Ay.div`
497  color: ${l.o0B};
498  padding: 3px 5px;
499  background: ${l.k6P};
500  border-radius: 4px;
501  ${u.Ql}
502  cursor: pointer;
503`,Mr=o.Ay.div`
504  color: ${l.Qod};
505  ${u.Or}
506`,Dr=(0,o.Ay)(Se.Ay).attrs({name:"arrowLeft"})`
507  margin-right: 5px;
508  svg {
509    path {
510      fill: ${l.Qod};
511    }
512  }
513`,Sr=()=>{const t=(0,R.useDispatch)(),{t:n}=(0,ie._h)(),r=(0,e.useCallback)(()=>{t((0,i.g6)(s.Pp.userSection)),t((0,i.eg)({accountId:""}))},[]);return e.createElement(Ir,null,e.createElement(en,{"data-testid":"community:profile-back-button",onClick:r},n("ADMIN_LABEL_COMMUNITY_RESULTS_TITLE")),e.createElement(Mr,null,e.createElement(Dr,null)),e.createElement(en,null,n("USER_PROFILE_TITLE")))},Or=()=>{const t=(0,R.useDispatch)(),n=(0,R.useSelector)(g.wI),r=(0,R.useSelector)(Kn.V2d),d=(0,R.useSelector)(Fn.mC),[T,p]=(0,e.useState)(Kt().generate()),{t:E}=(0,ie._h)(),m=(0,e.useMemo)(()=>({url:`${$e.Jw}/account`,params:{accountId:n},refreshKey:T}),[n,T]),{data:O,error:v}=(0,Ye.ku)(m),I=(0,e.useMemo)(()=>!O,[O]),V=(0,e.useCallback)(A=>{var x;for(const S of A)if(S.scope==="Creator"&&((x=S.pageId)==null?void 0:x.length)===0){t((0,Be.eB)("ADMIN_ERROR_CREATOR_NO_PAGE"));return}(0,kn.A)({data:{roles:A},headers:{Authorization:`Bearer ${d}
513`,"x-maestro-client-id":r},method:"put",url:`${$e.fh}/roles/${n}`}).then(()=>{p(Kt().generate()),t((0,Be.y_)(Qe.V.addUserRole))}).catch(S=>{var J,B;if(((B=(J=S?.response)==null?void 0:J.data)==null?void 0:B.message)==="Max admins reached"){t((0,Be.to)({kind:Qe.V.upgradePlan,data:{planWarningMessage:"ADMIN_UPGRADE_PLAN_EXCEEDED_MAX_AMOUNT_OF_ADMINS"}}));return}t((0,Be.eB)("ADMIN_ERROR_GENERIC"))})},[t]),c=(0,e.useCallback)(()=>I?e.createElement(Ft,null,e.createElement(Yn,{"data-testid":"community:user-profile-spinner"},e.createElement(st,{fade:!1,size:11}),e.createElement(Wn,null,E("LOADING")))):v?e.createElement(Ft,null,e.createElement(Hn,null,e.createElement(Qn,null,E("ADMIN_ERROR_NETWORK_ERROR")))):e.createElement(zn,null,e.createElement(_r,{accountData:O.accountItem,onUpdateUserRole:V}),e.createElement(pr,{subscriptions:O.subscriptions,tickets:O.tickets})),[I,v,O]);return e.createElement(jn,{"data-testid":"community:user-profile"},e.createElement(Sr,null),c())},Rr=o.Ay.div`
514  width: 100%;
515  height: 100%;
516  padding: 0;
517  ${u.Z0}
518  color: ${l.o0B};
519`;var Je=a(642675),Nr=a(143727),Lr=a(272568),Ct=a(997948),Pr=a(79321);const br=o.Ay.div`
520  width: 100%;
521  padding-bottom: 20px;
522  border-bottom: 1px solid ${l.kjY};
523  margin-bottom: 20px;
524
525  display: flex;
526  flex-direction: row;
527  align-items: center;
528
529  & > .${X.DU} {
530    padding: 0;
531  }
532`,$r=(0,o.Ay)(Pr.A)`
533  width: auto;
534  max-width: 500px;
535  margin-right: 20px;
536  background: ${l.k6P};
537`,Br=o.Ay.p`
538  margin: 0;
539  margin-right: 10px;
540
541  display: flex;
542  align-items: center;
543
544  ${u.pz};
545  color: ${l.o0B};
546`,Ur=o.Ay.div`
547  display: flex;
548  flex-direction: row;
549  align-items: center;
550
551  padding: 4px;
552  margin-right: 10px;
553  width: max-content;
554  border-radius: 5px;
555  border: 1px solid ${l.kjY};
556
557  input {
558    min-height: 30px;
559    height: 30px;
560  }
561
562  &:hover {
563    border: 1px solid ${l.Qod};
564  }
565
566  ${t=>t.isActive&&(0,o.AH)`
567    border: 1px solid ${l.Qod};
568  `};
569
570  & .${X.HH} {
571    background-color: ${l.k6P};
572    padding: 20px 10px;
573    &:hover {
574      background-color: ${l.kjY};
575    }
576  }
577
578  & .active {
579    & .${X.HH} {
580      background-color: ${l.Qod};
581    }
582    span {
583      color: ${l.o0B} !important;
584      & > svg * {
585        fill: ${l.o0B} !important;
586        stroke: ${l.o0B} !important;
587      }
588    }
589  }
590
591  & .${X.OX} {
592    margin-top: 8px;
593    max-height: 280px;
594    width: 260px !important;
595
596    & .${X.HH} {
597      width: 100%;
598      white-space: nowrap;
599      overflow: hidden;
600      text-overflow: ellipsis;
601    }
602  }
603
604  & .${X.zt} {
605    width: 260px !important;
606    min-width: 260px;
607    padding-right: 35px;
608    color: ${l.o0B};
609  }
610
611  & .${X.DU} {
612    padding: 0 !important;
613    padding-top: 0 !important;
614    padding-bottom: 0 !important;
615  }
616
617  & .${X.lm} {
618    min-height: 30px;
619    height: 30px;
620  }
621`,ja=o.Ay.p`
622  ${u.Ns};
623  margin: 0px 10px;
624`,wr=o.Ay.div`
625  display: inline-flex;
626  align-items: stretch;
627  height: 30px;
628  margin-right: 8px;
629  padding: 2px;
630  border-radius: 6px;
631  background: ${l.kjY};
632`,tn=o.Ay.button`
633  display: inline-flex;
634  align-items: center;
635  justify-content: center;
636  min-width: 72px;
637  padding: 0 14px;
638  border: none;
639  border-radius: 4px;
640  cursor: pointer;
641  background: ${t=>t.isActive?(0,l.Qod)(t):"transparent"};
642  color: ${l.o0B};
643  ${u.Ns};
644  transition: background 120ms ease;
645
646  &:hover {
647    background: ${t=>t.isActive?(0,l.Qod)(t):(0,l.k6P)(t)};
648  }
649`,kr=o.Ay.div`
650  display: flex;
651  flex-direction: row;
652  align-items: center;
653
654  position: relative;
655  width: max-content;
656  padding: 4px;
657  margin-right: 10px;
658  border-radius: 5px;
659  border: 1px solid ${l.kjY};
660
661  &:hover {
662    border: 1px solid ${l.Qod};
663  }
664
665  ${t=>t.isActive&&(0,o.AH)`
666    border: 1px solid ${l.Qod};
667  `};
668`,Vr=o.Ay.div`
669  width: 100%;
670
671  & > .${X.DU} {
672    padding: 0 !important;
673    padding-top: 0 !important;
674    padding-bottom: 0 !important;
675    height: 30px;
676
677    ${t=>t.selected&&(0,o.AH)`
678      & .${X.Ir} {
679        background: ${l.k6P};
680      }
681    `};
682
683    & .${X.Ir} {
684      width: auto;
685      height: 100%;
686      opacity: 1 !important;
687      & > button {
688        cursor: pointer !important;
689      }
690
691      & .${X.lm} {
692        min-height: 30px;
693        height: 30px;
694
695        & .${X.zt} {
696          width: max-content;
697          min-width: 270px;
698          padding-right: 35px;
699          color: ${l.o0B};
700        }
701      }
702    }
703  }
704`,Kr=o.Ay.p`
705  ${u.Ns};
706  margin: 0px 10px;
707`,Fr=o.Ay.div`
708  display: flex;
709  flex-direction: row;
710  align-items: center;
711
712  width: max-content;
713  padding: 4px;
714  margin-right: 10px;
715  border-radius: 5px;
716  border: 1px solid ${l.kjY};
717
718  input {
719    min-height: 30px;
720    height: 30px;
721  }
722
723  &:hover {
724    ${t=>!t.disabled&&(0,o.AH)`
725      border: 1px solid ${l.Qod};
726    `}
727  }
728
729  ${t=>t.isActive&&(0,o.AH)`
730    border: 1px solid ${l.Qod};
731  `};
732
733  div {
734    ${t=>t.disabled&&(0,o.AH)`
735      cursor: default;
736    `}
737  }
738
739  & .${X.zt} {
740    width: max-content;
741    min-width: 300px;
742    padding-right: 35px;
743    color: ${l.o0B};
744  }
745
746  & .${X.OX} {
747    margin-top: 6px;
748
749    & [data-overlayscrollbars-viewport] > div > div:first-child, .icon-down-open{
750      display: none;
751    }
752  }
753
754  & .${X.HH} {
755    background-color: ${l.k6P};
756    padding: 20px 10px;
757    &:hover {
758      background-color: ${l.kjY};
759    }
760  }
761
762  & .${X.DU} {
763    padding: 0 !important;
764    padding-top: 0 !important;
765    padding-bottom: 0 !important;
766  }
767
768  & .${X.lm} {
769    background-color: ${l.k6P};
770    min-height: 30px;
771    height: 30px;
772  }
773`;var jr=Object.defineProperty,Yr=Object.defineProperties,Wr=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable,rn=(t,n,r)=>n in t?jr(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Tt=(t,n)=>{for(var r in n||(n={}))Hr.call(n,r)&&rn(t,r,n[r]);if(nn)for(var r of nn(n))Qr.call(n,r)&&rn(t,r,n[r]);return t},_t=(t,n)=>Yr(t,Wr(n));const zr=()=>{const t=(0,Je.A)(),n=(0,_.A)(Lr.dO),r=(0,_.A)(g.vD),{t:d}=(0,ie._h)(),p=(0,Ye.I4)({feature:qt.Xj.PAGES_V3,type:"feature"})?Zt.A:Nr.A,E=r?.pageType===s.WS.videoPage,m=d(E?"ADMIN_LABEL_ALL_V
773IDEOS_OVERLAY":"ADMIN_LABEL_ALL_CHANNEL_OVERLAY"),O=(0,e.useCallback)(S=>{S!==E&&(t((0,i.DE)(s.l2.ready)),t((0,i.UQ)(1)),t((0,i.R6)(_t(Tt({},r),{pageType:S?s.WS.videoPage:void 0,pageId:void 0,pageName:void 0,entitlementType:void 0}))),t((0,i.k0)(s.dS.accountInfo)),t((0,i.Ri)("")))},[N()(r),E]),v=(0,e.useCallback)(S=>{if(!S.value||!S.id)return;if(t((0,i.DE)(s.l2.ready)),t((0,i.UQ)(1)),S.value===m){t((0,i.R6)(_t(Tt({},r),{pageType:E?s.WS.videoPage:void 0,pageId:void 0,pageName:void 0})));return}const{value:J,id:B}=S;t((0,i.R6)(_t(Tt({},r),{pageType:E?s.WS.videoPage:s.WS.channel,pageId:B,pageName:J})))},[N()(r),m,E]),I=(0,e.useCallback)(S=>S.value,[]),[V]=p({collection:"pages",refreshKey:n,search:""}),c=(0,e.useMemo)(()=>E?V?.filter(S=>S.type===Ct.HY.VIDEO_PAGE):V?.filter(S=>S.type===Ct.HY.CHANNEL||S.type===Ct.HY.LANDING),[V,E]),A=(0,e.useMemo)(()=>{const S={id:m,value:m,selected:!0,"data-testid":E?"community:video-to-filter:all-videos":"community:channel-to-filter:all-channels"},J=c?.map(B=>{var ee,ce;return{id:B._id,value:((ee=B.data)==null?void 0:ee.name)||((ce=B.seo)==null?void 0:ce.title),selected:!1,"data-testid":E?"community:video-to-filter":"community:channel-to-filter"}})||[];return[S,...J]},[c,m,E]),x=(0,e.useMemo)(()=>({value:r?.pageName||m}),[N()(r),m]);return e.createElement(e.Fragment,null,e.createElement(wr,{"data-testid":"community:channel-filter-mode",role:"tablist"},e.createElement(tn,{"aria-selected":!E,"data-testid":"community:channel-filter-mode:channel",isActive:!E,onClick:()=>O(!1),role:"tab",type:"button"},d("ADMIN_LABEL_CHANNEL")),e.createElement(tn,{"aria-selected":E,"data-testid":"community:channel-filter-mode:video",isActive:E,onClick:()=>O(!0),role:"tab",type:"button"},d("ADMIN_LABEL_VIDEO"))),e.createElement(oe.Ay,{dataTestId:"community:channel-filter:dropdown",getOptionLabel:I,isSearchable:!1,onChange:v,options:A,shouldHideTitle:!1,value:x}))};var on=a(483881);const Wa=(0,o.Ay)(de.A)`
774  min-width: 600px;
775  max-width: 800px;
776  min-height: 500px;
777  border-radius: 10px;
778  background: ${l.dHK};
779`,Gr=o.Ay.div`
780  display: flex;
781  flex-direction: row;
782  width: 100%;
783`,an=o.Ay.div`
784  width: 48%;
785  &:first-child {
786    margin-right: 10px;
787  }
788  & .${X.lj} {
789    margin-top: 5px;
790  }
791`,Xr=o.Ay.div`
792  ${u.EE}
793  color: ${l.zkP};
794`,Jr=o.Ay.div`
795  position: absolute;
796  text-align: left;
797  top: 100%;
798  left: 0px;
799  background: ${l.k6P};
800  width: 416.44px;
801  border-radius: 5px;
802  z-index: 1;
803  margin-top: 5px;
804  padding: 15px 10px 10px 10px;
805  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
806
807  & .${X.jQ} {
808    margin-top: 5px;
809
810    & .${X.Bg} {
811      display: none;
812    }
813    input {
814      transform: translateY(-7px);
815    }
816
817    & .${X.rw} {
818      border: 1px solid ${l.dHK};
819    }
820  }
821
822  .iWDYcd {
823    width: 100%;
824  }
825`;var Zr=Object.defineProperty,qr=Object.defineProperties,eo=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable,sn=(t,n,r)=>n in t?Zr(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,it=(t,n)=>{for(var r in n||(n={}))to.call(n,r)&&sn(t,r,n[r]);if(ln)for(var r of ln(n))no.call(n,r)&&sn(t,r,n[r]);return t},ct=(t,n)=>qr(t,eo(n));const ro=()=>{const t=(0,Je.A)(),n=(0,_.A)(g.Se),r=(0,_.A)(g.DJ),d=(0,_.A)(g.vD)||{},{t:T}=(0,ie._h)(),[p,E]=(0,e.useMemo)(()=>[d?.timeStart||null,d?.timeEnd||null],[N()(d)]),m=(0,e.useCallback)(c=>{c.preventDefault(),c.stopPropagation()},[]),O=(0,e.useCallback)(c=>{if(!(typeof c=="number"&&isNaN(c))){if(!c||c!==E)t((0,i.R6)(ct(it({},d),{timeStart:c})));else{const A=new Date(E),x=A.setHours(A.getHours()+1);t((0,i.R6)(ct(it({},d),{timeStart:c,timeEnd:x})))}t((0,i.FZ)(s.VM.dateTime)),t((0,i.DE)(s.l2.ready)),t((0,i.UQ)(1))}},[N()(d)]),v=(0,e.useCallback)(c=>{if(!(typeof c=="number"&&isNaN(c))){if(!c||c!==p)t((0,i.R6)(ct(it({},d),{timeEnd:c})));else{const A=new Date(c),x=A.setHours(A.getHours()+1);t((0,i.R6)(ct(it({},d),{timeEnd:x})))}t((0,i.FZ)(s.VM.dateTime)),t((0,i.DE)(s.l2.ready)),t((0,i.UQ)(1))}},[N()(d)]),I=(0,e.useCallback)(c=>{const A=Me()().endOf("day");return c>A},[]),V=(0,e.useCallback)(c=>{const A=c>Me()().endOf("day"),x=c.toDate().getTime(),S=p?x<p:!1;return A||S},[p]);return e.createElement(Jr,{"data-testid":"community:date-time-picker-modal",onClick:m},e.createElement(Xr,null,T("ADMIN_COMMUNITY_CHOOSE_TIME_RANGE")),e.createElement(Gr,null,e.createElement(an,null,e.createElement(on.Ay,{dateSelectKey:"TIME_PERIOD_START_DATE",hideClearButton:!n,hideTimezone:!0,isOutsideRange:I,onTimeChange:O,timeSelectKey:"TIME_PERIOD_START_TIME",timestamp:p,verticalTime:!0})),e.createElement(an,null,e.createElement(on.Ay,{dateSelectKey:"TIME_PERIOD_END_DATE",hideClearButton:!r,hideTimezone:!0,isOutsideRange:V,onTimeChange:v,timeSelectKey:"TIME_PERIOD_END_TIME",timestamp:E,verticalTime:!0}))))},oo=()=>{const t=(0,R.useDispatch)(),n=(0,R.useSelector)(g.vD),r=(0,R.useSelector)(g.CA),d=(0,e.useCallback)(v=>v.value,[]),{t:T}=(0,ie._h)(),p=(0,e.useMemo)(()=>
825{if(!(n?.timeStart&&n?.timeEnd))return[{id:"All Time",value:T("ADMIN_COMMUNITY_ALL_TIME"),selected:!0}];const I=!Vt(n.timeStart)||!Vt(n.timeEnd),V=ot({date:n.timeStart,showTime:I}),c=ot({date:n.timeEnd,showTime:I}),A=`${V} - ${c}`;return[{id:A,value:A,selected:!0}]},[N()(n)]),E=(0,e.useCallback)(()=>{m(s.VM.dateTime)},[]),m=(0,e.useCallback)(v=>{t((0,i.to)(v))},[]),O=(0,e.useMemo)(()=>r===s.VM.dateTime,[r]);return e.createElement(Vr,{onClick:E,selected:O},e.createElement(oe.Ay,{"data-testid":"community:time-filter:dropdown",getOptionLabel:d,isDisabled:!0,value:p[0],options:p,onChange:()=>{}}),O?e.createElement(ro,null):null)},ao=o.Ay.div`
826  width: 100%;
827`,lo=o.Ay.div`
828  display: flex;
829  flex-direction: row;
830  align-items: center;
831  height: 30px;
832`,so=o.Ay.div`
833  height: 100%;
834  width: max-content;
835  padding: 5px 20px;
836  border: 1px solid ${l.Qod};
837  border-radius: 5px;
838  background: ${l.kjY};
839
840  display: flex;
841  flex-direction: row;
842  align-items: center;
843`,io=o.Ay.p`
844  color: #eee;
845`,co=o.Ay.div`
846  height: 100%;
847  padding: 10px 5px;
848  border: 1px solid ${l.kjY};
849  border-radius: 5px;
850  margin: 0px 7.5px;
851  background: ${l.k6P};
852
853  display: flex;
854  align-items: center;
855  justify-content: center;
856`,uo=o.Ay.p`
857  color: #eee;
858`,mo=o.Ay.div`
859  height: 100%;
860`,po=o.Ay.input`
861  width: ${t=>t.width};
862  height: 100%;
863  padding: 10px 5px;
864  border: 1px solid ${l.kjY};
865  border-radius: 5px;
866  background: ${l.k6P};
867
868  text-align: center;
869  color: ${l.o0B};
870`,Eo=o.Ay.div`
871  min-width: 102.03px;
872  width: max-content;
873  height: 100%;
874  padding: 10px 15px;
875  border: 1px solid ${l.kjY};
876  border-radius: 5px;
877  background: ${l.kjY};
878
879  display: flex;
880  flex-direction: row;
881  align-items: center;
882  justify-content: center;
883
884  text-align: center;
885  color: ${l.o0B};
886`,fo=o.Ay.button`
887  height: 80%;
888  padding: 10px;
889  border-radius: 5px;
890  margin: 0 5px;
891  background: ${l.Qod};
892
893  display: flex;
894  align-items: center;
895  justify-content: center;
896
897  color: ${l.o0B};
898  ${u.cs}
899`,Ao=o.Ay.div`
900  position: relative;
901  display: flex;
902  flex-direction: row;
903  align-items: center;
904  height: 30px;
905`,go=o.Ay.button`
906  width: 180px;
907  min-height: 30px;
908  padding: 4px 12px;
909  border: 1px solid ${l.Qod};
910  border-radius: 5px;
911  background: ${l.kjY};
912  cursor: pointer;
913
914  display: flex;
915  flex-wrap: wrap;
916  align-items: center;
917  gap: 6px;
918  text-align: left;
919
920  &:hover {
921    background: ${l.dHK};
922  }
923`,ho=o.Ay.span`
924  color: ${l.o0B};
925  white-space: nowrap;
926  ${u.EE};
927`,yo=o.Ay.button`
928  height: 80%;
929  padding: 0 10px;
930  border-radius: 5px;
931  margin: 0 5px;
932  background: ${l.Qod};
933  border: none;
934  cursor: pointer;
935
936  display: flex;
937  align-items: center;
938  justify-content: center;
939
940  color: ${l.o0B};
941  ${u.cs}
942`,It=({type:t,searchedEntitlement:n})=>{const r=(0,R.useDispatch)(),d=(0,R.useSelector)(g.V8),T=(0,e.useMemo)(()=>`community:${t}-filter`,[t]),p=(0,e.useMemo)(()=>`community:${t}-search`,[t]),E=(0,e.useMemo)(()=>[s.dS.accessCode,s.dS.receiptNumber].includes(t),[t]),{t:m}=(0,ie._h)(),O=(0,e.useCallback)(A=>{switch(A){case s.dS.accessCode:return m("ADMIN_LABEL_ACCESS_CODE");case s.dS.receiptNumber:return m("ADMIN_LABEL_RECEIPT_NUMBER");case s.dS.entitlements:return m("ADMIN_LABEL_ENTITLEMENT");default:return}},[m]),v=(0,e.useCallback)(A=>{switch(A){case s.dS.accessCode:return"112.7px";case s.dS.receiptNumber:return"118.71px";default:return"0px"}},[]),I=(0,e.useCallback)(A=>{switch(A){case s.dS.accessCode:return 6;case s.dS.receiptNumber:return 11;default:return 0}},[]),V=(0,e.useCallback)(()=>{if(t===s.dS.entitlements){r((0,i.Ri)("")),r((0,i.k0)(s.dS.accountInfo));return}if(d!==""){r((0,i.Ri)(""));return}r((0,i.k0)(s.dS.accountInfo))},[d]),c=(0,e.useCallback)(({target:{value:A}})=>{r((0,i.Ri)(A.trim().toUpperCase()))},[]);return e.createElement(lo,{"data-testid":T},e.createElement(so,null,e.createElement(io,null,O(t))),e.createElement(co,null,e.createElement(uo,null,"=")),e.createElement(mo,null,E?e.createElement(po,{"data-testid":p,maxLength:I(t),onChange:c,placeholder:m("ADMIN_LABEL_COMMUNITY_INPUT_ENTER_VALUE"),value:d,width:v(t)}):e.createElement(Eo,null,n)),e.createElement(fo,{"data-testid":"community:property-to-filter-reset",onClick:V},"-"))},vo=()=>e.createElement(It,{type:s.dS.accessCode}),xo=()=>e.createElement(It,{type:s.dS.receiptNumber}),Co=()=>{const t=(0,R.useSelector)(g.xA);return e.createElement(It,{searchedEntitlement:t,type:s.dS.entitlements})};var To=Object.defineProperty,_o=Object.defineProperties,Io=Object.getOwnPropertyDescriptors,cn=Object.getOwnPropertySymbols,Mo=Object.prototype.hasOwnProperty,Do=Object.prototype.propertyIsEnumerable,dn=(t,n,r)=>n in t?To(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,So=(t,n)=>{for(var r in n||(n={}))Mo.call(n,r)&&dn(t,r,n[r]);if(cn)for(var r of cn(n))Do.call(n,r)&&dn(t,r,n[r]);return t},Oo=(t,n)=>_o(t,Io(n));const un=({type:t})=>{const n=(0,Je.A)(),r=(0,_.A)(g.vD),{t:d}=(0,ie._h)(),T=(0,e.useMemo)(()=>
942t===s.dS.videoRental?d("ADMIN_LABEL_VIDEO_RENTAL"):d("ADMIN_LABEL_VIDEO_PURCHASE"),[t,d]),p=(0,e.useCallback)(()=>{n((0,i.DE)(s.l2.ready)),n((0,i.UQ)(1)),n((0,i.R6)(Oo(So({},r),{entitlementType:void 0}))),n((0,i.Ri)("")),n((0,i.k0)(s.dS.accountInfo))},[N()(r)]);return e.createElement(Ao,{"data-testid":`community:${t}-filter`},e.createElement(go,{as:"div","data-testid":`community:${t}-label`,isOpen:!1},e.createElement(ho,null,T)),e.createElement(yo,{"data-testid":"community:property-to-filter-reset",onClick:p,type:"button"},"-"))},Ro=()=>e.createElement(un,{type:s.dS.videoRental}),No=()=>e.createElement(un,{type:s.dS.videoPurchase});var Lo=Object.defineProperty,Po=Object.defineProperties,bo=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,Bo=Object.prototype.propertyIsEnumerable,pn=(t,n,r)=>n in t?Lo(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Mt=(t,n)=>{for(var r in n||(n={}))$o.call(n,r)&&pn(t,r,n[r]);if(mn)for(var r of mn(n))Bo.call(n,r)&&pn(t,r,n[r]);return t},Dt=(t,n)=>Po(t,bo(n));const Uo=({disabled:t})=>{const n=(0,R.useDispatch)(),r=(0,R.useSelector)(g.yn),d=(0,R.useSelector)(g.vD),T=d?.pageType===s.WS.videoPage,{t:p}=(0,ie._h)(),E=(0,e.useMemo)(()=>{const ee={id:s.dS.accountInfo,value:p("ADMIN_LABEL_SELECT_PROPERTY"),disabled:!0,selected:!0};return T?[ee,{id:s.dS.entitlements,"data-testid":"community:property-to-filter",value:p("ADMIN_LABEL_ENTITLEMENT"),disabled:!1,selected:!1},{id:s.dS.videoRental,"data-testid":"community:property-to-filter",value:p("ADMIN_LABEL_VIDEO_RENTAL"),disabled:!1,selected:!1},{id:s.dS.videoPurchase,"data-testid":"community:property-to-filter",value:p("ADMIN_LABEL_VIDEO_PURCHASE"),disabled:!1,selected:!1}]:[ee,{id:s.dS.accessCode,"data-testid":"community:property-to-filter",value:p("ADMIN_LABEL_ACCESS_CODE"),disabled:!1,selected:!1},{id:s.dS.entitlements,"data-testid":"community:property-to-filter",value:p("ADMIN_LABEL_ENTITLEMENT"),disabled:!1,selected:!1}]},[p,T]),m=(0,e.useMemo)(()=>r===s.dS.accountInfo,[r]),O=(0,e.useMemo)(()=>r===s.dS.accessCode,[r]),v=(0,e.useMemo)(()=>r===s.dS.receiptNumber,[r]),I=(0,e.useMemo)(()=>r===s.dS.entitlements,[r]),V=(0,e.useMemo)(()=>r===s.dS.videoRental,[r]),c=(0,e.useMemo)(()=>r===s.dS.videoPurchase,[r]),A=(0,e.useCallback)(ee=>ee.value,[]),x=(0,e.useCallback)(ee=>{const ce=ee.id;if(ce===s.dS.videoRental){n((0,i.k0)(s.dS.paidEntitlements)),n((0,i.Ri)("")),n((0,i.R6)(Dt(Mt({},d),{entitlementType:s.w.vodRental})));return}if(ce===s.dS.videoPurchase){n((0,i.k0)(s.dS.paidEntitlements)),n((0,i.Ri)("")),n((0,i.R6)(Dt(Mt({},d),{entitlementType:s.w.vodPurchase})));return}n((0,i.k0)(ce)),d?.entitlementType&&n((0,i.R6)(Dt(Mt({},d),{entitlementType:void 0}))),ce===s.dS.entitlements&&n((0,i.to)(s.VM.entitlements))},[N()(d)]),S=(0,e.useCallback)(()=>{n((0,i.DE)(s.l2.ready)),n((0,i.UQ)(1))},[]),J=V||r===s.dS.paidEntitlements&&d?.entitlementType===s.w.vodRental,B=c||r===s.dS.paidEntitlements&&d?.entitlementType===s.w.vodPurchase;return e.createElement(ao,{onClick:S},m&&!J&&!B&&e.createElement(oe.Ay,{dataTestId:"community:property-to-filter-dropdown",getOptionLabel:A,isDisabled:t,isSearchable:!1,onChange:x,options:E,shouldHideTitle:!1,value:{id:s.dS.accountInfo,value:p("ADMIN_LABEL_SELECT_PROPERTY"),disabled:!0,selected:!0}}),O&&e.createElement(vo,null),v&&e.createElement(xo,null),I&&e.createElement(Co,null),J&&e.createElement(Ro,null),B&&e.createElement(No,null))},wo=()=>{const t=(0,Je.A)(),n=(0,e.useRef)(null),r=(0,_.A)(g.V8),d=(0,_.A)(g.YQ),T=(0,_.A)(g.Iv),p=(0,_.A)(g.W_),E=(0,_.A)(g.o1),{t:m}=(0,ie._h)(),O=(0,e.useMemo)(()=>E?r:"",[E,r]),v=(0,e.useCallback)(I=>{t((0,i.Ri)(I)),t((0,i.k0)(s.dS.accountInfo)),t((0,i.DE)(s.l2.ready)),t((0,i.UQ)(1))},[]);return(0,e.useEffect)(()=>{r||n&&n.current&&(n.current.value="")},[r]),e.createElement(br,{"data-testid":"result-actions-filter"},e.createElement($r,{"data-testid":"community:accountInfo-search",defaultValue:O,inputRef:n,maxLength:32,onSearch:v,searchPlaceholderKey:"ADMIN_LABEL_COMMUNITY_FILTER_PLACEHOLDER"}),e.createElement(Br,null,m("ADMIN_LABEL_COMMUNITY_FILTERS_TITLE")),e.createElement(Ur,{"data-testid":"community:channel-filter",id:"channelSelect",isActive:d},e.createElement(zr,null)),e.createElement(kr,{"data-testid":"community:time-filter",isActive:T},e.createElement(Kr,null,m("ADMIN_LABEL_COMMUNITY_TIME_FILTER_TITLE")),e.createElement(oo,null)),e.createElement(Fr,{"data-testid":"community:property-filter",disabled:E,isActive:p},e.createElement(Uo,{disabled:E})))};var ko=a(619545);const Vo=o.Ay.div`
943  ${u.pz};
944  width: 100%;
945  display: flex;
946  flex-direction: row;
947  align-items: center;
948`,Ko=o.Ay.div`
949  ${u.pz};
950  display: flex;
951  align-items: center;
952  color: ${l.o0B};
953  margin-right: 20px;
954`,En=(0,o.Ay)(lt)`
955  ${({isLoading:t})=>t?(0,o.AH)`
956    ${at.SA};
957    background: ${l.YJk};
958    color: white;
959    `:null}
960`,Fo=o.Ay.div`
961  margin-right: 10px;
962  ${u.EE}
963`,jo=(0,o.Ay)(ko.A)`
964  display: flex;
965  flex-direction: row;
966  align-items: center;
967
968  background: ${l.Qod};
969  border-radius: 5px;
970  padding: 8px 15px;
971  min-width: 152px;
972  height: 29px;
973  white-space: nowrap;
974
975  ${u.xu}
976  color: ${l.o0B};
977  text-decoration: none;
978  text-transform: uppercase;
979`,Yo=(0,o.Ay)(Se.Ay).attrs({name:"download",color:"white"})`
980  margin-right: 10px;
981  & {
982    display: flex;
983    align-items: center;
984    justify-content: center;
985  }
986`,Wo=({totalCount:t})=>{const n=(0,Je.A)(),r=(0,_.A)(g.wL),d=(0,_.A)(g.J7),T=(0,_.A)(g.pD),{t:p}=(0,ie._h)(),E=(0,_.A)(g.Iv),[m,O]=(0,Ye.Cg)("community_export_jobs",r),v=(0,e.useCallback)(()=>{n((0,i.eK)())},[]),I=(0,e.useCallback)(()=>{n((0,i.DE)(s.l2.ready)),n((0,i.XY)(null))},[]);(0,e.useEffect)(()=>
986{if(!(!m||!O))switch(m.status){case"done":n((0,i.DE)(s.l2.download)),n((0,i.Vp)(m.link));break;case"error":n((0,i.DE)(s.l2.ready)),n((0,i.XY)(null));break;default:}},[N()(m),O]);const V=(0,e.useCallback)(()=>{switch(T){case s.l2.ready:return e.createElement(En,{onClick:v},p("ADMIN_COMMUNITY_EXPORT_RESULTS"));case s.l2.loading:return e.createElement(En,{isLoading:!0},e.createElement(Fo,null,p("ADMIN_COMMUNITY_EXPORT_RESULTS")),e.createElement(st,{fade:!1,size:9}));case s.l2.download:return e.createElement(jo,{href:d,onClick:I},e.createElement(Yo,null),p("ADMIN_COMMUNITY_DOWNLOAD_RESULTS"));default:return null}},[T,d]),c=(0,e.useMemo)(()=>{const A=new Intl.NumberFormat("en-US").format(t);if(t===0)return p("ADMIN_COMMUNITY_RESULT_NO_USERS");if(E){const x=t>1;return p(x?"ADMIN_COMMUNITY_RESULT_LOGIN_RANGE_PLURAL":"ADMIN_COMMUNITY_RESULT_LOGIN_RANGE",{formattedNumber:A})}return t===1?p("ADMIN_COMMUNITY_RESULT_ONE_USER",{formattedNumber:A}):t===$n?p("ADMIN_COMMUNITY_RESULT_MANY_USERS",{formattedNumber:A}):t===null?p("ADMIN_COMMUNITY_RESULT_EXPORT_TO_SEE"):p("ADMIN_COMMUNITY_RESULT_SOME_USERS",{formattedNumber:A})},[t,p,E]);return e.createElement(Vo,null,e.createElement(Ko,null,c),V())};var Ho=a(955807);const Qo=o.Ay.div`
987  display: flex;
988  justify-content: center;
989  align-items: center;
990  width: 100%;
991  margin: 0px;
992  height: 74px;
993  color: ${l.sRE};
994`,zo=(0,o.Ay)(Se.Ay).attrs({name:"arrowLeft"})`
995  color: ${l.sRE};
996  cursor: pointer;
997  margin: 0 10px;
998
999  svg {
1000    path {
1001      fill: ${l.Qod};
1002    }
1003  }
1004`,Go=(0,o.Ay)(Se.Ay).attrs({name:"arrowRight"})`
1005  color: ${l.sRE};
1006  cursor: pointer;
1007  margin: 0 10px;
1008
1009  svg {
1010    path {
1011      fill: ${l.Qod};
1012    }
1013  }
1014`,fn=o.Ay.div`
1015  display: flex;
1016  justify-content: center;
1017  align-items: center;
1018  text-align: center;
1019  cursor: pointer;
1020  margin: 0 5px;
1021  padding: 0 5px;
1022`,Xo=o.Ay.div`
1023  display: flex;
1024  justify-content: center;
1025  align-items: center;
1026  text-align: center;
1027  cursor: pointer;
1028  margin: 0 5px;
1029  padding: 0 5px;
1030
1031  color: white;
1032  background: ${l.Qod};
1033  border-radius: 5px;
1034`,Jo=o.Ay.div`
1035  font-weight: bold;
1036`,Zo=({pageSize:t,totalCount:n})=>{const r=(0,R.useDispatch)(),d=(0,R.useSelector)(g.eV),{t:T}=(0,ie._h)(),p=(0,e.useMemo)(()=>Math.ceil(n/t),[t,n]),E=(0,e.useMemo)(()=>d-2<2?2:d-2,[d]),m=(0,e.useMemo)(()=>{const c=[];for(let A=E;A<E+5&&A<p;A++)c.push(A);return c[0]-1>1&&c.unshift(-1),c[c.length-1]+1<p&&c.push(-1),c.unshift(1),p>1&&c.push(p),c},[E,p]),O=(0,e.useCallback)(c=>{const A=parseInt(c.currentTarget.getAttribute("data-page")||"1",10);A<1||A>p||r((0,i.UQ)(A))},[]),v=(0,e.useCallback)(()=>{const c=d-1;c<1||r((0,i.UQ)(c))},[]),I=(0,e.useCallback)(()=>{const c=d+1;c>p||r((0,i.UQ)(c))},[]),V=(0,e.useCallback)(c=>`${c}`,[]);return p<2?null:e.createElement(Qo,null,e.createElement(Jo,null,T("ADMIN_LABEL_PAGE")),e.createElement(zo,{onClick:v}),e.createElement(Ho.A,{keyField:V,list:m},(c,A)=>{switch(A){case-1:return e.createElement(fn,{key:c},"...");case d:return e.createElement(Xo,{key:c},A);default:return e.createElement(fn,{key:c,"data-page":A,onClick:O},A)}}),e.createElement(Go,{onClick:I}))};var An=a(385132);const St=o.Ay.div`
1037  height: calc(100vh - 222px);
1038`,qo=o.Ay.div`
1039  ${u.pz}
1040  height: 100%;
1041  display: flex;
1042  flex-direction: column;
1043  justify-content: center;
1044  align-items: center;
1045`,ea=o.Ay.div`
1046  margin: 20px 0 60px 0;
1047`,ta=o.Ay.div`
1048  ${u.j4}
1049`,na=o.Ay.div`
1050  display: flex;
1051  flex-direction: column;
1052  justify-content: center;
1053  align-items: center;
1054  width: 100%;
1055`,ra=o.Ay.div`
1056  display: flex;
1057  flex-direction: row;
1058  align-items: center;
1059  justify-content: center;
1060  width: 340px;
1061`,oa=o.Ay.div`
1062  ${u.EE}
1063  margin-left: 10px;
1064`,aa=o.Ay.span`
1065`,la=o.Ay.div`
1066  margin-top: 50px;
1067  display: flex;
1068  justify-content: right;
1069  width: 100%;
1070  border-bottom: 1px solid ${l.YJk};
1071`,sa=o.Ay.div`
1072  width: 61.5%;
1073  margin-left: auto;
1074  border-bottom: 1px solid ${l.YJk};
1075  transform: translate(25px, 1px);
1076`,ia=o.Ay.div`
1077  ${u.pz}
1078  height: 100%;
1079  display: flex;
1080  align-items: center;
1081  justify-content: center;
1082`,ca=o.Ay.span``,da=o.Ay.div`
1083  height: 100%;
1084  position: relative;
1085
1086  button {
1087    padding: 20px 0px;
1088  }
1089
1090  & > {
1091    padding: 0;
1092  }
1093
1094  & .${X.NK} {
1095    & .rt-tr {
1096      border-bottom: none !important;
1097      padding-top: 15px;
1098      padding-bottom: 7.5px;
1099    }
1100  }
1101
1102  & .${X.zA} {
1103    height: calc(100vh - 357.1px) !important;
1104    padding-top: 3px;
1105    border-top: 1px solid ${l.kjY} !important;
1106    & > div {
1107      margin: 0 !important;
1108
1109      &:first-child {
1110        margin-top: 3px !important;
1111      }
1112      & .rt-tr {
1113        margin: 3px 0px;
1114        & .rt-td {
1115          padding: 7px 0 !important;
1116
1117          &:not(:last-child) {
1118            padding: 0px 20px 0px 0px;
1119          }
1120
1121          & > div {
1122            font-size: 16px !important;
1123            line-height: 19px;
1124
1125            display: block;
1126            white-space: nowrap;
1127            overflow: hidden;
1128            text-overflow: ellipsis;
1129
1130            & > span {
1131              white-space: nowrap;
1132              overflow: hidden;
1133              text-overflow: ellipsis;
1134            }
1135          }
1136        }
1137      }
1138    }
1139  }
1140`,ua=o.Ay.div`
1141  position: absolute;
1142  top: 50%;
1143  left: 50%;
1144  transform: translate(-50%, -50%);
1145`,ma=o.Ay.h4`
1146  ${u.pz}
1147`,pa=o.Ay.div`
1148  display: flex;
1149  justify-content: center;
1150  align-items: center;
1151
1152  height: 75px;
1153  width: 100%;
1154  margin: auto;
1155`,Ea=o.Ay.span`
1156  ${u.EE}
1157`,fa=o.Ay.div`
1158  display: flex;
1159  align-items: center;
1160`,Aa=o.Ay.div`
1161  margin-left: 10px;
1162`,ga=o.Ay.span``,ha=(0,o.Ay)(An.Ds)`
1163  margin-left: 0;
1164`,ya=(0,o.Ay)(An._V)`
1165  margin-left: 0;
1166`;var va=Object.defineProperty,xa=Object.defineProperties,Ca=Object.getOwnPropertyDescriptors,gn=Object.getOwnPropertySymbols,Ta=Object.prototype.hasOwnProperty,_a=Object.prototype.propertyIsEnumerable,hn=(t,n,r)=>n in t?va(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Ot=(t,n)=>{for(var r in n||(n={}))Ta.call(n,r)&&hn(t,r,n[r]);if(gn)for(var r of gn(n))_a.call(n,r)&&hn(t,r,n[r]);return t},Rt=(t,n)=>xa(t,Ca(n));const Nt=20,Ia=({setTotalCount:t,totalCount:n})=>{const r=(0,R.useDispatch)(),d=(0,_.A)(g.eV),T=(0,_.A)(g.TK),p=(0,_.A)(g.yn),E=(0,_.A)(g.Lp),[m,O]=(0,e.useState)(!1),{t:v,i:I}=(0,ie._h)(),V=(0,e.useMemo)(()=>{var f,y,j,M,w,ue;const Re=!!((f=T.filter)!=null&&f.entitlementType),ke=T.searchQuery===""&&!Re?s.dS.accountInfo:T.searchBy,Lt=ke===s.dS.accountInfo&&!!((y=T.filter)!=null&&y.pageType)&&(!((j=T.filter)!=null&&j.timeStart)||!((M=T.filter)!=null&&M.timeEnd))?Rt(Ot({},T.filter),{timeStart:((w=T.filter)==null?void 0:w.timeStart)||0,timeEnd:((ue=T.filter)==null?void 0:ue.timeEnd)||Date.now()}):T.filter;return{url:`${$e.Jw}`,params:{search:Rt(Ot({},T),{filter:Lt,searchBy:ke}),sortBy:E.sortBy,sortDirection:E.sortDirection,offset:(d-1)*Nt}}},[E.sortBy,E.sortDirection,N()(T),d]),c=(0,e.useMemo)(()=>[{accessor:"created",title:v("ADMIN_LABEL_JOINED"),transformValue:f=>f?ot({date:f}):"N/A",maxWidth:0,testId:"created"},{accessor:"name",title:v("ADMIN_LABEL_NAME"),testId:"name"},{accessor:"userId",title:v("ADMIN_PROFILE_USER_ID"),preventSort:!0,testId:"userId"},...$e.Wp?[{accessor:"service",title:v("ADMIN_LABEL_SERVICE"),preventSort:!0,transformValue:f=>f[0].toUpperCase()+f.slice(1),maxWidth:0,testId:"service"}]:[]],[v]),A=(0,e.useMemo)(()=>
1166{if(p===s.dS.accessCode){const f=[...c,{accessor:"accessCode",title:v("ADMIN_LABEL_ACCESS_CODE"),preventSort:!0,maxWidth:200,testId:"accessCode"}];return f[0].maxWidth=200,$e.Wp&&(f[3].maxWidth=200),f}if(p===s.dS.receiptNumber){const f=[...c,{accessor:"receiptNumber",title:v("ADMIN_LABEL_RECEIPT_NUMBER"),preventSort:!0,maxWidth:200}];return f[0].maxWidth=200,$e.Wp&&(f[3].maxWidth=200),f}return[...c][0].maxWidth=void 0,$e.Wp&&([...c][3].maxWidth=void 0),c},[p,c,v]);(0,e.useEffect)(()=>{O(!1);const f=setTimeout(()=>O(!0),1e4);return()=>{clearTimeout(f)}},[V]);const{data:x,error:S}=(0,Ye.ku)(V),J=(0,e.useCallback)(f=>{const y=f.currentTarget.getAttribute("data-accountid");y&&(r((0,i.eg)({accountId:y})),r((0,i.g6)(s.Pp.userProfile)))},[]),B=(0,e.useMemo)(()=>{if(O(!1),!(!x||!x.results))return x.results.map(f=>{const{accountId:y,name:j,thumbnail:M}=f;return Rt(Ot({},f),{name:e.createElement(fa,null,M?e.createElement(ya,{rounded:!0,src:M}):e.createElement(ha,{rounded:!0},e.createElement(Se.Ay,{color:"white",name:"singleUser"})),e.createElement(Aa,null,j)),viewProfile:e.createElement(lt,{"data-accountid":y,"data-testid":"button-view-profile",onClick:J},e.createElement(ga,null,v("ADMIN_ACTION_VIEW_PROFILE")))})})},[N()(x)]),ee=(0,e.useCallback)(f=>{const{id:y}=f[0],M={name:"name",joined:"created"}[y.toLowerCase()];if(!M)return;let w=-1;E.sortBy===M&&(w=E.sortDirection===-1?1:-1),r((0,i.zt)(M,w))},[E]);(0,e.useEffect)(()=>{!x||!x.pagination||t(x.pagination.totalCount)},[x]);const ce=(0,e.useMemo)(()=>Math.ceil(n/Nt),[n]),we=(0,e.useMemo)(()=>!x||!x.results||!x.pagination,[x]),Ie=(0,e.useMemo)(()=>{var f;return((f=x?.results)==null?void 0:f.length)===0},[x]),Oe=(0,e.useMemo)(()=>n===null,[n]),h=(0,e.useMemo)(()=>x?.results.length>0&&!!x.forceExport,[x,ce]),K=(0,e.useMemo)(()=>x?.results.length>0&&!x.forceExport,[x,ce]);return we?e.createElement(St,null,e.createElement(qo,null,e.createElement(ea,null,e.createElement(st,{fade:!1,size:11}),e.createElement(ta,null,v("LOADING"))),m&&e.createElement(na,null,e.createElement(ra,null,e.createElement(Se.Ay,{name:"exclamationCircle"}),e.createElement(oa,null,e.createElement(aa,null,v("ADMIN_COMMUNITY_LONG_WAIT_TEXT")))),e.createElement(la,null,e.createElement(sa,null,e.createElement(Se.Ay,{name:"personPullingString"})))))):S?e.createElement(St,null,e.createElement(ia,null,e.createElement(ca,null,v("ADMIN_COMMUNITY_COULD_NOT_RETRIEVE_DATA")))):e.createElement(St,null,e.createElement(da,{"data-testid":"community:result-table"},e.createElement(jt.Ay,{columns:[...A,{accessor:"viewProfile",title:v("ADMIN_LABEL_ACTIONS"),preventSort:!0,maxWidth:165,testId:"actions"}],currentlySorted:E,data:B,onSortedChange:ee,showPagination:!1,useSelectorSorting:!0}),Ie&&e.createElement(ua,null,e.createElement(ma,null,v(Oe?"ADMIN_COMMUNITY_SEE_ALL_RESULTS":"ADMIN_COMMUNITY_NO_USERS_FOUND"))),h&&e.createElement(pa,null,e.createElement(Ea,null,I("ADMIN_COMMUNITY_DOWNLOAD_TO_SEE_FULL_LIST",{exportButton:e.createElement("strong",null,v("ADMIN_COMMUNITY_EXPORT_RESULTS"))}))),K&&e.createElement(Zo,{pageSize:Nt,totalCount:x.pagination.totalCount})))},Ma=()=>{const[t,n]=(0,e.useState)(0);return e.createElement(Rr,{"data-testid":"usersection"},e.createElement(wo,null),e.createElement(Wo,{totalCount:t}),e.createElement(Ia,{setTotalCount:n,totalCount:t}))};var Da=Object.defineProperty,Sa=Object.defineProperties,Oa=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,Ra=Object.prototype.hasOwnProperty,Na=Object.prototype.propertyIsEnumerable,vn=(t,n,r)=>n in t?Da(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,La=(t,n)=>{for(var r in n||(n={}))Ra.call(n,r)&&vn(t,r,n[r]);if(yn)for(var r of yn(n))Na.call(n,r)&&vn(t,r,n[r]);return t},Pa=(t,n)=>Sa(t,Oa(n));const ba=()=>{const t=(0,R.useDispatch)(),[n,r]=(0,e.useState)(!1),[d,T]=(0,e.useState)(null),p=(0,_.A)(g.KZ),E=(0,_.A)(g.CA),m=(0,_.A)(g.rM),O=(0,_.A)(g.vD),v=O?.pageType===s.WS.videoPage,{t:I}=(0,ie._h)(),V=(0,e.useMemo)(()=>[{id:"sku",title:"SKU"},{id:"price",title:I("ADMIN_LABEL_CURRENCY_PRICE")},{id:"recurrence",title:I("ADMIN_SETTINGS_BILLING_PLAN_FREQUENCY")}],[I]),c=(0,e.useCallback)(()=>{r(!1)},[]),A=(0,e.useCallback)(()=>{t((0,i.k0)(s.dS.accountInfo)),t((0,i.Oo)())},[]),x=(0,e.useCallback)(()=>{t((0,i.Oo)())},[]),S=(0,e.useMemo)(()=>E===s.VM.entitlements?A:x,[E]),J=(0,e.useCallback)((f,y)=>{t((0,i.FZ)(E)),t((0,i.k0)(s.dS.entitlements)),t((0,i.Ri)(f,y)),t((0,i.DE)(s.l2.ready)),t((0,i.UQ)(1)),x()},[E]),B=(0,e.useCallback)(f=>{t((0,i.eg)({subscription:{id:f}})),t((0,i.h3)(f))},[]),ee=(0,e.useCallback)((f,y,j,M)=>{m.id&&(t((0,i.Vh)({id:m.id,action:j?"justRefund":"remove",reason:f,refundDetails:y,grantRefund:!0,refundAmount:M}
1166)),t((0,i.eg)({subscription:{}})))},[N()(m)]),ce=(0,e.useCallback)((f,y)=>{m.id&&(t((0,i.Vh)({id:m.id,action:y,grantRefund:f})),t((0,i.eg)({subscription:{}})))},[N()(m)]),we=(0,e.useCallback)(()=>{E===s.VM.dateTime&&x()},[E]),Ie=(0,e.useCallback)(f=>{const{_id:y,name:j}=f;return E!==s.VM.grant?{label:I("ADMIN_ACTION_SELECT"),action:()=>J(y,j)}:{label:I("ADMIN_LABEL_COMMUNITY_GRANT_TICKET_BUNDLE_SUBSCRIPTION"),action:()=>B(y)}},[E,J,B,I]),Oe=(0,e.useCallback)(f=>{if(f)return f.filter(y=>!(y.type===je.Q.vodRental||y.type===je.Q.vodPurchase||v&&y.type==="bundle")).map(y=>{const j=Ie(y),{action:M,label:w}=j;let ue;return y?.prices&&y?.prices.length>0&&(ue=y?.prices.find(Re=>Re.default)),Pa(La({},y),{price:ue?(0,Cn.$g)(ue.currency,ue.value):"",name:e.createElement($t,{tooltip:y.name},e.createElement(ht,null,y.name)),nameStr:y.name,sku:e.createElement($t,{tooltip:y.sku},e.createElement(ht,null,y.sku)),skuStr:y.sku,action:e.createElement(wn,{action:M,currentSubscription:m,id:y._id,label:w})})})},[N()(m),Ie]),h=(0,e.useCallback)(()=>{var f,y;switch(E){case s.VM.paidEntitlements:case s.VM.entitlements:case s.VM.grant:const j=Bn(I,V),M=[{accessor:"type",id:"type",isTitle:!0,title:I("ADMIN_LABEL_TYPE"),transformValue:w=>{switch(w?.toLowerCase()){case"ticket":return I("ADMIN_COMMUNITY_TYPE_TICKET");case"subscription":return I("ADMIN_BILLING_ITEM_SUBSCRIPTION");default:return(0,gt.capitalize)(w)}}},{accessor:"name",id:"name",isTitle:!0,title:I("ADMIN_LABEL_NAME")},...j,{accessor:"created",id:"created",title:I("ADMIN_LABEL_ADDED"),sort:_n.AZ,transformValue:w=>new Date(w).toISOString().substr(0,10)},{accessor:"action",minWidth:110,title:I("ADMIN_LABEL_ACTION"),preventSort:!0}];return n?e.createElement(de.A,{allowOverflow:!1,fixedHeight:!0,maxHeight:"100%",maxWidth:"580px",onClose:c},e.createElement(We.A,{onClose:c,type:d})):e.createElement(re.A,{columns:M,disableEditing:!0,disableSelecting:!0,fetchObject:{service:"/subscription/v2",method:"GET"},helperText:v?"ADMIN_PLACEHOLDER_SEARCH_FOR_A_TICKET_OR_SUBSCRIPTION":"ADMIN_PLACEHOLDER_SEARCH_FOR_A_TICKET_BUNDLE_OR_SUBSCRIPTION",onClose:S,searchPlaceholderKey:v?"ADMIN_PLACEHOLDER_SEARCH_FOR_A_TICKET_OR_SUBSCRIPTION":"ADMIN_PLACEHOLDER_SEARCH_FOR_A_TICKET_BUNDLE_OR_SUBSCRIPTION",titleKey:v?"ADMIN_LABEL_TICKETS_AND_SUBSCRIPTION_LIBRARY":"ADMIN_LABEL_TICKETS_BUNDLES_AND_SUBSCRIPTION_LIBRARY",formatData:Oe,onSelectItem:()=>{}});case s.VM.refund:return e.createElement(Ce,{currency:(f=m?.price)==null?void 0:f.currency,onClose:x,onConfirm:ee,refund:((y=m?.price)==null?void 0:y.value)||0});case s.VM.cancel:return e.createElement(Fe,{currentPeriodEnd:m?.currentPeriodEnd,grantedMethod:m?.grantedMethod,onClose:x,onConfirm:ce});default:return null}},[E,n,d,Oe,S,ee,ce,N()(m),I]),K=(0,e.useCallback)(()=>{switch(p){case s.Pp.userProfile:return e.createElement(Or,null);case s.Pp.userSection:return e.createElement(Ma,null);default:return null}},[p]);return e.createElement(Mn,{"data-testid":"community-manager",onClick:we},e.createElement(Dn,null,e.createElement(Sn,null,e.createElement(Rn,null,I("ADMIN_LABEL_COMMUNITY")),e.createElement(Tn.A,null)),e.createElement(On,null,K()),h()))}},584742:(fe,se,a)=>{a.d(se,{A:()=>ae});var e=a(63696),R=a(224191),H=a(789069),N=a(886550);const g=(0,N.AH)`
1167  max-height: 28px;
1168  object-fit: contain;
1169`,i=N.Ay.img`
1170  ${g}
1171  width: 28px;
1172`,s=N.Ay.img`
1173  ${g}
1174  max-width: 130px;
1175`;var _=Object.defineProperty,re=Object.defineProperties,F=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,de=($,u,Y)=>u in $?_($,u,{enumerable:!0,configurable:!0,writable:!0,value:Y}):$[u]=Y,me=($,u)=>{for(var Y in u||(u={}))C.call(u,Y)&&de($,Y,u[Y]);if(z)for(var Y of z(u))o.call(u,Y)&&de($,Y,u[Y]);return $},oe=($,u)=>re($,F(u)),Q=($,u)=>{var Y={};for(var G in $)C.call($,G)&&u.indexOf(G)<0&&(Y[G]=$[G]);if($!=null&&z)for(var G of z($))u.indexOf(G)<0&&o.call($,G)&&(Y[G]=$[G]);return Y};const l=$=>{var u=$,{showIcon:Y=!1,alt:G}=u,Ae=Q(u,["showIcon","alt"]);const k=(0,R.useSelector)(H.wx),D=(0,R.useSelector)(H.ww);return e.useEffect(()=>{if(k){const U=new Image;U.src=k}if(D){const U=new Image;U.src=D}},[]),Y?e.createElement(i,oe(me({},Ae),{alt:G||"Icon",src:D})):e.createElement(s,oe(me({},Ae),{alt:G||"Logo",src:k}))},ae=(0,e.memo)(l)},334509:(fe,se,a)=>{a.r(se),a.d(se,{default:()=>Z,getScope:()=>D,getUserRoleBasedOnPermissions:()=>k});var e=a(63696),R=a(86138),H=a(463302),N=a(976633),g=a.n(N),i=a(41989),s=a(704719),_=a(886550),re=a(429195),F=a(545290),z=a(154789),C=a(152544),o=a(594955);const de=(0,_.Ay)(o.A)`
1176  position: relative;
1177  width: 100vw;
1178  height: 100vh;
1179  overflow-y: auto;
1180  overflow-x: hidden;
1181  display: flex;
1182  flex-direction: column;
1183  justify-content: center;
1184  align-items: center;
1185  background-color: rgba(0, 0, 0, 0.5);
1186  @media (max-width: 425px) {
1187    padding: 0;
1188  }
1189`,me=_.Ay.div`
1190  background-color: ${re.dHK};
1191  position: relative;
1192  max-width: 552px;
1193  width: 100vw;
1194  overflow-y: auto;
1195  overflow-x: hidden;
1196  padding: 30px;
1197  border-radius: 10px;
1198  display: flex;
1199  flex-direction: column;
1200  align-items: flex-start;
1201  justify-content: flex-start;
1202  height: auto;
1203  max-height: 90vh;
1204  gap: 30px;
1205  ${F.xj};
1206  ${F.uk}
1207  & section {
1208    width: 100%;
1209  }
1210`,oe=_.Ay.h1`
1211  ${C.cs};
1212  color: ${re.o0B};
1213  margin: 0 0 30px 0;
1214`,Q=_.Ay.div`
1215  width: 100%;
1216  display: flex;
1217  padding: 10px;
1218  align-items: flex-start;
1219  border-radius: 5px;
1220  background: ${re.dHK};
1221  align-items: center;
1222`,l=_.Ay.img`
1223  width: 40px;
1224  height: 40px;
1225  margin-right: 12px;
1226  border-radius: 50%;
1227`,ae=_.Ay.p`
1228${C.eb};
1229  color: ${re.o0B};
1230  margin: 0px;
1231`,$=(0,_.Ay)(z.Ay)`
1232  background: ${re.YJk};
1233  width: 115px;
1234  height: 40px;
1235  ${C.xu};
1236  color: ${re.o0B};
1237`,u=(0,_.Ay)(z.Ay)`
1238  width: 101px;
1239  height: 40px;
1240  ${C.xu}
1241  color: ${re.o0B};
1242`,Y=_.Ay.section``,G=_.Ay.section`
1243  display: flex;
1244  flex-direction: column;
1245  gap: 20px;
1246`,Ae=_.Ay.section`
1247  display: flex;
1248  justify-content: flex-end;
1249  gap: 10px;
1250`,k=(b=[])=>{const q=new Set(b);return q.has(H.Nv.SiteAdmin)?s.i.SITE_ADMIN:q.has(H.Nv.Producer)?s.i.PRODUCER:q.has(H.Nv.ChatModerator)?s.i.MODERATOR:q.has(H.Nv.Creator)?s.i.CREATOR:s.i.USER},D=b=>b===s.i.SITE_ADMIN?H.Nv.SiteAdmin:b===s.i.MODERATOR?H.Nv.ChatModerator:b===s.i.PRODUCER?H.Nv.Producer:b===s.i.CREATOR?H.Nv.Creator:null,Z=({data:b})=>{const{name:q,thumbnail:L,permissions:P,specificChannelsIds:W,pages:te,onChangeRole:he,onCancel:ge}=b,{t:ye}=(0,i._h)(),[pe,Ne]=(0,e.useState)(k([P])),[Ee,xe]=(0,e.useState)(W||[]),Le=(0,e.useCallback)(()=>{const Ce=D(pe);he(Ce?[{scope:Ce,pageId:Ee,write:!0}]:[])},[he,pe,Ee]),Ve=(0,e.useCallback)(Ce=>{Ce.stopPropagation()},[]);return e.createElement(de,{"data-testid":"addUserModal",onClick:ge},e.createElement(me,{onClick:Ve},e.createElement(Y,null,e.createElement(oe,null,ye("ADMIN_MODAL_CHANGE_ROLE")),e.createElement(Q,{"data-testid":"userInformation"},e.createElement(l,{"data-testid":"userThumbnail",src:L||g()}),e.createElement(ae,{"data-testid":"userName"},q))),e.createElement(G,null,e.createElement(s.A,{onSelectRole:Ne,onSpecificChannelsC
1250hange:xe,pages:te,selectedRole:pe,showUserOption:!0,specificChannelsIds:Ee})),e.createElement(Ae,null,e.createElement($,{"data-testid":"cancelButton",disabled:!1,onClick:ge},e.createElement(R.A,{stringKey:"CANCEL"})),e.createElement(u,{"data-testid":"doneButton",disabled:!1,onClick:Le},e.createElement(R.A,{stringKey:"DONE"})))))}},594955:(fe,se,a)=>{a.d(se,{A:()=>re});var e=a(63696),R=a(224191),H=a(199749),N=a(886550),g=a(545290);const i={"bottom-left":(0,N.AH)`
1251    ${({separation:F})=>`
1252      transform: translate(calc(-100% - ${F}px), 0);
1253    `}
1254  `,"bottom-right":(0,N.AH)`
1255    ${({anchorDimensions:{width:F},separation:z})=>`
1256      transform: translate(${F+z}px, 0);
1257    `}
1258  `,"top-left":(0,N.AH)`
1259    ${({anchorDimensions:{height:F},separation:z=5})=>`
1260      transform: translate(calc(-100% - ${z}px), calc(${F}px - 100%));
1261    `}
1262  `,"top-right":(0,N.AH)`
1263    ${({anchorDimensions:{height:F,width:z},separation:C})=>`
1264      transform: translate(${z+C}px, calc(${F}px - 100%));
1265    `}
1266  `},s=N.Ay.div`
1267  max-width: 100vw;
1268  ${g.bo}
1269  ${g.k2}
1270  ${({anchorDimensions:{top:F,left:z},position:C})=>C&&(0,N.AH)`
1271    position: absolute !important;
1272    top: ${F}px;
1273    left: ${z}px;
1274    ${i[C]}
1275  `}
1276`,_=F=>F.stopPropagation();function re({getDimensions:F,children:z=null,className:C="",position:o,separation:de=5,style:me={},onClick:oe,"data-testid":Q}){const[l,ae]=(0,e.useState)(new DOMRect),$=(0,R.useSelector)(H.OL);return(0,e.useEffect)(()=>{const u=F?.();u&&ae(u)},[F,$]),e.createElement(s,{anchorDimensions:l,className:C,"data-testid":Q,onClick:oe||_,position:o,separation:de,style:me},z)}},904400:(fe,se,a)=>{a.d(se,{A:()=>_});var e=a(990220),R=a(124659),H=a(63696),N=a(224191),g=a.n(N),i=a(463302);const _=re=>{const[F,z]=(0,H.useState)([]),[C,o]=(0,H.useState)({}),[de,me]=(0,H.useState)(!1),{limit:oe=1e3,includeArchived:Q=0,pageOffset:l=0,refreshKey:ae,search:$="",searchKey:u="",sortBy:Y="last_modified",sortDirection:G="desc",blockRequest:Ae}=re,k=(0,N.useSelector)(i.mC),D=(0,H.useMemo)(()=>Date.now(),[ae]),U=`${e.iz}/pages?_=${D}`,Z={Authorization:`Bearer ${k}`},b={includeArchived:Q,limit:oe.toString(),search:$,searchKey:u,skip:(oe*l).toString(),sortBy:Y,sortDirection:G},q=(0,R.A)({headers:Z,params:b,url:U,blockRequest:Ae}),{data:L,loaded:P,error:W}=q;return(0,H.useEffect)(()=>{P&&L&&z(L.results),o(W),me(P)},[L,P,W]),[F,C,de]}},704719:(fe,se,a)=>{a.d(se,{A:()=>Ae,i:()=>Q});var e=a(63696),R=a(776637),H=a.n(R),N=a(525164),g=a(892451),i=a(723294),s=a(41989),_=a(33149),re=a(333618),F=a(299674),z=Object.defineProperty,C=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(k,D,U)=>D in k?z(k,D,{enumerable:!0,configurable:!0,writable:!0,value:U}):k[D]=U,oe=(k,D)=>{for(var U in D||(D={}))o.call(D,U)&&me(k,U,D[U]);if(C)for(var U of C(D))de.call(D,U)&&me(k,U,D[U]);return k};const Q={SITE_ADMIN:"SITE_ADMIN",MODERATOR:"MODERATOR",PRODUCER:"PRODUCER",USER:"USER",CREATOR:"CREATOR"},l={initial:{opacity:0,y:-8},animate:{opacity:1,y:0,transition:{type:"spring",stiffness:300,damping:25}},exit:{opacity:0,y:-8,transition:{duration:.15}}},ae="entire-site",$="specific",u=(k=[],D=[])=>{const U=k.reduce((Z,b)=>(b.data.name&&(Z[b._id]=b.data.name),Z),{});return D.map(Z=>{var b;return{id:Z,name:(b=U[Z])!=null?b:Z}})};function Y({checked:k,description:D,disabled:U=!1,label:Z,onCheckedChange:b,testId:q}){return e.createElement("label",{className:(0,_.cn)("flex items-start gap-4",U?"cursor-not-allowed opacity-50":"cursor-pointer"),"data-testid":q},e.createElement(re.S,{checked:k,className:"mt-0.5",disabled:U,onCheckedChange:L=>b?.(L===!0)}),e.createElement("div",{className:"flex flex-col gap-1"},e.createElement("span",{className:"text-sm font-medium leading-none text-[var(--admin-text-100)]"},Z),D&&e.createElement("p",{className:"m-0 text-xs leading-snug text-[var(--admin-text-200)]"},D)))}function G({descriptionKey:k,disabled:D=!1,label:U,onSelect:Z,onSpecificChannelsChange:b,pages:q,role:L,selectedRole:P,singleChannelRole:W=!1,specificChannelsIds:te,testId:he}){const{t:ge}=(0,s._h)(),[ye,pe]=(0,e.useMemo)(()=>[P===Q.SITE_ADMIN,P===L],[P,L]),Ne=(0,e.useMemo)(()=>q.filter(ne=>ne.data.name).map(ne=>({label:ne.data.name,value:ne._id})),[H()(q)]),[Ee,xe]=(0,e.useState)(()=>P===L?u(q,te):[]),[Le,Ve]=(0,e.useState)(te.length===0),Ce=(0,e.useMemo)(()=>Ee.map(ne=>({label:ne.name,value:ne.id})),[H()(Ee)]),Ke=(0,e.useCallback)(ne=>{const _e=Array.isArray(ne)?ne:[ne];xe(_e.filter(ve=>ve.value&&ve.label).map(ve=>({id:ve.value,name:ve.label})))},[]),Me=(0,e.useCallback)(ne=>{xe(_e=>_e.filter(ve=>ve.id!==ne.value))},[]),Te=(0,e.useCallback)(()=>{Z(pe?Q.USER:L)},[Z,pe,L]);(0,e.useEffect)(()=>{pe&&xe(u(q,te))},[H()(q)]);const De=W||!Le&&!ye;return(0,e.useEffect)(()=>{pe&&b(De?Ee.map(ne=>ne.id):[])},[H()(Ee),De,pe]),e.createElement("div",{className:"flex flex-col gap-3"},e.createElement(Y,{checked:pe||ye,description:ge(k),disabled:ye||D,label:U,onCheckedChange:Te,testId:he}),e.createElement(N.N,null,pe&&e.createElement(g.P.div,oe({key:"scope-options"},l),e.createElement("div",{className:(0,_.cn)("ml-10 flex flex-col gap-3",D&&"opacity-50")},e.createElement(F.z6,{value:De?$:ae,onValueChange:ne=>Ve(ne===ae)},!W&&e.createElement(F.D3,{"data-testid":"allChannelsRadioBtn",disabled:D,label:ge("ADMIN_ROLE_CHAT_ADMIN_ENTIRE_SITE"),value:ae}),e.createElement(F.D3,{"data-testid":"specificChannelsRadioBtn",disabled:D,label:ge("ADMIN_ROLE_CHAT_ADMIN_SPECIFIC_ACCESS"),value:$})),De&&e.createElement(i.d,{isDisabled:D||W&&Ee.length>0,isSearchable:!0,name:"channelAndPagesTags",onChange:Ke,onDeleteOption:Me,options:Ne,placeholder:ge("ADMIN_ACTION_SELECT"),value:Ce})))))}
1276function Ae({disabled:k=!1,onSelectRole:D,onSpecificChannelsChange:U,pages:Z,selectedRole:b,showUserOption:q=!1,specificChannelsIds:L}){const{t:P}=(0,s._h)(),W=(0,e.useCallback)(()=>{k||(D(b===Q.SITE_ADMIN?Q.USER:Q.SITE_ADMIN),U([]))},[k,b,D,U]);return e.createElement("div",{className:"flex flex-col gap-5"},e.createElement(Y,{checked:b===Q.SITE_ADMIN,description:P("ADMIN_ROLE_SITE_ADMIN_DESC"),disabled:k,label:P("ADMIN_INVITE_TAB_SITE_ADMIN"),onCheckedChange:W,testId:"siteAdminCheckbox"}),e.createElement(G,{descriptionKey:"ADMIN_ROLE_PRODUCER_DESC",disabled:k,label:P("ADMIN_ROLE_PRODUCER"),onSelect:D,onSpecificChannelsChange:U,pages:Z,role:Q.PRODUCER,selectedRole:b,specificChannelsIds:L,testId:"producerCheckbox"}),e.createElement(G,{descriptionKey:"ADMIN_ROLE_MODERATOR",disabled:k,label:P("ADMIN_INVITE_TAB_MODERATOR"),onSelect:D,onSpecificChannelsChange:U,pages:Z,role:Q.MODERATOR,selectedRole:b,specificChannelsIds:L,testId:"moderatorCheckbox"}),e.createElement(G,{descriptionKey:"ADMIN_ROLE_CREATOR_DESC",disabled:k,label:P("ADMIN_ROLE_CREATOR"),onSelect:D,onSpecificChannelsChange:U,pages:Z,role:Q.CREATOR,selectedRole:b,singleChannelRole:!0,specificChannelsIds:L,testId:"creatorCheckbox"}),q&&e.createElement(Y,{checked:!0,description:P("ADMIN_ROLE_USER_DESC"),disabled:!0,label:P("ADMIN_ROLE_USER"),testId:"userCheckbox"}))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.